program sample
	implicit none
    integer(8) :: X,N,i,j,count
    integer(8),allocatable :: a(:),b(:)
    
    read(*,*) X,N
    
    allocate(a(N))
    
    allocate(b(N))
    
    count = X
    
    if (N==0) then
    	write(*,*) X
    else
    	read(*,*) a
    	do i=0,N
        	do j=1,N
            !write(*,*) i
            !write(*,*) count+i*(-1)**i
            	if (a(j) == count+i*(-1)**i) then
                	b(j) = 0
            	else
                	b(j) = count+i*(-1)**i
                end if
                
            end do
            count = count+i*(-1)**i
            if (minval(b) == maxval(b)) then
            	exit
            end if
        end do
        write(*,*) minval(b)
    end if
    
    
    deallocate(a)
    deallocate(b)
    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"

@_QFEa.0 = internal unnamed_addr global ptr null
@_QFEa.8 = internal unnamed_addr global i64 0
@_QFEb.0 = internal unnamed_addr global ptr null
@_QFEb.8 = internal unnamed_addr global i64 0
@_QQcl.7c8c26040f1aef69607bcc4ec0f8666c = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_1203/source.f\00"
@_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

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: noreturn
define void @_QQmain() local_unnamed_addr #2 {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %3 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 6)
  %7 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %5, i32 8)
  %8 = call i1 @_FortranAioInputInteger(ptr %6, ptr nonnull %4, i32 8)
  %9 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %10 = load i64, ptr %4, align 8, !tbaa !3
  %11 = call i64 @llvm.smax.i64(i64 %10, i64 0)
  %12 = shl i64 %11, 3
  %13 = call ptr @malloc(i64 %12)
  store ptr %13, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %11, ptr @_QFEa.8, align 8, !tbaa !7
  %14 = call ptr @malloc(i64 %12)
  store ptr %14, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 %11, ptr @_QFEb.8, align 8, !tbaa !7
  %15 = icmp eq i64 %10, 0
  br i1 %15, label %16, label %19

16:                                               ; preds = %0
  %17 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 15)
  %18 = load i64, ptr %5, align 8, !tbaa !3
  br label %104

19:                                               ; preds = %0
  %20 = load i64, ptr %5, align 8, !tbaa !3
  %21 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 17)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack491.unpack.unpack493 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  store ptr %.unpack, ptr %3, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep, align 8, !tbaa !7
  %.fca.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep, align 8, !tbaa !7
  %.fca.3.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep, align 4, !tbaa !7
  %.fca.4.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep, align 1, !tbaa !7
  %.fca.5.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep, align 2, !tbaa !7
  %.fca.6.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep, align 1, !tbaa !7
  %.fca.7.0.0.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep, align 8, !tbaa !7
  %.fca.7.0.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack491.unpack.unpack493, ptr %.fca.7.0.1.gep, align 8, !tbaa !7
  %.fca.7.0.2.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %3, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %22 = call i1 @_FortranAioInputDescriptor(ptr %21, ptr nonnull %3)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %21)
  %24 = load i64, ptr %4, align 8, !tbaa !3
  %25 = icmp ult i64 %24, 9223372036854775807
  br i1 %25, label %.lr.ph618, label %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge

.lr.ph618:                                        ; preds = %19
  %26 = add nuw nsw i64 %24, 1
  %.fca.1.gep307 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  %.fca.2.gep309 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 2
  %.fca.3.gep311 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 3
  %.fca.4.gep313 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 4
  %.fca.5.gep315 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 5
  %.fca.6.gep317 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 6
  %.fca.7.0.0.gep319 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 0
  %.fca.7.0.1.gep321 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 1
  %.fca.7.0.2.gep323 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 7, i64 0, i64 2
  br label %27

