program Traveling
    implicit none
    integer(4):: n,i
    integer(4),allocatable:: t(:),x(:),y(:),d(:)

    read*, n
    allocate(t(n),x(n),y(n),d(n))

    do i=1,n
        read*, t(i),x(i),y(i)
    end do

    d(:) = x(:)+y(:)


    do i=1,n
        if (t(i) < d(i) .or. (mod(t(i),2) /= mod(d(i),2))) then
            print*, 'No'
            stop
        end if
    end do

    print*, 'Yes'


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

@_QFEd.0 = internal unnamed_addr global ptr null
@_QFEd.8 = internal unnamed_addr global i64 0
@_QFEt.0 = internal unnamed_addr global ptr null
@_QFEx.0 = internal unnamed_addr global ptr null
@_QFEy.0 = internal unnamed_addr global ptr null
@_QQcl.0f4f5c654e213d5de619b9e35ef96b97 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_6399/source.f\00"
@_QQcl.4E6F = linkonce constant [2 x i8] c"No"
@_QQcl.596573 = linkonce constant [3 x i8] c"Yes"
@_QQEnvironmentDefaults = local_unnamed_addr constant ptr null

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #0

define void @_QQmain() local_unnamed_addr {
  %1 = alloca i32, align 4
  %2 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0f4f5c654e213d5de619b9e35ef96b97, i32 6)
  %3 = call i1 @_FortranAioInputInteger(ptr %2, ptr nonnull %1, i32 4)
  %4 = call i32 @_FortranAioEndIoStatement(ptr %2)
  %5 = load i32, ptr %1, align 4, !tbaa !3
  %6 = call i32 @llvm.smax.i32(i32 %5, i32 0)
  %7 = zext i32 %6 to i64
  %8 = shl nuw nsw i64 %7, 2
  %9 = call ptr @malloc(i64 %8)
  store ptr %9, ptr @_QFEt.0, align 8, !tbaa !7
  %10 = call ptr @malloc(i64 %8)
  store ptr %10, ptr @_QFEx.0, align 8, !tbaa !7
  %11 = call ptr @malloc(i64 %8)
  store ptr %11, ptr @_QFEy.0, align 8, !tbaa !7
  %12 = call ptr @malloc(i64 %8)
  store ptr %12, ptr @_QFEd.0, align 8, !tbaa !7
  store i64 %7, ptr @_QFEd.8, align 8, !tbaa !7
  %13 = icmp sgt i32 %5, 0
  br i1 %13, label %.lr.ph.preheader, label %._crit_edge

.lr.ph.preheader:                                 ; preds = %0
  %14 = zext i32 %5 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.lr.ph
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %.lr.ph ]
  %15 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.0f4f5c654e213d5de619b9e35ef96b97, i32 10)
  %.unpack393 = load ptr, ptr @_QFEt.0, align 8, !tbaa !7
  %16 = add nsw i64 %indvars.iv, -1
  %17 = getelementptr i32, ptr %.unpack393, i64 %16
  %18 = call i1 @_FortranAioInputInteger(ptr %15, ptr %17, i32 4)
  %.unpack405 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %19 = add nsw i64 %indvars.iv, -1
  %20 = getelementptr i32, ptr %.unpack405, i64 %19
  %21 = call i1 @_FortranAioInputInteger(ptr %15, ptr %20, i32 4)
  %.unpack417 = load ptr, ptr @_QFEy.0, align 8, !tbaa !7
  %22 = add nsw i64 %indvars.iv, -1
  %23 = getelementptr i32, ptr %.unpack417, i64 %22
  %24 = call i1 @_FortranAioInputInteger(ptr %15, ptr %23, i32 4)
  %25 = call i32 @_FortranAioEndIoStatement(ptr %15)
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv, %14
  br i1 %exitcond.not, label %._crit_edge.loopexit, label %.lr.ph

._crit_edge.loopexit:                             ; preds = %.lr.ph
  %.unpack.pre = load ptr, ptr @_QFEd.0, align 8, !tbaa !7
  %.unpack340.unpack.unpack342.pre = load i64, ptr @_QFEd.8, align 8, !tbaa !7
  %.unpack345.pre = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack357.pre = load ptr, ptr @_QFEy.0, align 8, !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %0
  %.unpack357 = phi ptr [ %.unpack357.pre, %._crit_edge.loopexit ], [ %11, %0 ]
  %.unpack345 = phi ptr [ %.unpack345.pre, %._crit_edge.loopexit ], [ %10, %0 ]
  %.unpack340.unpack.unpack342 = phi i64 [ %.unpack340.unpack.unpack342.pre, %._crit_edge.loopexit ], [ %7, %0 ]
  %.unpack = phi ptr [ %.unpack.pre, %._crit_edge.loopexit ], [ %12, %0 ]
  %.unpack444 = ptrtoint ptr %.unpack to i64
  %.unpack345445 = ptrtoint ptr %.unpack345 to i64
  %.unpack357446 = ptrtoint ptr %.unpack357 to i64
  %26 = call i64 @llvm.smax.i64(i64 %.unpack340.unpack.unpack342, i64 0)
  %.not = icmp slt i64 %.unpack340.unpack.unpack342, 1
  br i1 %.not, label %._crit_edge431, label %.lr.ph430.preheader

