program main
  implicit none
  integer :: n, me
  integer, allocatable :: x(:)
  read (*, *) n
  allocate (x(n))
  read (*, *) x(:)
  me = sum(x) / n
  write (*, "(i0)") min(sum((x(:) - me) ** 2), sum((x(:) - me - 1) ** 2))
  deallocate (x)
end program main

; 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"

@_QFEx.0 = internal unnamed_addr global ptr null
@_QFEx.8 = internal unnamed_addr global i64 0
@_QQcl.e18937e9ae1e7b82437cbeec879f0fd7 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2336/source.f\00"
@_QQcl.28693029 = linkonce constant [4 x i8] c"(i0)"
@_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

define void @_QQmain() local_unnamed_addr {
  %1 = alloca { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, align 8
  %2 = alloca i32, align 4
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.e18937e9ae1e7b82437cbeec879f0fd7, i32 5)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = load i32, ptr %2, align 4, !tbaa !3
  %7 = call i32 @llvm.smax.i32(i32 %6, i32 0)
  %8 = zext i32 %7 to i64
  %9 = shl nuw nsw i64 %8, 2
  %10 = call ptr @malloc(i64 %9)
  store ptr %10, ptr @_QFEx.0, align 8, !tbaa !7
  store i64 %8, ptr @_QFEx.8, align 8, !tbaa !7
  %11 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.e18937e9ae1e7b82437cbeec879f0fd7, i32 7)
  %.unpack = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack274.unpack.unpack276 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %12 = call i64 @llvm.smax.i64(i64 %.unpack274.unpack.unpack276, i64 0)
  store ptr %.unpack, ptr %1, align 8, !tbaa !7
  %.fca.1.gep = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %1, i64 0, i32 1
  store i64 4, 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 %1, 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 %1, 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 %1, i64 0, i32 4
  store i8 9, 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 %1, 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 %1, 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 %1, 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 %1, i64 0, i32 7, i64 0, i64 1
  store i64 %12, 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 %1, i64 0, i32 7, i64 0, i64 2
  store i64 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %13 = call i1 @_FortranAioInputDescriptor(ptr %11, ptr nonnull %1)
  %14 = call i32 @_FortranAioEndIoStatement(ptr %11)
  %.unpack279 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack286.unpack.unpack288 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %15 = icmp sgt i64 %.unpack286.unpack.unpack288, 0
  br i1 %15, label %.lr.ph.i.preheader, label %_FortranASumInteger4x1_contract_simplified.exit

.lr.ph.i.preheader:                               ; preds = %0
  %min.iters.check = icmp ult i64 %.unpack286.unpack.unpack288, 8
  br i1 %min.iters.check, label %.lr.ph.i.preheader453, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.i.preheader
  %n.vec = and i64 %.unpack286.unpack.unpack288, -8
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ]
  %vec.phi372 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ]
  %16 = shl i64 %index, 2
  %17 = getelementptr i8, ptr %.unpack279, i64 %16
  %wide.load = load <4 x i32>, ptr %17, align 4, !tbaa !3
  %18 = getelementptr i32, ptr %17, i64 4
  %wide.load373 = load <4 x i32>, ptr %18, align 4, !tbaa !3
  %19 = add <4 x i32> %wide.load, %vec.phi
  %20 = add <4 x i32> %wide.load373, %vec.phi372
  %index.next = add nuw i64 %index, 8
  %21 = icmp eq i64 %index.next, %n.vec
  br i1 %21, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <4 x i32> %20, %19
  %22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx)
  %cmp.n = icmp eq i64 %.unpack286.unpack.unpack288, %n.vec
  br i1 %cmp.n, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i.preheader453

.lr.ph.i.preheader453:                            ; preds = %.lr.ph.i.preheader, %middle.block
  %.ph454 = phi i32 [ 0, %.lr.ph.i.preheader ], [ %22, %middle.block ]
  %.ph455 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec, %middle.block ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader453, %.lr.ph.i
  %23 = phi i32 [ %28, %.lr.ph.i ], [ %.ph454, %.lr.ph.i.preheader453 ]
  %24 = phi i64 [ %29, %.lr.ph.i ], [ %.ph455, %.lr.ph.i.preheader453 ]
  %25 = shl i64 %24, 2
  %26 = getelementptr i8, ptr %.unpack279, i64 %25
  %27 = load i32, ptr %26, align 4, !tbaa !3
  %28 = add i32 %27, %23
  %29 = add nuw nsw i64 %24, 1
  %exitcond.not.i = icmp eq i64 %29, %.unpack286.unpack.unpack288
  br i1 %exitcond.not.i, label %_FortranASumInteger4x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !12

