program sample
	integer ::a,b,c,d
    
    read(*,*) a,b,c,d
    
    if (a+b==c+d) then
    	write(*,*) 'Balanced'
    else if (a+b<c+d) then
    	write(*,*) 'Right'
    else
    	write(*,*) 'Left'
    end if
    stop
end program sample
; 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.05cfadfe14b4ace08d24eee7d38c968f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6518/source.f\00"
@_QQcl.42616C616E636564 = linkonce constant [8 x i8] c"Balanced"
@_QQcl.5269676874 = linkonce constant [5 x i8] c"Right"
@_QQcl.4C656674 = linkonce constant [4 x i8] c"Left"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.05cfadfe14b4ace08d24eee7d38c968f, i32 4)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %1, i32 4)
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %2, i32 4)
  %8 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %3, i32 4)
  %9 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 4)
  %10 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %11 = load i32, ptr %1, align 4, !tbaa !3
  %12 = load i32, ptr %2, align 4, !tbaa !3
  %13 = add i32 %12, %11
  %14 = load i32, ptr %3, align 4, !tbaa !3
  %15 = load i32, ptr %4, align 4, !tbaa !3
  %16 = add i32 %15, %14
  %17 = icmp eq i32 %13, %16
  %18 = icmp slt i32 %13, %16
  %. = select i1 %18, i32 9, i32 11
  %.4 = select i1 %18, i64 5, i64 4
  %_QQcl.5269676874._QQcl.4C656674 = select i1 %18, ptr @_QQcl.5269676874, ptr @_QQcl.4C656674
  %.sink = select i1 %17, i32 7, i32 %.
  %.sink3 = select i1 %17, i64 8, i64 %.4
  %_QQcl.42616C616E636564.sink = select i1 %17, ptr @_QQcl.42616C616E636564, ptr %_QQcl.5269676874._QQcl.4C656674
  %19 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.05cfadfe14b4ace08d24eee7d38c968f, i32 %.sink)
  %20 = call i1 @_FortranAioOutputAscii(ptr %19, ptr nonnull %_QQcl.42616C616E636564.sink, i64 %.sink3)
  %21 = call i32 @_FortranAioEndIoStatement(ptr %19)
  %22 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

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

attributes #0 = { noreturn }

!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"}
