; LLVM IR from AdarshGaur/Competitive-Programming :: SPOJ (ACPC10A - What’s Next)

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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  store i32 0, ptr %1, align 4
  %9 = call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %10 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %12
  %14 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  %15 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %16 = getelementptr i8, ptr %15, i64 -24
  %17 = load i64, ptr %16, align 8
  %18 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %17
  %19 = call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %18, ptr noundef null)
  br label %20

20:                                               ; preds = %163, %161, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %4) #6
  %21 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %22 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %21, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %23 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %22, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %24 = load i32, ptr %2, align 4, !tbaa !8
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %26, label %33

26:                                               ; preds = %20
  %27 = load i32, ptr %3, align 4, !tbaa !8
  %28 = icmp eq i32 %27, 0
  br i1 %28, label %29, label %33

29:                                               ; preds = %26
  %30 = load i32, ptr %4, align 4, !tbaa !8
  %31 = icmp eq i32 %30, 0
  br i1 %31, label %32, label %33

32:                                               ; preds = %29
  store i32 3, ptr %5, align 4
  br label %161

33:                                               ; preds = %29, %26, %20
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  br label %35

35:                                               ; preds = %33
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %36 = load i32, ptr %3, align 4, !tbaa !8
  %37 = load i32, ptr %2, align 4, !tbaa !8
  %38 = sub nsw i32 %36, %37
  %39 = load i32, ptr %4, align 4, !tbaa !8
  %40 = load i32, ptr %3, align 4, !tbaa !8
  %41 = sub nsw i32 %39, %40
  %42 = icmp eq i32 %38, %41
  br i1 %42, label %43, label %54

43:                                               ; preds = %35
  %44 = load i32, ptr %3, align 4, !tbaa !8
  %45 = load i32, ptr %2, align 4, !tbaa !8
  %46 = sub nsw i32 %44, %45
  store i32 %46, ptr %6, align 4, !tbaa !8
  %47 = load i32, ptr %4, align 4, !tbaa !8
  %48 = load i32, ptr %6, align 4, !tbaa !8
  %49 = add nsw i32 %47, %48
  %50 = sext i32 %49 to i64
  store i64 %50, ptr %8, align 8, !tbaa !11
  %51 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.1)
  %52 = load i64, ptr %8, align 8, !tbaa !11
  %53 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %51, i64 noundef %52)
  store i32 2, ptr %5, align 4
  br label %160, !llvm.loop !13

54:                                               ; preds = %35
  %55 = load i32, ptr %2, align 4, !tbaa !8
  %56 = icmp sgt i32 %55, 0
  br i1 %56, label %57, label %81

57:                                               ; preds = %54
  %58 = load i32, ptr %3, align 4, !tbaa !8
  %59 = icmp sgt i32 %58, 0
  br i1 %59, label %60, label %81

60:                                               ; preds = %57
  %61 = load i32, ptr %3, align 4, !tbaa !8
  %62 = load i32, ptr %2, align 4, !tbaa !8
  %63 = icmp slt i32 %61, %62
  br i1 %63, label %64, label %72

64:                                               ; preds = %60
  %65 = load i32, ptr %2, align 4, !tbaa !8
  %66 = load i32, ptr %3, align 4, !tbaa !8
  %67 = sdiv i32 %65, %66
  store i32 %67, ptr %7, align 4, !tbaa !8
  %68 = load i32, ptr %4, align 4, !tbaa !8
  %69 = load i32, ptr %7, align 4, !tbaa !8
  %70 = sdiv i32 %68, %69
  %71 = sext i32 %70 to i64
  store i64 %71, ptr %8, align 8, !tbaa !11
  br label %80

72:                                               ; preds = %60
  %73 = load i32, ptr %3, align 4, !tbaa !8
  %74 = load i32, ptr %2, align 4, !tbaa !8
  %75 = sdiv i32 %73, %74
  store i32 %75, ptr %7, align 4, !tbaa !8
  %76 = load i32, ptr %4, align 4, !tbaa !8
  %77 = load i32, ptr %7, align 4, !tbaa !8
  %78 = mul nsw i32 %76, %77
  %79 = sext i32 %78 to i64
  store i64 %79, ptr %8, align 8, !tbaa !11
  br label %80

