#import <stdio.h>
#import <stdlib.h>

int compare_int(const void *a, const void *b) {
    return *(int*)a - *(int*)b;
}

// 昇順に並んだ values の中で searchValue を 左から探したときに初めて上回る(order>0) / 右から探したときに初めて下回る(order<0) ような index を探す（ない場合は -1 を返す）
int binary_search(int searchValue, int *values, int minIndex, int maxIndex, int order) {
    int midIndex = (minIndex + maxIndex)/2;
    int midValue = values[midIndex];
    int maxValue = values[maxIndex];
    if (minIndex == midIndex) { // 区間の長さが2になったとき
        if (order > 0) {
            if (searchValue < midValue) { // 左がサーチ値を上回るなら左
                return midIndex;
            }
            if (searchValue < maxValue) { // 左がサーチ値以下かつ右がサーチ値を上回るなら右
                return maxIndex;
            }
        } else {
            if (searchValue > maxValue) { // 右がサーチ値を下回るなら右
                return maxIndex;
            }
            if (searchValue > midValue) { // 右がサーチ値以上かつ左がサーチ値を下回るなら左
                return midIndex;
            }
        }
        return -1; // 区間の長さが2のとき両端とも条件を満たさないなら存在しない
    }
    if (order > 0) {
        if (midValue <= searchValue) { // 中央での値がまだ上回っていないなら右半分
            return binary_search(searchValue, values, midIndex, maxIndex, order);
        } else {
            return binary_search(searchValue, values, minIndex, midIndex, order);
        }
    } else {
        if (midValue >= searchValue) { // 中央での値がまだ下回っていないなら左半分
            return binary_search(searchValue, values, minIndex, midIndex, order);
        } else {
            return binary_search(searchValue, values, midIndex, maxIndex, order);
        }
    }
}

int main(){
    int N;
    scanf("%d", &N);
    int A[200000] = {0};
    int B[200000] = {0};
    int C[200000] = {0};
    for(int i=0;i<N;i++){
        int a;
        scanf("%d", &a);
        A[i] = a;
    }
    for(int i=0;i<N;i++){
        int b;
        scanf("%d", &b);
        B[i] = b;
    }
    for(int i=0;i<N;i++){
        int c;
        scanf("%d", &c);
        C[i] = c;
    }
    qsort(A, N, sizeof(int), compare_int);
    qsort(C, N, sizeof(int), compare_int);
    if (N==1) {
        puts((A[0]<B[0] && B[0]<C[0]) ? "1" : "0");
        return 0;
    }
    long long count = 0;
    for(int j=0;j<N;j++){
        int b = B[j];
        int i = binary_search(b,A,0,N-1,-1);
        int k = binary_search(b,C,0,N-1,1);
        if (i>=0 && k>=0) {
            count += (long long)(i+1)*(N-k);
        }
    }
    printf("%lld",count);
}

; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_686/source.m'
source_filename = "/data/TheStack_IR/OJ_Samples/Collated/ObjectiveC/Source_686/source.m"
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"

