program main
      implicit none
      integer :: a, b
      read *, a
      read *, b

      if (( a == 1 ) .or. ( b == 1 )) then
        if (( a == 2 ) .or. ( b == 2 )) then
          print *, '3'
        else if (( a == 3 ) .or. ( b == 3 )) then
          print *, '2'
        end if
      end if
      if (( a == 2 ) .or. ( b == 2 )) then
        if (( a == 3 ) .or. ( b == 3 )) then
          print *, '1'
        end if
      end if

end program main

; 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.39fb9c62bea324bd44c5d2c96ccf6e11 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2789/source.f\00"
@_QQcl.33 = linkonce constant [1 x i8] c"3"
@_QQcl.32 = linkonce constant [1 x i8] c"2"
@_QQcl.31 = linkonce constant [1 x i8] c"1"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.39fb9c62bea324bd44c5d2c96ccf6e11, i32 4)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %1, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.39fb9c62bea324bd44c5d2c96ccf6e11, i32 5)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %2, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = load i32, ptr %1, align 4, !tbaa !3
  %10 = icmp eq i32 %9, 1
  %11 = load i32, ptr %2, align 4, !tbaa !3
  %12 = icmp eq i32 %11, 1
  %13 = or i1 %10, %12
  br i1 %13, label %14, label %29

14:                                               ; preds = %0
  %15 = icmp eq i32 %9, 2
  %16 = icmp eq i32 %11, 2
  %17 = or i1 %15, %16
  br i1 %17, label %18, label %21

18:                                               ; preds = %14
  %19 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.39fb9c62bea324bd44c5d2c96ccf6e11, i32 9)
  %20 = call i1 @_FortranAioOutputAscii(ptr %19, ptr nonnull @_QQcl.33, i64 1)
  br label %.sink.split

21:                                               ; preds = %14
  %22 = icmp eq i32 %9, 3
  %23 = icmp eq i32 %11, 3
  %24 = or i1 %22, %23
  br i1 %24, label %25, label %29

25:                                               ; preds = %21
  %26 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.39fb9c62bea324bd44c5d2c96ccf6e11, i32 11)
  %27 = call i1 @_FortranAioOutputAscii(ptr %26, ptr nonnull @_QQcl.32, i64 1)
  br label %.sink.split

.sink.split:                                      ; preds = %25, %18
  %.sink = phi ptr [ %19, %18 ], [ %26, %25 ]
  %28 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  br label %29

29:                                               ; preds = %.sink.split, %21, %0
  %30 = load i32, ptr %1, align 4, !tbaa !3
  %31 = icmp eq i32 %30, 2
  %32 = load i32, ptr %2, align 4, !tbaa !3
  %33 = icmp eq i32 %32, 2
  %34 = or i1 %31, %33
  br i1 %34, label %35, label %43

35:                                               ; preds = %29
  %36 = icmp eq i32 %30, 3
  %37 = icmp eq i32 %32, 3
  %38 = or i1 %36, %37
  br i1 %38, label %39, label %43

39:                                               ; preds = %35
  %40 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.39fb9c62bea324bd44c5d2c96ccf6e11, i32 16)
  %41 = call i1 @_FortranAioOutputAscii(ptr %40, ptr nonnull @_QQcl.31, i64 1)
  %42 = call i32 @_FortranAioEndIoStatement(ptr %40)
  br label %43

43:                                               ; preds = %39, %35, %29
  ret void
}

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

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