program swap_and_flip
  implicit none
  integer, parameter :: inf = 1e9
  integer :: n, a(0:17) = 0, b(0:17) = 0, i, j, k, x, u, v
  integer, allocatable :: dp(:,:)
  read(*,*) n
  read(*,*) a(0:n-1)
  read(*,*) b(0:n-1)
  u = lshift(1,n)-1
  allocate(dp(0:u,0:50))
  dp = inf
  dp(0,0) = 0
  do k = 0, u
    do i = 1, 50
      dp(k,i) = min(dp(k,i),dp(k,i-1))
    end do
    x = popcnt(k)
    do i = 0, n-1
      if (btest(k,i)) cycle
      v = merge(b(i),a(i),modulo(x-i,2) == 1)
      j = ibset(k,i)
      dp(j,v) = min(dp(j,v),dp(k,v)+popcnt(rshift(k,i)))
    end do
  end do
  x = minval(dp(u,:))
  write(*,'(i0)') merge(-1,x,x == inf)
end program swap_and_flip
; 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 [18 x i32] zeroinitializer
@_QFEb = internal global [18 x i32] zeroinitializer
@_QFEdp.0 = internal unnamed_addr global ptr null
@_QFEdp.7 = internal unnamed_addr global i64 1
@_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_2609/source.f\00"
@_QQcl.16373402fa3425c6e46827601abb88fa = linkonce constant [76 x i8] c"array left hand side must be allocated when the right hand side is a scalar\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