@.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1
@.str.1 = private unnamed_addr constant [2 x i8] c"1\00", align 1
@.str.2 = private unnamed_addr constant [2 x i8] c"0\00", align 1
@.str.3 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable
define dso_local i32 @compare_int(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 {
entry:
  %0 = load i32, ptr %a, align 4, !tbaa !5
  %1 = load i32, ptr %b, align 4, !tbaa !5
  %sub = sub nsw i32 %0, %1
  ret i32 %sub
}

; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable
define dso_local i32 @binary_search(i32 noundef %searchValue, ptr nocapture noundef readonly %values, i32 noundef %minIndex, i32 noundef %maxIndex, i32 noundef %order) local_unnamed_addr #1 {
entry:
  %add72 = add nsw i32 %maxIndex, %minIndex
  %div73 = sdiv i32 %add72, 2
  %idxprom74 = sext i32 %div73 to i64
  %arrayidx75 = getelementptr inbounds i32, ptr %values, i64 %idxprom74
  %0 = load i32, ptr %arrayidx75, align 4, !tbaa !5
  %cmp76 = icmp eq i32 %div73, %minIndex
  br i1 %cmp76, label %if.then, label %if.end17.lr.ph

if.end17.lr.ph:                                   ; preds = %entry
  %cmp18 = icmp sgt i32 %order, 0
  br i1 %cmp18, label %if.end17.us, label %if.end17

if.end17.us:                                      ; preds = %if.end17.lr.ph, %if.end17.us
  %1 = phi i32 [ %2, %if.end17.us ], [ %0, %if.end17.lr.ph ]
  %div79.us = phi i32 [ %div.us, %if.end17.us ], [ %div73, %if.end17.lr.ph ]
  %maxIndex.tr78.us = phi i32 [ %div.maxIndex.tr.us, %if.end17.us ], [ %maxIndex, %if.end17.lr.ph ]
  %minIndex.tr77.us = phi i32 [ %minIndex.tr.div.us, %if.end17.us ], [ %minIndex, %if.end17.lr.ph ]
  %cmp20.not.us = icmp sgt i32 %1, %searchValue
  %minIndex.tr.div.us = select i1 %cmp20.not.us, i32 %minIndex.tr77.us, i32 %div79.us
  %div.maxIndex.tr.us = select i1 %cmp20.not.us, i32 %div79.us, i32 %maxIndex.tr78.us
  %add.us = add nsw i32 %div.maxIndex.tr.us, %minIndex.tr.div.us
  %div.us = sdiv i32 %add.us, 2
  %idxprom.us = sext i32 %div.us to i64
  %arrayidx.us = getelementptr inbounds i32, ptr %values, i64 %idxprom.us
  %2 = load i32, ptr %arrayidx.us, align 4, !tbaa !5
  %cmp.us = icmp eq i32 %div.us, %minIndex.tr.div.us
  br i1 %cmp.us, label %if.then, label %if.end17.us

if.then:                                          ; preds = %if.end17, %if.end17.us, %entry
  %maxIndex.tr.lcssa71 = phi i32 [ %maxIndex, %entry ], [ %div.maxIndex.tr.us, %if.end17.us ], [ %maxIndex.tr.div, %if.end17 ]
  %div.lcssa = phi i32 [ %minIndex, %entry ], [ %minIndex.tr.div.us, %if.end17.us ], [ %div.minIndex.tr, %if.end17 ]
  %.lcssa70 = phi i32 [ %0, %entry ], [ %2, %if.end17.us ], [ %5, %if.end17 ]
  %idxprom1.le = sext i32 %maxIndex.tr.lcssa71 to i64
  %arrayidx2.le = getelementptr inbounds i32, ptr %values, i64 %idxprom1.le
  %3 = load i32, ptr %arrayidx2.le, align 4, !tbaa !5
  %cmp3 = icmp sgt i32 %order, 0
  br i1 %cmp3, label %if.then4, label %if.else

if.then4:                                         ; preds = %if.then
  %cmp5 = icmp sgt i32 %.lcssa70, %searchValue
  br i1 %cmp5, label %cleanup, label %if.end

if.end:                                           ; preds = %if.then4
  %cmp7 = icmp sgt i32 %3, %searchValue
  br i1 %cmp7, label %cleanup, label %if.end16

if.else:                                          ; preds = %if.then
  %cmp10 = icmp slt i32 %3, %searchValue
  br i1 %cmp10, label %cleanup, label %if.end12

if.end12:                                         ; preds = %if.else
  %cmp13 = icmp slt i32 %.lcssa70, %searchValue
  br i1 %cmp13, label %cleanup, label %if.end16

if.end16:                                         ; preds = %if.end12, %if.end
  br label %cleanup

if.end17:                                         ; preds = %if.end17.lr.ph, %if.end17
  %4 = phi i32 [ %5, %if.end17 ], [ %0, %if.end17.lr.ph ]
  %div79 = phi i32 [ %div, %if.end17 ], [ %div73, %if.end17.lr.ph ]
  %maxIndex.tr78 = phi i32 [ %maxIndex.tr.div, %if.end17 ], [ %maxIndex, %if.end17.lr.ph ]
  %minIndex.tr77 = phi i32 [ %div.minIndex.tr, %if.end17 ], [ %minIndex, %if.end17.lr.ph ]
  %cmp25.not = icmp slt i32 %4, %searchValue
  %div.minIndex.tr = select i1 %cmp25.not, i32 %div79, i32 %minIndex.tr77
  %maxIndex.tr.div = select i1 %cmp25.not, i32 %maxIndex.tr78, i32 %div79
  %add = add nsw i32 %maxIndex.tr.div, %div.minIndex.tr
  %div = sdiv i32 %add, 2
  %idxprom = sext i32 %div to i64
  %arrayidx = getelementptr inbounds i32, ptr %values, i64 %idxprom
  %5 = load i32, ptr %arrayidx, align 4, !tbaa !5
  %cmp = icmp eq i32 %div, %div.minIndex.tr
  br i1 %cmp, label %if.then, label %if.end17

cleanup:                                          ; preds = %if.end12, %if.else, %if.end, %if.then4, %if.end16
  %retval.0 = phi i32 [ -1, %if.end16 ], [ %div.lcssa, %if.then4 ], [ %maxIndex.tr.lcssa71, %if.end ], [ %maxIndex.tr.lcssa71, %if.else ], [ %div.lcssa, %if.end12 ]
  ret i32 %retval.0
}

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