.lr.ph430.preheader:                              ; preds = %._crit_edge
  %min.iters.check = icmp ult i64 %26, 12
  br i1 %min.iters.check, label %.lr.ph430.preheader451, label %vector.memcheck

vector.memcheck:                                  ; preds = %.lr.ph430.preheader
  %27 = sub i64 %.unpack444, %.unpack345445
  %diff.check = icmp ult i64 %27, 32
  %28 = sub i64 %.unpack444, %.unpack357446
  %diff.check447 = icmp ult i64 %28, 32
  %conflict.rdx = or i1 %diff.check, %diff.check447
  br i1 %conflict.rdx, label %.lr.ph430.preheader451, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %26, 9223372036854775800
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %29 = getelementptr i32, ptr %.unpack345, i64 %index
  %wide.load = load <4 x i32>, ptr %29, align 4, !tbaa !3
  %30 = getelementptr i32, ptr %29, i64 4
  %wide.load448 = load <4 x i32>, ptr %30, align 4, !tbaa !3
  %31 = getelementptr i32, ptr %.unpack357, i64 %index
  %wide.load449 = load <4 x i32>, ptr %31, align 4, !tbaa !3
  %32 = getelementptr i32, ptr %31, i64 4
  %wide.load450 = load <4 x i32>, ptr %32, align 4, !tbaa !3
  %33 = add <4 x i32> %wide.load449, %wide.load
  %34 = add <4 x i32> %wide.load450, %wide.load448
  %35 = getelementptr i32, ptr %.unpack, i64 %index
  store <4 x i32> %33, ptr %35, align 4, !tbaa !3
  %36 = getelementptr i32, ptr %35, i64 4
  store <4 x i32> %34, ptr %36, align 4, !tbaa !3
  %index.next = add nuw i64 %index, 8
  %37 = icmp eq i64 %index.next, %n.vec
  br i1 %37, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %26, %n.vec
  br i1 %cmp.n, label %._crit_edge431, label %.lr.ph430.preheader451

.lr.ph430.preheader451:                           ; preds = %vector.memcheck, %.lr.ph430.preheader, %middle.block
  %.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %.lr.ph430.preheader ], [ %n.vec, %middle.block ]
  %38 = xor i64 %.ph, -1
  %39 = add nsw i64 %26, %38
  %xtraiter = and i64 %26, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph430.prol.loopexit, label %.lr.ph430.prol

.lr.ph430.prol:                                   ; preds = %.lr.ph430.preheader451, %.lr.ph430.prol
  %40 = phi i64 [ %47, %.lr.ph430.prol ], [ %.ph, %.lr.ph430.preheader451 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph430.prol ], [ 0, %.lr.ph430.preheader451 ]
  %41 = getelementptr i32, ptr %.unpack345, i64 %40
  %42 = load i32, ptr %41, align 4, !tbaa !3
  %43 = getelementptr i32, ptr %.unpack357, i64 %40
  %44 = load i32, ptr %43, align 4, !tbaa !3
  %45 = add i32 %44, %42
  %46 = getelementptr i32, ptr %.unpack, i64 %40
  store i32 %45, ptr %46, align 4, !tbaa !3
  %47 = add nuw nsw i64 %40, 1
  %prol.iter.next = add i64 %prol.iter, 1
  %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter
  br i1 %prol.iter.cmp.not, label %.lr.ph430.prol.loopexit, label %.lr.ph430.prol, !llvm.loop !12

.lr.ph430.prol.loopexit:                          ; preds = %.lr.ph430.prol, %.lr.ph430.preheader451
  %.unr = phi i64 [ %.ph, %.lr.ph430.preheader451 ], [ %47, %.lr.ph430.prol ]
  %48 = icmp ult i64 %39, 3
  br i1 %48, label %._crit_edge431, label %.lr.ph430

