import std.stdio;
import std.algorithm;
import core.stdc.stdio;

int[] ds;
int[] as;

int[][] dim2arr(int w,int h){
	int[] buf = new int[w*h];
	int[][] ret = new int[][h];
	for(int i=0;i<h;i++){
		ret[i] = buf[i*w..(i+1)*w];
	}
	return ret;
}

int factorial(int a){
	if(a <= 1)
		return 1;
	else
		return a * (a-1).factorial;
}

int unUsed(bool[] used,int idx){
	foreach(int i,ref b;used){
		if(!b){
			if(idx-- == 0){
				b = true;
				return i;
			}
		}
	}
	assert(false);
}

int dMax=0;

bool[] used;
void sequence(int[] dest,int t){
	used[] = false;
	for(int i=0;i<dMax;i++){
		dest[i] = used.unUsed(t % (dMax-i));
		t /= (dMax-i);
	}
}

int[] seqTmp;
int seqIdx(int[] seq){
	used[] = false;
	for(int i=0;i<dMax;i++){
		int c=0;
		for(int j=0;j<dMax;j++){
			if(!used[j]){
				if(j == seq[i]){
					seqTmp[i] = c;
					used[j] = true;
					break;
				}
				c++;
			}
		}
	}
	int res = 0;
	for(int i=dMax-1;i>=0;i--){
		res *= (dMax-i);
		res += seqTmp[i];
	}
	return res;
}

void step_insert(int[] seq,int t,int idx){
	int c=0;
	for(int i=0;i<dMax;i++){
		if(seq[i] == 0){
			if(i < idx){
				idx--;
			}
			continue;
		}
		seq[c++] = seq[i]-1; 
	}
	for(int i=idx;i<dMax;i++){
		swap(seq[i],t);
	}
}

int[][] dp;