; Function Attrs: nofree nounwind uwtable
define dso_local i32 @main() local_unnamed_addr #3 {
entry:
  %N = alloca i32, align 4
  %A = alloca [200000 x i32], align 16
  %B = alloca [200000 x i32], align 16
  %C = alloca [200000 x i32], align 16
  %a = alloca i32, align 4
  %b = alloca i32, align 4
  %c = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #7
  %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N)
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %A) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) %A, i8 0, i64 800000, i1 false)
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %B) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) %B, i8 0, i64 800000, i1 false)
  call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %C) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) %C, i8 0, i64 800000, i1 false)
  %0 = load i32, ptr %N, align 4, !tbaa !5
  %cmp101 = icmp sgt i32 %0, 0
  br i1 %cmp101, label %for.body, label %for.cond14.preheader.for.cond.cleanup16_crit_edge

for.cond3.preheader:                              ; preds = %for.body
  %cmp4103 = icmp sgt i32 %2, 0
  br i1 %cmp4103, label %for.body6, label %for.cond14.preheader.for.cond.cleanup16_crit_edge

for.body:                                         ; preds = %entry, %for.body
  %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #7
  %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a)
  %1 = load i32, ptr %a, align 4, !tbaa !5
  %arrayidx = getelementptr inbounds [200000 x i32], ptr %A, i64 0, i64 %indvars.iv
  store i32 %1, ptr %arrayidx, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #7
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %2 = load i32, ptr %N, align 4, !tbaa !5
  %3 = sext i32 %2 to i64
  %cmp = icmp slt i64 %indvars.iv.next, %3
  br i1 %cmp, label %for.body, label %for.cond3.preheader

for.cond14.preheader:                             ; preds = %for.body6
  %cmp15105 = icmp sgt i32 %6, 0
  br i1 %cmp15105, label %for.body17, label %for.cond14.preheader.for.cond.cleanup16_crit_edge

for.cond14.preheader.for.cond.cleanup16_crit_edge: ; preds = %entry, %for.cond3.preheader, %for.cond14.preheader
  %4 = phi i32 [ %6, %for.cond14.preheader ], [ %2, %for.cond3.preheader ], [ %0, %entry ]
  %.pre = sext i32 %4 to i64
  br label %for.cond.cleanup16

