program flipping_signs
  implicit none
  integer :: n, i, k
  integer(8) :: a(100000), m
  a = 0_8
  read(*,*) n
  read(*,*) a(1:n)
  m = 10000000000_8
  k = 0
  do i = 1, n
    if (m.gt.abs(a(i))) m = abs(a(i))
    if (a(i).lt.0_8) k = k + 1
  end do
  if (mod(k,2).eq.0) then
    m = sum(abs(a(1:n)))
  else
    m = sum(abs(a(1:n))) - 2_8*m
  end if
  write(*,'(i0)') m
  stop
end program flipping_signs
; 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 = internal global [100000 x i64] undef
@_QQcl.93312c78fce7f04636835fb9518d637a = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_4398/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

; 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 i32, align 4
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) @_QFEa, i8 0, i64 800000, i1 false), !tbaa !3
  %3 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.93312c78fce7f04636835fb9518d637a, i32 6)
  %4 = call i1 @_FortranAioInputInteger(ptr %3, ptr nonnull %2, i32 4)
  %5 = call i32 @_FortranAioEndIoStatement(ptr %3)
  %6 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.93312c78fce7f04636835fb9518d637a, i32 7)
  %7 = load i32, ptr %2, align 4, !tbaa !3
  %8 = call i32 @llvm.smax.i32(i32 %7, i32 0)
  %9 = zext i32 %8 to i64
  store ptr @_QFEa, 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 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 %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 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 %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 %9, 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 8, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %10 = call i1 @_FortranAioInputDescriptor(ptr %6, ptr nonnull %1)
  %11 = call i32 @_FortranAioEndIoStatement(ptr %6)
  %12 = load i32, ptr %2, align 4, !tbaa !3
  %13 = icmp sgt i32 %12, 0
  br i1 %13, label %.lr.ph.preheader, label %._crit_edge.thread

.lr.ph.preheader:                                 ; preds = %0
  %14 = zext i32 %12 to i64
  %min.iters.check = icmp ult i32 %12, 4
  br i1 %min.iters.check, label %.lr.ph.preheader175, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph.preheader
  %n.vec = and i64 %14, 4294967292
  %ind.end = or i64 %n.vec, 1
  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 10000000000, i64 10000000000>, %vector.ph ], [ %19, %vector.body ]
  %vec.phi89 = phi <2 x i64> [ <i64 10000000000, i64 10000000000>, %vector.ph ], [ %20, %vector.body ]
  %vec.phi90 = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ]
  %vec.phi91 = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %26, %vector.body ]
  %15 = getelementptr [100000 x i64], ptr @_QFEa, i64 0, i64 %index
  %wide.load = load <2 x i64>, ptr %15, align 16, !tbaa !3
  %16 = getelementptr i64, ptr %15, i64 2
  %wide.load92 = load <2 x i64>, ptr %16, align 16, !tbaa !3
  %17 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load, i1 false)
  %18 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load92, i1 false)
  %19 = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %vec.phi, <2 x i64> %17)
  %20 = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %vec.phi89, <2 x i64> %18)
  %21 = lshr <2 x i64> %wide.load, <i64 63, i64 63>
  %22 = lshr <2 x i64> %wide.load92, <i64 63, i64 63>
  %23 = trunc <2 x i64> %21 to <2 x i32>
  %24 = trunc <2 x i64> %22 to <2 x i32>
  %25 = add <2 x i32> %vec.phi90, %23
  %26 = add <2 x i32> %vec.phi91, %24
  %index.next = add nuw i64 %index, 4
  %27 = icmp eq i64 %index.next, %n.vec
  br i1 %27, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  %bin.rdx = add <2 x i32> %26, %25
  %28 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %bin.rdx)
  %rdx.minmax.select = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %19, <2 x i64> %20)
  %29 = call i64 @llvm.vector.reduce.smin.v2i64(<2 x i64> %rdx.minmax.select)
  %cmp.n = icmp eq i64 %n.vec, %14
  br i1 %cmp.n, label %._crit_edge, label %.lr.ph.preheader175

