program main
implicit None
	integer(8),allocatable::a(:),b(:),w(:),g(:),g2(:)
	integer(8)::n,k,i,p,j,c
	
	read*,n,k
	allocate(a(n),b(n))
	
	read*,a
	b = a
	
	c = int(log(real(k))/log(real(2)))+1
	allocate(w(c),g(c))
	
	do j = 1,c
		p = 0
		do i = 1,n
			p = p + mod(a(i),2)
			a(i) = a(i)/2
		enddo
		w(j) = p
	enddo
	
	p = 0
	do j = c,1,-1
		if(w(j) >= n-w(j))then
			g(j) = 0
			else
			g(j) = 1
			p = p + 2**(j-1)
			
			if (p > k)then
				g(j) = 0
				p = p-2**(j-1)
			endif
		endif
	enddo
	
	k = 0
	do i = 1,n
		k = k + xor(p,b(i))
	enddo
	
	print "(i0)",k
	
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"

@_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.7 = internal unnamed_addr global i64 1
@_QFEb.8 = internal unnamed_addr global i64 0
@_QFEg = internal unnamed_addr global { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } { ptr null, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64), i32 20180515, i8 1, i8 10, i8 2, i8 0, [1 x [3 x i64]] [[3 x i64] [i64 1, i64 0, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64)]] }
@_QFEw = internal unnamed_addr global { ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] } { ptr null, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64), i32 20180515, i8 1, i8 10, i8 2, i8 0, [1 x [3 x i64]] [[3 x i64] [i64 1, i64 0, i64 ptrtoint (ptr getelementptr (i64, ptr null, i32 1) to i64)]] }
@_QQcl.3c5711550ffea6f6e598633c6a463ec2 = linkonce constant [73 x i8] c"/home/ubuntu/Downloads/TheStack_IR/Collated/Fortran/Source_5031/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 i64, align 8
  %3 = alloca i64, align 8
  %4 = tail call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.3c5711550ffea6f6e598633c6a463ec2, i32 6)
  %5 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %3, i32 8)
  %6 = call i1 @_FortranAioInputInteger(ptr %4, ptr nonnull %2, i32 8)
  %7 = call i32 @_FortranAioEndIoStatement(ptr %4)
  %8 = load i64, ptr %3, align 8, !tbaa !3
  %9 = call i64 @llvm.smax.i64(i64 %8, i64 0)
  %10 = shl i64 %9, 3
  %11 = call ptr @malloc(i64 %10)
  store ptr %11, ptr @_QFEa.0, align 8, !tbaa !7
  store i64 %9, ptr @_QFEa.8, align 8, !tbaa !7
  %12 = call ptr @malloc(i64 %10)
  store ptr %12, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb.7, align 8, !tbaa !7
  store i64 %9, ptr @_QFEb.8, align 8, !tbaa !7
  %13 = call ptr @_FortranAioBeginExternalListInput(i32 -1, ptr nonnull @_QQcl.3c5711550ffea6f6e598633c6a463ec2, i32 9)
  %.unpack = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack584.unpack.unpack586 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  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 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 %.unpack584.unpack.unpack586, 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
  %14 = call i1 @_FortranAioInputDescriptor(ptr %13, ptr nonnull %1)
  %15 = call i32 @_FortranAioEndIoStatement(ptr %13)
  %.unpack589 = load ptr, ptr @_QFEa.0, align 8, !tbaa !7
  %.unpack589780 = ptrtoint ptr %.unpack589 to i64
  %.unpack596.unpack.unpack598 = load i64, ptr @_QFEa.8, align 8, !tbaa !7
  %.unpack601 = load ptr, ptr @_QFEb.0, align 8, !tbaa !7
  %.unpack601783 = ptrtoint ptr %.unpack601 to i64
  %.not = icmp eq ptr %.unpack601, null
  br i1 %.not, label %85, label %16

16:                                               ; preds = %0
  %.unpack608.unpack.unpack610 = load i64, ptr @_QFEb.8, align 8, !tbaa !7
  %.not736 = icmp eq i64 %.unpack608.unpack.unpack610, %.unpack596.unpack.unpack598
  br i1 %.not736, label %.preheader737, label %32

.preheader737:                                    ; preds = %16
  %17 = icmp sgt i64 %.unpack596.unpack.unpack598, 0
  br i1 %17, label %.lr.ph739.preheader, label %._crit_edge

.lr.ph739.preheader:                              ; preds = %.preheader737
  %min.iters.check787 = icmp ult i64 %.unpack596.unpack.unpack598, 6
  %18 = sub i64 %.unpack601783, %.unpack589780
  %diff.check784 = icmp ult i64 %18, 32
  %or.cond = select i1 %min.iters.check787, i1 true, i1 %diff.check784
  br i1 %or.cond, label %.lr.ph739.preheader863, label %vector.ph788

vector.ph788:                                     ; preds = %.lr.ph739.preheader
  %n.vec790 = and i64 %.unpack596.unpack.unpack598, -4
  br label %vector.body793

vector.body793:                                   ; preds = %vector.body793, %vector.ph788
  %index794 = phi i64 [ 0, %vector.ph788 ], [ %index.next797, %vector.body793 ]
  %19 = getelementptr i64, ptr %.unpack589, i64 %index794
  %wide.load795 = load <2 x i64>, ptr %19, align 8, !tbaa !3
  %20 = getelementptr i64, ptr %19, i64 2
  %wide.load796 = load <2 x i64>, ptr %20, align 8, !tbaa !3
  %21 = getelementptr i64, ptr %.unpack601, i64 %index794
  store <2 x i64> %wide.load795, ptr %21, align 8, !tbaa !3
  %22 = getelementptr i64, ptr %21, i64 2
  store <2 x i64> %wide.load796, ptr %22, align 8, !tbaa !3
  %index.next797 = add nuw i64 %index794, 4
  %23 = icmp eq i64 %index.next797, %n.vec790
  br i1 %23, label %middle.block785, label %vector.body793, !llvm.loop !9

middle.block785:                                  ; preds = %vector.body793
  %cmp.n792 = icmp eq i64 %.unpack596.unpack.unpack598, %n.vec790
  br i1 %cmp.n792, label %._crit_edge, label %.lr.ph739.preheader863

