program aaa
implicit none

integer :: k, i, j
integer, dimension(5) :: a

do i=1, 5
read*, a(i)
end do
read*, k

do i=1, 5
 do j=i+1, 5
 if(abs(a(i)-a(j))>k) then
 write(*,'(a2)') ':('
 return
 end if
 end do
end do

write(*,'(a4)') 'Yay!'

end program
; 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.9fd07ef045b8a1e06b20101363f7a07b = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4528/source.f\00"
@_QQcl.28613229 = linkonce constant [4 x i8] c"(a2)"
@_QQcl.3A28 = linkonce constant [2 x i8] c":("
@_QQcl.28613429 = linkonce constant [4 x i8] c"(a4)"
@_QQcl.59617921 = linkonce constant [4 x i8] c"Yay!"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

define void @_QQmain() local_unnamed_addr {
.lr.ph:
  %0 = alloca [5 x i32], align 4
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 8)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %0, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 8)
  %6 = getelementptr inbounds [5 x i32], ptr %0, i64 0, i64 1
  %7 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %6, i32 4)
  %8 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %9 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 8)
  %10 = getelementptr inbounds [5 x i32], ptr %0, i64 0, i64 2
  %11 = call i1 @_FortranAioInputInteger(ptr %9, ptr nonnull %10, i32 4)
  %12 = call i32 @_FortranAioEndIoStatement(ptr %9)
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 8)
  %14 = getelementptr inbounds [5 x i32], ptr %0, i64 0, i64 3
  %15 = call i1 @_FortranAioInputInteger(ptr %13, ptr nonnull %14, i32 4)
  %16 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %17 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 8)
  %18 = getelementptr inbounds [5 x i32], ptr %0, i64 0, i64 4
  %19 = call i1 @_FortranAioInputInteger(ptr %17, ptr nonnull %18, i32 4)
  %20 = call i32 @_FortranAioEndIoStatement(ptr %17)
  %21 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 10)
  %22 = call i1 @_FortranAioInputInteger(ptr %21, ptr nonnull %1, i32 4)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = load i32, ptr %1, align 4
  %25 = load i32, ptr %0, align 4, !tbaa !3
  %26 = load i32, ptr %6, align 4, !tbaa !3
  %27 = sub i32 %25, %26
  %28 = call i32 @llvm.abs.i32(i32 %27, i1 false)
  %29 = icmp sgt i32 %28, %24
  br i1 %29, label %.loopexit, label %33

common.ret:                                       ; preds = %._crit_edge.4, %.loopexit
  %.sink = phi ptr [ %78, %._crit_edge.4 ], [ %31, %.loopexit ]
  %30 = call i32 @_FortranAioEndIoStatement(ptr %.sink)
  ret void

.loopexit:                                        ; preds = %.lr.ph.3, %.lr.ph.2, %68, %.lr.ph.1, %53, %58, %.lr.ph, %33, %38, %43
  %31 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28613229, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 15)
  %32 = call i1 @_FortranAioOutputAscii(ptr %31, ptr nonnull @_QQcl.3A28, i64 2)
  br label %common.ret

33:                                               ; preds = %.lr.ph
  %34 = load i32, ptr %10, align 4, !tbaa !3
  %35 = sub i32 %25, %34
  %36 = call i32 @llvm.abs.i32(i32 %35, i1 false)
  %37 = icmp sgt i32 %36, %24
  br i1 %37, label %.loopexit, label %38

38:                                               ; preds = %33
  %39 = load i32, ptr %14, align 4, !tbaa !3
  %40 = sub i32 %25, %39
  %41 = call i32 @llvm.abs.i32(i32 %40, i1 false)
  %42 = icmp sgt i32 %41, %24
  br i1 %42, label %.loopexit, label %43

43:                                               ; preds = %38
  %44 = load i32, ptr %18, align 4, !tbaa !3
  %45 = sub i32 %25, %44
  %46 = call i32 @llvm.abs.i32(i32 %45, i1 false)
  %47 = icmp sgt i32 %46, %24
  br i1 %47, label %.loopexit, label %.lr.ph.1

.lr.ph.1:                                         ; preds = %43
  %48 = load i32, ptr %6, align 4, !tbaa !3
  %49 = load i32, ptr %10, align 4, !tbaa !3
  %50 = sub i32 %48, %49
  %51 = call i32 @llvm.abs.i32(i32 %50, i1 false)
  %52 = icmp sgt i32 %51, %24
  br i1 %52, label %.loopexit, label %53

53:                                               ; preds = %.lr.ph.1
  %54 = load i32, ptr %14, align 4, !tbaa !3
  %55 = sub i32 %48, %54
  %56 = call i32 @llvm.abs.i32(i32 %55, i1 false)
  %57 = icmp sgt i32 %56, %24
  br i1 %57, label %.loopexit, label %58

58:                                               ; preds = %53
  %59 = load i32, ptr %18, align 4, !tbaa !3
  %60 = sub i32 %48, %59
  %61 = call i32 @llvm.abs.i32(i32 %60, i1 false)
  %62 = icmp sgt i32 %61, %24
  br i1 %62, label %.loopexit, label %.lr.ph.2

.lr.ph.2:                                         ; preds = %58
  %63 = load i32, ptr %10, align 4, !tbaa !3
  %64 = load i32, ptr %14, align 4, !tbaa !3
  %65 = sub i32 %63, %64
  %66 = call i32 @llvm.abs.i32(i32 %65, i1 false)
  %67 = icmp sgt i32 %66, %24
  br i1 %67, label %.loopexit, label %68

68:                                               ; preds = %.lr.ph.2
  %69 = load i32, ptr %18, align 4, !tbaa !3
  %70 = sub i32 %63, %69
  %71 = call i32 @llvm.abs.i32(i32 %70, i1 false)
  %72 = icmp sgt i32 %71, %24
  br i1 %72, label %.loopexit, label %.lr.ph.3

.lr.ph.3:                                         ; preds = %68
  %73 = load i32, ptr %14, align 4, !tbaa !3
  %74 = load i32, ptr %18, align 4, !tbaa !3
  %75 = sub i32 %73, %74
  %76 = call i32 @llvm.abs.i32(i32 %75, i1 false)
  %77 = icmp sgt i32 %76, %24
  br i1 %77, label %.loopexit, label %._crit_edge.4

._crit_edge.4:                                    ; preds = %.lr.ph.3
  %78 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28613429, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.9fd07ef045b8a1e06b20101363f7a07b, i32 21)
  %79 = call i1 @_FortranAioOutputAscii(ptr %78, ptr nonnull @_QQcl.59617921, i64 4)
  br label %common.ret
}

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

declare i1 @_FortranAioOutputAscii(ptr, ptr, i64) local_unnamed_addr

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.abs.i32(i32, i1 immarg) #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"}
