   program abc148c
      implicit none
      integer(8)::a,b

         read *, a,b
         print *, lcm(a,b)
         stop

   contains

      function gcd(a,b)
         implicit none
         integer(8),intent(in)::a,b
         integer(8)::gcd
         integer(8)::l,m,n

            l=a
            m=b
            n=mod(l,m)
            do while (n/=0)
               l=m
               m=n
               n=mod(l,m)
            end do
            gcd=m
            return
      end function gcd

      function lcm(a,b)
         implicit none
         integer(8),intent(in)::a,b
         integer(8)::lcm

            lcm=a*b/gcd(a,b)          ! gcd(a,b)*(a/gcd(a,b))*(b/gcd(a,b))
            return
      end function lcm

   end program abc148c
; ModuleID = 'FIRModule'
source_filename = "FIRModule"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"

@_QQcl.bcabcd51c640d9c5a1602bded3895fef = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2816/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i64, align 8
  %2 = alloca i64, align 8
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.bcabcd51c640d9c5a1602bded3895fef, i32 5)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 8)
  %5 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 8)
  %6 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %7 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.bcabcd51c640d9c5a1602bded3895fef, i32 6)
  %8 = call i64 @_QFPlcm(ptr nonnull %1, ptr nonnull %2)
  %9 = call i1 @_FortranAioOutputInteger64(ptr %7, i64 %8)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %7)
  %11 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read)
define i64 @_QFPgcd(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #1 {
  %3 = load i64, ptr %0, align 8, !tbaa !3
  %4 = load i64, ptr %1, align 8, !tbaa !3
  %5 = srem i64 %3, %4
  %.not10 = icmp eq i64 %5, 0
  br i1 %.not10, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %2, %.lr.ph
  %.012 = phi i64 [ %6, %.lr.ph ], [ %5, %2 ]
  %.0911 = phi i64 [ %.012, %.lr.ph ], [ %4, %2 ]
  %6 = srem i64 %.0911, %.012
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %2
  %.09.lcssa = phi i64 [ %4, %2 ], [ %.012, %.lr.ph ]
  ret i64 %.09.lcssa
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read)
define i64 @_QFPlcm(ptr nocapture readonly %0, ptr nocapture readonly %1) local_unnamed_addr #1 {
  %3 = load i64, ptr %0, align 8, !tbaa !3
  %4 = load i64, ptr %1, align 8, !tbaa !3
  %5 = srem i64 %3, %4
  %.not10.i = icmp eq i64 %5, 0
  br i1 %.not10.i, label %_QFPgcd.exit, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %2, %.lr.ph.i
  %.012.i = phi i64 [ %6, %.lr.ph.i ], [ %5, %2 ]
  %.0911.i = phi i64 [ %.012.i, %.lr.ph.i ], [ %4, %2 ]
  %6 = srem i64 %.0911.i, %.012.i
  %.not.i = icmp eq i64 %6, 0
  br i1 %.not.i, label %_QFPgcd.exit, label %.lr.ph.i

_QFPgcd.exit:                                     ; preds = %.lr.ph.i, %2
  %.09.lcssa.i = phi i64 [ %4, %2 ], [ %.012.i, %.lr.ph.i ]
  %7 = mul i64 %4, %3
  %8 = sdiv i64 %7, %.09.lcssa.i
  ret i64 %8
}

declare ptr @_FortranAioBeginExternalListInput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioInputInteger(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAioEndIoStatement(ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalListOutput(i32, ptr, i32) local_unnamed_addr

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

declare {} @_FortranAStopStatement(i32, i1, i1) local_unnamed_addr

attributes #0 = { noreturn }
attributes #1 = { nofree norecurse nosync nounwind memory(argmem: read) }

!llvm.module.flags = !{!0, !1, !2}

!0 = !{i32 2, !"Debug Info Version", i32 3}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{!4, !4, i64 0}
!4 = !{!"any data access", !5, i64 0}
!5 = !{!"any access", !6, i64 0}
!6 = !{!"Flang Type TBAA Root"}