_FortranASumInteger4x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block, %0
  %.lcssa.i = phi i32 [ 0, %0 ], [ %22, %middle.block ], [ %28, %.lr.ph.i ]
  %30 = load i32, ptr %2, align 4, !tbaa !3
  %31 = sdiv i32 %.lcssa.i, %30
  %32 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.e18937e9ae1e7b82437cbeec879f0fd7, i32 9)
  %.unpack291 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  %.unpack298.unpack.unpack300 = load i64, ptr @_QFEx.8, align 8, !tbaa !7
  %33 = call i64 @llvm.smax.i64(i64 %.unpack298.unpack.unpack300, i64 0)
  %34 = shl i64 %33, 2
  %35 = call ptr @malloc(i64 %34)
  %.not359 = icmp slt i64 %.unpack298.unpack.unpack300, 1
  br i1 %.not359, label %_FortranASumInteger4x1_contract_simplified.exit330.thread, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %_FortranASumInteger4x1_contract_simplified.exit
  %min.iters.check376 = icmp ult i64 %33, 8
  br i1 %min.iters.check376, label %.lr.ph.preheader451, label %vector.ph377

vector.ph377:                                     ; preds = %.lr.ph.preheader
  %n.vec379 = and i64 %33, 9223372036854775800
  %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %31, i64 0
  %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert386 = insertelement <4 x i32> poison, i32 %31, i64 0
  %broadcast.splat387 = shufflevector <4 x i32> %broadcast.splatinsert386, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body382

vector.body382:                                   ; preds = %vector.body382, %vector.ph377
  %index383 = phi i64 [ 0, %vector.ph377 ], [ %index.next388, %vector.body382 ]
  %36 = getelementptr i32, ptr %.unpack291, i64 %index383
  %wide.load384 = load <4 x i32>, ptr %36, align 4, !tbaa !3
  %37 = getelementptr i32, ptr %36, i64 4
  %wide.load385 = load <4 x i32>, ptr %37, align 4, !tbaa !3
  %38 = sub <4 x i32> %wide.load384, %broadcast.splat
  %39 = sub <4 x i32> %wide.load385, %broadcast.splat387
  %40 = mul <4 x i32> %38, %38
  %41 = mul <4 x i32> %39, %39
  %42 = getelementptr i32, ptr %35, i64 %index383
  store <4 x i32> %40, ptr %42, align 4, !tbaa !3
  %43 = getelementptr i32, ptr %42, i64 4
  store <4 x i32> %41, ptr %43, align 4, !tbaa !3
  %index.next388 = add nuw i64 %index383, 8
  %44 = icmp eq i64 %index.next388, %n.vec379
  br i1 %44, label %middle.block374, label %vector.body382, !llvm.loop !13

middle.block374:                                  ; preds = %vector.body382
  %cmp.n381 = icmp eq i64 %33, %n.vec379
  br i1 %cmp.n381, label %._crit_edge, label %.lr.ph.preheader451

.lr.ph.preheader451:                              ; preds = %.lr.ph.preheader, %middle.block374
  %.ph452 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec379, %middle.block374 ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader451, %.lr.ph
  %45 = phi i64 [ %50, %.lr.ph ], [ %.ph452, %.lr.ph.preheader451 ]
  %46 = getelementptr i32, ptr %.unpack291, i64 %45
  %47 = load i32, ptr %46, align 4, !tbaa !3
  %48 = sub i32 %47, %31
  %49 = mul i32 %48, %48
  %50 = add nuw nsw i64 %45, 1
  %51 = getelementptr i32, ptr %35, i64 %45
  store i32 %49, ptr %51, align 4, !tbaa !3
  %exitcond.not = icmp eq i64 %50, %33
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %middle.block374
  br i1 %.not359, label %_FortranASumInteger4x1_contract_simplified.exit330.thread, label %.lr.ph.i327.preheader

.lr.ph.i327.preheader:                            ; preds = %._crit_edge
  %min.iters.check391 = icmp ult i64 %33, 8
  br i1 %min.iters.check391, label %.lr.ph.i327.preheader445, label %vector.ph392