27:                                               ; preds = %.lr.ph618, %96
  %.0616 = phi i64 [ 0, %.lr.ph618 ], [ %100, %96 ]
  %.0464615 = phi i64 [ %20, %.lr.ph618 ], [ %98, %96 ]
  %.0465614 = phi i64 [ %26, %.lr.ph618 ], [ %99, %96 ]
  %28 = load i64, ptr %4, align 8, !tbaa !3
  %29 = icmp sgt i64 %28, 0
  br i1 %29, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %27
  %.unpack556 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %30 = icmp eq i64 %.0616, 0
  %31 = and i64 %.0616, 1
  %.not3.i = icmp eq i64 %31, 0
  %32 = select i1 %.not3.i, i64 1, i64 -1
  %33 = add nuw nsw i64 %.0616, %.0464615
  %.unpack568 = load ptr, ptr @_QFEb.0, align 8
  %brmerge = icmp eq i64 %.0616, 1
  %34 = mul nuw nsw i64 %32, %.0616
  %35 = add i64 %34, %.0464615
  br label %36

36:                                               ; preds = %.lr.ph, %64
  %37 = phi i64 [ 1, %.lr.ph ], [ %67, %64 ]
  %38 = add i64 %37, -1
  %39 = getelementptr i64, ptr %.unpack556, i64 %38
  %40 = load i64, ptr %39, align 8, !tbaa !3
  br i1 %30, label %__mlir_math_ipowi_i64.exit.thread, label %41

41:                                               ; preds = %36
  br i1 %brmerge, label %__mlir_math_ipowi_i64.exit.thread622, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %41, %.lr.ph.i
  %spec.select4.i = phi i64 [ %spec.select.i, %.lr.ph.i ], [ %32, %41 ]
  %42 = phi i64 [ %44, %.lr.ph.i ], [ %.0616, %41 ]
  %43 = phi i64 [ %45, %.lr.ph.i ], [ -1, %41 ]
  %44 = lshr i64 %42, 1
  %45 = mul i64 %43, %43
  %46 = and i64 %42, 2
  %.not.i = icmp eq i64 %46, 0
  %47 = select i1 %.not.i, i64 1, i64 %45
  %spec.select.i = mul i64 %47, %spec.select4.i
  %48 = icmp ult i64 %42, 4
  br i1 %48, label %__mlir_math_ipowi_i64.exit, label %.lr.ph.i

__mlir_math_ipowi_i64.exit:                       ; preds = %.lr.ph.i
  %49 = mul i64 %spec.select.i, %.0616
  %50 = add i64 %49, %.0464615
  %51 = icmp eq i64 %40, %50
  br i1 %51, label %64, label %54

__mlir_math_ipowi_i64.exit.thread622:             ; preds = %41
  %52 = icmp eq i64 %40, %35
  br i1 %52, label %64, label %__mlir_math_ipowi_i64.exit601

__mlir_math_ipowi_i64.exit.thread:                ; preds = %36
  %53 = icmp eq i64 %40, %33
  br i1 %53, label %64, label %__mlir_math_ipowi_i64.exit601

54:                                               ; preds = %__mlir_math_ipowi_i64.exit
  br i1 %brmerge, label %__mlir_math_ipowi_i64.exit601, label %.lr.ph.i600

.lr.ph.i600:                                      ; preds = %54, %.lr.ph.i600
  %spec.select4.i597 = phi i64 [ %spec.select.i599, %.lr.ph.i600 ], [ %32, %54 ]
  %55 = phi i64 [ %57, %.lr.ph.i600 ], [ %.0616, %54 ]
  %56 = phi i64 [ %58, %.lr.ph.i600 ], [ -1, %54 ]
  %57 = lshr i64 %55, 1
  %58 = mul i64 %56, %56
  %59 = and i64 %55, 2
  %.not.i598 = icmp eq i64 %59, 0
  %60 = select i1 %.not.i598, i64 1, i64 %58
  %spec.select.i599 = mul i64 %60, %spec.select4.i597
  %61 = icmp ult i64 %55, 4
  br i1 %61, label %__mlir_math_ipowi_i64.exit601, label %.lr.ph.i600