for.body6:                                        ; preds = %for.cond3.preheader, %for.body6
  %indvars.iv114 = phi i64 [ %indvars.iv.next115, %for.body6 ], [ 0, %for.cond3.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #7
  %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b)
  %5 = load i32, ptr %b, align 4, !tbaa !5
  %arrayidx9 = getelementptr inbounds [200000 x i32], ptr %B, i64 0, i64 %indvars.iv114
  store i32 %5, ptr %arrayidx9, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #7
  %indvars.iv.next115 = add nuw nsw i64 %indvars.iv114, 1
  %6 = load i32, ptr %N, align 4, !tbaa !5
  %7 = sext i32 %6 to i64
  %cmp4 = icmp slt i64 %indvars.iv.next115, %7
  br i1 %cmp4, label %for.body6, label %for.cond14.preheader

for.cond.cleanup16:                               ; preds = %for.body17, %for.cond14.preheader.for.cond.cleanup16_crit_edge
  %conv.pre-phi = phi i64 [ %.pre, %for.cond14.preheader.for.cond.cleanup16_crit_edge ], [ %14, %for.body17 ]
  call void @qsort(ptr noundef nonnull %A, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @compare_int) #7
  %8 = load i32, ptr %N, align 4, !tbaa !5
  %conv25 = sext i32 %8 to i64
  call void @qsort(ptr noundef nonnull %C, i64 noundef %conv25, i64 noundef 4, ptr noundef nonnull @compare_int) #7
  %9 = load i32, ptr %N, align 4, !tbaa !5
  %cmp26 = icmp eq i32 %9, 1
  br i1 %cmp26, label %if.then, label %for.cond37.preheader

for.cond37.preheader:                             ; preds = %for.cond.cleanup16
  %cmp38107 = icmp sgt i32 %9, 0
  br i1 %cmp38107, label %for.body41.lr.ph, label %for.cond.cleanup40

for.body41.lr.ph:                                 ; preds = %for.cond37.preheader
  %sub = add nsw i32 %9, -1
  %div73.i135140 = lshr i32 %sub, 1
  %idxprom74.i = zext i32 %div73.i135140 to i64
  %arrayidx75.i = getelementptr inbounds i32, ptr %A, i64 %idxprom74.i
  %10 = load i32, ptr %arrayidx75.i, align 4, !tbaa !5
  %cmp76.i = icmp ult i32 %9, 3
  %arrayidx75.i83 = getelementptr inbounds i32, ptr %C, i64 %idxprom74.i
  %11 = load i32, ptr %arrayidx75.i83, align 4, !tbaa !5
  %wide.trip.count = zext i32 %9 to i64
  %idxprom1.le.i128 = sext i32 %sub to i64
  %arrayidx2.le.i129 = getelementptr inbounds i32, ptr %A, i64 %idxprom1.le.i128
  br label %for.body41

for.body17:                                       ; preds = %for.cond14.preheader, %for.body17
  %indvars.iv117 = phi i64 [ %indvars.iv.next118, %for.body17 ], [ 0, %for.cond14.preheader ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #7
  %call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c)
  %12 = load i32, ptr %c, align 4, !tbaa !5
  %arrayidx20 = getelementptr inbounds [200000 x i32], ptr %C, i64 0, i64 %indvars.iv117
  store i32 %12, ptr %arrayidx20, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #7
  %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1
  %13 = load i32, ptr %N, align 4, !tbaa !5
  %14 = sext i32 %13 to i64
  %cmp15 = icmp slt i64 %indvars.iv.next118, %14
  br i1 %cmp15, label %for.body17, label %for.cond.cleanup16

if.then:                                          ; preds = %for.cond.cleanup16
  %15 = load i32, ptr %A, align 16, !tbaa !5
  %16 = load i32, ptr %B, align 16
  %cmp30 = icmp slt i32 %15, %16
  %17 = load i32, ptr %C, align 16
  %cmp34 = icmp slt i32 %16, %17
  %18 = select i1 %cmp30, i1 %cmp34, i1 false
  %cond = select i1 %18, ptr @.str.1, ptr @.str.2
  %call36 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond)
  br label %cleanup

for.cond.cleanup40:                               ; preds = %if.end60, %for.cond37.preheader
  %count.0.lcssa = phi i64 [ 0, %for.cond37.preheader ], [ %count.1, %if.end60 ]
  %call64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %count.0.lcssa)
  br label %cleanup