vector.ph392:                                     ; preds = %.lr.ph.i327.preheader
  %n.vec394 = and i64 %33, 9223372036854775800
  br label %vector.body397

vector.body397:                                   ; preds = %vector.body397, %vector.ph392
  %index398 = phi i64 [ 0, %vector.ph392 ], [ %index.next403, %vector.body397 ]
  %vec.phi399 = phi <4 x i32> [ zeroinitializer, %vector.ph392 ], [ %55, %vector.body397 ]
  %vec.phi400 = phi <4 x i32> [ zeroinitializer, %vector.ph392 ], [ %56, %vector.body397 ]
  %52 = shl i64 %index398, 2
  %53 = getelementptr i8, ptr %35, i64 %52
  %wide.load401 = load <4 x i32>, ptr %53, align 4, !tbaa !3
  %54 = getelementptr i32, ptr %53, i64 4
  %wide.load402 = load <4 x i32>, ptr %54, align 4, !tbaa !3
  %55 = add <4 x i32> %wide.load401, %vec.phi399
  %56 = add <4 x i32> %wide.load402, %vec.phi400
  %index.next403 = add nuw i64 %index398, 8
  %57 = icmp eq i64 %index.next403, %n.vec394
  br i1 %57, label %middle.block389, label %vector.body397, !llvm.loop !15

middle.block389:                                  ; preds = %vector.body397
  %bin.rdx404 = add <4 x i32> %56, %55
  %58 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx404)
  %cmp.n396 = icmp eq i64 %33, %n.vec394
  br i1 %cmp.n396, label %_FortranASumInteger4x1_contract_simplified.exit330, label %.lr.ph.i327.preheader445

.lr.ph.i327.preheader445:                         ; preds = %.lr.ph.i327.preheader, %middle.block389
  %.ph446 = phi i32 [ 0, %.lr.ph.i327.preheader ], [ %58, %middle.block389 ]
  %.ph447 = phi i64 [ 0, %.lr.ph.i327.preheader ], [ %n.vec394, %middle.block389 ]
  br label %.lr.ph.i327

.lr.ph.i327:                                      ; preds = %.lr.ph.i327.preheader445, %.lr.ph.i327
  %59 = phi i32 [ %64, %.lr.ph.i327 ], [ %.ph446, %.lr.ph.i327.preheader445 ]
  %60 = phi i64 [ %65, %.lr.ph.i327 ], [ %.ph447, %.lr.ph.i327.preheader445 ]
  %61 = shl i64 %60, 2
  %62 = getelementptr i8, ptr %35, i64 %61
  %63 = load i32, ptr %62, align 4, !tbaa !3
  %64 = add i32 %63, %59
  %65 = add nuw nsw i64 %60, 1
  %exitcond.not.i328 = icmp eq i64 %65, %33
  br i1 %exitcond.not.i328, label %_FortranASumInteger4x1_contract_simplified.exit330, label %.lr.ph.i327, !llvm.loop !16

_FortranASumInteger4x1_contract_simplified.exit330.thread: ; preds = %._crit_edge, %_FortranASumInteger4x1_contract_simplified.exit
  %66 = call ptr @malloc(i64 %34)
  br label %_FortranASumInteger4x1_contract_simplified.exit334

_FortranASumInteger4x1_contract_simplified.exit330: ; preds = %.lr.ph.i327, %middle.block389
  %.lcssa370 = phi i32 [ %58, %middle.block389 ], [ %64, %.lr.ph.i327 ]
  %67 = call ptr @malloc(i64 %34)
  br i1 %.not359, label %_FortranASumInteger4x1_contract_simplified.exit334, label %.lr.ph357

.lr.ph357:                                        ; preds = %_FortranASumInteger4x1_contract_simplified.exit330
  %68 = xor i32 %31, -1
  %min.iters.check408 = icmp ult i64 %33, 8
  br i1 %min.iters.check408, label %scalar.ph407.preheader, label %vector.ph409