.lr.ph739.preheader863:                           ; preds = %.lr.ph739.preheader, %middle.block785
  %.ph864 = phi i64 [ 0, %.lr.ph739.preheader ], [ %n.vec790, %middle.block785 ]
  %24 = xor i64 %.ph864, -1
  %25 = add i64 %.unpack596.unpack.unpack598, %24
  %xtraiter868 = and i64 %.unpack596.unpack.unpack598, 3
  %lcmp.mod869.not = icmp eq i64 %xtraiter868, 0
  br i1 %lcmp.mod869.not, label %.lr.ph739.prol.loopexit, label %.lr.ph739.prol

.lr.ph739.prol:                                   ; preds = %.lr.ph739.preheader863, %.lr.ph739.prol
  %26 = phi i64 [ %29, %.lr.ph739.prol ], [ %.ph864, %.lr.ph739.preheader863 ]
  %prol.iter870 = phi i64 [ %prol.iter870.next, %.lr.ph739.prol ], [ 0, %.lr.ph739.preheader863 ]
  %27 = getelementptr i64, ptr %.unpack589, i64 %26
  %28 = load i64, ptr %27, align 8, !tbaa !3
  %29 = add nuw nsw i64 %26, 1
  %30 = getelementptr i64, ptr %.unpack601, i64 %26
  store i64 %28, ptr %30, align 8, !tbaa !3
  %prol.iter870.next = add i64 %prol.iter870, 1
  %prol.iter870.cmp.not = icmp eq i64 %prol.iter870.next, %xtraiter868
  br i1 %prol.iter870.cmp.not, label %.lr.ph739.prol.loopexit, label %.lr.ph739.prol, !llvm.loop !12

.lr.ph739.prol.loopexit:                          ; preds = %.lr.ph739.prol, %.lr.ph739.preheader863
  %.unr871 = phi i64 [ %.ph864, %.lr.ph739.preheader863 ], [ %29, %.lr.ph739.prol ]
  %31 = icmp ult i64 %25, 3
  br i1 %31, label %._crit_edge, label %.lr.ph739

32:                                               ; preds = %16
  %33 = shl i64 %.unpack596.unpack.unpack598, 3
  %34 = call ptr @malloc(i64 %33)
  %35 = icmp sgt i64 %.unpack596.unpack.unpack598, 0
  br i1 %35, label %.lr.ph.preheader, label %.thread733

.lr.ph.preheader:                                 ; preds = %32
  %36 = ptrtoint ptr %34 to i64
  %min.iters.check = icmp ult i64 %.unpack596.unpack.unpack598, 6
  %37 = sub i64 %36, %.unpack589780
  %diff.check = icmp ult i64 %37, 32
  %or.cond851 = select i1 %min.iters.check, i1 true, i1 %diff.check
  br i1 %or.cond851, label %.lr.ph.preheader865, label %vector.ph

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

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %38 = getelementptr i64, ptr %.unpack589, i64 %index
  %wide.load = load <2 x i64>, ptr %38, align 8, !tbaa !3
  %39 = getelementptr i64, ptr %38, i64 2
  %wide.load781 = load <2 x i64>, ptr %39, align 8, !tbaa !3
  %40 = getelementptr i64, ptr %34, i64 %index
  store <2 x i64> %wide.load, ptr %40, align 8, !tbaa !3
  %41 = getelementptr i64, ptr %40, i64 2
  store <2 x i64> %wide.load781, ptr %41, align 8, !tbaa !3
  %index.next = add nuw i64 %index, 4
  %42 = icmp eq i64 %index.next, %n.vec
  br i1 %42, label %middle.block, label %vector.body, !llvm.loop !14

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %.unpack596.unpack.unpack598, %n.vec
  br i1 %cmp.n, label %.loopexit, label %.lr.ph.preheader865

.lr.ph.preheader865:                              ; preds = %.lr.ph.preheader, %middle.block
  %.ph866 = phi i64 [ 0, %.lr.ph.preheader ], [ %n.vec, %middle.block ]
  %43 = xor i64 %.ph866, -1
  %44 = add i64 %.unpack596.unpack.unpack598, %43
  %xtraiter = and i64 %.unpack596.unpack.unpack598, 3
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.lr.ph.prol.loopexit, label %.lr.ph.prol

.lr.ph.prol:                                      ; preds = %.lr.ph.preheader865, %.lr.ph.prol
  %45 = phi i64 [ %48, %.lr.ph.prol ], [ %.ph866, %.lr.ph.preheader865 ]
  %prol.iter = phi i64 [ %prol.iter.next, %.lr.ph.prol ], [ 0, %.lr.ph.preheader865 ]
  %46 = getelementptr i64, ptr %.unpack589, i64 %45
  %47 = load i64, ptr %46, align 8, !tbaa !3
  %48 = add nuw nsw i64 %45, 1
  %49 = getelementptr i64, ptr %34, i64 %45
  store i64 %47, ptr %49, align 8, !tbaa !3
  %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.ph.prol.loopexit, label %.lr.ph.prol, !llvm.loop !15

.lr.ph.prol.loopexit:                             ; preds = %.lr.ph.prol, %.lr.ph.preheader865
  %.unr = phi i64 [ %.ph866, %.lr.ph.preheader865 ], [ %48, %.lr.ph.prol ]
  %50 = icmp ult i64 %44, 3
  br i1 %50, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.prol.loopexit, %.lr.ph
  %51 = phi i64 [ %66, %.lr.ph ], [ %.unr, %.lr.ph.prol.loopexit ]
  %52 = getelementptr i64, ptr %.unpack589, i64 %51
  %53 = load i64, ptr %52, align 8, !tbaa !3
  %54 = add nuw nsw i64 %51, 1
  %55 = getelementptr i64, ptr %34, i64 %51
  store i64 %53, ptr %55, align 8, !tbaa !3
  %56 = getelementptr i64, ptr %.unpack589, i64 %54
  %57 = load i64, ptr %56, align 8, !tbaa !3
  %58 = add nuw nsw i64 %51, 2
  %59 = getelementptr i64, ptr %34, i64 %54
  store i64 %57, ptr %59, align 8, !tbaa !3
  %60 = getelementptr i64, ptr %.unpack589, i64 %58
  %61 = load i64, ptr %60, align 8, !tbaa !3
  %62 = add nuw nsw i64 %51, 3
  %63 = getelementptr i64, ptr %34, i64 %58
  store i64 %61, ptr %63, align 8, !tbaa !3
  %64 = getelementptr i64, ptr %.unpack589, i64 %62
  %65 = load i64, ptr %64, align 8, !tbaa !3
  %66 = add nuw nsw i64 %51, 4
  %67 = getelementptr i64, ptr %34, i64 %62
  store i64 %65, ptr %67, align 8, !tbaa !3
  %exitcond.not.3 = icmp eq i64 %66, %.unpack596.unpack.unpack598
  br i1 %exitcond.not.3, label %.loopexit, label %.lr.ph, !llvm.loop !16