.lr.ph.preheader175:                              ; preds = %.lr.ph.preheader, %middle.block
  %indvars.iv.ph = phi i64 [ 1, %.lr.ph.preheader ], [ %ind.end, %middle.block ]
  %.073.ph = phi i64 [ 10000000000, %.lr.ph.preheader ], [ %29, %middle.block ]
  %.04972.ph = phi i32 [ 0, %.lr.ph.preheader ], [ %28, %middle.block ]
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader175, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ %indvars.iv.ph, %.lr.ph.preheader175 ]
  %.073 = phi i64 [ %spec.select, %.lr.ph ], [ %.073.ph, %.lr.ph.preheader175 ]
  %.04972 = phi i32 [ %.150, %.lr.ph ], [ %.04972.ph, %.lr.ph.preheader175 ]
  %30 = add nsw i64 %indvars.iv, -1
  %31 = getelementptr [100000 x i64], ptr @_QFEa, i64 0, i64 %30
  %32 = load i64, ptr %31, align 8, !tbaa !3
  %33 = call i64 @llvm.abs.i64(i64 %32, i1 false)
  %spec.select = call i64 @llvm.smin.i64(i64 %.073, i64 %33)
  %.lobit = lshr i64 %32, 63
  %34 = trunc i64 %.lobit to i32
  %.150 = add i32 %.04972, %34
  %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, label %.lr.ph, !llvm.loop !12

._crit_edge:                                      ; preds = %.lr.ph, %middle.block
  %spec.select.lcssa = phi i64 [ %29, %middle.block ], [ %spec.select, %.lr.ph ]
  %.150.lcssa = phi i32 [ %28, %middle.block ], [ %.150, %.lr.ph ]
  %35 = and i32 %.150.lcssa, 1
  %36 = icmp eq i32 %35, 0
  %37 = shl i64 %spec.select.lcssa, 1
  br i1 %36, label %._crit_edge.thread, label %72

._crit_edge.thread:                               ; preds = %0, %._crit_edge
  %38 = call i32 @llvm.smax.i32(i32 %12, i32 0)
  %39 = zext i32 %38 to i64
  %40 = shl nuw nsw i64 %39, 3
  %41 = call ptr @malloc(i64 %40)
  %.not82 = icmp slt i32 %12, 1
  br i1 %.not82, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph79.preheader

.lr.ph79.preheader:                               ; preds = %._crit_edge.thread
  %min.iters.check129 = icmp ult i32 %38, 4
  br i1 %min.iters.check129, label %.lr.ph79.preheader163, label %vector.ph130

vector.ph130:                                     ; preds = %.lr.ph79.preheader
  %n.vec132 = and i64 %39, 2147483644
  %ind.end133 = and i64 %39, 3
  br label %vector.body137

vector.body137:                                   ; preds = %vector.body137, %vector.ph130
  %index138 = phi i64 [ 0, %vector.ph130 ], [ %index.next141, %vector.body137 ]
  %42 = getelementptr i64, ptr @_QFEa, i64 %index138
  %wide.load139 = load <2 x i64>, ptr %42, align 16, !tbaa !3
  %43 = getelementptr i64, ptr %42, i64 2
  %wide.load140 = load <2 x i64>, ptr %43, align 16, !tbaa !3
  %44 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load139, i1 false)
  %45 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load140, i1 false)
  %46 = getelementptr i64, ptr %41, i64 %index138
  store <2 x i64> %44, ptr %46, align 8, !tbaa !3
  %47 = getelementptr i64, ptr %46, i64 2
  store <2 x i64> %45, ptr %47, align 8, !tbaa !3
  %index.next141 = add nuw i64 %index138, 4
  %48 = icmp eq i64 %index.next141, %n.vec132
  br i1 %48, label %middle.block127, label %vector.body137, !llvm.loop !13

middle.block127:                                  ; preds = %vector.body137
  %cmp.n136 = icmp eq i64 %n.vec132, %39
  br i1 %cmp.n136, label %._crit_edge80, label %.lr.ph79.preheader163

.lr.ph79.preheader163:                            ; preds = %.lr.ph79.preheader, %middle.block127
  %.ph164 = phi i64 [ %39, %.lr.ph79.preheader ], [ %ind.end133, %middle.block127 ]
  %.ph165 = phi i64 [ 0, %.lr.ph79.preheader ], [ %n.vec132, %middle.block127 ]
  br label %.lr.ph79