for.body41:                                       ; preds = %for.body41.lr.ph, %if.end60
  %indvars.iv120 = phi i64 [ 0, %for.body41.lr.ph ], [ %indvars.iv.next121, %if.end60 ]
  %count.0108 = phi i64 [ 0, %for.body41.lr.ph ], [ %count.1, %if.end60 ]
  %arrayidx44 = getelementptr inbounds [200000 x i32], ptr %B, i64 0, i64 %indvars.iv120
  %19 = load i32, ptr %arrayidx44, align 4, !tbaa !5
  br i1 %cmp76.i, label %if.then.i.thread, label %if.end17.i

if.then.i.thread:                                 ; preds = %for.body41
  %20 = load i32, ptr %arrayidx2.le.i129, align 4, !tbaa !5
  %cmp10.i130 = icmp slt i32 %20, %19
  %cmp13.i131 = icmp sge i32 %10, %19
  %spec.select132 = sext i1 %cmp13.i131 to i32
  %retval.0.i133 = select i1 %cmp10.i130, i32 %sub, i32 %spec.select132
  br label %if.then.i86

if.then.i:                                        ; preds = %if.end17.i
  %idxprom1.le.i = sext i32 %maxIndex.tr.div.i to i64
  %arrayidx2.le.i = getelementptr inbounds i32, ptr %A, i64 %idxprom1.le.i
  %21 = load i32, ptr %arrayidx2.le.i, align 4, !tbaa !5
  %cmp10.i = icmp slt i32 %21, %19
  %cmp13.i = icmp slt i32 %23, %19
  %spec.select = select i1 %cmp13.i, i32 %div.minIndex.tr.i, i32 -1
  %retval.0.i = select i1 %cmp10.i, i32 %maxIndex.tr.div.i, i32 %spec.select
  br i1 %cmp76.i, label %if.then.i86, label %if.end17.us.i

if.end17.i:                                       ; preds = %for.body41, %if.end17.i
  %22 = phi i32 [ %23, %if.end17.i ], [ %10, %for.body41 ]
  %div79.i = phi i32 [ %div.i, %if.end17.i ], [ %div73.i135140, %for.body41 ]
  %maxIndex.tr78.i = phi i32 [ %maxIndex.tr.div.i, %if.end17.i ], [ %sub, %for.body41 ]
  %minIndex.tr77.i = phi i32 [ %div.minIndex.tr.i, %if.end17.i ], [ 0, %for.body41 ]
  %cmp25.not.i = icmp slt i32 %22, %19
  %div.minIndex.tr.i = select i1 %cmp25.not.i, i32 %div79.i, i32 %minIndex.tr77.i
  %maxIndex.tr.div.i = select i1 %cmp25.not.i, i32 %maxIndex.tr78.i, i32 %div79.i
  %add.i = add nsw i32 %div.minIndex.tr.i, %maxIndex.tr.div.i
  %div.i = sdiv i32 %add.i, 2
  %idxprom.i = sext i32 %div.i to i64
  %arrayidx.i = getelementptr inbounds i32, ptr %A, i64 %idxprom.i
  %23 = load i32, ptr %arrayidx.i, align 4, !tbaa !5
  %cmp.i = icmp eq i32 %div.i, %div.minIndex.tr.i
  br i1 %cmp.i, label %if.then.i, label %if.end17.i