.lr.ph739:                                        ; preds = %.lr.ph739.prol.loopexit, %.lr.ph739
  %68 = phi i64 [ %83, %.lr.ph739 ], [ %.unr871, %.lr.ph739.prol.loopexit ]
  %69 = getelementptr i64, ptr %.unpack589, i64 %68
  %70 = load i64, ptr %69, align 8, !tbaa !3
  %71 = add nuw nsw i64 %68, 1
  %72 = getelementptr i64, ptr %.unpack601, i64 %68
  store i64 %70, ptr %72, align 8, !tbaa !3
  %73 = getelementptr i64, ptr %.unpack589, i64 %71
  %74 = load i64, ptr %73, align 8, !tbaa !3
  %75 = add nuw nsw i64 %68, 2
  %76 = getelementptr i64, ptr %.unpack601, i64 %71
  store i64 %74, ptr %76, align 8, !tbaa !3
  %77 = getelementptr i64, ptr %.unpack589, i64 %75
  %78 = load i64, ptr %77, align 8, !tbaa !3
  %79 = add nuw nsw i64 %68, 3
  %80 = getelementptr i64, ptr %.unpack601, i64 %75
  store i64 %78, ptr %80, align 8, !tbaa !3
  %81 = getelementptr i64, ptr %.unpack589, i64 %79
  %82 = load i64, ptr %81, align 8, !tbaa !3
  %83 = add nuw nsw i64 %68, 4
  %84 = getelementptr i64, ptr %.unpack601, i64 %79
  store i64 %82, ptr %84, align 8, !tbaa !3
  %exitcond757.not.3 = icmp eq i64 %83, %.unpack596.unpack.unpack598
  br i1 %exitcond757.not.3, label %._crit_edge, label %.lr.ph739, !llvm.loop !17

85:                                               ; preds = %0
  %86 = shl i64 %.unpack596.unpack.unpack598, 3
  %87 = call ptr @malloc(i64 %86)
  %88 = icmp sgt i64 %.unpack596.unpack.unpack598, 0
  br i1 %88, label %.lr.ph741.preheader, label %.loopexit.thread

.lr.ph741.preheader:                              ; preds = %85
  %89 = ptrtoint ptr %87 to i64
  %min.iters.check802 = icmp ult i64 %.unpack596.unpack.unpack598, 6
  %90 = sub i64 %89, %.unpack589780
  %diff.check799 = icmp ult i64 %90, 32
  %or.cond852 = select i1 %min.iters.check802, i1 true, i1 %diff.check799
  br i1 %or.cond852, label %.lr.ph741.preheader861, label %vector.ph803

vector.ph803:                                     ; preds = %.lr.ph741.preheader
  %n.vec805 = and i64 %.unpack596.unpack.unpack598, -4
  br label %vector.body808

vector.body808:                                   ; preds = %vector.body808, %vector.ph803
  %index809 = phi i64 [ 0, %vector.ph803 ], [ %index.next812, %vector.body808 ]
  %91 = getelementptr i64, ptr %.unpack589, i64 %index809
  %wide.load810 = load <2 x i64>, ptr %91, align 8, !tbaa !3
  %92 = getelementptr i64, ptr %91, i64 2
  %wide.load811 = load <2 x i64>, ptr %92, align 8, !tbaa !3
  %93 = getelementptr i64, ptr %87, i64 %index809
  store <2 x i64> %wide.load810, ptr %93, align 8, !tbaa !3
  %94 = getelementptr i64, ptr %93, i64 2
  store <2 x i64> %wide.load811, ptr %94, align 8, !tbaa !3
  %index.next812 = add nuw i64 %index809, 4
  %95 = icmp eq i64 %index.next812, %n.vec805
  br i1 %95, label %middle.block800, label %vector.body808, !llvm.loop !18

middle.block800:                                  ; preds = %vector.body808
  %cmp.n807 = icmp eq i64 %.unpack596.unpack.unpack598, %n.vec805
  br i1 %cmp.n807, label %.loopexit, label %.lr.ph741.preheader861

.lr.ph741.preheader861:                           ; preds = %.lr.ph741.preheader, %middle.block800
  %.ph862 = phi i64 [ 0, %.lr.ph741.preheader ], [ %n.vec805, %middle.block800 ]
  %96 = xor i64 %.ph862, -1
  %97 = add i64 %.unpack596.unpack.unpack598, %96
  %xtraiter872 = and i64 %.unpack596.unpack.unpack598, 3
  %lcmp.mod873.not = icmp eq i64 %xtraiter872, 0
  br i1 %lcmp.mod873.not, label %.lr.ph741.prol.loopexit, label %.lr.ph741.prol

.lr.ph741.prol:                                   ; preds = %.lr.ph741.preheader861, %.lr.ph741.prol
  %98 = phi i64 [ %101, %.lr.ph741.prol ], [ %.ph862, %.lr.ph741.preheader861 ]
  %prol.iter874 = phi i64 [ %prol.iter874.next, %.lr.ph741.prol ], [ 0, %.lr.ph741.preheader861 ]
  %99 = getelementptr i64, ptr %.unpack589, i64 %98
  %100 = load i64, ptr %99, align 8, !tbaa !3
  %101 = add nuw nsw i64 %98, 1
  %102 = getelementptr i64, ptr %87, i64 %98
  store i64 %100, ptr %102, align 8, !tbaa !3
  %prol.iter874.next = add i64 %prol.iter874, 1
  %prol.iter874.cmp.not = icmp eq i64 %prol.iter874.next, %xtraiter872
  br i1 %prol.iter874.cmp.not, label %.lr.ph741.prol.loopexit, label %.lr.ph741.prol, !llvm.loop !19