.lr.ph79:                                         ; preds = %.lr.ph79.preheader163, %.lr.ph79
  %49 = phi i64 [ %56, %.lr.ph79 ], [ %.ph164, %.lr.ph79.preheader163 ]
  %50 = phi i64 [ %51, %.lr.ph79 ], [ %.ph165, %.lr.ph79.preheader163 ]
  %51 = add nuw nsw i64 %50, 1
  %52 = getelementptr i64, ptr @_QFEa, i64 %50
  %53 = load i64, ptr %52, align 8, !tbaa !3
  %54 = call i64 @llvm.abs.i64(i64 %53, i1 false)
  %55 = getelementptr i64, ptr %41, i64 %50
  store i64 %54, ptr %55, align 8, !tbaa !3
  %56 = add nsw i64 %49, -1
  %57 = icmp ugt i64 %49, 1
  br i1 %57, label %.lr.ph79, label %._crit_edge80, !llvm.loop !14

._crit_edge80:                                    ; preds = %.lr.ph79, %middle.block127
  br i1 %.not82, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i.preheader

.lr.ph.i.preheader:                               ; preds = %._crit_edge80
  %min.iters.check144 = icmp ult i32 %38, 4
  br i1 %min.iters.check144, label %.lr.ph.i.preheader159, label %vector.ph145

vector.ph145:                                     ; preds = %.lr.ph.i.preheader
  %n.vec147 = and i64 %39, 2147483644
  br label %vector.body150

vector.body150:                                   ; preds = %vector.body150, %vector.ph145
  %index151 = phi i64 [ 0, %vector.ph145 ], [ %index.next156, %vector.body150 ]
  %vec.phi152 = phi <2 x i64> [ zeroinitializer, %vector.ph145 ], [ %61, %vector.body150 ]
  %vec.phi153 = phi <2 x i64> [ zeroinitializer, %vector.ph145 ], [ %62, %vector.body150 ]
  %58 = shl i64 %index151, 3
  %59 = getelementptr i8, ptr %41, i64 %58
  %wide.load154 = load <2 x i64>, ptr %59, align 8, !tbaa !3
  %60 = getelementptr i64, ptr %59, i64 2
  %wide.load155 = load <2 x i64>, ptr %60, align 8, !tbaa !3
  %61 = add <2 x i64> %wide.load154, %vec.phi152
  %62 = add <2 x i64> %wide.load155, %vec.phi153
  %index.next156 = add nuw i64 %index151, 4
  %63 = icmp eq i64 %index.next156, %n.vec147
  br i1 %63, label %middle.block142, label %vector.body150, !llvm.loop !15

middle.block142:                                  ; preds = %vector.body150
  %bin.rdx157 = add <2 x i64> %62, %61
  %64 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx157)
  %cmp.n149 = icmp eq i64 %n.vec147, %39
  br i1 %cmp.n149, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i.preheader159

.lr.ph.i.preheader159:                            ; preds = %.lr.ph.i.preheader, %middle.block142
  %.ph = phi i64 [ 0, %.lr.ph.i.preheader ], [ %64, %middle.block142 ]
  %.ph160 = phi i64 [ 0, %.lr.ph.i.preheader ], [ %n.vec147, %middle.block142 ]
  br label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.lr.ph.i.preheader159, %.lr.ph.i
  %65 = phi i64 [ %70, %.lr.ph.i ], [ %.ph, %.lr.ph.i.preheader159 ]
  %66 = phi i64 [ %71, %.lr.ph.i ], [ %.ph160, %.lr.ph.i.preheader159 ]
  %67 = shl i64 %66, 3
  %68 = getelementptr i8, ptr %41, i64 %67
  %69 = load i64, ptr %68, align 8, !tbaa !3
  %70 = add i64 %69, %65
  %71 = add nuw nsw i64 %66, 1
  %exitcond.not.i = icmp eq i64 %71, %39
  br i1 %exitcond.not.i, label %_FortranASumInteger8x1_contract_simplified.exit, label %.lr.ph.i, !llvm.loop !16