__mlir_math_ipowi_i64.exit601:                    ; preds = %.lr.ph.i600, %__mlir_math_ipowi_i64.exit.thread622, %54, %__mlir_math_ipowi_i64.exit.thread
  %common.ret.op.i592 = phi i64 [ 1, %__mlir_math_ipowi_i64.exit.thread ], [ %32, %54 ], [ %32, %__mlir_math_ipowi_i64.exit.thread622 ], [ %spec.select.i599, %.lr.ph.i600 ]
  %62 = mul i64 %common.ret.op.i592, %.0616
  %63 = add i64 %62, %.0464615
  br label %64

64:                                               ; preds = %__mlir_math_ipowi_i64.exit, %__mlir_math_ipowi_i64.exit.thread, %__mlir_math_ipowi_i64.exit.thread622, %__mlir_math_ipowi_i64.exit601
  %.sink = phi i64 [ %63, %__mlir_math_ipowi_i64.exit601 ], [ 0, %__mlir_math_ipowi_i64.exit.thread622 ], [ 0, %__mlir_math_ipowi_i64.exit.thread ], [ 0, %__mlir_math_ipowi_i64.exit ]
  %65 = add i64 %37, -1
  %66 = getelementptr i64, ptr %.unpack568, i64 %65
  store i64 %.sink, ptr %66, align 8, !tbaa !3
  %67 = add nuw i64 %37, 1
  %exitcond.not = icmp eq i64 %37, %28
  br i1 %exitcond.not, label %._crit_edge, label %36

._crit_edge:                                      ; preds = %64, %27
  %68 = icmp eq i64 %.0616, 0
  br i1 %68, label %__mlir_math_ipowi_i64.exit611, label %.preheader.i604

.preheader.i604:                                  ; preds = %._crit_edge
  %69 = and i64 %.0616, 1
  %.not3.i603 = icmp eq i64 %69, 0
  %70 = select i1 %.not3.i603, i64 1, i64 -1
  %71 = icmp eq i64 %.0616, 1
  br i1 %71, label %__mlir_math_ipowi_i64.exit611, label %.lr.ph.i610

.lr.ph.i610:                                      ; preds = %.preheader.i604, %.lr.ph.i610
  %spec.select4.i607 = phi i64 [ %spec.select.i609, %.lr.ph.i610 ], [ %70, %.preheader.i604 ]
  %72 = phi i64 [ %74, %.lr.ph.i610 ], [ %.0616, %.preheader.i604 ]
  %73 = phi i64 [ %75, %.lr.ph.i610 ], [ -1, %.preheader.i604 ]
  %74 = lshr i64 %72, 1
  %75 = mul i64 %73, %73
  %76 = and i64 %72, 2
  %.not.i608 = icmp eq i64 %76, 0
  %77 = select i1 %.not.i608, i64 1, i64 %75
  %spec.select.i609 = mul i64 %77, %spec.select4.i607
  %78 = icmp ult i64 %72, 4
  br i1 %78, label %__mlir_math_ipowi_i64.exit611, label %.lr.ph.i610

__mlir_math_ipowi_i64.exit611:                    ; preds = %.lr.ph.i610, %._crit_edge, %.preheader.i604
  %common.ret.op.i602 = phi i64 [ 1, %._crit_edge ], [ %70, %.preheader.i604 ], [ %spec.select.i609, %.lr.ph.i610 ]
  %.unpack532 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack539.unpack.unpack541 = load i64, ptr @_QFEb.8, align 8, !tbaa !7
  store ptr %.unpack532, ptr %1, align 8, !tbaa !7
  store i64 8, ptr %.fca.1.gep307, align 8, !tbaa !7
  store i32 20180515, ptr %.fca.2.gep309, align 8, !tbaa !7
  store i8 1, ptr %.fca.3.gep311, align 4, !tbaa !7
  store i8 10, ptr %.fca.4.gep313, align 1, !tbaa !7
  store i8 0, ptr %.fca.5.gep315, align 2, !tbaa !7
  store i8 0, ptr %.fca.6.gep317, align 1, !tbaa !7
  store i64 1, ptr %.fca.7.0.0.gep319, align 8, !tbaa !7
  store i64 %.unpack539.unpack.unpack541, ptr %.fca.7.0.1.gep321, align 8, !tbaa !7
  store i64 8, ptr %.fca.7.0.2.gep323, align 8, !tbaa !7
  %79 = call i64 @_FortranAMinvalInteger8(ptr nonnull %1, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 29, i32 0, ptr null)
  %.unpack544 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack551.unpack.unpack553 = load i64, ptr @_QFEb.8, align 8, !tbaa !7
  %80 = icmp sgt i64 %.unpack551.unpack.unpack553, 0
  br i1 %80, label %.lr.ph.i612.preheader, label %_FortranAMaxvalInteger8x1_contract_simplified.exit