.lr.ph741.prol.loopexit:                          ; preds = %.lr.ph741.prol, %.lr.ph741.preheader861
  %.unr875 = phi i64 [ %.ph862, %.lr.ph741.preheader861 ], [ %101, %.lr.ph741.prol ]
  %103 = icmp ult i64 %97, 3
  br i1 %103, label %.loopexit, label %.lr.ph741

.lr.ph741:                                        ; preds = %.lr.ph741.prol.loopexit, %.lr.ph741
  %104 = phi i64 [ %119, %.lr.ph741 ], [ %.unr875, %.lr.ph741.prol.loopexit ]
  %105 = getelementptr i64, ptr %.unpack589, i64 %104
  %106 = load i64, ptr %105, align 8, !tbaa !3
  %107 = add nuw nsw i64 %104, 1
  %108 = getelementptr i64, ptr %87, i64 %104
  store i64 %106, ptr %108, align 8, !tbaa !3
  %109 = getelementptr i64, ptr %.unpack589, i64 %107
  %110 = load i64, ptr %109, align 8, !tbaa !3
  %111 = add nuw nsw i64 %104, 2
  %112 = getelementptr i64, ptr %87, i64 %107
  store i64 %110, ptr %112, align 8, !tbaa !3
  %113 = getelementptr i64, ptr %.unpack589, i64 %111
  %114 = load i64, ptr %113, align 8, !tbaa !3
  %115 = add nuw nsw i64 %104, 3
  %116 = getelementptr i64, ptr %87, i64 %111
  store i64 %114, ptr %116, align 8, !tbaa !3
  %117 = getelementptr i64, ptr %.unpack589, i64 %115
  %118 = load i64, ptr %117, align 8, !tbaa !3
  %119 = add nuw nsw i64 %104, 4
  %120 = getelementptr i64, ptr %87, i64 %115
  store i64 %118, ptr %120, align 8, !tbaa !3
  %exitcond758.not.3 = icmp eq i64 %119, %.unpack596.unpack.unpack598
  br i1 %exitcond758.not.3, label %.loopexit, label %.lr.ph741, !llvm.loop !20

.loopexit:                                        ; preds = %.lr.ph.prol.loopexit, %.lr.ph, %.lr.ph741.prol.loopexit, %.lr.ph741, %middle.block, %middle.block800
  %.ph = phi ptr [ %87, %middle.block800 ], [ %34, %middle.block ], [ %87, %.lr.ph741 ], [ %87, %.lr.ph741.prol.loopexit ], [ %34, %.lr.ph ], [ %34, %.lr.ph.prol.loopexit ]
  br i1 %.not, label %.loopexit.thread, label %.thread733

.thread733:                                       ; preds = %32, %.loopexit
  %.ph766 = phi ptr [ %.ph, %.loopexit ], [ %34, %32 ]
  call void @free(ptr nonnull %.unpack601)
  br label %.loopexit.thread

.loopexit.thread:                                 ; preds = %85, %.thread733, %.loopexit
  %.ph763 = phi ptr [ %.ph766, %.thread733 ], [ %.ph, %.loopexit ], [ %87, %85 ]
  store ptr %.ph763, ptr @_QFEb.0, align 8, !tbaa !7
  store i64 1, ptr @_QFEb.7, align 8, !tbaa !7
  store i64 %.unpack596.unpack.unpack598, ptr @_QFEb.8, align 8, !tbaa !7
  br label %._crit_edge

._crit_edge:                                      ; preds = %.lr.ph739.prol.loopexit, %.lr.ph739, %middle.block785, %.preheader737, %.loopexit.thread
  %.unpack631 = phi ptr [ %.ph763, %.loopexit.thread ], [ %.unpack601, %.preheader737 ], [ %.unpack601, %middle.block785 ], [ %.unpack601, %.lr.ph739 ], [ %.unpack601, %.lr.ph739.prol.loopexit ]
  %121 = load i64, ptr %2, align 8, !tbaa !3
  %122 = sitofp i64 %121 to float
  %123 = call contract float @llvm.log.f32(float %122)
  %124 = fdiv contract float %123, 0x3FE62E4300000000
  %125 = fptosi float %124 to i32
  %126 = add i32 %125, 1
  %127 = sext i32 %126 to i64
  %128 = call i64 @llvm.smax.i64(i64 %127, i64 0)
  %129 = shl nuw nsw i64 %128, 3
  %130 = call ptr @malloc(i64 %129)
  store ptr %130, ptr @_QFEw, align 16, !tbaa !7
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 1), align 8, !tbaa !7
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 2), align 16, !tbaa !7
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 3), align 4, !tbaa !7
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 4), align 1, !tbaa !7
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 5), align 2, !tbaa !7
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 6), align 1, !tbaa !7
  store i64 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 7), align 8, !tbaa !7
  store i64 %128, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !7
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEw, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !7
  %131 = call ptr @malloc(i64 %129)
  store ptr %131, ptr @_QFEg, align 16, !tbaa !7
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 1), align 8, !tbaa !7
  store i32 20180515, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 2), align 16, !tbaa !7
  store i8 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 3), align 4, !tbaa !7
  store i8 10, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 4), align 1, !tbaa !7
  store i8 2, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 5), align 2, !tbaa !7
  store i8 0, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 6), align 1, !tbaa !7
  store i64 1, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 7), align 8, !tbaa !7
  store i64 %128, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 7, i64 0, i64 1), align 16, !tbaa !7
  store i64 8, ptr getelementptr inbounds ({ ptr, i64, i32, i8, i8, i8, i8, [1 x [3 x i64]] }, ptr @_QFEg, i64 0, i32 7, i64 0, i64 2), align 8, !tbaa !7
  %132 = icmp ult i32 %125, 2147483647
  br i1 %132, label %.lr.ph747, label %.preheader.._crit_edge750_crit_edge

