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

void main(){
	int n;
	scanf("%d",&n);
	int[] a = new int[n];
	foreach(ref v;a)
		scanf("%d",&v);
	long[][] dp = new long[][](n,n);
	int l = n%2;
	if(l)
		foreach(i;0..n)
			dp[0][i]=a[i];
	foreach(s;1..n){
		l^=1;
		foreach(i;0..n)
			if(l)
				dp[s][i]=max(dp[s-1][i]+a[(i+s)%n],dp[s-1][(i+1)%n]+a[i]);
			else
				dp[s][i]=a[(i+s)%n]>a[i]?dp[s-1][i]:dp[s-1][(i+1)%n];
	}
	long ans;
	foreach(d;dp[n-1])
		ans=max(d,ans);
	printf("%lld\n",ans);
}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/D/Source_19872/source.d'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/D/Source_19872/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 }

@.str = private unnamed_addr constant [3 x i8] c"%d\00" ; [#uses = 1]
@_D11TypeInfo_Ai6__initZ = external global %object.TypeInfo_Array ; [#uses = 1]
@_D12TypeInfo_AAl6__initZ = linkonce_odr global %object.TypeInfo_Array { [19 x i8*]* @_D14TypeInfo_Array6__vtblZ, i8* null, %object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Al6__initZ to %object.TypeInfo*) } ; [#uses = 1]
@_D14TypeInfo_Array6__vtblZ = external constant [19 x i8*] ; [#uses = 1]
@_D11TypeInfo_Al6__initZ = external global %object.TypeInfo_Array ; [#uses = 1]
@.str.1 = private unnamed_addr constant [62 x i8] c"/data/TheStack_IR/OJ_Samples/Collated/D/Source_19872/source.d\00" ; [#uses = 1]
@.str.2 = private unnamed_addr constant [6 x i8] c"%lld\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 i32 @_Dmain({ i64, { i64, i8* }* } %unnamed) #0 {
  %n = alloca i32, align 4                        ; [#uses = 5, size/byte = 4]
  %.dimarray = alloca [2 x i64], align 8          ; [#uses = 2, size/byte = 16]
  store i32 0, i32* %n, align 4
  %1 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* nonnull %n) #5 ; [#uses = 0]
  %2 = load i32, i32* %n, align 4                 ; [#uses = 5]
  %3 = sext i32 %2 to i64                         ; [#uses = 7]
  %.gc_mem = call { i64, i8* } @_d_newarrayT(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D11TypeInfo_Ai6__initZ to %object.TypeInfo*), i64 %3) #2 ; [#uses = 1]
  %.ptr = extractvalue { i64, i8* } %.gc_mem, 1   ; [#uses = 1]
  %4 = bitcast i8* %.ptr to i32*                  ; [#uses = 6]
  br label %forcond

forcond:                                          ; preds = %forbody, %0
  %__key103.0 = phi i64 [ 0, %0 ], [ %7, %forbody ] ; [#uses = 3, type = i64]
  %exitcond353.not = icmp eq i64 %__key103.0, %3  ; [#uses = 1]
  br i1 %exitcond353.not, label %endfor, label %forbody

forbody:                                          ; preds = %forcond
  %5 = getelementptr inbounds i32, i32* %4, i64 %__key103.0 ; [#uses = 1, type = i32*]
  %6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5) #5 ; [#uses = 0]
  %7 = add i64 %__key103.0, 1                     ; [#uses = 1]
  br label %forcond

endfor:                                           ; preds = %forcond
  %8 = load i32, i32* %n, align 4                 ; [#uses = 1]
  %9 = sext i32 %8 to i64                         ; [#uses = 2]
  %.ndim = getelementptr inbounds [2 x i64], [2 x i64]* %.dimarray, i64 0, i64 0 ; [#uses = 2, type = i64*]
  store i64 %9, i64* %.ndim, align 8
  %.ndim4 = getelementptr inbounds [2 x i64], [2 x i64]* %.dimarray, i64 0, i64 1 ; [#uses = 1, type = i64*]
  store i64 %9, i64* %.ndim4, align 8
  %.fca.1.insert = insertvalue { i64, i64* } { i64 2, i64* undef }, i64* %.ndim, 1 ; [#uses = 1]
  %.gc_mem7 = call { i64, i8* } @_d_newarraymTX(%object.TypeInfo* bitcast (%object.TypeInfo_Array* @_D12TypeInfo_AAl6__initZ to %object.TypeInfo*), { i64, i64* } %.fca.1.insert) #2 ; [#uses = 2]
  %.len8 = extractvalue { i64, i8* } %.gc_mem7, 0 ; [#uses = 10]
  %.ptr9 = extractvalue { i64, i8* } %.gc_mem7, 1 ; [#uses = 3]
  %10 = bitcast i8* %.ptr9 to { i64, i64* }*      ; [#uses = 6]
  %11 = load i32, i32* %n, align 4                ; [#uses = 11]
  %12 = srem i32 %11, 2                           ; [#uses = 2]
  %.not = icmp eq i32 %12, 0                      ; [#uses = 1]
  br i1 %.not, label %endif, label %forcond10.preheader

forcond10.preheader:                              ; preds = %endfor
  %bounds.cmp.not = icmp eq i64 %.len8, 0         ; [#uses = 1]
  %13 = bitcast i8* %.ptr9 to i64*                ; [#uses = 1]
  %14 = getelementptr inbounds i8, i8* %.ptr9, i64 8 ; [#uses = 1, type = i8*]
  %15 = bitcast i8* %14 to i64**                  ; [#uses = 1]
  %16 = icmp sgt i32 %11, 0                       ; [#uses = 1]
  %smax350 = select i1 %16, i32 %11, i32 0        ; [#uses = 1]
  br label %forcond10

forcond10:                                        ; preds = %forcond10.preheader, %bounds.ok23
  %__key104.0 = phi i32 [ %22, %bounds.ok23 ], [ 0, %forcond10.preheader ] ; [#uses = 4, type = i32]
  %exitcond351.not = icmp eq i32 %__key104.0, %smax350 ; [#uses = 1]
  br i1 %exitcond351.not, label %endif, label %forbody11

forbody11:                                        ; preds = %forcond10
  br i1 %bounds.cmp.not, label %bounds.fail, label %bounds.ok

bounds.ok:                                        ; preds = %forbody11
  %17 = sext i32 %__key104.0 to i64               ; [#uses = 5]
  %.len16 = load i64, i64* %13, align 8           ; [#uses = 2]
  %bounds.cmp17 = icmp ugt i64 %.len16, %17       ; [#uses = 1]
  br i1 %bounds.cmp17, label %bounds.ok18, label %bounds.fail19

bounds.ok18:                                      ; preds = %bounds.ok
  %exitcond352.not = icmp eq i32 %__key104.0, %2  ; [#uses = 1]
  br i1 %exitcond352.not, label %bounds.fail24, label %bounds.ok23

bounds.ok23:                                      ; preds = %bounds.ok18
  %.ptr20 = load i64*, i64** %15, align 8         ; [#uses = 1]
  %18 = getelementptr inbounds i64, i64* %.ptr20, i64 %17 ; [#uses = 1, type = i64*]
  %19 = getelementptr inbounds i32, i32* %4, i64 %17 ; [#uses = 1, type = i32*]
  %20 = load i32, i32* %19, align 4               ; [#uses = 1]
  %21 = sext i32 %20 to i64                       ; [#uses = 1]
  store i64 %21, i64* %18, align 8
  %22 = add nuw i32 %__key104.0, 1                ; [#uses = 1]
  br label %forcond10

bounds.fail24:                                    ; preds = %bounds.ok18
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 14, i64 %17, i64 %3) #3
  unreachable

bounds.fail19:                                    ; preds = %bounds.ok
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 14, i64 %17, i64 %.len16) #3
  unreachable

bounds.fail:                                      ; preds = %forbody11
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 14, i64 0, i64 0) #3
  unreachable

endif:                                            ; preds = %forcond10, %endfor
  %23 = zext i32 %2 to i64                        ; [#uses = 2]
  %24 = icmp sgt i32 %11, 1                       ; [#uses = 1]
  %smax = select i1 %24, i32 %11, i32 1           ; [#uses = 1]
  %wide.trip.count348 = zext i32 %smax to i64     ; [#uses = 1]
  %wide.trip.count = zext i32 %11 to i64          ; [#uses = 1]
  br label %forcond26

forcond26:                                        ; preds = %forinc28, %endif
  %indvars.iv346 = phi i64 [ %indvars.iv.next347, %forinc28 ], [ 1, %endif ] ; [#uses = 10, type = i64]
  %l.0 = phi i32 [ %25, %forinc28 ], [ %12, %endif ] ; [#uses = 1, type = i32]
  %exitcond349.not = icmp eq i64 %indvars.iv346, %wide.trip.count348 ; [#uses = 1]
  br i1 %exitcond349.not, label %endfor29, label %forbody27

forbody27:                                        ; preds = %forcond26
  %25 = xor i32 %l.0, 1                           ; [#uses = 2]
  %.not192 = icmp eq i32 %25, 0                   ; [#uses = 1]
  %bounds.cmp38 = icmp ugt i64 %.len8, %indvars.iv346 ; [#uses = 2]
  %26 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %indvars.iv346, i32 0 ; [#uses = 2, type = i64*]
  %27 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %indvars.iv346, i32 1 ; [#uses = 2, type = i64**]
  %28 = add nsw i64 %indvars.iv346, -1            ; [#uses = 6]
  %bounds.cmp48 = icmp ugt i64 %.len8, %28        ; [#uses = 3]
  %29 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %28, i32 0 ; [#uses = 3, type = i64*]
  %30 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %28, i32 1 ; [#uses = 3, type = i64**]
  br label %forcond30

forcond30:                                        ; preds = %forcond30.backedge, %forbody27
  %indvars.iv = phi i64 [ 0, %forbody27 ], [ %indvars.iv.be, %forcond30.backedge ] ; [#uses = 24, type = i64]
  %exitcond345.not = icmp eq i64 %indvars.iv, %wide.trip.count ; [#uses = 1]
  br i1 %exitcond345.not, label %forinc28, label %forbody31

forbody31:                                        ; preds = %forcond30
  br i1 %.not192, label %else, label %if35

if35:                                             ; preds = %forbody31
  br i1 %bounds.cmp38, label %bounds.ok39, label %bounds.fail40

bounds.ok39:                                      ; preds = %if35
  %.len42 = load i64, i64* %26, align 8           ; [#uses = 2]
  %bounds.cmp43 = icmp ugt i64 %.len42, %indvars.iv ; [#uses = 1]
  br i1 %bounds.cmp43, label %bounds.ok44, label %bounds.fail45

bounds.ok44:                                      ; preds = %bounds.ok39
  %.ptr46 = load i64*, i64** %27, align 8         ; [#uses = 1]
  %31 = getelementptr inbounds i64, i64* %.ptr46, i64 %indvars.iv ; [#uses = 1, type = i64*]
  br i1 %bounds.cmp48, label %bounds.ok49, label %bounds.fail50

bounds.ok49:                                      ; preds = %bounds.ok44
  %.len52 = load i64, i64* %29, align 8           ; [#uses = 4]
  %bounds.cmp53 = icmp ugt i64 %.len52, %indvars.iv ; [#uses = 1]
  br i1 %bounds.cmp53, label %bounds.ok54, label %bounds.fail55

bounds.ok54:                                      ; preds = %bounds.ok49
  %.ptr56 = load i64*, i64** %30, align 8         ; [#uses = 2]
  %32 = add nuw nsw i64 %indvars.iv, %indvars.iv346 ; [#uses = 1]
  %33 = trunc i64 %32 to i32                      ; [#uses = 1]
  %34 = srem i32 %33, %11                         ; [#uses = 2]
  %35 = sext i32 %34 to i64                       ; [#uses = 2]
  %bounds.cmp58 = icmp ult i32 %34, %2            ; [#uses = 1]
  br i1 %bounds.cmp58, label %bounds.ok59, label %bounds.fail60

bounds.ok59:                                      ; preds = %bounds.ok54
  %36 = getelementptr inbounds i64, i64* %.ptr56, i64 %indvars.iv ; [#uses = 1, type = i64*]
  %37 = load i64, i64* %36, align 8               ; [#uses = 1]
  %38 = getelementptr inbounds i32, i32* %4, i64 %35 ; [#uses = 1, type = i32*]
  %39 = load i32, i32* %38, align 4               ; [#uses = 1]
  %40 = sext i32 %39 to i64                       ; [#uses = 1]
  %41 = add i64 %37, %40                          ; [#uses = 2]
  %42 = add nuw nsw i64 %indvars.iv, 1            ; [#uses = 2]
  %43 = trunc i64 %42 to i32                      ; [#uses = 1]
  %44 = srem i32 %43, %11                         ; [#uses = 1]
  %45 = sext i32 %44 to i64                       ; [#uses = 3]
  %bounds.cmp68 = icmp ugt i64 %.len52, %45       ; [#uses = 1]
  br i1 %bounds.cmp68, label %bounds.ok69, label %bounds.fail70

bounds.ok69:                                      ; preds = %bounds.ok59
  %bounds.cmp73 = icmp ult i64 %indvars.iv, %23   ; [#uses = 1]
  br i1 %bounds.cmp73, label %bounds.ok74, label %bounds.fail75

bounds.ok74:                                      ; preds = %bounds.ok69
  %46 = getelementptr inbounds i64, i64* %.ptr56, i64 %45 ; [#uses = 1, type = i64*]
  %47 = load i64, i64* %46, align 8               ; [#uses = 1]
  %48 = getelementptr inbounds i32, i32* %4, i64 %indvars.iv ; [#uses = 1, type = i32*]
  %49 = load i32, i32* %48, align 4               ; [#uses = 1]
  %50 = sext i32 %49 to i64                       ; [#uses = 1]
  %51 = add i64 %47, %50                          ; [#uses = 2]
  %52 = icmp slt i64 %41, %51                     ; [#uses = 1]
  %b_arg.a_arg.i = select i1 %52, i64 %51, i64 %41 ; [#uses = 1]
  store i64 %b_arg.a_arg.i, i64* %31, align 8
  br label %forcond30.backedge

forcond30.backedge:                               ; preds = %bounds.ok74, %condend
  %indvars.iv.be = phi i64 [ %42, %bounds.ok74 ], [ %.pre.pre-phi, %condend ] ; [#uses = 1, type = i64]
  br label %forcond30

bounds.fail75:                                    ; preds = %bounds.ok69
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %indvars.iv, i64 %3) #3
  unreachable

bounds.fail70:                                    ; preds = %bounds.ok59
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %45, i64 %.len52) #3
  unreachable

bounds.fail60:                                    ; preds = %bounds.ok54
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %35, i64 %3) #3
  unreachable

bounds.fail55:                                    ; preds = %bounds.ok49
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %indvars.iv, i64 %.len52) #3
  unreachable

bounds.fail50:                                    ; preds = %bounds.ok44
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %28, i64 %.len8) #3
  unreachable

bounds.fail45:                                    ; preds = %bounds.ok39
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %indvars.iv, i64 %.len42) #3
  unreachable

bounds.fail40:                                    ; preds = %if35
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 19, i64 %indvars.iv346, i64 %.len8) #3
  unreachable

else:                                             ; preds = %forbody31
  br i1 %bounds.cmp38, label %bounds.ok79, label %bounds.fail80

bounds.ok79:                                      ; preds = %else
  %.len82 = load i64, i64* %26, align 8           ; [#uses = 2]
  %bounds.cmp83 = icmp ugt i64 %.len82, %indvars.iv ; [#uses = 1]
  br i1 %bounds.cmp83, label %bounds.ok84, label %bounds.fail85

bounds.ok84:                                      ; preds = %bounds.ok79
  %.ptr86 = load i64*, i64** %27, align 8         ; [#uses = 1]
  %53 = getelementptr inbounds i64, i64* %.ptr86, i64 %indvars.iv ; [#uses = 1, type = i64*]
  %54 = add nuw nsw i64 %indvars.iv, %indvars.iv346 ; [#uses = 1]
  %55 = trunc i64 %54 to i32                      ; [#uses = 1]
  %56 = srem i32 %55, %11                         ; [#uses = 2]
  %57 = sext i32 %56 to i64                       ; [#uses = 2]
  %bounds.cmp88 = icmp ult i32 %56, %2            ; [#uses = 1]
  br i1 %bounds.cmp88, label %bounds.ok89, label %bounds.fail90

bounds.ok89:                                      ; preds = %bounds.ok84
  %bounds.cmp93 = icmp ult i64 %indvars.iv, %23   ; [#uses = 1]
  br i1 %bounds.cmp93, label %bounds.ok94, label %bounds.fail95

bounds.ok94:                                      ; preds = %bounds.ok89
  %58 = getelementptr inbounds i32, i32* %4, i64 %57 ; [#uses = 1, type = i32*]
  %59 = getelementptr inbounds i32, i32* %4, i64 %indvars.iv ; [#uses = 1, type = i32*]
  %60 = load i32, i32* %58, align 4               ; [#uses = 1]
  %61 = load i32, i32* %59, align 4               ; [#uses = 1]
  %62 = icmp sgt i32 %60, %61                     ; [#uses = 1]
  br i1 %62, label %condtrue, label %condfalse

bounds.fail95:                                    ; preds = %bounds.ok89
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %indvars.iv, i64 %3) #3
  unreachable

bounds.fail90:                                    ; preds = %bounds.ok84
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %57, i64 %3) #3
  unreachable

condtrue:                                         ; preds = %bounds.ok94
  br i1 %bounds.cmp48, label %bounds.ok99, label %bounds.fail100

bounds.ok99:                                      ; preds = %condtrue
  %.len102 = load i64, i64* %29, align 8          ; [#uses = 2]
  %bounds.cmp103 = icmp ugt i64 %.len102, %indvars.iv ; [#uses = 1]
  br i1 %bounds.cmp103, label %bounds.ok104, label %bounds.fail105

bounds.ok104:                                     ; preds = %bounds.ok99
  %.ptr106 = load i64*, i64** %30, align 8        ; [#uses = 1]
  %63 = getelementptr inbounds i64, i64* %.ptr106, i64 %indvars.iv ; [#uses = 1, type = i64*]
  %.pre354 = add nuw nsw i64 %indvars.iv, 1       ; [#uses = 1]
  br label %condend

bounds.fail105:                                   ; preds = %bounds.ok99
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %indvars.iv, i64 %.len102) #3
  unreachable

bounds.fail100:                                   ; preds = %condtrue
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %28, i64 %.len8) #3
  unreachable

condfalse:                                        ; preds = %bounds.ok94
  br i1 %bounds.cmp48, label %bounds.ok109, label %bounds.fail110

bounds.ok109:                                     ; preds = %condfalse
  %64 = add nuw nsw i64 %indvars.iv, 1            ; [#uses = 2]
  %65 = trunc i64 %64 to i32                      ; [#uses = 1]
  %66 = srem i32 %65, %11                         ; [#uses = 1]
  %67 = sext i32 %66 to i64                       ; [#uses = 3]
  %.len112 = load i64, i64* %29, align 8          ; [#uses = 2]
  %bounds.cmp113 = icmp ugt i64 %.len112, %67     ; [#uses = 1]
  br i1 %bounds.cmp113, label %bounds.ok114, label %bounds.fail115

bounds.ok114:                                     ; preds = %bounds.ok109
  %.ptr116 = load i64*, i64** %30, align 8        ; [#uses = 1]
  %68 = getelementptr inbounds i64, i64* %.ptr116, i64 %67 ; [#uses = 1, type = i64*]
  br label %condend

bounds.fail115:                                   ; preds = %bounds.ok109
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %67, i64 %.len112) #3
  unreachable

bounds.fail110:                                   ; preds = %condfalse
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %28, i64 %.len8) #3
  unreachable

condend:                                          ; preds = %bounds.ok114, %bounds.ok104
  %.pre.pre-phi = phi i64 [ %64, %bounds.ok114 ], [ %.pre354, %bounds.ok104 ] ; [#uses = 1, type = i64]
  %condtmp.0 = phi i64* [ %68, %bounds.ok114 ], [ %63, %bounds.ok104 ] ; [#uses = 1, type = i64*]
  %69 = load i64, i64* %condtmp.0, align 8        ; [#uses = 1]
  store i64 %69, i64* %53, align 8
  br label %forcond30.backedge

bounds.fail85:                                    ; preds = %bounds.ok79
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %indvars.iv, i64 %.len82) #3
  unreachable

bounds.fail80:                                    ; preds = %else
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 21, i64 %indvars.iv346, i64 %.len8) #3
  unreachable

forinc28:                                         ; preds = %forcond30
  %indvars.iv.next347 = add nuw nsw i64 %indvars.iv346, 1 ; [#uses = 1]
  br label %forcond26

endfor29:                                         ; preds = %forcond26
  %70 = add i32 %11, -1                           ; [#uses = 1]
  %71 = sext i32 %70 to i64                       ; [#uses = 4]
  %bounds.cmp118 = icmp ugt i64 %.len8, %71       ; [#uses = 1]
  br i1 %bounds.cmp118, label %bounds.ok119, label %bounds.fail120

bounds.ok119:                                     ; preds = %endfor29
  %72 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %71, i32 1 ; [#uses = 1, type = i64**]
  %.ptr122 = load i64*, i64** %72, align 8        ; [#uses = 1]
  %73 = getelementptr inbounds { i64, i64* }, { i64, i64* }* %10, i64 %71, i32 0 ; [#uses = 1, type = i64*]
  %.len123 = load i64, i64* %73, align 8          ; [#uses = 1]
  br label %forcond124

forcond124:                                       ; preds = %forbody125, %bounds.ok119
  %ans.0 = phi i64 [ 0, %bounds.ok119 ], [ %b_arg.a_arg.i193, %forbody125 ] ; [#uses = 3, type = i64]
  %__key111.0 = phi i64 [ 0, %bounds.ok119 ], [ %77, %forbody125 ] ; [#uses = 3, type = i64]
  %exitcond.not = icmp eq i64 %__key111.0, %.len123 ; [#uses = 1]
  br i1 %exitcond.not, label %endfor127, label %forbody125

forbody125:                                       ; preds = %forcond124
  %74 = getelementptr inbounds i64, i64* %.ptr122, i64 %__key111.0 ; [#uses = 1, type = i64*]
  %75 = load i64, i64* %74, align 8               ; [#uses = 2]
  %76 = icmp slt i64 %75, %ans.0                  ; [#uses = 1]
  %b_arg.a_arg.i193 = select i1 %76, i64 %ans.0, i64 %75 ; [#uses = 1]
  %77 = add i64 %__key111.0, 1                    ; [#uses = 1]
  br label %forcond124

endfor127:                                        ; preds = %forcond124
  %78 = call i32 (i8*, ...) @printf(i8* nonnull dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i64 %ans.0) #5 ; [#uses = 0]
  ret i32 0

bounds.fail120:                                   ; preds = %endfor29
  call void @_d_arraybounds_index({ i64, i8* } { i64 61, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i32 0, i32 0) }, i32 24, i64 %71, i64 %.len8) #3
  unreachable
}

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

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

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

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

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

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

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

; [#uses = 0]
; Function Attrs: uwtable
define i32 @main(i32 %argc_arg, i8** %argv_arg) local_unnamed_addr #4 {
  %1 = tail call i32 @_d_run_main(i32 %argc_arg, i8** %argv_arg, i8* bitcast (i32 ({ i64, { i64, i8* }* })* @_Dmain to i8*)) #5 ; [#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 #2

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

!llvm.ldc.typeinfo._D11TypeInfo_Ai6__initZ = !{!0}
!llvm.ldc.typeinfo._D12TypeInfo_AAl6__initZ = !{!1}
!llvm.ldc.typeinfo._D11TypeInfo_Al6__initZ = !{!2}
!llvm.ident = !{!3}

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