80:                                               ; preds = %72, %64
  br label %155

81:                                               ; preds = %57, %54
  %82 = load i32, ptr %2, align 4, !tbaa !8
  %83 = icmp slt i32 %82, 0
  br i1 %83, label %84, label %108

84:                                               ; preds = %81
  %85 = load i32, ptr %3, align 4, !tbaa !8
  %86 = icmp slt i32 %85, 0
  br i1 %86, label %87, label %108

87:                                               ; preds = %84
  %88 = load i32, ptr %3, align 4, !tbaa !8
  %89 = load i32, ptr %2, align 4, !tbaa !8
  %90 = icmp slt i32 %88, %89
  br i1 %90, label %91, label %99

91:                                               ; preds = %87
  %92 = load i32, ptr %3, align 4, !tbaa !8
  %93 = load i32, ptr %2, align 4, !tbaa !8
  %94 = sdiv i32 %92, %93
  store i32 %94, ptr %7, align 4, !tbaa !8
  %95 = load i32, ptr %4, align 4, !tbaa !8
  %96 = load i32, ptr %7, align 4, !tbaa !8
  %97 = mul nsw i32 %95, %96
  %98 = sext i32 %97 to i64
  store i64 %98, ptr %8, align 8, !tbaa !11
  br label %107

99:                                               ; preds = %87
  %100 = load i32, ptr %2, align 4, !tbaa !8
  %101 = load i32, ptr %3, align 4, !tbaa !8
  %102 = sdiv i32 %100, %101
  store i32 %102, ptr %7, align 4, !tbaa !8
  %103 = load i32, ptr %4, align 4, !tbaa !8
  %104 = load i32, ptr %7, align 4, !tbaa !8
  %105 = sdiv i32 %103, %104
  %106 = sext i32 %105 to i64
  store i64 %106, ptr %8, align 8, !tbaa !11
  br label %107

107:                                              ; preds = %99, %91
  br label %154

108:                                              ; preds = %84, %81
  %109 = load i32, ptr %2, align 4, !tbaa !8
  %110 = icmp slt i32 %109, 0
  br i1 %110, label %111, label %132

111:                                              ; preds = %108
  %112 = load i32, ptr %2, align 4, !tbaa !8
  %113 = load i32, ptr %4, align 4, !tbaa !8
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %115, label %123

115:                                              ; preds = %111
  %116 = load i32, ptr %2, align 4, !tbaa !8
  %117 = load i32, ptr %3, align 4, !tbaa !8
  %118 = sdiv i32 %116, %117
  store i32 %118, ptr %7, align 4, !tbaa !8
  %119 = load i32, ptr %4, align 4, !tbaa !8
  %120 = load i32, ptr %7, align 4, !tbaa !8
  %121 = sdiv i32 %119, %120
  %122 = sext i32 %121 to i64
  store i64 %122, ptr %8, align 8, !tbaa !11
  br label %131

123:                                              ; preds = %111
  %124 = load i32, ptr %3, align 4, !tbaa !8
  %125 = load i32, ptr %2, align 4, !tbaa !8
  %126 = sdiv i32 %124, %125
  store i32 %126, ptr %7, align 4, !tbaa !8
  %127 = load i32, ptr %4, align 4, !tbaa !8
  %128 = load i32, ptr %7, align 4, !tbaa !8
  %129 = mul nsw i32 %127, %128
  %130 = sext i32 %129 to i64
  store i64 %130, ptr %8, align 8, !tbaa !11
  br label %131

131:                                              ; preds = %123, %115
  br label %153

132:                                              ; preds = %108
  %133 = load i32, ptr %2, align 4, !tbaa !8
  %134 = load i32, ptr %4, align 4, !tbaa !8
  %135 = icmp slt i32 %133, %134
  br i1 %135, label %136, label %144