.lr.ph747:                                        ; preds = %._crit_edge
  %133 = load i64, ptr %3, align 8, !tbaa !3
  %134 = icmp sgt i64 %133, 0
  br i1 %134, label %.lr.ph747.split, label %.preheader.thread

.preheader.thread:                                ; preds = %.lr.ph747
  %135 = shl nsw i64 %127, 3
  %136 = call i64 @llvm.smin.i64(i64 %127, i64 1)
  %smin = shl nsw i64 %136, 3
  %137 = add i64 %smin, -8
  %138 = sub i64 %135, %137
  call void @llvm.memset.p0.i64(ptr align 8 %130, i8 0, i64 %138, i1 false), !tbaa !3
  br label %.lr.ph749

.preheader:                                       ; preds = %._crit_edge745
  br i1 %132, label %.lr.ph749, label %.preheader.._crit_edge750_crit_edge

.preheader.._crit_edge750_crit_edge:              ; preds = %._crit_edge, %.preheader
  %.pre = load i64, ptr %3, align 8, !tbaa !3
  br label %._crit_edge750

.lr.ph749:                                        ; preds = %.preheader.thread, %.preheader
  %139 = load i64, ptr %3, align 8, !tbaa !3
  %140 = load i64, ptr %2, align 8
  br label %168

.lr.ph747.splitthread-pre-split:                  ; preds = %._crit_edge745
  %141 = add nsw i64 %144, -1
  %142 = add nuw nsw i64 %145, 1
  %.pr = load i64, ptr %3, align 8, !tbaa !3
  br label %.lr.ph747.split

.lr.ph747.split:                                  ; preds = %.lr.ph747, %.lr.ph747.splitthread-pre-split
  %143 = phi i64 [ %.pr, %.lr.ph747.splitthread-pre-split ], [ %133, %.lr.ph747 ]
  %144 = phi i64 [ %141, %.lr.ph747.splitthread-pre-split ], [ %127, %.lr.ph747 ]
  %145 = phi i64 [ %142, %.lr.ph747.splitthread-pre-split ], [ 1, %.lr.ph747 ]
  %146 = icmp sgt i64 %143, 0
  br i1 %146, label %.lr.ph744.preheader, label %._crit_edge745

.lr.ph744.preheader:                              ; preds = %.lr.ph747.split
  %min.iters.check815 = icmp ult i64 %143, 4
  br i1 %min.iters.check815, label %.lr.ph744.preheader856, label %vector.ph816

vector.ph816:                                     ; preds = %.lr.ph744.preheader
  %n.vec818 = and i64 %143, -4
  %ind.end = or i64 %n.vec818, 1
  br label %vector.body821

vector.body821:                                   ; preds = %vector.body821, %vector.ph816
  %index822 = phi i64 [ 0, %vector.ph816 ], [ %index.next826, %vector.body821 ]
  %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph816 ], [ %153, %vector.body821 ]
  %vec.phi823 = phi <2 x i64> [ zeroinitializer, %vector.ph816 ], [ %154, %vector.body821 ]
  %147 = getelementptr i64, ptr %.unpack589, i64 %index822
  %wide.load824 = load <2 x i64>, ptr %147, align 8, !tbaa !3
  %148 = getelementptr i64, ptr %147, i64 2
  %wide.load825 = load <2 x i64>, ptr %148, align 8, !tbaa !3
  %wide.load824.frozen = freeze <2 x i64> %wide.load824
  %149 = sdiv <2 x i64> %wide.load824.frozen, <i64 2, i64 2>
  %150 = mul <2 x i64> %149, <i64 2, i64 2>
  %.decomposed = sub <2 x i64> %wide.load824.frozen, %150
  %wide.load825.frozen = freeze <2 x i64> %wide.load825
  %151 = sdiv <2 x i64> %wide.load825.frozen, <i64 2, i64 2>
  %152 = mul <2 x i64> %151, <i64 2, i64 2>
  %.decomposed890 = sub <2 x i64> %wide.load825.frozen, %152
  %153 = add <2 x i64> %.decomposed, %vec.phi
  %154 = add <2 x i64> %.decomposed890, %vec.phi823
  store <2 x i64> %149, ptr %147, align 8, !tbaa !3
  store <2 x i64> %151, ptr %148, align 8, !tbaa !3
  %index.next826 = add nuw i64 %index822, 4
  %155 = icmp eq i64 %index.next826, %n.vec818
  br i1 %155, label %middle.block813, label %vector.body821, !llvm.loop !21

middle.block813:                                  ; preds = %vector.body821
  %bin.rdx = add <2 x i64> %154, %153
  %156 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx)
  %cmp.n820 = icmp eq i64 %143, %n.vec818
  br i1 %cmp.n820, label %._crit_edge745, label %.lr.ph744.preheader856

.lr.ph744.preheader856:                           ; preds = %.lr.ph744.preheader, %middle.block813
  %.ph857 = phi i64 [ 1, %.lr.ph744.preheader ], [ %ind.end, %middle.block813 ]
  %.0742.ph = phi i64 [ 0, %.lr.ph744.preheader ], [ %156, %middle.block813 ]
  br label %.lr.ph744

.lr.ph744:                                        ; preds = %.lr.ph744.preheader856, %.lr.ph744
  %157 = phi i64 [ %164, %.lr.ph744 ], [ %.ph857, %.lr.ph744.preheader856 ]
  %.0742 = phi i64 [ %162, %.lr.ph744 ], [ %.0742.ph, %.lr.ph744.preheader856 ]
  %158 = add i64 %157, -1
  %159 = getelementptr i64, ptr %.unpack589, i64 %158
  %160 = load i64, ptr %159, align 8, !tbaa !3
  %161 = srem i64 %160, 2
  %162 = add i64 %161, %.0742
  %163 = sdiv i64 %160, 2
  store i64 %163, ptr %159, align 8, !tbaa !3
  %164 = add nuw i64 %157, 1
  %exitcond759.not = icmp eq i64 %157, %143
  br i1 %exitcond759.not, label %._crit_edge745, label %.lr.ph744, !llvm.loop !22