72:                                               ; preds = %._crit_edge
  %73 = call i32 @llvm.smax.i32(i32 %12, i32 0)
  %74 = zext i32 %73 to i64
  %75 = shl nuw nsw i64 %74, 3
  %76 = call ptr @malloc(i64 %75)
  %.not81 = icmp slt i32 %12, 1
  br i1 %.not81, label %_FortranASumInteger8x1_contract_simplified.exit59, label %.lr.ph76.preheader

.lr.ph76.preheader:                               ; preds = %72
  %min.iters.check96 = icmp ult i32 %73, 4
  br i1 %min.iters.check96, label %.lr.ph76.preheader172, label %vector.ph97

vector.ph97:                                      ; preds = %.lr.ph76.preheader
  %n.vec99 = and i64 %74, 2147483644
  %ind.end100 = and i64 %74, 3
  br label %vector.body104

vector.body104:                                   ; preds = %vector.body104, %vector.ph97
  %index105 = phi i64 [ 0, %vector.ph97 ], [ %index.next108, %vector.body104 ]
  %77 = getelementptr i64, ptr @_QFEa, i64 %index105
  %wide.load106 = load <2 x i64>, ptr %77, align 16, !tbaa !3
  %78 = getelementptr i64, ptr %77, i64 2
  %wide.load107 = load <2 x i64>, ptr %78, align 16, !tbaa !3
  %79 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load106, i1 false)
  %80 = call <2 x i64> @llvm.abs.v2i64(<2 x i64> %wide.load107, i1 false)
  %81 = getelementptr i64, ptr %76, i64 %index105
  store <2 x i64> %79, ptr %81, align 8, !tbaa !3
  %82 = getelementptr i64, ptr %81, i64 2
  store <2 x i64> %80, ptr %82, align 8, !tbaa !3
  %index.next108 = add nuw i64 %index105, 4
  %83 = icmp eq i64 %index.next108, %n.vec99
  br i1 %83, label %middle.block94, label %vector.body104, !llvm.loop !17

middle.block94:                                   ; preds = %vector.body104
  %cmp.n103 = icmp eq i64 %n.vec99, %74
  br i1 %cmp.n103, label %._crit_edge77, label %.lr.ph76.preheader172

.lr.ph76.preheader172:                            ; preds = %.lr.ph76.preheader, %middle.block94
  %.ph173 = phi i64 [ %74, %.lr.ph76.preheader ], [ %ind.end100, %middle.block94 ]
  %.ph174 = phi i64 [ 0, %.lr.ph76.preheader ], [ %n.vec99, %middle.block94 ]
  br label %.lr.ph76

.lr.ph76:                                         ; preds = %.lr.ph76.preheader172, %.lr.ph76
  %84 = phi i64 [ %91, %.lr.ph76 ], [ %.ph173, %.lr.ph76.preheader172 ]
  %85 = phi i64 [ %86, %.lr.ph76 ], [ %.ph174, %.lr.ph76.preheader172 ]
  %86 = add nuw nsw i64 %85, 1
  %87 = getelementptr i64, ptr @_QFEa, i64 %85
  %88 = load i64, ptr %87, align 8, !tbaa !3
  %89 = call i64 @llvm.abs.i64(i64 %88, i1 false)
  %90 = getelementptr i64, ptr %76, i64 %85
  store i64 %89, ptr %90, align 8, !tbaa !3
  %91 = add nsw i64 %84, -1
  %92 = icmp ugt i64 %84, 1
  br i1 %92, label %.lr.ph76, label %._crit_edge77, !llvm.loop !18

._crit_edge77:                                    ; preds = %.lr.ph76, %middle.block94
  br i1 %.not81, label %_FortranASumInteger8x1_contract_simplified.exit59, label %.lr.ph.i56.preheader

.lr.ph.i56.preheader:                             ; preds = %._crit_edge77
  %min.iters.check111 = icmp ult i32 %73, 4
  br i1 %min.iters.check111, label %.lr.ph.i56.preheader166, label %vector.ph112

vector.ph112:                                     ; preds = %.lr.ph.i56.preheader
  %n.vec114 = and i64 %74, 2147483644
  br label %vector.body117