define void @_QQmain() local_unnamed_addr {
  %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 i32, align 4
  %5 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 6)
  %6 = call i1 @_FortranAioInputInteger(ptr %5, ptr nonnull %4, i32 4)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %5)
  %8 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 7)
  %9 = load i32, ptr %4, align 4, !tbaa !3
  %10 = add i32 %9, -1
  %11 = call i32 @llvm.smax.i32(i32 %10, i32 -1)
  %12 = sext i32 %11 to i64
  %13 = add nsw i64 %12, 1
  store ptr @_QFEa, 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 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 %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 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 %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 %13, 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 4, ptr %.fca.7.0.2.gep, align 8, !tbaa !7
  %14 = call i1 @_FortranAioInputDescriptor(ptr %8, ptr nonnull %3)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %8)
  %16 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 8)
  %17 = load i32, ptr %4, align 4, !tbaa !3
  %18 = add i32 %17, -1
  %19 = call i32 @llvm.smax.i32(i32 %18, i32 -1)
  %20 = sext i32 %19 to i64
  %21 = add nsw i64 %20, 1
  store ptr @_QFEb, ptr %2, align 8, !tbaa !7
  %.fca.1.gep23 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 1
  store i64 4, ptr %.fca.1.gep23, align 8, !tbaa !7
  %.fca.2.gep25 = 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.gep25, align 8, !tbaa !7
  %.fca.3.gep27 = 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.gep27, align 4, !tbaa !7
  %.fca.4.gep29 = getelementptr inbounds { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr %2, i64 0, i32 4
  store i8 9, ptr %.fca.4.gep29, align 1, !tbaa !7
  %.fca.5.gep31 = 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.gep31, align 2, !tbaa !7
  %.fca.6.gep33 = 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.gep33, align 1, !tbaa !7
  %.fca.7.0.0.gep35 = 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.gep35, align 8, !tbaa !7
  %.fca.7.0.1.gep37 = 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 %21, ptr %.fca.7.0.1.gep37, align 8, !tbaa !7
  %.fca.7.0.2.gep39 = 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 4, ptr %.fca.7.0.2.gep39, align 8, !tbaa !7
  %22 = call i1 @_FortranAioInputDescriptor(ptr %16, ptr nonnull %2)
  %23 = call i32 @_FortranAioEndIoStatement(ptr %16)
  %24 = load i32, ptr %4, align 4, !tbaa !3
  %25 = icmp ugt i32 %24, 31
  %notmask = shl nsw i32 -1, %24
  %.op = xor i32 %notmask, -1
  %26 = select i1 %25, i32 -1, i32 %.op
  %27 = sext i32 %26 to i64
  %28 = call i64 @llvm.smax.i64(i64 %27, i64 -1)
  %29 = add nsw i64 %28, 1
  %30 = mul nuw nsw i64 %29, 204
  %31 = call ptr @malloc(i64 %30)
  %32 = icmp slt i32 %26, 0
  %.lobit = lshr i32 %26, 31
  %33 = zext i32 %.lobit to i64
  store ptr %31, ptr @_QFEdp.0, align 8, !tbaa !7
  store i64 %33, ptr @_QFEdp.7, align 8, !tbaa !7
  %.not = icmp eq ptr %31, null
  br i1 %.not, label %51, label %.preheader476

.preheader476:                                    ; preds = %0
  br i1 %32, label %.split.us.thread, label %.preheader475.us.preheader

.preheader475.us.preheader:                       ; preds = %.preheader476
  %34 = add i64 %28, 2
  %smin = call i64 @llvm.smin.i64(i64 %29, i64 1)
  %35 = sub i64 %34, %smin
  %min.iters.check = icmp ult i64 %35, 8
  %n.vec = and i64 %35, -8
  %ind.end = sub i64 %29, %n.vec
  %cmp.n = icmp eq i64 %35, %n.vec
  br label %.preheader475.us

.split.us.thread:                                 ; preds = %.preheader476
  %.neg494498 = sub nsw i64 0, %33
  %36 = getelementptr i32, ptr %31, i64 %.neg494498
  store i32 0, ptr %36, align 4, !tbaa !3
  br label %._crit_edge477

.preheader475.us:                                 ; preds = %.preheader475.us.preheader, %._crit_edge.us
  %37 = phi i64 [ %50, %._crit_edge.us ], [ 0, %.preheader475.us.preheader ]
  %38 = mul nuw nsw i64 %37, %29
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.body

vector.body:                                      ; preds = %.preheader475.us, %vector.body
  %index = phi i64 [ %index.next, %vector.body ], [ 0, %.preheader475.us ]
  %39 = add nuw nsw i64 %index, %38
  %40 = getelementptr i32, ptr %31, i64 %39
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %40, align 4, !tbaa !3
  %41 = getelementptr i32, ptr %40, i64 4
  store <4 x i32> <i32 1000000000, i32 1000000000, i32 1000000000, i32 1000000000>, ptr %41, align 4, !tbaa !3
  %index.next = add nuw i64 %index, 8
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !9

middle.block:                                     ; preds = %vector.body
  br i1 %cmp.n, label %._crit_edge.us, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %.preheader475.us, %middle.block
  %.ph = phi i64 [ %29, %.preheader475.us ], [ %ind.end, %middle.block ]
  %.ph501 = phi i64 [ 0, %.preheader475.us ], [ %n.vec, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %43 = phi i64 [ %48, %scalar.ph ], [ %.ph, %scalar.ph.preheader ]
  %44 = phi i64 [ %45, %scalar.ph ], [ %.ph501, %scalar.ph.preheader ]
  %45 = add nuw nsw i64 %44, 1
  %46 = add nuw nsw i64 %44, %38
  %47 = getelementptr i32, ptr %31, i64 %46
  store i32 1000000000, ptr %47, align 4, !tbaa !3
  %48 = add nsw i64 %43, -1
  %49 = icmp sgt i64 %43, 1
  br i1 %49, label %scalar.ph, label %._crit_edge.us, !llvm.loop !12

._crit_edge.us:                                   ; preds = %scalar.ph, %middle.block
  %50 = add nuw nsw i64 %37, 1
  %exitcond.not = icmp eq i64 %50, 51
  br i1 %exitcond.not, label %.split.us, label %.preheader475.us

51:                                               ; preds = %0
  %52 = call {} @_FortranAReportFatalUserError(ptr nonnull @_QQcl.16373402fa3425c6e46827601abb88fa, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 11)
  %.unpack454.unpack.unpack.pre = load i64, ptr @_QFEdp.7, align 8, !tbaa !7
  %53 = select i1 %32, i64 1, i64 %.unpack454.unpack.unpack.pre
  store ptr %31, ptr @_QFEdp.0, align 8, !tbaa !7
  store i64 %53, ptr @_QFEdp.7, align 8, !tbaa !7
  br label %.split.us

.split.us:                                        ; preds = %._crit_edge.us, %51
  %.unpack388.unpack.unpack = phi i64 [ %53, %51 ], [ %33, %._crit_edge.us ]
  %.neg494 = sub i64 0, %.unpack388.unpack.unpack
  %54 = getelementptr i32, ptr %31, i64 %.neg494
  store i32 0, ptr %54, align 4, !tbaa !3
  %55 = icmp sgt i32 %26, -1
  br i1 %55, label %.preheader.preheader, label %._crit_edge477

.preheader.preheader:                             ; preds = %.split.us
  %56 = load i32, ptr %4, align 4, !tbaa !3
  %57 = add i32 %56, -1
  %58 = icmp sgt i32 %57, -1
  %59 = zext i32 %57 to i64
  %60 = add nuw nsw i64 %59, 1
  br label %.preheader

.preheader:                                       ; preds = %.preheader.preheader, %._crit_edge
  %indvars.iv485 = phi i64 [ 0, %.preheader.preheader ], [ %indvars.iv.next486, %._crit_edge ]
  %61 = sub i64 %indvars.iv485, %.unpack388.unpack.unpack
  br label %62

62:                                               ; preds = %62, %.preheader
  %indvars.iv = phi i64 [ 1, %.preheader ], [ %indvars.iv.next.1, %62 ]
  %63 = mul i64 %indvars.iv, %29
  %64 = add i64 %63, %61
  %65 = getelementptr i32, ptr %31, i64 %64
  %66 = load i32, ptr %65, align 4, !tbaa !3
  %67 = add nsw i64 %indvars.iv, -1
  %68 = mul i64 %67, %29
  %69 = add i64 %68, %61
  %70 = getelementptr i32, ptr %31, i64 %69
  %71 = load i32, ptr %70, align 4, !tbaa !3
  %72 = call i32 @llvm.smin.i32(i32 %66, i32 %71)
  store i32 %72, ptr %65, align 4, !tbaa !3
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %73 = mul i64 %indvars.iv.next, %29
  %74 = add i64 %73, %61
  %75 = getelementptr i32, ptr %31, i64 %74
  %76 = load i32, ptr %75, align 4, !tbaa !3
  %77 = mul i64 %indvars.iv, %29
  %78 = add i64 %77, %61
  %79 = getelementptr i32, ptr %31, i64 %78
  %80 = load i32, ptr %79, align 4, !tbaa !3
  %81 = call i32 @llvm.smin.i32(i32 %76, i32 %80)
  store i32 %81, ptr %75, align 4, !tbaa !3
  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2
  %exitcond481.not.1 = icmp eq i64 %indvars.iv.next.1, 51
  br i1 %exitcond481.not.1, label %82, label %62

82:                                               ; preds = %62
  %83 = trunc i64 %indvars.iv485 to i32
  br i1 %58, label %.lr.ph, label %._crit_edge

.lr.ph:                                           ; preds = %82
  %84 = call i32 @llvm.ctpop.i32(i32 %83), !range !13
  %85 = zext i32 %84 to i64
  br label %86

86:                                               ; preds = %.lr.ph, %122
  %indvars.iv482 = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next483, %122 ]
  %87 = phi i64 [ %60, %.lr.ph ], [ %123, %122 ]
  %88 = trunc i64 %indvars.iv482 to i32
  %89 = shl nuw i32 1, %88
  %90 = and i32 %89, %83
  %.not413 = icmp eq i32 %90, 0
  br i1 %.not413, label %91, label %122

91:                                               ; preds = %86
  %92 = getelementptr [18 x i32], ptr @_QFEb, i64 0, i64 %indvars.iv482
  %93 = load i32, ptr %92, align 4, !tbaa !3
  %94 = getelementptr [18 x i32], ptr @_QFEa, i64 0, i64 %indvars.iv482
  %95 = load i32, ptr %94, align 4, !tbaa !3
  %96 = sub nsw i64 %85, %indvars.iv482
  %97 = trunc i64 %96 to i32
  %98 = srem i32 %97, 2
  %99 = icmp slt i64 %96, 0
  %100 = icmp ne i32 %98, 0
  %101 = and i1 %99, %100
  %102 = add nsw i32 %98, 2
  %103 = select i1 %101, i32 %102, i32 %98
  %104 = icmp eq i32 %103, 1
  %105 = select i1 %104, i32 %93, i32 %95
  %106 = or i32 %89, %83
  %107 = sext i32 %106 to i64
  %108 = sub i64 %107, %.unpack388.unpack.unpack
  %109 = sext i32 %105 to i64
  %110 = mul i64 %29, %109
  %111 = add i64 %108, %110
  %112 = getelementptr i32, ptr %31, i64 %111
  %113 = load i32, ptr %112, align 4, !tbaa !3
  %114 = add i64 %61, %110
  %115 = getelementptr i32, ptr %31, i64 %114
  %116 = load i32, ptr %115, align 4, !tbaa !3
  %117 = icmp eq i64 %indvars.iv482, 32
  %.v = select i1 %117, i32 31, i32 %88
  %118 = ashr i32 %83, %.v
  %119 = call i32 @llvm.ctpop.i32(i32 %118), !range !13
  %120 = add i32 %116, %119
  %121 = call i32 @llvm.smin.i32(i32 %113, i32 %120)
  store i32 %121, ptr %112, align 4, !tbaa !3
  br label %122

122:                                              ; preds = %91, %86
  %indvars.iv.next483 = add nuw nsw i64 %indvars.iv482, 1
  %123 = add nsw i64 %87, -1
  %124 = icmp sgt i64 %87, 1
  br i1 %124, label %86, label %._crit_edge

._crit_edge:                                      ; preds = %122, %82
  %indvars.iv.next486 = add nuw nsw i64 %indvars.iv485, 1
  %exitcond488.not = icmp eq i64 %indvars.iv485, %27
  br i1 %exitcond488.not, label %._crit_edge477, label %.preheader

._crit_edge477:                                   ; preds = %._crit_edge, %.split.us.thread, %.split.us
  %.unpack388.unpack.unpack499 = phi i64 [ %33, %.split.us.thread ], [ %.unpack388.unpack.unpack, %.split.us ], [ %.unpack388.unpack.unpack, %._crit_edge ]
  %125 = shl nuw nsw i64 %29, 2
  %126 = sub i64 %27, %.unpack388.unpack.unpack499
  %127 = getelementptr i32, ptr %31, i64 %126
  store ptr %127, ptr %1, align 8, !tbaa !7
  %.fca.1.gep184 = 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.gep184, align 8, !tbaa !7
  %.fca.2.gep186 = 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.gep186, align 8, !tbaa !7
  %.fca.3.gep188 = 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.gep188, align 4, !tbaa !7
  %.fca.4.gep190 = 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.gep190, align 1, !tbaa !7
  %.fca.5.gep192 = 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.gep192, align 2, !tbaa !7
  %.fca.6.gep194 = 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.gep194, align 1, !tbaa !7
  %.fca.7.0.0.gep196 = 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.gep196, align 8, !tbaa !7
  %.fca.7.0.1.gep198 = 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 51, ptr %.fca.7.0.1.gep198, align 8, !tbaa !7
  %.fca.7.0.2.gep200 = 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 %125, ptr %.fca.7.0.2.gep200, align 8, !tbaa !7
  %128 = call i32 @_FortranAMinvalInteger4(ptr nonnull %1, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 25, i32 0, ptr null)
  %129 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.a9f21cfabd3a0c2512f18bc35a9a5610, i32 26)
  %130 = icmp eq i32 %128, 1000000000
  %131 = select i1 %130, i32 -1, i32 %128
  %132 = call i1 @_FortranAioOutputInteger32(ptr %129, i32 %131)
  %133 = call i32 @_FortranAioEndIoStatement(ptr %129)
  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 {} @_FortranAReportFatalUserError(ptr, ptr, i32) local_unnamed_addr

declare i32 @_FortranAMinvalInteger4(ptr, ptr, i32, i32, 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.ctpop.i32(i32) #1

; 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 speculatable willreturn memory(none)
declare i64 @llvm.smin.i64(i64, i64) #2

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