.lr.ph.i612.preheader:                            ; preds = %__mlir_math_ipowi_i64.exit611
  %min.iters.check = icmp ult i64 %.unpack551.unpack.unpack553, 4
  br i1 %min.iters.check, label %.lr.ph.i612.preheader631, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.i612.preheader
  %n.vec = and i64 %.unpack551.unpack.unpack553, -4
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <2 x i64> [ <i64 -9223372036854775808, i64 -9223372036854775808>, %vector.ph ], [ %84, %vector.body ]
  %vec.phi629 = phi <2 x i64> [ <i64 -9223372036854775808, i64 -9223372036854775808>, %vector.ph ], [ %85, %vector.body ]
  %81 = shl i64 %index, 3
  %82 = getelementptr i8, ptr %.unpack544, i64 %81
  %wide.load = load <2 x i64>, ptr %82, align 8, !tbaa !3
  %83 = getelementptr i64, ptr %82, i64 2
  %wide.load630 = load <2 x i64>, ptr %83, align 8, !tbaa !3
  %84 = call <2 x i64> @llvm.smax.v2i64(<2 x i64> %wide.load, <2 x i64> %vec.phi)
  %85 = call <2 x i64> @llvm.smax.v2i64(<2 x i64> %wide.load630, <2 x i64> %vec.phi629)
  %index.next = add nuw i64 %index, 4
  %86 = icmp eq i64 %index.next, %n.vec
  br i1 %86, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %rdx.minmax.select = call <2 x i64> @llvm.smax.v2i64(<2 x i64> %84, <2 x i64> %85)
  %87 = call i64 @llvm.vector.reduce.smax.v2i64(<2 x i64> %rdx.minmax.select)
  %cmp.n = icmp eq i64 %.unpack551.unpack.unpack553, %n.vec
  br i1 %cmp.n, label %_FortranAMaxvalInteger8x1_contract_simplified.exit, label %.lr.ph.i612.preheader631