136:                                              ; preds = %132
  %137 = load i32, ptr %3, align 4, !tbaa !8
  %138 = load i32, ptr %2, align 4, !tbaa !8
  %139 = sdiv i32 %137, %138
  store i32 %139, ptr %7, align 4, !tbaa !8
  %140 = load i32, ptr %4, align 4, !tbaa !8
  %141 = load i32, ptr %7, align 4, !tbaa !8
  %142 = mul nsw i32 %140, %141
  %143 = sext i32 %142 to i64
  store i64 %143, ptr %8, align 8, !tbaa !11
  br label %152

144:                                              ; preds = %132
  %145 = load i32, ptr %3, align 4, !tbaa !8
  %146 = load i32, ptr %4, align 4, !tbaa !8
  %147 = sdiv i32 %145, %146
  store i32 %147, ptr %7, align 4, !tbaa !8
  %148 = load i32, ptr %4, align 4, !tbaa !8
  %149 = load i32, ptr %7, align 4, !tbaa !8
  %150 = sdiv i32 %148, %149
  %151 = sext i32 %150 to i64
  store i64 %151, ptr %8, align 8, !tbaa !11
  br label %152

152:                                              ; preds = %144, %136
  br label %153

153:                                              ; preds = %152, %131
  br label %154

154:                                              ; preds = %153, %107
  br label %155

155:                                              ; preds = %154, %80
  %156 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.2)
  %157 = load i64, ptr %8, align 8, !tbaa !11
  %158 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %156, i64 noundef %157)
  br label %159

159:                                              ; preds = %155
  store i32 0, ptr %5, align 4
  br label %160

160:                                              ; preds = %159, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  br label %161

161:                                              ; preds = %160, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %4) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %2) #6
  %162 = load i32, ptr %5, align 4
  switch i32 %162, label %165 [
    i32 0, label %163
    i32 3, label %164
    i32 2, label %20
  ]

163:                                              ; preds = %161
  br label %20, !llvm.loop !13

164:                                              ; preds = %161
  ret i32 0

165:                                              ; preds = %161
  unreachable
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #5 align 2

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

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 = { 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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !10, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}


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

%"class.std::basic_istream" = type { ptr, i64, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.std::basic_ostream" = type { ptr, %"class.std::basic_ios" }

@_ZSt3cin = external global %"class.std::basic_istream", align 8
@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [4 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = tail call noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext false)
  %5 = load ptr, ptr @_ZSt3cin, align 8, !tbaa !5
  %6 = getelementptr i8, ptr %5, i64 -24
  %7 = load i64, ptr %6, align 8
  %8 = getelementptr inbounds i8, ptr @_ZSt3cin, i64 %7
  %9 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %8, ptr noundef null)
  %10 = load ptr, ptr @_ZSt4cout, align 8, !tbaa !5
  %11 = getelementptr i8, ptr %10, i64 -24
  %12 = load i64, ptr %11, align 8
  %13 = getelementptr inbounds i8, ptr @_ZSt4cout, i64 %12
  %14 = tail call noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264) %13, ptr noundef null)
  br label %15

15:                                               ; preds = %73, %0
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %1) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #6
  %16 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) @_ZSt3cin, ptr noundef nonnull align 4 dereferenceable(4) %1)
  %17 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %16, ptr noundef nonnull align 4 dereferenceable(4) %2)
  %18 = call noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16) %17, ptr noundef nonnull align 4 dereferenceable(4) %3)
  %19 = load i32, ptr %1, align 4, !tbaa !8
  %20 = icmp eq i32 %19, 0
  %21 = load i32, ptr %2, align 4
  %22 = icmp eq i32 %21, 0
  %or.cond = select i1 %20, i1 %22, i1 false
  %23 = load i32, ptr %3, align 4
  %24 = icmp eq i32 %23, 0
  %or.cond3 = select i1 %or.cond, i1 %24, i1 false
  br i1 %or.cond3, label %77, label %25