vector.ph409:                                     ; preds = %.lr.ph357
  %n.vec411 = and i64 %33, 9223372036854775800
  %broadcast.splatinsert418 = insertelement <4 x i32> poison, i32 %68, i64 0
  %broadcast.splat419 = shufflevector <4 x i32> %broadcast.splatinsert418, <4 x i32> poison, <4 x i32> zeroinitializer
  %broadcast.splatinsert420 = insertelement <4 x i32> poison, i32 %68, i64 0
  %broadcast.splat421 = shufflevector <4 x i32> %broadcast.splatinsert420, <4 x i32> poison, <4 x i32> zeroinitializer
  br label %vector.body414

vector.body414:                                   ; preds = %vector.body414, %vector.ph409
  %index415 = phi i64 [ 0, %vector.ph409 ], [ %index.next422, %vector.body414 ]
  %69 = getelementptr i32, ptr %.unpack291, i64 %index415
  %wide.load416 = load <4 x i32>, ptr %69, align 4, !tbaa !3
  %70 = getelementptr i32, ptr %69, i64 4
  %wide.load417 = load <4 x i32>, ptr %70, align 4, !tbaa !3
  %71 = add <4 x i32> %wide.load416, %broadcast.splat419
  %72 = add <4 x i32> %wide.load417, %broadcast.splat421
  %73 = mul <4 x i32> %71, %71
  %74 = mul <4 x i32> %72, %72
  %75 = getelementptr i32, ptr %67, i64 %index415
  store <4 x i32> %73, ptr %75, align 4, !tbaa !3
  %76 = getelementptr i32, ptr %75, i64 4
  store <4 x i32> %74, ptr %76, align 4, !tbaa !3
  %index.next422 = add nuw i64 %index415, 8
  %77 = icmp eq i64 %index.next422, %n.vec411
  br i1 %77, label %middle.block406, label %vector.body414, !llvm.loop !17

middle.block406:                                  ; preds = %vector.body414
  %cmp.n413 = icmp eq i64 %33, %n.vec411
  br i1 %cmp.n413, label %._crit_edge358, label %scalar.ph407.preheader

scalar.ph407.preheader:                           ; preds = %.lr.ph357, %middle.block406
  %.ph444 = phi i64 [ 0, %.lr.ph357 ], [ %n.vec411, %middle.block406 ]
  br label %scalar.ph407

scalar.ph407:                                     ; preds = %scalar.ph407.preheader, %scalar.ph407
  %78 = phi i64 [ %83, %scalar.ph407 ], [ %.ph444, %scalar.ph407.preheader ]
  %79 = getelementptr i32, ptr %.unpack291, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !3
  %81 = add i32 %80, %68
  %82 = mul i32 %81, %81
  %83 = add nuw nsw i64 %78, 1
  %84 = getelementptr i32, ptr %67, i64 %78
  store i32 %82, ptr %84, align 4, !tbaa !3
  %exitcond363.not = icmp eq i64 %83, %33
  br i1 %exitcond363.not, label %._crit_edge358, label %scalar.ph407, !llvm.loop !18

._crit_edge358:                                   ; preds = %scalar.ph407, %middle.block406
  br i1 %.not359, label %_FortranASumInteger4x1_contract_simplified.exit334, label %.lr.ph.i331.preheader

.lr.ph.i331.preheader:                            ; preds = %._crit_edge358
  %min.iters.check425 = icmp ult i64 %33, 8
  br i1 %min.iters.check425, label %.lr.ph.i331.preheader440, label %vector.ph426

vector.ph426:                                     ; preds = %.lr.ph.i331.preheader
  %n.vec428 = and i64 %33, 9223372036854775800
  br label %vector.body431

vector.body431:                                   ; preds = %vector.body431, %vector.ph426
  %index432 = phi i64 [ 0, %vector.ph426 ], [ %index.next437, %vector.body431 ]
  %vec.phi433 = phi <4 x i32> [ zeroinitializer, %vector.ph426 ], [ %88, %vector.body431 ]
  %vec.phi434 = phi <4 x i32> [ zeroinitializer, %vector.ph426 ], [ %89, %vector.body431 ]
  %85 = shl i64 %index432, 2
  %86 = getelementptr i8, ptr %67, i64 %85
  %wide.load435 = load <4 x i32>, ptr %86, align 4, !tbaa !3
  %87 = getelementptr i32, ptr %86, i64 4
  %wide.load436 = load <4 x i32>, ptr %87, align 4, !tbaa !3
  %88 = add <4 x i32> %wide.load435, %vec.phi433
  %89 = add <4 x i32> %wide.load436, %vec.phi434
  %index.next437 = add nuw i64 %index432, 8
  %90 = icmp eq i64 %index.next437, %n.vec428
  br i1 %90, label %middle.block423, label %vector.body431, !llvm.loop !19

