program button
    implicit none
    integer :: a=0,b=0,coins=0,i=0
    read(*,*)a,b

    if(a<3 .or. 20<b)then
    else
        do i=1,2
            if(b<a)then
                coins = coins + a
                a = a-1
            else
                coins = coins + b
                b = b-1
            endif
        enddo
    endif
    write(*,*)coins

end program button
; 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"

@_QFEa = internal global i32 0
@_QFEb = internal global i32 0
@_QFEcoins = internal unnamed_addr global i32 0
@_QQcl.87ae3c274e080e0ab0dec2cb6ba7b823 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4462/source.f\00"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
  %1 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.87ae3c274e080e0ab0dec2cb6ba7b823, i32 4)
  %2 = tail call i1 @_FortranAioInputInteger(ptr %1, ptr nonnull @_QFEa, i32 4)
  %3 = tail call i1 @_FortranAioInputInteger(ptr %1, ptr nonnull @_QFEb, i32 4)
  %4 = tail call i32 @_FortranAioEndIoStatement(ptr %1)
  %5 = load i32, ptr @_QFEa, align 4, !tbaa !3
  %6 = icmp slt i32 %5, 3
  %7 = load i32, ptr @_QFEb, align 4, !tbaa !3
  %8 = icmp sgt i32 %7, 20
  %9 = or i1 %6, %8
  br i1 %9, label %20, label %.preheader

.preheader:                                       ; preds = %0
  %_QFEcoins.promoted = load i32, ptr @_QFEcoins, align 4, !tbaa !3
  %10 = icmp slt i32 %7, %5
  br i1 %10, label %11, label %13

11:                                               ; preds = %.preheader
  %12 = add nsw i32 %5, -1
  store i32 %12, ptr @_QFEa, align 4, !tbaa !3
  br label %15

13:                                               ; preds = %.preheader
  %14 = add i32 %7, -1
  store i32 %14, ptr @_QFEb, align 4, !tbaa !3
  br label %15

15:                                               ; preds = %11, %13
  %.pn = phi i32 [ %5, %11 ], [ %7, %13 ]
  %16 = phi i32 [ %12, %11 ], [ %5, %13 ]
  %17 = phi i32 [ %7, %11 ], [ %14, %13 ]
  %.sink = add i32 %_QFEcoins.promoted, %.pn
  %18 = icmp slt i32 %17, %16
  %. = tail call i32 @llvm.smax.i32(i32 %17, i32 %16)
  %_QFEa._QFEb = select i1 %18, ptr @_QFEa, ptr @_QFEb
  %19 = add i32 %., -1
  store i32 %19, ptr %_QFEa._QFEb, align 4, !tbaa !3
  %.sink4 = add i32 %.sink, %.
  store i32 %.sink4, ptr @_QFEcoins, align 4
  br label %20

20:                                               ; preds = %15, %0
  %21 = tail call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.87ae3c274e080e0ab0dec2cb6ba7b823, i32 18)
  %22 = load i32, ptr @_QFEcoins, align 4, !tbaa !3
  %23 = tail call i1 @_FortranAioOutputInteger32(ptr %21, i32 %22)
  %24 = tail call i32 @_FortranAioEndIoStatement(ptr %21)
  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 @_FortranAioOutputInteger32(ptr, i32) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #0

attributes #0 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

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