._crit_edge745:                                   ; preds = %.lr.ph744, %middle.block813, %.lr.ph747.split
  %.0.lcssa = phi i64 [ 0, %.lr.ph747.split ], [ %156, %middle.block813 ], [ %162, %.lr.ph744 ]
  %165 = add nsw i64 %145, -1
  %166 = getelementptr i64, ptr %130, i64 %165
  store i64 %.0.lcssa, ptr %166, align 8, !tbaa !3
  %167 = icmp sgt i64 %144, 1
  br i1 %167, label %.lr.ph747.splitthread-pre-split, label %.preheader, !llvm.loop !23

168:                                              ; preds = %.lr.ph749, %210
  %169 = phi i64 [ %127, %.lr.ph749 ], [ %170, %210 ]
  %.1748 = phi i64 [ 0, %.lr.ph749 ], [ %.2, %210 ]
  %170 = add nsw i64 %169, -1
  %171 = getelementptr i64, ptr %130, i64 %170
  %172 = load i64, ptr %171, align 8, !tbaa !3
  %173 = sub i64 %139, %172
  %.not655 = icmp slt i64 %172, %173
  %174 = getelementptr i64, ptr %131, i64 %170
  br i1 %.not655, label %176, label %175

175:                                              ; preds = %168
  store i64 0, ptr %174, align 8, !tbaa !3
  br label %210

176:                                              ; preds = %168
  store i64 1, ptr %174, align 8, !tbaa !3
  %177 = icmp eq i64 %170, 0
  br i1 %177, label %__mlir_math_ipowi_i64.exit.thread, label %178

178:                                              ; preds = %176
  %179 = icmp slt i64 %169, 2
  br i1 %179, label %__mlir_math_ipowi_i64.exit.thread770, label %.preheader.i

.preheader.i:                                     ; preds = %178
  %180 = and i64 %170, 1
  %.not3.i = icmp eq i64 %180, 0
  %181 = select i1 %.not3.i, i64 1, i64 2
  %182 = icmp eq i64 %170, 1
  br i1 %182, label %__mlir_math_ipowi_i64.exit.thread768, label %.lr.ph.i

.lr.ph.i:                                         ; preds = %.preheader.i, %.lr.ph.i
  %spec.select4.i = phi i64 [ %spec.select.i, %.lr.ph.i ], [ %181, %.preheader.i ]
  %183 = phi i64 [ %185, %.lr.ph.i ], [ %170, %.preheader.i ]
  %184 = phi i64 [ %186, %.lr.ph.i ], [ 2, %.preheader.i ]
  %185 = lshr i64 %183, 1
  %186 = mul i64 %184, %184
  %187 = and i64 %183, 2
  %.not.i = icmp eq i64 %187, 0
  %188 = select i1 %.not.i, i64 1, i64 %186
  %spec.select.i = mul i64 %188, %spec.select4.i
  %189 = icmp ult i64 %183, 4
  br i1 %189, label %__mlir_math_ipowi_i64.exit, label %.lr.ph.i

__mlir_math_ipowi_i64.exit:                       ; preds = %.lr.ph.i
  %190 = add i64 %spec.select.i, %.1748
  %191 = icmp sgt i64 %190, %140
  br i1 %191, label %197, label %210

__mlir_math_ipowi_i64.exit.thread770:             ; preds = %178
  %192 = icmp sgt i64 %.1748, %140
  br i1 %192, label %__mlir_math_ipowi_i64.exit732.sink.split, label %._crit_edge750

__mlir_math_ipowi_i64.exit.thread768:             ; preds = %.preheader.i
  %193 = add i64 %181, %.1748
  %194 = icmp sgt i64 %193, %140
  br i1 %194, label %__mlir_math_ipowi_i64.exit732.sink.split, label %210

__mlir_math_ipowi_i64.exit.thread:                ; preds = %176
  %195 = add i64 %.1748, 1
  %196 = icmp sgt i64 %195, %140
  br i1 %196, label %__mlir_math_ipowi_i64.exit732.sink.split, label %._crit_edge750

197:                                              ; preds = %__mlir_math_ipowi_i64.exit
  store i64 0, ptr %174, align 8, !tbaa !3
  br i1 %179, label %__mlir_math_ipowi_i64.exit732, label %.preheader.i727

.preheader.i727:                                  ; preds = %197
  %198 = and i64 %170, 1
  %.not3.i726 = icmp eq i64 %198, 0
  %199 = select i1 %.not3.i726, i64 1, i64 2
  %200 = icmp eq i64 %170, 1
  br i1 %200, label %__mlir_math_ipowi_i64.exit732, label %.lr.ph.i731

.lr.ph.i731:                                      ; preds = %.preheader.i727, %.lr.ph.i731
  %spec.select4.i728 = phi i64 [ %spec.select.i730, %.lr.ph.i731 ], [ %199, %.preheader.i727 ]
  %201 = phi i64 [ %203, %.lr.ph.i731 ], [ %170, %.preheader.i727 ]
  %202 = phi i64 [ %204, %.lr.ph.i731 ], [ 2, %.preheader.i727 ]
  %203 = lshr i64 %201, 1
  %204 = mul i64 %202, %202
  %205 = and i64 %201, 2
  %.not.i729 = icmp eq i64 %205, 0
  %206 = select i1 %.not.i729, i64 1, i64 %204
  %spec.select.i730 = mul i64 %206, %spec.select4.i728
  %207 = icmp ult i64 %201, 4
  br i1 %207, label %__mlir_math_ipowi_i64.exit732, label %.lr.ph.i731

__mlir_math_ipowi_i64.exit732.sink.split:         ; preds = %__mlir_math_ipowi_i64.exit.thread, %__mlir_math_ipowi_i64.exit.thread768, %__mlir_math_ipowi_i64.exit.thread770
  %.ph778 = phi i64 [ %.1748, %__mlir_math_ipowi_i64.exit.thread770 ], [ %193, %__mlir_math_ipowi_i64.exit.thread768 ], [ %195, %__mlir_math_ipowi_i64.exit.thread ]
  %common.ret.op.i725.ph = phi i64 [ 0, %__mlir_math_ipowi_i64.exit.thread770 ], [ 2, %__mlir_math_ipowi_i64.exit.thread768 ], [ 1, %__mlir_math_ipowi_i64.exit.thread ]
  store i64 0, ptr %174, align 8, !tbaa !3
  br label %__mlir_math_ipowi_i64.exit732