void main(){
	int n;
	scanf("%d",&n);
	ds = new int[n];
	as = new int[n];
	
	for(int i=0;i<n;i++){
		scanf("%d",&ds[i]);
		dMax = max(dMax,ds[i]);
	}
	used = new bool[dMax];
	seqTmp = new int[dMax];
	
	for(int i=0;i<n;i++){
		scanf("%d",&as[i]);
	}
	
	int dFact = dMax.factorial;
	
	dp = dim2arr(dFact,n);
	
	
	int[] seq = new int[dMax];
	bool[] ate = new bool[dMax];
	
	for(int k=0;k<dFact;k++){
		
		sequence(seq,k);
		ate[] = false;
		int sum=0;
		foreach(i;seq){
			ate[i] = true;
			for(int j=max(0,i-ds[i]);j<min(dMax,i+ds[i]+1);j++){
				if(!ate[j])
					sum += as[i];
			}
		}
		dp[0][k] = sum;
	}
	
	for(int i;i<n-dMax;i++){
		for(int j=0;j<dFact;j++){
			for(int k=0;k<dMax+1;k++){
				int s = dp[i][j];
				sequence(seq,j);
				int c=0;
				foreach(l;seq[0..k]){
					if(dMax-l <= ds[i+l]){
						s += as[i+l];
					}
				}
				foreach(l;seq[k..dMax]){
					if(dMax-l <= ds[i+dMax]){
						s += as[i+dMax];
					}
				}
				seq.step_insert(dMax-1,k);
				int si = seq.seqIdx;
				dp[i+1][si] = max(dp[i+1][si],s);
			}
		}
	}
	
	int ri = max(0,n-dMax);
	int ans = 0;
	for(int i=0;i<dFact;i++){
		ans = max(dp[ri][i],ans);
	}
	
	printf("%d\n",ans);
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/D/Source_11254/source.d'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/D/Source_11254/source.d"
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"

%0 = type { i32, i32, [7 x i8] }
%object.TypeInfo_Array = type { [19 x i8*]*, i8*, %object.TypeInfo* }
%object.TypeInfo = type { [19 x i8*]*, i8* }
%object.ModuleInfo = type { i32, i32 }

@_D6source2dsAi = thread_local local_unnamed_addr global { i64, i32* } zeroinitializer, align 8 ; [#uses = 2]
@_D6source2asAi = thread_local local_unnamed_addr global { i64, i32* } zeroinitializer, align 8 ; [#uses = 2]
@_D11TypeInfo_Ai6__initZ = external global %object.TypeInfo_Array ; [#uses = 1]
@_D12TypeInfo_AAi6__initZ = linkonce_odr global %object.TypeInfo_Array { [19 x i8*]* @_D14TypeInfo_Array6__vtblZ, i8* null, %object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*) } ; [#uses = 1]
@_D14TypeInfo_Array6__vtblZ = external constant [19 x i8*] ; [#uses = 1]
@.str = private unnamed_addr constant [62 x i8] c"/data/TheStack_IR/OJ_Samples/Collated/D/Source_11254/source.d\00" ; [#uses = 1]
@_D6source4dMaxi = thread_local local_unnamed_addr global i32 0, align 4 ; [#uses = 16]
@_D6source4usedAb = thread_local local_unnamed_addr global { i64, i8* } zeroinitializer, align 8 ; [#uses = 2]
@_D6source6seqTmpAi = thread_local local_unnamed_addr global { i64, i32* } zeroinitializer, align 8 ; [#uses = 2]
@_D6source2dpAAi = thread_local local_unnamed_addr global { i64, { i64, i32* }* } zeroinitializer, align 8 ; [#uses = 2]
@.str.1 = private unnamed_addr constant [3 x i8] c"%d\00" ; [#uses = 1]
@_D11TypeInfo_Ab6__initZ = external global %object.TypeInfo_Array ; [#uses = 1]
@.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00" ; [#uses = 1]
@_D6source12__ModuleInfoZ = global %0 { i32 -2147483644, i32 0, [7 x i8] c"source\00" } ; [#uses = 1]
@_D6source11__moduleRefZ = linkonce_odr hidden global %object.ModuleInfo* bitcast (%0* @_D6source12__ModuleInfoZ to %object.ModuleInfo*), section "__minfo" ; [#uses = 1]
@__start___minfo = external hidden global %object.ModuleInfo* ; [#uses = 1]
@__stop___minfo = external hidden global %object.ModuleInfo* ; [#uses = 1]
@ldc.dso_slot = linkonce_odr hidden global i8* null ; [#uses = 1]
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ldc.register_dso, i8* bitcast (void ()* @ldc.register_dso to i8*) }] ; [#uses = 0]
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @ldc.register_dso, i8* bitcast (void ()* @ldc.register_dso to i8*) }] ; [#uses = 0]
@llvm.used = appending global [1 x i8*] [i8* bitcast (%object.ModuleInfo** @_D6source11__moduleRefZ to i8*)], section "llvm.metadata" ; [#uses = 0]

; [#uses = 1]
; Function Attrs: uwtable
define { i64, { i64, i32* }* } @_D6source7dim2arrFiiZAAi(i32 %h_arg, i32 %w_arg) local_unnamed_addr #0 {
  %1 = mul i32 %w_arg, %h_arg                     ; [#uses = 2]
  %2 = sext i32 %1 to i64                         ; [#uses = 2]
  %.gc_mem = tail call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %2) #1 ; [#uses = 1]
  %.ptr = extractvalue { i64, i8* } %.gc_mem, 1   ; [#uses = 1]
  %3 = bitcast i8* %.ptr to i32*                  ; [#uses = 1]
  %4 = sext i32 %h_arg to i64                     ; [#uses = 3]
  %.gc_mem1 = tail call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D12TypeInfo_AAi6__initZ to %object.TypeInfo*), i64 %4) #1 ; [#uses = 1]
  %.ptr2 = extractvalue { i64, i8* } %.gc_mem1, 1 ; [#uses = 1]
  %5 = bitcast i8* %.ptr2 to { i64, i32* }*       ; [#uses = 3]
  %6 = icmp sgt i32 %h_arg, 0                     ; [#uses = 1]
  %smax = select i1 %6, i32 %h_arg, i32 0         ; [#uses = 1]
  %wide.trip.count = zext i32 %smax to i64        ; [#uses = 1]
  %wide.trip.count33 = zext i32 %h_arg to i64     ; [#uses = 2]
  br label %forcond

forcond:                                          ; preds = %bounds.ok4, %0
  %indvars.iv = phi i64 [ %indvars.iv.next, %bounds.ok4 ], [ 0, %0 ] ; [#uses = 6, type = i64]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count ; [#uses = 1]
  br i1 %exitcond.not, label %endfor, label %forbody

forbody:                                          ; preds = %forcond
  %exitcond34.not = icmp eq i64 %indvars.iv, %wide.trip.count33 ; [#uses = 1]
  br i1 %exitcond34.not, label %bounds.fail, label %bounds.ok

bounds.ok:                                        ; preds = %forbody
  %7 = trunc i64 %indvars.iv to i32               ; [#uses = 1]
  %8 = mul i32 %7, %w_arg                         ; [#uses = 2]
  %9 = sext i32 %8 to i64                         ; [#uses = 3]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 ; [#uses = 2]
  %10 = trunc i64 %indvars.iv.next to i32         ; [#uses = 1]
  %11 = mul i32 %10, %w_arg                       ; [#uses = 3]
  %12 = sext i32 %11 to i64                       ; [#uses = 2]
  %bounds.cmp.up = icmp ule i32 %11, %1           ; [#uses = 1]
  %bounds.cmp.lo = icmp uge i32 %11, %8           ; [#uses = 1]
  %13 = and i1 %bounds.cmp.up, %bounds.cmp.lo     ; [#uses = 1]
  br i1 %13, label %bounds.ok4, label %bounds.fail5

bounds.ok4:                                       ; preds = %bounds.ok
  %lowerbound = getelementptr inbounds i32, i32* %3, i64 %9 ; [#uses = 1, type = i32*]
  %14 = sub nsw i64 %12, %9                       ; [#uses = 1]
  %15 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %5, i64 %indvars.iv, i32 0 ; [#uses = 1, type = i64*]
  store i64 %14, i64* %15, align 8
  %16 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %5, i64 %indvars.iv, i32 1 ; [#uses = 1, type = i32**]
  store i32* %lowerbound, i32** %16, align 8
  br label %forcond

bounds.fail5:                                     ; preds = %bounds.ok
  tail call void @_d_arraybounds_slice({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 12, i64 %9, i64 %12, i64 %2) #2
  unreachable

bounds.fail:                                      ; preds = %forbody
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 12, i64 %wide.trip.count33, i64 %4) #2
  unreachable

endfor:                                           ; preds = %forcond
  %17 = insertvalue { i64, { i64, i32* }* } undef, i64 %4, 0 ; [#uses = 1]
  %.fca.1.insert17 = insertvalue { i64, { i64, i32* }* } %17, { i64, i32* }* %5, 1 ; [#uses = 1]
  ret { i64, { i64, i32* }* } %.fca.1.insert17
}

; [#uses = 8]
; Function Attrs: uwtable
declare { i64, i8* } @_d_newarrayT(%object.TypeInfo*, i64) local_unnamed_addr #1

; [#uses = 29]
; Function Attrs: cold noreturn uwtable
declare void @_d_arraybounds_index({ i64, i8* }, i32, i64, i64) local_unnamed_addr #2

; [#uses = 3]
; Function Attrs: cold noreturn uwtable
declare void @_d_arraybounds_slice({ i64, i8* }, i32, i64, i64, i64) local_unnamed_addr #2

; [#uses = 0]
; Function Attrs: nounwind readnone uwtable
define i32 @_D6source9factorialFiZi(i32 %a_arg) local_unnamed_addr #3 {
  br label %tailrecurse

tailrecurse:                                      ; preds = %else, %0
  %accumulator.tr = phi i32 [ 1, %0 ], [ %3, %else ] ; [#uses = 2, type = i32]
  %a_arg.tr = phi i32 [ %a_arg, %0 ], [ %2, %else ] ; [#uses = 3, type = i32]
  %1 = icmp slt i32 %a_arg.tr, 2                  ; [#uses = 1]
  br i1 %1, label %if, label %else

if:                                               ; preds = %tailrecurse
  ret i32 %accumulator.tr

else:                                             ; preds = %tailrecurse
  %2 = add nsw i32 %a_arg.tr, -1                  ; [#uses = 1]
  %3 = mul i32 %a_arg.tr, %accumulator.tr         ; [#uses = 1]
  br label %tailrecurse
}

; [#uses = 1]
; Function Attrs: uwtable
define i32 @_D6source6unUsedFAbiZi(i32 %idx_arg, { i64, i8* } %used_arg) local_unnamed_addr #0 {
  %used_arg.fca.0.extract = extractvalue { i64, i8* } %used_arg, 0 ; [#uses = 2]
  %used_arg.fca.1.extract = extractvalue { i64, i8* } %used_arg, 1 ; [#uses = 2]
  %1 = trunc i64 %used_arg.fca.0.extract to i32   ; [#uses = 1]
  %2 = icmp sgt i32 %1, 0                         ; [#uses = 1]
  %used_arg.fca.0.extract.op = and i64 %used_arg.fca.0.extract, 4294967295 ; [#uses = 1]
  %wide.trip.count = select i1 %2, i64 %used_arg.fca.0.extract.op, i64 0 ; [#uses = 1]
  br label %forcond

forcond:                                          ; preds = %forinc, %0
  %indvars.iv = phi i64 [ %indvars.iv.next, %forinc ], [ 0, %0 ] ; [#uses = 5, type = i64]
  %idx.0 = phi i32 [ %idx.1, %forinc ], [ %idx_arg, %0 ] ; [#uses = 3, type = i32]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count ; [#uses = 1]
  br i1 %exitcond.not, label %assertFailed, label %forbody

forbody:                                          ; preds = %forcond
  %3 = getelementptr inbounds i8, i8* %used_arg.fca.1.extract, i64 %indvars.iv ; [#uses = 1, type = i8*]
  %4 = load i8, i8* %3, align 1, !range !4        ; [#uses = 1]
  %.not = icmp eq i8 %4, 0                        ; [#uses = 1]
  br i1 %.not, label %if, label %forinc

if:                                               ; preds = %forbody
  %5 = add i32 %idx.0, -1                         ; [#uses = 1]
  %6 = icmp eq i32 %idx.0, 0                      ; [#uses = 1]
  br i1 %6, label %if3, label %forinc

if3:                                              ; preds = %if
  %7 = trunc i64 %indvars.iv to i32               ; [#uses = 1]
  %8 = and i64 %indvars.iv, 4294967295            ; [#uses = 1]
  %9 = getelementptr inbounds i8, i8* %used_arg.fca.1.extract, i64 %8 ; [#uses = 1, type = i8*]
  store i8 1, i8* %9, align 1
  ret i32 %7

forinc:                                           ; preds = %forbody, %if
  %idx.1 = phi i32 [ %5, %if ], [ %idx.0, %forbody ] ; [#uses = 1, type = i32]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 ; [#uses = 1]
  br label %forcond

assertFailed:                                     ; preds = %forcond
  tail call void @_d_assert({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 33) #2
  unreachable
}

; [#uses = 1]
; Function Attrs: cold noreturn uwtable
declare void @_d_assert({ i64, i8* }, i32) local_unnamed_addr #2

; [#uses = 2]
; Function Attrs: uwtable
define void @_D6source8sequenceFAiiZv(i32 %t_arg, { i64, i32* } %dest_arg) local_unnamed_addr #0 {
  %dest_arg.fca.0.extract = extractvalue { i64, i32* } %dest_arg, 0 ; [#uses = 3]
  %dest_arg.fca.1.extract = extractvalue { i64, i32* } %dest_arg, 1 ; [#uses = 1]
  %.ptr = load i8*, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8 ; [#uses = 1]
  %.len = load i64, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8 ; [#uses = 1]
  tail call void @llvm.memset.p0i8.i64(i8* align 1 %.ptr, i8 0, i64 %.len, i1 false)
  %.pre = load i32, i32* @_D6source4dMaxi, align 4 ; [#uses = 1]
  br label %forcond

forcond:                                          ; preds = %bounds.ok, %0
  %1 = phi i32 [ %11, %bounds.ok ], [ %.pre, %0 ] ; [#uses = 2, type = i32]
  %indvars.iv = phi i64 [ %indvars.iv.next, %bounds.ok ], [ 0, %0 ] ; [#uses = 5, type = i64]
  %t.0 = phi i32 [ %13, %bounds.ok ], [ %t_arg, %0 ] ; [#uses = 2, type = i32]
  %2 = sext i32 %1 to i64                         ; [#uses = 1]
  %3 = icmp slt i64 %indvars.iv, %2               ; [#uses = 1]
  br i1 %3, label %forbody, label %endfor

forbody:                                          ; preds = %forcond
  %exitcond.not = icmp eq i64 %indvars.iv, %dest_arg.fca.0.extract ; [#uses = 1]
  br i1 %exitcond.not, label %bounds.fail, label %bounds.ok

bounds.ok:                                        ; preds = %forbody
  %4 = getelementptr inbounds i32, i32* %dest_arg.fca.1.extract, i64 %indvars.iv ; [#uses = 1, type = i32*]
  %.unpack = load i64, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8 ; [#uses = 1]
  %5 = insertvalue { i64, i8* } undef, i64 %.unpack, 0 ; [#uses = 1]
  %.unpack9 = load i8*, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8 ; [#uses = 1]
  %6 = insertvalue { i64, i8* } %5, i8* %.unpack9, 1 ; [#uses = 1]
  %7 = trunc i64 %indvars.iv to i32               ; [#uses = 2]
  %8 = sub i32 %1, %7                             ; [#uses = 1]
  %9 = srem i32 %t.0, %8                          ; [#uses = 1]
  %10 = tail call i32 @_D6source6unUsedFAbiZi(i32 %9, { i64, i8* } %6) #0 ; [#uses = 1]
  store i32 %10, i32* %4, align 4
  %11 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 2]
  %12 = sub i32 %11, %7                           ; [#uses = 1]
  %13 = sdiv i32 %t.0, %12                        ; [#uses = 1]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 ; [#uses = 1]
  br label %forcond

bounds.fail:                                      ; preds = %forbody
  %14 = and i64 %dest_arg.fca.0.extract, 4294967295 ; [#uses = 1]
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 42, i64 %14, i64 %dest_arg.fca.0.extract) #2
  unreachable

endfor:                                           ; preds = %forcond
  ret void
}

; [#uses = 3]
; Function Attrs: argmemonly nounwind willreturn writeonly
declare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #4

; [#uses = 1]
; Function Attrs: uwtable
define i32 @_D6source6seqIdxFAiZi({ i64, i32* } %seq_arg) local_unnamed_addr #0 {
  %seq_arg.fca.0.extract = extractvalue { i64, i32* } %seq_arg, 0 ; [#uses = 2]
  %seq_arg.fca.1.extract = extractvalue { i64, i32* } %seq_arg, 1 ; [#uses = 1]
  %.ptr = load i8*, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8 ; [#uses = 1]
  %.len = load i64, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8 ; [#uses = 1]
  tail call void @llvm.memset.p0i8.i64(i8* align 1 %.ptr, i8 0, i64 %.len, i1 false)
  br label %forcond

forcond:                                          ; preds = %forinc, %0
  %indvars.iv94 = phi i64 [ %indvars.iv.next95, %forinc ], [ 0, %0 ] ; [#uses = 8, type = i64]
  %1 = load i32, i32* @_D6source4dMaxi, align 4   ; [#uses = 4]
  %2 = sext i32 %1 to i64                         ; [#uses = 1]
  %3 = icmp slt i64 %indvars.iv94, %2             ; [#uses = 1]
  br i1 %3, label %forcond1.preheader, label %forcond25.preheader

forcond1.preheader:                               ; preds = %forcond
  %.len5 = load i64, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8 ; [#uses = 3]
  %.ptr6 = load i8*, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8 ; [#uses = 1]
  %bounds.cmp8 = icmp ugt i64 %seq_arg.fca.0.extract, %indvars.iv94 ; [#uses = 1]
  %4 = getelementptr inbounds i32, i32* %seq_arg.fca.1.extract, i64 %indvars.iv94 ; [#uses = 1, type = i32*]
  %wide.trip.count = zext i32 %1 to i64           ; [#uses = 1]
  br label %forcond1

forcond25.preheader:                              ; preds = %forcond
  %.len29 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %.ptr33 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 1), align 8 ; [#uses = 1]
  br label %forcond25

forcond1:                                         ; preds = %forcond1.preheader, %forinc3
  %indvars.iv = phi i64 [ 0, %forcond1.preheader ], [ %indvars.iv.next, %forinc3 ] ; [#uses = 6, type = i64]
  %c.0 = phi i32 [ 0, %forcond1.preheader ], [ %c.1, %forinc3 ] ; [#uses = 3, type = i32]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count ; [#uses = 1]
  br i1 %exitcond.not, label %forinc, label %forbody2

forbody2:                                         ; preds = %forcond1
  %exitcond93.not = icmp eq i64 %indvars.iv, %.len5 ; [#uses = 1]
  br i1 %exitcond93.not, label %bounds.fail, label %bounds.ok

bounds.ok:                                        ; preds = %forbody2
  %5 = getelementptr inbounds i8, i8* %.ptr6, i64 %indvars.iv ; [#uses = 1, type = i8*]
  %6 = load i8, i8* %5, align 1, !range !4        ; [#uses = 1]
  %.not = icmp eq i8 %6, 0                        ; [#uses = 1]
  br i1 %.not, label %if, label %forinc3

if:                                               ; preds = %bounds.ok
  br i1 %bounds.cmp8, label %bounds.ok9, label %bounds.fail10

bounds.ok9:                                       ; preds = %if
  %7 = load i32, i32* %4, align 4                 ; [#uses = 1]
  %8 = zext i32 %7 to i64                         ; [#uses = 1]
  %9 = icmp eq i64 %indvars.iv, %8                ; [#uses = 1]
  br i1 %9, label %if12, label %endif13

if12:                                             ; preds = %bounds.ok9
  %10 = and i64 %indvars.iv, 4294967295           ; [#uses = 3]
  %.len14 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp15 = icmp ugt i64 %.len14, %indvars.iv94 ; [#uses = 1]
  br i1 %bounds.cmp15, label %bounds.ok16, label %bounds.fail17

bounds.ok16:                                      ; preds = %if12
  %.ptr18 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %11 = getelementptr inbounds i32, i32* %.ptr18, i64 %indvars.iv94 ; [#uses = 1, type = i32*]
  store i32 %c.0, i32* %11, align 4
  %.len19 = load i64, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp20 = icmp ugt i64 %.len19, %10       ; [#uses = 1]
  br i1 %bounds.cmp20, label %bounds.ok21, label %bounds.fail22

bounds.ok21:                                      ; preds = %bounds.ok16
  %.ptr23 = load i8*, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8 ; [#uses = 1]
  %12 = getelementptr inbounds i8, i8* %.ptr23, i64 %10 ; [#uses = 1, type = i8*]
  store i8 1, i8* %12, align 1
  br label %forinc

bounds.fail22:                                    ; preds = %bounds.ok16
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 56, i64 %10, i64 %.len19) #2
  unreachable

bounds.fail17:                                    ; preds = %if12
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 55, i64 %indvars.iv94, i64 %.len14) #2
  unreachable

endif13:                                          ; preds = %bounds.ok9
  %13 = add i32 %c.0, 1                           ; [#uses = 1]
  br label %forinc3

bounds.fail10:                                    ; preds = %if
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 54, i64 %indvars.iv94, i64 %seq_arg.fca.0.extract) #2
  unreachable

bounds.fail:                                      ; preds = %forbody2
  %14 = and i64 %.len5, 4294967295                ; [#uses = 1]
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 53, i64 %14, i64 %.len5) #2
  unreachable

forinc3:                                          ; preds = %bounds.ok, %endif13
  %c.1 = phi i32 [ %13, %endif13 ], [ %c.0, %bounds.ok ] ; [#uses = 1, type = i32]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 ; [#uses = 1]
  br label %forcond1

forinc:                                           ; preds = %forcond1, %bounds.ok21
  %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 ; [#uses = 1]
  br label %forcond

forcond25:                                        ; preds = %forcond25.preheader, %bounds.ok31
  %res.0 = phi i32 [ %21, %bounds.ok31 ], [ 0, %forcond25.preheader ] ; [#uses = 2, type = i32]
  %i24.0.in = phi i32 [ %i24.0, %bounds.ok31 ], [ %1, %forcond25.preheader ] ; [#uses = 1, type = i32]
  %i24.0 = add i32 %i24.0.in, -1                  ; [#uses = 5]
  %15 = icmp sgt i32 %i24.0, -1                   ; [#uses = 1]
  br i1 %15, label %forbody26, label %endfor28

forbody26:                                        ; preds = %forcond25
  %16 = zext i32 %i24.0 to i64                    ; [#uses = 2]
  %bounds.cmp30 = icmp ugt i64 %.len29, %16       ; [#uses = 1]
  br i1 %bounds.cmp30, label %bounds.ok31, label %bounds.fail32

bounds.ok31:                                      ; preds = %forbody26
  %17 = sub i32 %1, %i24.0                        ; [#uses = 1]
  %18 = mul i32 %17, %res.0                       ; [#uses = 1]
  %19 = getelementptr inbounds i32, i32* %.ptr33, i64 %16 ; [#uses = 1, type = i32*]
  %20 = load i32, i32* %19, align 4               ; [#uses = 1]
  %21 = add i32 %20, %18                          ; [#uses = 1]
  br label %forcond25

bounds.fail32:                                    ; preds = %forbody26
  %22 = zext i32 %i24.0 to i64                    ; [#uses = 1]
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 66, i64 %22, i64 %.len29) #2
  unreachable

endfor28:                                         ; preds = %forcond25
  ret i32 %res.0
}

; [#uses = 1]
; Function Attrs: uwtable
define void @_D6source11step_insertFAiiiZv(i32 %idx_arg, i32 %t_arg, { i64, i32* } %seq_arg) local_unnamed_addr #0 {
  %seq_arg.fca.0.extract = extractvalue { i64, i32* } %seq_arg, 0 ; [#uses = 8]
  %seq_arg.fca.1.extract = extractvalue { i64, i32* } %seq_arg, 1 ; [#uses = 3]
  br label %forcond

forcond:                                          ; preds = %forinc, %0
  %indvars.iv49 = phi i64 [ %indvars.iv.next50, %forinc ], [ 0, %0 ] ; [#uses = 5, type = i64]
  %idx.0 = phi i32 [ %idx.1, %forinc ], [ %idx_arg, %0 ] ; [#uses = 4, type = i32]
  %c.0 = phi i32 [ %c.1, %forinc ], [ 0, %0 ]     ; [#uses = 3, type = i32]
  %1 = load i32, i32* @_D6source4dMaxi, align 4   ; [#uses = 2]
  %2 = sext i32 %1 to i64                         ; [#uses = 1]
  %3 = icmp slt i64 %indvars.iv49, %2             ; [#uses = 1]
  br i1 %3, label %forbody, label %forcond14.preheader

forcond14.preheader:                              ; preds = %forcond
  %4 = sext i32 %idx.0 to i64                     ; [#uses = 3]
  %5 = icmp ugt i64 %seq_arg.fca.0.extract, %4    ; [#uses = 1]
  %umax = select i1 %5, i64 %seq_arg.fca.0.extract, i64 %4 ; [#uses = 2]
  br label %forcond14

forbody:                                          ; preds = %forcond
  %exitcond51.not = icmp eq i64 %indvars.iv49, %seq_arg.fca.0.extract ; [#uses = 1]
  br i1 %exitcond51.not, label %bounds.fail, label %bounds.ok

bounds.ok:                                        ; preds = %forbody
  %6 = getelementptr inbounds i32, i32* %seq_arg.fca.1.extract, i64 %indvars.iv49 ; [#uses = 1, type = i32*]
  %7 = load i32, i32* %6, align 4                 ; [#uses = 2]
  %8 = icmp eq i32 %7, 0                          ; [#uses = 1]
  br i1 %8, label %if, label %endif

if:                                               ; preds = %bounds.ok
  %9 = sext i32 %idx.0 to i64                     ; [#uses = 1]
  %10 = icmp slt i64 %indvars.iv49, %9            ; [#uses = 1]
  %11 = sext i1 %10 to i32                        ; [#uses = 1]
  %spec.select = add i32 %idx.0, %11              ; [#uses = 1]
  br label %forinc

endif:                                            ; preds = %bounds.ok
  %12 = sext i32 %c.0 to i64                      ; [#uses = 3]
  %bounds.cmp4 = icmp ugt i64 %seq_arg.fca.0.extract, %12 ; [#uses = 1]
  br i1 %bounds.cmp4, label %bounds.ok10, label %bounds.fail6

bounds.ok10:                                      ; preds = %endif
  %13 = add i32 %c.0, 1                           ; [#uses = 1]
  %14 = getelementptr inbounds i32, i32* %seq_arg.fca.1.extract, i64 %12 ; [#uses = 1, type = i32*]
  %15 = add i32 %7, -1                            ; [#uses = 1]
  store i32 %15, i32* %14, align 4
  br label %forinc

bounds.fail6:                                     ; preds = %endif
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 80, i64 %12, i64 %seq_arg.fca.0.extract) #2
  unreachable

bounds.fail:                                      ; preds = %forbody
  %16 = and i64 %seq_arg.fca.0.extract, 4294967295 ; [#uses = 1]
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 74, i64 %16, i64 %seq_arg.fca.0.extract) #2
  unreachable

forinc:                                           ; preds = %if, %bounds.ok10
  %idx.1 = phi i32 [ %idx.0, %bounds.ok10 ], [ %spec.select, %if ] ; [#uses = 1, type = i32]
  %c.1 = phi i32 [ %13, %bounds.ok10 ], [ %c.0, %if ] ; [#uses = 1, type = i32]
  %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1 ; [#uses = 1]
  br label %forcond

forcond14:                                        ; preds = %forcond14.preheader, %bounds.ok20
  %17 = phi i32 [ %1, %forcond14.preheader ], [ %.pre, %bounds.ok20 ] ; [#uses = 1, type = i32]
  %indvars.iv = phi i64 [ %4, %forcond14.preheader ], [ %indvars.iv.next, %bounds.ok20 ] ; [#uses = 4, type = i64]
  %t.0 = phi i32 [ %t_arg, %forcond14.preheader ], [ %21, %bounds.ok20 ] ; [#uses = 1, type = i32]
  %18 = sext i32 %17 to i64                       ; [#uses = 1]
  %19 = icmp slt i64 %indvars.iv, %18             ; [#uses = 1]
  br i1 %19, label %forbody15, label %endfor17

forbody15:                                        ; preds = %forcond14
  %exitcond.not = icmp eq i64 %indvars.iv, %umax  ; [#uses = 1]
  br i1 %exitcond.not, label %bounds.fail21, label %bounds.ok20

bounds.ok20:                                      ; preds = %forbody15
  %20 = getelementptr inbounds i32, i32* %seq_arg.fca.1.extract, i64 %indvars.iv ; [#uses = 2, type = i32*]
  %21 = load i32, i32* %20, align 4               ; [#uses = 1]
  store i32 %t.0, i32* %20, align 4
  %indvars.iv.next = add nsw i64 %indvars.iv, 1   ; [#uses = 1]
  %.pre = load i32, i32* @_D6source4dMaxi, align 4 ; [#uses = 1]
  br label %forcond14

bounds.fail21:                                    ; preds = %forbody15
  tail call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 83, i64 %umax, i64 %seq_arg.fca.0.extract) #2
  unreachable

endfor17:                                         ; preds = %forcond14
  ret void
}

; [#uses = 0]
; Function Attrs: uwtable
define weak_odr void @_D3std9algorithm8mutation__T4swapTiZQiFNaNbNiNeKiKiZv(i32* dereferenceable(4) %rhs, i32* dereferenceable(4) %lhs) local_unnamed_addr #0 {
  %1 = load i32, i32* %lhs, align 4               ; [#uses = 1]
  %2 = load i32, i32* %rhs, align 4               ; [#uses = 1]
  store i32 %2, i32* %lhs, align 4
  store i32 %1, i32* %rhs, align 4
  ret void
}

; [#uses = 1]
; Function Attrs: uwtable
define i32 @_Dmain({ i64, { i64, i8* }* } %unnamed) #5 {
  %n = alloca i32, align 4                        ; [#uses = 7, size/byte = 4]
  store i32 0, i32* %n, align 4
  %1 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* nonnull %n) #7 ; [#uses = 0]
  %2 = load i32, i32* %n, align 4                 ; [#uses = 1]
  %3 = sext i32 %2 to i64                         ; [#uses = 2]
  %.gc_mem = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %3) #1 ; [#uses = 1]
  %.ptr = extractvalue { i64, i8* } %.gc_mem, 1   ; [#uses = 1]
  store i64 %3, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 0), align 8
  store i8* %.ptr, i8** bitcast (i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 1) to i8**), align 8
  %4 = load i32, i32* %n, align 4                 ; [#uses = 1]
  %5 = sext i32 %4 to i64                         ; [#uses = 2]
  %.gc_mem1 = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %5) #1 ; [#uses = 1]
  %.ptr2 = extractvalue { i64, i8* } %.gc_mem1, 1 ; [#uses = 1]
  store i64 %5, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 0), align 8
  store i8* %.ptr2, i8** bitcast (i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 1) to i8**), align 8
  br label %forcond

forcond:                                          ; preds = %bounds.ok6, %0
  %indvars.iv553 = phi i64 [ %indvars.iv.next554, %bounds.ok6 ], [ 0, %0 ] ; [#uses = 8, type = i64]
  %6 = load i32, i32* %n, align 4                 ; [#uses = 1]
  %7 = sext i32 %6 to i64                         ; [#uses = 1]
  %8 = icmp slt i64 %indvars.iv553, %7            ; [#uses = 1]
  br i1 %8, label %forbody, label %endfor

forbody:                                          ; preds = %forcond
  %.len = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp = icmp ugt i64 %.len, %indvars.iv553 ; [#uses = 1]
  br i1 %bounds.cmp, label %bounds.ok, label %bounds.fail

bounds.ok:                                        ; preds = %forbody
  %.ptr3 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %9 = getelementptr inbounds i32, i32* %.ptr3, i64 %indvars.iv553 ; [#uses = 1, type = i32*]
  %10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9) #7 ; [#uses = 0]
  %.len4 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp5 = icmp ugt i64 %.len4, %indvars.iv553 ; [#uses = 1]
  br i1 %bounds.cmp5, label %bounds.ok6, label %bounds.fail7

bounds.ok6:                                       ; preds = %bounds.ok
  %11 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 2]
  %.ptr8 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %12 = getelementptr inbounds i32, i32* %.ptr8, i64 %indvars.iv553 ; [#uses = 1, type = i32*]
  %13 = load i32, i32* %12, align 4               ; [#uses = 2]
  %14 = icmp slt i32 %11, %13                     ; [#uses = 1]
  %b_arg.a_arg.i = select i1 %14, i32 %13, i32 %11 ; [#uses = 1]
  store i32 %b_arg.a_arg.i, i32* @_D6source4dMaxi, align 4
  %indvars.iv.next554 = add nuw nsw i64 %indvars.iv553, 1 ; [#uses = 1]
  br label %forcond

bounds.fail7:                                     ; preds = %bounds.ok
  %15 = and i64 %indvars.iv553, 4294967295        ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 97, i64 %15, i64 %.len4) #2
  unreachable

bounds.fail:                                      ; preds = %forbody
  %16 = and i64 %indvars.iv553, 4294967295        ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 96, i64 %16, i64 %.len) #2
  unreachable

endfor:                                           ; preds = %forcond
  %17 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 1]
  %18 = sext i32 %17 to i64                       ; [#uses = 2]
  %.gc_mem9 = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ab6__initZ to %object.TypeInfo*), i64 %18) #1 ; [#uses = 1]
  %.ptr10 = extractvalue { i64, i8* } %.gc_mem9, 1 ; [#uses = 1]
  store i64 %18, i64* getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 0), align 8
  store i8* %.ptr10, i8** getelementptr inbounds ({ i64, i8* }, { i64, i8* }* @_D6source4usedAb, i64 0, i32 1), align 8
  %19 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 1]
  %20 = sext i32 %19 to i64                       ; [#uses = 2]
  %.gc_mem11 = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %20) #1 ; [#uses = 1]
  %.ptr12 = extractvalue { i64, i8* } %.gc_mem11, 1 ; [#uses = 1]
  store i64 %20, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 0), align 8
  store i8* %.ptr12, i8** bitcast (i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source6seqTmpAi, i64 0, i32 1) to i8**), align 8
  br label %forcond14

forcond14:                                        ; preds = %bounds.ok20, %endfor
  %indvars.iv551 = phi i64 [ %indvars.iv.next552, %bounds.ok20 ], [ 0, %endfor ] ; [#uses = 5, type = i64]
  %21 = load i32, i32* %n, align 4                ; [#uses = 2]
  %22 = sext i32 %21 to i64                       ; [#uses = 1]
  %23 = icmp slt i64 %indvars.iv551, %22          ; [#uses = 1]
  br i1 %23, label %forbody15, label %endfor17

forbody15:                                        ; preds = %forcond14
  %.len18 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp19 = icmp ugt i64 %.len18, %indvars.iv551 ; [#uses = 1]
  br i1 %bounds.cmp19, label %bounds.ok20, label %bounds.fail21

bounds.ok20:                                      ; preds = %forbody15
  %.ptr22 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %24 = getelementptr inbounds i32, i32* %.ptr22, i64 %indvars.iv551 ; [#uses = 1, type = i32*]
  %25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %24) #7 ; [#uses = 0]
  %indvars.iv.next552 = add nuw nsw i64 %indvars.iv551, 1 ; [#uses = 1]
  br label %forcond14

bounds.fail21:                                    ; preds = %forbody15
  %26 = and i64 %indvars.iv551, 4294967295        ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 103, i64 %26, i64 %.len18) #2
  unreachable

endfor17:                                         ; preds = %forcond14
  %27 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 1]
  br label %tailrecurse.i

tailrecurse.i:                                    ; preds = %else.i, %endfor17
  %accumulator.tr.i = phi i32 [ 1, %endfor17 ], [ %30, %else.i ] ; [#uses = 4, type = i32]
  %a_arg.tr.i = phi i32 [ %27, %endfor17 ], [ %29, %else.i ] ; [#uses = 3, type = i32]
  %28 = icmp slt i32 %a_arg.tr.i, 2               ; [#uses = 1]
  br i1 %28, label %_D6source9factorialFiZi.exit, label %else.i

else.i:                                           ; preds = %tailrecurse.i
  %29 = add nsw i32 %a_arg.tr.i, -1               ; [#uses = 1]
  %30 = mul i32 %a_arg.tr.i, %accumulator.tr.i    ; [#uses = 1]
  br label %tailrecurse.i

_D6source9factorialFiZi.exit:                     ; preds = %tailrecurse.i
  %31 = call { i64, { i64, i32* }* } @_D6source7dim2arrFiiZAAi(i32 %21, i32 %accumulator.tr.i) #0 ; [#uses = 2]
  %.ptr23 = extractvalue { i64, { i64, i32* }* } %31, 1 ; [#uses = 1]
  %.len24 = extractvalue { i64, { i64, i32* }* } %31, 0 ; [#uses = 1]
  store i64 %.len24, i64* getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 0), align 8
  store { i64, i32* }* %.ptr23, { i64, i32* }** getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 1), align 8
  %32 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 3]
  %33 = sext i32 %32 to i64                       ; [#uses = 5]
  %.gc_mem25 = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %33) #1 ; [#uses = 1]
  %.ptr26 = extractvalue { i64, i8* } %.gc_mem25, 1 ; [#uses = 1]
  %34 = bitcast i8* %.ptr26 to i32*               ; [#uses = 4]
  %35 = insertvalue { i64, i32* } undef, i64 %33, 0 ; [#uses = 1]
  %36 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 4]
  %37 = sext i32 %36 to i64                       ; [#uses = 4]
  %.gc_mem27 = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ab6__initZ to %object.TypeInfo*), i64 %37) #1 ; [#uses = 1]
  %.ptr28 = extractvalue { i64, i8* } %.gc_mem27, 1 ; [#uses = 3]
  %.fca.1.insert = insertvalue { i64, i32* } %35, i32* %34, 1 ; [#uses = 4]
  %38 = icmp sgt i32 %accumulator.tr.i, 0         ; [#uses = 1]
  %smax549 = select i1 %38, i32 %accumulator.tr.i, i32 0 ; [#uses = 3]
  br label %forcond29

forcond29:                                        ; preds = %bounds.ok80, %_D6source9factorialFiZi.exit
  %k.0 = phi i32 [ 0, %_D6source9factorialFiZi.exit ], [ %69, %bounds.ok80 ] ; [#uses = 4, type = i32]
  %exitcond550.not = icmp eq i32 %k.0, %smax549   ; [#uses = 1]
  br i1 %exitcond550.not, label %forcond84.preheader, label %forbody30

forcond84.preheader:                              ; preds = %forcond29
  %39 = zext i32 %32 to i64                       ; [#uses = 1]
  %.pre = load i32, i32* @_D6source4dMaxi, align 4 ; [#uses = 2]
  %wide.trip.count540 = zext i32 %smax549 to i64  ; [#uses = 1]
  br label %forcond84

forbody30:                                        ; preds = %forcond29
  call void @_D6source8sequenceFAiiZv(i32 %k.0, { i64, i32* } %.fca.1.insert) #0
  call void @llvm.memset.p0i8.i64(i8* align 1 %.ptr28, i8 0, i64 %37, i1 false)
  br label %forcond37

forcond37:                                        ; preds = %forinc39, %forbody30
  %__key110.0 = phi i64 [ 0, %forbody30 ], [ %64, %forinc39 ] ; [#uses = 3, type = i64]
  %sum.0 = phi i32 [ 0, %forbody30 ], [ %sum.1, %forinc39 ] ; [#uses = 2, type = i32]
  %exitcond548.not = icmp eq i64 %__key110.0, %33 ; [#uses = 1]
  br i1 %exitcond548.not, label %endfor40, label %forbody38

forbody38:                                        ; preds = %forcond37
  %40 = getelementptr inbounds i32, i32* %34, i64 %__key110.0 ; [#uses = 1, type = i32*]
  %41 = load i32, i32* %40, align 4               ; [#uses = 7]
  %42 = sext i32 %41 to i64                       ; [#uses = 5]
  %bounds.cmp45 = icmp ult i32 %41, %36           ; [#uses = 1]
  br i1 %bounds.cmp45, label %bounds.ok46, label %bounds.fail47

bounds.ok46:                                      ; preds = %forbody38
  %43 = getelementptr inbounds i8, i8* %.ptr28, i64 %42 ; [#uses = 1, type = i8*]
  store i8 1, i8* %43, align 1
  %.len49 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp50 = icmp ugt i64 %.len49, %42       ; [#uses = 1]
  br i1 %bounds.cmp50, label %bounds.ok51, label %bounds.fail52

bounds.ok51:                                      ; preds = %bounds.ok46
  %.ptr53 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %44 = getelementptr inbounds i32, i32* %.ptr53, i64 %42 ; [#uses = 1, type = i32*]
  %45 = load i32, i32* %44, align 4               ; [#uses = 2]
  %46 = sub i32 %41, %45                          ; [#uses = 2]
  %47 = icmp sgt i32 %46, 0                       ; [#uses = 1]
  %b_arg.a_arg.i299 = select i1 %47, i32 %46, i32 0 ; [#uses = 3]
  %48 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 2]
  %49 = add nuw i32 %41, 1                        ; [#uses = 1]
  %50 = add i32 %49, %45                          ; [#uses = 2]
  %51 = icmp slt i32 %50, %48                     ; [#uses = 1]
  %b_arg.a_arg.i300 = select i1 %51, i32 %50, i32 %48 ; [#uses = 1]
  %.len68 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp69 = icmp ugt i64 %.len68, %42       ; [#uses = 1]
  %.ptr72 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 1), align 8 ; [#uses = 1]
  %52 = getelementptr inbounds i32, i32* %.ptr72, i64 %42 ; [#uses = 1, type = i32*]
  %53 = zext i32 %b_arg.a_arg.i299 to i64         ; [#uses = 1]
  %54 = sext i32 %b_arg.a_arg.i300 to i64         ; [#uses = 1]
  %55 = icmp ugt i32 %36, %b_arg.a_arg.i299       ; [#uses = 1]
  %umax = select i1 %55, i32 %36, i32 %b_arg.a_arg.i299 ; [#uses = 2]
  %wide.trip.count546 = zext i32 %umax to i64     ; [#uses = 1]
  br label %bounds.ok60

bounds.ok60:                                      ; preds = %bounds.ok51, %forinc56
  %indvars.iv544 = phi i64 [ %53, %bounds.ok51 ], [ %indvars.iv.next545, %forinc56 ] ; [#uses = 4, type = i64]
  %sum.1 = phi i32 [ %sum.0, %bounds.ok51 ], [ %sum.2, %forinc56 ] ; [#uses = 3, type = i32]
  %56 = icmp slt i64 %indvars.iv544, %54          ; [#uses = 1]
  br i1 %56, label %forbody55, label %forinc39

forbody55:                                        ; preds = %bounds.ok60
  %exitcond547.not = icmp eq i64 %indvars.iv544, %wide.trip.count546 ; [#uses = 1]
  br i1 %exitcond547.not, label %bounds.fail66, label %bounds.ok65

bounds.ok65:                                      ; preds = %forbody55
  %57 = getelementptr inbounds i8, i8* %.ptr28, i64 %indvars.iv544 ; [#uses = 1, type = i8*]
  %58 = load i8, i8* %57, align 1, !range !4      ; [#uses = 1]
  %.not295 = icmp eq i8 %58, 0                    ; [#uses = 1]
  br i1 %.not295, label %if, label %forinc56

if:                                               ; preds = %bounds.ok65
  br i1 %bounds.cmp69, label %bounds.ok70, label %bounds.fail71

bounds.ok70:                                      ; preds = %if
  %59 = load i32, i32* %52, align 4               ; [#uses = 1]
  %60 = add i32 %59, %sum.1                       ; [#uses = 1]
  br label %forinc56

bounds.fail71:                                    ; preds = %if
  %61 = sext i32 %41 to i64                       ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 123, i64 %61, i64 %.len68) #2
  unreachable

bounds.fail66:                                    ; preds = %forbody55
  %wide.trip.count546.le = zext i32 %umax to i64  ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 122, i64 %wide.trip.count546.le, i64 %37) #2
  unreachable

forinc56:                                         ; preds = %bounds.ok65, %bounds.ok70
  %sum.2 = phi i32 [ %60, %bounds.ok70 ], [ %sum.1, %bounds.ok65 ] ; [#uses = 1, type = i32]
  %indvars.iv.next545 = add nuw nsw i64 %indvars.iv544, 1 ; [#uses = 1]
  br label %bounds.ok60

bounds.fail52:                                    ; preds = %bounds.ok46
  %62 = sext i32 %41 to i64                       ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 121, i64 %62, i64 %.len49) #2
  unreachable

bounds.fail47:                                    ; preds = %forbody38
  %63 = sext i32 %41 to i64                       ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 120, i64 %63, i64 %37) #2
  unreachable

forinc39:                                         ; preds = %bounds.ok60
  %64 = add i64 %__key110.0, 1                    ; [#uses = 1]
  br label %forcond37

endfor40:                                         ; preds = %forcond37
  %.len73 = load i64, i64* getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 0), align 8 ; [#uses = 1]
  %bounds.cmp74.not = icmp eq i64 %.len73, 0      ; [#uses = 1]
  br i1 %bounds.cmp74.not, label %bounds.fail76, label %bounds.ok75

bounds.ok75:                                      ; preds = %endfor40
  %.ptr77 = load { i64, i32* }*, { i64, i32* }** getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 1), align 8 ; [#uses = 2]
  %65 = sext i32 %k.0 to i64                      ; [#uses = 3]
  %66 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr77, i64 0, i32 0 ; [#uses = 1, type = i64*]
  %.len78 = load i64, i64* %66, align 8           ; [#uses = 2]
  %bounds.cmp79 = icmp ugt i64 %.len78, %65       ; [#uses = 1]
  br i1 %bounds.cmp79, label %bounds.ok80, label %bounds.fail81

bounds.ok80:                                      ; preds = %bounds.ok75
  %67 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr77, i64 0, i32 1 ; [#uses = 1, type = i32**]
  %.ptr82 = load i32*, i32** %67, align 8         ; [#uses = 1]
  %68 = getelementptr inbounds i32, i32* %.ptr82, i64 %65 ; [#uses = 1, type = i32*]
  store i32 %sum.0, i32* %68, align 4
  %69 = add nuw i32 %k.0, 1                       ; [#uses = 1]
  br label %forcond29

bounds.fail81:                                    ; preds = %bounds.ok75
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 126, i64 %65, i64 %.len78) #2
  unreachable

bounds.fail76:                                    ; preds = %endfor40
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 126, i64 0, i64 0) #2
  unreachable

forcond84:                                        ; preds = %forcond89, %forcond84.preheader
  %70 = phi i32 [ %.pre, %forcond84.preheader ], [ %79, %forcond89 ] ; [#uses = 1, type = i32]
  %71 = phi i32 [ %.pre, %forcond84.preheader ], [ %80, %forcond89 ] ; [#uses = 2, type = i32]
  %indvars.iv542 = phi i64 [ 0, %forcond84.preheader ], [ %indvars.iv.next543, %forcond89 ] ; [#uses = 8, type = i64]
  %72 = load i32, i32* %n, align 4                ; [#uses = 1]
  %73 = sub i32 %72, %71                          ; [#uses = 3]
  %74 = sext i32 %73 to i64                       ; [#uses = 1]
  %75 = icmp slt i64 %indvars.iv542, %74          ; [#uses = 1]
  br i1 %75, label %forcond89.preheader, label %endfor87

forcond89.preheader:                              ; preds = %forcond84
  %indvars.iv.next543 = add nuw nsw i64 %indvars.iv542, 1 ; [#uses = 2]
  %sext = shl i64 %indvars.iv.next543, 32         ; [#uses = 1]
  %76 = ashr exact i64 %sext, 32                  ; [#uses = 4]
  %77 = trunc i64 %indvars.iv542 to i32           ; [#uses = 1]
  %78 = trunc i64 %indvars.iv542 to i32           ; [#uses = 1]
  br label %forcond89

forcond89:                                        ; preds = %forcond89.preheader, %forinc91
  %79 = phi i32 [ %70, %forcond89.preheader ], [ %82, %forinc91 ] ; [#uses = 2, type = i32]
  %80 = phi i32 [ %71, %forcond89.preheader ], [ %82, %forinc91 ] ; [#uses = 1, type = i32]
  %indvars.iv537 = phi i64 [ 0, %forcond89.preheader ], [ %indvars.iv.next538, %forinc91 ] ; [#uses = 6, type = i64]
  %exitcond541.not = icmp eq i64 %indvars.iv537, %wide.trip.count540 ; [#uses = 1]
  br i1 %exitcond541.not, label %forcond84, label %forcond94.preheader

forcond94.preheader:                              ; preds = %forcond89
  %81 = trunc i64 %indvars.iv537 to i32           ; [#uses = 1]
  br label %forcond94

forcond94:                                        ; preds = %forcond94.preheader, %bounds.ok162
  %82 = phi i32 [ %79, %forcond94.preheader ], [ %.pre555, %bounds.ok162 ] ; [#uses = 3, type = i32]
  %indvars.iv534 = phi i64 [ 0, %forcond94.preheader ], [ %indvars.iv.next535, %bounds.ok162 ] ; [#uses = 2, type = i64]
  %indvars.iv531 = phi i64 [ 0, %forcond94.preheader ], [ %indvars.iv.next532, %bounds.ok162 ] ; [#uses = 9, type = i64]
  %83 = add i32 %82, 1                            ; [#uses = 1]
  %84 = sext i32 %83 to i64                       ; [#uses = 1]
  %85 = icmp slt i64 %indvars.iv531, %84          ; [#uses = 1]
  br i1 %85, label %forbody95, label %forinc91

forbody95:                                        ; preds = %forcond94
  %.len98 = load i64, i64* getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp99 = icmp ugt i64 %.len98, %indvars.iv542 ; [#uses = 1]
  br i1 %bounds.cmp99, label %bounds.ok100, label %bounds.fail101

bounds.ok100:                                     ; preds = %forbody95
  %.ptr102 = load { i64, i32* }*, { i64, i32* }** getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 1), align 8 ; [#uses = 2]
  %86 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr102, i64 %indvars.iv542, i32 0 ; [#uses = 1, type = i64*]
  %.len103 = load i64, i64* %86, align 8          ; [#uses = 2]
  %bounds.cmp104 = icmp ugt i64 %.len103, %indvars.iv537 ; [#uses = 1]
  br i1 %bounds.cmp104, label %bounds.ok105, label %bounds.fail106

bounds.ok105:                                     ; preds = %bounds.ok100
  %87 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr102, i64 %indvars.iv542, i32 1 ; [#uses = 1, type = i32**]
  %.ptr107 = load i32*, i32** %87, align 8        ; [#uses = 1]
  %88 = getelementptr inbounds i32, i32* %.ptr107, i64 %indvars.iv537 ; [#uses = 1, type = i32*]
  %89 = load i32, i32* %88, align 4               ; [#uses = 1]
  call void @_D6source8sequenceFAiiZv(i32 %81, { i64, i32* } %.fca.1.insert) #0
  %bounds.cmp.up.not = icmp ugt i64 %indvars.iv531, %39 ; [#uses = 1]
  br i1 %bounds.cmp.up.not, label %bounds.fail109, label %forcond112.preheader

forcond112.preheader:                             ; preds = %bounds.ok105
  %.len118 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 0), align 8 ; [#uses = 4]
  %90 = load i32, i32* @_D6source4dMaxi, align 4  ; [#uses = 8]
  %.ptr122 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2dsAi, i64 0, i32 1), align 8 ; [#uses = 2]
  %.len125 = load i64, i64* getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 0), align 8 ; [#uses = 4]
  %.ptr129 = load i32*, i32** getelementptr inbounds ({ i64, i32* }, { i64, i32* }* @_D6source2asAi, i64 0, i32 1), align 8 ; [#uses = 2]
  br label %forcond112

forcond112:                                       ; preds = %forcond112.preheader, %forinc114
  %s.0 = phi i32 [ %s.1, %forinc114 ], [ %89, %forcond112.preheader ] ; [#uses = 3, type = i32]
  %__key112.0 = phi i64 [ %101, %forinc114 ], [ 0, %forcond112.preheader ] ; [#uses = 3, type = i64]
  %exitcond533.not = icmp eq i64 %__key112.0, %indvars.iv531 ; [#uses = 1]
  br i1 %exitcond533.not, label %endfor115, label %forbody113

forbody113:                                       ; preds = %forcond112
  %91 = getelementptr inbounds i32, i32* %34, i64 %__key112.0 ; [#uses = 1, type = i32*]
  %92 = load i32, i32* %91, align 4               ; [#uses = 2]
  %93 = add i32 %92, %77                          ; [#uses = 1]
  %94 = sext i32 %93 to i64                       ; [#uses = 6]
  %bounds.cmp119 = icmp ugt i64 %.len118, %94     ; [#uses = 1]
  br i1 %bounds.cmp119, label %bounds.ok120, label %bounds.fail121

bounds.ok120:                                     ; preds = %forbody113
  %95 = sub i32 %90, %92                          ; [#uses = 1]
  %96 = getelementptr inbounds i32, i32* %.ptr122, i64 %94 ; [#uses = 1, type = i32*]
  %97 = load i32, i32* %96, align 4               ; [#uses = 1]
  %.not294 = icmp sgt i32 %95, %97                ; [#uses = 1]
  br i1 %.not294, label %forinc114, label %if123

if123:                                            ; preds = %bounds.ok120
  %bounds.cmp126 = icmp ugt i64 %.len125, %94     ; [#uses = 1]
  br i1 %bounds.cmp126, label %bounds.ok127, label %bounds.fail128

bounds.ok127:                                     ; preds = %if123
  %98 = getelementptr inbounds i32, i32* %.ptr129, i64 %94 ; [#uses = 1, type = i32*]
  %99 = load i32, i32* %98, align 4               ; [#uses = 1]
  %100 = add i32 %99, %s.0                        ; [#uses = 1]
  br label %forinc114

bounds.fail128:                                   ; preds = %if123
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 137, i64 %94, i64 %.len125) #2
  unreachable

bounds.fail121:                                   ; preds = %forbody113
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 136, i64 %94, i64 %.len118) #2
  unreachable

forinc114:                                        ; preds = %bounds.ok120, %bounds.ok127
  %s.1 = phi i32 [ %100, %bounds.ok127 ], [ %s.0, %bounds.ok120 ] ; [#uses = 1, type = i32]
  %101 = add nuw nsw i64 %__key112.0, 1           ; [#uses = 1]
  br label %forcond112

endfor115:                                        ; preds = %forcond112
  %bounds.cmp.up133 = icmp ule i32 %90, %32       ; [#uses = 1]
  %102 = zext i32 %90 to i64                      ; [#uses = 1]
  %bounds.cmp.lo = icmp ule i64 %indvars.iv531, %102 ; [#uses = 1]
  %103 = and i1 %bounds.cmp.up133, %bounds.cmp.lo ; [#uses = 1]
  %104 = sext i32 %90 to i64                      ; [#uses = 1]
  br i1 %103, label %bounds.ok130, label %bounds.fail131

bounds.ok130:                                     ; preds = %endfor115
  %lowerbound135 = getelementptr inbounds i32, i32* %34, i64 %indvars.iv531 ; [#uses = 1, type = i32*]
  %105 = add i32 %90, %78                         ; [#uses = 1]
  %106 = sext i32 %105 to i64                     ; [#uses = 6]
  %bounds.cmp144 = icmp ugt i64 %.len118, %106    ; [#uses = 1]
  %107 = getelementptr inbounds i32, i32* %.ptr122, i64 %106 ; [#uses = 1, type = i32*]
  %bounds.cmp151 = icmp ugt i64 %.len125, %106    ; [#uses = 1]
  %108 = getelementptr inbounds i32, i32* %.ptr129, i64 %106 ; [#uses = 1, type = i32*]
  %109 = add i64 %indvars.iv534, %104             ; [#uses = 1]
  br label %forcond136

forcond136:                                       ; preds = %forinc138, %bounds.ok130
  %s.2 = phi i32 [ %s.0, %bounds.ok130 ], [ %s.3, %forinc138 ] ; [#uses = 4, type = i32]
  %__key114.0 = phi i64 [ 0, %bounds.ok130 ], [ %116, %forinc138 ] ; [#uses = 3, type = i64]
  %exitcond536.not = icmp eq i64 %__key114.0, %109 ; [#uses = 1]
  br i1 %exitcond536.not, label %endfor139, label %forbody137

forbody137:                                       ; preds = %forcond136
  br i1 %bounds.cmp144, label %bounds.ok145, label %bounds.fail146

bounds.ok145:                                     ; preds = %forbody137
  %110 = getelementptr inbounds i32, i32* %lowerbound135, i64 %__key114.0 ; [#uses = 1, type = i32*]
  %111 = load i32, i32* %110, align 4             ; [#uses = 1]
  %112 = sub i32 %90, %111                        ; [#uses = 1]
  %113 = load i32, i32* %107, align 4             ; [#uses = 1]
  %.not = icmp sgt i32 %112, %113                 ; [#uses = 1]
  br i1 %.not, label %forinc138, label %if148

if148:                                            ; preds = %bounds.ok145
  br i1 %bounds.cmp151, label %bounds.ok152, label %bounds.fail153

bounds.ok152:                                     ; preds = %if148
  %114 = load i32, i32* %108, align 4             ; [#uses = 1]
  %115 = add i32 %114, %s.2                       ; [#uses = 1]
  br label %forinc138

bounds.fail153:                                   ; preds = %if148
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 142, i64 %106, i64 %.len125) #2
  unreachable

bounds.fail146:                                   ; preds = %forbody137
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 141, i64 %106, i64 %.len118) #2
  unreachable

forinc138:                                        ; preds = %bounds.ok145, %bounds.ok152
  %s.3 = phi i32 [ %115, %bounds.ok152 ], [ %s.2, %bounds.ok145 ] ; [#uses = 1, type = i32]
  %116 = add i64 %__key114.0, 1                   ; [#uses = 1]
  br label %forcond136

endfor139:                                        ; preds = %forcond136
  %117 = add i32 %90, -1                          ; [#uses = 1]
  %118 = trunc i64 %indvars.iv531 to i32          ; [#uses = 1]
  call void @_D6source11step_insertFAiiiZv(i32 %118, i32 %117, { i64, i32* } %.fca.1.insert) #0
  %119 = call i32 @_D6source6seqIdxFAiZi({ i64, i32* } %.fca.1.insert) #0 ; [#uses = 1]
  %.len155 = load i64, i64* getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp156 = icmp ugt i64 %.len155, %76     ; [#uses = 1]
  br i1 %bounds.cmp156, label %bounds.ok157, label %bounds.fail158

bounds.ok157:                                     ; preds = %endfor139
  %.ptr159 = load { i64, i32* }*, { i64, i32* }** getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 1), align 8 ; [#uses = 2]
  %120 = sext i32 %119 to i64                     ; [#uses = 3]
  %121 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr159, i64 %76, i32 0 ; [#uses = 1, type = i64*]
  %.len160 = load i64, i64* %121, align 8         ; [#uses = 2]
  %bounds.cmp161 = icmp ugt i64 %.len160, %120    ; [#uses = 1]
  br i1 %bounds.cmp161, label %bounds.ok162, label %bounds.fail163

bounds.ok162:                                     ; preds = %bounds.ok157
  %122 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr159, i64 %76, i32 1 ; [#uses = 1, type = i32**]
  %.ptr164 = load i32*, i32** %122, align 8       ; [#uses = 1]
  %123 = getelementptr inbounds i32, i32* %.ptr164, i64 %120 ; [#uses = 2, type = i32*]
  %124 = load i32, i32* %123, align 4             ; [#uses = 2]
  %125 = icmp slt i32 %124, %s.2                  ; [#uses = 1]
  %b_arg.a_arg.i298 = select i1 %125, i32 %s.2, i32 %124 ; [#uses = 1]
  store i32 %b_arg.a_arg.i298, i32* %123, align 4
  %indvars.iv.next532 = add nuw nsw i64 %indvars.iv531, 1 ; [#uses = 1]
  %indvars.iv.next535 = add nsw i64 %indvars.iv534, -1 ; [#uses = 1]
  %.pre555 = load i32, i32* @_D6source4dMaxi, align 4 ; [#uses = 1]
  br label %forcond94

bounds.fail163:                                   ; preds = %bounds.ok157
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 147, i64 %120, i64 %.len160) #2
  unreachable

bounds.fail158:                                   ; preds = %endfor139
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 147, i64 %76, i64 %.len155) #2
  unreachable

bounds.fail131:                                   ; preds = %endfor115
  %126 = sext i32 %90 to i64                      ; [#uses = 1]
  call void @_d_arraybounds_slice({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 140, i64 %indvars.iv531, i64 %126, i64 %33) #2
  unreachable

bounds.fail109:                                   ; preds = %bounds.ok105
  call void @_d_arraybounds_slice({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 135, i64 0, i64 %indvars.iv531, i64 %33) #2
  unreachable

bounds.fail106:                                   ; preds = %bounds.ok100
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 132, i64 %indvars.iv537, i64 %.len103) #2
  unreachable

bounds.fail101:                                   ; preds = %forbody95
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 132, i64 %indvars.iv542, i64 %.len98) #2
  unreachable

forinc91:                                         ; preds = %forcond94
  %indvars.iv.next538 = add nuw nsw i64 %indvars.iv537, 1 ; [#uses = 1]
  br label %forcond89

endfor87:                                         ; preds = %forcond84
  %127 = icmp sgt i32 %73, 0                      ; [#uses = 1]
  %b_arg.a_arg.i297 = select i1 %127, i32 %73, i32 0 ; [#uses = 1]
  %128 = zext i32 %b_arg.a_arg.i297 to i64        ; [#uses = 4]
  %.len180 = load i64, i64* getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 0), align 8 ; [#uses = 2]
  %bounds.cmp181 = icmp ugt i64 %.len180, %128    ; [#uses = 1]
  %.ptr184 = load { i64, i32* }*, { i64, i32* }** getelementptr inbounds ({ i64, { i64, i32* }* }, { i64, { i64, i32* }* }* @_D6source2dpAAi, i64 0, i32 1), align 8 ; [#uses = 2]
  %129 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr184, i64 %128, i32 0 ; [#uses = 1, type = i64*]
  %130 = getelementptr inbounds { i64, i32* }, { i64, i32* }* %.ptr184, i64 %128, i32 1 ; [#uses = 1, type = i32**]
  %wide.trip.count = zext i32 %smax549 to i64     ; [#uses = 1]
  br label %forcond176

forcond176:                                       ; preds = %bounds.ok187, %endfor87
  %indvars.iv = phi i64 [ %indvars.iv.next, %bounds.ok187 ], [ 0, %endfor87 ] ; [#uses = 5, type = i64]
  %ans.0 = phi i32 [ %b_arg.a_arg.i296, %bounds.ok187 ], [ 0, %endfor87 ] ; [#uses = 3, type = i32]
  %exitcond.not = icmp eq i64 %indvars.iv, %wide.trip.count ; [#uses = 1]
  br i1 %exitcond.not, label %endfor179, label %forbody177

forbody177:                                       ; preds = %forcond176
  br i1 %bounds.cmp181, label %bounds.ok182, label %bounds.fail183

bounds.ok182:                                     ; preds = %forbody177
  %.len185 = load i64, i64* %129, align 8         ; [#uses = 2]
  %bounds.cmp186 = icmp ugt i64 %.len185, %indvars.iv ; [#uses = 1]
  br i1 %bounds.cmp186, label %bounds.ok187, label %bounds.fail188

bounds.ok187:                                     ; preds = %bounds.ok182
  %.ptr189 = load i32*, i32** %130, align 8       ; [#uses = 1]
  %131 = getelementptr inbounds i32, i32* %.ptr189, i64 %indvars.iv ; [#uses = 1, type = i32*]
  %132 = load i32, i32* %131, align 4             ; [#uses = 2]
  %133 = icmp slt i32 %132, %ans.0                ; [#uses = 1]
  %b_arg.a_arg.i296 = select i1 %133, i32 %ans.0, i32 %132 ; [#uses = 1]
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 ; [#uses = 1]
  br label %forcond176

bounds.fail188:                                   ; preds = %bounds.ok182
  %134 = and i64 %indvars.iv, 4294967295          ; [#uses = 1]
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 155, i64 %134, i64 %.len185) #2
  unreachable

bounds.fail183:                                   ; preds = %forbody177
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i32 0, i32 0) }, i32 155, i64 %128, i64 %.len180) #2
  unreachable

endfor179:                                        ; preds = %forcond176
  %135 = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %ans.0) #7 ; [#uses = 0]
  ret i32 0
}

; [#uses = 3]
; Function Attrs: nofree nounwind
declare i32 @scanf(i8* nocapture readonly, ...) local_unnamed_addr #6

; [#uses = 0]
; Function Attrs: uwtable
define weak_odr i32 @_D3std9algorithm10comparison__T3maxTiTiZQjFNaNbNiNfiiZi(i32 %b_arg, i32 %a_arg) local_unnamed_addr #0 {
condend:
  %0 = icmp slt i32 %a_arg, %b_arg                ; [#uses = 1]
  %b_arg.a_arg = select i1 %0, i32 %b_arg, i32 %a_arg ; [#uses = 1]
  ret i32 %b_arg.a_arg
}

; [#uses = 0]
; Function Attrs: uwtable
define weak_odr i32 @_D3std9algorithm10comparison__T3minTiTiZQjFNaNbNiNfiiZi(i32 %b_arg, i32 %a_arg) local_unnamed_addr #0 {
condend:
  %0 = icmp slt i32 %b_arg, %a_arg                ; [#uses = 1]
  %b_arg.a_arg = select i1 %0, i32 %b_arg, i32 %a_arg ; [#uses = 1]
  ret i32 %b_arg.a_arg
}

; [#uses = 1]
; Function Attrs: nofree nounwind
declare i32 @printf(i8* nocapture readonly, ...) local_unnamed_addr #6

; [#uses = 1]
declare i32 @_d_run_main(i32, i8**, i8*) local_unnamed_addr #7

; [#uses = 0]
; Function Attrs: uwtable
define i32 @main(i32 %argc_arg, i8** %argv_arg) local_unnamed_addr #0 {
  %1 = tail call i32 @_d_run_main(i32 %argc_arg, i8** %argv_arg, i8* bitcast (i32 ({ i64, { i64, i8* }* })* @_Dmain to i8*)) #7 ; [#uses = 1]
  ret i32 %1
}

; [#uses = 2]
define linkonce_odr hidden void @ldc.register_dso() {
  %1 = alloca { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, align 8 ; [#uses = 5, size/byte = 32]
  %2 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 0 ; [#uses = 1, type = i64*]
  store i64 1, i64* %2, align 8
  %3 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 1 ; [#uses = 1, type = i8***]
  store i8** @ldc.dso_slot, i8*** %3, align 8
  %4 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 2 ; [#uses = 1, type = %object.ModuleInfo***]
  store %object.ModuleInfo** @__start___minfo, %object.ModuleInfo*** %4, align 8
  %5 = getelementptr inbounds { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }, { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1, i64 0, i32 3 ; [#uses = 1, type = %object.ModuleInfo***]
  store %object.ModuleInfo** @__stop___minfo, %object.ModuleInfo*** %5, align 8
  %6 = bitcast { i64, i8**, %object.ModuleInfo**, %object.ModuleInfo** }* %1 to i8* ; [#uses = 1]
  call void @_d_dso_registry(i8* nonnull %6)
  ret void
}

; [#uses = 1]
; Function Attrs: uwtable
declare void @_d_dso_registry(i8*) local_unnamed_addr #1

attributes #0 = { uwtable "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #1 = { uwtable }
attributes #2 = { cold noreturn uwtable }
attributes #3 = { nounwind readnone uwtable "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #4 = { argmemonly nounwind willreturn writeonly }
attributes #5 = { uwtable "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16,+cx16" }
attributes #6 = { nofree nounwind "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }
attributes #7 = { "frame-pointer"="none" "target-cpu"="x86-64" "target-features"="+cx16" }

!llvm.ldc.typeinfo._D11TypeInfo_Ai6__initZ = !{!0}
!llvm.ldc.typeinfo._D12TypeInfo_AAi6__initZ = !{!1}
!llvm.ldc.typeinfo._D11TypeInfo_Ab6__initZ = !{!2}
!llvm.ident = !{!3}

!0 = !{{ i64, i32* } undef}
!1 = !{{ i64, { i64, i32* }* } undef}
!2 = !{{ i64, i8* } undef}
!3 = !{!"ldc version 1.28.0"}
!4 = !{i8 0, i8 2}