if.end17.us.i:                                    ; preds = %if.then.i, %if.end17.us.i
  %24 = phi i32 [ %25, %if.end17.us.i ], [ %11, %if.then.i ]
  %div79.us.i = phi i32 [ %div.us.i, %if.end17.us.i ], [ %div73.i135140, %if.then.i ]
  %maxIndex.tr78.us.i = phi i32 [ %div.maxIndex.tr.us.i, %if.end17.us.i ], [ %sub, %if.then.i ]
  %minIndex.tr77.us.i = phi i32 [ %minIndex.tr.div.us.i, %if.end17.us.i ], [ 0, %if.then.i ]
  %cmp20.not.us.i = icmp sgt i32 %24, %19
  %minIndex.tr.div.us.i = select i1 %cmp20.not.us.i, i32 %minIndex.tr77.us.i, i32 %div79.us.i
  %div.maxIndex.tr.us.i = select i1 %cmp20.not.us.i, i32 %div79.us.i, i32 %maxIndex.tr78.us.i
  %add.us.i = add nsw i32 %minIndex.tr.div.us.i, %div.maxIndex.tr.us.i
  %div.us.i = sdiv i32 %add.us.i, 2
  %idxprom.us.i = sext i32 %div.us.i to i64
  %arrayidx.us.i = getelementptr inbounds i32, ptr %C, i64 %idxprom.us.i
  %25 = load i32, ptr %arrayidx.us.i, align 4, !tbaa !5
  %cmp.us.i = icmp eq i32 %div.us.i, %minIndex.tr.div.us.i
  br i1 %cmp.us.i, label %if.then.i86, label %if.end17.us.i

if.then.i86:                                      ; preds = %if.end17.us.i, %if.then.i.thread, %if.then.i
  %retval.0.i134 = phi i32 [ %retval.0.i, %if.then.i ], [ %retval.0.i133, %if.then.i.thread ], [ %retval.0.i, %if.end17.us.i ]
  %maxIndex.tr.lcssa71.i87 = phi i32 [ %sub, %if.then.i ], [ %sub, %if.then.i.thread ], [ %div.maxIndex.tr.us.i, %if.end17.us.i ]
  %div.lcssa.i88 = phi i32 [ 0, %if.then.i ], [ 0, %if.then.i.thread ], [ %minIndex.tr.div.us.i, %if.end17.us.i ]
  %.lcssa70.i89 = phi i32 [ %11, %if.then.i ], [ %11, %if.then.i.thread ], [ %25, %if.end17.us.i ]
  %cmp5.i = icmp sgt i32 %.lcssa70.i89, %19
  br i1 %cmp5.i, label %binary_search.exit94, label %if.end.i

if.end.i:                                         ; preds = %if.then.i86
  %idxprom1.le.i90 = sext i32 %maxIndex.tr.lcssa71.i87 to i64
  %arrayidx2.le.i91 = getelementptr inbounds i32, ptr %C, i64 %idxprom1.le.i90
  %26 = load i32, ptr %arrayidx2.le.i91, align 4, !tbaa !5
  %cmp7.i = icmp sgt i32 %26, %19
  br i1 %cmp7.i, label %binary_search.exit94, label %if.end60

binary_search.exit94:                             ; preds = %if.then.i86, %if.end.i
  %retval.0.i93 = phi i32 [ %div.lcssa.i88, %if.then.i86 ], [ %maxIndex.tr.lcssa71.i87, %if.end.i ]
  %27 = or i32 %retval.0.i93, %retval.0.i134
  %or.cond = icmp sgt i32 %27, -1
  br i1 %or.cond, label %if.then55, label %if.end60

if.then55:                                        ; preds = %binary_search.exit94
  %add = add nuw nsw i32 %retval.0.i134, 1
  %conv56 = zext i32 %add to i64
  %sub57 = sub nsw i32 %9, %retval.0.i93
  %conv58 = sext i32 %sub57 to i64
  %mul = mul nsw i64 %conv58, %conv56
  %add59 = add nsw i64 %mul, %count.0108
  br label %if.end60

if.end60:                                         ; preds = %if.end.i, %if.then55, %binary_search.exit94
  %count.1 = phi i64 [ %add59, %if.then55 ], [ %count.0108, %binary_search.exit94 ], [ %count.0108, %if.end.i ]
  %indvars.iv.next121 = add nuw nsw i64 %indvars.iv120, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next121, %wide.trip.count
  br i1 %exitcond.not, label %for.cond.cleanup40, label %for.body41

cleanup:                                          ; preds = %for.cond.cleanup40, %if.then
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %C) #7
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %B) #7
  call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %A) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #7
  ret i32 0
}

; Function Attrs: nofree nounwind
declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

; Function Attrs: nofree
declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nounwind }

!llvm.linker.options = !{}
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