__mlir_math_ipowi_i64.exit732:                    ; preds = %.lr.ph.i731, %__mlir_math_ipowi_i64.exit732.sink.split, %197, %.preheader.i727
  %208 = phi i64 [ %190, %.preheader.i727 ], [ %190, %197 ], [ %.ph778, %__mlir_math_ipowi_i64.exit732.sink.split ], [ %190, %.lr.ph.i731 ]
  %common.ret.op.i725 = phi i64 [ %199, %.preheader.i727 ], [ 0, %197 ], [ %common.ret.op.i725.ph, %__mlir_math_ipowi_i64.exit732.sink.split ], [ %spec.select.i730, %.lr.ph.i731 ]
  %209 = sub i64 %208, %common.ret.op.i725
  br label %210

210:                                              ; preds = %__mlir_math_ipowi_i64.exit.thread768, %175, %__mlir_math_ipowi_i64.exit732, %__mlir_math_ipowi_i64.exit
  %.2 = phi i64 [ %.1748, %175 ], [ %209, %__mlir_math_ipowi_i64.exit732 ], [ %190, %__mlir_math_ipowi_i64.exit ], [ %193, %__mlir_math_ipowi_i64.exit.thread768 ]
  %211 = icmp sgt i64 %169, 1
  br i1 %211, label %168, label %._crit_edge750

._crit_edge750:                                   ; preds = %__mlir_math_ipowi_i64.exit.thread, %__mlir_math_ipowi_i64.exit.thread770, %210, %.preheader.._crit_edge750_crit_edge
  %212 = phi i64 [ %.pre, %.preheader.._crit_edge750_crit_edge ], [ %139, %210 ], [ %139, %__mlir_math_ipowi_i64.exit.thread770 ], [ %139, %__mlir_math_ipowi_i64.exit.thread ]
  %.1.lcssa = phi i64 [ 0, %.preheader.._crit_edge750_crit_edge ], [ %195, %__mlir_math_ipowi_i64.exit.thread ], [ %.1748, %__mlir_math_ipowi_i64.exit.thread770 ], [ %.2, %210 ]
  store i64 0, ptr %2, align 8, !tbaa !3
  %213 = icmp sgt i64 %212, 0
  br i1 %213, label %.lr.ph753, label %._crit_edge754

.lr.ph753:                                        ; preds = %._crit_edge750
  %.unpack638.unpack.unpack = load i64, ptr @_QFEb.7, align 8, !tbaa !7
  %min.iters.check832 = icmp ult i64 %212, 14
  br i1 %min.iters.check832, label %scalar.ph831.preheader, label %vector.memcheck827

vector.memcheck827:                               ; preds = %.lr.ph753
  %uglygep = getelementptr inbounds i8, ptr %2, i64 8
  %214 = shl i64 %.unpack638.unpack.unpack, 3
  %215 = sub i64 8, %214
  %uglygep828 = getelementptr i8, ptr %.unpack631, i64 %215
  %216 = shl i64 %212, 3
  %217 = add i64 %216, 8
  %218 = sub i64 %217, %214
  %uglygep829 = getelementptr i8, ptr %.unpack631, i64 %218
  %bound0 = icmp ult ptr %2, %uglygep829
  %bound1 = icmp ult ptr %uglygep828, %uglygep
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph831.preheader, label %vector.ph833

vector.ph833:                                     ; preds = %vector.memcheck827
  %n.vec835 = and i64 %212, -4
  %ind.end836 = or i64 %n.vec835, 1
  %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %.1.lcssa, i64 0
  %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer
  %broadcast.splatinsert846 = insertelement <2 x i64> poison, i64 %.1.lcssa, i64 0
  %broadcast.splat847 = shufflevector <2 x i64> %broadcast.splatinsert846, <2 x i64> poison, <2 x i32> zeroinitializer
  br label %vector.body839

vector.body839:                                   ; preds = %vector.body839, %vector.ph833
  %index840 = phi i64 [ 0, %vector.ph833 ], [ %index.next848, %vector.body839 ]
  %vec.phi841 = phi <2 x i64> [ zeroinitializer, %vector.ph833 ], [ %224, %vector.body839 ]
  %vec.phi842 = phi <2 x i64> [ zeroinitializer, %vector.ph833 ], [ %225, %vector.body839 ]
  %offset.idx843 = or i64 %index840, 1
  %219 = sub i64 %offset.idx843, %.unpack638.unpack.unpack
  %220 = getelementptr i64, ptr %.unpack631, i64 %219
  %wide.load844 = load <2 x i64>, ptr %220, align 8, !tbaa !3, !alias.scope !25
  %221 = getelementptr i64, ptr %220, i64 2
  %wide.load845 = load <2 x i64>, ptr %221, align 8, !tbaa !3, !alias.scope !25
  %222 = xor <2 x i64> %wide.load844, %broadcast.splat
  %223 = xor <2 x i64> %wide.load845, %broadcast.splat847
  %224 = add <2 x i64> %222, %vec.phi841
  %225 = add <2 x i64> %223, %vec.phi842
  %index.next848 = add nuw i64 %index840, 4
  %226 = icmp eq i64 %index.next848, %n.vec835
  br i1 %226, label %middle.block830, label %vector.body839, !llvm.loop !28

middle.block830:                                  ; preds = %vector.body839
  %bin.rdx849 = add <2 x i64> %225, %224
  %227 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx849)
  store i64 %227, ptr %2, align 8, !tbaa !3
  %cmp.n838 = icmp eq i64 %212, %n.vec835
  br i1 %cmp.n838, label %._crit_edge754, label %scalar.ph831.preheader

