program sample
	implicit none
    integer(8)::i,j
    real(8)::a,b,c,d,e,k,sub
    real(8) :: sort(5)
    
    read(*,*) a
    read(*,*) b  
    read(*,*) c    
    read(*,*) d    
    read(*,*) e    
    read(*,*) k 
    
    sort(1) =a
    sort(2) =b
    sort(3)=c
    sort(4)=d
    sort(5)=e
    
    do i=1,5
    	do j=i,5
        	if(sort(i)>sort(j)) then
            	sub=sort(i)
                sort(i)=sort(j)
                sort(j)=sub
            end if
        end do
    end do
    
    if(abs(sort(5)-sort(1))<=k) then
    	write(*,*) 'Yay!'
	else
    	write(*,*) ':('
    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.ec79e566342685ea986da7ade9413b5f = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4540/source.f\00"
@_QQcl.59617921 = linkonce constant [4 x i8] c"Yay!"
@_QQcl.3A28 = linkonce constant [2 x i8] c":("
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #0 {
.lr.ph.1:
  %0 = alloca double, align 8
  %1 = alloca double, align 8
  %2 = alloca double, align 8
  %3 = alloca double, align 8
  %4 = alloca double, align 8
  %5 = alloca double, align 8
  %6 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 7)
  %7 = call i1 @_FortranAioInputReal64(ptr %6, ptr nonnull %0)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %9 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 8)
  %10 = call i1 @_FortranAioInputReal64(ptr %9, ptr nonnull %1)
  %11 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %12 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 9)
  %13 = call i1 @_FortranAioInputReal64(ptr %12, ptr nonnull %2)
  %14 = call i32 @_FortranAioEndIoStatement(ptr %12)
  %15 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 10)
  %16 = call i1 @_FortranAioInputReal64(ptr %15, ptr nonnull %3)
  %17 = call i32 @_FortranAioEndIoStatement(ptr %15)
  %18 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 11)
  %19 = call i1 @_FortranAioInputReal64(ptr %18, ptr nonnull %4)
  %20 = call i32 @_FortranAioEndIoStatement(ptr %18)
  %21 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 12)
  %22 = call i1 @_FortranAioInputReal64(ptr %21, ptr nonnull %5)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = load double, ptr %0, align 8, !tbaa !3
  %25 = load double, ptr %1, align 8, !tbaa !3
  %26 = load double, ptr %2, align 8, !tbaa !3
  %27 = load double, ptr %3, align 8, !tbaa !3
  %28 = load double, ptr %4, align 8, !tbaa !3
  %29 = fcmp ogt double %24, %25
  %30 = select i1 %29, double %24, double %25
  %31 = select i1 %29, double %25, double %24
  %32 = fcmp ogt double %31, %26
  %33 = select i1 %32, double %31, double %26
  %34 = select i1 %32, double %26, double %31
  %35 = fcmp ogt double %34, %27
  %36 = select i1 %35, double %34, double %27
  %37 = select i1 %35, double %27, double %34
  %38 = fcmp ogt double %37, %28
  %39 = select i1 %38, double %28, double %37
  %40 = select i1 %38, double %37, double %28
  %41 = fcmp ogt double %30, %33
  %42 = select i1 %41, double %30, double %33
  %43 = select i1 %41, double %33, double %30
  %44 = fcmp ogt double %43, %36
  %45 = select i1 %44, double %43, double %36
  %46 = select i1 %44, double %36, double %43
  %47 = fcmp ogt double %46, %40
  %48 = select i1 %47, double %46, double %40
  %49 = fcmp ogt double %42, %45
  %50 = select i1 %49, double %42, double %45
  %51 = select i1 %49, double %45, double %42
  %52 = fcmp ogt double %51, %48
  %53 = select i1 %52, double %51, double %48
  %54 = fcmp ogt double %50, %53
  %55 = select i1 %54, double %50, double %53
  %56 = fsub contract double %55, %39
  %57 = call contract double @llvm.fabs.f64(double %56)
  %58 = load double, ptr %5, align 8, !tbaa !3
  %59 = fcmp ugt double %57, %58
  %. = select i1 %59, i32 33, i32 31
  %.14 = select i1 %59, i64 2, i64 4
  %_QQcl.3A28._QQcl.59617921 = select i1 %59, ptr @_QQcl.3A28, ptr @_QQcl.59617921
  %60 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.ec79e566342685ea986da7ade9413b5f, i32 %.)
  %61 = call i1 @_FortranAioOutputAscii(ptr %60, ptr nonnull %_QQcl.3A28._QQcl.59617921, i64 %.14)
  %62 = call i32 @_FortranAioEndIoStatement(ptr %60)
  %63 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

declare i1 @_FortranAioInputReal64(ptr, ptr) 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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fabs.f64(double) #1

attributes #0 = { noreturn }
attributes #1 = { mustprogress 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"}