vector.body117:                                   ; preds = %vector.body117, %vector.ph112
  %index118 = phi i64 [ 0, %vector.ph112 ], [ %index.next123, %vector.body117 ]
  %vec.phi119 = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %96, %vector.body117 ]
  %vec.phi120 = phi <2 x i64> [ zeroinitializer, %vector.ph112 ], [ %97, %vector.body117 ]
  %93 = shl i64 %index118, 3
  %94 = getelementptr i8, ptr %76, i64 %93
  %wide.load121 = load <2 x i64>, ptr %94, align 8, !tbaa !3
  %95 = getelementptr i64, ptr %94, i64 2
  %wide.load122 = load <2 x i64>, ptr %95, align 8, !tbaa !3
  %96 = add <2 x i64> %wide.load121, %vec.phi119
  %97 = add <2 x i64> %wide.load122, %vec.phi120
  %index.next123 = add nuw i64 %index118, 4
  %98 = icmp eq i64 %index.next123, %n.vec114
  br i1 %98, label %middle.block109, label %vector.body117, !llvm.loop !19

middle.block109:                                  ; preds = %vector.body117
  %bin.rdx124 = add <2 x i64> %97, %96
  %99 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx124)
  %cmp.n116 = icmp eq i64 %n.vec114, %74
  br i1 %cmp.n116, label %_FortranASumInteger8x1_contract_simplified.exit59, label %.lr.ph.i56.preheader166

.lr.ph.i56.preheader166:                          ; preds = %.lr.ph.i56.preheader, %middle.block109
  %.ph167 = phi i64 [ 0, %.lr.ph.i56.preheader ], [ %99, %middle.block109 ]
  %.ph168 = phi i64 [ 0, %.lr.ph.i56.preheader ], [ %n.vec114, %middle.block109 ]
  br label %.lr.ph.i56

.lr.ph.i56:                                       ; preds = %.lr.ph.i56.preheader166, %.lr.ph.i56
  %100 = phi i64 [ %105, %.lr.ph.i56 ], [ %.ph167, %.lr.ph.i56.preheader166 ]
  %101 = phi i64 [ %106, %.lr.ph.i56 ], [ %.ph168, %.lr.ph.i56.preheader166 ]
  %102 = shl i64 %101, 3
  %103 = getelementptr i8, ptr %76, i64 %102
  %104 = load i64, ptr %103, align 8, !tbaa !3
  %105 = add i64 %104, %100
  %106 = add nuw nsw i64 %101, 1
  %exitcond.not.i57 = icmp eq i64 %106, %74
  br i1 %exitcond.not.i57, label %_FortranASumInteger8x1_contract_simplified.exit59, label %.lr.ph.i56, !llvm.loop !20

_FortranASumInteger8x1_contract_simplified.exit59: ; preds = %.lr.ph.i56, %middle.block109, %72, %._crit_edge77
  %.lcssa.i58 = phi i64 [ 0, %._crit_edge77 ], [ 0, %72 ], [ %99, %middle.block109 ], [ %105, %.lr.ph.i56 ]
  %107 = sub i64 %.lcssa.i58, %37
  br label %_FortranASumInteger8x1_contract_simplified.exit

_FortranASumInteger8x1_contract_simplified.exit:  ; preds = %.lr.ph.i, %middle.block142, %._crit_edge80, %._crit_edge.thread, %_FortranASumInteger8x1_contract_simplified.exit59
  %.sink = phi ptr [ %76, %_FortranASumInteger8x1_contract_simplified.exit59 ], [ %41, %._crit_edge.thread ], [ %41, %._crit_edge80 ], [ %41, %middle.block142 ], [ %41, %.lr.ph.i ]
  %.2 = phi i64 [ %107, %_FortranASumInteger8x1_contract_simplified.exit59 ], [ 0, %._crit_edge.thread ], [ 0, %._crit_edge80 ], [ %64, %middle.block142 ], [ %70, %.lr.ph.i ]
  call void @free(ptr %.sink)
  %108 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.93312c78fce7f04636835fb9518d637a, i32 19)
  %109 = call i1 @_FortranAioOutputInteger64(ptr %108, i64 %.2)
  %110 = call i32 @_FortranAioEndIoStatement(ptr %108)
  %111 = 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 i1 @_FortranAioInputDescriptor(ptr, ptr) local_unnamed_addr

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

declare i1 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

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

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

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.vector.reduce.add.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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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}
!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}