.lr.ph.i612.preheader631:                         ; preds = %.lr.ph.i612.preheader, %middle.block
  %.ph = phi i64 [ -9223372036854775808, %.lr.ph.i612.preheader ], [ %87, %middle.block ]
  %.ph632 = phi i64 [ 0, %.lr.ph.i612.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.i612

.lr.ph.i612:                                      ; preds = %.lr.ph.i612.preheader631, %.lr.ph.i612
  %88 = phi i64 [ %93, %.lr.ph.i612 ], [ %.ph, %.lr.ph.i612.preheader631 ]
  %89 = phi i64 [ %94, %.lr.ph.i612 ], [ %.ph632, %.lr.ph.i612.preheader631 ]
  %90 = shl i64 %89, 3
  %91 = getelementptr i8, ptr %.unpack544, i64 %90
  %92 = load i64, ptr %91, align 8, !tbaa !3
  %93 = call i64 @llvm.smax.i64(i64 %92, i64 %88)
  %94 = add nuw nsw i64 %89, 1
  %exitcond.not.i = icmp eq i64 %94, %.unpack551.unpack.unpack553
  br i1 %exitcond.not.i, label %_FortranAMaxvalInteger8x1_contract_simplified.exit, label %.lr.ph.i612, !llvm.loop !12

_FortranAMaxvalInteger8x1_contract_simplified.exit: ; preds = %.lr.ph.i612, %middle.block, %__mlir_math_ipowi_i64.exit611
  %.lcssa.i = phi i64 [ -9223372036854775808, %__mlir_math_ipowi_i64.exit611 ], [ %87, %middle.block ], [ %93, %.lr.ph.i612 ]
  %95 = icmp eq i64 %79, %.lcssa.i
  br i1 %95, label %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge, label %96

96:                                               ; preds = %_FortranAMaxvalInteger8x1_contract_simplified.exit
  %97 = mul i64 %common.ret.op.i602, %.0616
  %98 = add i64 %97, %.0464615
  %99 = add i64 %.0465614, -1
  %100 = add nuw i64 %.0616, 1
  %101 = icmp sgt i64 %99, 0
  br i1 %101, label %27, label %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge

_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge: ; preds = %96, %_FortranAMaxvalInteger8x1_contract_simplified.exit, %19
  %102 = call ptr @_FortranAioBeginExternalListOutput(i32 -1, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 34)
  %.unpack496 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack503.unpack.unpack505 = load i64, ptr @_QFEb.8, align 8, !tbaa !7
  store ptr %.unpack496, ptr %2, align 8, !tbaa !7
  %.fca.1.gep123 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 8, ptr %.fca.1.gep123, align 8, !tbaa !7
  %.fca.2.gep125 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 2
  store i32 20180515, ptr %.fca.2.gep125, align 8, !tbaa !7
  %.fca.3.gep127 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 3
  store i8 1, ptr %.fca.3.gep127, align 4, !tbaa !7
  %.fca.4.gep129 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 10, ptr %.fca.4.gep129, align 1, !tbaa !7
  %.fca.5.gep131 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 5
  store i8 0, ptr %.fca.5.gep131, align 2, !tbaa !7
  %.fca.6.gep133 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 6
  store i8 0, ptr %.fca.6.gep133, align 1, !tbaa !7
  %.fca.7.0.0.gep135 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 0
  store i64 1, ptr %.fca.7.0.0.gep135, align 8, !tbaa !7
  %.fca.7.0.1.gep137 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 1
  store i64 %.unpack503.unpack.unpack505, ptr %.fca.7.0.1.gep137, align 8, !tbaa !7
  %.fca.7.0.2.gep139 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 7, i64 0, i64 2
  store i64 8, ptr %.fca.7.0.2.gep139, align 8, !tbaa !7
  %103 = call i64 @_FortranAMinvalInteger8(ptr nonnull %2, ptr nonnull @_QQcl.7c8c26040f1aef69607bcc4ec0f8666c, i32 34, i32 0, ptr null)
  br label %104

104:                                              ; preds = %16, %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge
  %.sink628 = phi i64 [ %18, %16 ], [ %103, %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge ]
  %.sink627 = phi ptr [ %17, %16 ], [ %102, %_FortranAMaxvalInteger8x1_contract_simplified.exit._crit_edge ]
  %105 = call i1 @_FortranAioOutputInteger64(ptr %.sink627, i64 %.sink628)
  %106 = call i32 @_FortranAioEndIoStatement(ptr %.sink627)
  %.unpack508 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  call void @free(ptr %.unpack508)
  store ptr null, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEa.8, align 8, !tbaa !7
  %.unpack520 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  call void @free(ptr %.unpack520)
  store ptr null, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEb.8, align 8, !tbaa !7
  %107 = call {} @_FortranAStopStatement(i32 0, i1 false, i1 false)
  unreachable
}

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

declare i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare i64 @_FortranAMinvalInteger8(ptr, ptr, i32, i32, ptr) local_unnamed_addr

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x i64> @llvm.smax.v2i64(<2 x i64>, <2 x i64>) #4

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.vector.reduce.smax.v2i64(<2 x i64>) #5

attributes #0 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #1 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" }
attributes #2 = { noreturn }
attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind 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, !11, !10}