middle.block423:                                  ; preds = %vector.body431
  %bin.rdx438 = add <4 x i32> %89, %88
  %91 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx438)
  %cmp.n430 = icmp eq i64 %33, %n.vec428
  br i1 %cmp.n430, label %_FortranASumInteger4x1_contract_simplified.exit334, label %.lr.ph.i331.preheader440

.lr.ph.i331.preheader440:                         ; preds = %.lr.ph.i331.preheader, %middle.block423
  %.ph = phi i32 [ 0, %.lr.ph.i331.preheader ], [ %91, %middle.block423 ]
  %.ph441 = phi i64 [ 0, %.lr.ph.i331.preheader ], [ %n.vec428, %middle.block423 ]
  br label %.lr.ph.i331

.lr.ph.i331:                                      ; preds = %.lr.ph.i331.preheader440, %.lr.ph.i331
  %92 = phi i32 [ %97, %.lr.ph.i331 ], [ %.ph, %.lr.ph.i331.preheader440 ]
  %93 = phi i64 [ %98, %.lr.ph.i331 ], [ %.ph441, %.lr.ph.i331.preheader440 ]
  %94 = shl i64 %93, 2
  %95 = getelementptr i8, ptr %67, i64 %94
  %96 = load i32, ptr %95, align 4, !tbaa !3
  %97 = add i32 %96, %92
  %98 = add nuw nsw i64 %93, 1
  %exitcond.not.i332 = icmp eq i64 %98, %33
  br i1 %exitcond.not.i332, label %_FortranASumInteger4x1_contract_simplified.exit334, label %.lr.ph.i331, !llvm.loop !20

_FortranASumInteger4x1_contract_simplified.exit334: ; preds = %.lr.ph.i331, %middle.block423, %_FortranASumInteger4x1_contract_simplified.exit330, %_FortranASumInteger4x1_contract_simplified.exit330.thread, %._crit_edge358
  %.lcssa.i329365367 = phi i32 [ %.lcssa370, %._crit_edge358 ], [ %.lcssa370, %_FortranASumInteger4x1_contract_simplified.exit330 ], [ 0, %_FortranASumInteger4x1_contract_simplified.exit330.thread ], [ %.lcssa370, %middle.block423 ], [ %.lcssa370, %.lr.ph.i331 ]
  %99 = phi ptr [ %67, %._crit_edge358 ], [ %67, %_FortranASumInteger4x1_contract_simplified.exit330 ], [ %66, %_FortranASumInteger4x1_contract_simplified.exit330.thread ], [ %67, %middle.block423 ], [ %67, %.lr.ph.i331 ]
  %.lcssa.i333 = phi i32 [ 0, %._crit_edge358 ], [ 0, %_FortranASumInteger4x1_contract_simplified.exit330 ], [ 0, %_FortranASumInteger4x1_contract_simplified.exit330.thread ], [ %91, %middle.block423 ], [ %97, %.lr.ph.i331 ]
  %100 = call i32 @llvm.smin.i32(i32 %.lcssa.i329365367, i32 %.lcssa.i333)
  %101 = call i1 @_FortranAioOutputInteger32(ptr %32, i32 %100)
  call void @free(ptr %99)
  call void @free(ptr %35)
  %102 = call i32 @_FortranAioEndIoStatement(ptr %32)
  %.unpack315 = load ptr, ptr @_QFEx.0, align 8, !tbaa !7
  call void @free(ptr %.unpack315)
  store ptr null, ptr @_QFEx.0, align 8, !tbaa !7
  store i64 0, ptr @_QFEx.8, align 8, !tbaa !7
  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 i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

declare ptr @_FortranAioBeginExternalFormattedOutput(ptr, i64, ptr, 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 i64 @llvm.smax.i64(i64, i64) #2

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #3 = { 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}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !11, !10}
!15 = distinct !{!15, !10, !11}
!16 = distinct !{!16, !11, !10}
!17 = distinct !{!17, !10, !11}
!18 = distinct !{!18, !11, !10}
!19 = distinct !{!19, !10, !11}
!20 = distinct !{!20, !11, !10}