scalar.ph831.preheader:                           ; preds = %vector.memcheck827, %.lr.ph753, %middle.block830
  %.ph853 = phi i64 [ 1, %vector.memcheck827 ], [ 1, %.lr.ph753 ], [ %ind.end836, %middle.block830 ]
  %.ph854 = phi i64 [ 0, %vector.memcheck827 ], [ 0, %.lr.ph753 ], [ %227, %middle.block830 ]
  %228 = add i64 %212, 1
  %229 = sub i64 %228, %.ph853
  %230 = sub i64 %212, %.ph853
  %xtraiter876 = and i64 %229, 3
  %lcmp.mod877.not = icmp eq i64 %xtraiter876, 0
  br i1 %lcmp.mod877.not, label %scalar.ph831.prol.loopexit, label %scalar.ph831.prol

scalar.ph831.prol:                                ; preds = %scalar.ph831.preheader, %scalar.ph831.prol
  %231 = phi i64 [ %238, %scalar.ph831.prol ], [ %.ph853, %scalar.ph831.preheader ]
  %232 = phi i64 [ %237, %scalar.ph831.prol ], [ %.ph854, %scalar.ph831.preheader ]
  %prol.iter878 = phi i64 [ %prol.iter878.next, %scalar.ph831.prol ], [ 0, %scalar.ph831.preheader ]
  %233 = sub i64 %231, %.unpack638.unpack.unpack
  %234 = getelementptr i64, ptr %.unpack631, i64 %233
  %235 = load i64, ptr %234, align 8, !tbaa !3
  %236 = xor i64 %235, %.1.lcssa
  %237 = add i64 %236, %232
  store i64 %237, ptr %2, align 8, !tbaa !3
  %238 = add nuw i64 %231, 1
  %prol.iter878.next = add i64 %prol.iter878, 1
  %prol.iter878.cmp.not = icmp eq i64 %prol.iter878.next, %xtraiter876
  br i1 %prol.iter878.cmp.not, label %scalar.ph831.prol.loopexit, label %scalar.ph831.prol, !llvm.loop !29

scalar.ph831.prol.loopexit:                       ; preds = %scalar.ph831.prol, %scalar.ph831.preheader
  %.unr879 = phi i64 [ %.ph853, %scalar.ph831.preheader ], [ %238, %scalar.ph831.prol ]
  %.unr880 = phi i64 [ %.ph854, %scalar.ph831.preheader ], [ %237, %scalar.ph831.prol ]
  %239 = icmp ult i64 %230, 3
  br i1 %239, label %._crit_edge754, label %scalar.ph831

scalar.ph831:                                     ; preds = %scalar.ph831.prol.loopexit, %scalar.ph831
  %240 = phi i64 [ %265, %scalar.ph831 ], [ %.unr879, %scalar.ph831.prol.loopexit ]
  %241 = phi i64 [ %264, %scalar.ph831 ], [ %.unr880, %scalar.ph831.prol.loopexit ]
  %242 = sub i64 %240, %.unpack638.unpack.unpack
  %243 = getelementptr i64, ptr %.unpack631, i64 %242
  %244 = load i64, ptr %243, align 8, !tbaa !3
  %245 = xor i64 %244, %.1.lcssa
  %246 = add i64 %245, %241
  store i64 %246, ptr %2, align 8, !tbaa !3
  %247 = add nuw i64 %240, 1
  %248 = sub i64 %247, %.unpack638.unpack.unpack
  %249 = getelementptr i64, ptr %.unpack631, i64 %248
  %250 = load i64, ptr %249, align 8, !tbaa !3
  %251 = xor i64 %250, %.1.lcssa
  %252 = add i64 %251, %246
  store i64 %252, ptr %2, align 8, !tbaa !3
  %253 = add nuw i64 %240, 2
  %254 = sub i64 %253, %.unpack638.unpack.unpack
  %255 = getelementptr i64, ptr %.unpack631, i64 %254
  %256 = load i64, ptr %255, align 8, !tbaa !3
  %257 = xor i64 %256, %.1.lcssa
  %258 = add i64 %257, %252
  store i64 %258, ptr %2, align 8, !tbaa !3
  %259 = add nuw i64 %240, 3
  %260 = sub i64 %259, %.unpack638.unpack.unpack
  %261 = getelementptr i64, ptr %.unpack631, i64 %260
  %262 = load i64, ptr %261, align 8, !tbaa !3
  %263 = xor i64 %262, %.1.lcssa
  %264 = add i64 %263, %258
  store i64 %264, ptr %2, align 8, !tbaa !3
  %265 = add nuw i64 %240, 4
  %exitcond760.not.3 = icmp eq i64 %259, %212
  br i1 %exitcond760.not.3, label %._crit_edge754, label %scalar.ph831, !llvm.loop !30

._crit_edge754:                                   ; preds = %scalar.ph831.prol.loopexit, %scalar.ph831, %middle.block830, %._crit_edge750
  %266 = call ptr @_FortranAioBeginExternalFormattedOutput(ptr nonnull @_QQcl.28693029, i64 4, ptr null, i32 -1, ptr nonnull @_QQcl.3c5711550ffea6f6e598633c6a463ec2, i32 44)
  %267 = load i64, ptr %2, align 8, !tbaa !3
  %268 = call i1 @_FortranAioOutputInteger64(ptr %266, i64 %267)
  %269 = call i32 @_FortranAioEndIoStatement(ptr %266)
  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 @_FortranAioOutputInteger64(ptr, i64) local_unnamed_addr

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.log.f32(float) #2

; Function Attrs: 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 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 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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, !13}
!13 = !{!"llvm.loop.unroll.disable"}
!14 = distinct !{!14, !10, !11}
!15 = distinct !{!15, !13}
!16 = distinct !{!16, !10}
!17 = distinct !{!17, !10}
!18 = distinct !{!18, !10, !11}
!19 = distinct !{!19, !13}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10, !11}
!22 = distinct !{!22, !11, !10}
!23 = distinct !{!23, !24}
!24 = !{!"llvm.loop.unswitch.partial.disable"}
!25 = !{!26}
!26 = distinct !{!26, !27}
!27 = distinct !{!27, !"LVerDomain"}
!28 = distinct !{!28, !10, !11}
!29 = distinct !{!29, !13}
!30 = distinct !{!30, !10}