.lr.ph430:                                        ; preds = %.lr.ph430.prol.loopexit, %.lr.ph430
  %49 = phi i64 [ %77, %.lr.ph430 ], [ %.unr, %.lr.ph430.prol.loopexit ]
  %50 = getelementptr i32, ptr %.unpack345, i64 %49
  %51 = load i32, ptr %50, align 4, !tbaa !3
  %52 = getelementptr i32, ptr %.unpack357, i64 %49
  %53 = load i32, ptr %52, align 4, !tbaa !3
  %54 = add i32 %53, %51
  %55 = getelementptr i32, ptr %.unpack, i64 %49
  store i32 %54, ptr %55, align 4, !tbaa !3
  %56 = add nuw nsw i64 %49, 1
  %57 = getelementptr i32, ptr %.unpack345, i64 %56
  %58 = load i32, ptr %57, align 4, !tbaa !3
  %59 = getelementptr i32, ptr %.unpack357, i64 %56
  %60 = load i32, ptr %59, align 4, !tbaa !3
  %61 = add i32 %60, %58
  %62 = getelementptr i32, ptr %.unpack, i64 %56
  store i32 %61, ptr %62, align 4, !tbaa !3
  %63 = add nuw nsw i64 %49, 2
  %64 = getelementptr i32, ptr %.unpack345, i64 %63
  %65 = load i32, ptr %64, align 4, !tbaa !3
  %66 = getelementptr i32, ptr %.unpack357, i64 %63
  %67 = load i32, ptr %66, align 4, !tbaa !3
  %68 = add i32 %67, %65
  %69 = getelementptr i32, ptr %.unpack, i64 %63
  store i32 %68, ptr %69, align 4, !tbaa !3
  %70 = add nuw nsw i64 %49, 3
  %71 = getelementptr i32, ptr %.unpack345, i64 %70
  %72 = load i32, ptr %71, align 4, !tbaa !3
  %73 = getelementptr i32, ptr %.unpack357, i64 %70
  %74 = load i32, ptr %73, align 4, !tbaa !3
  %75 = add i32 %74, %72
  %76 = getelementptr i32, ptr %.unpack, i64 %70
  store i32 %75, ptr %76, align 4, !tbaa !3
  %77 = add nuw nsw i64 %49, 4
  %exitcond438.not.3 = icmp eq i64 %77, %26
  br i1 %exitcond438.not.3, label %._crit_edge431, label %.lr.ph430, !llvm.loop !14

._crit_edge431:                                   ; preds = %.lr.ph430.prol.loopexit, %.lr.ph430, %middle.block, %._crit_edge
  %78 = load i32, ptr %1, align 4, !tbaa !3
  %79 = icmp sgt i32 %78, 0
  br i1 %79, label %.lr.ph435, label %._crit_edge436

.lr.ph435:                                        ; preds = %._crit_edge431
  %.unpack369 = load ptr, ptr @_QFEt.0, align 8, !tbaa !7
  br label %80

80:                                               ; preds = %.lr.ph435, %98
  %.0433 = phi i32 [ 1, %.lr.ph435 ], [ %99, %98 ]
  %81 = sext i32 %.0433 to i64
  %82 = add nsw i64 %81, -1
  %83 = getelementptr i32, ptr %.unpack369, i64 %82
  %84 = load i32, ptr %83, align 4, !tbaa !3
  %85 = add nsw i64 %81, -1
  %86 = getelementptr i32, ptr %.unpack, i64 %85
  %87 = load i32, ptr %86, align 4, !tbaa !3
  %88 = icmp slt i32 %84, %87
  %89 = srem i32 %84, 2
  %90 = srem i32 %87, 2
  %91 = icmp ne i32 %89, %90
  %92 = or i1 %88, %91
  br i1 %92, label %93, label %98

93:                                               ; preds = %80
  %94 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0f4f5c654e213d5de619b9e35ef96b97, i32 18)
  %95 = call i1 @_FortranAioOutputAscii(ptr %94, ptr nonnull @_QQcl.4E6F, i64 2)
  %96 = call i32 @_FortranAioEndIoStatement(ptr %94)
  %97 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable

98:                                               ; preds = %80
  %99 = add nuw i32 %.0433, 1
  %exitcond439.not = icmp eq i32 %.0433, %78
  br i1 %exitcond439.not, label %._crit_edge436, label %80

._crit_edge436:                                   ; preds = %98, %._crit_edge431
  %100 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.0f4f5c654e213d5de619b9e35ef96b97, i32 23)
  %101 = call i1 @_FortranAioOutputAscii(ptr %100, ptr nonnull @_QQcl.596573, i64 3)
  %102 = call i32 @_FortranAioEndIoStatement(ptr %100)
  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

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

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

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

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { 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"}
!7 = !{!8, !8, i64 0}
!8 = !{!"descriptor member", !5, i64 0}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.isvectorized", i32 1}
!11 = !{!"llvm.loop.unroll.runtime.disable"}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10}