25:                                               ; preds = %15
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %27 = load i32, ptr %2, align 4
  %28 = load i32, ptr %1, align 4, !tbaa !8
  %29 = sub nsw i32 %27, %28
  %30 = load i32, ptr %3, align 4, !tbaa !8
  %31 = sub nsw i32 %30, %27
  %32 = icmp eq i32 %29, %31
  br i1 %32, label %33, label %35

33:                                               ; preds = %25
  %34 = add nsw i32 %30, %29
  br label %73, !llvm.loop !11

35:                                               ; preds = %25
  %36 = icmp sgt i32 %28, 0
  %37 = icmp sgt i32 %27, 0
  %or.cond5 = and i1 %37, %36
  br i1 %or.cond5, label %38, label %46

38:                                               ; preds = %35
  %39 = icmp ult i32 %27, %28
  br i1 %39, label %40, label %43

40:                                               ; preds = %38
  %41 = udiv i32 %28, %27
  %42 = sdiv i32 %30, %41
  br label %73

43:                                               ; preds = %38
  %44 = udiv i32 %27, %28
  %45 = mul nsw i32 %44, %30
  br label %73

46:                                               ; preds = %35
  %47 = and i32 %28, %27
  %or.cond7.not = icmp sgt i32 %47, -1
  br i1 %or.cond7.not, label %56, label %48

48:                                               ; preds = %46
  %49 = icmp slt i32 %27, %28
  br i1 %49, label %50, label %53

50:                                               ; preds = %48
  %51 = sdiv i32 %27, %28
  %52 = mul nsw i32 %51, %30
  br label %73

53:                                               ; preds = %48
  %54 = sdiv i32 %28, %27
  %55 = sdiv i32 %30, %54
  br label %73

56:                                               ; preds = %46
  %57 = icmp slt i32 %28, 0
  %58 = icmp slt i32 %28, %30
  br i1 %57, label %59, label %66

59:                                               ; preds = %56
  br i1 %58, label %60, label %63

60:                                               ; preds = %59
  %61 = sdiv i32 %28, %27
  %62 = sdiv i32 %30, %61
  br label %73

63:                                               ; preds = %59
  %64 = sdiv i32 %27, %28
  %65 = mul nsw i32 %64, %30
  br label %73

66:                                               ; preds = %56
  br i1 %58, label %67, label %70

67:                                               ; preds = %66
  %68 = sdiv i32 %27, %28
  %69 = mul nsw i32 %68, %30
  br label %73

70:                                               ; preds = %66
  %71 = sdiv i32 %27, %30
  %72 = sdiv i32 %30, %71
  br label %73

73:                                               ; preds = %43, %40, %63, %60, %70, %67, %50, %53, %33
  %.sink = phi i32 [ %34, %33 ], [ %42, %40 ], [ %45, %43 ], [ %52, %50 ], [ %55, %53 ], [ %62, %60 ], [ %65, %63 ], [ %69, %67 ], [ %72, %70 ]
  %.str.1.sink = phi ptr [ @.str.1, %33 ], [ @.str.2, %40 ], [ @.str.2, %43 ], [ @.str.2, %50 ], [ @.str.2, %53 ], [ @.str.2, %60 ], [ @.str.2, %63 ], [ @.str.2, %67 ], [ @.str.2, %70 ]
  %74 = sext i32 %.sink to i64
  %75 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull %.str.1.sink)
  %76 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8) %75, i64 noundef %74)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  br label %15

77:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %1) #6
  ret i32 0
}

declare noundef zeroext i1 @_ZNSt8ios_base15sync_with_stdioEb(i1 noundef zeroext) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare noundef ptr @_ZNSt9basic_iosIcSt11char_traitsIcEE3tieEPSo(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #2 align 2

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

declare noundef nonnull align 8 dereferenceable(16) ptr @_ZNSirsERi(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEx(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #5 align 2

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

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 = { 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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 #6 = { 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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !10, i64 0}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass