Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdlib.h> #define TRUE 1 #define FALSE 0 #define MAX 397 int isEmpty(void); int isFull(void); void push(int); int pop(void); int top=0,S[100]; int main(){ int x,i,x1,x2,count=0; char s[MAX]; for( i = 0 ; i < MAX ; i++ ) { scanf("%c",&s[i]); if(s[i] == '\n' ) break; count++; } for(i = 0 ; i <= count ; i++) { if(s[i] == ' ' || s[i] == '\n') continue; else if ( s[i] == '+' ) { x = pop() + pop(); if(x < -1000000000 || x > 1000000000 ) return 0; push(x); } else if ( s[i] == '-' ) { x1 = pop(); x2 = pop(); x = x2 - x1; if(x < -1000000000 || x > 1000000000 ) return 0; push(x); } else if ( s[i] == '*' ) { x = pop() * pop(); if(x < -1000000000 || x > 1000000000 ) return 0; push(x); } else { if(i == 0 || s[i-1] == ' ') { x = atoi(&s[i]); if(x < 0 || x > 1000000) return 0; push(x); } } } for(i = 1 ; i <= top ; i++ ) { printf("%d",S[i]); } printf("\n"); return 0; } int isEmpty() { if(top == 0) return TRUE; else return FALSE; } int isFull() { if(top >= MAX-1) return TRUE; else return FALSE; } void push(int x) { if(isFull()) exit(2); top++; S[top] = x; } int pop() { if(isEmpty()) exit(1); top--; return S[top+1]; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287341/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287341/source.c" 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" @top = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @S = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [397 x i8], align 16 call void @llvm.lifetime.start.p0(i64 397, ptr nonnull %s) #7 br label %for.body for.body: ; preds = %entry, %if.end %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %if.end ] %arrayidx = getelementptr inbounds [397 x i8], ptr %s, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp3 = icmp eq i8 %0, 10 br i1 %cmp3, label %for.end, label %if.end if.end: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 397 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !8 for.end: ; preds = %for.body, %if.end %count.0.lcssa = phi i64 [ %indvars.iv, %for.body ], [ 397, %if.end ] %1 = add nuw i64 %count.0.lcssa, 1 %wide.trip.count = and i64 %1, 4294967295 %2 = load i8, ptr %s, align 16, !tbaa !5 switch i8 %2, label %if.then78.peel [ i8 32, label %for.inc94.peel i8 10, label %for.inc94.peel i8 43, label %if.then26.peel i8 45, label %if.then42.peel i8 42, label %if.then58.peel ] if.then58.peel: ; preds = %for.end %3 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i171.peel = icmp eq i32 %3, 0 br i1 %cmp.i.not.i171.peel, label %if.then.i175, label %pop.exit176.peel pop.exit176.peel: ; preds = %if.then58.peel %dec.i172.peel = add nsw i32 %3, -1 store i32 %dec.i172.peel, ptr @top, align 4, !tbaa !10 %cmp.i.not.i177.peel = icmp eq i32 %dec.i172.peel, 0 br i1 %cmp.i.not.i177.peel, label %if.then.i181, label %pop.exit182.peel pop.exit182.peel: ; preds = %pop.exit176.peel %idxprom.i173.peel = sext i32 %3 to i64 %arrayidx.i174.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i173.peel %4 = load i32, ptr %arrayidx.i174.peel, align 4, !tbaa !10 %dec.i178.peel = add nsw i32 %3, -2 store i32 %dec.i178.peel, ptr @top, align 4, !tbaa !10 %idxprom.i179.peel = sext i32 %dec.i172.peel to i64 %arrayidx.i180.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i179.peel %5 = load i32, ptr %arrayidx.i180.peel, align 4, !tbaa !10 %mul.peel = mul nsw i32 %5, %4 %6 = add i32 %mul.peel, -1000000001 %or.cond114.peel = icmp ult i32 %6, -2000000001 br i1 %or.cond114.peel, label %cleanup, label %if.end67.peel if.end67.peel: ; preds = %pop.exit182.peel %cmp.i.i183.peel = icmp slt i32 %3, 398 br i1 %cmp.i.i183.peel, label %push.exit188.peel, label %if.then.i184 push.exit188.peel: ; preds = %if.end67.peel store i32 %dec.i172.peel, ptr @top, align 4, !tbaa !10 store i32 %mul.peel, ptr %arrayidx.i180.peel, align 4, !tbaa !10 br label %for.inc94.peel if.then42.peel: ; preds = %for.end %7 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i153.peel = icmp eq i32 %7, 0 br i1 %cmp.i.not.i153.peel, label %if.then.i157, label %pop.exit158.peel pop.exit158.peel: ; preds = %if.then42.peel %dec.i154.peel = add nsw i32 %7, -1 store i32 %dec.i154.peel, ptr @top, align 4, !tbaa !10 %cmp.i.not.i159.peel = icmp eq i32 %dec.i154.peel, 0 br i1 %cmp.i.not.i159.peel, label %if.then.i163, label %pop.exit164.peel pop.exit164.peel: ; preds = %pop.exit158.peel %idxprom.i155.peel = sext i32 %7 to i64 %arrayidx.i156.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i155.peel %8 = load i32, ptr %arrayidx.i156.peel, align 4, !tbaa !10 %dec.i160.peel = add nsw i32 %7, -2 store i32 %dec.i160.peel, ptr @top, align 4, !tbaa !10 %idxprom.i161.peel = sext i32 %dec.i154.peel to i64 %arrayidx.i162.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i161.peel %9 = load i32, ptr %arrayidx.i162.peel, align 4, !tbaa !10 %sub.peel = sub nsw i32 %9, %8 %10 = add i32 %sub.peel, -1000000001 %or.cond113.peel = icmp ult i32 %10, -2000000001 br i1 %or.cond113.peel, label %cleanup, label %if.end51.peel if.end51.peel: ; preds = %pop.exit164.peel %cmp.i.i165.peel = icmp slt i32 %7, 398 br i1 %cmp.i.i165.peel, label %push.exit170.peel, label %if.then.i166 push.exit170.peel: ; preds = %if.end51.peel store i32 %dec.i154.peel, ptr @top, align 4, !tbaa !10 store i32 %sub.peel, ptr %arrayidx.i162.peel, align 4, !tbaa !10 br label %for.inc94.peel if.then26.peel: ; preds = %for.end %11 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i.peel = icmp eq i32 %11, 0 br i1 %cmp.i.not.i.peel, label %if.then.i, label %pop.exit.peel pop.exit.peel: ; preds = %if.then26.peel %dec.i.peel = add nsw i32 %11, -1 store i32 %dec.i.peel, ptr @top, align 4, !tbaa !10 %cmp.i.not.i144.peel = icmp eq i32 %dec.i.peel, 0 br i1 %cmp.i.not.i144.peel, label %if.then.i148, label %pop.exit149.peel pop.exit149.peel: ; preds = %pop.exit.peel %idxprom.i.peel = sext i32 %11 to i64 %arrayidx.i.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i.peel %12 = load i32, ptr %arrayidx.i.peel, align 4, !tbaa !10 %dec.i145.peel = add nsw i32 %11, -2 store i32 %dec.i145.peel, ptr @top, align 4, !tbaa !10 %idxprom.i146.peel = sext i32 %dec.i.peel to i64 %arrayidx.i147.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i146.peel %13 = load i32, ptr %arrayidx.i147.peel, align 4, !tbaa !10 %add.peel = add nsw i32 %13, %12 %14 = add i32 %add.peel, -1000000001 %or.cond.peel = icmp ult i32 %14, -2000000001 br i1 %or.cond.peel, label %cleanup, label %if.end35.peel if.end35.peel: ; preds = %pop.exit149.peel %cmp.i.i.peel = icmp slt i32 %11, 398 br i1 %cmp.i.i.peel, label %push.exit.peel, label %if.then.i150 push.exit.peel: ; preds = %if.end35.peel store i32 %dec.i.peel, ptr @top, align 4, !tbaa !10 store i32 %add.peel, ptr %arrayidx.i147.peel, align 4, !tbaa !10 br label %for.inc94.peel if.then78.peel: ; preds = %for.end %call.i.peel = call i64 @strtol(ptr nocapture noundef nonnull %s, ptr noundef null, i32 noundef 10) #7 %conv.i.peel = trunc i64 %call.i.peel to i32 %or.cond115.peel = icmp ugt i32 %conv.i.peel, 1000000 br i1 %or.cond115.peel, label %cleanup, label %if.end88.peel if.end88.peel: ; preds = %if.then78.peel %15 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.i189.peel = icmp slt i32 %15, 396 br i1 %cmp.i.i189.peel, label %push.exit194.peel, label %if.then.i190 push.exit194.peel: ; preds = %if.end88.peel %inc.i191.peel = add nsw i32 %15, 1 store i32 %inc.i191.peel, ptr @top, align 4, !tbaa !10 %idxprom.i192.peel = sext i32 %inc.i191.peel to i64 %arrayidx.i193.peel = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i192.peel store i32 %conv.i.peel, ptr %arrayidx.i193.peel, align 4, !tbaa !10 br label %for.inc94.peel for.inc94.peel: ; preds = %push.exit194.peel, %push.exit.peel, %push.exit170.peel, %push.exit188.peel, %for.end, %for.end %exitcond208.peel.not = icmp eq i64 %wide.trip.count, 1 br i1 %exitcond208.peel.not, label %for.cond97.preheader, label %for.body9 for.cond97.preheader: ; preds = %for.inc94, %for.inc94.peel %16 = load i32, ptr @top, align 4, !tbaa !10 %cmp98.not199 = icmp slt i32 %16, 1 br i1 %cmp98.not199, label %for.end106, label %for.body100 for.body9: ; preds = %for.inc94.peel, %for.inc94 %indvars.iv204 = phi i64 [ %indvars.iv.next205, %for.inc94 ], [ 1, %for.inc94.peel ] %arrayidx11 = getelementptr inbounds [397 x i8], ptr %s, i64 0, i64 %indvars.iv204 %17 = load i8, ptr %arrayidx11, align 1, !tbaa !5 switch i8 %17, label %lor.lhs.false71 [ i8 32, label %for.inc94 i8 10, label %for.inc94 i8 43, label %if.then26 i8 45, label %if.then42 i8 42, label %if.then58 ] if.then26: ; preds = %for.body9 %18 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i = icmp eq i32 %18, 0 br i1 %cmp.i.not.i, label %if.then.i, label %pop.exit if.then.i: ; preds = %if.then26, %if.then26.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit: ; preds = %if.then26 %dec.i = add nsw i32 %18, -1 store i32 %dec.i, ptr @top, align 4, !tbaa !10 %cmp.i.not.i144 = icmp eq i32 %dec.i, 0 br i1 %cmp.i.not.i144, label %if.then.i148, label %pop.exit149 if.then.i148: ; preds = %pop.exit, %pop.exit.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit149: ; preds = %pop.exit %idxprom.i = sext i32 %18 to i64 %arrayidx.i = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i %19 = load i32, ptr %arrayidx.i, align 4, !tbaa !10 %dec.i145 = add nsw i32 %18, -2 store i32 %dec.i145, ptr @top, align 4, !tbaa !10 %idxprom.i146 = sext i32 %dec.i to i64 %arrayidx.i147 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i146 %20 = load i32, ptr %arrayidx.i147, align 4, !tbaa !10 %add = add nsw i32 %20, %19 %21 = add i32 %add, -1000000001 %or.cond = icmp ult i32 %21, -2000000001 br i1 %or.cond, label %cleanup, label %if.end35 if.end35: ; preds = %pop.exit149 %cmp.i.i = icmp slt i32 %18, 398 br i1 %cmp.i.i, label %push.exit, label %if.then.i150 if.then.i150: ; preds = %if.end35, %if.end35.peel call void @exit(i32 noundef 2) #8 unreachable push.exit: ; preds = %if.end35 store i32 %dec.i, ptr @top, align 4, !tbaa !10 store i32 %add, ptr %arrayidx.i147, align 4, !tbaa !10 br label %for.inc94 if.then42: ; preds = %for.body9 %22 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i153 = icmp eq i32 %22, 0 br i1 %cmp.i.not.i153, label %if.then.i157, label %pop.exit158 if.then.i157: ; preds = %if.then42, %if.then42.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit158: ; preds = %if.then42 %dec.i154 = add nsw i32 %22, -1 store i32 %dec.i154, ptr @top, align 4, !tbaa !10 %cmp.i.not.i159 = icmp eq i32 %dec.i154, 0 br i1 %cmp.i.not.i159, label %if.then.i163, label %pop.exit164 if.then.i163: ; preds = %pop.exit158, %pop.exit158.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit164: ; preds = %pop.exit158 %idxprom.i155 = sext i32 %22 to i64 %arrayidx.i156 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i155 %23 = load i32, ptr %arrayidx.i156, align 4, !tbaa !10 %dec.i160 = add nsw i32 %22, -2 store i32 %dec.i160, ptr @top, align 4, !tbaa !10 %idxprom.i161 = sext i32 %dec.i154 to i64 %arrayidx.i162 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i161 %24 = load i32, ptr %arrayidx.i162, align 4, !tbaa !10 %sub = sub nsw i32 %24, %23 %25 = add i32 %sub, -1000000001 %or.cond113 = icmp ult i32 %25, -2000000001 br i1 %or.cond113, label %cleanup, label %if.end51 if.end51: ; preds = %pop.exit164 %cmp.i.i165 = icmp slt i32 %22, 398 br i1 %cmp.i.i165, label %push.exit170, label %if.then.i166 if.then.i166: ; preds = %if.end51, %if.end51.peel call void @exit(i32 noundef 2) #8 unreachable push.exit170: ; preds = %if.end51 store i32 %dec.i154, ptr @top, align 4, !tbaa !10 store i32 %sub, ptr %arrayidx.i162, align 4, !tbaa !10 br label %for.inc94 if.then58: ; preds = %for.body9 %26 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not.i171 = icmp eq i32 %26, 0 br i1 %cmp.i.not.i171, label %if.then.i175, label %pop.exit176 if.then.i175: ; preds = %if.then58, %if.then58.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit176: ; preds = %if.then58 %dec.i172 = add nsw i32 %26, -1 store i32 %dec.i172, ptr @top, align 4, !tbaa !10 %cmp.i.not.i177 = icmp eq i32 %dec.i172, 0 br i1 %cmp.i.not.i177, label %if.then.i181, label %pop.exit182 if.then.i181: ; preds = %pop.exit176, %pop.exit176.peel call void @exit(i32 noundef 1) #8 unreachable pop.exit182: ; preds = %pop.exit176 %idxprom.i173 = sext i32 %26 to i64 %arrayidx.i174 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i173 %27 = load i32, ptr %arrayidx.i174, align 4, !tbaa !10 %dec.i178 = add nsw i32 %26, -2 store i32 %dec.i178, ptr @top, align 4, !tbaa !10 %idxprom.i179 = sext i32 %dec.i172 to i64 %arrayidx.i180 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i179 %28 = load i32, ptr %arrayidx.i180, align 4, !tbaa !10 %mul = mul nsw i32 %28, %27 %29 = add i32 %mul, -1000000001 %or.cond114 = icmp ult i32 %29, -2000000001 br i1 %or.cond114, label %cleanup, label %if.end67 if.end67: ; preds = %pop.exit182 %cmp.i.i183 = icmp slt i32 %26, 398 br i1 %cmp.i.i183, label %push.exit188, label %if.then.i184 if.then.i184: ; preds = %if.end67, %if.end67.peel call void @exit(i32 noundef 2) #8 unreachable push.exit188: ; preds = %if.end67 store i32 %dec.i172, ptr @top, align 4, !tbaa !10 store i32 %mul, ptr %arrayidx.i180, align 4, !tbaa !10 br label %for.inc94 lor.lhs.false71: ; preds = %for.body9 %30 = add nsw i64 %indvars.iv204, -1 %arrayidx74 = getelementptr inbounds [397 x i8], ptr %s, i64 0, i64 %30 %31 = load i8, ptr %arrayidx74, align 1, !tbaa !5 %cmp76 = icmp eq i8 %31, 32 br i1 %cmp76, label %if.then78, label %for.inc94 if.then78: ; preds = %lor.lhs.false71 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %arrayidx11, ptr noundef null, i32 noundef 10) #7 %conv.i = trunc i64 %call.i to i32 %or.cond115 = icmp ugt i32 %conv.i, 1000000 br i1 %or.cond115, label %cleanup, label %if.end88 if.end88: ; preds = %if.then78 %32 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.i189 = icmp slt i32 %32, 396 br i1 %cmp.i.i189, label %push.exit194, label %if.then.i190 if.then.i190: ; preds = %if.end88, %if.end88.peel call void @exit(i32 noundef 2) #8 unreachable push.exit194: ; preds = %if.end88 %inc.i191 = add nsw i32 %32, 1 store i32 %inc.i191, ptr @top, align 4, !tbaa !10 %idxprom.i192 = sext i32 %inc.i191 to i64 %arrayidx.i193 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom.i192 store i32 %conv.i, ptr %arrayidx.i193, align 4, !tbaa !10 br label %for.inc94 for.inc94: ; preds = %for.body9, %for.body9, %push.exit170, %lor.lhs.false71, %push.exit194, %push.exit188, %push.exit %indvars.iv.next205 = add nuw nsw i64 %indvars.iv204, 1 %exitcond208.not = icmp eq i64 %indvars.iv.next205, %wide.trip.count br i1 %exitcond208.not, label %for.cond97.preheader, label %for.body9, !llvm.loop !12 for.body100: ; preds = %for.cond97.preheader, %for.body100 %indvars.iv210 = phi i64 [ %indvars.iv.next211, %for.body100 ], [ 1, %for.cond97.preheader ] %arrayidx102 = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %indvars.iv210 %33 = load i32, ptr %arrayidx102, align 4, !tbaa !10 %call103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %33) %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1 %34 = load i32, ptr @top, align 4, !tbaa !10 %35 = sext i32 %34 to i64 %cmp98.not.not = icmp slt i64 %indvars.iv210, %35 br i1 %cmp98.not.not, label %for.body100, label %for.end106, !llvm.loop !14 for.end106: ; preds = %for.body100, %for.cond97.preheader %putchar = call i32 @putchar(i32 10) br label %cleanup cleanup: ; preds = %if.then78, %pop.exit182, %pop.exit164, %pop.exit149, %pop.exit182.peel, %pop.exit164.peel, %pop.exit149.peel, %if.then78.peel, %for.end106 call void @llvm.lifetime.end.p0(i64 397, ptr nonnull %s) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nounwind uwtable define dso_local i32 @pop() local_unnamed_addr #0 { entry: %0 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i.not = icmp eq i32 %0, 0 br i1 %cmp.i.not, label %if.then, label %if.end if.then: ; preds = %entry tail call void @exit(i32 noundef 1) #8 unreachable if.end: ; preds = %entry %dec = add nsw i32 %0, -1 store i32 %dec, ptr @top, align 4, !tbaa !10 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !10 ret i32 %1 } ; Function Attrs: nounwind uwtable define dso_local void @push(i32 noundef %x) local_unnamed_addr #0 { entry: %0 = load i32, ptr @top, align 4, !tbaa !10 %cmp.i = icmp slt i32 %0, 396 br i1 %cmp.i, label %if.end, label %if.then if.then: ; preds = %entry tail call void @exit(i32 noundef 2) #8 unreachable if.end: ; preds = %entry %inc = add nsw i32 %0, 1 store i32 %inc, ptr @top, align 4, !tbaa !10 %idxprom = sext i32 %inc to i64 %arrayidx = getelementptr inbounds [100 x i32], ptr @S, i64 0, i64 %idxprom store i32 %x, ptr %arrayidx, align 4, !tbaa !10 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @isEmpty() local_unnamed_addr #3 { entry: %0 = load i32, ptr @top, align 4, !tbaa !10 %cmp = icmp eq i32 %0, 0 %. = zext i1 %cmp to i32 ret i32 %. } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @isFull() local_unnamed_addr #3 { entry: %0 = load i32, ptr @top, align 4, !tbaa !10 %cmp = icmp sgt i32 %0, 395 %. = zext i1 %cmp to i32 ret i32 %. } ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) 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 = { noreturn 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 nofree nounwind willreturn "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 #6 = { nofree nounwind } attributes #7 = { nounwind } attributes #8 = { noreturn nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = !{!11, !11, i64 0} !11 = !{!"int", !6, i64 0} !12 = distinct !{!12, !9, !13} !13 = !{!"llvm.loop.peeled.count", i32 1} !14 = distinct !{!14, !9}
#include <stdio.h> int main() { int t,n,i,a[200],flag=0; scanf("%d",&t); while (t--) { flag=0; scanf("%d",&n); for(i=1;i<=n;i++) { scanf("%d",&a[i]); } for(i=1;i<=n;i++) { if(a[i]%2==0) { printf("1\n"); printf("%d\n",i); flag=1; break; } } for(i=1;i<=n;i++) { if(flag!=1) { if(n==1 && a[1]%2!=0) { printf("-1\n"); } else{ printf("2\n"); printf("1 2\n"); break; } } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2874/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2874/source.c" 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.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"1\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"2\00", align 1 @str.7 = private unnamed_addr constant [4 x i8] c"1 2\00", align 1 @str.8 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 %a = alloca [200 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec54 = add nsw i32 %0, -1 store i32 %dec54, ptr %t, align 4, !tbaa !5 %tobool.not55 = icmp eq i32 %0, 0 br i1 %tobool.not55, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %arrayidx20 = getelementptr inbounds [200 x i32], ptr %a, i64 0, i64 1 %arrayidx771 = getelementptr inbounds [200 x i32], ptr %a, i64 0, i64 1 br label %while.body while.body: ; preds = %while.body.lr.ph, %for.end31 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not46 = icmp slt i32 %1, 1 br i1 %cmp.not46, label %for.end31, label %for.body for.cond3.preheader: ; preds = %for.body %cmp4.not.not48 = icmp slt i32 %6, 1 br i1 %cmp4.not.not48, label %for.end31, label %for.body5.preheader for.body5.preheader: ; preds = %for.cond3.preheader %2 = zext i32 %6 to i64 %3 = add nuw i32 %6, 1 %wide.trip.count = zext i32 %3 to i64 %4 = load i32, ptr %arrayidx771, align 4, !tbaa !5 %5 = and i32 %4, 1 %cmp872 = icmp eq i32 %5, 0 br i1 %cmp872, label %if.then, label %for.inc11 for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %while.body ] %arrayidx = getelementptr inbounds [200 x i32], ptr %a, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %7 br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.body5: ; preds = %for.inc11 %arrayidx7 = getelementptr inbounds [200 x i32], ptr %a, i64 0, i64 %indvars.iv.next62 %8 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %9 = and i32 %8, 1 %cmp8 = icmp eq i32 %9, 0 br i1 %cmp8, label %if.then.loopexit, label %for.inc11, !llvm.loop !11 if.then.loopexit: ; preds = %for.body5 %cmp4.not.not.le = icmp uge i64 %indvars.iv6173, %2 br label %if.then if.then: ; preds = %if.then.loopexit, %for.body5.preheader %indvars.iv61.lcssa = phi i64 [ 1, %for.body5.preheader ], [ %indvars.iv.next62, %if.then.loopexit ] %cmp4.not.not50.lcssa = phi i1 [ false, %for.body5.preheader ], [ %cmp4.not.not.le, %if.then.loopexit ] %10 = trunc i64 %indvars.iv61.lcssa to i32 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %10) %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.end13 for.inc11: ; preds = %for.body5.preheader, %for.body5 %indvars.iv6173 = phi i64 [ %indvars.iv.next62, %for.body5 ], [ 1, %for.body5.preheader ] %indvars.iv.next62 = add nuw nsw i64 %indvars.iv6173, 1 %exitcond = icmp eq i64 %indvars.iv.next62, %wide.trip.count br i1 %exitcond, label %for.end13.loopexit, label %for.body5, !llvm.loop !11 for.end13.loopexit: ; preds = %for.inc11 %cmp4.not.not.le79 = icmp uge i64 %indvars.iv6173, %2 br label %for.end13 for.end13: ; preds = %for.end13.loopexit, %if.then %11 = phi i32 [ %.pre, %if.then ], [ %6, %for.end13.loopexit ] %cmp4.not.not44 = phi i1 [ %cmp4.not.not50.lcssa, %if.then ], [ %cmp4.not.not.le79, %for.end13.loopexit ] %cmp15.not52 = icmp sgt i32 %11, 0 %brmerge.not = and i1 %cmp15.not52, %cmp4.not.not44 br i1 %brmerge.not, label %for.body16.us, label %for.end31 for.body16.us: ; preds = %for.end13, %if.then23.us %12 = phi i32 [ %15, %if.then23.us ], [ %11, %for.end13 ] %i.253.us = phi i32 [ %inc30.us, %if.then23.us ], [ 1, %for.end13 ] %cmp19.us = icmp eq i32 %12, 1 br i1 %cmp19.us, label %land.lhs.true.us, label %if.else.split.us land.lhs.true.us: ; preds = %for.body16.us %13 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %14 = and i32 %13, 1 %cmp22.not.us = icmp eq i32 %14, 0 br i1 %cmp22.not.us, label %if.else.split.us, label %if.then23.us if.then23.us: ; preds = %land.lhs.true.us %puts42.us = call i32 @puts(ptr nonnull dereferenceable(1) @str.8) %inc30.us = add nuw nsw i32 %i.253.us, 1 %15 = load i32, ptr %n, align 4, !tbaa !5 %cmp15.not.us.not = icmp slt i32 %i.253.us, %15 br i1 %cmp15.not.us.not, label %for.body16.us, label %for.end31, !llvm.loop !12 if.else.split.us: ; preds = %land.lhs.true.us, %for.body16.us %puts40 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %puts41 = call i32 @puts(ptr nonnull dereferenceable(1) @str.7) br label %for.end31 for.end31: ; preds = %if.then23.us, %for.end13, %while.body, %for.cond3.preheader, %if.else.split.us %16 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %16, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %16, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %for.end31, %entry call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> #include<stdlib.h> int main(){ int n, k, c; char *s; scanf("%d %d %d", &n, &k, &c); s = (char *)malloc(sizeof(char)*(n+1)); scanf("%s", s); int *l, *r; l = (int *)malloc(sizeof(int)*n); r = (int *)malloc(sizeof(int)*n); int x = 0, d = 1; while(d <= n){ if(s[d-1] == 'o'){ l[x] = d; d += (c + 1); x++; if(x > k-1){ break; } }else{ d++; } } x = k-1; d = n; while(d > 0){ if(s[d-1] == 'o'){ r[x] = d; d -= (c + 1); x--; if(x < 0){ break; } }else{ d--; } } int i; for(i=0; i<k; i++){ if(l[i] == r[i]){ printf("%d\n", l[i]); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287493/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287493/source.c" 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 [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k, ptr noundef nonnull %c) %0 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %0, 1 %conv = sext i32 %add to i64 %call1 = call noalias ptr @malloc(i64 noundef %conv) #5 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %call1) %1 = load i32, ptr %n, align 4, !tbaa !5 %conv3 = sext i32 %1 to i64 %mul4 = shl nsw i64 %conv3, 2 %call5 = call noalias ptr @malloc(i64 noundef %mul4) #5 %call8 = call noalias ptr @malloc(i64 noundef %mul4) #5 %cmp.not84 = icmp slt i32 %1, 1 %.pre.pre = load i32, ptr %k, align 4 br i1 %cmp.not84, label %while.end46, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %2 = load i32, ptr %c, align 4 %add15 = add nsw i32 %2, 1 %sub17 = add nsw i32 %.pre.pre, -1 br label %while.body while.body: ; preds = %while.body.lr.ph, %if.end22 %d.086 = phi i32 [ 1, %while.body.lr.ph ], [ %d.1, %if.end22 ] %x.085 = phi i32 [ 0, %while.body.lr.ph ], [ %x.1, %if.end22 ] %sub = add nsw i32 %d.086, -1 %idxprom = sext i32 %sub to i64 %arrayidx = getelementptr inbounds i8, ptr %call1, i64 %idxprom %3 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp11 = icmp eq i8 %3, 111 br i1 %cmp11, label %if.then, label %if.end22 if.then: ; preds = %while.body %idxprom13 = sext i32 %x.085 to i64 %arrayidx14 = getelementptr inbounds i32, ptr %call5, i64 %idxprom13 store i32 %d.086, ptr %arrayidx14, align 4, !tbaa !5 %inc = add nsw i32 %x.085, 1 %cmp18.not = icmp slt i32 %x.085, %sub17 br i1 %cmp18.not, label %if.end22, label %while.end if.end22: ; preds = %while.body, %if.then %x.1 = phi i32 [ %inc, %if.then ], [ %x.085, %while.body ] %add15.pn = phi i32 [ %add15, %if.then ], [ 1, %while.body ] %d.1 = add nsw i32 %add15.pn, %d.086 %cmp.not = icmp sgt i32 %d.1, %1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !10 while.end: ; preds = %if.end22, %if.then %cmp2587 = icmp sgt i32 %1, 0 br i1 %cmp2587, label %while.body27.lr.ph, label %while.end46 while.body27.lr.ph: ; preds = %while.end %sub23 = add nsw i32 %.pre.pre, -1 %4 = load i32, ptr %c, align 4 %add37.neg = xor i32 %4, -1 br label %while.body27 while.body27: ; preds = %while.body27.lr.ph, %if.end45 %d.289 = phi i32 [ %1, %while.body27.lr.ph ], [ %d.3.pre-phi, %if.end45 ] %x.288 = phi i32 [ %sub23, %while.body27.lr.ph ], [ %x.3, %if.end45 ] %sub28 = add nsw i32 %d.289, -1 %idxprom29 = zext i32 %sub28 to i64 %arrayidx30 = getelementptr inbounds i8, ptr %call1, i64 %idxprom29 %5 = load i8, ptr %arrayidx30, align 1, !tbaa !9 %cmp32 = icmp eq i8 %5, 111 br i1 %cmp32, label %if.then34, label %if.end45 if.then34: ; preds = %while.body27 %idxprom35 = sext i32 %x.288 to i64 %arrayidx36 = getelementptr inbounds i32, ptr %call8, i64 %idxprom35 store i32 %d.289, ptr %arrayidx36, align 4, !tbaa !5 %cmp39 = icmp slt i32 %x.288, 1 br i1 %cmp39, label %while.end46, label %if.then34.if.end45_crit_edge if.then34.if.end45_crit_edge: ; preds = %if.then34 %dec = add nsw i32 %x.288, -1 %.pre = add i32 %d.289, %add37.neg br label %if.end45 if.end45: ; preds = %if.then34.if.end45_crit_edge, %while.body27 %d.3.pre-phi = phi i32 [ %.pre, %if.then34.if.end45_crit_edge ], [ %sub28, %while.body27 ] %x.3 = phi i32 [ %dec, %if.then34.if.end45_crit_edge ], [ %x.288, %while.body27 ] %cmp25 = icmp sgt i32 %d.3.pre-phi, 0 br i1 %cmp25, label %while.body27, label %while.end46, !llvm.loop !12 while.end46: ; preds = %if.end45, %if.then34, %entry, %while.end %cmp4790 = icmp sgt i32 %.pre.pre, 0 br i1 %cmp4790, label %for.body, label %for.end for.body: ; preds = %while.end46, %for.inc %6 = phi i32 [ %9, %for.inc ], [ %.pre.pre, %while.end46 ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %while.end46 ] %arrayidx50 = getelementptr inbounds i32, ptr %call5, i64 %indvars.iv %7 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %arrayidx52 = getelementptr inbounds i32, ptr %call8, i64 %indvars.iv %8 = load i32, ptr %arrayidx52, align 4, !tbaa !5 %cmp53 = icmp eq i32 %7, %8 br i1 %cmp53, label %if.then55, label %for.inc if.then55: ; preds = %for.body %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %7) %.pre93 = load i32, ptr %k, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body, %if.then55 %9 = phi i32 [ %6, %for.body ], [ %.pre93, %if.then55 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = sext i32 %9 to i64 %cmp47 = icmp slt i64 %indvars.iv.next, %10 br i1 %cmp47, label %for.body, label %for.end, !llvm.loop !13 for.end: ; preds = %for.inc, %while.end46 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { nounwind } attributes #5 = { nounwind allocsize(0) } !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"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11}
#include <stdio.h> #include <stdlib.h> int asc(const void *a, const void *b) { return *(int *)a - *(int *)b; } int main() { int n,d[200000],m,t[200000],i,j = 0; scanf("%d",&n); for (i = 0; i < n; i++) { scanf("%d",&d[i]); } scanf("%d",&m); for (i = 0; i < m; i++) { scanf("%d",&t[i]); } qsort(d,n,sizeof(int),asc); qsort(t,m,sizeof(int),asc); for (i = 0; i < n; i++) { if(d[i] == t[j]) { j++; if(j == m)break; } } printf("%s\n",i == n ? "NO" : "YES"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287543/source.c" 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.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @asc(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 nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %d = alloca [200000 x i32], align 16 %m = alloca i32, align 4 %t = alloca [200000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %d) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %t) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp46 = icmp sgt i32 %0, 0 br i1 %cmp46, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [200000 x i32], ptr %d, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m) %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp448 = icmp sgt i32 %3, 0 br i1 %cmp448, label %for.body5, label %for.end11 for.body5: ; preds = %for.end, %for.body5 %indvars.iv57 = phi i64 [ %indvars.iv.next58, %for.body5 ], [ 0, %for.end ] %arrayidx7 = getelementptr inbounds [200000 x i32], ptr %t, i64 0, i64 %indvars.iv57 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx7) %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1 %4 = load i32, ptr %m, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp4 = icmp slt i64 %indvars.iv.next58, %5 br i1 %cmp4, label %for.body5, label %for.end11, !llvm.loop !11 for.end11: ; preds = %for.body5, %for.end %6 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %6 to i64 call void @qsort(ptr noundef nonnull %d, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @asc) #6 %7 = load i32, ptr %m, align 4, !tbaa !5 %conv13 = sext i32 %7 to i64 call void @qsort(ptr noundef nonnull %t, i64 noundef %conv13, i64 noundef 4, ptr noundef nonnull @asc) #6 %8 = load i32, ptr %n, align 4, !tbaa !5 %cmp1550 = icmp sgt i32 %8, 0 br i1 %cmp1550, label %for.body17.lr.ph, label %for.end31 for.body17.lr.ph: ; preds = %for.end11 %9 = load i32, ptr %m, align 4 %wide.trip.count = zext i32 %8 to i64 br label %for.body17 for.body17: ; preds = %for.body17.lr.ph, %for.inc29 %indvars.iv60 = phi i64 [ 0, %for.body17.lr.ph ], [ %indvars.iv.next61, %for.inc29 ] %j.052 = phi i32 [ 0, %for.body17.lr.ph ], [ %j.1, %for.inc29 ] %arrayidx19 = getelementptr inbounds [200000 x i32], ptr %d, i64 0, i64 %indvars.iv60 %10 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %idxprom20 = sext i32 %j.052 to i64 %arrayidx21 = getelementptr inbounds [200000 x i32], ptr %t, i64 0, i64 %idxprom20 %11 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %cmp22 = icmp eq i32 %10, %11 br i1 %cmp22, label %if.then, label %for.inc29 if.then: ; preds = %for.body17 %inc24 = add nsw i32 %j.052, 1 %cmp25 = icmp eq i32 %inc24, %9 br i1 %cmp25, label %for.end31.loopexit.split.loop.exit, label %for.inc29 for.inc29: ; preds = %for.body17, %if.then %j.1 = phi i32 [ %inc24, %if.then ], [ %j.052, %for.body17 ] %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %exitcond.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count br i1 %exitcond.not, label %for.end31, label %for.body17, !llvm.loop !12 for.end31.loopexit.split.loop.exit: ; preds = %if.then %12 = trunc i64 %indvars.iv60 to i32 br label %for.end31 for.end31: ; preds = %for.inc29, %for.end31.loopexit.split.loop.exit, %for.end11 %i.2.lcssa = phi i32 [ 0, %for.end11 ], [ %12, %for.end31.loopexit.split.loop.exit ], [ %8, %for.inc29 ] %cmp32 = icmp eq i32 %i.2.lcssa, %8 %cond = select i1 %cmp32, ptr @.str.2, ptr @.str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %cond) call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %t) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %d) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; 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 declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { 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 #4 = { 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 #5 = { nofree nounwind } attributes #6 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> long long MIN(long long a,long long b){return a<b?a:b;} int main(){ long long n,m,r,i,j,k,t[10],d[210][210]={}; long long c[10][310]={}; scanf("%lld %lld %lld",&n,&m,&r); for(i=0;i<r;i++)scanf("%lld",&t[i]); for(i=0;i<r;i++)t[i]--; for(i=0;i<n;i++){ for(j=0;j<n;j++)d[i][j]=1e18; d[i][i]=0; } while(m--){ scanf("%lld %lld %lld",&i,&j,&k); d[i-1][j-1]=d[j-1][i-1]=k; } for(i=0;i<r;i++){ for(j=0;j<300;j++)c[i][j]=1e18; c[i][1<<i]=0; } for(i=0;i<n;i++){ for(j=0;j<n;j++){ for(k=0;k<n;k++)d[j][k]=MIN(d[j][k],d[j][i]+d[i][k]); } } for(i=0;i<(1<<r);i++){ for(j=0;j<r;j++){ if((i&(1<<j))==0)continue; for(k=0;k<r;k++)c[k][i|(1<<k)]=MIN(c[k][i|(1<<k)],c[j][i]+d[t[j]][t[k]]); } } /*for(i=0;i<(1<<r);i++){ for(j=0;j<r;j++)printf("%10d ",c[j][i]);printf("\n"); }//*/ j=(1<<r)-1; for(i=0;i<r;i++)c[0][j]=MIN(c[0][j],c[i][j]); printf("%lld\n",c[0][j]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287587/source.c" 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 [15 x i8] c"%lld %lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @MIN(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i64, align 8 %m = alloca i64, align 8 %r = alloca i64, align 8 %i = alloca i64, align 8 %j = alloca i64, align 8 %k = alloca i64, align 8 %t = alloca [10 x i64], align 16 %d = alloca [210 x [210 x i64]], align 16 %c = alloca [10 x [310 x i64]], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %r) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %j) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #6 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %t) #6 call void @llvm.lifetime.start.p0(i64 352800, ptr nonnull %d) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(352800) %d, i8 0, i64 352800, i1 false) call void @llvm.lifetime.start.p0(i64 24800, ptr nonnull %c) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(24800) %c, i8 0, i64 24800, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m, ptr noundef nonnull %r) store i64 0, ptr %i, align 8, !tbaa !5 %0 = load i64, ptr %r, align 8, !tbaa !5 %cmp167 = icmp sgt i64 %0, 0 br i1 %cmp167, label %for.body, label %for.cond9.preheader for.cond2.preheader: ; preds = %for.body %cmp3169 = icmp sgt i64 %7, 0 br i1 %cmp3169, label %for.body4.preheader, label %for.cond9.preheader for.body4.preheader: ; preds = %for.cond2.preheader %min.iters.check = icmp ult i64 %7, 4 br i1 %min.iters.check, label %for.body4.preheader279, label %vector.ph vector.ph: ; preds = %for.body4.preheader %n.vec = and i64 %7, -4 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %1 = getelementptr inbounds [10 x i64], ptr %t, i64 0, i64 %index %wide.load = load <2 x i64>, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i64, ptr %1, i64 2 %wide.load235 = load <2 x i64>, ptr %2, align 16, !tbaa !5 %3 = add nsw <2 x i64> %wide.load, <i64 -1, i64 -1> %4 = add nsw <2 x i64> %wide.load235, <i64 -1, i64 -1> store <2 x i64> %3, ptr %1, align 16, !tbaa !5 store <2 x i64> %4, ptr %2, align 16, !tbaa !5 %index.next = add nuw i64 %index, 4 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %7, %n.vec br i1 %cmp.n, label %for.cond9.preheader, label %for.body4.preheader279 for.body4.preheader279: ; preds = %for.body4.preheader, %middle.block %storemerge152170.ph = phi i64 [ 0, %for.body4.preheader ], [ %n.vec, %middle.block ] br label %for.body4 for.body: ; preds = %entry, %for.body %storemerge168 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [10 x i64], ptr %t, i64 0, i64 %storemerge168 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %6 = load i64, ptr %i, align 8, !tbaa !5 %inc = add nsw i64 %6, 1 store i64 %inc, ptr %i, align 8, !tbaa !5 %7 = load i64, ptr %r, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %7 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !13 for.cond9.preheader: ; preds = %for.body4, %middle.block, %entry, %for.cond2.preheader %.lcssa166234 = phi i64 [ %7, %for.cond2.preheader ], [ %0, %entry ], [ %7, %middle.block ], [ %7, %for.body4 ] %8 = load i64, ptr %n, align 8, !tbaa !5 %cmp10175 = icmp sgt i64 %8, 0 br i1 %cmp10175, label %for.cond12.preheader.us.preheader, label %while.cond.preheader for.cond12.preheader.us.preheader: ; preds = %for.cond9.preheader %min.iters.check238 = icmp ult i64 %8, 4 %n.vec241 = and i64 %8, -4 %cmp.n243 = icmp eq i64 %8, %n.vec241 br label %for.cond12.preheader.us for.cond12.preheader.us: ; preds = %for.cond12.preheader.us.preheader, %for.cond12.for.end19_crit_edge.us %storemerge153176.us = phi i64 [ %inc23.us, %for.cond12.for.end19_crit_edge.us ], [ 0, %for.cond12.preheader.us.preheader ] br i1 %min.iters.check238, label %for.body14.us.preheader, label %vector.body244 vector.body244: ; preds = %for.cond12.preheader.us, %vector.body244 %index245 = phi i64 [ %index.next246, %vector.body244 ], [ 0, %for.cond12.preheader.us ] %9 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge153176.us, i64 %index245 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %9, align 16, !tbaa !5 %10 = getelementptr inbounds i64, ptr %9, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %10, align 16, !tbaa !5 %index.next246 = add nuw i64 %index245, 4 %11 = icmp eq i64 %index.next246, %n.vec241 br i1 %11, label %middle.block236, label %vector.body244, !llvm.loop !14 middle.block236: ; preds = %vector.body244 br i1 %cmp.n243, label %for.cond12.for.end19_crit_edge.us, label %for.body14.us.preheader for.body14.us.preheader: ; preds = %for.cond12.preheader.us, %middle.block236 %storemerge163173.us.ph = phi i64 [ 0, %for.cond12.preheader.us ], [ %n.vec241, %middle.block236 ] br label %for.body14.us for.body14.us: ; preds = %for.body14.us.preheader, %for.body14.us %storemerge163173.us = phi i64 [ %inc18.us, %for.body14.us ], [ %storemerge163173.us.ph, %for.body14.us.preheader ] %arrayidx16.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge153176.us, i64 %storemerge163173.us store i64 1000000000000000000, ptr %arrayidx16.us, align 8, !tbaa !5 %inc18.us = add nuw nsw i64 %storemerge163173.us, 1 %exitcond219.not = icmp eq i64 %inc18.us, %8 br i1 %exitcond219.not, label %for.cond12.for.end19_crit_edge.us, label %for.body14.us, !llvm.loop !15 for.cond12.for.end19_crit_edge.us: ; preds = %for.body14.us, %middle.block236 %arrayidx21.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge153176.us, i64 %storemerge153176.us store i64 0, ptr %arrayidx21.us, align 8, !tbaa !5 %inc23.us = add nuw nsw i64 %storemerge153176.us, 1 %exitcond220.not = icmp eq i64 %inc23.us, %8 br i1 %exitcond220.not, label %for.cond9.while.cond.preheader_crit_edge, label %for.cond12.preheader.us, !llvm.loop !16 for.body4: ; preds = %for.body4.preheader279, %for.body4 %storemerge152170 = phi i64 [ %inc7, %for.body4 ], [ %storemerge152170.ph, %for.body4.preheader279 ] %arrayidx5 = getelementptr inbounds [10 x i64], ptr %t, i64 0, i64 %storemerge152170 %12 = load i64, ptr %arrayidx5, align 8, !tbaa !5 %dec = add nsw i64 %12, -1 store i64 %dec, ptr %arrayidx5, align 8, !tbaa !5 %inc7 = add nuw nsw i64 %storemerge152170, 1 %exitcond.not = icmp eq i64 %inc7, %7 br i1 %exitcond.not, label %for.cond9.preheader, label %for.body4, !llvm.loop !17 for.cond9.while.cond.preheader_crit_edge: ; preds = %for.cond12.for.end19_crit_edge.us store i64 %8, ptr %j, align 8, !tbaa !5 br label %while.cond.preheader while.cond.preheader: ; preds = %for.cond9.while.cond.preheader_crit_edge, %for.cond9.preheader %storemerge153.lcssa = phi i64 [ %8, %for.cond9.while.cond.preheader_crit_edge ], [ 0, %for.cond9.preheader ] store i64 %storemerge153.lcssa, ptr %i, align 8, !tbaa !5 %13 = load i64, ptr %m, align 8, !tbaa !5 %dec25179 = add nsw i64 %13, -1 store i64 %dec25179, ptr %m, align 8, !tbaa !5 %tobool.not180 = icmp eq i64 %13, 0 br i1 %tobool.not180, label %for.cond34.preheader, label %while.body for.cond34.preheader.loopexit: ; preds = %while.body %.pre = load i64, ptr %r, align 8, !tbaa !5 br label %for.cond34.preheader for.cond34.preheader: ; preds = %for.cond34.preheader.loopexit, %while.cond.preheader %14 = phi i64 [ %.pre, %for.cond34.preheader.loopexit ], [ %.lcssa166234, %while.cond.preheader ] %cmp35182 = icmp slt i64 %14, 1 br i1 %cmp35182, label %for.cond50.preheader, label %vector.ph249 while.body: ; preds = %while.cond.preheader, %while.body %call26 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i, ptr noundef nonnull %j, ptr noundef nonnull %k) %15 = load i64, ptr %k, align 8, !tbaa !5 %16 = load i64, ptr %j, align 8, !tbaa !5 %sub = add nsw i64 %16, -1 %17 = load i64, ptr %i, align 8, !tbaa !5 %sub28 = add nsw i64 %17, -1 %arrayidx29 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %sub, i64 %sub28 store i64 %15, ptr %arrayidx29, align 8, !tbaa !5 %arrayidx33 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %sub28, i64 %sub store i64 %15, ptr %arrayidx33, align 8, !tbaa !5 %18 = load i64, ptr %m, align 8, !tbaa !5 %dec25 = add nsw i64 %18, -1 store i64 %dec25, ptr %m, align 8, !tbaa !5 %tobool.not = icmp eq i64 %18, 0 br i1 %tobool.not, label %for.cond34.preheader.loopexit, label %while.body, !llvm.loop !18 vector.ph249: ; preds = %for.cond34.preheader, %for.end44 %storemerge154183 = phi i64 [ %inc48, %for.end44 ], [ 0, %for.cond34.preheader ] br label %vector.body251 vector.body251: ; preds = %vector.body251, %vector.ph249 %index252 = phi i64 [ 0, %vector.ph249 ], [ %index.next253.4, %vector.body251 ] %19 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %index252 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %19, align 16, !tbaa !5 %20 = getelementptr inbounds i64, ptr %19, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %20, align 16, !tbaa !5 %index.next253 = add nuw nsw i64 %index252, 4 %21 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %index.next253 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %21, align 16, !tbaa !5 %22 = getelementptr inbounds i64, ptr %21, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %22, align 16, !tbaa !5 %index.next253.1 = add nuw nsw i64 %index252, 8 %23 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %index.next253.1 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %23, align 16, !tbaa !5 %24 = getelementptr inbounds i64, ptr %23, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %24, align 16, !tbaa !5 %index.next253.2 = add nuw nsw i64 %index252, 12 %25 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %index.next253.2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %25, align 16, !tbaa !5 %26 = getelementptr inbounds i64, ptr %25, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %26, align 16, !tbaa !5 %index.next253.3 = add nuw nsw i64 %index252, 16 %27 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %index.next253.3 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %27, align 16, !tbaa !5 %28 = getelementptr inbounds i64, ptr %27, i64 2 store <2 x i64> <i64 1000000000000000000, i64 1000000000000000000>, ptr %28, align 16, !tbaa !5 %index.next253.4 = add nuw nsw i64 %index252, 20 %29 = icmp eq i64 %index.next253.4, 300 br i1 %29, label %for.end44, label %vector.body251, !llvm.loop !19 for.cond50.preheader: ; preds = %for.end44, %for.cond34.preheader %30 = load i64, ptr %n, align 8, !tbaa !5 %cmp51194 = icmp sgt i64 %30, 0 br i1 %cmp51194, label %for.cond53.preheader.us.preheader, label %for.cond77.preheader for.cond53.preheader.us.preheader: ; preds = %for.cond50.preheader %31 = shl i64 %30, 3 %32 = getelementptr i8, ptr %d, i64 %31 %min.iters.check264 = icmp ult i64 %30, 10 %invariant.gep = getelementptr i8, ptr %d, i64 8 %33 = getelementptr i8, ptr %d, i64 %31 %n.vec267 = and i64 %30, -4 %cmp.n269 = icmp eq i64 %30, %n.vec267 %xtraiter = and i64 %30, 1 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.cond53.preheader.us for.cond53.preheader.us: ; preds = %for.cond53.preheader.us.preheader, %for.cond53.for.inc74_crit_edge.split.us.us %storemerge155195.us = phi i64 [ %inc75.us, %for.cond53.for.inc74_crit_edge.split.us.us ], [ 0, %for.cond53.preheader.us.preheader ] %34 = shl i64 %storemerge155195.us, 3 %35 = mul i64 %storemerge155195.us, 1680 %scevgep257 = getelementptr i8, ptr %d, i64 %35 %scevgep258 = getelementptr i8, ptr %32, i64 %35 %gep = getelementptr i8, ptr %invariant.gep, i64 %34 %36 = getelementptr i8, ptr %d, i64 %34 %bound0 = icmp ult ptr %d, %gep %bound1 = icmp ult ptr %36, %33 %found.conflict = and i1 %bound0, %bound1 br label %for.cond56.preheader.us.us for.cond56.preheader.us.us: ; preds = %for.cond56.for.inc71_crit_edge.us.us, %for.cond53.preheader.us %storemerge160190.us.us = phi i64 [ 0, %for.cond53.preheader.us ], [ %inc72.us.us, %for.cond56.for.inc71_crit_edge.us.us ] %arrayidx62.us.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge160190.us.us, i64 %storemerge155195.us br i1 %min.iters.check264, label %for.body58.us.us.preheader, label %vector.memcheck vector.memcheck: ; preds = %for.cond56.preheader.us.us %37 = mul i64 %storemerge160190.us.us, 1680 %scevgep254 = getelementptr i8, ptr %33, i64 %37 %scevgep = getelementptr i8, ptr %d, i64 %37 %bound0259 = icmp ult ptr %scevgep, %scevgep258 %bound1260 = icmp ult ptr %scevgep257, %scevgep254 %found.conflict261 = and i1 %bound0259, %bound1260 %conflict.rdx = or i1 %found.conflict, %found.conflict261 br i1 %conflict.rdx, label %for.body58.us.us.preheader, label %vector.ph265 vector.ph265: ; preds = %vector.memcheck %38 = load i64, ptr %arrayidx62.us.us, align 8, !tbaa !5, !alias.scope !20 %broadcast.splatinsert276 = insertelement <2 x i64> poison, i64 %38, i64 0 %broadcast.splat277 = shufflevector <2 x i64> %broadcast.splatinsert276, <2 x i64> poison, <2 x i32> zeroinitializer br label %vector.body270 vector.body270: ; preds = %vector.body270, %vector.ph265 %index271 = phi i64 [ 0, %vector.ph265 ], [ %index.next278, %vector.body270 ] %39 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge160190.us.us, i64 %index271 %wide.load272 = load <2 x i64>, ptr %39, align 16, !tbaa !5, !alias.scope !23, !noalias !25 %40 = getelementptr inbounds i64, ptr %39, i64 2 %wide.load273 = load <2 x i64>, ptr %40, align 16, !tbaa !5, !alias.scope !23, !noalias !25 %41 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge155195.us, i64 %index271 %wide.load274 = load <2 x i64>, ptr %41, align 16, !tbaa !5, !alias.scope !27 %42 = getelementptr inbounds i64, ptr %41, i64 2 %wide.load275 = load <2 x i64>, ptr %42, align 16, !tbaa !5, !alias.scope !27 %43 = add nsw <2 x i64> %wide.load274, %broadcast.splat277 %44 = add nsw <2 x i64> %wide.load275, %broadcast.splat277 %45 = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %wide.load272, <2 x i64> %43) %46 = call <2 x i64> @llvm.smin.v2i64(<2 x i64> %wide.load273, <2 x i64> %44) store <2 x i64> %45, ptr %39, align 16, !tbaa !5, !alias.scope !23, !noalias !25 store <2 x i64> %46, ptr %40, align 16, !tbaa !5, !alias.scope !23, !noalias !25 %index.next278 = add nuw i64 %index271, 4 %47 = icmp eq i64 %index.next278, %n.vec267 br i1 %47, label %middle.block262, label %vector.body270, !llvm.loop !28 middle.block262: ; preds = %vector.body270 br i1 %cmp.n269, label %for.cond56.for.inc71_crit_edge.us.us, label %for.body58.us.us.preheader for.body58.us.us.preheader: ; preds = %vector.memcheck, %for.cond56.preheader.us.us, %middle.block262 %storemerge161187.us.us.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %for.cond56.preheader.us.us ], [ %n.vec267, %middle.block262 ] %.neg = or i64 %storemerge161187.us.us.ph, 1 br i1 %lcmp.mod.not, label %for.body58.us.us.prol.loopexit, label %for.body58.us.us.prol for.body58.us.us.prol: ; preds = %for.body58.us.us.preheader %arrayidx60.us.us.prol = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge160190.us.us, i64 %storemerge161187.us.us.ph %48 = load i64, ptr %arrayidx60.us.us.prol, align 16, !tbaa !5 %49 = load i64, ptr %arrayidx62.us.us, align 8, !tbaa !5 %arrayidx64.us.us.prol = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge155195.us, i64 %storemerge161187.us.us.ph %50 = load i64, ptr %arrayidx64.us.us.prol, align 16, !tbaa !5 %add.us.us.prol = add nsw i64 %50, %49 %cond.i.us.us.prol = call i64 @llvm.smin.i64(i64 %48, i64 %add.us.us.prol) store i64 %cond.i.us.us.prol, ptr %arrayidx60.us.us.prol, align 16, !tbaa !5 %inc69.us.us.prol = or i64 %storemerge161187.us.us.ph, 1 br label %for.body58.us.us.prol.loopexit for.body58.us.us.prol.loopexit: ; preds = %for.body58.us.us.prol, %for.body58.us.us.preheader %storemerge161187.us.us.unr = phi i64 [ %storemerge161187.us.us.ph, %for.body58.us.us.preheader ], [ %inc69.us.us.prol, %for.body58.us.us.prol ] %51 = icmp eq i64 %30, %.neg br i1 %51, label %for.cond56.for.inc71_crit_edge.us.us, label %for.body58.us.us for.body58.us.us: ; preds = %for.body58.us.us.prol.loopexit, %for.body58.us.us %storemerge161187.us.us = phi i64 [ %inc69.us.us.1, %for.body58.us.us ], [ %storemerge161187.us.us.unr, %for.body58.us.us.prol.loopexit ] %arrayidx60.us.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge160190.us.us, i64 %storemerge161187.us.us %52 = load i64, ptr %arrayidx60.us.us, align 8, !tbaa !5 %53 = load i64, ptr %arrayidx62.us.us, align 8, !tbaa !5 %arrayidx64.us.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge155195.us, i64 %storemerge161187.us.us %54 = load i64, ptr %arrayidx64.us.us, align 8, !tbaa !5 %add.us.us = add nsw i64 %54, %53 %cond.i.us.us = call i64 @llvm.smin.i64(i64 %52, i64 %add.us.us) store i64 %cond.i.us.us, ptr %arrayidx60.us.us, align 8, !tbaa !5 %inc69.us.us = add nuw nsw i64 %storemerge161187.us.us, 1 %arrayidx60.us.us.1 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge160190.us.us, i64 %inc69.us.us %55 = load i64, ptr %arrayidx60.us.us.1, align 8, !tbaa !5 %56 = load i64, ptr %arrayidx62.us.us, align 8, !tbaa !5 %arrayidx64.us.us.1 = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %storemerge155195.us, i64 %inc69.us.us %57 = load i64, ptr %arrayidx64.us.us.1, align 8, !tbaa !5 %add.us.us.1 = add nsw i64 %57, %56 %cond.i.us.us.1 = call i64 @llvm.smin.i64(i64 %55, i64 %add.us.us.1) store i64 %cond.i.us.us.1, ptr %arrayidx60.us.us.1, align 8, !tbaa !5 %inc69.us.us.1 = add nuw nsw i64 %storemerge161187.us.us, 2 %exitcond223.not.1 = icmp eq i64 %inc69.us.us.1, %30 br i1 %exitcond223.not.1, label %for.cond56.for.inc71_crit_edge.us.us, label %for.body58.us.us, !llvm.loop !29 for.cond56.for.inc71_crit_edge.us.us: ; preds = %for.body58.us.us.prol.loopexit, %for.body58.us.us, %middle.block262 %inc72.us.us = add nuw nsw i64 %storemerge160190.us.us, 1 %exitcond224.not = icmp eq i64 %inc72.us.us, %30 br i1 %exitcond224.not, label %for.cond53.for.inc74_crit_edge.split.us.us, label %for.cond56.preheader.us.us, !llvm.loop !30 for.cond53.for.inc74_crit_edge.split.us.us: ; preds = %for.cond56.for.inc71_crit_edge.us.us %inc75.us = add nuw nsw i64 %storemerge155195.us, 1 %exitcond225.not = icmp eq i64 %inc75.us, %30 br i1 %exitcond225.not, label %for.cond50.for.cond77.preheader_crit_edge.split.us, label %for.cond53.preheader.us, !llvm.loop !31 for.cond50.for.cond77.preheader_crit_edge.split.us: ; preds = %for.cond53.for.inc74_crit_edge.split.us.us store i64 %30, ptr %k, align 8, !tbaa !5 br label %for.cond77.preheader for.end44: ; preds = %vector.body251 %sh_prom = trunc i64 %storemerge154183 to i32 %shl = shl nuw i32 1, %sh_prom %idxprom = sext i32 %shl to i64 %arrayidx46 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge154183, i64 %idxprom store i64 0, ptr %arrayidx46, align 8, !tbaa !5 %inc48 = add nuw nsw i64 %storemerge154183, 1 %exitcond222.not = icmp eq i64 %inc48, %14 br i1 %exitcond222.not, label %for.cond50.preheader, label %vector.ph249, !llvm.loop !32 for.cond77.preheader: ; preds = %for.cond50.for.cond77.preheader_crit_edge.split.us, %for.cond50.preheader %sh_prom78 = trunc i64 %14 to i32 %shl79 = shl nuw i32 1, %sh_prom78 %cmp80207.not = icmp eq i32 %sh_prom78, 31 %brmerge = or i1 %cmp80207.not, %cmp35182 br i1 %brmerge, label %for.end123, label %for.cond83.preheader.us.preheader for.cond83.preheader.us.preheader: ; preds = %for.cond77.preheader %58 = call i32 @llvm.smax.i32(i32 %shl79, i32 1) %smax228 = zext i32 %58 to i64 br label %for.cond83.preheader.us for.cond83.preheader.us: ; preds = %for.cond83.preheader.us.preheader, %for.cond83.for.inc121_crit_edge.split.us.us %storemerge156208.us = phi i64 [ %inc122.us, %for.cond83.for.inc121_crit_edge.split.us.us ], [ 0, %for.cond83.preheader.us.preheader ] br label %for.body86.us.us for.body86.us.us: ; preds = %for.inc118.us.us, %for.cond83.preheader.us %storemerge158203.us.us = phi i64 [ 0, %for.cond83.preheader.us ], [ %inc119.us.us, %for.inc118.us.us ] %sh_prom87.us.us = trunc i64 %storemerge158203.us.us to i32 %shl88.us.us = shl nuw i32 1, %sh_prom87.us.us %conv89.us.us = sext i32 %shl88.us.us to i64 %and.us.us = and i64 %storemerge156208.us, %conv89.us.us %cmp90.us.us = icmp eq i64 %and.us.us, 0 br i1 %cmp90.us.us, label %for.inc118.us.us, label %for.cond92.preheader.us.us for.body95.us.us: ; preds = %for.cond92.preheader.us.us, %for.body95.us.us %storemerge159200.us.us = phi i64 [ 0, %for.cond92.preheader.us.us ], [ %inc116.us.us, %for.body95.us.us ] %sh_prom97.us.us = trunc i64 %storemerge159200.us.us to i32 %shl98.us.us = shl nuw i32 1, %sh_prom97.us.us %conv99.us.us = sext i32 %shl98.us.us to i64 %or.us.us = or i64 %storemerge156208.us, %conv99.us.us %arrayidx100.us.us = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge159200.us.us, i64 %or.us.us %59 = load i64, ptr %arrayidx100.us.us, align 8, !tbaa !5 %60 = load i64, ptr %arrayidx102.us.us, align 8, !tbaa !5 %arrayidx105.us.us = getelementptr inbounds [10 x i64], ptr %t, i64 0, i64 %storemerge159200.us.us %61 = load i64, ptr %arrayidx105.us.us, align 8, !tbaa !5 %arrayidx106.us.us = getelementptr inbounds [210 x [210 x i64]], ptr %d, i64 0, i64 %63, i64 %61 %62 = load i64, ptr %arrayidx106.us.us, align 8, !tbaa !5 %add107.us.us = add nsw i64 %62, %60 %cond.i164.us.us = call i64 @llvm.smin.i64(i64 %59, i64 %add107.us.us) store i64 %cond.i164.us.us, ptr %arrayidx100.us.us, align 8, !tbaa !5 %inc116.us.us = add nuw nsw i64 %storemerge159200.us.us, 1 %exitcond226.not = icmp eq i64 %inc116.us.us, %14 br i1 %exitcond226.not, label %for.cond92.for.inc118.loopexit_crit_edge.us.us, label %for.body95.us.us, !llvm.loop !33 for.inc118.us.us: ; preds = %for.cond92.for.inc118.loopexit_crit_edge.us.us, %for.body86.us.us %inc119.us.us = add nuw nsw i64 %storemerge158203.us.us, 1 %exitcond227.not = icmp eq i64 %inc119.us.us, %14 br i1 %exitcond227.not, label %for.cond83.for.inc121_crit_edge.split.us.us, label %for.body86.us.us, !llvm.loop !34 for.cond92.preheader.us.us: ; preds = %for.body86.us.us %arrayidx102.us.us = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge158203.us.us, i64 %storemerge156208.us %arrayidx103.us.us = getelementptr inbounds [10 x i64], ptr %t, i64 0, i64 %storemerge158203.us.us %63 = load i64, ptr %arrayidx103.us.us, align 8, !tbaa !5 br label %for.body95.us.us for.cond92.for.inc118.loopexit_crit_edge.us.us: ; preds = %for.body95.us.us store i64 %14, ptr %k, align 8, !tbaa !5 br label %for.inc118.us.us for.cond83.for.inc121_crit_edge.split.us.us: ; preds = %for.inc118.us.us %inc122.us = add nuw nsw i64 %storemerge156208.us, 1 %exitcond229.not = icmp eq i64 %inc122.us, %smax228 br i1 %exitcond229.not, label %for.end123, label %for.cond83.preheader.us, !llvm.loop !35 for.end123: ; preds = %for.cond83.for.inc121_crit_edge.split.us.us, %for.cond77.preheader %sub126 = add nsw i32 %shl79, -1 %conv127 = sext i32 %sub126 to i64 store i64 %conv127, ptr %j, align 8, !tbaa !5 %arrayidx133 = getelementptr inbounds [310 x i64], ptr %c, i64 0, i64 %conv127 %arrayidx133.promoted = load i64, ptr %arrayidx133, align 8, !tbaa !5 br i1 %cmp35182, label %for.end141, label %for.body131.preheader for.body131.preheader: ; preds = %for.end123 %xtraiter280 = and i64 %14, 1 %64 = icmp eq i64 %14, 1 br i1 %64, label %for.end141.loopexit.unr-lcssa, label %for.body131.preheader.new for.body131.preheader.new: ; preds = %for.body131.preheader %unroll_iter = and i64 %14, -2 br label %for.body131 for.body131: ; preds = %for.body131, %for.body131.preheader.new %cond.i165217 = phi i64 [ %arrayidx133.promoted, %for.body131.preheader.new ], [ %cond.i165.1, %for.body131 ] %storemerge157215 = phi i64 [ 0, %for.body131.preheader.new ], [ %inc140.1, %for.body131 ] %niter = phi i64 [ 0, %for.body131.preheader.new ], [ %niter.next.1, %for.body131 ] %arrayidx135 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge157215, i64 %conv127 %65 = load i64, ptr %arrayidx135, align 8, !tbaa !5 %cond.i165 = call i64 @llvm.smin.i64(i64 %cond.i165217, i64 %65) store i64 %cond.i165, ptr %arrayidx133, align 8, !tbaa !5 %inc140 = or i64 %storemerge157215, 1 %arrayidx135.1 = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %inc140, i64 %conv127 %66 = load i64, ptr %arrayidx135.1, align 8, !tbaa !5 %cond.i165.1 = call i64 @llvm.smin.i64(i64 %cond.i165, i64 %66) store i64 %cond.i165.1, ptr %arrayidx133, align 8, !tbaa !5 %inc140.1 = add nuw nsw i64 %storemerge157215, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end141.loopexit.unr-lcssa, label %for.body131, !llvm.loop !36 for.end141.loopexit.unr-lcssa: ; preds = %for.body131, %for.body131.preheader %cond.i165.lcssa.ph = phi i64 [ undef, %for.body131.preheader ], [ %cond.i165.1, %for.body131 ] %cond.i165217.unr = phi i64 [ %arrayidx133.promoted, %for.body131.preheader ], [ %cond.i165.1, %for.body131 ] %storemerge157215.unr = phi i64 [ 0, %for.body131.preheader ], [ %inc140.1, %for.body131 ] %lcmp.mod281.not = icmp eq i64 %xtraiter280, 0 br i1 %lcmp.mod281.not, label %for.end141, label %for.body131.epil for.body131.epil: ; preds = %for.end141.loopexit.unr-lcssa %arrayidx135.epil = getelementptr inbounds [10 x [310 x i64]], ptr %c, i64 0, i64 %storemerge157215.unr, i64 %conv127 %67 = load i64, ptr %arrayidx135.epil, align 8, !tbaa !5 %cond.i165.epil = call i64 @llvm.smin.i64(i64 %cond.i165217.unr, i64 %67) store i64 %cond.i165.epil, ptr %arrayidx133, align 8, !tbaa !5 br label %for.end141 for.end141: ; preds = %for.body131.epil, %for.end141.loopexit.unr-lcssa, %for.end123 %68 = phi i64 [ %arrayidx133.promoted, %for.end123 ], [ %cond.i165.lcssa.ph, %for.end141.loopexit.unr-lcssa ], [ %cond.i165.epil, %for.body131.epil ] %storemerge157.lcssa = phi i64 [ 0, %for.end123 ], [ %14, %for.end141.loopexit.unr-lcssa ], [ %14, %for.body131.epil ] store i64 %storemerge157.lcssa, ptr %i, align 8, !tbaa !5 %call144 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %68) call void @llvm.lifetime.end.p0(i64 24800, ptr nonnull %c) #6 call void @llvm.lifetime.end.p0(i64 352800, ptr nonnull %d) #6 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %t) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %j) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %r) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #6 ret i32 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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <2 x i64> @llvm.smin.v2i64(<2 x i64>, <2 x i64>) #5 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !11, !12} !15 = distinct !{!15, !10, !12, !11} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !12, !11} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10, !11, !12} !20 = !{!21} !21 = distinct !{!21, !22} !22 = distinct !{!22, !"LVerDomain"} !23 = !{!24} !24 = distinct !{!24, !22} !25 = !{!21, !26} !26 = distinct !{!26, !22} !27 = !{!26} !28 = distinct !{!28, !10, !11, !12} !29 = distinct !{!29, !10, !11} !30 = distinct !{!30, !10} !31 = distinct !{!31, !10} !32 = distinct !{!32, !10} !33 = distinct !{!33, !10} !34 = distinct !{!34, !10} !35 = distinct !{!35, !10} !36 = distinct !{!36, !10}
#include<stdio.h> int uru(int year){ if(year%4) return 0; else if(year%100) return 1; else if(year%400) return 0; else return 1; } int main(){ int g=0,h,i; int yb,ye; for(;;){ scanf("%d%d",&yb,&ye); if(yb==0&&ye==0) break; if(g) puts(""); g=1; h=1; for(i=yb;i<ye+1;i++){ if(uru(i)){ printf("%d\n",i); h=0; } } if(h) puts("NA"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287688/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287688/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"NA\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @uru(i32 noundef %year) local_unnamed_addr #0 { entry: %0 = and i32 %year, 3 %tobool.not = icmp eq i32 %0, 0 br i1 %tobool.not, label %if.else, label %return if.else: ; preds = %entry %rem1 = srem i32 %year, 100 %tobool2.not = icmp eq i32 %rem1, 0 br i1 %tobool2.not, label %if.else4, label %return if.else4: ; preds = %if.else %rem5 = srem i32 %year, 400 %tobool6.not = icmp eq i32 %rem5, 0 %. = zext i1 %tobool6.not to i32 br label %return return: ; preds = %if.else4, %if.else, %entry %retval.0 = phi i32 [ 0, %entry ], [ 1, %if.else ], [ %., %if.else4 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %yb = alloca i32, align 4 %ye = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %yb) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ye) #5 %call29 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %yb, ptr noundef nonnull %ye) %0 = load i32, ptr %yb, align 4, !tbaa !5 %cmp30 = icmp eq i32 %0, 0 %1 = load i32, ptr %ye, align 4 %cmp131 = icmp eq i32 %1, 0 %or.cond32 = select i1 %cmp30, i1 %cmp131, i1 false br i1 %or.cond32, label %for.end16, label %if.end4 if.then2.critedge: ; preds = %if.end15 %putchar = call i32 @putchar(i32 10) %.pre = load i32, ptr %yb, align 4, !tbaa !5 %.pre34 = load i32, ptr %ye, align 4, !tbaa !5 br label %if.end4 if.end4: ; preds = %entry, %if.then2.critedge %2 = phi i32 [ %.pre34, %if.then2.critedge ], [ %1, %entry ] %3 = phi i32 [ %.pre, %if.then2.critedge ], [ %0, %entry ] %cmp6.not26 = icmp sgt i32 %3, %2 br i1 %cmp6.not26, label %if.then13, label %for.body for.body: ; preds = %if.end4, %for.inc %4 = phi i32 [ %6, %for.inc ], [ %2, %if.end4 ] %i.028 = phi i32 [ %inc, %for.inc ], [ %3, %if.end4 ] %h.027 = phi i32 [ %h.1, %for.inc ], [ 1, %if.end4 ] %5 = and i32 %i.028, 3 %tobool.not.i = icmp eq i32 %5, 0 br i1 %tobool.not.i, label %if.else.i, label %for.inc if.else.i: ; preds = %for.body %rem1.i = srem i32 %i.028, 100 %tobool2.not.i = icmp ne i32 %rem1.i, 0 %rem5.i = srem i32 %i.028, 400 %tobool6.not.i.not = icmp eq i32 %rem5.i, 0 %or.cond25 = or i1 %tobool2.not.i, %tobool6.not.i.not br i1 %or.cond25, label %if.then9, label %for.inc if.then9: ; preds = %if.else.i %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %i.028) %.pre35 = load i32, ptr %ye, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %if.else.i, %for.body, %if.then9 %6 = phi i32 [ %.pre35, %if.then9 ], [ %4, %for.body ], [ %4, %if.else.i ] %h.1 = phi i32 [ 0, %if.then9 ], [ %h.027, %for.body ], [ %h.027, %if.else.i ] %inc = add nsw i32 %i.028, 1 %cmp6.not.not = icmp slt i32 %i.028, %6 br i1 %cmp6.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc %tobool12.not = icmp eq i32 %h.1, 0 br i1 %tobool12.not, label %if.end15, label %if.then13 if.then13: ; preds = %if.end4, %for.end %call14 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end15 if.end15: ; preds = %if.then13, %for.end %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %yb, ptr noundef nonnull %ye) %7 = load i32, ptr %yb, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %ye, align 4 %cmp1 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end16, label %if.then2.critedge for.end16: ; preds = %if.end15, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ye) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %yb) #5 ret i32 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; 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 declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { 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 #4 = { nofree nounwind } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> struct year { int start; int end; }; void outputLeapyear(int, int); int main(void) { int isInit = 0; struct year year; while (scanf("%d %d", &year.start, &year.end), !(year.start == 0 && year.end == 0)) { if (isInit == 0) { isInit++; } else { printf("\n"); } outputLeapyear(year.start, year.end); } return 0; } void outputLeapyear(int start, int end) { int i; int count = 0; for (i = start; i <= end; i++) { if (i % 400 == 0) { printf("%d\n", i); count++; } else if (i % 100 == 0) continue; else if (i % 4 == 0) { printf("%d\n", i); count++; } } if (!count) printf("NA\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287738/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287738/source.c" 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" %struct.year = type { i32, i32 } @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NA\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %year = alloca %struct.year, align 4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %year) #4 %end = getelementptr inbounds %struct.year, ptr %year, i64 0, i32 1 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %year, ptr noundef nonnull %end) %0 = load i32, ptr %year, align 4, !tbaa !5 %cmp10 = icmp ne i32 %0, 0 %1 = load i32, ptr %end, align 4 %cmp311 = icmp ne i32 %1, 0 %.not12 = select i1 %cmp10, i1 true, i1 %cmp311 br i1 %.not12, label %if.end, label %while.end if.else.critedge: ; preds = %outputLeapyear.exit %putchar = call i32 @putchar(i32 10) %.pre = load i32, ptr %year, align 4, !tbaa !5 %.pre14 = load i32, ptr %end, align 4, !tbaa !10 br label %if.end if.end: ; preds = %entry, %if.else.critedge %2 = phi i32 [ %.pre14, %if.else.critedge ], [ %1, %entry ] %3 = phi i32 [ %.pre, %if.else.critedge ], [ %0, %entry ] %cmp.not25.i = icmp sgt i32 %3, %2 br i1 %cmp.not25.i, label %if.then14.i, label %for.body.i for.body.i: ; preds = %if.end, %for.inc.i %count.027.i = phi i32 [ %count.1.i, %for.inc.i ], [ 0, %if.end ] %i.026.i = phi i32 [ %inc13.i, %for.inc.i ], [ %3, %if.end ] %rem.i = srem i32 %i.026.i, 400 %cmp1.i = icmp eq i32 %rem.i, 0 br i1 %cmp1.i, label %for.inc.sink.split.i, label %if.else.i if.else.i: ; preds = %for.body.i %rem2.i = srem i32 %i.026.i, 100 %cmp3.i = icmp ne i32 %rem2.i, 0 %4 = and i32 %i.026.i, 3 %cmp7.i = icmp eq i32 %4, 0 %or.cond.i = and i1 %cmp3.i, %cmp7.i br i1 %or.cond.i, label %for.inc.sink.split.i, label %for.inc.i for.inc.sink.split.i: ; preds = %if.else.i, %for.body.i %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %i.026.i) %inc.i = add nsw i32 %count.027.i, 1 br label %for.inc.i for.inc.i: ; preds = %for.inc.sink.split.i, %if.else.i %count.1.i = phi i32 [ %count.027.i, %if.else.i ], [ %inc.i, %for.inc.sink.split.i ] %inc13.i = add i32 %i.026.i, 1 %exitcond.not.i = icmp eq i32 %i.026.i, %2 br i1 %exitcond.not.i, label %for.end.i, label %for.body.i, !llvm.loop !11 for.end.i: ; preds = %for.inc.i %5 = icmp eq i32 %count.1.i, 0 br i1 %5, label %if.then14.i, label %outputLeapyear.exit if.then14.i: ; preds = %for.end.i, %if.end %puts.i = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %outputLeapyear.exit outputLeapyear.exit: ; preds = %for.end.i, %if.then14.i %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %year, ptr noundef nonnull %end) %6 = load i32, ptr %year, align 4, !tbaa !5 %cmp = icmp ne i32 %6, 0 %7 = load i32, ptr %end, align 4 %cmp3 = icmp ne i32 %7, 0 %.not = select i1 %cmp, i1 true, i1 %cmp3 br i1 %.not, label %if.else.critedge, label %while.end, !llvm.loop !13 while.end: ; preds = %outputLeapyear.exit, %entry call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %year) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @outputLeapyear(i32 noundef %start, i32 noundef %end) local_unnamed_addr #0 { entry: %cmp.not25 = icmp sgt i32 %start, %end br i1 %cmp.not25, label %if.then14, label %for.body for.body: ; preds = %entry, %for.inc %count.027 = phi i32 [ %count.1, %for.inc ], [ 0, %entry ] %i.026 = phi i32 [ %inc13, %for.inc ], [ %start, %entry ] %rem = srem i32 %i.026, 400 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %for.inc.sink.split, label %if.else if.else: ; preds = %for.body %rem2 = srem i32 %i.026, 100 %cmp3 = icmp ne i32 %rem2, 0 %0 = and i32 %i.026, 3 %cmp7 = icmp eq i32 %0, 0 %or.cond = and i1 %cmp3, %cmp7 br i1 %or.cond, label %for.inc.sink.split, label %for.inc for.inc.sink.split: ; preds = %if.else, %for.body %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %i.026) %inc = add nsw i32 %count.027, 1 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %if.else %count.1 = phi i32 [ %count.027, %if.else ], [ %inc, %for.inc.sink.split ] %inc13 = add i32 %i.026, 1 %exitcond.not = icmp eq i32 %i.026, %end br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.inc %1 = icmp eq i32 %count.1, 0 br i1 %1, label %if.then14, label %if.end16 if.then14: ; preds = %entry, %for.end %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end16 if.end16: ; preds = %if.then14, %for.end ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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, !7, i64 0} !6 = !{!"year", !7, i64 0, !7, i64 4} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!6, !7, i64 4} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) int cmp(const void *a,const void *b){ return *(int *)a-*(int *)b; } void init(int *b){ int n=b[0]; int i; for(i=1;i<=n;i++) b[i]=0; } void add(int *b,int index,int v){ int i; for(i=index;i<=b[0];i+=i&-i) b[i]+=v; } int sum(int *b,int index){ int res=0; int i; for(i=index;i>0;i-=i&-i) res+=b[i]; return res; } int *c=NULL; int *d=NULL; int *bit=NULL; int64 count(const int *a,const int n,const int v){ c[0]=0; int i; for(i=1;i<=n;i++) c[i]=c[i-1]+(a[i-1]<=v?1:0); for(i=0;i<=n;i++) d[i]=2*c[i]-i+n+1; init(bit); int64 cnt=0; for(i=0;i<=n;i++){ cnt+=sum(bit,d[i]-1); add(bit,d[i],1); } return cnt; } void run(void){ int n; scanf("%d",&n); int *a=(int *)malloc(sizeof(int)*n); int *b=(int *)malloc(sizeof(int)*n); c=(int *)malloc(sizeof(int)*(n+1)); d=(int *)malloc(sizeof(int)*(n+1)); bit=(int *)malloc(sizeof(int)*(3*n+2)); bit[0]=3*n+1; int i; for(i=0;i<n;i++) scanf("%d",a+i); for(i=0;i<n;i++) b[i]=a[i]; qsort(b,n,sizeof(int),cmp); int64 t=(int64)(n+0)*(n+1)/2; if(count(a,n,b[0])>=t/2+1){ printf("%d\n",b[0]); return; } int l=0;// int r=n;// while(r-l>1){ int m=(l+r)/2; int64 cnt=count(a,n,b[m]); //printf("%d %lld\n",b[m],cnt); if(cnt<t/2+1){ l=m; } else { r=m; } } printf("%d\n",b[r]); } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287789/source.c" 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" @c = dso_local local_unnamed_addr global ptr null, align 8 @d = dso_local local_unnamed_addr global ptr null, align 8 @bit = dso_local local_unnamed_addr global ptr null, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(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: mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @init(ptr nocapture noundef %b) local_unnamed_addr #1 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not5 = icmp slt i32 %0, 1 br i1 %cmp.not5, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %scevgep = getelementptr i8, ptr %b, i64 4 %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 br label %for.end for.end: ; preds = %for.body.preheader, %entry ret void } ; 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 norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @add(ptr nocapture noundef %b, i32 noundef %index, i32 noundef %v) local_unnamed_addr #3 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not8 = icmp slt i32 %0, %index br i1 %cmp.not8, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %i.09 = phi i32 [ %add2, %for.body ], [ %index, %entry ] %idxprom = sext i32 %i.09 to i64 %arrayidx1 = getelementptr inbounds i32, ptr %b, i64 %idxprom %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %add = add nsw i32 %1, %v store i32 %add, ptr %arrayidx1, align 4, !tbaa !5 %sub = sub nsw i32 0, %i.09 %and = and i32 %i.09, %sub %add2 = add nsw i32 %and, %i.09 %2 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %add2, %2 br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @sum(ptr nocapture noundef readonly %b, i32 noundef %index) local_unnamed_addr #4 { entry: %cmp7 = icmp sgt i32 %index, 0 br i1 %cmp7, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.09 = phi i32 [ %sub1, %for.body ], [ %index, %entry ] %res.08 = phi i32 [ %add, %for.body ], [ 0, %entry ] %idxprom = zext i32 %i.09 to i64 %arrayidx = getelementptr inbounds i32, ptr %b, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %0, %res.08 %sub.not = add nsw i32 %i.09, -1 %sub1 = and i32 %sub.not, %i.09 %cmp.not = icmp eq i32 %sub1, 0 br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %entry %res.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] ret i32 %res.0.lcssa } ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local i64 @count(ptr nocapture noundef readonly %a, i32 noundef %n, i32 noundef %v) local_unnamed_addr #5 { entry: %0 = load ptr, ptr @c, align 8, !tbaa !12 %1 = ptrtoint ptr %0 to i64 store i32 0, ptr %0, align 4, !tbaa !5 %cmp.not55 = icmp slt i32 %n, 1 br i1 %cmp.not55, label %for.cond8.preheader, label %for.body.preheader for.body.preheader: ; preds = %entry %invariant.gep = getelementptr i32, ptr %a, i64 -1 %2 = zext i32 %n to i64 %xtraiter = and i64 %2, 1 %3 = icmp eq i32 %n, 1 br i1 %3, label %for.cond8.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %2, 4294967294 %invariant.gep79 = getelementptr i32, ptr %0, i64 1 br label %for.body for.cond8.preheader.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %.unr = phi i32 [ 0, %for.body.preheader ], [ %add.1, %for.body ] %indvars.iv.unr = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond8.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond8.preheader.loopexit.unr-lcssa %gep.epil = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.unr %4 = load i32, ptr %gep.epil, align 4, !tbaa !5 %cmp5.not.epil = icmp sle i32 %4, %v %cond.epil = zext i1 %cmp5.not.epil to i32 %add.epil = add nuw nsw i32 %.unr, %cond.epil %arrayidx7.epil = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.unr store i32 %add.epil, ptr %arrayidx7.epil, align 4, !tbaa !5 br label %for.cond8.preheader for.cond8.preheader: ; preds = %for.body.epil, %for.cond8.preheader.loopexit.unr-lcssa, %entry %cmp9.not57 = icmp slt i32 %n, 0 br i1 %cmp9.not57, label %for.end20, label %for.body10.lr.ph for.body10.lr.ph: ; preds = %for.cond8.preheader %sub13 = add i32 %n, 1 %5 = load ptr, ptr @d, align 8, !tbaa !12 %wide.trip.count67 = zext i32 %sub13 to i64 %min.iters.check = icmp ult i32 %n, 7 %6 = ptrtoint ptr %5 to i64 %7 = sub i64 %6, %1 %diff.check = icmp ult i64 %7, 32 %or.cond = select i1 %min.iters.check, i1 true, i1 %diff.check br i1 %or.cond, label %for.body10.preheader, label %vector.ph vector.ph: ; preds = %for.body10.lr.ph %n.vec = and i64 %wide.trip.count67, 4294967288 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %sub13, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %8 = getelementptr inbounds i32, ptr %0, i64 %index %wide.load = load <4 x i32>, ptr %8, align 4, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 %wide.load75 = load <4 x i32>, ptr %9, align 4, !tbaa !5 %10 = shl nsw <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1> %11 = shl nsw <4 x i32> %wide.load75, <i32 1, i32 1, i32 1, i32 1> %12 = sub <4 x i32> %broadcast.splat, %vec.ind %13 = sub <4 x i32> %broadcast.splat, %step.add %14 = add <4 x i32> %12, %10 %15 = add <4 x i32> %13, %11 %16 = getelementptr inbounds i32, ptr %5, i64 %index store <4 x i32> %14, ptr %16, align 4, !tbaa !5 %17 = getelementptr inbounds i32, ptr %16, i64 4 store <4 x i32> %15, ptr %17, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %18 = icmp eq i64 %index.next, %n.vec br i1 %18, label %middle.block, label %vector.body, !llvm.loop !14 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count67 br i1 %cmp.n, label %for.end20, label %for.body10.preheader for.body10.preheader: ; preds = %for.body10.lr.ph, %middle.block %indvars.iv64.ph = phi i64 [ 0, %for.body10.lr.ph ], [ %n.vec, %middle.block ] %xtraiter77 = and i64 %wide.trip.count67, 1 %lcmp.mod78.not = icmp eq i64 %xtraiter77, 0 br i1 %lcmp.mod78.not, label %for.body10.prol.loopexit, label %for.body10.prol for.body10.prol: ; preds = %for.body10.preheader %arrayidx12.prol = getelementptr inbounds i32, ptr %0, i64 %indvars.iv64.ph %19 = load i32, ptr %arrayidx12.prol, align 4, !tbaa !5 %mul.prol = shl nsw i32 %19, 1 %20 = trunc i64 %indvars.iv64.ph to i32 %add14.prol = sub i32 %sub13, %20 %add15.prol = add i32 %add14.prol, %mul.prol %arrayidx17.prol = getelementptr inbounds i32, ptr %5, i64 %indvars.iv64.ph store i32 %add15.prol, ptr %arrayidx17.prol, align 4, !tbaa !5 %indvars.iv.next65.prol = or i64 %indvars.iv64.ph, 1 br label %for.body10.prol.loopexit for.body10.prol.loopexit: ; preds = %for.body10.prol, %for.body10.preheader %indvars.iv64.unr = phi i64 [ %indvars.iv64.ph, %for.body10.preheader ], [ %indvars.iv.next65.prol, %for.body10.prol ] %21 = sub nsw i64 0, %wide.trip.count67 %22 = xor i64 %indvars.iv64.ph, %21 %23 = icmp eq i64 %22, -1 br i1 %23, label %for.end20, label %for.body10 for.body: ; preds = %for.body, %for.body.preheader.new %24 = phi i32 [ 0, %for.body.preheader.new ], [ %add.1, %for.body ] %indvars.iv = phi i64 [ 1, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv %25 = load i32, ptr %gep, align 4, !tbaa !5 %cmp5.not = icmp sle i32 %25, %v %cond = zext i1 %cmp5.not to i32 %add = add nuw nsw i32 %24, %cond %arrayidx7 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv store i32 %add, ptr %arrayidx7, align 4, !tbaa !5 %gep.1 = getelementptr i32, ptr %a, i64 %indvars.iv %26 = load i32, ptr %gep.1, align 4, !tbaa !5 %cmp5.not.1 = icmp sle i32 %26, %v %cond.1 = zext i1 %cmp5.not.1 to i32 %add.1 = add nuw nsw i32 %add, %cond.1 %gep80 = getelementptr i32, ptr %invariant.gep79, i64 %indvars.iv store i32 %add.1, ptr %gep80, align 4, !tbaa !5 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond8.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !17 for.body10: ; preds = %for.body10.prol.loopexit, %for.body10 %indvars.iv64 = phi i64 [ %indvars.iv.next65.1, %for.body10 ], [ %indvars.iv64.unr, %for.body10.prol.loopexit ] %arrayidx12 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv64 %27 = load i32, ptr %arrayidx12, align 4, !tbaa !5 %mul = shl nsw i32 %27, 1 %28 = trunc i64 %indvars.iv64 to i32 %add14 = sub i32 %sub13, %28 %add15 = add i32 %add14, %mul %arrayidx17 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv64 store i32 %add15, ptr %arrayidx17, align 4, !tbaa !5 %indvars.iv.next65 = add nuw nsw i64 %indvars.iv64, 1 %arrayidx12.1 = getelementptr inbounds i32, ptr %0, i64 %indvars.iv.next65 %29 = load i32, ptr %arrayidx12.1, align 4, !tbaa !5 %mul.1 = shl nsw i32 %29, 1 %30 = trunc i64 %indvars.iv.next65 to i32 %add14.1 = sub i32 %sub13, %30 %add15.1 = add i32 %add14.1, %mul.1 %arrayidx17.1 = getelementptr inbounds i32, ptr %5, i64 %indvars.iv.next65 store i32 %add15.1, ptr %arrayidx17.1, align 4, !tbaa !5 %indvars.iv.next65.1 = add nuw nsw i64 %indvars.iv64, 2 %exitcond68.not.1 = icmp eq i64 %indvars.iv.next65.1, %wide.trip.count67 br i1 %exitcond68.not.1, label %for.end20, label %for.body10, !llvm.loop !18 for.end20: ; preds = %for.body10.prol.loopexit, %for.body10, %middle.block, %for.cond8.preheader %31 = load ptr, ptr @bit, align 8, !tbaa !12 %32 = load i32, ptr %31, align 4, !tbaa !5 %cmp.not5.i = icmp slt i32 %32, 1 br i1 %cmp.not5.i, label %init.exit, label %for.body.preheader.i for.body.preheader.i: ; preds = %for.end20 %scevgep.i = getelementptr i8, ptr %31, i64 4 %33 = zext i32 %32 to i64 %34 = shl nuw nsw i64 %33, 2 tail call void @llvm.memset.p0.i64(ptr align 4 %scevgep.i, i8 0, i64 %34, i1 false), !tbaa !5 br label %init.exit init.exit: ; preds = %for.end20, %for.body.preheader.i br i1 %cmp9.not57, label %for.end32, label %for.body23.lr.ph for.body23.lr.ph: ; preds = %init.exit %35 = load ptr, ptr @d, align 8, !tbaa !12 %36 = add nuw i32 %n, 1 %wide.trip.count72 = zext i32 %36 to i64 br label %for.body23 for.body23: ; preds = %for.body23.lr.ph, %add.exit %37 = phi i32 [ %32, %for.body23.lr.ph ], [ %42, %add.exit ] %indvars.iv69 = phi i64 [ 0, %for.body23.lr.ph ], [ %indvars.iv.next70, %add.exit ] %cnt.061 = phi i64 [ 0, %for.body23.lr.ph ], [ %add27, %add.exit ] %arrayidx25 = getelementptr inbounds i32, ptr %35, i64 %indvars.iv69 %38 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %cmp7.i = icmp sgt i32 %38, 1 br i1 %cmp7.i, label %for.body.i.preheader, label %sum.exit for.body.i.preheader: ; preds = %for.body23 %sub26 = add nsw i32 %38, -1 br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.body.i %i.09.i = phi i32 [ %sub1.i, %for.body.i ], [ %sub26, %for.body.i.preheader ] %res.08.i = phi i32 [ %add.i, %for.body.i ], [ 0, %for.body.i.preheader ] %idxprom.i = zext i32 %i.09.i to i64 %arrayidx.i = getelementptr inbounds i32, ptr %31, i64 %idxprom.i %39 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %add.i = add nsw i32 %39, %res.08.i %sub.not.i = add nsw i32 %i.09.i, -1 %sub1.i = and i32 %sub.not.i, %i.09.i %cmp.not.i = icmp eq i32 %sub1.i, 0 br i1 %cmp.not.i, label %sum.exit, label %for.body.i, !llvm.loop !11 sum.exit: ; preds = %for.body.i, %for.body23 %res.0.lcssa.i = phi i32 [ 0, %for.body23 ], [ %add.i, %for.body.i ] %conv = sext i32 %res.0.lcssa.i to i64 %add27 = add nsw i64 %cnt.061, %conv %cmp.not8.i = icmp slt i32 %37, %38 br i1 %cmp.not8.i, label %add.exit, label %for.body.i50 for.body.i50: ; preds = %sum.exit, %for.body.i50 %i.09.i51 = phi i32 [ %add2.i, %for.body.i50 ], [ %38, %sum.exit ] %idxprom.i52 = sext i32 %i.09.i51 to i64 %arrayidx1.i = getelementptr inbounds i32, ptr %31, i64 %idxprom.i52 %40 = load i32, ptr %arrayidx1.i, align 4, !tbaa !5 %add.i53 = add nsw i32 %40, 1 store i32 %add.i53, ptr %arrayidx1.i, align 4, !tbaa !5 %sub.i = sub nsw i32 0, %i.09.i51 %and.i = and i32 %i.09.i51, %sub.i %add2.i = add nsw i32 %and.i, %i.09.i51 %41 = load i32, ptr %31, align 4, !tbaa !5 %cmp.not.i54 = icmp sgt i32 %add2.i, %41 br i1 %cmp.not.i54, label %add.exit, label %for.body.i50, !llvm.loop !9 add.exit: ; preds = %for.body.i50, %sum.exit %42 = phi i32 [ %37, %sum.exit ], [ %41, %for.body.i50 ] %indvars.iv.next70 = add nuw nsw i64 %indvars.iv69, 1 %exitcond73.not = icmp eq i64 %indvars.iv.next70, %wide.trip.count72 br i1 %exitcond73.not, label %for.end32, label %for.body23, !llvm.loop !19 for.end32: ; preds = %add.exit, %init.exit %cnt.0.lcssa = phi i64 [ 0, %init.exit ], [ %add27, %add.exit ] ret i64 %cnt.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local void @run() local_unnamed_addr #6 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %mul = shl nsw i64 %conv, 2 %call1 = call noalias ptr @malloc(i64 noundef %mul) #13 %call4 = call noalias ptr @malloc(i64 noundef %mul) #13 %add = add nsw i32 %0, 1 %conv5 = sext i32 %add to i64 %mul6 = shl nsw i64 %conv5, 2 %call7 = call noalias ptr @malloc(i64 noundef %mul6) #13 store ptr %call7, ptr @c, align 8, !tbaa !12 %call11 = call noalias ptr @malloc(i64 noundef %mul6) #13 store ptr %call11, ptr @d, align 8, !tbaa !12 %mul12 = mul nsw i32 %0, 3 %add13 = add nsw i32 %mul12, 2 %conv14 = sext i32 %add13 to i64 %mul15 = shl nsw i64 %conv14, 2 %call16 = call noalias ptr @malloc(i64 noundef %mul15) #13 store ptr %call16, ptr @bit, align 8, !tbaa !12 %add18 = add nsw i32 %mul12, 1 store i32 %add18, ptr %call16, align 4, !tbaa !5 %cmp85 = icmp sgt i32 %0, 0 br i1 %cmp85, label %for.body, label %for.end30 for.cond21.preheader: ; preds = %for.body %cmp2287 = icmp sgt i32 %3, 0 br i1 %cmp2287, label %for.body24.preheader, label %for.end30 for.body24.preheader: ; preds = %for.cond21.preheader %1 = zext i32 %3 to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memcpy.p0.p0.i64(ptr align 4 %call4, ptr align 4 %call1, i64 %2, i1 false), !tbaa !5 br label %for.end30 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond21.preheader, !llvm.loop !20 for.end30: ; preds = %entry, %for.body24.preheader, %for.cond21.preheader %.lcssa100 = phi i32 [ %3, %for.body24.preheader ], [ %3, %for.cond21.preheader ], [ %0, %entry ] %conv31 = sext i32 %.lcssa100 to i64 call void @qsort(ptr noundef %call4, i64 noundef %conv31, i64 noundef 4, ptr noundef nonnull @cmp) #12 %5 = load i32, ptr %n, align 4, !tbaa !5 %conv33 = sext i32 %5 to i64 %add34 = add nsw i32 %5, 1 %conv35 = sext i32 %add34 to i64 %mul36 = mul nsw i64 %conv35, %conv33 %6 = load i32, ptr %call4, align 4, !tbaa !5 %call38 = call i64 @count(ptr noundef %call1, i32 noundef %5, i32 noundef %6) %div39 = sdiv i64 %mul36, 4 %cmp41.not.not = icmp sgt i64 %call38, %div39 br i1 %cmp41.not.not, label %cleanup, label %if.end if.end: ; preds = %for.end30 %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp4589 = icmp sgt i32 %7, 1 br i1 %cmp4589, label %while.body, label %while.end while.body: ; preds = %if.end, %while.body %r.091 = phi i32 [ %div48.r.0, %while.body ], [ %7, %if.end ] %l.090 = phi i32 [ %l.0.div48, %while.body ], [ 0, %if.end ] %add47 = add nsw i32 %r.091, %l.090 %div48 = sdiv i32 %add47, 2 %8 = load i32, ptr %n, align 4, !tbaa !5 %idxprom49 = sext i32 %div48 to i64 %arrayidx50 = getelementptr inbounds i32, ptr %call4, i64 %idxprom49 %9 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %call51 = call i64 @count(ptr noundef %call1, i32 noundef %8, i32 noundef %9) %cmp54.not = icmp sgt i64 %call51, %div39 %l.0.div48 = select i1 %cmp54.not, i32 %l.090, i32 %div48 %div48.r.0 = select i1 %cmp54.not, i32 %div48, i32 %r.091 %sub = sub nsw i32 %div48.r.0, %l.0.div48 %cmp45 = icmp sgt i32 %sub, 1 br i1 %cmp45, label %while.body, label %while.end, !llvm.loop !21 while.end: ; preds = %while.body, %if.end %r.0.lcssa = phi i32 [ %7, %if.end ], [ %div48.r.0, %while.body ] %idxprom58 = sext i32 %r.0.lcssa to i64 %arrayidx59 = getelementptr inbounds i32, ptr %call4, i64 %idxprom58 br label %cleanup cleanup: ; preds = %for.end30, %while.end %arrayidx59.sink = phi ptr [ %arrayidx59, %while.end ], [ %call4, %for.end30 ] %10 = load i32, ptr %arrayidx59.sink, align 4, !tbaa !5 %call60 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #12 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #8 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #6 { entry: tail call void @run() ret i32 0 } ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #10 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #11 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 = { mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) 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 norecurse nosync nounwind memory(argmem: readwrite) 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 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 #5 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) 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 #6 = { 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 #7 = { 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 #8 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #9 = { 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 #10 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #11 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #12 = { nounwind } attributes #13 = { nounwind allocsize(0) } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!13, !13, i64 0} !13 = !{!"any pointer", !7, i64 0} !14 = distinct !{!14, !10, !15, !16} !15 = !{!"llvm.loop.isvectorized", i32 1} !16 = !{!"llvm.loop.unroll.runtime.disable"} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !15} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10}
#include <stdio.h> int main(void) { int w, fee; while (1) { scanf("%d", &w); if (w == -1) break; fee = 1150; if (w > 10) { if (w <= 20) fee += (w - 10) * 125; else { fee += 10 * 125; if (w <= 30) fee += (w - 20) * 140; else fee += 10 * 140 + (w - 30) * 160; } } printf("%d\n", 4280 - fee); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287831/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287831/source.c" 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 [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3 %call27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %0 = load i32, ptr %w, align 4, !tbaa !5 %cmp28 = icmp eq i32 %0, -1 br i1 %cmp28, label %while.end, label %if.end if.end: ; preds = %entry, %if.end18 %1 = phi i32 [ %2, %if.end18 ], [ %0, %entry ] %cmp1 = icmp sgt i32 %1, 10 br i1 %cmp1, label %if.then2, label %if.end18 if.then2: ; preds = %if.end %cmp3 = icmp ult i32 %1, 21 br i1 %cmp3, label %if.then4, label %if.else if.then4: ; preds = %if.then2 %.neg = mul nsw i32 %1, -125 %add.neg = add nuw nsw i32 %.neg, 100 br label %if.end18 if.else: ; preds = %if.then2 %cmp6 = icmp ult i32 %1, 31 br i1 %cmp6, label %if.then7, label %if.else11 if.then7: ; preds = %if.else %.neg25 = mul nsw i32 %1, -140 %add10.neg = add nuw nsw i32 %.neg25, 400 br label %if.end18 if.else11: ; preds = %if.else %.neg26 = mul i32 %1, -160 %add15.neg = add i32 %.neg26, 1000 br label %if.end18 if.end18: ; preds = %if.then4, %if.else11, %if.then7, %if.end %fee.0.neg = phi i32 [ %add.neg, %if.then4 ], [ %add10.neg, %if.then7 ], [ %add15.neg, %if.else11 ], [ -1150, %if.end ] %sub19 = add i32 %fee.0.neg, 4280 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub19) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %2 = load i32, ptr %w, align 4, !tbaa !5 %cmp = icmp eq i32 %2, -1 br i1 %cmp, label %while.end, label %if.end while.end: ; preds = %if.end18, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"}
#include<stdio.h> #include<stdlib.h> int main(void) { int t,n,x,a,b,temp,i; scanf("%d",&t); for(i=0;i<t;i++){ scanf("%d",&n); scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); temp = a-b; if(temp<0) temp *= (-1); if((temp+x) <= (n-1)) printf("%d\n",temp+x); else printf("%d\n",n-1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28789/source.c" 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 [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 %x = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp18 = icmp sgt i32 %0, 0 br i1 %cmp18, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.019 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %1 = load i32, ptr %a, align 4, !tbaa !5 %2 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %1, %2 %spec.select = call i32 @llvm.abs.i32(i32 %sub, i1 true) %3 = load i32, ptr %x, align 4, !tbaa !5 %add = add nsw i32 %spec.select, %3 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp7.not.not = icmp slt i32 %add, %4 %sub6 = add nsw i32 %4, -1 %add.sink = select i1 %cmp7.not.not, i32 %add, i32 %sub6 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.sink) %inc = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %5 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int a,b,c,i,d,e,f,g,h,j; scanf("%d",&a); for(i=1; i<=a; i++) { scanf("%d%d%d%d",&b,&c,&d,&e); if(d<e) { f=d; d=e; e=f; } f=d+c; if(f>b) { c=f-b; f=b; } else c=0; g=e-c; if(g<=0) { g=1; } printf("%d\n",f-g); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28794/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28794/source.c" 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 [9 x i8] c"%d%d%d%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 %e = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %e) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp.not19 = icmp slt i32 %0, 1 br i1 %cmp.not19, label %for.end, label %for.body for.body: ; preds = %entry, %if.end %i.020 = phi i32 [ %inc, %if.end ], [ 1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d, ptr noundef nonnull %e) %1 = load i32, ptr %d, align 4, !tbaa !5 %2 = load i32, ptr %e, align 4, !tbaa !5 %cmp2 = icmp slt i32 %1, %2 br i1 %cmp2, label %if.then, label %if.end if.then: ; preds = %for.body store i32 %2, ptr %d, align 4, !tbaa !5 store i32 %1, ptr %e, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %for.body %3 = phi i32 [ %1, %if.then ], [ %2, %for.body ] %4 = phi i32 [ %2, %if.then ], [ %1, %for.body ] %5 = load i32, ptr %c, align 4, !tbaa !5 %add = add nsw i32 %5, %4 %6 = load i32, ptr %b, align 4, !tbaa !5 %cmp3 = icmp sgt i32 %add, %6 %sub = sub nsw i32 %add, %6 %storemerge = select i1 %cmp3, i32 %sub, i32 0 %f.0 = call i32 @llvm.smin.i32(i32 %add, i32 %6) store i32 %storemerge, ptr %c, align 4, !tbaa !5 %sub6 = sub nsw i32 %3, %storemerge %spec.store.select = call i32 @llvm.smax.i32(i32 %sub6, i32 1) %sub10 = sub nsw i32 %f.0, %spec.store.select %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub10) %inc = add nuw nsw i32 %i.020, 1 %7 = load i32, ptr %a, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %i.020, %7 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %e) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> typedef long long ll; #define rep(i,n) for(int i=0; i<(int)(n); i++) int upcmpii(const void *a, const void *b){ return (*(int*)a == *(int*)b ? 0 : (*(int*)a > *(int*)b ? 1 : -1)); } void sort_ui(int *a, int n){ qsort(a, n, sizeof(int), upcmpii); } int main(){ int n; scanf("%d",&n); int a[101]; rep(i,n) scanf("%d",a+i); sort_ui(a,n); int ans = 0, tmp = -1; rep(i,n) { ans += a[i]; if(tmp == -1 && a[i]%10 != 0) tmp = a[i]; } if(ans%10 == 0){ if(tmp == -1) ans = 0; else ans -= tmp; } printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_287990/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_287990/source.c" 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 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @upcmpii(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 %cmp = icmp eq i32 %0, %1 %cmp1 = icmp sgt i32 %0, %1 %cond = select i1 %cmp1, i32 1, i32 -1 %cond2 = select i1 %cmp, i32 0, i32 %cond ret i32 %cond2 } ; Function Attrs: nofree nounwind uwtable define dso_local void @sort_ui(ptr noundef %a, i32 noundef %n) local_unnamed_addr #1 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @upcmpii) #5 ret void } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %a = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %a) #5 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp37 = icmp sgt i32 %0, 0 br i1 %cmp37, label %for.body, label %entry.for.cond.cleanup_crit_edge entry.for.cond.cleanup_crit_edge: ; preds = %entry %.pre = sext i32 %0 to i64 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry.for.cond.cleanup_crit_edge %conv.i.pre-phi = phi i64 [ %.pre, %entry.for.cond.cleanup_crit_edge ], [ %4, %for.body ] call void @qsort(ptr noundef nonnull %a, i64 noundef %conv.i.pre-phi, i64 noundef 4, ptr noundef nonnull @upcmpii) #5 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp539 = icmp sgt i32 %1, 0 br i1 %cmp539, label %for.body7.preheader, label %for.cond.cleanup6.thread for.body7.preheader: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %1 to i64 %xtraiter = and i64 %wide.trip.count, 1 %2 = icmp eq i32 %1, 1 br i1 %2, label %for.cond.cleanup6.unr-lcssa, label %for.body7.preheader.new for.body7.preheader.new: ; preds = %for.body7.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body7 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 for.cond.cleanup6.unr-lcssa: ; preds = %for.inc14.1, %for.body7.preheader %tmp.1.fr.lcssa.ph = phi i32 [ undef, %for.body7.preheader ], [ %tmp.1.fr.1, %for.inc14.1 ] %add.lcssa.ph = phi i32 [ undef, %for.body7.preheader ], [ %add.1, %for.inc14.1 ] %indvars.iv47.unr = phi i64 [ 0, %for.body7.preheader ], [ %indvars.iv.next48.1, %for.inc14.1 ] %tmp.041.unr = phi i32 [ -1, %for.body7.preheader ], [ %tmp.1.fr.1, %for.inc14.1 ] %ans.040.unr = phi i32 [ 0, %for.body7.preheader ], [ %add.1, %for.inc14.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup6, label %for.body7.epil for.body7.epil: ; preds = %for.cond.cleanup6.unr-lcssa %arrayidx.epil = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %indvars.iv47.unr %5 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %5, %ans.040.unr %cmp8.epil = icmp eq i32 %tmp.041.unr, -1 br i1 %cmp8.epil, label %land.lhs.true.epil, label %for.cond.cleanup6 land.lhs.true.epil: ; preds = %for.body7.epil %rem.epil = srem i32 %5, 10 %cmp11.not.epil = icmp eq i32 %rem.epil, 0 %spec.select.epil = select i1 %cmp11.not.epil, i32 -1, i32 %5 %6 = freeze i32 %spec.select.epil br label %for.cond.cleanup6 for.cond.cleanup6: ; preds = %for.body7.epil, %land.lhs.true.epil, %for.cond.cleanup6.unr-lcssa %tmp.1.fr.lcssa = phi i32 [ %tmp.1.fr.lcssa.ph, %for.cond.cleanup6.unr-lcssa ], [ %tmp.041.unr, %for.body7.epil ], [ %6, %land.lhs.true.epil ] %add.lcssa = phi i32 [ %add.lcssa.ph, %for.cond.cleanup6.unr-lcssa ], [ %add.epil, %land.lhs.true.epil ], [ %add.epil, %for.body7.epil ] %rem17 = srem i32 %add.lcssa, 10 %cmp18 = icmp eq i32 %rem17, 0 %cmp20 = icmp eq i32 %tmp.1.fr.lcssa, -1 %sub = sub nsw i32 %add.lcssa, %tmp.1.fr.lcssa br i1 %cmp20, label %for.cond.cleanup6.thread, label %7 for.cond.cleanup6.thread: ; preds = %for.cond.cleanup, %for.cond.cleanup6 %cmp1860 = phi i1 [ %cmp18, %for.cond.cleanup6 ], [ true, %for.cond.cleanup ] %ans.0.lcssa58 = phi i32 [ %add.lcssa, %for.cond.cleanup6 ], [ 0, %for.cond.cleanup ] br label %7 7: ; preds = %for.cond.cleanup6, %for.cond.cleanup6.thread %cmp1859 = phi i1 [ %cmp1860, %for.cond.cleanup6.thread ], [ %cmp18, %for.cond.cleanup6 ] %ans.0.lcssa57 = phi i32 [ %ans.0.lcssa58, %for.cond.cleanup6.thread ], [ %add.lcssa, %for.cond.cleanup6 ] %8 = phi i32 [ 0, %for.cond.cleanup6.thread ], [ %sub, %for.cond.cleanup6 ] %ans.1 = select i1 %cmp1859, i32 %8, i32 %ans.0.lcssa57 %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.1) call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 for.body7: ; preds = %for.inc14.1, %for.body7.preheader.new %indvars.iv47 = phi i64 [ 0, %for.body7.preheader.new ], [ %indvars.iv.next48.1, %for.inc14.1 ] %tmp.041 = phi i32 [ -1, %for.body7.preheader.new ], [ %tmp.1.fr.1, %for.inc14.1 ] %ans.040 = phi i32 [ 0, %for.body7.preheader.new ], [ %add.1, %for.inc14.1 ] %niter = phi i64 [ 0, %for.body7.preheader.new ], [ %niter.next.1, %for.inc14.1 ] %arrayidx = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %indvars.iv47 %9 = load i32, ptr %arrayidx, align 8, !tbaa !5 %add = add nsw i32 %9, %ans.040 %cmp8 = icmp eq i32 %tmp.041, -1 br i1 %cmp8, label %land.lhs.true, label %for.inc14 land.lhs.true: ; preds = %for.body7 %rem = srem i32 %9, 10 %cmp11.not = icmp eq i32 %rem, 0 %spec.select = select i1 %cmp11.not, i32 -1, i32 %9 br label %for.inc14 for.inc14: ; preds = %land.lhs.true, %for.body7 %tmp.1 = phi i32 [ %tmp.041, %for.body7 ], [ %spec.select, %land.lhs.true ] %tmp.1.fr = freeze i32 %tmp.1 %indvars.iv.next48 = or i64 %indvars.iv47, 1 %arrayidx.1 = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %indvars.iv.next48 %10 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %add.1 = add nsw i32 %10, %add %cmp8.1 = icmp eq i32 %tmp.1.fr, -1 br i1 %cmp8.1, label %land.lhs.true.1, label %for.inc14.1 land.lhs.true.1: ; preds = %for.inc14 %rem.1 = srem i32 %10, 10 %cmp11.not.1 = icmp eq i32 %rem.1, 0 %spec.select.1 = select i1 %cmp11.not.1, i32 -1, i32 %10 br label %for.inc14.1 for.inc14.1: ; preds = %land.lhs.true.1, %for.inc14 %tmp.1.1 = phi i32 [ %tmp.1.fr, %for.inc14 ], [ %spec.select.1, %land.lhs.true.1 ] %tmp.1.fr.1 = freeze i32 %tmp.1.1 %indvars.iv.next48.1 = add nuw nsw i64 %indvars.iv47, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup6.unr-lcssa, label %for.body7, !llvm.loop !11 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; 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 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 #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 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 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(){ int n,i,j,s[100],ans=0,min=-1; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&s[i]); ans+=s[i]; } if(ans%10!=0)printf("%d\n",ans); else{ for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(s[i]<s[j]){ int tmp=s[i]; s[i]=s[j]; s[j]=tmp; } } } for(i=0;i<n;i++){ if(s[i]%10!=0){ min=s[i]; break; } } if(min!=-1)printf("%d\n",ans-min); else puts("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288032/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288032/source.c" 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 [4 x i8] c"%d\0A\00", align 1 @.str.2 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %s = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp77 = icmp sgt i32 %0, 0 br i1 %cmp77, label %for.body, label %if.else49 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %ans.078 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %1, %ans.078 %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.end, !llvm.loop !9 for.end: ; preds = %for.body %rem = srem i32 %add, 10 %cmp4.not = icmp eq i32 %rem, 0 br i1 %cmp4.not, label %for.cond6.preheader, label %if.then for.cond6.preheader: ; preds = %for.end %cmp783 = icmp sgt i32 %2, 0 br i1 %cmp783, label %for.cond9.preheader.us.preheader, label %if.else49 for.cond9.preheader.us.preheader: ; preds = %for.cond6.preheader %wide.trip.count96 = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count96, 1 %4 = icmp eq i32 %2, 1 %unroll_iter = and i64 %wide.trip.count96, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.cond9.preheader.us for.cond9.preheader.us: ; preds = %for.cond9.preheader.us.preheader, %for.cond9.for.inc29_crit_edge.us %indvars.iv93 = phi i64 [ 0, %for.cond9.preheader.us.preheader ], [ %indvars.iv.next94, %for.cond9.for.inc29_crit_edge.us ] %arrayidx13.us = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv93 br i1 %4, label %for.cond9.for.inc29_crit_edge.us.unr-lcssa, label %for.body11.us for.body11.us: ; preds = %for.cond9.preheader.us, %for.inc26.us.1 %indvars.iv90 = phi i64 [ %indvars.iv.next91.1, %for.inc26.us.1 ], [ 0, %for.cond9.preheader.us ] %niter = phi i64 [ %niter.next.1, %for.inc26.us.1 ], [ 0, %for.cond9.preheader.us ] %5 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %arrayidx15.us = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv90 %6 = load i32, ptr %arrayidx15.us, align 8, !tbaa !5 %cmp16.us = icmp slt i32 %5, %6 br i1 %cmp16.us, label %if.then17.us, label %for.inc26.us if.then17.us: ; preds = %for.body11.us store i32 %6, ptr %arrayidx13.us, align 4, !tbaa !5 store i32 %5, ptr %arrayidx15.us, align 8, !tbaa !5 br label %for.inc26.us for.inc26.us: ; preds = %if.then17.us, %for.body11.us %indvars.iv.next91 = or i64 %indvars.iv90, 1 %7 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %arrayidx15.us.1 = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv.next91 %8 = load i32, ptr %arrayidx15.us.1, align 4, !tbaa !5 %cmp16.us.1 = icmp slt i32 %7, %8 br i1 %cmp16.us.1, label %if.then17.us.1, label %for.inc26.us.1 if.then17.us.1: ; preds = %for.inc26.us store i32 %8, ptr %arrayidx13.us, align 4, !tbaa !5 store i32 %7, ptr %arrayidx15.us.1, align 4, !tbaa !5 br label %for.inc26.us.1 for.inc26.us.1: ; preds = %if.then17.us.1, %for.inc26.us %indvars.iv.next91.1 = add nuw nsw i64 %indvars.iv90, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond9.for.inc29_crit_edge.us.unr-lcssa, label %for.body11.us, !llvm.loop !11 for.cond9.for.inc29_crit_edge.us.unr-lcssa: ; preds = %for.inc26.us.1, %for.cond9.preheader.us %indvars.iv90.unr = phi i64 [ 0, %for.cond9.preheader.us ], [ %indvars.iv.next91.1, %for.inc26.us.1 ] br i1 %lcmp.mod.not, label %for.cond9.for.inc29_crit_edge.us, label %for.body11.us.epil for.body11.us.epil: ; preds = %for.cond9.for.inc29_crit_edge.us.unr-lcssa %9 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %arrayidx15.us.epil = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv90.unr %10 = load i32, ptr %arrayidx15.us.epil, align 4, !tbaa !5 %cmp16.us.epil = icmp slt i32 %9, %10 br i1 %cmp16.us.epil, label %if.then17.us.epil, label %for.cond9.for.inc29_crit_edge.us if.then17.us.epil: ; preds = %for.body11.us.epil store i32 %10, ptr %arrayidx13.us, align 4, !tbaa !5 store i32 %9, ptr %arrayidx15.us.epil, align 4, !tbaa !5 br label %for.cond9.for.inc29_crit_edge.us for.cond9.for.inc29_crit_edge.us: ; preds = %for.body11.us.epil, %if.then17.us.epil, %for.cond9.for.inc29_crit_edge.us.unr-lcssa %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1 %exitcond97.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count96 br i1 %exitcond97.not, label %for.cond32.preheader, label %for.cond9.preheader.us, !llvm.loop !12 if.then: ; preds = %for.end %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) br label %if.end52 for.cond32.preheader: ; preds = %for.cond9.for.inc29_crit_edge.us br i1 %cmp783, label %for.body34.preheader, label %if.else49 for.body34.preheader: ; preds = %for.cond32.preheader %wide.trip.count101 = zext i32 %2 to i64 br label %for.body34 for.cond32: ; preds = %for.body34 %indvars.iv.next99 = add nuw nsw i64 %indvars.iv98, 1 %exitcond102.not = icmp eq i64 %indvars.iv.next99, %wide.trip.count101 br i1 %exitcond102.not, label %if.else49, label %for.body34, !llvm.loop !13 for.body34: ; preds = %for.body34.preheader, %for.cond32 %indvars.iv98 = phi i64 [ 0, %for.body34.preheader ], [ %indvars.iv.next99, %for.cond32 ] %arrayidx36 = getelementptr inbounds [100 x i32], ptr %s, i64 0, i64 %indvars.iv98 %11 = load i32, ptr %arrayidx36, align 4, !tbaa !5 %rem37 = srem i32 %11, 10 %cmp38.not = icmp eq i32 %rem37, 0 br i1 %cmp38.not, label %for.cond32, label %for.end45 for.end45: ; preds = %for.body34 %cmp46.not = icmp eq i32 %11, -1 br i1 %cmp46.not, label %if.else49, label %if.then47 if.then47: ; preds = %for.end45 %sub = sub nsw i32 %add, %11 %call48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) br label %if.end52 if.else49: ; preds = %for.cond32, %for.cond6.preheader, %entry, %for.cond32.preheader, %for.end45 %call50 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end52 if.end52: ; preds = %if.then47, %if.else49, %if.then call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %s) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> #define max(a,b) ((a)>(b) ? (a):(b)) int N; int s[100]; int knownmax[100][10]; int getmaxsum(int n,int sum){ if(n==N){ if(!(sum%10)) return 0; else return sum; } if(knownmax[n][sum%10]==-1) knownmax[n][sum%10]=max(getmaxsum(n+1,sum%10+s[n]),getmaxsum(n+1,sum%10)); if(knownmax[n][sum%10]) return knownmax[n][sum%10]+(sum/10)*10; else return 0; } int main(){ int i,j; scanf("%d",&N); for(i=0;i<N;i++) scanf("%d",&s[i]); for(i=0;i<100;i++) for(j=0;j<10;j++) knownmax[i][j]=-1; printf("%d\n",getmaxsum(0,0)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288076/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288076/source.c" 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" @N = dso_local global i32 0, align 4 @knownmax = dso_local local_unnamed_addr global [100 x [10 x i32]] zeroinitializer, align 16 @s = dso_local global [100 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @getmaxsum(i32 noundef %n, i32 noundef %sum) local_unnamed_addr #0 { entry: %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp = icmp eq i32 %0, %n br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %rem = srem i32 %sum, 10 %tobool.not = icmp eq i32 %rem, 0 %.sum = select i1 %tobool.not, i32 0, i32 %sum br label %return if.end: ; preds = %entry %idxprom = sext i32 %n to i64 %rem2 = srem i32 %sum, 10 %idxprom3 = sext i32 %rem2 to i64 %arrayidx4 = getelementptr inbounds [100 x [10 x i32]], ptr @knownmax, i64 0, i64 %idxprom, i64 %idxprom3 %1 = load i32, ptr %arrayidx4, align 4, !tbaa !5 %cmp5 = icmp eq i32 %1, -1 br i1 %cmp5, label %if.then6, label %if.end29 if.then6: ; preds = %if.end %add = add nsw i32 %n, 1 %arrayidx9 = getelementptr inbounds [100 x i32], ptr @s, i64 0, i64 %idxprom %2 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %add10 = add nsw i32 %2, %rem2 %call = tail call i32 @getmaxsum(i32 noundef %add, i32 noundef %add10) %call13 = tail call i32 @getmaxsum(i32 noundef %add, i32 noundef %rem2) %cmp14 = icmp sgt i32 %call, %call13 br i1 %cmp14, label %cond.true, label %cond.end cond.true: ; preds = %if.then6 %3 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %add19 = add nsw i32 %3, %rem2 br label %cond.end cond.end: ; preds = %if.then6, %cond.true %rem2.sink = phi i32 [ %add19, %cond.true ], [ %rem2, %if.then6 ] %call23 = tail call i32 @getmaxsum(i32 noundef %add, i32 noundef %rem2.sink) store i32 %call23, ptr %arrayidx4, align 4, !tbaa !5 br label %if.end29 if.end29: ; preds = %cond.end, %if.end %4 = phi i32 [ %call23, %cond.end ], [ %1, %if.end ] %tobool35.not = icmp eq i32 %4, 0 br i1 %tobool35.not, label %return, label %if.then36 if.then36: ; preds = %if.end29 %mul = sub nsw i32 %sum, %rem2 %add42 = add nsw i32 %mul, %4 br label %return return: ; preds = %if.end29, %if.then, %if.then36 %retval.0 = phi i32 [ %add42, %if.then36 ], [ %.sum, %if.then ], [ 0, %if.end29 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N) %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp27 = icmp sgt i32 %0, 0 br i1 %cmp27, label %for.body, label %for.cond2.preheader for.cond2.preheader: ; preds = %for.body, %entry tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) @knownmax, i8 -1, i64 4000, i1 false), !tbaa !5 %call18 = tail call i32 @getmaxsum(i32 noundef 0, i32 noundef 0) %call19 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %call18) ret i32 0 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr @s, i64 0, i64 %indvars.iv %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr @N, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) 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 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 #2 = { 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 #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ long long N; scanf("%lld",&N); for(int a=1;a<=3500;a++)for(int b=1;b<=3500;b++){ if((4*a*b-N*a-N*b)>0&&N*a*b%(4*a*b-N*a-N*b)==0){ printf("%d %d %lld",a,b,N*a*b/(4*a*b-N*a-N*b)); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288119/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288119/source.c" 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 [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [11 x i8] c"%d %d %lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i64, ptr %N, align 8, !tbaa !5 br label %for.cond1.preheader for.cond1.preheader: ; preds = %entry, %for.inc42 %indvars.iv81 = phi i64 [ 1, %entry ], [ %indvars.iv.next82, %for.inc42 ] %1 = shl nsw i64 %indvars.iv81, 2 br label %for.body4 for.body4: ; preds = %for.cond1.preheader, %for.inc %indvars.iv = phi i64 [ 1, %for.cond1.preheader ], [ %indvars.iv.next, %for.inc ] %2 = mul nuw nsw i64 %1, %indvars.iv %mul971 = add nuw nsw i64 %indvars.iv, %indvars.iv81 %3 = mul i64 %0, %mul971 %sub10 = sub i64 %2, %3 %cmp11 = icmp sgt i64 %sub10, 0 br i1 %cmp11, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body4 %mul7 = mul nuw nsw i64 %indvars.iv, %indvars.iv81 %mul16 = mul i64 %mul7, %0 %rem = srem i64 %mul16, %sub10 %div = sdiv i64 %mul16, %sub10 %cmp26 = icmp eq i64 %rem, 0 br i1 %cmp26, label %if.then, label %for.inc if.then: ; preds = %land.lhs.true %4 = trunc i64 %indvars.iv81 to i32 %5 = trunc i64 %indvars.iv to i32 %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4, i32 noundef %5, i64 noundef %div) br label %cleanup44 for.inc: ; preds = %for.body4, %land.lhs.true %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond = icmp eq i64 %indvars.iv.next, 3501 br i1 %exitcond, label %for.inc42, label %for.body4, !llvm.loop !9 for.inc42: ; preds = %for.inc %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %exitcond85.not = icmp eq i64 %indvars.iv.next82, 3501 br i1 %exitcond85.not, label %cleanup44, label %for.cond1.preheader, !llvm.loop !11 cleanup44: ; preds = %for.inc42, %if.then call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main() { int t, x, y; scanf("%d", &t); while (t--){ scanf("%d%d", &x, &y); if (x == 1 && y > 1 || x == 2 && y > 3 || x == 3 && y > 3) printf("NO\n"); else printf("YES\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28817/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28817/source.c" 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 [5 x i8] c"%d%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec16 = add nsw i32 %0, -1 store i32 %dec16, ptr %t, align 4, !tbaa !5 %tobool.not17 = icmp eq i32 %0, 0 br i1 %tobool.not17, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y) %1 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp eq i32 %1, 1 %2 = load i32, ptr %y, align 4 %cmp2 = icmp sgt i32 %2, 1 %or.cond = select i1 %cmp, i1 %cmp2, i1 false br i1 %or.cond, label %if.end, label %lor.lhs.false lor.lhs.false: ; preds = %while.body %cmp5 = icmp sgt i32 %2, 3 %3 = and i32 %1, -2 %4 = icmp eq i32 %3, 2 %or.cond15 = select i1 %4, i1 %cmp5, i1 false %spec.select = select i1 %or.cond15, ptr @str.4, ptr @str br label %if.end if.end: ; preds = %lor.lhs.false, %while.body %str.sink = phi ptr [ @str.4, %while.body ], [ %spec.select, %lor.lhs.false ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) %5 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %5, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %5, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> int main() { int x,a,b,n,t,temp; scanf("%d",&t); for(;t>0;t--) { scanf("%d %d %d %d",&n,&x,&a,&b); temp=(abs(a+b)+abs(a-b))/2; a=(abs(a+b)-abs(a-b))/2; b=temp; while(x) { if(a>1) { a--; } else if(b<n) { b++; } x--; } printf("%d\n",abs(a-b)); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28822/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28822/source.c" 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 [12 x i8] c"%d %d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 %n = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %.pr = load i32, ptr %t, align 4, !tbaa !5 %cmp25 = icmp sgt i32 %.pr, 0 br i1 %cmp25, label %for.body, label %for.end for.body: ; preds = %entry, %while.end %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %2 = call i32 @llvm.abs.i32(i32 %add, i1 true) %sub = sub nsw i32 %0, %1 %3 = call i32 @llvm.abs.i32(i32 %sub, i1 true) %add2 = add nuw nsw i32 %2, %3 %div16 = lshr i32 %add2, 1 %sub5 = sub nsw i32 %2, %3 %div6 = sdiv i32 %sub5, 2 store i32 %div6, ptr %a, align 4, !tbaa !5 store i32 %div16, ptr %b, align 4, !tbaa !5 %.pr17 = load i32, ptr %x, align 4, !tbaa !5 %tobool.not22 = icmp eq i32 %.pr17, 0 br i1 %tobool.not22, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %for.body %4 = load i32, ptr %n, align 4 %xtraiter = and i32 %.pr17, 1 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.body.prol.loopexit, label %while.body.prol while.body.prol: ; preds = %while.body.lr.ph %cmp7.prol = icmp sgt i32 %sub5, 3 br i1 %cmp7.prol, label %if.then.prol, label %if.else.prol if.else.prol: ; preds = %while.body.prol %cmp8.prol = icmp slt i32 %div16, %4 br i1 %cmp8.prol, label %if.then9.prol, label %if.end10.prol if.then9.prol: ; preds = %if.else.prol %inc.prol = add nuw nsw i32 %div16, 1 store i32 %inc.prol, ptr %b, align 4, !tbaa !5 br label %if.end10.prol if.then.prol: ; preds = %while.body.prol %dec.prol = add nsw i32 %div6, -1 store i32 %dec.prol, ptr %a, align 4, !tbaa !5 br label %if.end10.prol if.end10.prol: ; preds = %if.then.prol, %if.then9.prol, %if.else.prol %inc20.prol = phi i32 [ %div16, %if.else.prol ], [ %inc.prol, %if.then9.prol ], [ %div16, %if.then.prol ] %dec18.prol = phi i32 [ %div6, %if.else.prol ], [ %div6, %if.then9.prol ], [ %dec.prol, %if.then.prol ] %dec11.prol = add nsw i32 %.pr17, -1 br label %while.body.prol.loopexit while.body.prol.loopexit: ; preds = %if.end10.prol, %while.body.lr.ph %inc20.lcssa.unr = phi i32 [ undef, %while.body.lr.ph ], [ %inc20.prol, %if.end10.prol ] %dec18.lcssa.unr = phi i32 [ undef, %while.body.lr.ph ], [ %dec18.prol, %if.end10.prol ] %.unr = phi i32 [ %.pr17, %while.body.lr.ph ], [ %dec11.prol, %if.end10.prol ] %dec1924.unr = phi i32 [ %div6, %while.body.lr.ph ], [ %dec18.prol, %if.end10.prol ] %inc2123.unr = phi i32 [ %div16, %while.body.lr.ph ], [ %inc20.prol, %if.end10.prol ] %5 = icmp eq i32 %.pr17, 1 br i1 %5, label %while.cond.while.end_crit_edge, label %while.body while.body: ; preds = %while.body.prol.loopexit, %if.end10.1 %6 = phi i32 [ %dec11.1, %if.end10.1 ], [ %.unr, %while.body.prol.loopexit ] %dec1924 = phi i32 [ %dec18.1, %if.end10.1 ], [ %dec1924.unr, %while.body.prol.loopexit ] %inc2123 = phi i32 [ %inc20.1, %if.end10.1 ], [ %inc2123.unr, %while.body.prol.loopexit ] %cmp7 = icmp sgt i32 %dec1924, 1 br i1 %cmp7, label %if.then, label %if.else if.then: ; preds = %while.body %dec = add nsw i32 %dec1924, -1 store i32 %dec, ptr %a, align 4, !tbaa !5 br label %if.end10 if.else: ; preds = %while.body %cmp8 = icmp slt i32 %inc2123, %4 br i1 %cmp8, label %if.then9, label %if.end10 if.then9: ; preds = %if.else %inc = add nsw i32 %inc2123, 1 store i32 %inc, ptr %b, align 4, !tbaa !5 br label %if.end10 if.end10: ; preds = %if.else, %if.then9, %if.then %inc20 = phi i32 [ %inc2123, %if.else ], [ %inc, %if.then9 ], [ %inc2123, %if.then ] %dec18 = phi i32 [ %dec1924, %if.else ], [ %dec1924, %if.then9 ], [ %dec, %if.then ] %cmp7.1 = icmp sgt i32 %dec18, 1 br i1 %cmp7.1, label %if.then.1, label %if.else.1 if.else.1: ; preds = %if.end10 %cmp8.1 = icmp slt i32 %inc20, %4 br i1 %cmp8.1, label %if.then9.1, label %if.end10.1 if.then9.1: ; preds = %if.else.1 %inc.1 = add nsw i32 %inc20, 1 store i32 %inc.1, ptr %b, align 4, !tbaa !5 br label %if.end10.1 if.then.1: ; preds = %if.end10 %dec.1 = add nsw i32 %dec18, -1 store i32 %dec.1, ptr %a, align 4, !tbaa !5 br label %if.end10.1 if.end10.1: ; preds = %if.then.1, %if.then9.1, %if.else.1 %inc20.1 = phi i32 [ %inc20, %if.else.1 ], [ %inc.1, %if.then9.1 ], [ %inc20, %if.then.1 ] %dec18.1 = phi i32 [ %dec18, %if.else.1 ], [ %dec18, %if.then9.1 ], [ %dec.1, %if.then.1 ] %dec11.1 = add nsw i32 %6, -2 %tobool.not.1 = icmp eq i32 %dec11.1, 0 br i1 %tobool.not.1, label %while.cond.while.end_crit_edge, label %while.body, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %if.end10.1, %while.body.prol.loopexit %inc20.lcssa = phi i32 [ %inc20.lcssa.unr, %while.body.prol.loopexit ], [ %inc20.1, %if.end10.1 ] %dec18.lcssa = phi i32 [ %dec18.lcssa.unr, %while.body.prol.loopexit ], [ %dec18.1, %if.end10.1 ] store i32 0, ptr %x, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %for.body %7 = phi i32 [ %inc20.lcssa, %while.cond.while.end_crit_edge ], [ %div16, %for.body ] %8 = phi i32 [ %dec18.lcssa, %while.cond.while.end_crit_edge ], [ %div6, %for.body ] %sub12 = sub nsw i32 %8, %7 %9 = call i32 @llvm.abs.i32(i32 %sub12, i1 true) %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %9) %10 = load i32, ptr %t, align 4, !tbaa !5 %dec14 = add nsw i32 %10, -1 store i32 %dec14, ptr %t, align 4, !tbaa !5 %cmp = icmp sgt i32 %10, 1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %while.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <string.h> #define N 100000 int main() { int n,m,i,ans,pena; int flag[N][2]; int question; char str[3]; ans=0; pena=0; for(i=0;i<N;i++) { flag[i][0]=0; flag[i][1]=0; } scanf("%d %d",&n,&m); for(i=0;i<m;i++) { scanf("%d %s",&question,&str); if(strcmp(str,"AC")==0) { if(flag[question-1][0]==0) { flag[question-1][0]=1; ans++; } } else { if(flag[question-1][0]==0) { flag[question-1][1]++; } } } for(i=0;i<N;i++) { if(flag[i][0]==1) { pena+=flag[i][1]; } } printf("%d %d",ans,pena); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288270/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288270/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%d %s\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"AC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %flag = alloca [100000 x [2 x i32]], align 16 %question = alloca i32, align 4 %str = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %flag) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %question) #5 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %str) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800000) %flag, i8 0, i64 800000, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp665 = icmp sgt i32 %0, 0 br i1 %cmp665, label %for.body7, label %for.cond37.preheader for.cond37.preheader: ; preds = %for.inc34, %entry %ans.0.lcssa = phi i32 [ 0, %entry ], [ %ans.1, %for.inc34 ] br label %for.body39 for.body7: ; preds = %entry, %for.inc34 %ans.067 = phi i32 [ %ans.1, %for.inc34 ], [ 0, %entry ] %i.166 = phi i32 [ %inc35, %for.inc34 ], [ 0, %entry ] %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %question, ptr noundef nonnull %str) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(3) %str, ptr noundef nonnull dereferenceable(3) @.str.2, i64 3) %cmp10 = icmp eq i32 %bcmp, 0 %1 = load i32, ptr %question, align 4, !tbaa !5 %sub = add nsw i32 %1, -1 %idxprom11 = sext i32 %sub to i64 %arrayidx12 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %idxprom11 %2 = load i32, ptr %arrayidx12, align 8, !tbaa !5 %cmp14 = icmp eq i32 %2, 0 br i1 %cmp10, label %if.then, label %if.else if.then: ; preds = %for.body7 br i1 %cmp14, label %if.then15, label %for.inc34 if.then15: ; preds = %if.then store i32 1, ptr %arrayidx12, align 8, !tbaa !5 %inc20 = add nsw i32 %ans.067, 1 br label %for.inc34 if.else: ; preds = %for.body7 br i1 %cmp14, label %if.then26, label %for.inc34 if.then26: ; preds = %if.else %arrayidx30 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %idxprom11, i64 1 %3 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %inc31 = add nsw i32 %3, 1 store i32 %inc31, ptr %arrayidx30, align 4, !tbaa !5 br label %for.inc34 for.inc34: ; preds = %if.then15, %if.then, %if.then26, %if.else %ans.1 = phi i32 [ %inc20, %if.then15 ], [ %ans.067, %if.then ], [ %ans.067, %if.then26 ], [ %ans.067, %if.else ] %inc35 = add nuw nsw i32 %i.166, 1 %4 = load i32, ptr %m, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc35, %4 br i1 %cmp6, label %for.body7, label %for.cond37.preheader, !llvm.loop !9 for.body39: ; preds = %for.inc49.1, %for.cond37.preheader %indvars.iv = phi i64 [ 0, %for.cond37.preheader ], [ %indvars.iv.next.1, %for.inc49.1 ] %pena.069 = phi i32 [ 0, %for.cond37.preheader ], [ %pena.1.1, %for.inc49.1 ] %arrayidx41 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %indvars.iv %5 = load i32, ptr %arrayidx41, align 16, !tbaa !5 %cmp43 = icmp eq i32 %5, 1 br i1 %cmp43, label %if.then44, label %for.inc49 if.then44: ; preds = %for.body39 %arrayidx47 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %indvars.iv, i64 1 %6 = load i32, ptr %arrayidx47, align 4, !tbaa !5 %add = add nsw i32 %6, %pena.069 br label %for.inc49 for.inc49: ; preds = %for.body39, %if.then44 %pena.1 = phi i32 [ %add, %if.then44 ], [ %pena.069, %for.body39 ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx41.1 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %indvars.iv.next %7 = load i32, ptr %arrayidx41.1, align 8, !tbaa !5 %cmp43.1 = icmp eq i32 %7, 1 br i1 %cmp43.1, label %if.then44.1, label %for.inc49.1 if.then44.1: ; preds = %for.inc49 %arrayidx47.1 = getelementptr inbounds [100000 x [2 x i32]], ptr %flag, i64 0, i64 %indvars.iv.next, i64 1 %8 = load i32, ptr %arrayidx47.1, align 4, !tbaa !5 %add.1 = add nsw i32 %8, %pena.1 br label %for.inc49.1 for.inc49.1: ; preds = %if.then44.1, %for.inc49 %pena.1.1 = phi i32 [ %add.1, %if.then44.1 ], [ %pena.1, %for.inc49 ] %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, 100000 br i1 %exitcond.not.1, label %for.end51, label %for.body39, !llvm.loop !11 for.end51: ; preds = %for.inc49.1 %call52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.0.lcssa, i32 noundef %pena.1.1) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %str) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %question) #5 call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %flag) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind willreturn memory(argmem: read) } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(void) { int a; int b; scanf("%d %d", &a, &b); if (a < b) { printf("a < b\n"); } else if (a > b) { printf("a > b\n"); } else if (a == b) { printf("a == b\n"); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288313/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288313/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.end10.sink.split, label %if.else if.else: ; preds = %entry %cmp2 = icmp sgt i32 %0, %1 br i1 %cmp2, label %if.end10.sink.split, label %if.else5 if.else5: ; preds = %if.else %cmp6 = icmp eq i32 %0, %1 br i1 %cmp6, label %if.end10.sink.split, label %if.end10 if.end10.sink.split: ; preds = %if.else5, %if.else, %entry %str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ] %puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) br label %if.end10 if.end10: ; preds = %if.end10.sink.split, %if.else5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(){ int a,b; scanf("%d",&a); scanf("%d",&b); if(a<b){ printf("a < b\n"); }else if(a>b){ printf("a > b\n"); }else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288357/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288357/source.c" 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 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp3 = icmp sgt i32 %0, %1 %str.4.str = select i1 %cmp3, ptr @str.4, ptr @str %str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str %puts10 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main(void){ int a,b; scanf("%d %d",&a,&b); if(a<b){ printf("a < b\n"); }else if(a>b){ printf("a > b\n"); }else if(a==b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288407/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288407/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.end10.sink.split, label %if.else if.else: ; preds = %entry %cmp2 = icmp sgt i32 %0, %1 br i1 %cmp2, label %if.end10.sink.split, label %if.else5 if.else5: ; preds = %if.else %cmp6 = icmp eq i32 %0, %1 br i1 %cmp6, label %if.end10.sink.split, label %if.end10 if.end10.sink.split: ; preds = %if.else5, %if.else, %entry %str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ] %puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) br label %if.end10 if.end10: ; preds = %if.end10.sink.split, %if.else5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main() { int a,b; scanf ("%d %d",&a,&b); if (a < b) printf("a < b\n"); else if (a > b) printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288450/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp2 = icmp sgt i32 %0, %1 %str.4.str = select i1 %cmp2, ptr @str.4, ptr @str %str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str %puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { int a, b; scanf("%d%d", &a, &b); if (a < b) printf("a < b"); else if (a > b) printf("a > b"); else printf("a == b"); printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288500/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp2 = icmp sgt i32 %0, %1 %.str.2..str.3 = select i1 %cmp2, ptr @.str.2, ptr @.str.3 %.str.2.sink = select i1 %cmp, ptr @.str.1, ptr %.str.2..str.3 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main(void){ int a; int b; scanf("%d %d",&a,&b); if(a>b){ printf("a > b\n"); }else if(a<b){ printf("a < b\n"); }else{ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288544/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288544/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 %cmp2 = icmp slt i32 %0, %1 %str.4.str = select i1 %cmp2, ptr @str.4, ptr @str %str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str %puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { int a,b; scanf("%d",&a); scanf("%d",&b); if (a<b){ printf("a < b\n"); } else if (a>b){ printf("a > b\n"); } else if (a==b){ printf("a == b\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288595/source.c" 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 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.end11.sink.split, label %if.else if.else: ; preds = %entry %cmp3 = icmp sgt i32 %0, %1 br i1 %cmp3, label %if.end11.sink.split, label %if.else6 if.else6: ; preds = %if.else %cmp7 = icmp eq i32 %0, %1 br i1 %cmp7, label %if.end11.sink.split, label %if.end11 if.end11.sink.split: ; preds = %if.else6, %if.else, %entry %str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else6 ] %puts13 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) br label %if.end11 if.end11: ; preds = %if.end11.sink.split, %if.else6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { int a, b; scanf("%d %d", &a, &b); if(a < b) printf("a < b\n"); else if(a > b) printf("a > b\n"); else if(a == b) printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288645/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288645/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.end10.sink.split, label %if.else if.else: ; preds = %entry %cmp2 = icmp sgt i32 %0, %1 br i1 %cmp2, label %if.end10.sink.split, label %if.else5 if.else5: ; preds = %if.else %cmp6 = icmp eq i32 %0, %1 br i1 %cmp6, label %if.end10.sink.split, label %if.end10 if.end10.sink.split: ; preds = %if.else5, %if.else, %entry %str.4.sink = phi ptr [ @str.5, %entry ], [ @str.4, %if.else ], [ @str, %if.else5 ] %puts12 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) br label %if.end10 if.end10: ; preds = %if.end10.sink.split, %if.else5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(a<b) printf("a < b\n"); if(a>b) printf("a > b\n"); if(a==b) printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288696/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288696/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i32, ptr %a, align 4, !tbaa !5 %.pre12 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ] %3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %cmp2 = icmp sgt i32 %3, %2 br i1 %cmp2, label %if.then3, label %if.end5 if.then3: ; preds = %if.end %puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) %.pre13 = load i32, ptr %a, align 4, !tbaa !5 %.pre14 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end5 if.end5: ; preds = %if.then3, %if.end %4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ] %5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ] %cmp6 = icmp eq i32 %5, %4 br i1 %cmp6, label %if.then7, label %if.end9 if.then7: ; preds = %if.end5 %puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br label %if.end9 if.end9: ; preds = %if.then7, %if.end5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main() { int a, b; scanf("%d %d", &a,&b); if(a==b)printf("a == b\n"); if(a>b) printf("a > b\n"); if(a<b) printf("a < b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288739/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288739/source.c" 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 [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i32, ptr %a, align 4, !tbaa !5 %.pre12 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ] %3 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %cmp2 = icmp sgt i32 %3, %2 br i1 %cmp2, label %if.then3, label %if.end5 if.then3: ; preds = %if.end %puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) %.pre13 = load i32, ptr %a, align 4, !tbaa !5 %.pre14 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end5 if.end5: ; preds = %if.then3, %if.end %4 = phi i32 [ %.pre14, %if.then3 ], [ %2, %if.end ] %5 = phi i32 [ %.pre13, %if.then3 ], [ %3, %if.end ] %cmp6 = icmp slt i32 %5, %4 br i1 %cmp6, label %if.then7, label %if.end9 if.then7: ; preds = %if.end5 %puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br label %if.end9 if.end9: ; preds = %if.then7, %if.end5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main(void){ int a,b; scanf("%d%d",&a,&b); if(a<b) printf("a < b"); else if(a>b) printf("a > b"); else printf("a == b"); puts(""); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288782/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288782/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp2 = icmp sgt i32 %0, %1 %.str.2..str.3 = select i1 %cmp2, ptr @.str.2, ptr @.str.3 %.str.2.sink = select i1 %cmp, ptr @.str.1, ptr %.str.2..str.3 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main(void) { int a,b; scanf("%d%d", &a, &b); if(a < b) printf("a < b\n"); else if(a > b) printf("a > b\n"); else printf("a == b\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288832/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288832/source.c" 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 [5 x i8] c"%d%d\00", align 1 @str = private unnamed_addr constant [7 x i8] c"a == b\00", align 1 @str.4 = private unnamed_addr constant [6 x i8] c"a > b\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"a < b\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp2 = icmp sgt i32 %0, %1 %str.4.str = select i1 %cmp2, ptr @str.4, ptr @str %str.4.sink = select i1 %cmp, ptr @str.5, ptr %str.4.str %puts9 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdint.h> // uint64_t #define max(a,b) ((a) > (b) ? (a) : (b)) #define min(a,b) ((a) > (b) ? (b) : (a)) #define DIGIT_MAX 100 #define K_MAX 3 #define BUF_SIZE (DIGIT_MAX+10) // size: specify sizeof(str) int get_str(char *str, int size) { if(!fgets(str, size, stdin)) return -1; return 0; } int get_int(void) { int num; #ifdef BUF_SIZE char line[BUF_SIZE]; if(!fgets(line, BUF_SIZE, stdin)) return 0; sscanf(line, "%d", &num); #else #error #endif return num; } int main(void) { char nstr[BUF_SIZE]; get_str(nstr, BUF_SIZE); int len = strlen(nstr)-1; int count = get_int(); static uint64_t dp[DIGIT_MAX+1][10][K_MAX+1]; static uint64_t map[K_MAX+1]; // dp[1] int i; for(i = 0; i <= 9; i++) { dp[1][i][i!=0] = 1; } int d, k; for(d = 2; d <=len; d++) { memset(map, 0, sizeof(uint64_t)*(K_MAX+1)); for(i = 0; i <= 9; i++) { for(k = 0; k <= count; k++) { map[k] += dp[d-1][i][k]; } } #ifdef DEBUG for(k = 0; k <= count; k++) { printf("%llu ", map[k]); } putchar('\n'); #endif for(i = 0; i <= 9; i++) { for(k = 0; k <= count; k++) { if(!i) { dp[d][i][k] = map[k]; } else { if(k>=1) dp[d][i][k] = map[k-1]; } } } } uint64_t res = 0; int c = count; for(d = len; d >= 1; d--) { int ch = nstr[len-d] - '0'; for(i = 0; i < ch; i++) { res += dp[d][i][c]; } if(ch!=0) c--; #ifdef DEBUG printf("[%d] -> count: %d, %llu\n",ch, c, res); #endif // all numbers are 0 below $d digit if(c==0) { res++; break; } } printf("%llu\n", res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288876/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288876/source.c" 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" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @main.dp = internal unnamed_addr global [101 x [10 x [4 x i64]]] zeroinitializer, align 16 @main.map = internal unnamed_addr global [4 x i64] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [6 x i8] c"%llu\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @get_str(ptr noundef %str, i32 noundef %size) local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = tail call ptr @fgets(ptr noundef %str, i32 noundef %size, ptr noundef %0) %tobool.not = icmp eq ptr %call, null %. = sext i1 %tobool.not to i32 ret i32 %. } ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @get_int() local_unnamed_addr #0 { entry: %num = alloca i32, align 4 %line = alloca [110 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #6 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %line) #6 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %line, i32 noundef 110, ptr noundef %0) %tobool.not = icmp eq ptr %call, null br i1 %tobool.not, label %cleanup, label %if.end if.end: ; preds = %entry %call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %line, ptr noundef nonnull @.str, ptr noundef nonnull %num) #6 %1 = load i32, ptr %num, align 4, !tbaa !9 br label %cleanup cleanup: ; preds = %entry, %if.end %retval.0 = phi i32 [ %1, %if.end ], [ 0, %entry ] call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %line) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #6 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: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; 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 #0 { entry: %num.i = alloca i32, align 4 %line.i = alloca [110 x i8], align 16 %nstr = alloca [110 x i8], align 16 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %nstr) #6 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = call ptr @fgets(ptr noundef nonnull %nstr, i32 noundef 110, ptr noundef %0) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %nstr) #7 %1 = trunc i64 %call2 to i32 %conv = add i32 %1, -1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num.i) #6 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %line.i) #6 %2 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i159 = call ptr @fgets(ptr noundef nonnull %line.i, i32 noundef 110, ptr noundef %2) %tobool.not.i160 = icmp eq ptr %call.i159, null br i1 %tobool.not.i160, label %get_int.exit, label %if.end.i if.end.i: ; preds = %entry %call2.i = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %line.i, ptr noundef nonnull @.str, ptr noundef nonnull %num.i) #6 %3 = load i32, ptr %num.i, align 4, !tbaa !9 br label %get_int.exit get_int.exit: ; preds = %entry, %if.end.i %retval.0.i = phi i32 [ %3, %if.end.i ], [ 0, %entry ] call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %line.i) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num.i) #6 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 0, i64 0), align 16, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 1, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 2, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 3, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 4, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 5, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 6, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 7, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 8, i64 1), align 8, !tbaa !11 store i64 1, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 1, i64 9, i64 1), align 8, !tbaa !11 %cmp10.not169 = icmp slt i32 %conv, 2 br i1 %cmp10.not169, label %for.cond74.preheader, label %for.body12.lr.ph for.body12.lr.ph: ; preds = %get_int.exit %cmp18.not162 = icmp slt i32 %retval.0.i, 0 br i1 %cmp18.not162, label %for.body12.us.us.preheader, label %for.body12.preheader for.body12.us.us.preheader: ; preds = %for.body12.lr.ph %4 = add i32 %1, -2 %5 = add i32 %1, -3 %xtraiter = and i32 %4, 7 %6 = icmp ult i32 %5, 7 br i1 %6, label %for.cond74.preheader.loopexit.unr-lcssa, label %for.body12.us.us.preheader.new for.body12.us.us.preheader.new: ; preds = %for.body12.us.us.preheader %unroll_iter = and i32 %4, -8 br label %for.body12.us.us for.body12.preheader: ; preds = %for.body12.lr.ph %7 = add nuw i32 %retval.0.i, 1 %8 = zext i32 %7 to i64 %9 = shl nuw nsw i64 %8, 3 %10 = add i64 %call2, 4294967294 %wide.trip.count215 = and i64 %10, 4294967295 %exitcond202.peel.not = icmp eq i32 %retval.0.i, 0 %11 = add nsw i64 %8, -1 %min.iters.check369 = icmp ult i32 %retval.0.i, 3 %n.vec372 = and i64 %8, 4294967292 %cmp.n374 = icmp eq i64 %n.vec372, %8 %min.iters.check354 = icmp ult i32 %retval.0.i, 3 %n.vec357 = and i64 %8, 4294967292 %cmp.n359 = icmp eq i64 %n.vec357, %8 %min.iters.check339 = icmp ult i32 %retval.0.i, 3 %n.vec342 = and i64 %8, 4294967292 %cmp.n344 = icmp eq i64 %n.vec342, %8 %min.iters.check324 = icmp ult i32 %retval.0.i, 3 %n.vec327 = and i64 %8, 4294967292 %cmp.n329 = icmp eq i64 %n.vec327, %8 %min.iters.check309 = icmp ult i32 %retval.0.i, 3 %n.vec312 = and i64 %8, 4294967292 %cmp.n314 = icmp eq i64 %n.vec312, %8 %min.iters.check294 = icmp ult i32 %retval.0.i, 3 %n.vec297 = and i64 %8, 4294967292 %cmp.n299 = icmp eq i64 %n.vec297, %8 %min.iters.check279 = icmp ult i32 %retval.0.i, 3 %n.vec282 = and i64 %8, 4294967292 %cmp.n284 = icmp eq i64 %n.vec282, %8 %min.iters.check264 = icmp ult i32 %retval.0.i, 3 %n.vec267 = and i64 %8, 4294967292 %cmp.n269 = icmp eq i64 %n.vec267, %8 %min.iters.check249 = icmp ult i32 %retval.0.i, 3 %n.vec252 = and i64 %8, 4294967292 %cmp.n254 = icmp eq i64 %n.vec252, %8 %min.iters.check234 = icmp ult i32 %retval.0.i, 3 %n.vec237 = and i64 %8, 4294967292 %cmp.n239 = icmp eq i64 %n.vec237, %8 %min.iters.check = icmp ult i32 %retval.0.i, 4 %n.vec = and i64 %11, -4 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %11, %n.vec br label %for.cond17.preheader.preheader for.body12.us.us: ; preds = %for.body12.us.us, %for.body12.us.us.preheader.new %niter = phi i32 [ 0, %for.body12.us.us.preheader.new ], [ %niter.next.7, %for.body12.us.us ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) %niter.next.7 = add i32 %niter, 8 %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond74.preheader.loopexit.unr-lcssa, label %for.body12.us.us, !llvm.loop !13 for.cond74.preheader.loopexit.unr-lcssa: ; preds = %for.body12.us.us, %for.body12.us.us.preheader %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond74.preheader, label %for.body12.us.us.epil for.body12.us.us.epil: ; preds = %for.cond74.preheader.loopexit.unr-lcssa, %for.body12.us.us.epil %epil.iter = phi i32 [ %epil.iter.next, %for.body12.us.us.epil ], [ 0, %for.cond74.preheader.loopexit.unr-lcssa ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) %epil.iter.next = add i32 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond74.preheader, label %for.body12.us.us.epil, !llvm.loop !15 for.cond74.preheader: ; preds = %for.inc71.split, %for.cond74.preheader.loopexit.unr-lcssa, %for.body12.us.us.epil, %get_int.exit %cmp75182 = icmp sgt i32 %conv, 0 br i1 %cmp75182, label %for.body77.preheader, label %for.end108 for.body77.preheader: ; preds = %for.cond74.preheader %12 = zext i32 %conv to i64 br label %for.body77 for.cond17.preheader.preheader: ; preds = %for.inc71.split, %for.body12.preheader %indvars.iv211 = phi i64 [ 2, %for.body12.preheader ], [ %indvars.iv.next212, %for.inc71.split ] %indvar = phi i64 [ 0, %for.body12.preheader ], [ %indvar.next, %for.inc71.split ] %13 = mul nuw nsw i64 %indvar, 320 %gep = getelementptr i8, ptr getelementptr inbounds ([101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 2, i64 0, i64 0), i64 %13 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(32) @main.map, i8 0, i64 32, i1 false) %14 = add nsw i64 %indvars.iv211, -1 br i1 %min.iters.check369, label %for.body20.preheader, label %vector.body375 vector.body375: ; preds = %for.cond17.preheader.preheader, %vector.body375 %index376 = phi i64 [ %index.next381, %vector.body375 ], [ 0, %for.cond17.preheader.preheader ] %15 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 0, i64 %index376 %wide.load377 = load <2 x i64>, ptr %15, align 16, !tbaa !11 %16 = getelementptr inbounds i64, ptr %15, i64 2 %wide.load378 = load <2 x i64>, ptr %16, align 16, !tbaa !11 %17 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index376 %wide.load379 = load <2 x i64>, ptr %17, align 16, !tbaa !11 %18 = getelementptr inbounds i64, ptr %17, i64 2 %wide.load380 = load <2 x i64>, ptr %18, align 16, !tbaa !11 %19 = add <2 x i64> %wide.load379, %wide.load377 %20 = add <2 x i64> %wide.load380, %wide.load378 store <2 x i64> %19, ptr %17, align 16, !tbaa !11 store <2 x i64> %20, ptr %18, align 16, !tbaa !11 %index.next381 = add nuw i64 %index376, 4 %21 = icmp eq i64 %index.next381, %n.vec372 br i1 %21, label %middle.block367, label %vector.body375, !llvm.loop !17 middle.block367: ; preds = %vector.body375 br i1 %cmp.n374, label %for.body20.1.preheader, label %for.body20.preheader for.body20.preheader: ; preds = %for.cond17.preheader.preheader, %middle.block367 %indvars.iv.ph = phi i64 [ 0, %for.cond17.preheader.preheader ], [ %n.vec372, %middle.block367 ] br label %for.body20 for.body20: ; preds = %for.body20.preheader, %for.body20 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body20 ], [ %indvars.iv.ph, %for.body20.preheader ] %arrayidx27 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 0, i64 %indvars.iv %22 = load i64, ptr %arrayidx27, align 8, !tbaa !11 %arrayidx29 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv %23 = load i64, ptr %arrayidx29, align 8, !tbaa !11 %add = add i64 %23, %22 store i64 %add, ptr %arrayidx29, align 8, !tbaa !11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %8 br i1 %exitcond.not, label %for.body20.1.preheader, label %for.body20, !llvm.loop !20 for.body20.1.preheader: ; preds = %for.body20, %middle.block367 br i1 %min.iters.check354, label %for.body20.1.preheader392, label %vector.body360 vector.body360: ; preds = %for.body20.1.preheader, %vector.body360 %index361 = phi i64 [ %index.next366, %vector.body360 ], [ 0, %for.body20.1.preheader ] %24 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 1, i64 %index361 %wide.load362 = load <2 x i64>, ptr %24, align 16, !tbaa !11 %25 = getelementptr inbounds i64, ptr %24, i64 2 %wide.load363 = load <2 x i64>, ptr %25, align 16, !tbaa !11 %26 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index361 %wide.load364 = load <2 x i64>, ptr %26, align 16, !tbaa !11 %27 = getelementptr inbounds i64, ptr %26, i64 2 %wide.load365 = load <2 x i64>, ptr %27, align 16, !tbaa !11 %28 = add <2 x i64> %wide.load364, %wide.load362 %29 = add <2 x i64> %wide.load365, %wide.load363 store <2 x i64> %28, ptr %26, align 16, !tbaa !11 store <2 x i64> %29, ptr %27, align 16, !tbaa !11 %index.next366 = add nuw i64 %index361, 4 %30 = icmp eq i64 %index.next366, %n.vec357 br i1 %30, label %middle.block352, label %vector.body360, !llvm.loop !21 middle.block352: ; preds = %vector.body360 br i1 %cmp.n359, label %for.body20.2.preheader, label %for.body20.1.preheader392 for.body20.1.preheader392: ; preds = %for.body20.1.preheader, %middle.block352 %indvars.iv.1.ph = phi i64 [ 0, %for.body20.1.preheader ], [ %n.vec357, %middle.block352 ] br label %for.body20.1 for.body20.1: ; preds = %for.body20.1.preheader392, %for.body20.1 %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %for.body20.1 ], [ %indvars.iv.1.ph, %for.body20.1.preheader392 ] %arrayidx27.1 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 1, i64 %indvars.iv.1 %31 = load i64, ptr %arrayidx27.1, align 8, !tbaa !11 %arrayidx29.1 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.1 %32 = load i64, ptr %arrayidx29.1, align 8, !tbaa !11 %add.1 = add i64 %32, %31 store i64 %add.1, ptr %arrayidx29.1, align 8, !tbaa !11 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %8 br i1 %exitcond.1.not, label %for.body20.2.preheader, label %for.body20.1, !llvm.loop !22 for.body20.2.preheader: ; preds = %for.body20.1, %middle.block352 br i1 %min.iters.check339, label %for.body20.2.preheader391, label %vector.body345 vector.body345: ; preds = %for.body20.2.preheader, %vector.body345 %index346 = phi i64 [ %index.next351, %vector.body345 ], [ 0, %for.body20.2.preheader ] %33 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 2, i64 %index346 %wide.load347 = load <2 x i64>, ptr %33, align 16, !tbaa !11 %34 = getelementptr inbounds i64, ptr %33, i64 2 %wide.load348 = load <2 x i64>, ptr %34, align 16, !tbaa !11 %35 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index346 %wide.load349 = load <2 x i64>, ptr %35, align 16, !tbaa !11 %36 = getelementptr inbounds i64, ptr %35, i64 2 %wide.load350 = load <2 x i64>, ptr %36, align 16, !tbaa !11 %37 = add <2 x i64> %wide.load349, %wide.load347 %38 = add <2 x i64> %wide.load350, %wide.load348 store <2 x i64> %37, ptr %35, align 16, !tbaa !11 store <2 x i64> %38, ptr %36, align 16, !tbaa !11 %index.next351 = add nuw i64 %index346, 4 %39 = icmp eq i64 %index.next351, %n.vec342 br i1 %39, label %middle.block337, label %vector.body345, !llvm.loop !23 middle.block337: ; preds = %vector.body345 br i1 %cmp.n344, label %for.body20.3.preheader, label %for.body20.2.preheader391 for.body20.2.preheader391: ; preds = %for.body20.2.preheader, %middle.block337 %indvars.iv.2.ph = phi i64 [ 0, %for.body20.2.preheader ], [ %n.vec342, %middle.block337 ] br label %for.body20.2 for.body20.2: ; preds = %for.body20.2.preheader391, %for.body20.2 %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %for.body20.2 ], [ %indvars.iv.2.ph, %for.body20.2.preheader391 ] %arrayidx27.2 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 2, i64 %indvars.iv.2 %40 = load i64, ptr %arrayidx27.2, align 8, !tbaa !11 %arrayidx29.2 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.2 %41 = load i64, ptr %arrayidx29.2, align 8, !tbaa !11 %add.2 = add i64 %41, %40 store i64 %add.2, ptr %arrayidx29.2, align 8, !tbaa !11 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1 %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %8 br i1 %exitcond.2.not, label %for.body20.3.preheader, label %for.body20.2, !llvm.loop !24 for.body20.3.preheader: ; preds = %for.body20.2, %middle.block337 br i1 %min.iters.check324, label %for.body20.3.preheader390, label %vector.body330 vector.body330: ; preds = %for.body20.3.preheader, %vector.body330 %index331 = phi i64 [ %index.next336, %vector.body330 ], [ 0, %for.body20.3.preheader ] %42 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 3, i64 %index331 %wide.load332 = load <2 x i64>, ptr %42, align 16, !tbaa !11 %43 = getelementptr inbounds i64, ptr %42, i64 2 %wide.load333 = load <2 x i64>, ptr %43, align 16, !tbaa !11 %44 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index331 %wide.load334 = load <2 x i64>, ptr %44, align 16, !tbaa !11 %45 = getelementptr inbounds i64, ptr %44, i64 2 %wide.load335 = load <2 x i64>, ptr %45, align 16, !tbaa !11 %46 = add <2 x i64> %wide.load334, %wide.load332 %47 = add <2 x i64> %wide.load335, %wide.load333 store <2 x i64> %46, ptr %44, align 16, !tbaa !11 store <2 x i64> %47, ptr %45, align 16, !tbaa !11 %index.next336 = add nuw i64 %index331, 4 %48 = icmp eq i64 %index.next336, %n.vec327 br i1 %48, label %middle.block322, label %vector.body330, !llvm.loop !25 middle.block322: ; preds = %vector.body330 br i1 %cmp.n329, label %for.body20.4.preheader, label %for.body20.3.preheader390 for.body20.3.preheader390: ; preds = %for.body20.3.preheader, %middle.block322 %indvars.iv.3.ph = phi i64 [ 0, %for.body20.3.preheader ], [ %n.vec327, %middle.block322 ] br label %for.body20.3 for.body20.3: ; preds = %for.body20.3.preheader390, %for.body20.3 %indvars.iv.3 = phi i64 [ %indvars.iv.next.3, %for.body20.3 ], [ %indvars.iv.3.ph, %for.body20.3.preheader390 ] %arrayidx27.3 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 3, i64 %indvars.iv.3 %49 = load i64, ptr %arrayidx27.3, align 8, !tbaa !11 %arrayidx29.3 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.3 %50 = load i64, ptr %arrayidx29.3, align 8, !tbaa !11 %add.3 = add i64 %50, %49 store i64 %add.3, ptr %arrayidx29.3, align 8, !tbaa !11 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1 %exitcond.3.not = icmp eq i64 %indvars.iv.next.3, %8 br i1 %exitcond.3.not, label %for.body20.4.preheader, label %for.body20.3, !llvm.loop !26 for.body20.4.preheader: ; preds = %for.body20.3, %middle.block322 br i1 %min.iters.check309, label %for.body20.4.preheader389, label %vector.body315 vector.body315: ; preds = %for.body20.4.preheader, %vector.body315 %index316 = phi i64 [ %index.next321, %vector.body315 ], [ 0, %for.body20.4.preheader ] %51 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 4, i64 %index316 %wide.load317 = load <2 x i64>, ptr %51, align 16, !tbaa !11 %52 = getelementptr inbounds i64, ptr %51, i64 2 %wide.load318 = load <2 x i64>, ptr %52, align 16, !tbaa !11 %53 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index316 %wide.load319 = load <2 x i64>, ptr %53, align 16, !tbaa !11 %54 = getelementptr inbounds i64, ptr %53, i64 2 %wide.load320 = load <2 x i64>, ptr %54, align 16, !tbaa !11 %55 = add <2 x i64> %wide.load319, %wide.load317 %56 = add <2 x i64> %wide.load320, %wide.load318 store <2 x i64> %55, ptr %53, align 16, !tbaa !11 store <2 x i64> %56, ptr %54, align 16, !tbaa !11 %index.next321 = add nuw i64 %index316, 4 %57 = icmp eq i64 %index.next321, %n.vec312 br i1 %57, label %middle.block307, label %vector.body315, !llvm.loop !27 middle.block307: ; preds = %vector.body315 br i1 %cmp.n314, label %for.body20.5.preheader, label %for.body20.4.preheader389 for.body20.4.preheader389: ; preds = %for.body20.4.preheader, %middle.block307 %indvars.iv.4.ph = phi i64 [ 0, %for.body20.4.preheader ], [ %n.vec312, %middle.block307 ] br label %for.body20.4 for.body20.4: ; preds = %for.body20.4.preheader389, %for.body20.4 %indvars.iv.4 = phi i64 [ %indvars.iv.next.4, %for.body20.4 ], [ %indvars.iv.4.ph, %for.body20.4.preheader389 ] %arrayidx27.4 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 4, i64 %indvars.iv.4 %58 = load i64, ptr %arrayidx27.4, align 8, !tbaa !11 %arrayidx29.4 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.4 %59 = load i64, ptr %arrayidx29.4, align 8, !tbaa !11 %add.4 = add i64 %59, %58 store i64 %add.4, ptr %arrayidx29.4, align 8, !tbaa !11 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.4, 1 %exitcond.4.not = icmp eq i64 %indvars.iv.next.4, %8 br i1 %exitcond.4.not, label %for.body20.5.preheader, label %for.body20.4, !llvm.loop !28 for.body20.5.preheader: ; preds = %for.body20.4, %middle.block307 br i1 %min.iters.check294, label %for.body20.5.preheader388, label %vector.body300 vector.body300: ; preds = %for.body20.5.preheader, %vector.body300 %index301 = phi i64 [ %index.next306, %vector.body300 ], [ 0, %for.body20.5.preheader ] %60 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 5, i64 %index301 %wide.load302 = load <2 x i64>, ptr %60, align 16, !tbaa !11 %61 = getelementptr inbounds i64, ptr %60, i64 2 %wide.load303 = load <2 x i64>, ptr %61, align 16, !tbaa !11 %62 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index301 %wide.load304 = load <2 x i64>, ptr %62, align 16, !tbaa !11 %63 = getelementptr inbounds i64, ptr %62, i64 2 %wide.load305 = load <2 x i64>, ptr %63, align 16, !tbaa !11 %64 = add <2 x i64> %wide.load304, %wide.load302 %65 = add <2 x i64> %wide.load305, %wide.load303 store <2 x i64> %64, ptr %62, align 16, !tbaa !11 store <2 x i64> %65, ptr %63, align 16, !tbaa !11 %index.next306 = add nuw i64 %index301, 4 %66 = icmp eq i64 %index.next306, %n.vec297 br i1 %66, label %middle.block292, label %vector.body300, !llvm.loop !29 middle.block292: ; preds = %vector.body300 br i1 %cmp.n299, label %for.body20.6.preheader, label %for.body20.5.preheader388 for.body20.5.preheader388: ; preds = %for.body20.5.preheader, %middle.block292 %indvars.iv.5.ph = phi i64 [ 0, %for.body20.5.preheader ], [ %n.vec297, %middle.block292 ] br label %for.body20.5 for.body20.5: ; preds = %for.body20.5.preheader388, %for.body20.5 %indvars.iv.5 = phi i64 [ %indvars.iv.next.5, %for.body20.5 ], [ %indvars.iv.5.ph, %for.body20.5.preheader388 ] %arrayidx27.5 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 5, i64 %indvars.iv.5 %67 = load i64, ptr %arrayidx27.5, align 8, !tbaa !11 %arrayidx29.5 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.5 %68 = load i64, ptr %arrayidx29.5, align 8, !tbaa !11 %add.5 = add i64 %68, %67 store i64 %add.5, ptr %arrayidx29.5, align 8, !tbaa !11 %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.5, 1 %exitcond.5.not = icmp eq i64 %indvars.iv.next.5, %8 br i1 %exitcond.5.not, label %for.body20.6.preheader, label %for.body20.5, !llvm.loop !30 for.body20.6.preheader: ; preds = %for.body20.5, %middle.block292 br i1 %min.iters.check279, label %for.body20.6.preheader387, label %vector.body285 vector.body285: ; preds = %for.body20.6.preheader, %vector.body285 %index286 = phi i64 [ %index.next291, %vector.body285 ], [ 0, %for.body20.6.preheader ] %69 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 6, i64 %index286 %wide.load287 = load <2 x i64>, ptr %69, align 16, !tbaa !11 %70 = getelementptr inbounds i64, ptr %69, i64 2 %wide.load288 = load <2 x i64>, ptr %70, align 16, !tbaa !11 %71 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index286 %wide.load289 = load <2 x i64>, ptr %71, align 16, !tbaa !11 %72 = getelementptr inbounds i64, ptr %71, i64 2 %wide.load290 = load <2 x i64>, ptr %72, align 16, !tbaa !11 %73 = add <2 x i64> %wide.load289, %wide.load287 %74 = add <2 x i64> %wide.load290, %wide.load288 store <2 x i64> %73, ptr %71, align 16, !tbaa !11 store <2 x i64> %74, ptr %72, align 16, !tbaa !11 %index.next291 = add nuw i64 %index286, 4 %75 = icmp eq i64 %index.next291, %n.vec282 br i1 %75, label %middle.block277, label %vector.body285, !llvm.loop !31 middle.block277: ; preds = %vector.body285 br i1 %cmp.n284, label %for.body20.7.preheader, label %for.body20.6.preheader387 for.body20.6.preheader387: ; preds = %for.body20.6.preheader, %middle.block277 %indvars.iv.6.ph = phi i64 [ 0, %for.body20.6.preheader ], [ %n.vec282, %middle.block277 ] br label %for.body20.6 for.body20.6: ; preds = %for.body20.6.preheader387, %for.body20.6 %indvars.iv.6 = phi i64 [ %indvars.iv.next.6, %for.body20.6 ], [ %indvars.iv.6.ph, %for.body20.6.preheader387 ] %arrayidx27.6 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 6, i64 %indvars.iv.6 %76 = load i64, ptr %arrayidx27.6, align 8, !tbaa !11 %arrayidx29.6 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.6 %77 = load i64, ptr %arrayidx29.6, align 8, !tbaa !11 %add.6 = add i64 %77, %76 store i64 %add.6, ptr %arrayidx29.6, align 8, !tbaa !11 %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.6, 1 %exitcond.6.not = icmp eq i64 %indvars.iv.next.6, %8 br i1 %exitcond.6.not, label %for.body20.7.preheader, label %for.body20.6, !llvm.loop !32 for.body20.7.preheader: ; preds = %for.body20.6, %middle.block277 br i1 %min.iters.check264, label %for.body20.7.preheader386, label %vector.body270 vector.body270: ; preds = %for.body20.7.preheader, %vector.body270 %index271 = phi i64 [ %index.next276, %vector.body270 ], [ 0, %for.body20.7.preheader ] %78 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 7, i64 %index271 %wide.load272 = load <2 x i64>, ptr %78, align 16, !tbaa !11 %79 = getelementptr inbounds i64, ptr %78, i64 2 %wide.load273 = load <2 x i64>, ptr %79, align 16, !tbaa !11 %80 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index271 %wide.load274 = load <2 x i64>, ptr %80, align 16, !tbaa !11 %81 = getelementptr inbounds i64, ptr %80, i64 2 %wide.load275 = load <2 x i64>, ptr %81, align 16, !tbaa !11 %82 = add <2 x i64> %wide.load274, %wide.load272 %83 = add <2 x i64> %wide.load275, %wide.load273 store <2 x i64> %82, ptr %80, align 16, !tbaa !11 store <2 x i64> %83, ptr %81, align 16, !tbaa !11 %index.next276 = add nuw i64 %index271, 4 %84 = icmp eq i64 %index.next276, %n.vec267 br i1 %84, label %middle.block262, label %vector.body270, !llvm.loop !33 middle.block262: ; preds = %vector.body270 br i1 %cmp.n269, label %for.body20.8.preheader, label %for.body20.7.preheader386 for.body20.7.preheader386: ; preds = %for.body20.7.preheader, %middle.block262 %indvars.iv.7.ph = phi i64 [ 0, %for.body20.7.preheader ], [ %n.vec267, %middle.block262 ] br label %for.body20.7 for.body20.7: ; preds = %for.body20.7.preheader386, %for.body20.7 %indvars.iv.7 = phi i64 [ %indvars.iv.next.7, %for.body20.7 ], [ %indvars.iv.7.ph, %for.body20.7.preheader386 ] %arrayidx27.7 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 7, i64 %indvars.iv.7 %85 = load i64, ptr %arrayidx27.7, align 8, !tbaa !11 %arrayidx29.7 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.7 %86 = load i64, ptr %arrayidx29.7, align 8, !tbaa !11 %add.7 = add i64 %86, %85 store i64 %add.7, ptr %arrayidx29.7, align 8, !tbaa !11 %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv.7, 1 %exitcond.7.not = icmp eq i64 %indvars.iv.next.7, %8 br i1 %exitcond.7.not, label %for.body20.8.preheader, label %for.body20.7, !llvm.loop !34 for.body20.8.preheader: ; preds = %for.body20.7, %middle.block262 br i1 %min.iters.check249, label %for.body20.8.preheader385, label %vector.body255 vector.body255: ; preds = %for.body20.8.preheader, %vector.body255 %index256 = phi i64 [ %index.next261, %vector.body255 ], [ 0, %for.body20.8.preheader ] %87 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 8, i64 %index256 %wide.load257 = load <2 x i64>, ptr %87, align 16, !tbaa !11 %88 = getelementptr inbounds i64, ptr %87, i64 2 %wide.load258 = load <2 x i64>, ptr %88, align 16, !tbaa !11 %89 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index256 %wide.load259 = load <2 x i64>, ptr %89, align 16, !tbaa !11 %90 = getelementptr inbounds i64, ptr %89, i64 2 %wide.load260 = load <2 x i64>, ptr %90, align 16, !tbaa !11 %91 = add <2 x i64> %wide.load259, %wide.load257 %92 = add <2 x i64> %wide.load260, %wide.load258 store <2 x i64> %91, ptr %89, align 16, !tbaa !11 store <2 x i64> %92, ptr %90, align 16, !tbaa !11 %index.next261 = add nuw i64 %index256, 4 %93 = icmp eq i64 %index.next261, %n.vec252 br i1 %93, label %middle.block247, label %vector.body255, !llvm.loop !35 middle.block247: ; preds = %vector.body255 br i1 %cmp.n254, label %for.body20.9.preheader, label %for.body20.8.preheader385 for.body20.8.preheader385: ; preds = %for.body20.8.preheader, %middle.block247 %indvars.iv.8.ph = phi i64 [ 0, %for.body20.8.preheader ], [ %n.vec252, %middle.block247 ] br label %for.body20.8 for.body20.8: ; preds = %for.body20.8.preheader385, %for.body20.8 %indvars.iv.8 = phi i64 [ %indvars.iv.next.8, %for.body20.8 ], [ %indvars.iv.8.ph, %for.body20.8.preheader385 ] %arrayidx27.8 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 8, i64 %indvars.iv.8 %94 = load i64, ptr %arrayidx27.8, align 8, !tbaa !11 %arrayidx29.8 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.8 %95 = load i64, ptr %arrayidx29.8, align 8, !tbaa !11 %add.8 = add i64 %95, %94 store i64 %add.8, ptr %arrayidx29.8, align 8, !tbaa !11 %indvars.iv.next.8 = add nuw nsw i64 %indvars.iv.8, 1 %exitcond.8.not = icmp eq i64 %indvars.iv.next.8, %8 br i1 %exitcond.8.not, label %for.body20.9.preheader, label %for.body20.8, !llvm.loop !36 for.body20.9.preheader: ; preds = %for.body20.8, %middle.block247 br i1 %min.iters.check234, label %for.body20.9.preheader384, label %vector.body240 vector.body240: ; preds = %for.body20.9.preheader, %vector.body240 %index241 = phi i64 [ %index.next246, %vector.body240 ], [ 0, %for.body20.9.preheader ] %96 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 9, i64 %index241 %wide.load242 = load <2 x i64>, ptr %96, align 16, !tbaa !11 %97 = getelementptr inbounds i64, ptr %96, i64 2 %wide.load243 = load <2 x i64>, ptr %97, align 16, !tbaa !11 %98 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %index241 %wide.load244 = load <2 x i64>, ptr %98, align 16, !tbaa !11 %99 = getelementptr inbounds i64, ptr %98, i64 2 %wide.load245 = load <2 x i64>, ptr %99, align 16, !tbaa !11 %100 = add <2 x i64> %wide.load244, %wide.load242 %101 = add <2 x i64> %wide.load245, %wide.load243 store <2 x i64> %100, ptr %98, align 16, !tbaa !11 store <2 x i64> %101, ptr %99, align 16, !tbaa !11 %index.next246 = add nuw i64 %index241, 4 %102 = icmp eq i64 %index.next246, %n.vec237 br i1 %102, label %middle.block232, label %vector.body240, !llvm.loop !37 middle.block232: ; preds = %vector.body240 br i1 %cmp.n239, label %for.cond40.preheader.preheader, label %for.body20.9.preheader384 for.body20.9.preheader384: ; preds = %for.body20.9.preheader, %middle.block232 %indvars.iv.9.ph = phi i64 [ 0, %for.body20.9.preheader ], [ %n.vec237, %middle.block232 ] br label %for.body20.9 for.body20.9: ; preds = %for.body20.9.preheader384, %for.body20.9 %indvars.iv.9 = phi i64 [ %indvars.iv.next.9, %for.body20.9 ], [ %indvars.iv.9.ph, %for.body20.9.preheader384 ] %arrayidx27.9 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %14, i64 9, i64 %indvars.iv.9 %103 = load i64, ptr %arrayidx27.9, align 8, !tbaa !11 %arrayidx29.9 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %indvars.iv.9 %104 = load i64, ptr %arrayidx29.9, align 8, !tbaa !11 %add.9 = add i64 %104, %103 store i64 %add.9, ptr %arrayidx29.9, align 8, !tbaa !11 %indvars.iv.next.9 = add nuw nsw i64 %indvars.iv.9, 1 %exitcond.9.not = icmp eq i64 %indvars.iv.next.9, %8 br i1 %exitcond.9.not, label %for.cond40.preheader.preheader, label %for.body20.9, !llvm.loop !38 for.cond40.preheader.preheader: ; preds = %for.body20.9, %middle.block232 br label %for.cond40.preheader for.cond40.preheader: ; preds = %for.cond40.preheader.preheader, %for.cond40.for.inc68_crit_edge %indvars.iv207 = phi i64 [ %indvars.iv.next208, %for.cond40.for.inc68_crit_edge ], [ 0, %for.cond40.preheader.preheader ] %tobool.not = icmp eq i64 %indvars.iv207, 0 br i1 %tobool.not, label %for.body43.us.preheader, label %for.inc65.peel for.inc65.peel: ; preds = %for.cond40.preheader br i1 %exitcond202.peel.not, label %for.cond40.for.inc68_crit_edge, label %for.inc65.preheader for.inc65.preheader: ; preds = %for.inc65.peel br i1 %min.iters.check, label %for.inc65.preheader383, label %vector.body vector.body: ; preds = %for.inc65.preheader, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %for.inc65.preheader ] %offset.idx = or i64 %index, 1 %105 = and i64 %index, 4294967292 %106 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %105 %wide.load = load <2 x i64>, ptr %106, align 16, !tbaa !11 %107 = getelementptr inbounds i64, ptr %106, i64 2 %wide.load231 = load <2 x i64>, ptr %107, align 16, !tbaa !11 %108 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv211, i64 %indvars.iv207, i64 %offset.idx store <2 x i64> %wide.load, ptr %108, align 8, !tbaa !11 %109 = getelementptr inbounds i64, ptr %108, i64 2 store <2 x i64> %wide.load231, ptr %109, align 8, !tbaa !11 %index.next = add nuw i64 %index, 4 %110 = icmp eq i64 %index.next, %n.vec br i1 %110, label %middle.block, label %vector.body, !llvm.loop !39 middle.block: ; preds = %vector.body br i1 %cmp.n, label %for.cond40.for.inc68_crit_edge, label %for.inc65.preheader383 for.inc65.preheader383: ; preds = %for.inc65.preheader, %middle.block %indvars.iv197.ph = phi i64 [ 1, %for.inc65.preheader ], [ %ind.end, %middle.block ] br label %for.inc65 for.body43.us.preheader: ; preds = %for.cond40.preheader call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep, ptr noundef nonnull align 16 dereferenceable(1) @main.map, i64 %9, i1 false), !tbaa !11 br label %for.cond40.for.inc68_crit_edge for.inc65: ; preds = %for.inc65.preheader383, %for.inc65 %indvars.iv197 = phi i64 [ %indvars.iv.next198, %for.inc65 ], [ %indvars.iv197.ph, %for.inc65.preheader383 ] %111 = add nuw i64 %indvars.iv197, 4294967295 %idxprom56 = and i64 %111, 4294967295 %arrayidx57 = getelementptr inbounds [4 x i64], ptr @main.map, i64 0, i64 %idxprom56 %112 = load i64, ptr %arrayidx57, align 8, !tbaa !11 %arrayidx63 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv211, i64 %indvars.iv207, i64 %indvars.iv197 store i64 %112, ptr %arrayidx63, align 8, !tbaa !11 %indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1 %exitcond202.not = icmp eq i64 %indvars.iv.next198, %8 br i1 %exitcond202.not, label %for.cond40.for.inc68_crit_edge, label %for.inc65, !llvm.loop !41 for.cond40.for.inc68_crit_edge: ; preds = %for.inc65, %middle.block, %for.inc65.peel, %for.body43.us.preheader %indvars.iv.next208 = add nuw nsw i64 %indvars.iv207, 1 %exitcond210.not = icmp eq i64 %indvars.iv.next208, 10 br i1 %exitcond210.not, label %for.inc71.split, label %for.cond40.preheader, !llvm.loop !42 for.inc71.split: ; preds = %for.cond40.for.inc68_crit_edge %indvars.iv.next212 = add nuw nsw i64 %indvars.iv211, 1 %indvar.next = add nuw nsw i64 %indvar, 1 %exitcond216.not = icmp eq i64 %indvar.next, %wide.trip.count215 br i1 %exitcond216.not, label %for.cond74.preheader, label %for.cond17.preheader.preheader, !llvm.loop !13 for.cond74: ; preds = %for.end96 %indvars.iv.next224 = add nsw i64 %indvars.iv223, -1 %cmp75 = icmp sgt i64 %indvars.iv223, 1 br i1 %cmp75, label %for.body77, label %for.end108, !llvm.loop !43 for.body77: ; preds = %for.body77.preheader, %for.cond74 %indvars.iv223 = phi i64 [ %12, %for.body77.preheader ], [ %indvars.iv.next224, %for.cond74 ] %c.0185 = phi i32 [ %retval.0.i, %for.body77.preheader ], [ %spec.select, %for.cond74 ] %res.0184 = phi i64 [ 0, %for.body77.preheader ], [ %res.1.lcssa, %for.cond74 ] %113 = sub nuw nsw i64 %12, %indvars.iv223 %arrayidx80 = getelementptr inbounds [110 x i8], ptr %nstr, i64 0, i64 %113 %114 = load i8, ptr %arrayidx80, align 1, !tbaa !44 %conv81 = sext i8 %114 to i32 %sub82 = add nsw i32 %conv81, -48 %cmp84177 = icmp sgt i8 %114, 48 br i1 %cmp84177, label %for.body86.lr.ph, label %for.end96 for.body86.lr.ph: ; preds = %for.body77 %idxprom91 = sext i32 %c.0185 to i64 %wide.trip.count221 = zext i32 %sub82 to i64 %115 = add nsw i64 %wide.trip.count221, -1 %xtraiter394 = and i64 %wide.trip.count221, 3 %116 = icmp ult i64 %115, 3 br i1 %116, label %for.end96.loopexit.unr-lcssa, label %for.body86.lr.ph.new for.body86.lr.ph.new: ; preds = %for.body86.lr.ph %unroll_iter398 = and i64 %wide.trip.count221, 4294967292 br label %for.body86 for.body86: ; preds = %for.body86, %for.body86.lr.ph.new %indvars.iv218 = phi i64 [ 0, %for.body86.lr.ph.new ], [ %indvars.iv.next219.3, %for.body86 ] %res.1179 = phi i64 [ %res.0184, %for.body86.lr.ph.new ], [ %add93.3, %for.body86 ] %niter399 = phi i64 [ 0, %for.body86.lr.ph.new ], [ %niter399.next.3, %for.body86 ] %arrayidx92 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv223, i64 %indvars.iv218, i64 %idxprom91 %117 = load i64, ptr %arrayidx92, align 8, !tbaa !11 %add93 = add i64 %117, %res.1179 %indvars.iv.next219 = or i64 %indvars.iv218, 1 %arrayidx92.1 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv223, i64 %indvars.iv.next219, i64 %idxprom91 %118 = load i64, ptr %arrayidx92.1, align 8, !tbaa !11 %add93.1 = add i64 %118, %add93 %indvars.iv.next219.1 = or i64 %indvars.iv218, 2 %arrayidx92.2 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv223, i64 %indvars.iv.next219.1, i64 %idxprom91 %119 = load i64, ptr %arrayidx92.2, align 8, !tbaa !11 %add93.2 = add i64 %119, %add93.1 %indvars.iv.next219.2 = or i64 %indvars.iv218, 3 %arrayidx92.3 = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv223, i64 %indvars.iv.next219.2, i64 %idxprom91 %120 = load i64, ptr %arrayidx92.3, align 8, !tbaa !11 %add93.3 = add i64 %120, %add93.2 %indvars.iv.next219.3 = add nuw nsw i64 %indvars.iv218, 4 %niter399.next.3 = add i64 %niter399, 4 %niter399.ncmp.3 = icmp eq i64 %niter399.next.3, %unroll_iter398 br i1 %niter399.ncmp.3, label %for.end96.loopexit.unr-lcssa, label %for.body86, !llvm.loop !45 for.end96.loopexit.unr-lcssa: ; preds = %for.body86, %for.body86.lr.ph %add93.lcssa.ph = phi i64 [ undef, %for.body86.lr.ph ], [ %add93.3, %for.body86 ] %indvars.iv218.unr = phi i64 [ 0, %for.body86.lr.ph ], [ %indvars.iv.next219.3, %for.body86 ] %res.1179.unr = phi i64 [ %res.0184, %for.body86.lr.ph ], [ %add93.3, %for.body86 ] %lcmp.mod396.not = icmp eq i64 %xtraiter394, 0 br i1 %lcmp.mod396.not, label %for.end96, label %for.body86.epil for.body86.epil: ; preds = %for.end96.loopexit.unr-lcssa, %for.body86.epil %indvars.iv218.epil = phi i64 [ %indvars.iv.next219.epil, %for.body86.epil ], [ %indvars.iv218.unr, %for.end96.loopexit.unr-lcssa ] %res.1179.epil = phi i64 [ %add93.epil, %for.body86.epil ], [ %res.1179.unr, %for.end96.loopexit.unr-lcssa ] %epil.iter395 = phi i64 [ %epil.iter395.next, %for.body86.epil ], [ 0, %for.end96.loopexit.unr-lcssa ] %arrayidx92.epil = getelementptr inbounds [101 x [10 x [4 x i64]]], ptr @main.dp, i64 0, i64 %indvars.iv223, i64 %indvars.iv218.epil, i64 %idxprom91 %121 = load i64, ptr %arrayidx92.epil, align 8, !tbaa !11 %add93.epil = add i64 %121, %res.1179.epil %indvars.iv.next219.epil = add nuw nsw i64 %indvars.iv218.epil, 1 %epil.iter395.next = add i64 %epil.iter395, 1 %epil.iter395.cmp.not = icmp eq i64 %epil.iter395.next, %xtraiter394 br i1 %epil.iter395.cmp.not, label %for.end96, label %for.body86.epil, !llvm.loop !46 for.end96: ; preds = %for.end96.loopexit.unr-lcssa, %for.body86.epil, %for.body77 %res.1.lcssa = phi i64 [ %res.0184, %for.body77 ], [ %add93.lcssa.ph, %for.end96.loopexit.unr-lcssa ], [ %add93.epil, %for.body86.epil ] %cmp97.not = icmp ne i32 %sub82, 0 %dec = sext i1 %cmp97.not to i32 %spec.select = add nsw i32 %c.0185, %dec %cmp101 = icmp eq i32 %spec.select, 0 br i1 %cmp101, label %for.end108.split.loop.exit, label %for.cond74 for.end108.split.loop.exit: ; preds = %for.end96 %inc104.le = add i64 %res.1.lcssa, 1 br label %for.end108 for.end108: ; preds = %for.cond74, %for.cond74.preheader, %for.end108.split.loop.exit %res.3 = phi i64 [ %inc104.le, %for.end108.split.loop.exit ], [ 0, %for.cond74.preheader ], [ %res.1.lcssa, %for.cond74 ] %call109 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %res.3) call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %nstr) #6 ret i32 0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #5 attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = !{!12, !12, i64 0} !12 = !{!"long", !7, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !16} !16 = !{!"llvm.loop.unroll.disable"} !17 = distinct !{!17, !14, !18, !19} !18 = !{!"llvm.loop.isvectorized", i32 1} !19 = !{!"llvm.loop.unroll.runtime.disable"} !20 = distinct !{!20, !14, !19, !18} !21 = distinct !{!21, !14, !18, !19} !22 = distinct !{!22, !14, !19, !18} !23 = distinct !{!23, !14, !18, !19} !24 = distinct !{!24, !14, !19, !18} !25 = distinct !{!25, !14, !18, !19} !26 = distinct !{!26, !14, !19, !18} !27 = distinct !{!27, !14, !18, !19} !28 = distinct !{!28, !14, !19, !18} !29 = distinct !{!29, !14, !18, !19} !30 = distinct !{!30, !14, !19, !18} !31 = distinct !{!31, !14, !18, !19} !32 = distinct !{!32, !14, !19, !18} !33 = distinct !{!33, !14, !18, !19} !34 = distinct !{!34, !14, !19, !18} !35 = distinct !{!35, !14, !18, !19} !36 = distinct !{!36, !14, !19, !18} !37 = distinct !{!37, !14, !18, !19} !38 = distinct !{!38, !14, !19, !18} !39 = distinct !{!39, !14, !40, !18, !19} !40 = !{!"llvm.loop.peeled.count", i32 1} !41 = distinct !{!41, !14, !40, !19, !18} !42 = distinct !{!42, !14} !43 = distinct !{!43, !14} !44 = !{!7, !7, i64 0} !45 = distinct !{!45, !14} !46 = distinct !{!46, !16}
#include <stdio.h> #include <stdlib.h> long long gcd(long long a, long long b) { if (a > b) { a += b; b = a - b; a -= b; } if (b % a == 0) return a; else return gcd(b % a, a); } int main() { int i, N; long long K, A[100001]; scanf("%d %lld", &N, &K); for (i = 1; i <= N; i++) scanf("%lld", &(A[i])); long long g = A[1], max = A[1]; for (i = 2; i <= N; i++) { g = gcd(g, A[i]); if (A[i] > max) max = A[i]; } if (K <= max && K / g * g == K) printf("POSSIBLE\n"); else printf("IMPOSSIBLE\n"); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_288926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_288926/source.c" 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 [8 x i8] c"%d %lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 @str = private unnamed_addr constant [11 x i8] c"IMPOSSIBLE\00", align 1 @str.4 = private unnamed_addr constant [9 x i8] c"POSSIBLE\00", align 1 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %a.tr = phi i64 [ %a, %entry ], [ %rem, %tailrecurse ] %b.tr = phi i64 [ %b, %entry ], [ %spec.select, %tailrecurse ] %spec.select = tail call i64 @llvm.smin.i64(i64 %a.tr, i64 %b.tr) %spec.select17 = tail call i64 @llvm.smax.i64(i64 %a.tr, i64 %b.tr) %rem = srem i64 %spec.select17, %spec.select %cmp2 = icmp eq i64 %rem, 0 br i1 %cmp2, label %return, label %tailrecurse return: ; preds = %tailrecurse ret i64 %spec.select } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %N = alloca i32, align 4 %K = alloca i64, align 8 %A = alloca [100001 x i64], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #6 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %A) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %K) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp.not37 = icmp slt i32 %0, 1 br i1 %cmp.not37, label %for.end17.thread, label %for.body for.end17.thread: ; preds = %entry %1 = load i64, ptr %K, align 8, !tbaa !9 %.fr54 = freeze i64 %1 br label %land.lhs.true for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [100001 x i64], ptr %A, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %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.not.not = icmp slt i64 %indvars.iv, %3 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body %arrayidx2.phi.trans.insert = getelementptr inbounds [100001 x i64], ptr %A, i64 0, i64 1 %.pre = load i64, ptr %arrayidx2.phi.trans.insert, align 8, !tbaa !9 %cmp5.not39 = icmp slt i32 %2, 2 br i1 %cmp5.not39, label %for.end17, label %for.body6.preheader for.body6.preheader: ; preds = %for.end %4 = add nuw i32 %2, 1 %wide.trip.count = zext i32 %4 to i64 br label %for.body6 for.body6: ; preds = %for.body6.preheader, %gcd.exit %indvars.iv47 = phi i64 [ 2, %for.body6.preheader ], [ %indvars.iv.next48, %gcd.exit ] %max.042 = phi i64 [ %.pre, %for.body6.preheader ], [ %spec.select, %gcd.exit ] %g.041 = phi i64 [ %.pre, %for.body6.preheader ], [ %spec.select.i, %gcd.exit ] %arrayidx8 = getelementptr inbounds [100001 x i64], ptr %A, i64 0, i64 %indvars.iv47 %5 = load i64, ptr %arrayidx8, align 8, !tbaa !9 br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %for.body6 %a.tr.i = phi i64 [ %g.041, %for.body6 ], [ %rem.i, %tailrecurse.i ] %b.tr.i = phi i64 [ %5, %for.body6 ], [ %spec.select.i, %tailrecurse.i ] %spec.select.i = call i64 @llvm.smin.i64(i64 %a.tr.i, i64 %b.tr.i) %spec.select17.i = call i64 @llvm.smax.i64(i64 %a.tr.i, i64 %b.tr.i) %rem.i = srem i64 %spec.select17.i, %spec.select.i %cmp2.i = icmp eq i64 %rem.i, 0 br i1 %cmp2.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %spec.select = call i64 @llvm.smax.i64(i64 %5, i64 %max.042) %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1 %exitcond.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count br i1 %exitcond.not, label %for.end17, label %for.body6, !llvm.loop !13 for.end17: ; preds = %gcd.exit, %for.end %g.0.lcssa = phi i64 [ %.pre, %for.end ], [ %spec.select.i, %gcd.exit ] %max.0.lcssa = phi i64 [ %.pre, %for.end ], [ %spec.select, %gcd.exit ] %6 = load i64, ptr %K, align 8, !tbaa !9 %.fr = freeze i64 %6 %cmp18.not = icmp sgt i64 %.fr, %max.0.lcssa br i1 %cmp18.not, label %if.else, label %land.lhs.true land.lhs.true: ; preds = %for.end17.thread, %for.end17 %.fr57 = phi i64 [ %.fr54, %for.end17.thread ], [ %.fr, %for.end17 ] %g.0.lcssa56 = phi i64 [ undef, %for.end17.thread ], [ %g.0.lcssa, %for.end17 ] %7 = srem i64 %.fr57, %g.0.lcssa56 %cmp19 = icmp eq i64 %7, 0 br i1 %cmp19, label %if.end23, label %if.else if.else: ; preds = %land.lhs.true, %for.end17 br label %if.end23 if.end23: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.4, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) %8 = load ptr, ptr @stdout, align 8, !tbaa !14 %call24 = call i32 @fflush(ptr noundef %8) call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %A) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #6 ret i32 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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #3 ; 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 declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #5 attributes #0 = { nofree nosync nounwind memory(none) 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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { 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 #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !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"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = !{!15, !15, i64 0} !15 = !{!"any pointer", !7, i64 0}
#include <stdio.h> #include <string.h> #include <stdlib.h> //THE GENERATOR /* #define MAXD 55 static int a[MAXD]; static int b[MAXD]; int N, M, D; char Check () { memcpy(b,a,sizeof(a)); int i, x, y; for (i = 0; i < D; i++) { if (a[i]) { x = i / M; y = i % M; if (x > 0) b[i - M] = 1; if (x < (N-1)) b[i + M] = 1; if (y > 0) b[i - 1] = 1; if (y < (M-1)) b[i + 1] = 1; } } for (i = 0; i < D; i++) { if (!b[i]) return 0; } return 1; } int main () { for (N = 1; N <= 40; N++) { int used = 1; for (M = N; (N*M) <= 40; M++) { D = N * M; int i, j, k; while (1) { memset(a,0,sizeof(a)); for (i = D-used; i < D; i++) a[i] = 1; char flag = 0; while (1) { if (Check()) { flag = 1; break; } i = D-2; while (i >= 0) { if ((a[i] == 0) && (a[i+1] == 1)) break; i--; } if (i < 0) break; a[i] = 1; a[i+1] = 0; i = i+2; j = D-1; while (i < j) { k = a[i]; a[i] = a[j]; a[j] = k; i++; j--; } } if (flag) break; used++; } printf("if ((N == %d) && (M == %d)) printf(\"%%d\\n\",%d);\n",N,M,D-used); } } return 0; } */ //THE PROGRAM int main () { int N, M; scanf("%d %d",&N,&M); if (N > M) { int y = N; N = M; M = y; } if ((N == 1) && (M == 1)) printf("%d\n",0); if ((N == 1) && (M == 2)) printf("%d\n",1); if ((N == 1) && (M == 3)) printf("%d\n",2); if ((N == 1) && (M == 4)) printf("%d\n",2); if ((N == 1) && (M == 5)) printf("%d\n",3); if ((N == 1) && (M == 6)) printf("%d\n",4); if ((N == 1) && (M == 7)) printf("%d\n",4); if ((N == 1) && (M == 8)) printf("%d\n",5); if ((N == 1) && (M == 9)) printf("%d\n",6); if ((N == 1) && (M == 10)) printf("%d\n",6); if ((N == 1) && (M == 11)) printf("%d\n",7); if ((N == 1) && (M == 12)) printf("%d\n",8); if ((N == 1) && (M == 13)) printf("%d\n",8); if ((N == 1) && (M == 14)) printf("%d\n",9); if ((N == 1) && (M == 15)) printf("%d\n",10); if ((N == 1) && (M == 16)) printf("%d\n",10); if ((N == 1) && (M == 17)) printf("%d\n",11); if ((N == 1) && (M == 18)) printf("%d\n",12); if ((N == 1) && (M == 19)) printf("%d\n",12); if ((N == 1) && (M == 20)) printf("%d\n",13); if ((N == 1) && (M == 21)) printf("%d\n",14); if ((N == 1) && (M == 22)) printf("%d\n",14); if ((N == 1) && (M == 23)) printf("%d\n",15); if ((N == 1) && (M == 24)) printf("%d\n",16); if ((N == 1) && (M == 25)) printf("%d\n",16); if ((N == 1) && (M == 26)) printf("%d\n",17); if ((N == 1) && (M == 27)) printf("%d\n",18); if ((N == 1) && (M == 28)) printf("%d\n",18); if ((N == 1) && (M == 29)) printf("%d\n",19); if ((N == 1) && (M == 30)) printf("%d\n",20); if ((N == 1) && (M == 31)) printf("%d\n",20); if ((N == 1) && (M == 32)) printf("%d\n",21); if ((N == 1) && (M == 33)) printf("%d\n",22); if ((N == 1) && (M == 34)) printf("%d\n",22); if ((N == 1) && (M == 35)) printf("%d\n",23); if ((N == 1) && (M == 36)) printf("%d\n",24); if ((N == 1) && (M == 37)) printf("%d\n",24); if ((N == 1) && (M == 38)) printf("%d\n",25); if ((N == 1) && (M == 39)) printf("%d\n",26); if ((N == 1) && (M == 40)) printf("%d\n",26); if ((N == 2) && (M == 2)) printf("%d\n",2); if ((N == 2) && (M == 3)) printf("%d\n",4); if ((N == 2) && (M == 4)) printf("%d\n",5); if ((N == 2) && (M == 5)) printf("%d\n",7); if ((N == 2) && (M == 6)) printf("%d\n",8); if ((N == 2) && (M == 7)) printf("%d\n",10); if ((N == 2) && (M == 8)) printf("%d\n",11); if ((N == 2) && (M == 9)) printf("%d\n",13); if ((N == 2) && (M == 10)) printf("%d\n",14); if ((N == 2) && (M == 11)) printf("%d\n",16); if ((N == 2) && (M == 12)) printf("%d\n",17); if ((N == 2) && (M == 13)) printf("%d\n",19); if ((N == 2) && (M == 14)) printf("%d\n",20); if ((N == 2) && (M == 15)) printf("%d\n",22); if ((N == 2) && (M == 16)) printf("%d\n",23); if ((N == 2) && (M == 17)) printf("%d\n",25); if ((N == 2) && (M == 18)) printf("%d\n",26); if ((N == 2) && (M == 19)) printf("%d\n",28); if ((N == 2) && (M == 20)) printf("%d\n",29); if ((N == 3) && (M == 3)) printf("%d\n",6); if ((N == 3) && (M == 4)) printf("%d\n",8); if ((N == 3) && (M == 5)) printf("%d\n",11); if ((N == 3) && (M == 6)) printf("%d\n",13); if ((N == 3) && (M == 7)) printf("%d\n",15); if ((N == 3) && (M == 8)) printf("%d\n",17); if ((N == 3) && (M == 9)) printf("%d\n",20); if ((N == 3) && (M == 10)) printf("%d\n",22); if ((N == 3) && (M == 11)) printf("%d\n",24); if ((N == 3) && (M == 12)) printf("%d\n",26); if ((N == 3) && (M == 13)) printf("%d\n",29); if ((N == 4) && (M == 4)) printf("%d\n",12); if ((N == 4) && (M == 5)) printf("%d\n",14); if ((N == 4) && (M == 6)) printf("%d\n",17); if ((N == 4) && (M == 7)) printf("%d\n",21); if ((N == 4) && (M == 8)) printf("%d\n",24); if ((N == 4) && (M == 9)) printf("%d\n",26); if ((N == 4) && (M == 10)) printf("%d\n",30); if ((N == 5) && (M == 5)) printf("%d\n",18); if ((N == 5) && (M == 6)) printf("%d\n",22); if ((N == 5) && (M == 7)) printf("%d\n",26); if ((N == 5) && (M == 8)) printf("%d\n",29); if ((N == 6) && (M == 6)) printf("%d\n",26); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_28897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_28897/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %M, align 4 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %N, align 4, !tbaa !5 store i32 %0, ptr %M, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %cmp1 = icmp eq i32 %3, 1 %cmp2 = icmp eq i32 %2, 1 %or.cond = and i1 %cmp1, %cmp2 br i1 %or.cond, label %if.then3, label %if.end5 if.then3: ; preds = %if.end %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 0) %.pre = load i32, ptr %N, align 4, !tbaa !5 %.pre574 = load i32, ptr %M, align 4 br label %if.end5 if.end5: ; preds = %if.then3, %if.end %4 = phi i32 [ %.pre574, %if.then3 ], [ %2, %if.end ] %5 = phi i32 [ %.pre, %if.then3 ], [ %3, %if.end ] %cmp6 = icmp eq i32 %5, 1 %cmp8 = icmp eq i32 %4, 2 %or.cond492 = select i1 %cmp6, i1 %cmp8, i1 false br i1 %or.cond492, label %if.then9, label %if.end11 if.then9: ; preds = %if.end5 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 1) %.pre575 = load i32, ptr %N, align 4, !tbaa !5 %.pre576 = load i32, ptr %M, align 4 br label %if.end11 if.end11: ; preds = %if.then9, %if.end5 %6 = phi i32 [ %.pre576, %if.then9 ], [ %4, %if.end5 ] %7 = phi i32 [ %.pre575, %if.then9 ], [ %5, %if.end5 ] %cmp12 = icmp eq i32 %7, 1 %cmp14 = icmp eq i32 %6, 3 %or.cond493 = select i1 %cmp12, i1 %cmp14, i1 false br i1 %or.cond493, label %if.then15, label %if.end17 if.then15: ; preds = %if.end11 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2) %.pre577 = load i32, ptr %N, align 4, !tbaa !5 %.pre578 = load i32, ptr %M, align 4 br label %if.end17 if.end17: ; preds = %if.then15, %if.end11 %8 = phi i32 [ %.pre578, %if.then15 ], [ %6, %if.end11 ] %9 = phi i32 [ %.pre577, %if.then15 ], [ %7, %if.end11 ] %cmp18 = icmp eq i32 %9, 1 %cmp20 = icmp eq i32 %8, 4 %or.cond494 = select i1 %cmp18, i1 %cmp20, i1 false br i1 %or.cond494, label %if.then21, label %if.end23 if.then21: ; preds = %if.end17 %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2) %.pre579 = load i32, ptr %N, align 4, !tbaa !5 %.pre580 = load i32, ptr %M, align 4 br label %if.end23 if.end23: ; preds = %if.then21, %if.end17 %10 = phi i32 [ %.pre580, %if.then21 ], [ %8, %if.end17 ] %11 = phi i32 [ %.pre579, %if.then21 ], [ %9, %if.end17 ] %cmp24 = icmp eq i32 %11, 1 %cmp26 = icmp eq i32 %10, 5 %or.cond495 = select i1 %cmp24, i1 %cmp26, i1 false br i1 %or.cond495, label %if.then27, label %if.end29 if.then27: ; preds = %if.end23 %call28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 3) %.pre581 = load i32, ptr %N, align 4, !tbaa !5 %.pre582 = load i32, ptr %M, align 4 br label %if.end29 if.end29: ; preds = %if.then27, %if.end23 %12 = phi i32 [ %.pre582, %if.then27 ], [ %10, %if.end23 ] %13 = phi i32 [ %.pre581, %if.then27 ], [ %11, %if.end23 ] %cmp30 = icmp eq i32 %13, 1 %cmp32 = icmp eq i32 %12, 6 %or.cond496 = select i1 %cmp30, i1 %cmp32, i1 false br i1 %or.cond496, label %if.then33, label %if.end35 if.then33: ; preds = %if.end29 %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4) %.pre583 = load i32, ptr %N, align 4, !tbaa !5 %.pre584 = load i32, ptr %M, align 4 br label %if.end35 if.end35: ; preds = %if.then33, %if.end29 %14 = phi i32 [ %.pre584, %if.then33 ], [ %12, %if.end29 ] %15 = phi i32 [ %.pre583, %if.then33 ], [ %13, %if.end29 ] %cmp36 = icmp eq i32 %15, 1 %cmp38 = icmp eq i32 %14, 7 %or.cond497 = select i1 %cmp36, i1 %cmp38, i1 false br i1 %or.cond497, label %if.then39, label %if.end41 if.then39: ; preds = %if.end35 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4) %.pre585 = load i32, ptr %N, align 4, !tbaa !5 %.pre586 = load i32, ptr %M, align 4 br label %if.end41 if.end41: ; preds = %if.then39, %if.end35 %16 = phi i32 [ %.pre586, %if.then39 ], [ %14, %if.end35 ] %17 = phi i32 [ %.pre585, %if.then39 ], [ %15, %if.end35 ] %cmp42 = icmp eq i32 %17, 1 %cmp44 = icmp eq i32 %16, 8 %or.cond498 = select i1 %cmp42, i1 %cmp44, i1 false br i1 %or.cond498, label %if.then45, label %if.end47 if.then45: ; preds = %if.end41 %call46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5) %.pre587 = load i32, ptr %N, align 4, !tbaa !5 %.pre588 = load i32, ptr %M, align 4 br label %if.end47 if.end47: ; preds = %if.then45, %if.end41 %18 = phi i32 [ %.pre588, %if.then45 ], [ %16, %if.end41 ] %19 = phi i32 [ %.pre587, %if.then45 ], [ %17, %if.end41 ] %cmp48 = icmp eq i32 %19, 1 %cmp50 = icmp eq i32 %18, 9 %or.cond499 = select i1 %cmp48, i1 %cmp50, i1 false br i1 %or.cond499, label %if.then51, label %if.end53 if.then51: ; preds = %if.end47 %call52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6) %.pre589 = load i32, ptr %N, align 4, !tbaa !5 %.pre590 = load i32, ptr %M, align 4 br label %if.end53 if.end53: ; preds = %if.then51, %if.end47 %20 = phi i32 [ %.pre590, %if.then51 ], [ %18, %if.end47 ] %21 = phi i32 [ %.pre589, %if.then51 ], [ %19, %if.end47 ] %cmp54 = icmp eq i32 %21, 1 %cmp56 = icmp eq i32 %20, 10 %or.cond500 = select i1 %cmp54, i1 %cmp56, i1 false br i1 %or.cond500, label %if.then57, label %if.end59 if.then57: ; preds = %if.end53 %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6) %.pre591 = load i32, ptr %N, align 4, !tbaa !5 %.pre592 = load i32, ptr %M, align 4 br label %if.end59 if.end59: ; preds = %if.then57, %if.end53 %22 = phi i32 [ %.pre592, %if.then57 ], [ %20, %if.end53 ] %23 = phi i32 [ %.pre591, %if.then57 ], [ %21, %if.end53 ] %cmp60 = icmp eq i32 %23, 1 %cmp62 = icmp eq i32 %22, 11 %or.cond501 = select i1 %cmp60, i1 %cmp62, i1 false br i1 %or.cond501, label %if.then63, label %if.end65 if.then63: ; preds = %if.end59 %call64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7) %.pre593 = load i32, ptr %N, align 4, !tbaa !5 %.pre594 = load i32, ptr %M, align 4 br label %if.end65 if.end65: ; preds = %if.then63, %if.end59 %24 = phi i32 [ %.pre594, %if.then63 ], [ %22, %if.end59 ] %25 = phi i32 [ %.pre593, %if.then63 ], [ %23, %if.end59 ] %cmp66 = icmp eq i32 %25, 1 %cmp68 = icmp eq i32 %24, 12 %or.cond502 = select i1 %cmp66, i1 %cmp68, i1 false br i1 %or.cond502, label %if.then69, label %if.end71 if.then69: ; preds = %if.end65 %call70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8) %.pre595 = load i32, ptr %N, align 4, !tbaa !5 %.pre596 = load i32, ptr %M, align 4 br label %if.end71 if.end71: ; preds = %if.then69, %if.end65 %26 = phi i32 [ %.pre596, %if.then69 ], [ %24, %if.end65 ] %27 = phi i32 [ %.pre595, %if.then69 ], [ %25, %if.end65 ] %cmp72 = icmp eq i32 %27, 1 %cmp74 = icmp eq i32 %26, 13 %or.cond503 = select i1 %cmp72, i1 %cmp74, i1 false br i1 %or.cond503, label %if.then75, label %if.end77 if.then75: ; preds = %if.end71 %call76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8) %.pre597 = load i32, ptr %N, align 4, !tbaa !5 %.pre598 = load i32, ptr %M, align 4 br label %if.end77 if.end77: ; preds = %if.then75, %if.end71 %28 = phi i32 [ %.pre598, %if.then75 ], [ %26, %if.end71 ] %29 = phi i32 [ %.pre597, %if.then75 ], [ %27, %if.end71 ] %cmp78 = icmp eq i32 %29, 1 %cmp80 = icmp eq i32 %28, 14 %or.cond504 = select i1 %cmp78, i1 %cmp80, i1 false br i1 %or.cond504, label %if.then81, label %if.end83 if.then81: ; preds = %if.end77 %call82 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 9) %.pre599 = load i32, ptr %N, align 4, !tbaa !5 %.pre600 = load i32, ptr %M, align 4 br label %if.end83 if.end83: ; preds = %if.then81, %if.end77 %30 = phi i32 [ %.pre600, %if.then81 ], [ %28, %if.end77 ] %31 = phi i32 [ %.pre599, %if.then81 ], [ %29, %if.end77 ] %cmp84 = icmp eq i32 %31, 1 %cmp86 = icmp eq i32 %30, 15 %or.cond505 = select i1 %cmp84, i1 %cmp86, i1 false br i1 %or.cond505, label %if.then87, label %if.end89 if.then87: ; preds = %if.end83 %call88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 10) %.pre601 = load i32, ptr %N, align 4, !tbaa !5 %.pre602 = load i32, ptr %M, align 4 br label %if.end89 if.end89: ; preds = %if.then87, %if.end83 %32 = phi i32 [ %.pre602, %if.then87 ], [ %30, %if.end83 ] %33 = phi i32 [ %.pre601, %if.then87 ], [ %31, %if.end83 ] %cmp90 = icmp eq i32 %33, 1 %cmp92 = icmp eq i32 %32, 16 %or.cond506 = select i1 %cmp90, i1 %cmp92, i1 false br i1 %or.cond506, label %if.then93, label %if.end95 if.then93: ; preds = %if.end89 %call94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 10) %.pre603 = load i32, ptr %N, align 4, !tbaa !5 %.pre604 = load i32, ptr %M, align 4 br label %if.end95 if.end95: ; preds = %if.then93, %if.end89 %34 = phi i32 [ %.pre604, %if.then93 ], [ %32, %if.end89 ] %35 = phi i32 [ %.pre603, %if.then93 ], [ %33, %if.end89 ] %cmp96 = icmp eq i32 %35, 1 %cmp98 = icmp eq i32 %34, 17 %or.cond507 = select i1 %cmp96, i1 %cmp98, i1 false br i1 %or.cond507, label %if.then99, label %if.end101 if.then99: ; preds = %if.end95 %call100 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 11) %.pre605 = load i32, ptr %N, align 4, !tbaa !5 %.pre606 = load i32, ptr %M, align 4 br label %if.end101 if.end101: ; preds = %if.then99, %if.end95 %36 = phi i32 [ %.pre606, %if.then99 ], [ %34, %if.end95 ] %37 = phi i32 [ %.pre605, %if.then99 ], [ %35, %if.end95 ] %cmp102 = icmp eq i32 %37, 1 %cmp104 = icmp eq i32 %36, 18 %or.cond508 = select i1 %cmp102, i1 %cmp104, i1 false br i1 %or.cond508, label %if.then105, label %if.end107 if.then105: ; preds = %if.end101 %call106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 12) %.pre607 = load i32, ptr %N, align 4, !tbaa !5 %.pre608 = load i32, ptr %M, align 4 br label %if.end107 if.end107: ; preds = %if.then105, %if.end101 %38 = phi i32 [ %.pre608, %if.then105 ], [ %36, %if.end101 ] %39 = phi i32 [ %.pre607, %if.then105 ], [ %37, %if.end101 ] %cmp108 = icmp eq i32 %39, 1 %cmp110 = icmp eq i32 %38, 19 %or.cond509 = select i1 %cmp108, i1 %cmp110, i1 false br i1 %or.cond509, label %if.then111, label %if.end113 if.then111: ; preds = %if.end107 %call112 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 12) %.pre609 = load i32, ptr %N, align 4, !tbaa !5 %.pre610 = load i32, ptr %M, align 4 br label %if.end113 if.end113: ; preds = %if.then111, %if.end107 %40 = phi i32 [ %.pre610, %if.then111 ], [ %38, %if.end107 ] %41 = phi i32 [ %.pre609, %if.then111 ], [ %39, %if.end107 ] %cmp114 = icmp eq i32 %41, 1 %cmp116 = icmp eq i32 %40, 20 %or.cond510 = select i1 %cmp114, i1 %cmp116, i1 false br i1 %or.cond510, label %if.then117, label %if.end119 if.then117: ; preds = %if.end113 %call118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 13) %.pre611 = load i32, ptr %N, align 4, !tbaa !5 %.pre612 = load i32, ptr %M, align 4 br label %if.end119 if.end119: ; preds = %if.then117, %if.end113 %42 = phi i32 [ %.pre612, %if.then117 ], [ %40, %if.end113 ] %43 = phi i32 [ %.pre611, %if.then117 ], [ %41, %if.end113 ] %cmp120 = icmp eq i32 %43, 1 %cmp122 = icmp eq i32 %42, 21 %or.cond511 = select i1 %cmp120, i1 %cmp122, i1 false br i1 %or.cond511, label %if.then123, label %if.end125 if.then123: ; preds = %if.end119 %call124 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 14) %.pre613 = load i32, ptr %N, align 4, !tbaa !5 %.pre614 = load i32, ptr %M, align 4 br label %if.end125 if.end125: ; preds = %if.then123, %if.end119 %44 = phi i32 [ %.pre614, %if.then123 ], [ %42, %if.end119 ] %45 = phi i32 [ %.pre613, %if.then123 ], [ %43, %if.end119 ] %cmp126 = icmp eq i32 %45, 1 %cmp128 = icmp eq i32 %44, 22 %or.cond512 = select i1 %cmp126, i1 %cmp128, i1 false br i1 %or.cond512, label %if.then129, label %if.end131 if.then129: ; preds = %if.end125 %call130 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 14) %.pre615 = load i32, ptr %N, align 4, !tbaa !5 %.pre616 = load i32, ptr %M, align 4 br label %if.end131 if.end131: ; preds = %if.then129, %if.end125 %46 = phi i32 [ %.pre616, %if.then129 ], [ %44, %if.end125 ] %47 = phi i32 [ %.pre615, %if.then129 ], [ %45, %if.end125 ] %cmp132 = icmp eq i32 %47, 1 %cmp134 = icmp eq i32 %46, 23 %or.cond513 = select i1 %cmp132, i1 %cmp134, i1 false br i1 %or.cond513, label %if.then135, label %if.end137 if.then135: ; preds = %if.end131 %call136 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 15) %.pre617 = load i32, ptr %N, align 4, !tbaa !5 %.pre618 = load i32, ptr %M, align 4 br label %if.end137 if.end137: ; preds = %if.then135, %if.end131 %48 = phi i32 [ %.pre618, %if.then135 ], [ %46, %if.end131 ] %49 = phi i32 [ %.pre617, %if.then135 ], [ %47, %if.end131 ] %cmp138 = icmp eq i32 %49, 1 %cmp140 = icmp eq i32 %48, 24 %or.cond514 = select i1 %cmp138, i1 %cmp140, i1 false br i1 %or.cond514, label %if.then141, label %if.end143 if.then141: ; preds = %if.end137 %call142 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 16) %.pre619 = load i32, ptr %N, align 4, !tbaa !5 %.pre620 = load i32, ptr %M, align 4 br label %if.end143 if.end143: ; preds = %if.then141, %if.end137 %50 = phi i32 [ %.pre620, %if.then141 ], [ %48, %if.end137 ] %51 = phi i32 [ %.pre619, %if.then141 ], [ %49, %if.end137 ] %cmp144 = icmp eq i32 %51, 1 %cmp146 = icmp eq i32 %50, 25 %or.cond515 = select i1 %cmp144, i1 %cmp146, i1 false br i1 %or.cond515, label %if.then147, label %if.end149 if.then147: ; preds = %if.end143 %call148 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 16) %.pre621 = load i32, ptr %N, align 4, !tbaa !5 %.pre622 = load i32, ptr %M, align 4 br label %if.end149 if.end149: ; preds = %if.then147, %if.end143 %52 = phi i32 [ %.pre622, %if.then147 ], [ %50, %if.end143 ] %53 = phi i32 [ %.pre621, %if.then147 ], [ %51, %if.end143 ] %cmp150 = icmp eq i32 %53, 1 %cmp152 = icmp eq i32 %52, 26 %or.cond516 = select i1 %cmp150, i1 %cmp152, i1 false br i1 %or.cond516, label %if.then153, label %if.end155 if.then153: ; preds = %if.end149 %call154 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 17) %.pre623 = load i32, ptr %N, align 4, !tbaa !5 %.pre624 = load i32, ptr %M, align 4 br label %if.end155 if.end155: ; preds = %if.then153, %if.end149 %54 = phi i32 [ %.pre624, %if.then153 ], [ %52, %if.end149 ] %55 = phi i32 [ %.pre623, %if.then153 ], [ %53, %if.end149 ] %cmp156 = icmp eq i32 %55, 1 %cmp158 = icmp eq i32 %54, 27 %or.cond517 = select i1 %cmp156, i1 %cmp158, i1 false br i1 %or.cond517, label %if.then159, label %if.end161 if.then159: ; preds = %if.end155 %call160 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 18) %.pre625 = load i32, ptr %N, align 4, !tbaa !5 %.pre626 = load i32, ptr %M, align 4 br label %if.end161 if.end161: ; preds = %if.then159, %if.end155 %56 = phi i32 [ %.pre626, %if.then159 ], [ %54, %if.end155 ] %57 = phi i32 [ %.pre625, %if.then159 ], [ %55, %if.end155 ] %cmp162 = icmp eq i32 %57, 1 %cmp164 = icmp eq i32 %56, 28 %or.cond518 = select i1 %cmp162, i1 %cmp164, i1 false br i1 %or.cond518, label %if.then165, label %if.end167 if.then165: ; preds = %if.end161 %call166 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 18) %.pre627 = load i32, ptr %N, align 4, !tbaa !5 %.pre628 = load i32, ptr %M, align 4 br label %if.end167 if.end167: ; preds = %if.then165, %if.end161 %58 = phi i32 [ %.pre628, %if.then165 ], [ %56, %if.end161 ] %59 = phi i32 [ %.pre627, %if.then165 ], [ %57, %if.end161 ] %cmp168 = icmp eq i32 %59, 1 %cmp170 = icmp eq i32 %58, 29 %or.cond519 = select i1 %cmp168, i1 %cmp170, i1 false br i1 %or.cond519, label %if.then171, label %if.end173 if.then171: ; preds = %if.end167 %call172 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 19) %.pre629 = load i32, ptr %N, align 4, !tbaa !5 %.pre630 = load i32, ptr %M, align 4 br label %if.end173 if.end173: ; preds = %if.then171, %if.end167 %60 = phi i32 [ %.pre630, %if.then171 ], [ %58, %if.end167 ] %61 = phi i32 [ %.pre629, %if.then171 ], [ %59, %if.end167 ] %cmp174 = icmp eq i32 %61, 1 %cmp176 = icmp eq i32 %60, 30 %or.cond520 = select i1 %cmp174, i1 %cmp176, i1 false br i1 %or.cond520, label %if.then177, label %if.end179 if.then177: ; preds = %if.end173 %call178 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 20) %.pre631 = load i32, ptr %N, align 4, !tbaa !5 %.pre632 = load i32, ptr %M, align 4 br label %if.end179 if.end179: ; preds = %if.then177, %if.end173 %62 = phi i32 [ %.pre632, %if.then177 ], [ %60, %if.end173 ] %63 = phi i32 [ %.pre631, %if.then177 ], [ %61, %if.end173 ] %cmp180 = icmp eq i32 %63, 1 %cmp182 = icmp eq i32 %62, 31 %or.cond521 = select i1 %cmp180, i1 %cmp182, i1 false br i1 %or.cond521, label %if.then183, label %if.end185 if.then183: ; preds = %if.end179 %call184 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 20) %.pre633 = load i32, ptr %N, align 4, !tbaa !5 %.pre634 = load i32, ptr %M, align 4 br label %if.end185 if.end185: ; preds = %if.then183, %if.end179 %64 = phi i32 [ %.pre634, %if.then183 ], [ %62, %if.end179 ] %65 = phi i32 [ %.pre633, %if.then183 ], [ %63, %if.end179 ] %cmp186 = icmp eq i32 %65, 1 %cmp188 = icmp eq i32 %64, 32 %or.cond522 = select i1 %cmp186, i1 %cmp188, i1 false br i1 %or.cond522, label %if.then189, label %if.end191 if.then189: ; preds = %if.end185 %call190 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 21) %.pre635 = load i32, ptr %N, align 4, !tbaa !5 %.pre636 = load i32, ptr %M, align 4 br label %if.end191 if.end191: ; preds = %if.then189, %if.end185 %66 = phi i32 [ %.pre636, %if.then189 ], [ %64, %if.end185 ] %67 = phi i32 [ %.pre635, %if.then189 ], [ %65, %if.end185 ] %cmp192 = icmp eq i32 %67, 1 %cmp194 = icmp eq i32 %66, 33 %or.cond523 = select i1 %cmp192, i1 %cmp194, i1 false br i1 %or.cond523, label %if.then195, label %if.end197 if.then195: ; preds = %if.end191 %call196 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 22) %.pre637 = load i32, ptr %N, align 4, !tbaa !5 %.pre638 = load i32, ptr %M, align 4 br label %if.end197 if.end197: ; preds = %if.then195, %if.end191 %68 = phi i32 [ %.pre638, %if.then195 ], [ %66, %if.end191 ] %69 = phi i32 [ %.pre637, %if.then195 ], [ %67, %if.end191 ] %cmp198 = icmp eq i32 %69, 1 %cmp200 = icmp eq i32 %68, 34 %or.cond524 = select i1 %cmp198, i1 %cmp200, i1 false br i1 %or.cond524, label %if.then201, label %if.end203 if.then201: ; preds = %if.end197 %call202 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 22) %.pre639 = load i32, ptr %N, align 4, !tbaa !5 %.pre640 = load i32, ptr %M, align 4 br label %if.end203 if.end203: ; preds = %if.then201, %if.end197 %70 = phi i32 [ %.pre640, %if.then201 ], [ %68, %if.end197 ] %71 = phi i32 [ %.pre639, %if.then201 ], [ %69, %if.end197 ] %cmp204 = icmp eq i32 %71, 1 %cmp206 = icmp eq i32 %70, 35 %or.cond525 = select i1 %cmp204, i1 %cmp206, i1 false br i1 %or.cond525, label %if.then207, label %if.end209 if.then207: ; preds = %if.end203 %call208 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 23) %.pre641 = load i32, ptr %N, align 4, !tbaa !5 %.pre642 = load i32, ptr %M, align 4 br label %if.end209 if.end209: ; preds = %if.then207, %if.end203 %72 = phi i32 [ %.pre642, %if.then207 ], [ %70, %if.end203 ] %73 = phi i32 [ %.pre641, %if.then207 ], [ %71, %if.end203 ] %cmp210 = icmp eq i32 %73, 1 %cmp212 = icmp eq i32 %72, 36 %or.cond526 = select i1 %cmp210, i1 %cmp212, i1 false br i1 %or.cond526, label %if.then213, label %if.end215 if.then213: ; preds = %if.end209 %call214 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 24) %.pre643 = load i32, ptr %N, align 4, !tbaa !5 %.pre644 = load i32, ptr %M, align 4 br label %if.end215 if.end215: ; preds = %if.then213, %if.end209 %74 = phi i32 [ %.pre644, %if.then213 ], [ %72, %if.end209 ] %75 = phi i32 [ %.pre643, %if.then213 ], [ %73, %if.end209 ] %cmp216 = icmp eq i32 %75, 1 %cmp218 = icmp eq i32 %74, 37 %or.cond527 = select i1 %cmp216, i1 %cmp218, i1 false br i1 %or.cond527, label %if.then219, label %if.end221 if.then219: ; preds = %if.end215 %call220 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 24) %.pre645 = load i32, ptr %N, align 4, !tbaa !5 %.pre646 = load i32, ptr %M, align 4 br label %if.end221 if.end221: ; preds = %if.then219, %if.end215 %76 = phi i32 [ %.pre646, %if.then219 ], [ %74, %if.end215 ] %77 = phi i32 [ %.pre645, %if.then219 ], [ %75, %if.end215 ] %cmp222 = icmp eq i32 %77, 1 %cmp224 = icmp eq i32 %76, 38 %or.cond528 = select i1 %cmp222, i1 %cmp224, i1 false br i1 %or.cond528, label %if.then225, label %if.end227 if.then225: ; preds = %if.end221 %call226 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 25) %.pre647 = load i32, ptr %N, align 4, !tbaa !5 %.pre648 = load i32, ptr %M, align 4 br label %if.end227 if.end227: ; preds = %if.then225, %if.end221 %78 = phi i32 [ %.pre648, %if.then225 ], [ %76, %if.end221 ] %79 = phi i32 [ %.pre647, %if.then225 ], [ %77, %if.end221 ] %cmp228 = icmp eq i32 %79, 1 %cmp230 = icmp eq i32 %78, 39 %or.cond529 = select i1 %cmp228, i1 %cmp230, i1 false br i1 %or.cond529, label %if.then231, label %if.end233 if.then231: ; preds = %if.end227 %call232 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre649 = load i32, ptr %N, align 4, !tbaa !5 %.pre650 = load i32, ptr %M, align 4 br label %if.end233 if.end233: ; preds = %if.then231, %if.end227 %80 = phi i32 [ %.pre650, %if.then231 ], [ %78, %if.end227 ] %81 = phi i32 [ %.pre649, %if.then231 ], [ %79, %if.end227 ] %cmp234 = icmp eq i32 %81, 1 %cmp236 = icmp eq i32 %80, 40 %or.cond530 = select i1 %cmp234, i1 %cmp236, i1 false br i1 %or.cond530, label %if.then237, label %if.end239 if.then237: ; preds = %if.end233 %call238 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre651 = load i32, ptr %N, align 4, !tbaa !5 %.pre652 = load i32, ptr %M, align 4 br label %if.end239 if.end239: ; preds = %if.then237, %if.end233 %82 = phi i32 [ %.pre652, %if.then237 ], [ %80, %if.end233 ] %83 = phi i32 [ %.pre651, %if.then237 ], [ %81, %if.end233 ] %cmp240 = icmp eq i32 %83, 2 %cmp242 = icmp eq i32 %82, 2 %or.cond531 = select i1 %cmp240, i1 %cmp242, i1 false br i1 %or.cond531, label %if.then243, label %if.end245 if.then243: ; preds = %if.end239 %call244 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2) %.pre653 = load i32, ptr %N, align 4, !tbaa !5 %.pre654 = load i32, ptr %M, align 4 br label %if.end245 if.end245: ; preds = %if.then243, %if.end239 %84 = phi i32 [ %.pre654, %if.then243 ], [ %82, %if.end239 ] %85 = phi i32 [ %.pre653, %if.then243 ], [ %83, %if.end239 ] %cmp246 = icmp eq i32 %85, 2 %cmp248 = icmp eq i32 %84, 3 %or.cond532 = select i1 %cmp246, i1 %cmp248, i1 false br i1 %or.cond532, label %if.then249, label %if.end251 if.then249: ; preds = %if.end245 %call250 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 4) %.pre655 = load i32, ptr %N, align 4, !tbaa !5 %.pre656 = load i32, ptr %M, align 4 br label %if.end251 if.end251: ; preds = %if.then249, %if.end245 %86 = phi i32 [ %.pre656, %if.then249 ], [ %84, %if.end245 ] %87 = phi i32 [ %.pre655, %if.then249 ], [ %85, %if.end245 ] %cmp252 = icmp eq i32 %87, 2 %cmp254 = icmp eq i32 %86, 4 %or.cond533 = select i1 %cmp252, i1 %cmp254, i1 false br i1 %or.cond533, label %if.then255, label %if.end257 if.then255: ; preds = %if.end251 %call256 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 5) %.pre657 = load i32, ptr %N, align 4, !tbaa !5 %.pre658 = load i32, ptr %M, align 4 br label %if.end257 if.end257: ; preds = %if.then255, %if.end251 %88 = phi i32 [ %.pre658, %if.then255 ], [ %86, %if.end251 ] %89 = phi i32 [ %.pre657, %if.then255 ], [ %87, %if.end251 ] %cmp258 = icmp eq i32 %89, 2 %cmp260 = icmp eq i32 %88, 5 %or.cond534 = select i1 %cmp258, i1 %cmp260, i1 false br i1 %or.cond534, label %if.then261, label %if.end263 if.then261: ; preds = %if.end257 %call262 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 7) %.pre659 = load i32, ptr %N, align 4, !tbaa !5 %.pre660 = load i32, ptr %M, align 4 br label %if.end263 if.end263: ; preds = %if.then261, %if.end257 %90 = phi i32 [ %.pre660, %if.then261 ], [ %88, %if.end257 ] %91 = phi i32 [ %.pre659, %if.then261 ], [ %89, %if.end257 ] %cmp264 = icmp eq i32 %91, 2 %cmp266 = icmp eq i32 %90, 6 %or.cond535 = select i1 %cmp264, i1 %cmp266, i1 false br i1 %or.cond535, label %if.then267, label %if.end269 if.then267: ; preds = %if.end263 %call268 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8) %.pre661 = load i32, ptr %N, align 4, !tbaa !5 %.pre662 = load i32, ptr %M, align 4 br label %if.end269 if.end269: ; preds = %if.then267, %if.end263 %92 = phi i32 [ %.pre662, %if.then267 ], [ %90, %if.end263 ] %93 = phi i32 [ %.pre661, %if.then267 ], [ %91, %if.end263 ] %cmp270 = icmp eq i32 %93, 2 %cmp272 = icmp eq i32 %92, 7 %or.cond536 = select i1 %cmp270, i1 %cmp272, i1 false br i1 %or.cond536, label %if.then273, label %if.end275 if.then273: ; preds = %if.end269 %call274 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 10) %.pre663 = load i32, ptr %N, align 4, !tbaa !5 %.pre664 = load i32, ptr %M, align 4 br label %if.end275 if.end275: ; preds = %if.then273, %if.end269 %94 = phi i32 [ %.pre664, %if.then273 ], [ %92, %if.end269 ] %95 = phi i32 [ %.pre663, %if.then273 ], [ %93, %if.end269 ] %cmp276 = icmp eq i32 %95, 2 %cmp278 = icmp eq i32 %94, 8 %or.cond537 = select i1 %cmp276, i1 %cmp278, i1 false br i1 %or.cond537, label %if.then279, label %if.end281 if.then279: ; preds = %if.end275 %call280 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 11) %.pre665 = load i32, ptr %N, align 4, !tbaa !5 %.pre666 = load i32, ptr %M, align 4 br label %if.end281 if.end281: ; preds = %if.then279, %if.end275 %96 = phi i32 [ %.pre666, %if.then279 ], [ %94, %if.end275 ] %97 = phi i32 [ %.pre665, %if.then279 ], [ %95, %if.end275 ] %cmp282 = icmp eq i32 %97, 2 %cmp284 = icmp eq i32 %96, 9 %or.cond538 = select i1 %cmp282, i1 %cmp284, i1 false br i1 %or.cond538, label %if.then285, label %if.end287 if.then285: ; preds = %if.end281 %call286 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 13) %.pre667 = load i32, ptr %N, align 4, !tbaa !5 %.pre668 = load i32, ptr %M, align 4 br label %if.end287 if.end287: ; preds = %if.then285, %if.end281 %98 = phi i32 [ %.pre668, %if.then285 ], [ %96, %if.end281 ] %99 = phi i32 [ %.pre667, %if.then285 ], [ %97, %if.end281 ] %cmp288 = icmp eq i32 %99, 2 %cmp290 = icmp eq i32 %98, 10 %or.cond539 = select i1 %cmp288, i1 %cmp290, i1 false br i1 %or.cond539, label %if.then291, label %if.end293 if.then291: ; preds = %if.end287 %call292 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 14) %.pre669 = load i32, ptr %N, align 4, !tbaa !5 %.pre670 = load i32, ptr %M, align 4 br label %if.end293 if.end293: ; preds = %if.then291, %if.end287 %100 = phi i32 [ %.pre670, %if.then291 ], [ %98, %if.end287 ] %101 = phi i32 [ %.pre669, %if.then291 ], [ %99, %if.end287 ] %cmp294 = icmp eq i32 %101, 2 %cmp296 = icmp eq i32 %100, 11 %or.cond540 = select i1 %cmp294, i1 %cmp296, i1 false br i1 %or.cond540, label %if.then297, label %if.end299 if.then297: ; preds = %if.end293 %call298 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 16) %.pre671 = load i32, ptr %N, align 4, !tbaa !5 %.pre672 = load i32, ptr %M, align 4 br label %if.end299 if.end299: ; preds = %if.then297, %if.end293 %102 = phi i32 [ %.pre672, %if.then297 ], [ %100, %if.end293 ] %103 = phi i32 [ %.pre671, %if.then297 ], [ %101, %if.end293 ] %cmp300 = icmp eq i32 %103, 2 %cmp302 = icmp eq i32 %102, 12 %or.cond541 = select i1 %cmp300, i1 %cmp302, i1 false br i1 %or.cond541, label %if.then303, label %if.end305 if.then303: ; preds = %if.end299 %call304 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 17) %.pre673 = load i32, ptr %N, align 4, !tbaa !5 %.pre674 = load i32, ptr %M, align 4 br label %if.end305 if.end305: ; preds = %if.then303, %if.end299 %104 = phi i32 [ %.pre674, %if.then303 ], [ %102, %if.end299 ] %105 = phi i32 [ %.pre673, %if.then303 ], [ %103, %if.end299 ] %cmp306 = icmp eq i32 %105, 2 %cmp308 = icmp eq i32 %104, 13 %or.cond542 = select i1 %cmp306, i1 %cmp308, i1 false br i1 %or.cond542, label %if.then309, label %if.end311 if.then309: ; preds = %if.end305 %call310 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 19) %.pre675 = load i32, ptr %N, align 4, !tbaa !5 %.pre676 = load i32, ptr %M, align 4 br label %if.end311 if.end311: ; preds = %if.then309, %if.end305 %106 = phi i32 [ %.pre676, %if.then309 ], [ %104, %if.end305 ] %107 = phi i32 [ %.pre675, %if.then309 ], [ %105, %if.end305 ] %cmp312 = icmp eq i32 %107, 2 %cmp314 = icmp eq i32 %106, 14 %or.cond543 = select i1 %cmp312, i1 %cmp314, i1 false br i1 %or.cond543, label %if.then315, label %if.end317 if.then315: ; preds = %if.end311 %call316 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 20) %.pre677 = load i32, ptr %N, align 4, !tbaa !5 %.pre678 = load i32, ptr %M, align 4 br label %if.end317 if.end317: ; preds = %if.then315, %if.end311 %108 = phi i32 [ %.pre678, %if.then315 ], [ %106, %if.end311 ] %109 = phi i32 [ %.pre677, %if.then315 ], [ %107, %if.end311 ] %cmp318 = icmp eq i32 %109, 2 %cmp320 = icmp eq i32 %108, 15 %or.cond544 = select i1 %cmp318, i1 %cmp320, i1 false br i1 %or.cond544, label %if.then321, label %if.end323 if.then321: ; preds = %if.end317 %call322 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 22) %.pre679 = load i32, ptr %N, align 4, !tbaa !5 %.pre680 = load i32, ptr %M, align 4 br label %if.end323 if.end323: ; preds = %if.then321, %if.end317 %110 = phi i32 [ %.pre680, %if.then321 ], [ %108, %if.end317 ] %111 = phi i32 [ %.pre679, %if.then321 ], [ %109, %if.end317 ] %cmp324 = icmp eq i32 %111, 2 %cmp326 = icmp eq i32 %110, 16 %or.cond545 = select i1 %cmp324, i1 %cmp326, i1 false br i1 %or.cond545, label %if.then327, label %if.end329 if.then327: ; preds = %if.end323 %call328 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 23) %.pre681 = load i32, ptr %N, align 4, !tbaa !5 %.pre682 = load i32, ptr %M, align 4 br label %if.end329 if.end329: ; preds = %if.then327, %if.end323 %112 = phi i32 [ %.pre682, %if.then327 ], [ %110, %if.end323 ] %113 = phi i32 [ %.pre681, %if.then327 ], [ %111, %if.end323 ] %cmp330 = icmp eq i32 %113, 2 %cmp332 = icmp eq i32 %112, 17 %or.cond546 = select i1 %cmp330, i1 %cmp332, i1 false br i1 %or.cond546, label %if.then333, label %if.end335 if.then333: ; preds = %if.end329 %call334 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 25) %.pre683 = load i32, ptr %N, align 4, !tbaa !5 %.pre684 = load i32, ptr %M, align 4 br label %if.end335 if.end335: ; preds = %if.then333, %if.end329 %114 = phi i32 [ %.pre684, %if.then333 ], [ %112, %if.end329 ] %115 = phi i32 [ %.pre683, %if.then333 ], [ %113, %if.end329 ] %cmp336 = icmp eq i32 %115, 2 %cmp338 = icmp eq i32 %114, 18 %or.cond547 = select i1 %cmp336, i1 %cmp338, i1 false br i1 %or.cond547, label %if.then339, label %if.end341 if.then339: ; preds = %if.end335 %call340 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre685 = load i32, ptr %N, align 4, !tbaa !5 %.pre686 = load i32, ptr %M, align 4 br label %if.end341 if.end341: ; preds = %if.then339, %if.end335 %116 = phi i32 [ %.pre686, %if.then339 ], [ %114, %if.end335 ] %117 = phi i32 [ %.pre685, %if.then339 ], [ %115, %if.end335 ] %cmp342 = icmp eq i32 %117, 2 %cmp344 = icmp eq i32 %116, 19 %or.cond548 = select i1 %cmp342, i1 %cmp344, i1 false br i1 %or.cond548, label %if.then345, label %if.end347 if.then345: ; preds = %if.end341 %call346 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 28) %.pre687 = load i32, ptr %N, align 4, !tbaa !5 %.pre688 = load i32, ptr %M, align 4 br label %if.end347 if.end347: ; preds = %if.then345, %if.end341 %118 = phi i32 [ %.pre688, %if.then345 ], [ %116, %if.end341 ] %119 = phi i32 [ %.pre687, %if.then345 ], [ %117, %if.end341 ] %cmp348 = icmp eq i32 %119, 2 %cmp350 = icmp eq i32 %118, 20 %or.cond549 = select i1 %cmp348, i1 %cmp350, i1 false br i1 %or.cond549, label %if.then351, label %if.end353 if.then351: ; preds = %if.end347 %call352 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 29) %.pre689 = load i32, ptr %N, align 4, !tbaa !5 %.pre690 = load i32, ptr %M, align 4 br label %if.end353 if.end353: ; preds = %if.then351, %if.end347 %120 = phi i32 [ %.pre690, %if.then351 ], [ %118, %if.end347 ] %121 = phi i32 [ %.pre689, %if.then351 ], [ %119, %if.end347 ] %cmp354 = icmp eq i32 %121, 3 %cmp356 = icmp eq i32 %120, 3 %or.cond550 = select i1 %cmp354, i1 %cmp356, i1 false br i1 %or.cond550, label %if.then357, label %if.end359 if.then357: ; preds = %if.end353 %call358 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 6) %.pre691 = load i32, ptr %N, align 4, !tbaa !5 %.pre692 = load i32, ptr %M, align 4 br label %if.end359 if.end359: ; preds = %if.then357, %if.end353 %122 = phi i32 [ %.pre692, %if.then357 ], [ %120, %if.end353 ] %123 = phi i32 [ %.pre691, %if.then357 ], [ %121, %if.end353 ] %cmp360 = icmp eq i32 %123, 3 %cmp362 = icmp eq i32 %122, 4 %or.cond551 = select i1 %cmp360, i1 %cmp362, i1 false br i1 %or.cond551, label %if.then363, label %if.end365 if.then363: ; preds = %if.end359 %call364 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 8) %.pre693 = load i32, ptr %N, align 4, !tbaa !5 %.pre694 = load i32, ptr %M, align 4 br label %if.end365 if.end365: ; preds = %if.then363, %if.end359 %124 = phi i32 [ %.pre694, %if.then363 ], [ %122, %if.end359 ] %125 = phi i32 [ %.pre693, %if.then363 ], [ %123, %if.end359 ] %cmp366 = icmp eq i32 %125, 3 %cmp368 = icmp eq i32 %124, 5 %or.cond552 = select i1 %cmp366, i1 %cmp368, i1 false br i1 %or.cond552, label %if.then369, label %if.end371 if.then369: ; preds = %if.end365 %call370 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 11) %.pre695 = load i32, ptr %N, align 4, !tbaa !5 %.pre696 = load i32, ptr %M, align 4 br label %if.end371 if.end371: ; preds = %if.then369, %if.end365 %126 = phi i32 [ %.pre696, %if.then369 ], [ %124, %if.end365 ] %127 = phi i32 [ %.pre695, %if.then369 ], [ %125, %if.end365 ] %cmp372 = icmp eq i32 %127, 3 %cmp374 = icmp eq i32 %126, 6 %or.cond553 = select i1 %cmp372, i1 %cmp374, i1 false br i1 %or.cond553, label %if.then375, label %if.end377 if.then375: ; preds = %if.end371 %call376 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 13) %.pre697 = load i32, ptr %N, align 4, !tbaa !5 %.pre698 = load i32, ptr %M, align 4 br label %if.end377 if.end377: ; preds = %if.then375, %if.end371 %128 = phi i32 [ %.pre698, %if.then375 ], [ %126, %if.end371 ] %129 = phi i32 [ %.pre697, %if.then375 ], [ %127, %if.end371 ] %cmp378 = icmp eq i32 %129, 3 %cmp380 = icmp eq i32 %128, 7 %or.cond554 = select i1 %cmp378, i1 %cmp380, i1 false br i1 %or.cond554, label %if.then381, label %if.end383 if.then381: ; preds = %if.end377 %call382 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 15) %.pre699 = load i32, ptr %N, align 4, !tbaa !5 %.pre700 = load i32, ptr %M, align 4 br label %if.end383 if.end383: ; preds = %if.then381, %if.end377 %130 = phi i32 [ %.pre700, %if.then381 ], [ %128, %if.end377 ] %131 = phi i32 [ %.pre699, %if.then381 ], [ %129, %if.end377 ] %cmp384 = icmp eq i32 %131, 3 %cmp386 = icmp eq i32 %130, 8 %or.cond555 = select i1 %cmp384, i1 %cmp386, i1 false br i1 %or.cond555, label %if.then387, label %if.end389 if.then387: ; preds = %if.end383 %call388 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 17) %.pre701 = load i32, ptr %N, align 4, !tbaa !5 %.pre702 = load i32, ptr %M, align 4 br label %if.end389 if.end389: ; preds = %if.then387, %if.end383 %132 = phi i32 [ %.pre702, %if.then387 ], [ %130, %if.end383 ] %133 = phi i32 [ %.pre701, %if.then387 ], [ %131, %if.end383 ] %cmp390 = icmp eq i32 %133, 3 %cmp392 = icmp eq i32 %132, 9 %or.cond556 = select i1 %cmp390, i1 %cmp392, i1 false br i1 %or.cond556, label %if.then393, label %if.end395 if.then393: ; preds = %if.end389 %call394 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 20) %.pre703 = load i32, ptr %N, align 4, !tbaa !5 %.pre704 = load i32, ptr %M, align 4 br label %if.end395 if.end395: ; preds = %if.then393, %if.end389 %134 = phi i32 [ %.pre704, %if.then393 ], [ %132, %if.end389 ] %135 = phi i32 [ %.pre703, %if.then393 ], [ %133, %if.end389 ] %cmp396 = icmp eq i32 %135, 3 %cmp398 = icmp eq i32 %134, 10 %or.cond557 = select i1 %cmp396, i1 %cmp398, i1 false br i1 %or.cond557, label %if.then399, label %if.end401 if.then399: ; preds = %if.end395 %call400 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 22) %.pre705 = load i32, ptr %N, align 4, !tbaa !5 %.pre706 = load i32, ptr %M, align 4 br label %if.end401 if.end401: ; preds = %if.then399, %if.end395 %136 = phi i32 [ %.pre706, %if.then399 ], [ %134, %if.end395 ] %137 = phi i32 [ %.pre705, %if.then399 ], [ %135, %if.end395 ] %cmp402 = icmp eq i32 %137, 3 %cmp404 = icmp eq i32 %136, 11 %or.cond558 = select i1 %cmp402, i1 %cmp404, i1 false br i1 %or.cond558, label %if.then405, label %if.end407 if.then405: ; preds = %if.end401 %call406 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 24) %.pre707 = load i32, ptr %N, align 4, !tbaa !5 %.pre708 = load i32, ptr %M, align 4 br label %if.end407 if.end407: ; preds = %if.then405, %if.end401 %138 = phi i32 [ %.pre708, %if.then405 ], [ %136, %if.end401 ] %139 = phi i32 [ %.pre707, %if.then405 ], [ %137, %if.end401 ] %cmp408 = icmp eq i32 %139, 3 %cmp410 = icmp eq i32 %138, 12 %or.cond559 = select i1 %cmp408, i1 %cmp410, i1 false br i1 %or.cond559, label %if.then411, label %if.end413 if.then411: ; preds = %if.end407 %call412 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre709 = load i32, ptr %N, align 4, !tbaa !5 %.pre710 = load i32, ptr %M, align 4 br label %if.end413 if.end413: ; preds = %if.then411, %if.end407 %140 = phi i32 [ %.pre710, %if.then411 ], [ %138, %if.end407 ] %141 = phi i32 [ %.pre709, %if.then411 ], [ %139, %if.end407 ] %cmp414 = icmp eq i32 %141, 3 %cmp416 = icmp eq i32 %140, 13 %or.cond560 = select i1 %cmp414, i1 %cmp416, i1 false br i1 %or.cond560, label %if.then417, label %if.end419 if.then417: ; preds = %if.end413 %call418 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 29) %.pre711 = load i32, ptr %N, align 4, !tbaa !5 %.pre712 = load i32, ptr %M, align 4 br label %if.end419 if.end419: ; preds = %if.then417, %if.end413 %142 = phi i32 [ %.pre712, %if.then417 ], [ %140, %if.end413 ] %143 = phi i32 [ %.pre711, %if.then417 ], [ %141, %if.end413 ] %cmp420 = icmp eq i32 %143, 4 %cmp422 = icmp eq i32 %142, 4 %or.cond561 = select i1 %cmp420, i1 %cmp422, i1 false br i1 %or.cond561, label %if.then423, label %if.end425 if.then423: ; preds = %if.end419 %call424 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 12) %.pre713 = load i32, ptr %N, align 4, !tbaa !5 %.pre714 = load i32, ptr %M, align 4 br label %if.end425 if.end425: ; preds = %if.then423, %if.end419 %144 = phi i32 [ %.pre714, %if.then423 ], [ %142, %if.end419 ] %145 = phi i32 [ %.pre713, %if.then423 ], [ %143, %if.end419 ] %cmp426 = icmp eq i32 %145, 4 %cmp428 = icmp eq i32 %144, 5 %or.cond562 = select i1 %cmp426, i1 %cmp428, i1 false br i1 %or.cond562, label %if.then429, label %if.end431 if.then429: ; preds = %if.end425 %call430 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 14) %.pre715 = load i32, ptr %N, align 4, !tbaa !5 %.pre716 = load i32, ptr %M, align 4 br label %if.end431 if.end431: ; preds = %if.then429, %if.end425 %146 = phi i32 [ %.pre716, %if.then429 ], [ %144, %if.end425 ] %147 = phi i32 [ %.pre715, %if.then429 ], [ %145, %if.end425 ] %cmp432 = icmp eq i32 %147, 4 %cmp434 = icmp eq i32 %146, 6 %or.cond563 = select i1 %cmp432, i1 %cmp434, i1 false br i1 %or.cond563, label %if.then435, label %if.end437 if.then435: ; preds = %if.end431 %call436 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 17) %.pre717 = load i32, ptr %N, align 4, !tbaa !5 %.pre718 = load i32, ptr %M, align 4 br label %if.end437 if.end437: ; preds = %if.then435, %if.end431 %148 = phi i32 [ %.pre718, %if.then435 ], [ %146, %if.end431 ] %149 = phi i32 [ %.pre717, %if.then435 ], [ %147, %if.end431 ] %cmp438 = icmp eq i32 %149, 4 %cmp440 = icmp eq i32 %148, 7 %or.cond564 = select i1 %cmp438, i1 %cmp440, i1 false br i1 %or.cond564, label %if.then441, label %if.end443 if.then441: ; preds = %if.end437 %call442 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 21) %.pre719 = load i32, ptr %N, align 4, !tbaa !5 %.pre720 = load i32, ptr %M, align 4 br label %if.end443 if.end443: ; preds = %if.then441, %if.end437 %150 = phi i32 [ %.pre720, %if.then441 ], [ %148, %if.end437 ] %151 = phi i32 [ %.pre719, %if.then441 ], [ %149, %if.end437 ] %cmp444 = icmp eq i32 %151, 4 %cmp446 = icmp eq i32 %150, 8 %or.cond565 = select i1 %cmp444, i1 %cmp446, i1 false br i1 %or.cond565, label %if.then447, label %if.end449 if.then447: ; preds = %if.end443 %call448 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 24) %.pre721 = load i32, ptr %N, align 4, !tbaa !5 %.pre722 = load i32, ptr %M, align 4 br label %if.end449 if.end449: ; preds = %if.then447, %if.end443 %152 = phi i32 [ %.pre722, %if.then447 ], [ %150, %if.end443 ] %153 = phi i32 [ %.pre721, %if.then447 ], [ %151, %if.end443 ] %cmp450 = icmp eq i32 %153, 4 %cmp452 = icmp eq i32 %152, 9 %or.cond566 = select i1 %cmp450, i1 %cmp452, i1 false br i1 %or.cond566, label %if.then453, label %if.end455 if.then453: ; preds = %if.end449 %call454 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre723 = load i32, ptr %N, align 4, !tbaa !5 %.pre724 = load i32, ptr %M, align 4 br label %if.end455 if.end455: ; preds = %if.then453, %if.end449 %154 = phi i32 [ %.pre724, %if.then453 ], [ %152, %if.end449 ] %155 = phi i32 [ %.pre723, %if.then453 ], [ %153, %if.end449 ] %cmp456 = icmp eq i32 %155, 4 %cmp458 = icmp eq i32 %154, 10 %or.cond567 = select i1 %cmp456, i1 %cmp458, i1 false br i1 %or.cond567, label %if.then459, label %if.end461 if.then459: ; preds = %if.end455 %call460 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 30) %.pre725 = load i32, ptr %N, align 4, !tbaa !5 %.pre726 = load i32, ptr %M, align 4 br label %if.end461 if.end461: ; preds = %if.then459, %if.end455 %156 = phi i32 [ %.pre726, %if.then459 ], [ %154, %if.end455 ] %157 = phi i32 [ %.pre725, %if.then459 ], [ %155, %if.end455 ] %cmp462 = icmp eq i32 %157, 5 %cmp464 = icmp eq i32 %156, 5 %or.cond568 = select i1 %cmp462, i1 %cmp464, i1 false br i1 %or.cond568, label %if.then465, label %if.end467 if.then465: ; preds = %if.end461 %call466 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 18) %.pre727 = load i32, ptr %N, align 4, !tbaa !5 %.pre728 = load i32, ptr %M, align 4 br label %if.end467 if.end467: ; preds = %if.then465, %if.end461 %158 = phi i32 [ %.pre728, %if.then465 ], [ %156, %if.end461 ] %159 = phi i32 [ %.pre727, %if.then465 ], [ %157, %if.end461 ] %cmp468 = icmp eq i32 %159, 5 %cmp470 = icmp eq i32 %158, 6 %or.cond569 = select i1 %cmp468, i1 %cmp470, i1 false br i1 %or.cond569, label %if.then471, label %if.end473 if.then471: ; preds = %if.end467 %call472 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 22) %.pre729 = load i32, ptr %N, align 4, !tbaa !5 %.pre730 = load i32, ptr %M, align 4 br label %if.end473 if.end473: ; preds = %if.then471, %if.end467 %160 = phi i32 [ %.pre730, %if.then471 ], [ %158, %if.end467 ] %161 = phi i32 [ %.pre729, %if.then471 ], [ %159, %if.end467 ] %cmp474 = icmp eq i32 %161, 5 %cmp476 = icmp eq i32 %160, 7 %or.cond570 = select i1 %cmp474, i1 %cmp476, i1 false br i1 %or.cond570, label %if.then477, label %if.end479 if.then477: ; preds = %if.end473 %call478 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) %.pre731 = load i32, ptr %N, align 4, !tbaa !5 %.pre732 = load i32, ptr %M, align 4 br label %if.end479 if.end479: ; preds = %if.then477, %if.end473 %162 = phi i32 [ %.pre732, %if.then477 ], [ %160, %if.end473 ] %163 = phi i32 [ %.pre731, %if.then477 ], [ %161, %if.end473 ] %cmp480 = icmp eq i32 %163, 5 %cmp482 = icmp eq i32 %162, 8 %or.cond571 = select i1 %cmp480, i1 %cmp482, i1 false br i1 %or.cond571, label %if.then483, label %if.end485 if.then483: ; preds = %if.end479 %call484 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 29) %.pre733 = load i32, ptr %N, align 4, !tbaa !5 %.pre734 = load i32, ptr %M, align 4 br label %if.end485 if.end485: ; preds = %if.then483, %if.end479 %164 = phi i32 [ %.pre734, %if.then483 ], [ %162, %if.end479 ] %165 = phi i32 [ %.pre733, %if.then483 ], [ %163, %if.end479 ] %cmp486 = icmp eq i32 %165, 6 %cmp488 = icmp eq i32 %164, 6 %or.cond572 = select i1 %cmp486, i1 %cmp488, i1 false br i1 %or.cond572, label %if.then489, label %if.end491 if.then489: ; preds = %if.end485 %call490 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 26) br label %if.end491 if.end491: ; preds = %if.then489, %if.end485 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"}
#include <stdio.h> int main() { int h,w,x,i,j,minx,mini,minj; while(scanf("%d%d",&h,&w),h){ x = h*h +w*w; minx=100000000; for( i=1;i<100;i++){ for(j=1;;j++){ if(i>=j)continue; if((i*i+j*j > x) || (i*i+j*j==x && i>h )){ if(minx > i*i +j*j){ minx=i*i+j*j; mini=i; minj=j; } break; } } } printf("%d %d\n",mini,minj); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289011/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289011/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4 %tobool.not57 = icmp eq i32 %0, 0 br i1 %tobool.not57, label %while.end, label %while.body while.body: ; preds = %entry, %for.end26 %1 = phi i32 [ %3, %for.end26 ], [ %0, %entry ] %minj.059 = phi i32 [ %minj.2, %for.end26 ], [ undef, %entry ] %mini.058 = phi i32 [ %mini.2, %for.end26 ], [ undef, %entry ] %mul = mul nsw i32 %1, %1 %2 = load i32, ptr %w, align 4, !tbaa !5 %mul1 = mul nsw i32 %2, %2 %add = add nuw nsw i32 %mul1, %mul br label %for.cond2.preheader for.cond2.preheader: ; preds = %while.body, %if.then13 %minj.155 = phi i32 [ %minj.059, %while.body ], [ %minj.2, %if.then13 ] %mini.154 = phi i32 [ %mini.058, %while.body ], [ %mini.2, %if.then13 ] %minx.053 = phi i32 [ 100000000, %while.body ], [ %minx.1, %if.then13 ] %i.052 = phi i32 [ 1, %while.body ], [ %inc25, %if.then13 ] %mul4 = mul nsw i32 %i.052, %i.052 %cmp12 = icmp sgt i32 %i.052, %1 %cmp12.fr = freeze i1 %cmp12 br i1 %cmp12.fr, label %for.cond2, label %for.cond2.us for.cond2.us: ; preds = %for.cond2.preheader, %for.inc.us %j.0.us = phi i32 [ %inc.us, %for.inc.us ], [ 1, %for.cond2.preheader ] %cmp3.not.us = icmp ult i32 %i.052, %j.0.us br i1 %cmp3.not.us, label %if.end.us, label %for.inc.us if.end.us: ; preds = %for.cond2.us %mul5.us = mul nsw i32 %j.0.us, %j.0.us %add6.us = add nuw nsw i32 %mul5.us, %mul4 %cmp7.us = icmp ugt i32 %add6.us, %add br i1 %cmp7.us, label %if.then13, label %for.inc.us for.inc.us: ; preds = %if.end.us, %for.cond2.us %inc.us = add nuw nsw i32 %j.0.us, 1 br label %for.cond2.us for.cond2: ; preds = %for.cond2.preheader, %for.inc %j.0 = phi i32 [ %inc, %for.inc ], [ 1, %for.cond2.preheader ] %cmp3.not = icmp ult i32 %i.052, %j.0 br i1 %cmp3.not, label %if.end, label %for.inc if.end: ; preds = %for.cond2 %mul5 = mul nsw i32 %j.0, %j.0 %add6 = add nuw nsw i32 %mul5, %mul4 %or.cond.not = icmp ult i32 %add6, %add br i1 %or.cond.not, label %for.inc, label %if.then13 if.then13: ; preds = %if.end.us, %if.end %.us-phi = phi i32 [ %add6, %if.end ], [ %add6.us, %if.end.us ] %.us-phi51 = phi i32 [ %j.0, %if.end ], [ %j.0.us, %if.end.us ] %cmp17 = icmp sgt i32 %minx.053, %.us-phi %minx.1 = call i32 @llvm.smin.i32(i32 %minx.053, i32 %.us-phi) %mini.2 = select i1 %cmp17, i32 %i.052, i32 %mini.154 %minj.2 = select i1 %cmp17, i32 %.us-phi51, i32 %minj.155 %inc25 = add nuw nsw i32 %i.052, 1 %exitcond.not = icmp eq i32 %inc25, 100 br i1 %exitcond.not, label %for.end26, label %for.cond2.preheader, !llvm.loop !9 for.inc: ; preds = %if.end, %for.cond2 %inc = add nuw nsw i32 %j.0, 1 br label %for.cond2 for.end26: ; preds = %if.then13 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mini.2, i32 noundef %minj.2) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %3 = load i32, ptr %h, align 4 %tobool.not = icmp eq i32 %3, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %for.end26, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stddef.h> #include <stdio.h> #include <stdlib.h> #include <memory.h> // util #define MAX(x, y) ((x) >= (y) ? (x) : (y)) void swap(void *x, void *y, size_t size) { void *tmp = malloc(size); memcpy(tmp, x, size); memcpy(x, y, size); memcpy(y, tmp, size); free(tmp); } // fast I/O int get_uint() { int n = 0; int c = getchar_unlocked(); if(c < 48 || 57 < c) return c; while(47 < c && c < 58) n = 10 * n + (c & 0xf), c = getchar_unlocked(); return n; } void put_uint(int n) { if(!n) { putchar_unlocked('0'); return; } char buf[11]; int i = 0; while(n) buf[i++] = (char)(n % 10 + '0'), n /= 10; while(i--)putchar_unlocked(buf[i]); } // stretchy buffer(vector) typedef struct BufHdr { size_t len; size_t cap; char buf[0]; } BufHdr; #define buf__hdr(b) ((BufHdr *)((char *)(b) - offsetof(BufHdr, buf))) #define buf__fits(b, n) (buf_len(b) + (n) <= buf_cap(b)) #define buf__fit(b, n) (buf__fits(b, n) ? 0 : ((b) = buf__grow(b, buf_len(b) + (n), sizeof(*(b))))) #define buf_len(b) ((b) ? buf__hdr(b)->len : 0) #define buf_cap(b) ((b) ? buf__hdr(b)->cap : 0) #define buf_push(b, ...) (buf__fit(b, 1), (b)[buf_len(b)] = (__VA_ARGS__), buf__hdr(b)->len++) #define buf_free(b) ((b) ? free(buf__hdr(b)) : 0) void *buf__grow(const void *buf, size_t new_len, size_t elem_size) { size_t new_cap = MAX(1 + 2 * buf_cap(buf), new_len); size_t new_size = offsetof(BufHdr, buf) + new_cap * elem_size; BufHdr *new_hdr; if(buf) { new_hdr = realloc(buf__hdr(buf), new_size); } else { new_hdr = malloc(new_size); new_hdr->len = 0; } new_hdr->cap = new_cap; return new_hdr->buf; } // priority queue typedef struct PQueue { size_t len; size_t cap; char heap[]; } PQueue; #define pq__hdr(q) ((PQueue *)((char *)(q) - offsetof(PQueue, heap))) #define pq__fit(q, n) ((n) <= pq_cap(q) ? 0 : ((q) = pq__grow((q), (n), sizeof(*(q))))) #define pq__up(q, cmp) for(size_t i = pq_len(q); i > 1 && cmp((q)+i, (q)+i/2) == 1; i /= 2)swap((q)+i, (q)+i/2, sizeof(q)) #define pq__down(q, cmp) for(int i = 1, dt = -1; i != dt; i = dt){const size_t N = pq_len(q); int left = i*2, right = i*2 + 1; dt=i; if(left<=N && cmp((q)+left,(q)+dt))dt=left; if(right<=N && cmp((q)+right,(q)+dt))dt=right; swap((q)+i, (q)+dt, sizeof(q));} #define pq_push(q, cmp, ...) (pq__fit((q), 1 + pq_len(q)), (q)[++pq__hdr(q)->len] = (__VA_ARGS__));pq__up(q, cmp) #define pq_pop(q, cmp) (q)[1]; (q)[1] = (q)[pq__hdr(q)->len--]; pq__down(q, cmp) #define pq_cap(q) ((q) ? pq__hdr(q)->cap : 0) #define pq_len(q) ((q) ? pq__hdr(q)->len : 0) void *pq__grow(const void *Q, size_t new_len, size_t elem_size) { size_t new_cap = MAX(pq_cap(Q) * 2, 2); size_t new_size = offsetof(PQueue, heap) + new_cap * elem_size; PQueue *new_hdr; if(Q) new_hdr = realloc(pq__hdr(Q), new_size); else new_hdr = malloc(new_size), new_hdr->len = 0; new_hdr->cap = new_cap; return new_hdr->heap; } typedef struct Edge { int cost, to; } Edge; #define cmp_edge(l, r) ((l)->cost < (r)->cost ? -1 : (l)->cost > (r)->cost ? 1 : 0) #define add_edge(E, u, v, c) (buf_push(E[u], (Edge){v, c})) int dijkstra(Edge **E, int *d, int N, int s) { Edge *Q = NULL; for(int i = 0; i < N; ++i) d[i] = 1 << 28; pq_push(Q, cmp_edge, (Edge){d[s] = 0, s}); while(pq_len(Q)) { Edge e = pq_pop(Q, cmp_edge); if(e.cost > d[e.to]) continue; for(Edge *p = E[e.to]; p != E[e.to] + buf_len(E[e.to]); ++p) { int x = p->cost, y = p->to + e.cost; if(y < d[x]) d[x] = y; pq_push(Q, cmp_edge, (Edge){y, x}); } } } int main(int argc, char **argv) { int n = get_uint(); Edge *E[n]; for(int i = 0; i < n; ++i) E[i] = NULL; for(int i = 0; i < n; ++i) { int u = get_uint(); int k = get_uint(); for(int j = 0; j < k; ++j) add_edge(E, u, get_uint(), get_uint()); } int d[n]; dijkstra(E, d, n, 0); for(int i = 0; i < n; ++i) { put_uint(i), putchar_unlocked(' '); put_uint(d[i]), putchar_unlocked('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289062/source.c" 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" %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] } %struct.BufHdr = type { i64, i64, [0 x i8] } %struct.PQueue = type { i64, i64, [0 x i8] } %struct.Edge = type { i32, i32 } @stdin = external local_unnamed_addr global ptr, align 8 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: mustprogress nounwind willreturn uwtable define dso_local void @swap(ptr nocapture noundef %x, ptr nocapture noundef %y, i64 noundef %size) local_unnamed_addr #0 { entry: %call = tail call noalias ptr @malloc(i64 noundef %size) #11 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %call, ptr align 1 %x, i64 %size, i1 false) tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %x, ptr align 1 %y, i64 %size, i1 false) tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %y, ptr align 1 %call, i64 %size, i1 false) tail call void @free(ptr noundef %call) #12 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define dso_local i32 @get_uint() local_unnamed_addr #5 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %_IO_read_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i, align 8, !tbaa !14 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %entry %call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #12 br label %getchar_unlocked.exit cond.false.i: ; preds = %entry %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i = zext i8 %3 to i32 br label %getchar_unlocked.exit getchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i %cond.i = phi i32 [ %call.i, %cond.true.i ], [ %conv3.i, %cond.false.i ] %4 = add i32 %cond.i, -58 %or.cond = icmp ult i32 %4, -10 br i1 %or.cond, label %cleanup, label %while.body.preheader while.body.preheader: ; preds = %getchar_unlocked.exit %.pre24 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %while.body while.body: ; preds = %while.body.preheader, %getchar_unlocked.exit21 %5 = phi ptr [ %9, %getchar_unlocked.exit21 ], [ %.pre24, %while.body.preheader ] %c.023 = phi i32 [ %cond.i17, %getchar_unlocked.exit21 ], [ %cond.i, %while.body.preheader ] %n.022 = phi i32 [ %add, %getchar_unlocked.exit21 ], [ 0, %while.body.preheader ] %mul = mul nsw i32 %n.022, 10 %and = and i32 %c.023, 15 %add = add nsw i32 %and, %mul %_IO_read_ptr.i12 = getelementptr inbounds %struct._IO_FILE, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %_IO_read_ptr.i12, align 8, !tbaa !9 %_IO_read_end.i13 = getelementptr inbounds %struct._IO_FILE, ptr %5, i64 0, i32 2 %7 = load ptr, ptr %_IO_read_end.i13, align 8, !tbaa !14 %cmp.not.i14 = icmp ult ptr %6, %7 br i1 %cmp.not.i14, label %cond.false.i18, label %cond.true.i15, !prof !15 cond.true.i15: ; preds = %while.body %call.i16 = tail call i32 @__uflow(ptr noundef nonnull %5) #12 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21 cond.false.i18: ; preds = %while.body %incdec.ptr.i19 = getelementptr inbounds i8, ptr %6, i64 1 store ptr %incdec.ptr.i19, ptr %_IO_read_ptr.i12, align 8, !tbaa !9 %8 = load i8, ptr %6, align 1, !tbaa !16 %conv3.i20 = zext i8 %8 to i32 br label %getchar_unlocked.exit21 getchar_unlocked.exit21: ; preds = %cond.true.i15, %cond.false.i18 %9 = phi ptr [ %.pre, %cond.true.i15 ], [ %5, %cond.false.i18 ] %cond.i17 = phi i32 [ %call.i16, %cond.true.i15 ], [ %conv3.i20, %cond.false.i18 ] %10 = add i32 %cond.i17, -48 %11 = icmp ult i32 %10, 10 br i1 %11, label %while.body, label %cleanup, !llvm.loop !17 cleanup: ; preds = %getchar_unlocked.exit21, %getchar_unlocked.exit %retval.0 = phi i32 [ %cond.i, %getchar_unlocked.exit ], [ %add, %getchar_unlocked.exit21 ] ret i32 %retval.0 } ; Function Attrs: nounwind uwtable define dso_local void @put_uint(i32 noundef %n) local_unnamed_addr #5 { entry: %buf = alloca [11 x i8], align 1 %tobool.not = icmp eq i32 %n, 0 br i1 %tobool.not, label %if.then, label %if.end if.then: ; preds = %entry %0 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 5 %1 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !19 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 6 %2 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !20 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %if.then %call.i = tail call i32 @__overflow(ptr noundef nonnull %0, i32 noundef 48) #12 br label %return cond.false.i: ; preds = %if.then %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !19 store i8 48, ptr %1, align 1, !tbaa !16 br label %return if.end: ; preds = %entry call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %buf) #12 br label %while.body while.body: ; preds = %if.end, %while.body %indvars.iv28 = phi i32 [ 1, %if.end ], [ %indvars.iv.next29, %while.body ] %indvars.iv = phi i64 [ 0, %if.end ], [ %indvars.iv.next, %while.body ] %n.addr.024 = phi i32 [ %n, %if.end ], [ %div, %while.body ] %rem = srem i32 %n.addr.024, 10 %3 = trunc i32 %rem to i8 %conv = add nsw i8 %3, 48 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [11 x i8], ptr %buf, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx, align 1, !tbaa !16 %div = sdiv i32 %n.addr.024, 10 %n.addr.024.off = add i32 %n.addr.024, 9 %tobool1.not = icmp ult i32 %n.addr.024.off, 19 %indvars.iv.next29 = add nuw i32 %indvars.iv28, 1 br i1 %tobool1.not, label %while.body4.preheader, label %while.body, !llvm.loop !21 while.body4.preheader: ; preds = %while.body %4 = sext i32 %indvars.iv28 to i64 br label %while.body4 while.body4: ; preds = %while.body4.preheader, %putchar_unlocked.exit23 %indvars.iv30 = phi i64 [ %4, %while.body4.preheader ], [ %indvars.iv.next31, %putchar_unlocked.exit23 ] %indvars.iv.next31 = add nsw i64 %indvars.iv30, -1 %arrayidx6 = getelementptr inbounds [11 x i8], ptr %buf, i64 0, i64 %indvars.iv.next31 %5 = load i8, ptr %arrayidx6, align 1, !tbaa !16 %6 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 5 %7 = load ptr, ptr %_IO_write_ptr.i15, align 8, !tbaa !19 %_IO_write_end.i16 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 6 %8 = load ptr, ptr %_IO_write_end.i16, align 8, !tbaa !20 %cmp.not.i17 = icmp ult ptr %7, %8 br i1 %cmp.not.i17, label %cond.false.i21, label %cond.true.i18, !prof !15 cond.true.i18: ; preds = %while.body4 %conv7 = zext i8 %5 to i32 %call.i19 = tail call i32 @__overflow(ptr noundef nonnull %6, i32 noundef %conv7) #12 br label %putchar_unlocked.exit23 cond.false.i21: ; preds = %while.body4 %incdec.ptr.i22 = getelementptr inbounds i8, ptr %7, i64 1 store ptr %incdec.ptr.i22, ptr %_IO_write_ptr.i15, align 8, !tbaa !19 store i8 %5, ptr %7, align 1, !tbaa !16 br label %putchar_unlocked.exit23 putchar_unlocked.exit23: ; preds = %cond.true.i18, %cond.false.i21 %9 = and i64 %indvars.iv.next31, 4294967295 %tobool3.not = icmp eq i64 %9, 0 br i1 %tobool3.not, label %while.end9, label %while.body4, !llvm.loop !22 while.end9: ; preds = %putchar_unlocked.exit23 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %buf) #12 br label %return return: ; preds = %cond.false.i, %cond.true.i, %while.end9 ret void } ; Function Attrs: mustprogress nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: readwrite) uwtable define dso_local noalias nonnull ptr @buf__grow(ptr noundef %buf, i64 noundef %new_len, i64 noundef %elem_size) local_unnamed_addr #6 { entry: %tobool.not = icmp eq ptr %buf, null br i1 %tobool.not, label %if.else, label %cond.end cond.end: ; preds = %entry %cap = getelementptr inbounds i8, ptr %buf, i64 -8 %0 = load i64, ptr %cap, align 8, !tbaa !23 %1 = shl i64 %0, 1 %2 = or i64 %1, 1 %spec.select = tail call i64 @llvm.umax.i64(i64 %2, i64 %new_len) %mul1436 = mul i64 %spec.select, %elem_size %add1537 = add i64 %mul1436, 16 %add.ptr17 = getelementptr inbounds i8, ptr %buf, i64 -16 %call = tail call ptr @realloc(ptr noundef nonnull %add.ptr17, i64 noundef %add1537) #13 br label %if.end if.else: ; preds = %entry %new_len.mux34 = tail call i64 @llvm.umax.i64(i64 %new_len, i64 1) %mul14 = mul i64 %new_len.mux34, %elem_size %add15 = add i64 %mul14, 16 %call18 = tail call noalias ptr @malloc(i64 noundef %add15) #11 store i64 0, ptr %call18, align 8, !tbaa !25 br label %if.end if.end: ; preds = %if.else, %cond.end %cond1338 = phi i64 [ %spec.select, %cond.end ], [ %new_len.mux34, %if.else ] %new_hdr.0 = phi ptr [ %call, %cond.end ], [ %call18, %if.else ] %cap19 = getelementptr inbounds %struct.BufHdr, ptr %new_hdr.0, i64 0, i32 1 store i64 %cond1338, ptr %cap19, align 8, !tbaa !23 %buf20 = getelementptr inbounds %struct.BufHdr, ptr %new_hdr.0, i64 0, i32 2 ret ptr %buf20 } ; Function Attrs: mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) declare noalias noundef ptr @realloc(ptr allocptr nocapture noundef, i64 noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: readwrite) uwtable define dso_local noalias nonnull ptr @pq__grow(ptr noundef %Q, i64 noundef %new_len, i64 noundef %elem_size) local_unnamed_addr #6 { entry: %tobool.not = icmp eq ptr %Q, null br i1 %tobool.not, label %if.else, label %cond.true cond.true: ; preds = %entry %cap = getelementptr inbounds i8, ptr %Q, i64 -8 %0 = load i64, ptr %cap, align 8, !tbaa !26 %.mask = and i64 %0, 9223372036854775807 %1 = icmp eq i64 %.mask, 0 %2 = shl i64 %0, 1 %spec.select = select i1 %1, i64 2, i64 %2 %mul1328 = mul i64 %spec.select, %elem_size %add29 = add i64 %mul1328, 16 %add.ptr15 = getelementptr inbounds i8, ptr %Q, i64 -16 %call = tail call ptr @realloc(ptr noundef nonnull %add.ptr15, i64 noundef %add29) #13 br label %if.end if.else: ; preds = %entry %mul13 = shl i64 %elem_size, 1 %add = add i64 %mul13, 16 %call16 = tail call noalias ptr @malloc(i64 noundef %add) #11 store i64 0, ptr %call16, align 8, !tbaa !26 br label %if.end if.end: ; preds = %if.else, %cond.true %cond1230 = phi i64 [ %spec.select, %cond.true ], [ 2, %if.else ] %new_hdr.0 = phi ptr [ %call, %cond.true ], [ %call16, %if.else ] %cap17 = getelementptr inbounds %struct.PQueue, ptr %new_hdr.0, i64 0, i32 1 store i64 %cond1230, ptr %cap17, align 8, !tbaa !26 %heap = getelementptr inbounds %struct.PQueue, ptr %new_hdr.0, i64 0, i32 2 ret ptr %heap } ; Function Attrs: nounwind uwtable define dso_local i32 @dijkstra(ptr nocapture noundef readonly %E, ptr nocapture noundef %d, i32 noundef %N, i32 noundef %s) local_unnamed_addr #5 { entry: %cmp407 = icmp sgt i32 %N, 0 br i1 %cmp407, label %for.body.preheader, label %while.body.preheader for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %N to i64 %min.iters.check = icmp ult i32 %N, 8 br i1 %min.iters.check, label %for.body.preheader420, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %0 = getelementptr inbounds i32, ptr %d, i64 %index store <4 x i32> <i32 268435456, i32 268435456, i32 268435456, i32 268435456>, ptr %0, align 4, !tbaa !27 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> <i32 268435456, i32 268435456, i32 268435456, i32 268435456>, ptr %1, align 4, !tbaa !27 %index.next = add nuw i64 %index, 8 %2 = icmp eq i64 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !28 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %while.body.preheader, label %for.body.preheader420 for.body.preheader420: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader420, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader420 ] %arrayidx = getelementptr inbounds i32, ptr %d, i64 %indvars.iv store i32 268435456, ptr %arrayidx, align 4, !tbaa !27 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %while.body.preheader, label %for.body, !llvm.loop !31 while.body.preheader: ; preds = %for.body, %middle.block, %entry %call16.i = tail call noalias dereferenceable_or_null(32) ptr @malloc(i64 noundef 32) #11 %cap17.i = getelementptr inbounds %struct.PQueue, ptr %call16.i, i64 0, i32 1 store i64 2, ptr %cap17.i, align 8, !tbaa !26 %heap.i = getelementptr inbounds %struct.PQueue, ptr %call16.i, i64 0, i32 2 store i64 1, ptr %call16.i, align 8, !tbaa !26 %arrayidx23 = getelementptr inbounds %struct.PQueue, ptr %call16.i, i64 1, i32 1 %idxprom24 = sext i32 %s to i64 %arrayidx25 = getelementptr inbounds i32, ptr %d, i64 %idxprom24 store i32 0, ptr %arrayidx25, align 4, !tbaa !27 store i32 0, ptr %arrayidx23, align 4, !tbaa.struct !32 %.compoundliteral.sroa.2.0.arrayidx23.sroa_idx = getelementptr inbounds i8, ptr %call16.i, i64 28 store i32 %s, ptr %.compoundliteral.sroa.2.0.arrayidx23.sroa_idx, align 4, !tbaa.struct !33 br label %while.body while.body: ; preds = %while.body.preheader, %cleanup %3 = phi i64 [ %29, %cleanup ], [ 1, %while.body.preheader ] %Q.1416 = phi ptr [ %Q.4, %cleanup ], [ %heap.i, %while.body.preheader ] %arrayidx69 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 1 %e.sroa.0.0.copyload = load i32, ptr %arrayidx69, align 4, !tbaa.struct !32 %e.sroa.5.0.arrayidx69.sroa_idx = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 1, i32 1 %e.sroa.5.0.copyload = load i32, ptr %e.sroa.5.0.arrayidx69.sroa_idx, align 4, !tbaa.struct !33 %add.ptr71 = getelementptr inbounds i8, ptr %Q.1416, i64 -16 %dec = add i64 %3, -1 store i64 %dec, ptr %add.ptr71, align 8, !tbaa !26 %arrayidx73 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 %3 %4 = load i64, ptr %arrayidx73, align 4 store i64 %4, ptr %arrayidx69, align 4 %cmp89.not = icmp ult i64 %3, 3 br i1 %cmp89.not, label %if.end135, label %if.end if.end: ; preds = %while.body %5 = trunc i64 %4 to i32 %add.ptr91 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 2 %6 = load i32, ptr %add.ptr91, align 4, !tbaa !34 %or.cond.not = icmp eq i32 %6, %5 %spec.select388 = select i1 %or.cond.not, i32 1, i32 2 %cmp111.not = icmp eq i64 %3, 3 br i1 %cmp111.not, label %if.end135, label %land.lhs.true113 land.lhs.true113: ; preds = %if.end %add.ptr115 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 3 %7 = load i32, ptr %add.ptr115, align 4, !tbaa !34 %idx.ext117 = zext i32 %spec.select388 to i64 %add.ptr118 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 %idx.ext117 %8 = load i32, ptr %add.ptr118, align 4, !tbaa !34 %or.cond386.not = icmp eq i32 %7, %8 %spec.select389 = select i1 %or.cond386.not, i32 %spec.select388, i32 3 br label %if.end135 if.end135: ; preds = %while.body, %land.lhs.true113, %if.end %dt.2 = phi i32 [ %spec.select388, %if.end ], [ %spec.select389, %land.lhs.true113 ], [ 1, %while.body ] %idx.ext138 = zext i32 %dt.2 to i64 %add.ptr139 = getelementptr inbounds %struct.Edge, ptr %Q.1416, i64 %idx.ext138 %call.i390 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #11 store i64 %4, ptr %call.i390, align 1 %9 = load i64, ptr %add.ptr139, align 1 store i64 %9, ptr %arrayidx69, align 1 %10 = load i64, ptr %call.i390, align 1 store i64 %10, ptr %add.ptr139, align 1 tail call void @free(ptr noundef %call.i390) #12 %idxprom144 = sext i32 %e.sroa.5.0.copyload to i64 %arrayidx145 = getelementptr inbounds i32, ptr %d, i64 %idxprom144 %11 = load i32, ptr %arrayidx145, align 4, !tbaa !27 %cmp146 = icmp sgt i32 %e.sroa.0.0.copyload, %11 br i1 %cmp146, label %cleanup, label %if.end149, !llvm.loop !36 if.end149: ; preds = %if.end135 %arrayidx152 = getelementptr inbounds ptr, ptr %E, i64 %idxprom144 %12 = load ptr, ptr %arrayidx152, align 8, !tbaa !5 br label %for.cond153 for.cond153: ; preds = %for.cond.cleanup258, %if.end149 %13 = phi ptr [ %.pr, %for.cond.cleanup258 ], [ %12, %if.end149 ] %p.0 = phi ptr [ %incdec.ptr, %for.cond.cleanup258 ], [ %12, %if.end149 ] %Q.2 = phi ptr [ %Q.3, %for.cond.cleanup258 ], [ %Q.1416, %if.end149 ] %tobool160.not = icmp eq ptr %13, null br i1 %tobool160.not, label %cond.end168, label %cond.true161 cond.true161: ; preds = %for.cond153 %add.ptr165 = getelementptr inbounds i8, ptr %13, i64 -16 %14 = load i64, ptr %add.ptr165, align 8, !tbaa !25 br label %cond.end168 cond.end168: ; preds = %for.cond153, %cond.true161 %cond169 = phi i64 [ %14, %cond.true161 ], [ 0, %for.cond153 ] %add.ptr170 = getelementptr inbounds %struct.Edge, ptr %13, i64 %cond169 %cmp171.not = icmp eq ptr %p.0, %add.ptr170 br i1 %cmp171.not, label %cleanup, label %for.body174 for.body174: ; preds = %cond.end168 %15 = load i32, ptr %p.0, align 4, !tbaa !34 %to176 = getelementptr inbounds %struct.Edge, ptr %p.0, i64 0, i32 1 %16 = load i32, ptr %to176, align 4, !tbaa !37 %add178 = add nsw i32 %16, %e.sroa.0.0.copyload %idxprom179 = sext i32 %15 to i64 %arrayidx180 = getelementptr inbounds i32, ptr %d, i64 %idxprom179 %17 = load i32, ptr %arrayidx180, align 4, !tbaa !27 %cmp181 = icmp slt i32 %add178, %17 br i1 %cmp181, label %if.then183, label %cond.end200 if.then183: ; preds = %for.body174 store i32 %add178, ptr %arrayidx180, align 4, !tbaa !27 br label %cond.end200 cond.end200: ; preds = %for.body174, %if.then183 %add.ptr189 = getelementptr inbounds i8, ptr %Q.2, i64 -16 %18 = load i64, ptr %add.ptr189, align 8, !tbaa !26 %add194 = add i64 %18, 1 %cap198 = getelementptr inbounds i8, ptr %Q.2, i64 -8 %19 = load i64, ptr %cap198, align 8, !tbaa !26 %cmp202.not = icmp ugt i64 %add194, %19 br i1 %cmp202.not, label %pq__grow.exit, label %cond.end230 pq__grow.exit: ; preds = %cond.end200 %.mask.i = and i64 %19, 9223372036854775807 %20 = icmp eq i64 %.mask.i, 0 %21 = shl i64 %19, 1 %spec.select.i = select i1 %20, i64 2, i64 %21 %mul1328.i = shl i64 %spec.select.i, 3 %add29.i = add i64 %mul1328.i, 16 %call.i394 = tail call ptr @realloc(ptr noundef nonnull %add.ptr189, i64 noundef %add29.i) #13 %cap17.i395 = getelementptr inbounds %struct.PQueue, ptr %call.i394, i64 0, i32 1 store i64 %spec.select.i, ptr %cap17.i395, align 8, !tbaa !26 %heap.i396 = getelementptr inbounds %struct.PQueue, ptr %call.i394, i64 0, i32 2 br label %cond.end230 cond.end230: ; preds = %pq__grow.exit, %cond.end200 %Q.3 = phi ptr [ %Q.2, %cond.end200 ], [ %heap.i396, %pq__grow.exit ] %add.ptr217 = getelementptr inbounds i8, ptr %Q.3, i64 -16 %22 = load i64, ptr %add.ptr217, align 8, !tbaa !26 %inc219 = add i64 %22, 1 store i64 %inc219, ptr %add.ptr217, align 8, !tbaa !26 %arrayidx220 = getelementptr inbounds %struct.Edge, ptr %Q.3, i64 %inc219 store i32 %add178, ptr %arrayidx220, align 4, !tbaa.struct !32 %.compoundliteral221.sroa.2.0.arrayidx220.sroa_idx = getelementptr inbounds i8, ptr %arrayidx220, i64 4 store i32 %15, ptr %.compoundliteral221.sroa.2.0.arrayidx220.sroa_idx, align 4, !tbaa.struct !33 %23 = load i64, ptr %add.ptr217, align 8, !tbaa !26 %cmp233412 = icmp ugt i64 %23, 1 br i1 %cmp233412, label %land.rhs235, label %for.cond.cleanup258 land.rhs235: ; preds = %cond.end230, %for.body259 %i224.0413 = phi i64 [ %div238385, %for.body259 ], [ %23, %cond.end230 ] %add.ptr236 = getelementptr inbounds %struct.Edge, ptr %Q.3, i64 %i224.0413 %24 = load i32, ptr %add.ptr236, align 4, !tbaa !34 %div238385 = lshr i64 %i224.0413, 1 %add.ptr239 = getelementptr inbounds %struct.Edge, ptr %Q.3, i64 %div238385 %25 = load i32, ptr %add.ptr239, align 4, !tbaa !34 %cmp250 = icmp sgt i32 %24, %25 br i1 %cmp250, label %for.body259, label %for.cond.cleanup258 for.cond.cleanup258: ; preds = %land.rhs235, %for.body259, %cond.end230 %incdec.ptr = getelementptr inbounds %struct.Edge, ptr %p.0, i64 1 %.pr = load ptr, ptr %arrayidx152, align 8, !tbaa !5 br label %for.cond153, !llvm.loop !38 for.body259: ; preds = %land.rhs235 %call.i398 = tail call noalias dereferenceable_or_null(8) ptr @malloc(i64 noundef 8) #11 %26 = load i64, ptr %add.ptr236, align 1 store i64 %26, ptr %call.i398, align 1 %27 = load i64, ptr %add.ptr239, align 1 store i64 %27, ptr %add.ptr236, align 1 %28 = load i64, ptr %call.i398, align 1 store i64 %28, ptr %add.ptr239, align 1 tail call void @free(ptr noundef %call.i398) #12 %cmp233 = icmp ugt i64 %i224.0413, 3 br i1 %cmp233, label %land.rhs235, label %for.cond.cleanup258, !llvm.loop !39 cleanup: ; preds = %cond.end168, %if.end135 %Q.4 = phi ptr [ %Q.1416, %if.end135 ], [ %Q.2, %cond.end168 ] %add.ptr63 = getelementptr inbounds i8, ptr %Q.4, i64 -16 %29 = load i64, ptr %add.ptr63, align 8, !tbaa !26 %tobool68.not = icmp eq i64 %29, 0 br i1 %tobool68.not, label %while.end, label %while.body while.end: ; preds = %cleanup ret i32 undef } ; Function Attrs: nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #5 { entry: %buf.i259 = alloca [11 x i8], align 1 %buf.i = alloca [11 x i8], align 1 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %_IO_read_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i.i, align 8, !tbaa !14 %cmp.not.i.i = icmp ult ptr %1, %2 br i1 %cmp.not.i.i, label %cond.false.i.i, label %cond.true.i.i, !prof !15 cond.true.i.i: ; preds = %entry %call.i.i = tail call i32 @__uflow(ptr noundef nonnull %0) #12 br label %getchar_unlocked.exit.i cond.false.i.i: ; preds = %entry %incdec.ptr.i.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i.i, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i.i = zext i8 %3 to i32 br label %getchar_unlocked.exit.i getchar_unlocked.exit.i: ; preds = %cond.false.i.i, %cond.true.i.i %cond.i.i = phi i32 [ %call.i.i, %cond.true.i.i ], [ %conv3.i.i, %cond.false.i.i ] %4 = add i32 %cond.i.i, -58 %or.cond.i = icmp ult i32 %4, -10 br i1 %or.cond.i, label %get_uint.exit, label %while.body.preheader.i while.body.preheader.i: ; preds = %getchar_unlocked.exit.i %.pre24.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %while.body.i while.body.i: ; preds = %getchar_unlocked.exit21.i, %while.body.preheader.i %5 = phi ptr [ %9, %getchar_unlocked.exit21.i ], [ %.pre24.i, %while.body.preheader.i ] %c.023.i = phi i32 [ %cond.i17.i, %getchar_unlocked.exit21.i ], [ %cond.i.i, %while.body.preheader.i ] %n.022.i = phi i32 [ %add.i, %getchar_unlocked.exit21.i ], [ 0, %while.body.preheader.i ] %mul.i = mul nsw i32 %n.022.i, 10 %and.i = and i32 %c.023.i, 15 %add.i = add nsw i32 %mul.i, %and.i %_IO_read_ptr.i12.i = getelementptr inbounds %struct._IO_FILE, ptr %5, i64 0, i32 1 %6 = load ptr, ptr %_IO_read_ptr.i12.i, align 8, !tbaa !9 %_IO_read_end.i13.i = getelementptr inbounds %struct._IO_FILE, ptr %5, i64 0, i32 2 %7 = load ptr, ptr %_IO_read_end.i13.i, align 8, !tbaa !14 %cmp.not.i14.i = icmp ult ptr %6, %7 br i1 %cmp.not.i14.i, label %cond.false.i18.i, label %cond.true.i15.i, !prof !15 cond.true.i15.i: ; preds = %while.body.i %call.i16.i = tail call i32 @__uflow(ptr noundef nonnull %5) #12 %.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21.i cond.false.i18.i: ; preds = %while.body.i %incdec.ptr.i19.i = getelementptr inbounds i8, ptr %6, i64 1 store ptr %incdec.ptr.i19.i, ptr %_IO_read_ptr.i12.i, align 8, !tbaa !9 %8 = load i8, ptr %6, align 1, !tbaa !16 %conv3.i20.i = zext i8 %8 to i32 br label %getchar_unlocked.exit21.i getchar_unlocked.exit21.i: ; preds = %cond.false.i18.i, %cond.true.i15.i %9 = phi ptr [ %.pre.i, %cond.true.i15.i ], [ %5, %cond.false.i18.i ] %cond.i17.i = phi i32 [ %call.i16.i, %cond.true.i15.i ], [ %conv3.i20.i, %cond.false.i18.i ] %10 = add i32 %cond.i17.i, -48 %11 = icmp ult i32 %10, 10 br i1 %11, label %while.body.i, label %get_uint.exit, !llvm.loop !17 get_uint.exit: ; preds = %getchar_unlocked.exit21.i, %getchar_unlocked.exit.i %retval.0.i = phi i32 [ %cond.i.i, %getchar_unlocked.exit.i ], [ %add.i, %getchar_unlocked.exit21.i ] %12 = zext i32 %retval.0.i to i64 %vla = alloca ptr, i64 %12, align 16 %cmp316 = icmp sgt i32 %retval.0.i, 0 br i1 %cmp316, label %for.body5.preheader, label %for.cond.cleanup4.thread for.cond.cleanup4.thread: ; preds = %get_uint.exit %vla75333 = alloca i32, i64 %12, align 16 %call76334 = call i32 @dijkstra(ptr noundef nonnull %vla, ptr noundef nonnull %vla75333, i32 noundef %retval.0.i, i32 noundef 0) br label %for.cond.cleanup80 for.body5.preheader: ; preds = %get_uint.exit %13 = shl nuw nsw i64 %12, 3 call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla, i8 0, i64 %13, i1 false), !tbaa !5 br label %for.body5 for.cond.cleanup4: ; preds = %for.cond.cleanup10 %vla75 = alloca i32, i64 %12, align 16 %call76 = call i32 @dijkstra(ptr noundef nonnull %vla, ptr noundef nonnull %vla75, i32 noundef %retval.0.i, i32 noundef 0) br i1 %cmp316, label %for.body81, label %for.cond.cleanup80 for.body5: ; preds = %for.body5.preheader, %for.cond.cleanup10 %i1.0321 = phi i32 [ %inc73, %for.cond.cleanup10 ], [ 0, %for.body5.preheader ] %14 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i.i119 = getelementptr inbounds %struct._IO_FILE, ptr %14, i64 0, i32 1 %15 = load ptr, ptr %_IO_read_ptr.i.i119, align 8, !tbaa !9 %_IO_read_end.i.i120 = getelementptr inbounds %struct._IO_FILE, ptr %14, i64 0, i32 2 %16 = load ptr, ptr %_IO_read_end.i.i120, align 8, !tbaa !14 %cmp.not.i.i121 = icmp ult ptr %15, %16 br i1 %cmp.not.i.i121, label %cond.false.i.i147, label %cond.true.i.i122, !prof !15 cond.true.i.i122: ; preds = %for.body5 %call.i.i123 = tail call i32 @__uflow(ptr noundef nonnull %14) #12 %.pre.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit.i124 cond.false.i.i147: ; preds = %for.body5 %incdec.ptr.i.i148 = getelementptr inbounds i8, ptr %15, i64 1 store ptr %incdec.ptr.i.i148, ptr %_IO_read_ptr.i.i119, align 8, !tbaa !9 %17 = load i8, ptr %15, align 1, !tbaa !16 %conv3.i.i149 = zext i8 %17 to i32 br label %getchar_unlocked.exit.i124 getchar_unlocked.exit.i124: ; preds = %cond.false.i.i147, %cond.true.i.i122 %.pre = phi ptr [ %.pre.pre, %cond.true.i.i122 ], [ %14, %cond.false.i.i147 ] %cond.i.i125 = phi i32 [ %call.i.i123, %cond.true.i.i122 ], [ %conv3.i.i149, %cond.false.i.i147 ] %18 = add i32 %cond.i.i125, -58 %or.cond.i126 = icmp ult i32 %18, -10 br i1 %or.cond.i126, label %get_uint.exit150, label %while.body.i129 while.body.i129: ; preds = %getchar_unlocked.exit.i124, %getchar_unlocked.exit21.i141 %19 = phi ptr [ %23, %getchar_unlocked.exit21.i141 ], [ %.pre, %getchar_unlocked.exit.i124 ] %c.023.i130 = phi i32 [ %cond.i17.i142, %getchar_unlocked.exit21.i141 ], [ %cond.i.i125, %getchar_unlocked.exit.i124 ] %n.022.i131 = phi i32 [ %add.i134, %getchar_unlocked.exit21.i141 ], [ 0, %getchar_unlocked.exit.i124 ] %mul.i132 = mul nsw i32 %n.022.i131, 10 %and.i133 = and i32 %c.023.i130, 15 %add.i134 = add nsw i32 %mul.i132, %and.i133 %_IO_read_ptr.i12.i135 = getelementptr inbounds %struct._IO_FILE, ptr %19, i64 0, i32 1 %20 = load ptr, ptr %_IO_read_ptr.i12.i135, align 8, !tbaa !9 %_IO_read_end.i13.i136 = getelementptr inbounds %struct._IO_FILE, ptr %19, i64 0, i32 2 %21 = load ptr, ptr %_IO_read_end.i13.i136, align 8, !tbaa !14 %cmp.not.i14.i137 = icmp ult ptr %20, %21 br i1 %cmp.not.i14.i137, label %cond.false.i18.i144, label %cond.true.i15.i138, !prof !15 cond.true.i15.i138: ; preds = %while.body.i129 %call.i16.i139 = tail call i32 @__uflow(ptr noundef nonnull %19) #12 %.pre.i140 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21.i141 cond.false.i18.i144: ; preds = %while.body.i129 %incdec.ptr.i19.i145 = getelementptr inbounds i8, ptr %20, i64 1 store ptr %incdec.ptr.i19.i145, ptr %_IO_read_ptr.i12.i135, align 8, !tbaa !9 %22 = load i8, ptr %20, align 1, !tbaa !16 %conv3.i20.i146 = zext i8 %22 to i32 br label %getchar_unlocked.exit21.i141 getchar_unlocked.exit21.i141: ; preds = %cond.false.i18.i144, %cond.true.i15.i138 %23 = phi ptr [ %.pre.i140, %cond.true.i15.i138 ], [ %19, %cond.false.i18.i144 ] %cond.i17.i142 = phi i32 [ %call.i16.i139, %cond.true.i15.i138 ], [ %conv3.i20.i146, %cond.false.i18.i144 ] %24 = add i32 %cond.i17.i142, -48 %25 = icmp ult i32 %24, 10 br i1 %25, label %while.body.i129, label %get_uint.exit150, !llvm.loop !17 get_uint.exit150: ; preds = %getchar_unlocked.exit21.i141, %getchar_unlocked.exit.i124 %26 = phi ptr [ %.pre, %getchar_unlocked.exit.i124 ], [ %23, %getchar_unlocked.exit21.i141 ] %retval.0.i143 = phi i32 [ %cond.i.i125, %getchar_unlocked.exit.i124 ], [ %add.i134, %getchar_unlocked.exit21.i141 ] %_IO_read_ptr.i.i151 = getelementptr inbounds %struct._IO_FILE, ptr %26, i64 0, i32 1 %27 = load ptr, ptr %_IO_read_ptr.i.i151, align 8, !tbaa !9 %_IO_read_end.i.i152 = getelementptr inbounds %struct._IO_FILE, ptr %26, i64 0, i32 2 %28 = load ptr, ptr %_IO_read_end.i.i152, align 8, !tbaa !14 %cmp.not.i.i153 = icmp ult ptr %27, %28 br i1 %cmp.not.i.i153, label %cond.false.i.i179, label %cond.true.i.i154, !prof !15 cond.true.i.i154: ; preds = %get_uint.exit150 %call.i.i155 = tail call i32 @__uflow(ptr noundef nonnull %26) #12 br label %getchar_unlocked.exit.i156 cond.false.i.i179: ; preds = %get_uint.exit150 %incdec.ptr.i.i180 = getelementptr inbounds i8, ptr %27, i64 1 store ptr %incdec.ptr.i.i180, ptr %_IO_read_ptr.i.i151, align 8, !tbaa !9 %29 = load i8, ptr %27, align 1, !tbaa !16 %conv3.i.i181 = zext i8 %29 to i32 br label %getchar_unlocked.exit.i156 getchar_unlocked.exit.i156: ; preds = %cond.false.i.i179, %cond.true.i.i154 %cond.i.i157 = phi i32 [ %call.i.i155, %cond.true.i.i154 ], [ %conv3.i.i181, %cond.false.i.i179 ] %30 = add i32 %cond.i.i157, -58 %or.cond.i158 = icmp ult i32 %30, -10 br i1 %or.cond.i158, label %get_uint.exit182, label %while.body.preheader.i159 while.body.preheader.i159: ; preds = %getchar_unlocked.exit.i156 %.pre24.i160 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %while.body.i161 while.body.i161: ; preds = %getchar_unlocked.exit21.i173, %while.body.preheader.i159 %31 = phi ptr [ %35, %getchar_unlocked.exit21.i173 ], [ %.pre24.i160, %while.body.preheader.i159 ] %c.023.i162 = phi i32 [ %cond.i17.i174, %getchar_unlocked.exit21.i173 ], [ %cond.i.i157, %while.body.preheader.i159 ] %n.022.i163 = phi i32 [ %add.i166, %getchar_unlocked.exit21.i173 ], [ 0, %while.body.preheader.i159 ] %mul.i164 = mul nsw i32 %n.022.i163, 10 %and.i165 = and i32 %c.023.i162, 15 %add.i166 = add nsw i32 %mul.i164, %and.i165 %_IO_read_ptr.i12.i167 = getelementptr inbounds %struct._IO_FILE, ptr %31, i64 0, i32 1 %32 = load ptr, ptr %_IO_read_ptr.i12.i167, align 8, !tbaa !9 %_IO_read_end.i13.i168 = getelementptr inbounds %struct._IO_FILE, ptr %31, i64 0, i32 2 %33 = load ptr, ptr %_IO_read_end.i13.i168, align 8, !tbaa !14 %cmp.not.i14.i169 = icmp ult ptr %32, %33 br i1 %cmp.not.i14.i169, label %cond.false.i18.i176, label %cond.true.i15.i170, !prof !15 cond.true.i15.i170: ; preds = %while.body.i161 %call.i16.i171 = tail call i32 @__uflow(ptr noundef nonnull %31) #12 %.pre.i172 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21.i173 cond.false.i18.i176: ; preds = %while.body.i161 %incdec.ptr.i19.i177 = getelementptr inbounds i8, ptr %32, i64 1 store ptr %incdec.ptr.i19.i177, ptr %_IO_read_ptr.i12.i167, align 8, !tbaa !9 %34 = load i8, ptr %32, align 1, !tbaa !16 %conv3.i20.i178 = zext i8 %34 to i32 br label %getchar_unlocked.exit21.i173 getchar_unlocked.exit21.i173: ; preds = %cond.false.i18.i176, %cond.true.i15.i170 %35 = phi ptr [ %.pre.i172, %cond.true.i15.i170 ], [ %31, %cond.false.i18.i176 ] %cond.i17.i174 = phi i32 [ %call.i16.i171, %cond.true.i15.i170 ], [ %conv3.i20.i178, %cond.false.i18.i176 ] %36 = add i32 %cond.i17.i174, -48 %37 = icmp ult i32 %36, 10 br i1 %37, label %while.body.i161, label %get_uint.exit182, !llvm.loop !17 get_uint.exit182: ; preds = %getchar_unlocked.exit21.i173, %getchar_unlocked.exit.i156 %retval.0.i175 = phi i32 [ %cond.i.i157, %getchar_unlocked.exit.i156 ], [ %add.i166, %getchar_unlocked.exit21.i173 ] %cmp9318 = icmp sgt i32 %retval.0.i175, 0 br i1 %cmp9318, label %for.body11.lr.ph, label %for.cond.cleanup10 for.body11.lr.ph: ; preds = %get_uint.exit182 %idxprom12 = sext i32 %retval.0.i143 to i64 %arrayidx13 = getelementptr inbounds ptr, ptr %vla, i64 %idxprom12 %.pre328 = load ptr, ptr %arrayidx13, align 8, !tbaa !5 br label %for.body11 for.cond.cleanup10: ; preds = %get_uint.exit249, %get_uint.exit182 %inc73 = add nuw nsw i32 %i1.0321, 1 %exitcond325.not = icmp eq i32 %inc73, %retval.0.i br i1 %exitcond325.not, label %for.cond.cleanup4, label %for.body5, !llvm.loop !40 for.body11: ; preds = %for.body11.lr.ph, %get_uint.exit249 %.pr = phi ptr [ %.pre328, %for.body11.lr.ph ], [ %68, %get_uint.exit249 ] %j.0319 = phi i32 [ 0, %for.body11.lr.ph ], [ %inc70, %get_uint.exit249 ] %tobool.not = icmp eq ptr %.pr, null br i1 %tobool.not, label %cond.false28.split, label %cond.end24 cond.end24: ; preds = %for.body11 %add.ptr = getelementptr inbounds i8, ptr %.pr, i64 -16 %38 = load i64, ptr %add.ptr, align 8, !tbaa !25 %add = add i64 %38, 1 %cap = getelementptr inbounds i8, ptr %.pr, i64 -8 %39 = load i64, ptr %cap, align 8, !tbaa !23 %cmp26.not = icmp ugt i64 %add, %39 br i1 %cmp26.not, label %buf__grow.exit, label %cond.end59 cond.false28.split: ; preds = %for.body11 %call18.i = tail call noalias dereferenceable_or_null(24) ptr @malloc(i64 noundef 24) #11 store i64 0, ptr %call18.i, align 8, !tbaa !25 br label %cond.end46.thread buf__grow.exit: ; preds = %cond.end24 %40 = shl i64 %39, 1 %41 = or i64 %40, 1 %spec.select.i = tail call i64 @llvm.umax.i64(i64 %41, i64 %add) %mul1436.i = shl i64 %spec.select.i, 3 %add1537.i = add i64 %mul1436.i, 16 %call.i = tail call ptr @realloc(ptr noundef nonnull %add.ptr, i64 noundef %add1537.i) #13 br label %cond.end46.thread cond.end46.thread: ; preds = %buf__grow.exit, %cond.false28.split %call.i.sink = phi ptr [ %call.i, %buf__grow.exit ], [ %call18.i, %cond.false28.split ] %spec.select.i.sink = phi i64 [ %spec.select.i, %buf__grow.exit ], [ 1, %cond.false28.split ] %cap19.i183 = getelementptr inbounds %struct.BufHdr, ptr %call.i.sink, i64 0, i32 1 store i64 %spec.select.i.sink, ptr %cap19.i183, align 8, !tbaa !23 %phi.call = getelementptr inbounds %struct.BufHdr, ptr %call.i.sink, i64 0, i32 2 store ptr %phi.call, ptr %arrayidx13, align 8, !tbaa !5 %.pre329 = load i64, ptr %call.i.sink, align 8, !tbaa !25 br label %cond.end59 cond.end59: ; preds = %cond.end46.thread, %cond.end24 %42 = phi i64 [ %.pre329, %cond.end46.thread ], [ %38, %cond.end24 ] %43 = phi ptr [ %phi.call, %cond.end46.thread ], [ %.pr, %cond.end24 ] %arrayidx61 = getelementptr inbounds %struct.Edge, ptr %43, i64 %42 %44 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i.i186 = getelementptr inbounds %struct._IO_FILE, ptr %44, i64 0, i32 1 %45 = load ptr, ptr %_IO_read_ptr.i.i186, align 8, !tbaa !9 %_IO_read_end.i.i187 = getelementptr inbounds %struct._IO_FILE, ptr %44, i64 0, i32 2 %46 = load ptr, ptr %_IO_read_end.i.i187, align 8, !tbaa !14 %cmp.not.i.i188 = icmp ult ptr %45, %46 br i1 %cmp.not.i.i188, label %cond.false.i.i214, label %cond.true.i.i189, !prof !15 cond.true.i.i189: ; preds = %cond.end59 %call.i.i190 = tail call i32 @__uflow(ptr noundef nonnull %44) #12 %.pre330.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit.i191 cond.false.i.i214: ; preds = %cond.end59 %incdec.ptr.i.i215 = getelementptr inbounds i8, ptr %45, i64 1 store ptr %incdec.ptr.i.i215, ptr %_IO_read_ptr.i.i186, align 8, !tbaa !9 %47 = load i8, ptr %45, align 1, !tbaa !16 %conv3.i.i216 = zext i8 %47 to i32 br label %getchar_unlocked.exit.i191 getchar_unlocked.exit.i191: ; preds = %cond.false.i.i214, %cond.true.i.i189 %.pre330 = phi ptr [ %.pre330.pre, %cond.true.i.i189 ], [ %44, %cond.false.i.i214 ] %cond.i.i192 = phi i32 [ %call.i.i190, %cond.true.i.i189 ], [ %conv3.i.i216, %cond.false.i.i214 ] %48 = add i32 %cond.i.i192, -58 %or.cond.i193 = icmp ult i32 %48, -10 br i1 %or.cond.i193, label %get_uint.exit217, label %while.body.i196 while.body.i196: ; preds = %getchar_unlocked.exit.i191, %getchar_unlocked.exit21.i208 %49 = phi ptr [ %53, %getchar_unlocked.exit21.i208 ], [ %.pre330, %getchar_unlocked.exit.i191 ] %c.023.i197 = phi i32 [ %cond.i17.i209, %getchar_unlocked.exit21.i208 ], [ %cond.i.i192, %getchar_unlocked.exit.i191 ] %n.022.i198 = phi i32 [ %add.i201, %getchar_unlocked.exit21.i208 ], [ 0, %getchar_unlocked.exit.i191 ] %mul.i199 = mul nsw i32 %n.022.i198, 10 %and.i200 = and i32 %c.023.i197, 15 %add.i201 = add nsw i32 %mul.i199, %and.i200 %_IO_read_ptr.i12.i202 = getelementptr inbounds %struct._IO_FILE, ptr %49, i64 0, i32 1 %50 = load ptr, ptr %_IO_read_ptr.i12.i202, align 8, !tbaa !9 %_IO_read_end.i13.i203 = getelementptr inbounds %struct._IO_FILE, ptr %49, i64 0, i32 2 %51 = load ptr, ptr %_IO_read_end.i13.i203, align 8, !tbaa !14 %cmp.not.i14.i204 = icmp ult ptr %50, %51 br i1 %cmp.not.i14.i204, label %cond.false.i18.i211, label %cond.true.i15.i205, !prof !15 cond.true.i15.i205: ; preds = %while.body.i196 %call.i16.i206 = tail call i32 @__uflow(ptr noundef nonnull %49) #12 %.pre.i207 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21.i208 cond.false.i18.i211: ; preds = %while.body.i196 %incdec.ptr.i19.i212 = getelementptr inbounds i8, ptr %50, i64 1 store ptr %incdec.ptr.i19.i212, ptr %_IO_read_ptr.i12.i202, align 8, !tbaa !9 %52 = load i8, ptr %50, align 1, !tbaa !16 %conv3.i20.i213 = zext i8 %52 to i32 br label %getchar_unlocked.exit21.i208 getchar_unlocked.exit21.i208: ; preds = %cond.false.i18.i211, %cond.true.i15.i205 %53 = phi ptr [ %.pre.i207, %cond.true.i15.i205 ], [ %49, %cond.false.i18.i211 ] %cond.i17.i209 = phi i32 [ %call.i16.i206, %cond.true.i15.i205 ], [ %conv3.i20.i213, %cond.false.i18.i211 ] %54 = add i32 %cond.i17.i209, -48 %55 = icmp ult i32 %54, 10 br i1 %55, label %while.body.i196, label %get_uint.exit217, !llvm.loop !17 get_uint.exit217: ; preds = %getchar_unlocked.exit21.i208, %getchar_unlocked.exit.i191 %56 = phi ptr [ %.pre330, %getchar_unlocked.exit.i191 ], [ %53, %getchar_unlocked.exit21.i208 ] %retval.0.i210 = phi i32 [ %cond.i.i192, %getchar_unlocked.exit.i191 ], [ %add.i201, %getchar_unlocked.exit21.i208 ] %_IO_read_ptr.i.i218 = getelementptr inbounds %struct._IO_FILE, ptr %56, i64 0, i32 1 %57 = load ptr, ptr %_IO_read_ptr.i.i218, align 8, !tbaa !9 %_IO_read_end.i.i219 = getelementptr inbounds %struct._IO_FILE, ptr %56, i64 0, i32 2 %58 = load ptr, ptr %_IO_read_end.i.i219, align 8, !tbaa !14 %cmp.not.i.i220 = icmp ult ptr %57, %58 br i1 %cmp.not.i.i220, label %cond.false.i.i246, label %cond.true.i.i221, !prof !15 cond.true.i.i221: ; preds = %get_uint.exit217 %call.i.i222 = tail call i32 @__uflow(ptr noundef nonnull %56) #12 br label %getchar_unlocked.exit.i223 cond.false.i.i246: ; preds = %get_uint.exit217 %incdec.ptr.i.i247 = getelementptr inbounds i8, ptr %57, i64 1 store ptr %incdec.ptr.i.i247, ptr %_IO_read_ptr.i.i218, align 8, !tbaa !9 %59 = load i8, ptr %57, align 1, !tbaa !16 %conv3.i.i248 = zext i8 %59 to i32 br label %getchar_unlocked.exit.i223 getchar_unlocked.exit.i223: ; preds = %cond.false.i.i246, %cond.true.i.i221 %cond.i.i224 = phi i32 [ %call.i.i222, %cond.true.i.i221 ], [ %conv3.i.i248, %cond.false.i.i246 ] %60 = add i32 %cond.i.i224, -58 %or.cond.i225 = icmp ult i32 %60, -10 br i1 %or.cond.i225, label %get_uint.exit249, label %while.body.preheader.i226 while.body.preheader.i226: ; preds = %getchar_unlocked.exit.i223 %.pre24.i227 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %while.body.i228 while.body.i228: ; preds = %getchar_unlocked.exit21.i240, %while.body.preheader.i226 %61 = phi ptr [ %65, %getchar_unlocked.exit21.i240 ], [ %.pre24.i227, %while.body.preheader.i226 ] %c.023.i229 = phi i32 [ %cond.i17.i241, %getchar_unlocked.exit21.i240 ], [ %cond.i.i224, %while.body.preheader.i226 ] %n.022.i230 = phi i32 [ %add.i233, %getchar_unlocked.exit21.i240 ], [ 0, %while.body.preheader.i226 ] %mul.i231 = mul nsw i32 %n.022.i230, 10 %and.i232 = and i32 %c.023.i229, 15 %add.i233 = add nsw i32 %mul.i231, %and.i232 %_IO_read_ptr.i12.i234 = getelementptr inbounds %struct._IO_FILE, ptr %61, i64 0, i32 1 %62 = load ptr, ptr %_IO_read_ptr.i12.i234, align 8, !tbaa !9 %_IO_read_end.i13.i235 = getelementptr inbounds %struct._IO_FILE, ptr %61, i64 0, i32 2 %63 = load ptr, ptr %_IO_read_end.i13.i235, align 8, !tbaa !14 %cmp.not.i14.i236 = icmp ult ptr %62, %63 br i1 %cmp.not.i14.i236, label %cond.false.i18.i243, label %cond.true.i15.i237, !prof !15 cond.true.i15.i237: ; preds = %while.body.i228 %call.i16.i238 = tail call i32 @__uflow(ptr noundef nonnull %61) #12 %.pre.i239 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit21.i240 cond.false.i18.i243: ; preds = %while.body.i228 %incdec.ptr.i19.i244 = getelementptr inbounds i8, ptr %62, i64 1 store ptr %incdec.ptr.i19.i244, ptr %_IO_read_ptr.i12.i234, align 8, !tbaa !9 %64 = load i8, ptr %62, align 1, !tbaa !16 %conv3.i20.i245 = zext i8 %64 to i32 br label %getchar_unlocked.exit21.i240 getchar_unlocked.exit21.i240: ; preds = %cond.false.i18.i243, %cond.true.i15.i237 %65 = phi ptr [ %.pre.i239, %cond.true.i15.i237 ], [ %61, %cond.false.i18.i243 ] %cond.i17.i241 = phi i32 [ %call.i16.i238, %cond.true.i15.i237 ], [ %conv3.i20.i245, %cond.false.i18.i243 ] %66 = add i32 %cond.i17.i241, -48 %67 = icmp ult i32 %66, 10 br i1 %67, label %while.body.i228, label %get_uint.exit249, !llvm.loop !17 get_uint.exit249: ; preds = %getchar_unlocked.exit21.i240, %getchar_unlocked.exit.i223 %retval.0.i242 = phi i32 [ %cond.i.i224, %getchar_unlocked.exit.i223 ], [ %add.i233, %getchar_unlocked.exit21.i240 ] store i32 %retval.0.i210, ptr %arrayidx61, align 4, !tbaa.struct !32 %.compoundliteral.sroa.2.0.arrayidx61.sroa_idx = getelementptr inbounds i8, ptr %arrayidx61, i64 4 store i32 %retval.0.i242, ptr %.compoundliteral.sroa.2.0.arrayidx61.sroa_idx, align 4, !tbaa.struct !33 %68 = load ptr, ptr %arrayidx13, align 8, !tbaa !5 %add.ptr66 = getelementptr inbounds i8, ptr %68, i64 -16 %69 = load i64, ptr %add.ptr66, align 8, !tbaa !25 %inc68 = add i64 %69, 1 store i64 %inc68, ptr %add.ptr66, align 8, !tbaa !25 %inc70 = add nuw nsw i32 %j.0319, 1 %exitcond.not = icmp eq i32 %inc70, %retval.0.i175 br i1 %exitcond.not, label %for.cond.cleanup10, label %for.body11, !llvm.loop !41 for.cond.cleanup80: ; preds = %putchar_unlocked.exit308, %for.cond.cleanup4.thread, %for.cond.cleanup4 ret i32 0 for.body81: ; preds = %for.cond.cleanup4, %putchar_unlocked.exit308 %indvars.iv = phi i64 [ %indvars.iv.next, %putchar_unlocked.exit308 ], [ 0, %for.cond.cleanup4 ] %tobool.not.i250 = icmp eq i64 %indvars.iv, 0 br i1 %tobool.not.i250, label %if.then.i, label %if.end.i if.then.i: ; preds = %for.body81 %70 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %70, i64 0, i32 5 %71 = load ptr, ptr %_IO_write_ptr.i.i, align 8, !tbaa !19 %_IO_write_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %70, i64 0, i32 6 %72 = load ptr, ptr %_IO_write_end.i.i, align 8, !tbaa !20 %cmp.not.i.i252 = icmp ult ptr %71, %72 br i1 %cmp.not.i.i252, label %cond.false.i.i255, label %cond.true.i.i253, !prof !15 cond.true.i.i253: ; preds = %if.then.i %call.i.i254 = tail call i32 @__overflow(ptr noundef nonnull %70, i32 noundef 48) #12 br label %put_uint.exit cond.false.i.i255: ; preds = %if.then.i %incdec.ptr.i.i256 = getelementptr inbounds i8, ptr %71, i64 1 store ptr %incdec.ptr.i.i256, ptr %_IO_write_ptr.i.i, align 8, !tbaa !19 store i8 48, ptr %71, align 1, !tbaa !16 br label %put_uint.exit if.end.i: ; preds = %for.body81 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %buf.i) #12 %73 = trunc i64 %indvars.iv to i32 br label %while.body.i251 while.body.i251: ; preds = %while.body.i251, %if.end.i %indvars.iv28.i = phi i32 [ 1, %if.end.i ], [ %indvars.iv.next29.i, %while.body.i251 ] %indvars.iv.i = phi i64 [ 0, %if.end.i ], [ %indvars.iv.next.i, %while.body.i251 ] %n.addr.024.i = phi i32 [ %73, %if.end.i ], [ %div.i, %while.body.i251 ] %rem.i = srem i32 %n.addr.024.i, 10 %74 = trunc i32 %rem.i to i8 %conv.i = add nsw i8 %74, 48 %indvars.iv.next.i = add nuw i64 %indvars.iv.i, 1 %arrayidx.i = getelementptr inbounds [11 x i8], ptr %buf.i, i64 0, i64 %indvars.iv.i store i8 %conv.i, ptr %arrayidx.i, align 1, !tbaa !16 %div.i = sdiv i32 %n.addr.024.i, 10 %n.addr.024.off.i = add i32 %n.addr.024.i, 9 %tobool1.not.i = icmp ult i32 %n.addr.024.off.i, 19 %indvars.iv.next29.i = add nuw i32 %indvars.iv28.i, 1 br i1 %tobool1.not.i, label %while.body4.preheader.i, label %while.body.i251, !llvm.loop !21 while.body4.preheader.i: ; preds = %while.body.i251 %75 = sext i32 %indvars.iv28.i to i64 br label %while.body4.i while.body4.i: ; preds = %putchar_unlocked.exit23.i, %while.body4.preheader.i %indvars.iv30.i = phi i64 [ %75, %while.body4.preheader.i ], [ %indvars.iv.next31.i, %putchar_unlocked.exit23.i ] %indvars.iv.next31.i = add nsw i64 %indvars.iv30.i, -1 %arrayidx6.i = getelementptr inbounds [11 x i8], ptr %buf.i, i64 0, i64 %indvars.iv.next31.i %76 = load i8, ptr %arrayidx6.i, align 1, !tbaa !16 %77 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15.i = getelementptr inbounds %struct._IO_FILE, ptr %77, i64 0, i32 5 %78 = load ptr, ptr %_IO_write_ptr.i15.i, align 8, !tbaa !19 %_IO_write_end.i16.i = getelementptr inbounds %struct._IO_FILE, ptr %77, i64 0, i32 6 %79 = load ptr, ptr %_IO_write_end.i16.i, align 8, !tbaa !20 %cmp.not.i17.i = icmp ult ptr %78, %79 br i1 %cmp.not.i17.i, label %cond.false.i21.i, label %cond.true.i18.i, !prof !15 cond.true.i18.i: ; preds = %while.body4.i %conv7.i = zext i8 %76 to i32 %call.i19.i = tail call i32 @__overflow(ptr noundef nonnull %77, i32 noundef %conv7.i) #12 br label %putchar_unlocked.exit23.i cond.false.i21.i: ; preds = %while.body4.i %incdec.ptr.i22.i = getelementptr inbounds i8, ptr %78, i64 1 store ptr %incdec.ptr.i22.i, ptr %_IO_write_ptr.i15.i, align 8, !tbaa !19 store i8 %76, ptr %78, align 1, !tbaa !16 br label %putchar_unlocked.exit23.i putchar_unlocked.exit23.i: ; preds = %cond.false.i21.i, %cond.true.i18.i %80 = and i64 %indvars.iv.next31.i, 4294967295 %tobool3.not.i = icmp eq i64 %80, 0 br i1 %tobool3.not.i, label %while.end9.i, label %while.body4.i, !llvm.loop !22 while.end9.i: ; preds = %putchar_unlocked.exit23.i call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %buf.i) #12 br label %put_uint.exit put_uint.exit: ; preds = %cond.true.i.i253, %cond.false.i.i255, %while.end9.i %81 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %81, i64 0, i32 5 %82 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !19 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %81, i64 0, i32 6 %83 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !20 %cmp.not.i = icmp ult ptr %82, %83 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %put_uint.exit %call.i257 = tail call i32 @__overflow(ptr noundef nonnull %81, i32 noundef 32) #12 br label %putchar_unlocked.exit cond.false.i: ; preds = %put_uint.exit %incdec.ptr.i = getelementptr inbounds i8, ptr %82, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !19 store i8 32, ptr %82, align 1, !tbaa !16 br label %putchar_unlocked.exit putchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i %arrayidx84 = getelementptr inbounds i32, ptr %vla75, i64 %indvars.iv %84 = load i32, ptr %arrayidx84, align 4, !tbaa !27 %tobool.not.i260 = icmp eq i32 %84, 0 br i1 %tobool.not.i260, label %if.then.i290, label %if.end.i261 if.then.i290: ; preds = %putchar_unlocked.exit %85 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i291 = getelementptr inbounds %struct._IO_FILE, ptr %85, i64 0, i32 5 %86 = load ptr, ptr %_IO_write_ptr.i.i291, align 8, !tbaa !19 %_IO_write_end.i.i292 = getelementptr inbounds %struct._IO_FILE, ptr %85, i64 0, i32 6 %87 = load ptr, ptr %_IO_write_end.i.i292, align 8, !tbaa !20 %cmp.not.i.i293 = icmp ult ptr %86, %87 br i1 %cmp.not.i.i293, label %cond.false.i.i296, label %cond.true.i.i294, !prof !15 cond.true.i.i294: ; preds = %if.then.i290 %call.i.i295 = tail call i32 @__overflow(ptr noundef nonnull %85, i32 noundef 48) #12 br label %put_uint.exit298 cond.false.i.i296: ; preds = %if.then.i290 %incdec.ptr.i.i297 = getelementptr inbounds i8, ptr %86, i64 1 store ptr %incdec.ptr.i.i297, ptr %_IO_write_ptr.i.i291, align 8, !tbaa !19 store i8 48, ptr %86, align 1, !tbaa !16 br label %put_uint.exit298 if.end.i261: ; preds = %putchar_unlocked.exit call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %buf.i259) #12 br label %while.body.i262 while.body.i262: ; preds = %while.body.i262, %if.end.i261 %indvars.iv28.i263 = phi i32 [ 1, %if.end.i261 ], [ %indvars.iv.next29.i273, %while.body.i262 ] %indvars.iv.i264 = phi i64 [ 0, %if.end.i261 ], [ %indvars.iv.next.i268, %while.body.i262 ] %n.addr.024.i265 = phi i32 [ %84, %if.end.i261 ], [ %div.i270, %while.body.i262 ] %rem.i266 = srem i32 %n.addr.024.i265, 10 %88 = trunc i32 %rem.i266 to i8 %conv.i267 = add nsw i8 %88, 48 %indvars.iv.next.i268 = add nuw i64 %indvars.iv.i264, 1 %arrayidx.i269 = getelementptr inbounds [11 x i8], ptr %buf.i259, i64 0, i64 %indvars.iv.i264 store i8 %conv.i267, ptr %arrayidx.i269, align 1, !tbaa !16 %div.i270 = sdiv i32 %n.addr.024.i265, 10 %n.addr.024.off.i271 = add i32 %n.addr.024.i265, 9 %tobool1.not.i272 = icmp ult i32 %n.addr.024.off.i271, 19 %indvars.iv.next29.i273 = add nuw i32 %indvars.iv28.i263, 1 br i1 %tobool1.not.i272, label %while.body4.preheader.i274, label %while.body.i262, !llvm.loop !21 while.body4.preheader.i274: ; preds = %while.body.i262 %89 = sext i32 %indvars.iv28.i263 to i64 br label %while.body4.i275 while.body4.i275: ; preds = %putchar_unlocked.exit23.i285, %while.body4.preheader.i274 %indvars.iv30.i276 = phi i64 [ %89, %while.body4.preheader.i274 ], [ %indvars.iv.next31.i277, %putchar_unlocked.exit23.i285 ] %indvars.iv.next31.i277 = add nsw i64 %indvars.iv30.i276, -1 %arrayidx6.i278 = getelementptr inbounds [11 x i8], ptr %buf.i259, i64 0, i64 %indvars.iv.next31.i277 %90 = load i8, ptr %arrayidx6.i278, align 1, !tbaa !16 %91 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15.i279 = getelementptr inbounds %struct._IO_FILE, ptr %91, i64 0, i32 5 %92 = load ptr, ptr %_IO_write_ptr.i15.i279, align 8, !tbaa !19 %_IO_write_end.i16.i280 = getelementptr inbounds %struct._IO_FILE, ptr %91, i64 0, i32 6 %93 = load ptr, ptr %_IO_write_end.i16.i280, align 8, !tbaa !20 %cmp.not.i17.i281 = icmp ult ptr %92, %93 br i1 %cmp.not.i17.i281, label %cond.false.i21.i288, label %cond.true.i18.i282, !prof !15 cond.true.i18.i282: ; preds = %while.body4.i275 %conv7.i283 = zext i8 %90 to i32 %call.i19.i284 = tail call i32 @__overflow(ptr noundef nonnull %91, i32 noundef %conv7.i283) #12 br label %putchar_unlocked.exit23.i285 cond.false.i21.i288: ; preds = %while.body4.i275 %incdec.ptr.i22.i289 = getelementptr inbounds i8, ptr %92, i64 1 store ptr %incdec.ptr.i22.i289, ptr %_IO_write_ptr.i15.i279, align 8, !tbaa !19 store i8 %90, ptr %92, align 1, !tbaa !16 br label %putchar_unlocked.exit23.i285 putchar_unlocked.exit23.i285: ; preds = %cond.false.i21.i288, %cond.true.i18.i282 %94 = and i64 %indvars.iv.next31.i277, 4294967295 %tobool3.not.i286 = icmp eq i64 %94, 0 br i1 %tobool3.not.i286, label %while.end9.i287, label %while.body4.i275, !llvm.loop !22 while.end9.i287: ; preds = %putchar_unlocked.exit23.i285 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %buf.i259) #12 br label %put_uint.exit298 put_uint.exit298: ; preds = %cond.true.i.i294, %cond.false.i.i296, %while.end9.i287 %95 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i299 = getelementptr inbounds %struct._IO_FILE, ptr %95, i64 0, i32 5 %96 = load ptr, ptr %_IO_write_ptr.i299, align 8, !tbaa !19 %_IO_write_end.i300 = getelementptr inbounds %struct._IO_FILE, ptr %95, i64 0, i32 6 %97 = load ptr, ptr %_IO_write_end.i300, align 8, !tbaa !20 %cmp.not.i301 = icmp ult ptr %96, %97 br i1 %cmp.not.i301, label %cond.false.i306, label %cond.true.i302, !prof !15 cond.true.i302: ; preds = %put_uint.exit298 %call.i303 = tail call i32 @__overflow(ptr noundef nonnull %95, i32 noundef 10) #12 br label %putchar_unlocked.exit308 cond.false.i306: ; preds = %put_uint.exit298 %incdec.ptr.i307 = getelementptr inbounds i8, ptr %96, i64 1 store ptr %incdec.ptr.i307, ptr %_IO_write_ptr.i299, align 8, !tbaa !19 store i8 10, ptr %96, align 1, !tbaa !16 br label %putchar_unlocked.exit308 putchar_unlocked.exit308: ; preds = %cond.true.i302, %cond.false.i306 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond327.not = icmp eq i64 %indvars.iv.next, %12 br i1 %exitcond327.not, label %for.cond.cleanup80, label %for.body81, !llvm.loop !42 } declare i32 @__uflow(ptr noundef) local_unnamed_addr #8 declare i32 @__overflow(ptr noundef, i32 noundef) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #9 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #10 attributes #0 = { mustprogress nounwind willreturn 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 #6 = { mustprogress nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: readwrite) 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 #7 = { mustprogress nounwind willreturn allockind("realloc") allocsize(1) memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #8 = { "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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #10 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #11 = { nounwind allocsize(0) } attributes #12 = { nounwind } attributes #13 = { nounwind allocsize(1) } !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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 8} !10 = !{!"_IO_FILE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !12, i64 120, !13, i64 128, !7, i64 130, !7, i64 131, !6, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !11, i64 192, !7, i64 196} !11 = !{!"int", !7, i64 0} !12 = !{!"long", !7, i64 0} !13 = !{!"short", !7, i64 0} !14 = !{!10, !6, i64 16} !15 = !{!"branch_weights", i32 2000, i32 1} !16 = !{!7, !7, i64 0} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.mustprogress"} !19 = !{!10, !6, i64 40} !20 = !{!10, !6, i64 48} !21 = distinct !{!21, !18} !22 = distinct !{!22, !18} !23 = !{!24, !12, i64 8} !24 = !{!"BufHdr", !12, i64 0, !12, i64 8, !7, i64 16} !25 = !{!24, !12, i64 0} !26 = !{!12, !12, i64 0} !27 = !{!11, !11, i64 0} !28 = distinct !{!28, !18, !29, !30} !29 = !{!"llvm.loop.isvectorized", i32 1} !30 = !{!"llvm.loop.unroll.runtime.disable"} !31 = distinct !{!31, !18, !30, !29} !32 = !{i64 0, i64 4, !27, i64 4, i64 4, !27} !33 = !{i64 0, i64 4, !27} !34 = !{!35, !11, i64 0} !35 = !{!"Edge", !11, i64 0, !11, i64 4} !36 = distinct !{!36, !18} !37 = !{!35, !11, i64 4} !38 = distinct !{!38, !18} !39 = distinct !{!39, !18} !40 = distinct !{!40, !18} !41 = distinct !{!41, !18} !42 = distinct !{!42, !18}
#include<stdio.h> #include<stdlib.h> #define MAX 10000 struct node{ int key; int cost; struct node *next; }; typedef struct node *adj; adj G[MAX]; adj SuperNode(int key,int cost,adj Node){ adj n; n=(adj)malloc(sizeof(struct node)); n->key=key; n->cost=cost; n->next=Node; return n; } adj Insert(int a,int b,int c){ adj H; H=SuperNode(b,c,G[a]->next); G[a]->next=H; } int main(){ int i,j,n,count=0,v,c,c1,v1; int color[MAX],D[MAX],pi[MAX],nx,min; adj H; scanf("%d",&n); for(i = 0;i < n;i++)G[i]=SuperNode(0,0,NULL); for(i = 0;i < n;i++){ scanf("%d%d",&v,&c); for(j = 0;j <c;j++){ scanf("%d %d",&v1,&c1); Insert(i,v1,c1); } } for(i=0;i<n;i++){ color[i]=0; pi[i]=-1; D[i]=10000000; } D[0]=0; while(1){ min=10000000; for(i=0;i<n;i++){ if(color[i] != 2 && D[i] < min){ min=D[i]; nx=i; } } if(min==10000000)break; color[nx]=2; for(H=G[nx];H!=NULL;H=H->next){ if(color[H->key] !=2 && (H->cost+D[nx]) < D[H->key]){ pi[H->key]=nx; D[H->key]=H->cost+D[nx]; color[H->key]=1; } } } for(i=0;i<n;i++)printf("%d %d\n",i,D[i]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289112/source.c" 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" %struct.node = type { i32, i32, ptr } @G = dso_local local_unnamed_addr global [10000 x ptr] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable define dso_local noalias ptr @SuperNode(i32 noundef %key, i32 noundef %cost, ptr noundef %Node) local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #9 store i32 %key, ptr %call, align 8, !tbaa !5 %cost2 = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 1 store i32 %cost, ptr %cost2, align 4, !tbaa !11 %next = getelementptr inbounds %struct.node, ptr %call, i64 0, i32 2 store ptr %Node, ptr %next, align 8, !tbaa !12 ret ptr %call } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn uwtable define dso_local noalias ptr @Insert(i32 noundef %a, i32 noundef %b, i32 noundef %c) local_unnamed_addr #3 { entry: %idxprom = sext i32 %a to i64 %arrayidx = getelementptr inbounds [10000 x ptr], ptr @G, i64 0, i64 %idxprom %0 = load ptr, ptr %arrayidx, align 8, !tbaa !13 %next = getelementptr inbounds %struct.node, ptr %0, i64 0, i32 2 %1 = load ptr, ptr %next, align 8, !tbaa !12 %call.i = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #9 store i32 %b, ptr %call.i, align 8, !tbaa !5 %cost2.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 1 store i32 %c, ptr %cost2.i, align 4, !tbaa !11 %next.i = getelementptr inbounds %struct.node, ptr %call.i, i64 0, i32 2 store ptr %1, ptr %next.i, align 8, !tbaa !12 store ptr %call.i, ptr %next, align 8, !tbaa !12 ret ptr undef } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %n = alloca i32, align 4 %v = alloca i32, align 4 %c = alloca i32, align 4 %c1 = alloca i32, align 4 %v1 = alloca i32, align 4 %color = alloca [10000 x i32], align 16 %D = alloca [10000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c1) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v1) #10 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %color) #10 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %D) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !14 %cmp126 = icmp sgt i32 %0, 0 br i1 %cmp126, label %for.body.preheader, label %for.end28 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 br label %for.body for.cond2.preheader: ; preds = %for.body br i1 %cmp126, label %for.body4, label %for.end28 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %calloc = call dereferenceable_or_null(16) ptr @calloc(i64 1, i64 16) %arrayidx = getelementptr inbounds [10000 x ptr], ptr @G, i64 0, i64 %indvars.iv store ptr %calloc, ptr %arrayidx, align 8, !tbaa !13 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond2.preheader, label %for.body, !llvm.loop !15 for.cond17.preheader: ; preds = %for.inc14 %cmp18132 = icmp sgt i32 %12, 0 br i1 %cmp18132, label %for.body19.preheader, label %for.end28 for.body19.preheader: ; preds = %for.cond17.preheader %1 = zext i32 %12 to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color, i8 0, i64 %2, i1 false), !tbaa !14 %min.iters.check = icmp ult i32 %12, 8 br i1 %min.iters.check, label %for.body19.preheader172, label %vector.ph vector.ph: ; preds = %for.body19.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %index store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %3, align 16, !tbaa !14 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %4, align 16, !tbaa !14 %index.next = add nuw i64 %index, 8 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !17 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end28, label %for.body19.preheader172 for.body19.preheader172: ; preds = %for.body19.preheader, %middle.block %indvars.iv150.ph = phi i64 [ 0, %for.body19.preheader ], [ %n.vec, %middle.block ] br label %for.body19 for.body4: ; preds = %for.cond2.preheader, %for.inc14 %indvars.iv147 = phi i64 [ %indvars.iv.next148, %for.inc14 ], [ 0, %for.cond2.preheader ] %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %v, ptr noundef nonnull %c) %6 = load i32, ptr %c, align 4, !tbaa !14 %cmp7128 = icmp sgt i32 %6, 0 br i1 %cmp7128, label %for.body8.lr.ph, label %for.inc14 for.body8.lr.ph: ; preds = %for.body4 %arrayidx.i = getelementptr inbounds [10000 x ptr], ptr @G, i64 0, i64 %indvars.iv147 br label %for.body8 for.body8: ; preds = %for.body8.lr.ph, %for.body8 %j.0129 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc12, %for.body8 ] %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %v1, ptr noundef nonnull %c1) %7 = load i32, ptr %v1, align 4, !tbaa !14 %8 = load i32, ptr %c1, align 4, !tbaa !14 %9 = load ptr, ptr %arrayidx.i, align 8, !tbaa !13 %next.i125 = getelementptr inbounds %struct.node, ptr %9, i64 0, i32 2 %10 = load ptr, ptr %next.i125, align 8, !tbaa !12 %call.i.i = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #9 store i32 %7, ptr %call.i.i, align 8, !tbaa !5 %cost2.i.i = getelementptr inbounds %struct.node, ptr %call.i.i, i64 0, i32 1 store i32 %8, ptr %cost2.i.i, align 4, !tbaa !11 %next.i.i = getelementptr inbounds %struct.node, ptr %call.i.i, i64 0, i32 2 store ptr %10, ptr %next.i.i, align 8, !tbaa !12 store ptr %call.i.i, ptr %next.i125, align 8, !tbaa !12 %inc12 = add nuw nsw i32 %j.0129, 1 %11 = load i32, ptr %c, align 4, !tbaa !14 %cmp7 = icmp slt i32 %inc12, %11 br i1 %cmp7, label %for.body8, label %for.inc14, !llvm.loop !20 for.inc14: ; preds = %for.body8, %for.body4 %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1 %12 = load i32, ptr %n, align 4, !tbaa !14 %13 = sext i32 %12 to i64 %cmp3 = icmp slt i64 %indvars.iv.next148, %13 br i1 %cmp3, label %for.body4, label %for.cond17.preheader, !llvm.loop !21 for.body19: ; preds = %for.body19.preheader172, %for.body19 %indvars.iv150 = phi i64 [ %indvars.iv.next151, %for.body19 ], [ %indvars.iv150.ph, %for.body19.preheader172 ] %arrayidx25 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %indvars.iv150 store i32 10000000, ptr %arrayidx25, align 4, !tbaa !14 %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1 %exitcond154.not = icmp eq i64 %indvars.iv.next151, %1 br i1 %exitcond154.not, label %for.end28, label %for.body19, !llvm.loop !22 for.end28: ; preds = %for.body19, %middle.block, %entry, %for.cond2.preheader, %for.cond17.preheader %cmp18132164 = phi i1 [ false, %for.cond17.preheader ], [ false, %for.cond2.preheader ], [ false, %entry ], [ %cmp18132, %middle.block ], [ %cmp18132, %for.body19 ] %14 = phi i32 [ %12, %for.cond17.preheader ], [ %0, %for.cond2.preheader ], [ %0, %entry ], [ %12, %middle.block ], [ %12, %for.body19 ] store i32 0, ptr %D, align 16, !tbaa !14 %wide.trip.count158 = zext i32 %14 to i64 br i1 %cmp18132164, label %for.body32, label %for.end89 while.cond.loopexit: ; preds = %for.inc79, %if.end46 br i1 %cmp18132164, label %for.body32.backedge, label %for.end89 for.body32: ; preds = %for.end28, %for.body32.backedge %indvars.iv155 = phi i64 [ %indvars.iv155.be, %for.body32.backedge ], [ 0, %for.end28 ] %min.0137 = phi i32 [ %min.0137.be, %for.body32.backedge ], [ 10000000, %for.end28 ] %nx.1136 = phi i32 [ %nx.2, %for.body32.backedge ], [ undef, %for.end28 ] %arrayidx34 = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %indvars.iv155 %15 = load i32, ptr %arrayidx34, align 4, !tbaa !14 %cmp35.not = icmp eq i32 %15, 2 br i1 %cmp35.not, label %for.inc41, label %land.lhs.true land.lhs.true: ; preds = %for.body32 %arrayidx37 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %indvars.iv155 %16 = load i32, ptr %arrayidx37, align 4, !tbaa !14 %cmp38 = icmp slt i32 %16, %min.0137 %17 = trunc i64 %indvars.iv155 to i32 %spec.select = select i1 %cmp38, i32 %17, i32 %nx.1136 %spec.select124 = call i32 @llvm.smin.i32(i32 %16, i32 %min.0137) br label %for.inc41 for.inc41: ; preds = %land.lhs.true, %for.body32 %nx.2 = phi i32 [ %nx.1136, %for.body32 ], [ %spec.select, %land.lhs.true ] %min.1 = phi i32 [ %min.0137, %for.body32 ], [ %spec.select124, %land.lhs.true ] %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1 %exitcond159.not = icmp eq i64 %indvars.iv.next156, %wide.trip.count158 br i1 %exitcond159.not, label %for.end43, label %for.body32.backedge for.body32.backedge: ; preds = %for.inc41, %while.cond.loopexit %indvars.iv155.be = phi i64 [ %indvars.iv.next156, %for.inc41 ], [ 0, %while.cond.loopexit ] %min.0137.be = phi i32 [ %min.1, %for.inc41 ], [ 10000000, %while.cond.loopexit ] br label %for.body32, !llvm.loop !23 for.end43: ; preds = %for.inc41 %cmp44 = icmp eq i32 %min.1, 10000000 br i1 %cmp44, label %for.cond81.preheader, label %if.end46 for.cond81.preheader: ; preds = %for.end43 br i1 %cmp18132164, label %for.body83, label %for.end89 if.end46: ; preds = %for.end43 %idxprom47 = sext i32 %nx.2 to i64 %arrayidx48 = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %idxprom47 store i32 2, ptr %arrayidx48, align 4, !tbaa !14 %arrayidx50 = getelementptr inbounds [10000 x ptr], ptr @G, i64 0, i64 %idxprom47 %H.0140 = load ptr, ptr %arrayidx50, align 8, !tbaa !13 %cmp52.not141 = icmp eq ptr %H.0140, null br i1 %cmp52.not141, label %while.cond.loopexit, label %for.body53.lr.ph for.body53.lr.ph: ; preds = %if.end46 %arrayidx59 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %idxprom47 br label %for.body53 for.body53: ; preds = %for.body53.lr.ph, %for.inc79 %H.0142 = phi ptr [ %H.0140, %for.body53.lr.ph ], [ %H.0, %for.inc79 ] %18 = load i32, ptr %H.0142, align 8, !tbaa !5 %idxprom54 = sext i32 %18 to i64 %arrayidx55 = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %idxprom54 %19 = load i32, ptr %arrayidx55, align 4, !tbaa !14 %cmp56.not = icmp eq i32 %19, 2 br i1 %cmp56.not, label %for.inc79, label %land.lhs.true57 land.lhs.true57: ; preds = %for.body53 %cost = getelementptr inbounds %struct.node, ptr %H.0142, i64 0, i32 1 %20 = load i32, ptr %cost, align 4, !tbaa !11 %21 = load i32, ptr %arrayidx59, align 4, !tbaa !14 %add = add nsw i32 %21, %20 %arrayidx62 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %idxprom54 %22 = load i32, ptr %arrayidx62, align 4, !tbaa !14 %cmp63 = icmp slt i32 %add, %22 br i1 %cmp63, label %if.then64, label %for.inc79 if.then64: ; preds = %land.lhs.true57 store i32 %add, ptr %arrayidx62, align 4, !tbaa !14 store i32 1, ptr %arrayidx55, align 4, !tbaa !14 br label %for.inc79 for.inc79: ; preds = %for.body53, %land.lhs.true57, %if.then64 %next = getelementptr inbounds %struct.node, ptr %H.0142, i64 0, i32 2 %H.0 = load ptr, ptr %next, align 8, !tbaa !13 %cmp52.not = icmp eq ptr %H.0, null br i1 %cmp52.not, label %while.cond.loopexit, label %for.body53, !llvm.loop !24 for.body83: ; preds = %for.cond81.preheader, %for.body83 %indvars.iv160 = phi i64 [ %indvars.iv.next161, %for.body83 ], [ 0, %for.cond81.preheader ] %arrayidx85 = getelementptr inbounds [10000 x i32], ptr %D, i64 0, i64 %indvars.iv160 %23 = load i32, ptr %arrayidx85, align 4, !tbaa !14 %24 = trunc i64 %indvars.iv160 to i32 %call86 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %24, i32 noundef %23) %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1 %25 = load i32, ptr %n, align 4, !tbaa !14 %26 = sext i32 %25 to i64 %cmp82 = icmp slt i64 %indvars.iv.next161, %26 br i1 %cmp82, label %for.body83, label %for.end89, !llvm.loop !25 for.end89: ; preds = %while.cond.loopexit, %for.body83, %for.end28, %for.cond81.preheader call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %D) #10 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %color) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v1) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c1) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #10 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 ; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #8 attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #3 = { mustprogress nofree nounwind willreturn 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 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" } attributes #9 = { nounwind allocsize(0) } attributes #10 = { nounwind } !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, !7, i64 0} !6 = !{!"node", !7, i64 0, !7, i64 4, !10, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"any pointer", !8, i64 0} !11 = !{!6, !7, i64 4} !12 = !{!6, !10, i64 8} !13 = !{!10, !10, i64 0} !14 = !{!7, !7, i64 0} !15 = distinct !{!15, !16} !16 = !{!"llvm.loop.mustprogress"} !17 = distinct !{!17, !16, !18, !19} !18 = !{!"llvm.loop.isvectorized", i32 1} !19 = !{!"llvm.loop.unroll.runtime.disable"} !20 = distinct !{!20, !16} !21 = distinct !{!21, !16} !22 = distinct !{!22, !16, !19, !18} !23 = distinct !{!23, !16} !24 = distinct !{!24, !16} !25 = distinct !{!25, !16}
#include<stdio.h> #include<stdlib.h> #define M 10000 #define INF 200000 typedef struct{ int go,back,cost; }D; int n; int d[M]; D A[500000]; void root(int x){ int i; int flag = 0; d[0] = 0; while(flag != 1){ flag = 1; for(i=0; i<x; i++){ if(A[i].cost + d[A[i].back] < d[A[i].go]){ d[A[i].go] = A[i].cost + d[A[i].back]; flag = 0; } } } for(i=0; i<n; i++){ printf("%d %d\n",i,d[i]); } } int main(){ int i,j; int u,k,cnt=0; scanf("%d",&n); for(i=0; i<n; i++){ d[i] = INF; } for(i=0; i<n; i++){ scanf("%d %d",&u,&k); for(j=0; j<k; j++){ A[cnt].back = u; scanf("%d %d",&A[cnt].go,&A[cnt].cost); cnt++; } } root(cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289163/source.c" 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" %struct.D = type { i32, i32, i32 } @d = dso_local local_unnamed_addr global [10000 x i32] zeroinitializer, align 16 @A = dso_local global [500000 x %struct.D] zeroinitializer, align 16 @n = dso_local global i32 0, align 4 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @root(i32 noundef %x) local_unnamed_addr #0 { entry: store i32 0, ptr @d, align 16, !tbaa !5 %cmp144 = icmp sgt i32 %x, 0 br i1 %cmp144, label %for.cond.preheader.us.preheader, label %for.cond25.preheader for.cond.preheader.us.preheader: ; preds = %entry %wide.trip.count = zext i32 %x to i64 br label %for.body.us for.body.us: ; preds = %for.body.us.backedge, %for.cond.preheader.us.preheader %indvars.iv = phi i64 [ 0, %for.cond.preheader.us.preheader ], [ %indvars.iv.be, %for.body.us.backedge ] %flag.146.us = phi i32 [ 1, %for.cond.preheader.us.preheader ], [ %flag.146.us.be, %for.body.us.backedge ] %arrayidx.us = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv %cost.us = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv, i32 2 %0 = load i32, ptr %cost.us, align 4, !tbaa !9 %back.us = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv, i32 1 %1 = load i32, ptr %back.us, align 4, !tbaa !11 %idxprom4.us = sext i32 %1 to i64 %arrayidx5.us = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %idxprom4.us %2 = load i32, ptr %arrayidx5.us, align 4, !tbaa !5 %add.us = add nsw i32 %2, %0 %3 = load i32, ptr %arrayidx.us, align 4, !tbaa !12 %idxprom8.us = sext i32 %3 to i64 %arrayidx9.us = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %idxprom8.us %4 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cmp10.us = icmp slt i32 %add.us, %4 br i1 %cmp10.us, label %if.then.us, label %for.inc.us if.then.us: ; preds = %for.body.us store i32 %add.us, ptr %arrayidx9.us, align 4, !tbaa !5 br label %for.inc.us for.inc.us: ; preds = %if.then.us, %for.body.us %flag.2.us = phi i32 [ 0, %if.then.us ], [ %flag.146.us, %for.body.us ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.while.cond.loopexit_crit_edge.us, label %for.body.us.backedge for.body.us.backedge: ; preds = %for.inc.us, %for.cond.while.cond.loopexit_crit_edge.us %indvars.iv.be = phi i64 [ %indvars.iv.next, %for.inc.us ], [ 0, %for.cond.while.cond.loopexit_crit_edge.us ] %flag.146.us.be = phi i32 [ %flag.2.us, %for.inc.us ], [ 1, %for.cond.while.cond.loopexit_crit_edge.us ] br label %for.body.us, !llvm.loop !13 for.cond.while.cond.loopexit_crit_edge.us: ; preds = %for.inc.us %cmp.not.us = icmp eq i32 %flag.2.us, 1 br i1 %cmp.not.us, label %for.cond25.preheader, label %for.body.us.backedge for.cond25.preheader: ; preds = %for.cond.while.cond.loopexit_crit_edge.us, %entry %5 = load i32, ptr @n, align 4, !tbaa !5 %cmp2647 = icmp sgt i32 %5, 0 br i1 %cmp2647, label %for.body27, label %for.end32 for.body27: ; preds = %for.cond25.preheader, %for.body27 %indvars.iv50 = phi i64 [ %indvars.iv.next51, %for.body27 ], [ 0, %for.cond25.preheader ] %arrayidx29 = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %indvars.iv50 %6 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %7 = trunc i64 %indvars.iv50 to i32 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7, i32 noundef %6) %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1 %8 = load i32, ptr @n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp26 = icmp slt i64 %indvars.iv.next51, %9 br i1 %cmp26, label %for.body27, label %for.end32, !llvm.loop !15 for.end32: ; preds = %for.body27, %for.cond25.preheader ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %u = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #3 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp32 = icmp sgt i32 %0, 0 br i1 %cmp32, label %for.body.preheader, label %for.cond25.preheader.i.thread for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body.preheader52, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %1 = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 200000, i32 200000, i32 200000, i32 200000>, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> <i32 200000, i32 200000, i32 200000, i32 200000>, ptr %2, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %3 = icmp eq i64 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !16 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader52 for.body.preheader52: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block br i1 %cmp32, label %for.body3, label %for.cond25.preheader.i.thread for.body: ; preds = %for.body.preheader52, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader52 ] %arrayidx = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %indvars.iv store i32 200000, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond1.preheader, label %for.body, !llvm.loop !19 for.body3: ; preds = %for.cond1.preheader, %for.inc19 %cnt.040 = phi i32 [ %cnt.1.lcssa, %for.inc19 ], [ 0, %for.cond1.preheader ] %i.139 = phi i32 [ %inc20, %for.inc19 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %u, ptr noundef nonnull %k) %4 = load i32, ptr %k, align 4, !tbaa !5 %cmp634 = icmp sgt i32 %4, 0 br i1 %cmp634, label %for.body7.preheader, label %for.inc19 for.body7.preheader: ; preds = %for.body3 %5 = sext i32 %cnt.040 to i64 br label %for.body7 for.body7: ; preds = %for.body7.preheader, %for.body7 %indvars.iv44 = phi i64 [ %5, %for.body7.preheader ], [ %indvars.iv.next45, %for.body7 ] %j.035 = phi i32 [ 0, %for.body7.preheader ], [ %inc17, %for.body7 ] %6 = load i32, ptr %u, align 4, !tbaa !5 %arrayidx9 = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv44 %back = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv44, i32 1 store i32 %6, ptr %back, align 4, !tbaa !11 %cost = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv44, i32 2 %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx9, ptr noundef nonnull %cost) %indvars.iv.next45 = add nsw i64 %indvars.iv44, 1 %inc17 = add nuw nsw i32 %j.035, 1 %7 = load i32, ptr %k, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc17, %7 br i1 %cmp6, label %for.body7, label %for.inc19.loopexit, !llvm.loop !20 for.inc19.loopexit: ; preds = %for.body7 %8 = trunc i64 %indvars.iv.next45 to i32 br label %for.inc19 for.inc19: ; preds = %for.inc19.loopexit, %for.body3 %cnt.1.lcssa = phi i32 [ %cnt.040, %for.body3 ], [ %8, %for.inc19.loopexit ] %inc20 = add nuw nsw i32 %i.139, 1 %.pr = load i32, ptr @n, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc20, %.pr br i1 %cmp2, label %for.body3, label %for.end21, !llvm.loop !21 for.cond25.preheader.i.thread: ; preds = %entry, %for.cond1.preheader store i32 0, ptr @d, align 16, !tbaa !5 br label %root.exit for.end21: ; preds = %for.inc19 %9 = icmp sgt i32 %.pr, 0 store i32 0, ptr @d, align 16, !tbaa !5 %cmp144.i = icmp sgt i32 %cnt.1.lcssa, 0 br i1 %cmp144.i, label %for.cond.preheader.us.preheader.i, label %for.cond25.preheader.i for.cond.preheader.us.preheader.i: ; preds = %for.end21 %wide.trip.count.i = zext i32 %cnt.1.lcssa to i64 br label %for.body.us.i for.body.us.i: ; preds = %for.body.us.i.backedge, %for.cond.preheader.us.preheader.i %indvars.iv.i = phi i64 [ 0, %for.cond.preheader.us.preheader.i ], [ %indvars.iv.i.be, %for.body.us.i.backedge ] %flag.146.us.i = phi i32 [ 1, %for.cond.preheader.us.preheader.i ], [ %flag.146.us.i.be, %for.body.us.i.backedge ] %arrayidx.us.i = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv.i %cost.us.i = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv.i, i32 2 %10 = load i32, ptr %cost.us.i, align 4, !tbaa !9 %back.us.i = getelementptr inbounds [500000 x %struct.D], ptr @A, i64 0, i64 %indvars.iv.i, i32 1 %11 = load i32, ptr %back.us.i, align 4, !tbaa !11 %idxprom4.us.i = sext i32 %11 to i64 %arrayidx5.us.i = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %idxprom4.us.i %12 = load i32, ptr %arrayidx5.us.i, align 4, !tbaa !5 %add.us.i = add nsw i32 %12, %10 %13 = load i32, ptr %arrayidx.us.i, align 4, !tbaa !12 %idxprom8.us.i = sext i32 %13 to i64 %arrayidx9.us.i = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %idxprom8.us.i %14 = load i32, ptr %arrayidx9.us.i, align 4, !tbaa !5 %cmp10.us.i = icmp slt i32 %add.us.i, %14 br i1 %cmp10.us.i, label %if.then.us.i, label %for.inc.us.i if.then.us.i: ; preds = %for.body.us.i store i32 %add.us.i, ptr %arrayidx9.us.i, align 4, !tbaa !5 br label %for.inc.us.i for.inc.us.i: ; preds = %if.then.us.i, %for.body.us.i %flag.2.us.i = phi i32 [ 0, %if.then.us.i ], [ %flag.146.us.i, %for.body.us.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %for.cond.while.cond.loopexit_crit_edge.us.i, label %for.body.us.i.backedge for.body.us.i.backedge: ; preds = %for.inc.us.i, %for.cond.while.cond.loopexit_crit_edge.us.i %indvars.iv.i.be = phi i64 [ %indvars.iv.next.i, %for.inc.us.i ], [ 0, %for.cond.while.cond.loopexit_crit_edge.us.i ] %flag.146.us.i.be = phi i32 [ %flag.2.us.i, %for.inc.us.i ], [ 1, %for.cond.while.cond.loopexit_crit_edge.us.i ] br label %for.body.us.i, !llvm.loop !13 for.cond.while.cond.loopexit_crit_edge.us.i: ; preds = %for.inc.us.i %cmp.not.us.i = icmp eq i32 %flag.2.us.i, 1 br i1 %cmp.not.us.i, label %for.cond25.preheader.i, label %for.body.us.i.backedge for.cond25.preheader.i: ; preds = %for.cond.while.cond.loopexit_crit_edge.us.i, %for.end21 br i1 %9, label %for.body27.i, label %root.exit for.body27.i: ; preds = %for.cond25.preheader.i, %for.body27.i %indvars.iv50.i = phi i64 [ %indvars.iv.next51.i, %for.body27.i ], [ 0, %for.cond25.preheader.i ] %arrayidx29.i = getelementptr inbounds [10000 x i32], ptr @d, i64 0, i64 %indvars.iv50.i %15 = load i32, ptr %arrayidx29.i, align 4, !tbaa !5 %16 = trunc i64 %indvars.iv50.i to i32 %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %16, i32 noundef %15) %indvars.iv.next51.i = add nuw nsw i64 %indvars.iv50.i, 1 %17 = load i32, ptr @n, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp26.i = icmp slt i64 %indvars.iv.next51.i, %18 br i1 %cmp26.i, label %for.body27.i, label %root.exit, !llvm.loop !15 root.exit: ; preds = %for.body27.i, %for.cond25.preheader.i.thread, %for.cond25.preheader.i call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #3 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = !{!10, !6, i64 8} !10 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8} !11 = !{!10, !6, i64 4} !12 = !{!10, !6, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !14} !16 = distinct !{!16, !14, !17, !18} !17 = !{!"llvm.loop.isvectorized", i32 1} !18 = !{!"llvm.loop.unroll.runtime.disable"} !19 = distinct !{!19, !14, !18, !17} !20 = distinct !{!20, !14} !21 = distinct !{!21, !14}
#include<stdio.h> #include<stdlib.h> #define MAX_NUM 100001 #define INF 10000000 typedef struct{ int prev; int next; int cost; } Edge; Edge G[500000]; int d[MAX_NUM]; void da(int n, int count){ int i, min = 1; int d[MAX_NUM]; d[0] = 0; for(i=1; i<n; i++){ d[i] = INF; } while(min != 0){ min = 0; for(i=0; i<count; i++){ if(d[G[i].prev] + G[i].cost < d[G[i].next]){ d[G[i].next] = d[G[i].prev] + G[i].cost; min = 1; } } } for(i=0; i<n; i++) printf("%d %d\n", i, d[i]); return; } int main(void){ int i, j, NUM,n, v, u; int count=0; scanf("%d", &n); for(i=0; i<n; i++){ scanf("%d%d", &u, &NUM); for(j=0; j<NUM; j++){ G[count].prev = u; scanf("%d%d", &G[count].next, &G[count].cost); count++; } } da(n,count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289213/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289213/source.c" 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" %struct.Edge = type { i32, i32, i32 } @G = dso_local global [500000 x %struct.Edge] zeroinitializer, align 16 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @d = dso_local local_unnamed_addr global [100001 x i32] zeroinitializer, align 16 ; Function Attrs: nofree nounwind uwtable define dso_local void @da(i32 noundef %n, i32 noundef %count) local_unnamed_addr #0 { entry: %d = alloca [100001 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %d) #4 store i32 0, ptr %d, align 16, !tbaa !5 %cmp57 = icmp sgt i32 %n, 1 br i1 %cmp57, label %for.body.preheader, label %while.cond.preheader for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %0 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %n, 9 br i1 %min.iters.check, label %for.body.preheader75, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %0, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = or i64 %index, 1 %1 = getelementptr inbounds [100001 x i32], ptr %d, i64 0, i64 %offset.idx store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %1, align 4, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %2, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %3 = icmp eq i64 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %0, %n.vec br i1 %cmp.n, label %while.cond.preheader, label %for.body.preheader75 for.body.preheader75: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body while.cond.preheader: ; preds = %for.body, %middle.block, %entry %cmp459 = icmp sgt i32 %count, 0 br i1 %cmp459, label %for.cond3.preheader.us.preheader, label %for.cond34.preheader for.cond3.preheader.us.preheader: ; preds = %while.cond.preheader %wide.trip.count68 = zext i32 %count to i64 br label %for.body5.us for.body5.us: ; preds = %for.body5.us.backedge, %for.cond3.preheader.us.preheader %indvars.iv65 = phi i64 [ 0, %for.cond3.preheader.us.preheader ], [ %indvars.iv65.be, %for.body5.us.backedge ] %min.161.us = phi i32 [ 0, %for.cond3.preheader.us.preheader ], [ %min.161.us.be, %for.body5.us.backedge ] %arrayidx7.us = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65 %4 = load i32, ptr %arrayidx7.us, align 4, !tbaa !13 %idxprom8.us = sext i32 %4 to i64 %arrayidx9.us = getelementptr inbounds [100001 x i32], ptr %d, i64 0, i64 %idxprom8.us %5 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cost.us = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65, i32 2 %6 = load i32, ptr %cost.us, align 4, !tbaa !15 %add.us = add nsw i32 %6, %5 %next.us = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65, i32 1 %7 = load i32, ptr %next.us, align 4, !tbaa !16 %idxprom14.us = sext i32 %7 to i64 %arrayidx15.us = getelementptr inbounds [100001 x i32], ptr %d, i64 0, i64 %idxprom14.us %8 = load i32, ptr %arrayidx15.us, align 4, !tbaa !5 %cmp16.us = icmp slt i32 %add.us, %8 %spec.store.select.us = tail call i32 @llvm.smin.i32(i32 %add.us, i32 %8) store i32 %spec.store.select.us, ptr %arrayidx15.us, align 4 %spec.select.us = select i1 %cmp16.us, i32 1, i32 %min.161.us %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1 %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68 br i1 %exitcond69.not, label %for.cond3.while.cond.loopexit_crit_edge.us, label %for.body5.us.backedge for.body5.us.backedge: ; preds = %for.body5.us, %for.cond3.while.cond.loopexit_crit_edge.us %indvars.iv65.be = phi i64 [ %indvars.iv.next66, %for.body5.us ], [ 0, %for.cond3.while.cond.loopexit_crit_edge.us ] %min.161.us.be = phi i32 [ %spec.select.us, %for.body5.us ], [ 0, %for.cond3.while.cond.loopexit_crit_edge.us ] br label %for.body5.us, !llvm.loop !17 for.cond3.while.cond.loopexit_crit_edge.us: ; preds = %for.body5.us %cmp2.not.us = icmp eq i32 %spec.select.us, 0 br i1 %cmp2.not.us, label %for.cond34.preheader, label %for.body5.us.backedge for.body: ; preds = %for.body.preheader75, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader75 ] %arrayidx1 = getelementptr inbounds [100001 x i32], ptr %d, i64 0, i64 %indvars.iv store i32 10000000, ptr %arrayidx1, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %while.cond.preheader, label %for.body, !llvm.loop !18 for.cond34.preheader: ; preds = %for.cond3.while.cond.loopexit_crit_edge.us, %while.cond.preheader %cmp3562 = icmp sgt i32 %n, 0 br i1 %cmp3562, label %for.body36.preheader, label %for.end41 for.body36.preheader: ; preds = %for.cond34.preheader %wide.trip.count73 = zext i32 %n to i64 br label %for.body36 for.body36: ; preds = %for.body36.preheader, %for.body36 %indvars.iv70 = phi i64 [ 0, %for.body36.preheader ], [ %indvars.iv.next71, %for.body36 ] %arrayidx38 = getelementptr inbounds [100001 x i32], ptr %d, i64 0, i64 %indvars.iv70 %9 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %10 = trunc i64 %indvars.iv70 to i32 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %10, i32 noundef %9) %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1 %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73 br i1 %exitcond74.not, label %for.end41, label %for.body36, !llvm.loop !19 for.end41: ; preds = %for.body36, %for.cond34.preheader call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %d) #4 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d.i = alloca [100001 x i32], align 16 %NUM = alloca i32, align 4 %n = alloca i32, align 4 %u = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %NUM) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp23 = icmp sgt i32 %0, 0 br i1 %cmp23, label %for.body, label %for.cond34.preheader.i.thread for.cond34.preheader.i.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %d.i) #4 br label %da.exit for.body: ; preds = %entry, %for.inc11 %count.025 = phi i32 [ %count.1.lcssa, %for.inc11 ], [ 0, %entry ] %i.024 = phi i32 [ %inc12, %for.inc11 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %u, ptr noundef nonnull %NUM) %1 = load i32, ptr %NUM, align 4, !tbaa !5 %cmp320 = icmp sgt i32 %1, 0 br i1 %cmp320, label %for.body4.preheader, label %for.inc11 for.body4.preheader: ; preds = %for.body %2 = sext i32 %count.025 to i64 br label %for.body4 for.body4: ; preds = %for.body4.preheader, %for.body4 %indvars.iv = phi i64 [ %2, %for.body4.preheader ], [ %indvars.iv.next, %for.body4 ] %j.021 = phi i32 [ 0, %for.body4.preheader ], [ %inc10, %for.body4 ] %3 = load i32, ptr %u, align 4, !tbaa !5 %arrayidx = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv store i32 %3, ptr %arrayidx, align 4, !tbaa !13 %next = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv, i32 1 %cost = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv, i32 2 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %next, ptr noundef nonnull %cost) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %inc10 = add nuw nsw i32 %j.021, 1 %4 = load i32, ptr %NUM, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc10, %4 br i1 %cmp3, label %for.body4, label %for.inc11.loopexit, !llvm.loop !20 for.inc11.loopexit: ; preds = %for.body4 %5 = trunc i64 %indvars.iv.next to i32 br label %for.inc11 for.inc11: ; preds = %for.inc11.loopexit, %for.body %count.1.lcssa = phi i32 [ %count.025, %for.body ], [ %5, %for.inc11.loopexit ] %inc12 = add nuw nsw i32 %i.024, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc12, %6 br i1 %cmp, label %for.body, label %for.end13, !llvm.loop !21 for.end13: ; preds = %for.inc11 call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %d.i) #4 store i32 0, ptr %d.i, align 16, !tbaa !5 %cmp57.i = icmp sgt i32 %6, 1 br i1 %cmp57.i, label %for.body.preheader.i, label %while.cond.preheader.i for.body.preheader.i: ; preds = %for.end13 %wide.trip.count.i = zext i32 %6 to i64 %7 = add nsw i64 %wide.trip.count.i, -1 %min.iters.check = icmp ult i32 %6, 9 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.ph vector.ph: ; preds = %for.body.preheader.i %n.vec = and i64 %7, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = or i64 %index, 1 %8 = getelementptr inbounds [100001 x i32], ptr %d.i, i64 0, i64 %offset.idx store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %8, align 4, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %9, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !22 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %7, %n.vec br i1 %cmp.n, label %while.cond.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 1, %for.body.preheader.i ], [ %ind.end, %middle.block ] br label %for.body.i while.cond.preheader.i: ; preds = %for.body.i, %middle.block, %for.end13 %cmp459.i = icmp sgt i32 %count.1.lcssa, 0 br i1 %cmp459.i, label %for.cond3.preheader.us.preheader.i, label %for.cond34.preheader.i for.cond3.preheader.us.preheader.i: ; preds = %while.cond.preheader.i %wide.trip.count68.i = zext i32 %count.1.lcssa to i64 br label %for.body5.us.i for.body5.us.i: ; preds = %for.body5.us.i.backedge, %for.cond3.preheader.us.preheader.i %indvars.iv65.i = phi i64 [ 0, %for.cond3.preheader.us.preheader.i ], [ %indvars.iv65.i.be, %for.body5.us.i.backedge ] %min.161.us.i = phi i32 [ 0, %for.cond3.preheader.us.preheader.i ], [ %min.161.us.i.be, %for.body5.us.i.backedge ] %arrayidx7.us.i = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65.i %11 = load i32, ptr %arrayidx7.us.i, align 4, !tbaa !13 %idxprom8.us.i = sext i32 %11 to i64 %arrayidx9.us.i = getelementptr inbounds [100001 x i32], ptr %d.i, i64 0, i64 %idxprom8.us.i %12 = load i32, ptr %arrayidx9.us.i, align 4, !tbaa !5 %cost.us.i = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65.i, i32 2 %13 = load i32, ptr %cost.us.i, align 4, !tbaa !15 %add.us.i = add nsw i32 %13, %12 %next.us.i = getelementptr inbounds [500000 x %struct.Edge], ptr @G, i64 0, i64 %indvars.iv65.i, i32 1 %14 = load i32, ptr %next.us.i, align 4, !tbaa !16 %idxprom14.us.i = sext i32 %14 to i64 %arrayidx15.us.i = getelementptr inbounds [100001 x i32], ptr %d.i, i64 0, i64 %idxprom14.us.i %15 = load i32, ptr %arrayidx15.us.i, align 4, !tbaa !5 %cmp16.us.i = icmp slt i32 %add.us.i, %15 %spec.store.select.us.i = call i32 @llvm.smin.i32(i32 %add.us.i, i32 %15) store i32 %spec.store.select.us.i, ptr %arrayidx15.us.i, align 4 %spec.select.us.i = select i1 %cmp16.us.i, i32 1, i32 %min.161.us.i %indvars.iv.next66.i = add nuw nsw i64 %indvars.iv65.i, 1 %exitcond69.not.i = icmp eq i64 %indvars.iv.next66.i, %wide.trip.count68.i br i1 %exitcond69.not.i, label %for.cond3.while.cond.loopexit_crit_edge.us.i, label %for.body5.us.i.backedge for.body5.us.i.backedge: ; preds = %for.body5.us.i, %for.cond3.while.cond.loopexit_crit_edge.us.i %indvars.iv65.i.be = phi i64 [ %indvars.iv.next66.i, %for.body5.us.i ], [ 0, %for.cond3.while.cond.loopexit_crit_edge.us.i ] %min.161.us.i.be = phi i32 [ %spec.select.us.i, %for.body5.us.i ], [ 0, %for.cond3.while.cond.loopexit_crit_edge.us.i ] br label %for.body5.us.i, !llvm.loop !17 for.cond3.while.cond.loopexit_crit_edge.us.i: ; preds = %for.body5.us.i %cmp2.not.us.i = icmp eq i32 %spec.select.us.i, 0 br i1 %cmp2.not.us.i, label %for.cond34.preheader.i, label %for.body5.us.i.backedge for.body.i: ; preds = %for.body.i.preheader, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ] %arrayidx1.i = getelementptr inbounds [100001 x i32], ptr %d.i, i64 0, i64 %indvars.iv.i store i32 10000000, ptr %arrayidx1.i, align 4, !tbaa !5 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %while.cond.preheader.i, label %for.body.i, !llvm.loop !23 for.cond34.preheader.i: ; preds = %for.cond3.while.cond.loopexit_crit_edge.us.i, %while.cond.preheader.i %cmp3562.i = icmp sgt i32 %6, 0 br i1 %cmp3562.i, label %for.body36.preheader.i, label %da.exit for.body36.preheader.i: ; preds = %for.cond34.preheader.i %wide.trip.count73.i = zext i32 %6 to i64 br label %for.body36.i for.body36.i: ; preds = %for.body36.i, %for.body36.preheader.i %indvars.iv70.i = phi i64 [ 0, %for.body36.preheader.i ], [ %indvars.iv.next71.i, %for.body36.i ] %arrayidx38.i = getelementptr inbounds [100001 x i32], ptr %d.i, i64 0, i64 %indvars.iv70.i %16 = load i32, ptr %arrayidx38.i, align 4, !tbaa !5 %17 = trunc i64 %indvars.iv70.i to i32 %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %17, i32 noundef %16) %indvars.iv.next71.i = add nuw nsw i64 %indvars.iv70.i, 1 %exitcond74.not.i = icmp eq i64 %indvars.iv.next71.i, %wide.trip.count73.i br i1 %exitcond74.not.i, label %da.exit, label %for.body36.i, !llvm.loop !19 da.exit: ; preds = %for.body36.i, %for.cond34.preheader.i.thread, %for.cond34.preheader.i call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %d.i) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %NUM) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = !{!14, !6, i64 0} !14 = !{!"", !6, i64 0, !6, i64 4, !6, i64 8} !15 = !{!14, !6, i64 8} !16 = !{!14, !6, i64 4} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !12, !11} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10} !22 = distinct !{!22, !10, !11, !12} !23 = distinct !{!23, !10, !12, !11}
#include<stdio.h> int main(){ int i,j,N,p[10],f,a; char c[100]; while(1){ scanf("%d",&N); if(N==0){ break; } f = 0; for(i=0;i<N;i++){ p[i]=0; } scanf("%*c"); for(i=0;i<100;i++){ scanf("%c",&c[i]); j=i%N; if(c[i]=='M'){ p[j]++; }else if(c[i]=='S'){ f+=p[j]+1; p[j]=0; }else if(c[i]=='L'){ p[j]+=f+1; f=0; } } scanf("%*c"); for(i=0;i<N;i++){ for(j=i+1;j<N;j++){ if(p[i]>p[j]){ a=p[i]; p[i]=p[j]; p[j]=a; } } } for(i=0;i<N;i++){ if(i!=0){ printf(" "); } printf("%d",p[i]); }printf(" %d\n",f); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289257/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289257/source.c" 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 [4 x i8] c"%*c\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.4 = private unnamed_addr constant [5 x i8] c" %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %p = alloca [10 x i32], align 16 %c = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #5 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %p) #5 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %c) #5 %call133 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp134 = icmp eq i32 %0, 0 br i1 %cmp134, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end91 %1 = phi i32 [ %19, %for.end91 ], [ %0, %entry ] %cmp1123 = icmp sgt i32 %1, 0 br i1 %cmp1123, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %for.cond.preheader %2 = zext i32 %1 to i64 %3 = shl nuw nsw i64 %2, 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %p, i8 0, i64 %3, i1 false), !tbaa !5 br label %for.end for.end: ; preds = %for.body.preheader, %for.cond.preheader %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1) br label %for.body5 for.body5: ; preds = %for.end, %for.inc42 %indvars.iv = phi i64 [ 0, %for.end ], [ %indvars.iv.next, %for.inc42 ] %f.0125 = phi i32 [ 0, %for.end ], [ %f.1, %for.inc42 ] %arrayidx7 = getelementptr inbounds [100 x i8], ptr %c, i64 0, i64 %indvars.iv %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx7) %4 = load i32, ptr %N, align 4, !tbaa !5 %5 = trunc i64 %indvars.iv to i32 %rem = srem i32 %5, %4 %6 = load i8, ptr %arrayidx7, align 1, !tbaa !9 switch i8 %6, label %for.inc42 [ i8 77, label %if.then13 i8 83, label %if.then22 i8 76, label %if.then34 ] if.then13: ; preds = %for.body5 %idxprom14 = zext i32 %rem to i64 %arrayidx15 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %idxprom14 %7 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %inc16 = add nsw i32 %7, 1 store i32 %inc16, ptr %arrayidx15, align 4, !tbaa !5 br label %for.inc42 if.then22: ; preds = %for.body5 %idxprom23 = zext i32 %rem to i64 %arrayidx24 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %idxprom23 %8 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %add = add i32 %f.0125, 1 %add25 = add i32 %add, %8 store i32 0, ptr %arrayidx24, align 4, !tbaa !5 br label %for.inc42 if.then34: ; preds = %for.body5 %add35 = add nsw i32 %f.0125, 1 %idxprom36 = zext i32 %rem to i64 %arrayidx37 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %idxprom36 %9 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %add38 = add nsw i32 %add35, %9 store i32 %add38, ptr %arrayidx37, align 4, !tbaa !5 br label %for.inc42 for.inc42: ; preds = %for.body5, %if.then13, %if.then34, %if.then22 %f.1 = phi i32 [ %f.0125, %if.then13 ], [ %add25, %if.then22 ], [ 0, %if.then34 ], [ %f.0125, %for.body5 ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 100 br i1 %exitcond.not, label %for.end44, label %for.body5, !llvm.loop !10 for.end44: ; preds = %for.inc42 %call45 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1) %10 = load i32, ptr %N, align 4, !tbaa !5 %cmp47129 = icmp sgt i32 %10, 0 br i1 %cmp47129, label %for.body49.preheader, label %for.end91 for.body49.preheader: ; preds = %for.end44 %11 = zext i32 %10 to i64 %wide.trip.count146 = zext i32 %10 to i64 br label %for.body49 for.cond46.loopexit: ; preds = %for.inc71, %for.body49 %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1 %exitcond147.not = icmp eq i64 %indvars.iv.next144, %wide.trip.count146 br i1 %exitcond147.not, label %for.cond77.preheader, label %for.body49, !llvm.loop !12 for.cond77.preheader: ; preds = %for.cond46.loopexit br i1 %cmp47129, label %if.end85.peel, label %for.end91 if.end85.peel: ; preds = %for.cond77.preheader %12 = load i32, ptr %p, align 16, !tbaa !5 %call88.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %12) %13 = load i32, ptr %N, align 4, !tbaa !5 %cmp78.peel = icmp sgt i32 %13, 1 br i1 %cmp78.peel, label %if.end85, label %for.end91 for.body49: ; preds = %for.body49.preheader, %for.cond46.loopexit %indvars.iv143 = phi i64 [ 0, %for.body49.preheader ], [ %indvars.iv.next144, %for.cond46.loopexit ] %indvars.iv137 = phi i64 [ 1, %for.body49.preheader ], [ %indvars.iv.next138, %for.cond46.loopexit ] %indvars.iv.next144 = add nuw nsw i64 %indvars.iv143, 1 %cmp52127 = icmp ult i64 %indvars.iv.next144, %11 br i1 %cmp52127, label %for.body54.lr.ph, label %for.cond46.loopexit for.body54.lr.ph: ; preds = %for.body49 %arrayidx56 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %indvars.iv143 br label %for.body54 for.body54: ; preds = %for.body54.lr.ph, %for.inc71 %indvars.iv139 = phi i64 [ %indvars.iv137, %for.body54.lr.ph ], [ %indvars.iv.next140, %for.inc71 ] %14 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %arrayidx58 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %indvars.iv139 %15 = load i32, ptr %arrayidx58, align 4, !tbaa !5 %cmp59 = icmp sgt i32 %14, %15 br i1 %cmp59, label %if.then61, label %for.inc71 if.then61: ; preds = %for.body54 store i32 %15, ptr %arrayidx56, align 4, !tbaa !5 store i32 %14, ptr %arrayidx58, align 4, !tbaa !5 br label %for.inc71 for.inc71: ; preds = %for.body54, %if.then61 %indvars.iv.next140 = add nuw nsw i64 %indvars.iv139, 1 %exitcond142.not = icmp eq i64 %indvars.iv.next140, %wide.trip.count146 br i1 %exitcond142.not, label %for.cond46.loopexit, label %for.body54, !llvm.loop !13 if.end85: ; preds = %if.end85.peel, %if.end85 %indvars.iv148 = phi i64 [ %indvars.iv.next149, %if.end85 ], [ 1, %if.end85.peel ] %putchar = call i32 @putchar(i32 32) %arrayidx87 = getelementptr inbounds [10 x i32], ptr %p, i64 0, i64 %indvars.iv148 %16 = load i32, ptr %arrayidx87, align 4, !tbaa !5 %call88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %16) %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1 %17 = load i32, ptr %N, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp78 = icmp slt i64 %indvars.iv.next149, %18 br i1 %cmp78, label %if.end85, label %for.end91, !llvm.loop !14 for.end91: ; preds = %if.end85, %for.end44, %if.end85.peel, %for.cond77.preheader %call92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %f.1) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %19 = load i32, ptr %N, align 4, !tbaa !5 %cmp = icmp eq i32 %19, 0 br i1 %cmp, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end91, %entry call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %p) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !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"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11} !14 = distinct !{!14, !11, !15} !15 = !{!"llvm.loop.peeled.count", i32 1}
#include <stdio.h> int main(void){ int i,j,W,H; scanf("%d %d",&H, &W); while(W!=0 && H!=0){ for(i=1;i<=H;i++){ for(j=1;j<=W;j++){ printf("#"); } printf("\n"); } printf("\n"); scanf("%d %d",&H, &W); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289314/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289314/source.c" 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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %W = alloca i32, align 4 %H = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %W, align 4, !tbaa !5 %cmp21 = icmp ne i32 %0, 0 %1 = load i32, ptr %H, align 4 %cmp122 = icmp ne i32 %1, 0 %2 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end10 %3 = phi i32 [ %8, %for.end10 ], [ %1, %entry ] %cmp2.not19 = icmp slt i32 %3, 1 br i1 %cmp2.not19, label %for.end10, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.020 = phi i32 [ %inc9, %for.end ], [ 1, %for.cond.preheader ] %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not17 = icmp slt i32 %4, 1 br i1 %cmp4.not17, label %for.end, label %for.body5 for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.018 = phi i32 [ %inc, %for.body5 ], [ 1, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.018, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.018, %5 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.020, 1 %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.020, %6 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp = icmp ne i32 %7, 0 %8 = load i32, ptr %H, align 4 %cmp1 = icmp ne i32 %8, 0 %9 = select i1 %cmp, i1 %cmp1, i1 false br i1 %9, label %for.cond.preheader, label %while.end, !llvm.loop !12 while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main(void) { int h,w; int i,j; while(1){ scanf("%d %d",&h,&w); if( h==0 && w==0 )break; for( i=0; i<h; i++ ){ for( j=0; j<w; j++ ){ putchar('#'); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289358/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289358/source.c" 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 [6 x i8] c"%d %d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3 %call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp22 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp123 = icmp eq i32 %1, 0 %or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %or.cond24, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %9, %for.end10 ], [ %0, %entry ] %cmp219 = icmp sgt i32 %2, 0 br i1 %cmp219, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.020 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp417 = icmp sgt i32 %3, 0 br i1 %cmp417, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.018 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %4 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i = call noundef i32 @putc(i32 noundef 35, ptr noundef %4) %inc = add nuw nsw i32 %j.018, 1 %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %5 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body5, %for.cond3.preheader %6 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i15 = call noundef i32 @putc(i32 noundef 10, ptr noundef %6) %inc9 = add nuw nsw i32 %i.020, 1 %7 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %7 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !13 for.end10: ; preds = %for.end, %for.cond.preheader %8 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i16 = call noundef i32 @putc(i32 noundef 10, ptr noundef %8) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %9 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include <stdio.h> int main () { int h, w, i, j; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w == 0) break; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289422/source.c" 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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main() { int i,k,H,W; while(1){ scanf("%d %d",&H,&W); if(H ==0 & W ==0){ break; } for(k=0;k<H;k++){ for(i=0;i<W;i++){ printf("#"); } puts(""); } puts(""); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289466/source.c" 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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %1 = load i32, ptr %W, align 4, !tbaa !5 %2 = or i32 %1, %0 %and1725 = icmp eq i32 %2, 0 br i1 %and1725, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end13 %3 = phi i32 [ %7, %for.end13 ], [ %0, %entry ] %cmp322 = icmp sgt i32 %3, 0 br i1 %cmp322, label %for.cond5.preheader, label %for.end13 for.cond5.preheader: ; preds = %for.cond.preheader, %for.end %k.023 = phi i32 [ %inc12, %for.end ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp620 = icmp sgt i32 %4, 0 br i1 %cmp620, label %for.body8, label %for.end for.body8: ; preds = %for.cond5.preheader, %for.body8 %i.021 = phi i32 [ %inc, %for.body8 ], [ 0, %for.cond5.preheader ] %putchar19 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %i.021, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc, %5 br i1 %cmp6, label %for.body8, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body8, %for.cond5.preheader %putchar18 = call i32 @putchar(i32 10) %inc12 = add nuw nsw i32 %k.023, 1 %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc12, %6 br i1 %cmp3, label %for.cond5.preheader, label %for.end13, !llvm.loop !11 for.end13: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %7 = load i32, ptr %H, align 4, !tbaa !5 %8 = load i32, ptr %W, align 4, !tbaa !5 %9 = or i32 %8, %7 %and17 = icmp eq i32 %9, 0 br i1 %and17, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end13, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void){ int h,w,i,j; while(scanf("%d%d",&h,&w)){ if( h == 0 && w == 0 )break; for( i = 0 ; i < h ; i++ ){ for( j = 0 ; j < w ; j++ ){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289509/source.c" 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 [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %tobool.not21 = icmp eq i32 %call20, 0 br i1 %tobool.not21, label %while.end, label %while.body while.body: ; preds = %entry, %for.end10 %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %while.body %cmp218 = icmp sgt i32 %0, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %2, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %3 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %4 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %tobool.not = icmp eq i32 %call, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %for.end10, %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main(int argc, const char * argv[]) { int h, w, i, j; scanf("%d", &h); scanf("%d", &w); while (1) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { printf("#"); } printf("\n"); } if (h == 0 && w == 0) { break; } printf("\n"); scanf("%d", &h); scanf("%d", &w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289617/source.c" 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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 br label %while.cond while.cond: ; preds = %if.end, %entry %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h) %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp sgt i32 %0, 0 br i1 %cmp21, label %for.cond2.preheader, label %for.end9 for.cond2.preheader: ; preds = %while.cond, %for.end %i.022 = phi i32 [ %inc8, %for.end ], [ 0, %while.cond ] %1 = load i32, ptr %w, align 4, !tbaa !5 %cmp319 = icmp sgt i32 %1, 0 br i1 %cmp319, label %for.body4, label %for.end for.body4: ; preds = %for.cond2.preheader, %for.body4 %j.020 = phi i32 [ %inc, %for.body4 ], [ 0, %for.cond2.preheader ] %putchar18 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.020, 1 %2 = load i32, ptr %w, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %2 br i1 %cmp3, label %for.body4, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body4, %for.cond2.preheader %putchar17 = call i32 @putchar(i32 10) %inc8 = add nuw nsw i32 %i.022, 1 %3 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp slt i32 %inc8, %3 br i1 %cmp, label %for.cond2.preheader, label %for.end9, !llvm.loop !11 for.end9: ; preds = %for.end, %while.cond %.lcssa = phi i32 [ %0, %while.cond ], [ %3, %for.end ] %cmp10 = icmp eq i32 %.lcssa, 0 %4 = load i32, ptr %w, align 4 %cmp11 = icmp eq i32 %4, 0 %or.cond = select i1 %cmp10, i1 %cmp11, i1 false br i1 %or.cond, label %while.end, label %if.end if.end: ; preds = %for.end9 %putchar = call i32 @putchar(i32 10) br label %while.cond while.end: ; preds = %for.end9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { char a[2]; scanf("%c",a); //printf("%c",a[0]); if (a[0] >= 'A' && a[0] <='Z') { printf("A"); return 0; } printf("a"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289668/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [2 x i8], align 1 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 %. = select i1 %or.cond, i32 65, i32 97 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include <stdio.h> int main(){ char c; scanf("%c",&c); if(c>='a'&&c<='z') printf("a"); else printf("A"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289718/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289718/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i8, ptr %c, align 1 %1 = add i8 %0, -97 %or.cond = icmp ult i8 %1, 26 %. = select i1 %or.cond, i32 97, i32 65 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include <stdlib.h> #include <stdio.h> #include <stdio.h> #include <string.h> #include <limits.h> int main() { char str ; scanf("%c",&str); int d = str; if (d>=65 && d<=92) printf("A"); else printf("a"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289761/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289761/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %str) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %0 = load i8, ptr %str, align 1, !tbaa !5 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 28 %. = select i1 %or.cond, i32 65, i32 97 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %str) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ char moji; int a; a = scanf("%c",&moji); if(('a' <= moji) && ( moji <= 'z')){ printf("a"); }else{ printf("A"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289804/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289804/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %moji = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %moji) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %moji) %0 = load i8, ptr %moji, align 1 %1 = add i8 %0, -97 %or.cond = icmp ult i8 %1, 26 %. = select i1 %or.cond, i32 97, i32 65 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %moji) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include<stdio.h> int main() { char x; scanf("%c", &x); if(65<=x && x<=90) printf("A"); else printf("a"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289855/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i8, ptr %x, align 1 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 %. = select i1 %or.cond, i32 65, i32 97 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include <stdio.h> int main(){ char a; scanf("%c",&a); if(a<='Z' && a>='A'){ printf("A\n"); }else{ printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289899/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289899/source.c" 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"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"a\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 %str.3.str = select i1 %or.cond, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include<stdio.h> #include<ctype.h> int main(){ int x; char y; scanf("%c",&y); x=y; if(islower(x)){printf("a\n");} else{printf("A\n");} }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289949/source.c" 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"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"A\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"a\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %y = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %y) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %y) %0 = load i8, ptr %y, align 1, !tbaa !5 %call1 = tail call ptr @__ctype_b_loc() #6 %1 = load ptr, ptr %call1, align 8, !tbaa !8 %idxprom = sext i8 %0 to i64 %arrayidx = getelementptr inbounds i16, ptr %1, i64 %idxprom %2 = load i16, ptr %arrayidx, align 2, !tbaa !10 %3 = and i16 %2, 512 %tobool.not = icmp eq i16 %3, 0 %str.str.3 = select i1 %tobool.not, ptr @str, ptr @str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %y) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) declare ptr @__ctype_b_loc() local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(none) } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"any pointer", !6, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"short", !6, i64 0}
#include <stdio.h> int main(){ char p; scanf("%s",&p); if((p>='a')&&(p<='z')){ printf("a"); } else if ((p>='A')&&(p<='Z')){ printf("A"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289992/source.c" 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"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %p = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %p) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p) %0 = load i8, ptr %p, align 1 %1 = add i8 %0, -97 %or.cond = icmp ult i8 %1, 26 br i1 %or.cond, label %if.end15.sink.split, label %if.else if.else: ; preds = %entry %2 = add i8 %0, -65 %or.cond16 = icmp ult i8 %2, 26 br i1 %or.cond16, label %if.end15.sink.split, label %if.end15 if.end15.sink.split: ; preds = %if.else, %entry %.sink = phi i32 [ 97, %entry ], [ 65, %if.else ] %putchar = call i32 @putchar(i32 %.sink) br label %if.end15 if.end15: ; preds = %if.end15.sink.split, %if.else call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %p) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include <stdio.h> int main(){ char a; scanf("%c",&a); if(0 <=a - 'A' && a-'A' <='Z'-'A'){ printf("A\n"); } else{ printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290033/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290033/source.c" 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"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"a\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1, !tbaa !5 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 %str.3.str = select i1 %or.cond, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int ch; ch=getchar(); if(ch>='a'&&ch<='z') putchar('a'); else if(ch>='A'&&ch<='Z') putchar('A'); putchar('\n'); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290077/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290077/source.c" 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" @stdin = external local_unnamed_addr global ptr, align 8 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %0) %1 = add i32 %call.i, -97 %or.cond = icmp ult i32 %1, 26 br i1 %or.cond, label %if.end8.sink.split, label %if.else if.else: ; preds = %entry %2 = add i32 %call.i, -65 %or.cond10 = icmp ult i32 %2, 26 br i1 %or.cond10, label %if.end8.sink.split, label %if.end8 if.end8.sink.split: ; preds = %if.else, %entry %.sink = phi i32 [ 97, %entry ], [ 65, %if.else ] %3 = load ptr, ptr @stdout, align 8, !tbaa !5 %call.i15 = tail call i32 @putc(i32 noundef %.sink, ptr noundef %3) br label %if.end8 if.end8: ; preds = %if.end8.sink.split, %if.else %4 = load ptr, ptr @stdout, align 8, !tbaa !5 %call.i16 = tail call i32 @putc(i32 noundef 10, ptr noundef %4) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #1 attributes #0 = { 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 #1 = { 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" } !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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int T; scanf("%d",&T); while(T--) { int n; scanf("%d",&n); char a[n+1],b[n+1],c[n+1]; b[0]='1'; scanf("%s",a); c[0]=a[0]+b[0]-'0'; for(int i=1;i<n;i++) { if(a[i]+1==c[i-1]) b[i]='0'; else b[i]='1'; c[i]=a[i]+b[i]-'0'; } b[n]='\0'; puts(b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29012/source.c" 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 [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %T = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !5 %dec51 = add nsw i32 %0, -1 store i32 %dec51, ptr %T, align 4, !tbaa !5 %tobool.not52 = icmp eq i32 %0, 0 br i1 %tobool.not52, label %while.end, label %while.body while.body: ; preds = %entry, %for.cond.cleanup call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %1, 1 %2 = zext i32 %add to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i8, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !5 %add2 = add nsw i32 %4, 1 %5 = zext i32 %add2 to i64 %vla3 = alloca i8, i64 %5, align 16 store i8 49, ptr %vla3, align 16, !tbaa !9 %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla) %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp49 = icmp sgt i32 %6, 1 br i1 %cmp49, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %while.body %7 = load i8, ptr %vla, align 16, !tbaa !9 %sub = add i8 %7, 1 %wide.trip.count = zext i32 %6 to i64 %8 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %8, 1 %9 = icmp eq i32 %6, 2 br i1 %9, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %8, -2 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %.unr = phi i8 [ %sub, %for.body.preheader ], [ %sub34.1, %for.body ] %indvars.iv.unr = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa %arrayidx14.epil = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv.unr %10 = load i8, ptr %arrayidx14.epil, align 1, !tbaa !9 %conv15.epil = sext i8 %10 to i32 %add16.epil = add nsw i32 %conv15.epil, 1 %conv20.epil = sext i8 %.unr to i32 %cmp21.epil = icmp eq i32 %add16.epil, %conv20.epil %spec.select.epil = select i1 %cmp21.epil, i8 48, i8 49 %11 = getelementptr inbounds i8, ptr %vla3, i64 %indvars.iv.unr store i8 %spec.select.epil, ptr %11, align 1 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.epil, %for.cond.cleanup.loopexit.unr-lcssa, %while.body %idxprom38 = sext i32 %6 to i64 %arrayidx39 = getelementptr inbounds i8, ptr %vla3, i64 %idxprom38 store i8 0, ptr %arrayidx39, align 1, !tbaa !9 %call40 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %vla3) call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 %12 = load i32, ptr %T, align 4, !tbaa !5 %dec = add nsw i32 %12, -1 store i32 %dec, ptr %T, align 4, !tbaa !5 %tobool.not = icmp eq i32 %12, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !10 for.body: ; preds = %for.body, %for.body.preheader.new %13 = phi i8 [ %sub, %for.body.preheader.new ], [ %sub34.1, %for.body ] %indvars.iv = phi i64 [ 1, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx14 = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv %14 = load i8, ptr %arrayidx14, align 1, !tbaa !9 %conv15 = sext i8 %14 to i32 %add16 = add nsw i32 %conv15, 1 %conv20 = sext i8 %13 to i32 %cmp21 = icmp eq i32 %add16, %conv20 %spec.select = select i1 %cmp21, i8 48, i8 49 %15 = getelementptr inbounds i8, ptr %vla3, i64 %indvars.iv store i8 %spec.select, ptr %15, align 1 %add33 = add i8 %14, -48 %sub34 = add i8 %add33, %spec.select %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx14.1 = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv.next %16 = load i8, ptr %arrayidx14.1, align 1, !tbaa !9 %conv15.1 = sext i8 %16 to i32 %add16.1 = add nsw i32 %conv15.1, 1 %conv20.1 = sext i8 %sub34 to i32 %cmp21.1 = icmp eq i32 %add16.1, %conv20.1 %spec.select.1 = select i1 %cmp21.1, i8 48, i8 49 %17 = getelementptr inbounds i8, ptr %vla3, i64 %indvars.iv.next store i8 %spec.select.1, ptr %17, align 1 %add33.1 = add i8 %16, -48 %sub34.1 = add i8 %add33.1, %spec.select.1 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !12 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !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"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main() { char a; scanf("%c",&a); if(a>='A' && a<='Z') { printf("A"); } else printf("a"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290163/source.c" 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"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 %. = select i1 %or.cond, i32 65, i32 97 %putchar = call i32 @putchar(i32 %.) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #define PI 3.141592653589793 int main(void) { char s; scanf("%c", &s); if ('A' <= s && s <= 'Z') { printf("A\n"); } if ('a' <= s && s<= 'z') { printf("a\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290206/source.c" 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"%c\00", align 1 @str = private unnamed_addr constant [2 x i8] c"A\00", align 1 @str.3 = private unnamed_addr constant [2 x i8] c"a\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1 %1 = add i8 %0, -65 %or.cond = icmp ult i8 %1, 26 br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i8, ptr %s, align 1 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i8 [ %.pre, %if.then ], [ %0, %entry ] %3 = add i8 %2, -97 %or.cond16 = icmp ult i8 %3, 26 br i1 %or.cond16, label %if.then13, label %if.end15 if.then13: ; preds = %if.end %puts17 = call i32 @puts(ptr nonnull dereferenceable(1) @str.3) br label %if.end15 if.end15: ; preds = %if.then13, %if.end call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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)"}
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int t; scanf("%d",&t); while(t--) { long int n,i; char b[100000],a[100000]; int s[100000]; scanf("%ld",&n); scanf("%s",b); a[0]='1'; s[0]=(a[0]-48)+(b[0]-48); for(i=1;i<n;i++) { a[i]='1'; s[i]=(a[i]-48)+(b[i]-48); if(s[i]==s[i-1]) { a[i]='0'; s[i]=(a[i]-48)+(b[i]-48); } else if(s[i]!=s[i-1]) continue; } for(i=0;i<n;i++) printf("%c",a[i]); printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29025/source.c" 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 [4 x i8] c"%ld\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i64, align 8 %b = alloca [100000 x i8], align 16 %a = alloca [100000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec69 = add nsw i32 %0, -1 store i32 %dec69, ptr %t, align 4, !tbaa !5 %tobool.not70 = icmp eq i32 %0, 0 br i1 %tobool.not70, label %while.end, label %while.body while.body: ; preds = %entry, %for.end48 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %a) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %b) store i8 49, ptr %a, align 16, !tbaa !9 %1 = load i64, ptr %n, align 8, !tbaa !10 %cmp65 = icmp sgt i64 %1, 1 br i1 %cmp65, label %for.body.preheader, label %for.cond39.preheader for.body.preheader: ; preds = %while.body %2 = load i8, ptr %b, align 16, !tbaa !9 %conv5 = sext i8 %2 to i32 %add = add nsw i32 %conv5, -47 %3 = add i64 %1, -1 %xtraiter = and i64 %3, 1 %4 = icmp eq i64 %1, 2 br i1 %4, label %for.cond39.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %3, -2 br label %for.body for.cond39.preheader.loopexit.unr-lcssa: ; preds = %for.inc.1, %for.body.preheader %.unr = phi i32 [ %add, %for.body.preheader ], [ %10, %for.inc.1 ] %i.066.unr = phi i64 [ 1, %for.body.preheader ], [ %inc.1, %for.inc.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond39.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond39.preheader.loopexit.unr-lcssa %arrayidx9.epil = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %i.066.unr store i8 49, ptr %arrayidx9.epil, align 1, !tbaa !9 %arrayidx13.epil = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %i.066.unr %5 = load i8, ptr %arrayidx13.epil, align 1, !tbaa !9 %conv14.epil = sext i8 %5 to i32 %add16.epil = add nsw i32 %conv14.epil, -47 %cmp21.epil = icmp eq i32 %add16.epil, %.unr %spec.store.select = select i1 %cmp21.epil, i8 48, i8 49 store i8 %spec.store.select, ptr %arrayidx9.epil, align 1 br label %for.cond39.preheader for.cond39.preheader: ; preds = %for.body.epil, %for.cond39.preheader.loopexit.unr-lcssa, %while.body %cmp4067 = icmp sgt i64 %1, 0 br i1 %cmp4067, label %for.body42, label %for.end48 for.body: ; preds = %for.inc.1, %for.body.preheader.new %6 = phi i32 [ %add, %for.body.preheader.new ], [ %10, %for.inc.1 ] %i.066 = phi i64 [ 1, %for.body.preheader.new ], [ %inc.1, %for.inc.1 ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ] %arrayidx9 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %i.066 store i8 49, ptr %arrayidx9, align 1, !tbaa !9 %arrayidx13 = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %i.066 %7 = load i8, ptr %arrayidx13, align 1, !tbaa !9 %conv14 = sext i8 %7 to i32 %add16 = add nsw i32 %conv14, -47 %cmp21 = icmp eq i32 %add16, %6 br i1 %cmp21, label %if.then, label %for.inc if.then: ; preds = %for.body store i8 48, ptr %arrayidx9, align 1, !tbaa !9 %sub29 = add nsw i32 %conv14, -48 br label %for.inc for.inc: ; preds = %for.body, %if.then %8 = phi i32 [ %add16, %for.body ], [ %sub29, %if.then ] %inc = add nuw nsw i64 %i.066, 1 %arrayidx9.1 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %inc store i8 49, ptr %arrayidx9.1, align 1, !tbaa !9 %arrayidx13.1 = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %inc %9 = load i8, ptr %arrayidx13.1, align 1, !tbaa !9 %conv14.1 = sext i8 %9 to i32 %add16.1 = add nsw i32 %conv14.1, -47 %cmp21.1 = icmp eq i32 %add16.1, %8 br i1 %cmp21.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc store i8 48, ptr %arrayidx9.1, align 1, !tbaa !9 %sub29.1 = add nsw i32 %conv14.1, -48 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %10 = phi i32 [ %add16.1, %for.inc ], [ %sub29.1, %if.then.1 ] %inc.1 = add nuw nsw i64 %i.066, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond39.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !12 for.body42: ; preds = %for.cond39.preheader, %for.body42 %i.168 = phi i64 [ %inc47, %for.body42 ], [ 0, %for.cond39.preheader ] %arrayidx43 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %i.168 %11 = load i8, ptr %arrayidx43, align 1, !tbaa !9 %conv44 = sext i8 %11 to i32 %putchar64 = call i32 @putchar(i32 %conv44) %inc47 = add nuw nsw i64 %i.168, 1 %12 = load i64, ptr %n, align 8, !tbaa !10 %cmp40 = icmp slt i64 %inc47, %12 br i1 %cmp40, label %for.body42, label %for.end48, !llvm.loop !14 for.end48: ; preds = %for.body42, %for.cond39.preheader %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 %13 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %13, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !15 while.end: ; preds = %for.end48, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"long", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !13}
#include <stdio.h> long long int checks[1000000]; int main() { long long int N, res = 0; scanf("%lld", &N); int pos = 0; long long int x = 1, sum = 0; while (pos < 1000000) { sum += x; x++; checks[pos++] = sum; } for (long long int i = 2; i * i <= N; i++) { if (N % i != 0) continue; long long int acc = 0; while(N % i == 0) { acc++; N /= i; } for (pos = 0; pos < 1000000; pos++) { if (acc < checks[pos]) { res += pos; break; } } } if (N != 1) res++; printf("%lld\n", res); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290293/source.c" 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 [5 x i8] c"%lld\00", align 1 @checks = dso_local local_unnamed_addr global [1000000 x i64] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) br label %while.body for.cond.preheader: ; preds = %while.body %N.promoted53 = load i64, ptr %N, align 8, !tbaa !5 %cmp2.not57 = icmp slt i64 %N.promoted53, 4 br i1 %cmp2.not57, label %for.cond.cleanup, label %for.body while.body: ; preds = %while.body, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next.3, %while.body ] %sum.046 = phi i64 [ 0, %entry ], [ %add.3, %while.body ] %x.045 = phi i64 [ 1, %entry ], [ %inc.3, %while.body ] %add = add nuw nsw i64 %sum.046, %x.045 %inc = add nuw nsw i64 %x.045, 1 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv store i64 %add, ptr %arrayidx, align 16, !tbaa !5 %add.1 = add nuw nsw i64 %add, %inc %inc.1 = add nuw nsw i64 %x.045, 2 %indvars.iv.next.1 = or i64 %indvars.iv, 2 %arrayidx.1 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next store i64 %add.1, ptr %arrayidx.1, align 8, !tbaa !5 %add.2 = add nuw nsw i64 %add.1, %inc.1 %inc.2 = add nuw nsw i64 %x.045, 3 %indvars.iv.next.2 = or i64 %indvars.iv, 3 %arrayidx.2 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next.1 store i64 %add.2, ptr %arrayidx.2, align 16, !tbaa !5 %add.3 = add nuw nsw i64 %add.2, %inc.2 %inc.3 = add nuw nsw i64 %x.045, 4 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %arrayidx.3 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next.2 store i64 %add.3, ptr %arrayidx.3, align 8, !tbaa !5 %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, 1000000 br i1 %exitcond.not.3, label %for.cond.preheader, label %while.body, !llvm.loop !9 for.cond.cleanup: ; preds = %for.inc20, %for.cond.preheader %res.0.lcssa = phi i64 [ 0, %for.cond.preheader ], [ %res.2, %for.inc20 ] %.lcssa = phi i64 [ %N.promoted53, %for.cond.preheader ], [ %div.lcssa54, %for.inc20 ] %cmp23.not = icmp ne i64 %.lcssa, 1 %inc26 = zext i1 %cmp23.not to i64 %spec.select = add nsw i64 %res.0.lcssa, %inc26 %call28 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %spec.select) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #3 ret i32 0 for.body: ; preds = %for.cond.preheader, %for.inc20 %i.060 = phi i64 [ %inc21, %for.inc20 ], [ 2, %for.cond.preheader ] %res.059 = phi i64 [ %res.2, %for.inc20 ], [ 0, %for.cond.preheader ] %div.lcssa5658 = phi i64 [ %div.lcssa54, %for.inc20 ], [ %N.promoted53, %for.cond.preheader ] %rem = srem i64 %div.lcssa5658, %i.060 %cmp3.not = icmp eq i64 %rem, 0 br i1 %cmp3.not, label %while.body7, label %for.inc20 for.cond10.preheader: ; preds = %while.body7 store i64 %div, ptr %N, align 8, !tbaa !5 br label %for.body12 while.body7: ; preds = %for.body, %while.body7 %acc.051 = phi i64 [ %inc8, %while.body7 ], [ 0, %for.body ] %div4750 = phi i64 [ %div, %while.body7 ], [ %div.lcssa5658, %for.body ] %inc8 = add nuw nsw i64 %acc.051, 1 %div = sdiv i64 %div4750, %i.060 %rem5 = srem i64 %div, %i.060 %cmp6 = icmp eq i64 %rem5, 0 br i1 %cmp6, label %while.body7, label %for.cond10.preheader, !llvm.loop !11 for.cond10: ; preds = %for.body12 %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %arrayidx14.1 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next67 %0 = load i64, ptr %arrayidx14.1, align 8, !tbaa !5 %cmp15.1 = icmp slt i64 %inc8, %0 br i1 %cmp15.1, label %if.then16, label %for.cond10.1 for.cond10.1: ; preds = %for.cond10 %indvars.iv.next67.1 = add nuw nsw i64 %indvars.iv66, 2 %arrayidx14.2 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next67.1 %1 = load i64, ptr %arrayidx14.2, align 8, !tbaa !5 %cmp15.2 = icmp slt i64 %inc8, %1 br i1 %cmp15.2, label %if.then16, label %for.cond10.2 for.cond10.2: ; preds = %for.cond10.1 %indvars.iv.next67.2 = add nuw nsw i64 %indvars.iv66, 3 %arrayidx14.3 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next67.2 %2 = load i64, ptr %arrayidx14.3, align 8, !tbaa !5 %cmp15.3 = icmp slt i64 %inc8, %2 br i1 %cmp15.3, label %if.then16, label %for.cond10.3 for.cond10.3: ; preds = %for.cond10.2 %indvars.iv.next67.3 = add nuw nsw i64 %indvars.iv66, 4 %arrayidx14.4 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv.next67.3 %3 = load i64, ptr %arrayidx14.4, align 8, !tbaa !5 %cmp15.4 = icmp slt i64 %inc8, %3 br i1 %cmp15.4, label %if.then16, label %for.cond10.4 for.cond10.4: ; preds = %for.cond10.3 %indvars.iv.next67.4 = add nuw nsw i64 %indvars.iv66, 5 %exitcond69.not.4 = icmp eq i64 %indvars.iv.next67.4, 1000000 br i1 %exitcond69.not.4, label %for.inc20, label %for.body12, !llvm.loop !12 for.body12: ; preds = %for.cond10.4, %for.cond10.preheader %indvars.iv66 = phi i64 [ 0, %for.cond10.preheader ], [ %indvars.iv.next67.4, %for.cond10.4 ] %arrayidx14 = getelementptr inbounds [1000000 x i64], ptr @checks, i64 0, i64 %indvars.iv66 %4 = load i64, ptr %arrayidx14, align 8, !tbaa !5 %cmp15 = icmp slt i64 %inc8, %4 br i1 %cmp15, label %if.then16, label %for.cond10 if.then16: ; preds = %for.cond10.3, %for.cond10.2, %for.cond10.1, %for.cond10, %for.body12 %indvars.iv66.lcssa = phi i64 [ %indvars.iv66, %for.body12 ], [ %indvars.iv.next67, %for.cond10 ], [ %indvars.iv.next67.1, %for.cond10.1 ], [ %indvars.iv.next67.2, %for.cond10.2 ], [ %indvars.iv.next67.3, %for.cond10.3 ] %add17 = add nsw i64 %res.059, %indvars.iv66.lcssa br label %for.inc20 for.inc20: ; preds = %for.cond10.4, %if.then16, %for.body %div.lcssa54 = phi i64 [ %div.lcssa5658, %for.body ], [ %div, %if.then16 ], [ %div, %for.cond10.4 ] %res.2 = phi i64 [ %res.059, %for.body ], [ %add17, %if.then16 ], [ %res.059, %for.cond10.4 ] %inc21 = add nuw nsw i64 %i.060, 1 %mul = mul nsw i64 %inc21, %inc21 %cmp2.not = icmp sgt i64 %mul, %div.lcssa54 br i1 %cmp2.not, label %for.cond.cleanup, label %for.body, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main(){ int n,m,max=0,s,i,a; scanf("%d %d",&n,&m); while(n--){ for(i=s=0;i<m;i++){ scanf("%d",&a); s+=a; } if(max<s)max=s; } printf("%d\n",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290336/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %dec11 = add nsw i32 %0, -1 store i32 %dec11, ptr %n, align 4, !tbaa !5 %tobool.not12 = icmp eq i32 %0, 0 br i1 %tobool.not12, label %while.end, label %for.cond.preheader.lr.ph for.cond.preheader.lr.ph: ; preds = %entry %1 = load i32, ptr %m, align 4, !tbaa !5 %2 = icmp sgt i32 %1, 0 br i1 %2, label %for.cond.preheader, label %for.cond.preheader.lr.ph.split.us for.cond.preheader.lr.ph.split.us: ; preds = %for.cond.preheader.lr.ph store i32 -1, ptr %n, align 4, !tbaa !5 br label %while.end for.cond.preheader: ; preds = %for.cond.preheader.lr.ph, %for.end %3 = phi i32 [ %dec, %for.end ], [ %dec11, %for.cond.preheader.lr.ph ] %4 = phi i32 [ %8, %for.end ], [ %1, %for.cond.preheader.lr.ph ] %max.013 = phi i32 [ %spec.select, %for.end ], [ 0, %for.cond.preheader.lr.ph ] %cmp8 = icmp sgt i32 %4, 0 br i1 %cmp8, label %for.body, label %for.end for.body: ; preds = %for.cond.preheader, %for.body %i.010 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %s.09 = phi i32 [ %add, %for.body ], [ 0, %for.cond.preheader ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %5 = load i32, ptr %a, align 4, !tbaa !5 %add = add nsw i32 %5, %s.09 %inc = add nuw nsw i32 %i.010, 1 %6 = load i32, ptr %m, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit, %for.cond.preheader %7 = phi i32 [ %3, %for.cond.preheader ], [ %.pre, %for.end.loopexit ] %8 = phi i32 [ %4, %for.cond.preheader ], [ %6, %for.end.loopexit ] %s.0.lcssa = phi i32 [ 0, %for.cond.preheader ], [ %add, %for.end.loopexit ] %spec.select = call i32 @llvm.smax.i32(i32 %max.013, i32 %s.0.lcssa) %dec = add nsw i32 %7, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %7, 0 br i1 %tobool.not, label %while.end, label %for.cond.preheader, !llvm.loop !11 while.end: ; preds = %for.end, %for.cond.preheader.lr.ph.split.us, %entry %max.0.lcssa = phi i32 [ 0, %entry ], [ 0, %for.cond.preheader.lr.ph.split.us ], [ %spec.select, %for.end ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"}
#include <stdio.h> #include <math.h> int main(void){ double n,k; double result; scanf("%lf%lf",&n,&k); result= k*(pow(k-1,n-1)); printf("%.0lf\n",result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290387/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290387/source.c" 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 [7 x i8] c"%lf%lf\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%.0lf\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca double, align 8 %k = alloca double, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load double, ptr %k, align 8, !tbaa !5 %sub = fadd double %0, -1.000000e+00 %1 = load double, ptr %n, align 8, !tbaa !5 %sub1 = fadd double %1, -1.000000e+00 %call2 = call double @pow(double noundef %sub, double noundef %sub1) #4 %mul = fmul double %0, %call2 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %mul) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nounwind } !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 = !{!"double", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> void scan_loop(int t); int main(){ int t; scanf("%d", &t); scan_loop(t); return 0; } void scan_loop(int t){ if (t==0) return; int n, i; scanf("%d", &n); int b[n]; char B[n]; scanf("%s", B); for (i=0;i<n;i++){ b[i] = (int)(B[i] - '0'); } int a[n]; a[0]=1; for (i=1; i<n; i++){ int lastsum = b[i-1]+a[i-1]; if (lastsum == 2){ if (b[i] == 1) a[i]=0; else a[i]=1; } if (lastsum == 1){ if (b[i] == 1) a[i]=1; else a[i]=0; } if (lastsum == 0){ a[i]=1; } } for (i=0;i<n;i++){ printf("%d", a[i]); } printf("\n"); scan_loop(t-1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29043/source.c" 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 [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 call void @scan_loop(i32 noundef %0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @scan_loop(i32 noundef %t) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %cmp = icmp eq i32 %t, 0 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i8, i64 %4, align 16 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla1) %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp388 = icmp sgt i32 %5, 0 br i1 %cmp388, label %for.body.preheader, label %for.end65 for.body.preheader: ; preds = %if.end %wide.trip.count = zext i32 %5 to i64 %min.iters.check = icmp ult i32 %5, 8 br i1 %min.iters.check, label %for.body.preheader110, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %6 = getelementptr inbounds i8, ptr %vla1, i64 %index %wide.load = load <4 x i8>, ptr %6, align 8, !tbaa !9 %7 = getelementptr inbounds i8, ptr %6, i64 4 %wide.load109 = load <4 x i8>, ptr %7, align 4, !tbaa !9 %8 = sext <4 x i8> %wide.load to <4 x i32> %9 = sext <4 x i8> %wide.load109 to <4 x i32> %10 = add nsw <4 x i32> %8, <i32 -48, i32 -48, i32 -48, i32 -48> %11 = add nsw <4 x i32> %9, <i32 -48, i32 -48, i32 -48, i32 -48> %12 = getelementptr inbounds i32, ptr %vla, i64 %index store <4 x i32> %10, ptr %12, align 16, !tbaa !5 %13 = getelementptr inbounds i32, ptr %12, i64 4 store <4 x i32> %11, ptr %13, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %14 = icmp eq i64 %index.next, %n.vec br i1 %14, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %for.body.preheader110 for.body.preheader110: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader110, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader110 ] %arrayidx = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv %15 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv = sext i8 %15 to i32 %sub = add nsw i32 %conv, -48 %arrayidx5 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv store i32 %sub, ptr %arrayidx5, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !14 for.end: ; preds = %for.body, %middle.block %vla6 = alloca i32, i64 %wide.trip.count, align 16 store i32 1, ptr %vla6, align 16, !tbaa !5 %cmp990 = icmp sgt i32 %5, 1 br i1 %cmp990, label %for.body11, label %for.cond56.preheader for.cond56.preheader: ; preds = %if.end52, %for.end br i1 %cmp388, label %for.body59, label %for.end65 for.body11: ; preds = %for.end, %if.end52 %indvars.iv95 = phi i64 [ %indvars.iv.next96, %if.end52 ], [ 1, %for.end ] %16 = add nsw i64 %indvars.iv95, -1 %arrayidx14 = getelementptr inbounds i32, ptr %vla, i64 %16 %17 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %arrayidx17 = getelementptr inbounds i32, ptr %vla6, i64 %16 %18 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %add = add nsw i32 %18, %17 switch i32 %add, label %if.end52 [ i32 2, label %if.then20 i32 1, label %if.then34 i32 0, label %if.then49 ] if.then20: ; preds = %for.body11 %arrayidx22 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv95 %19 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %cmp23 = icmp eq i32 %19, 1 %arrayidx27 = getelementptr inbounds i32, ptr %vla6, i64 %indvars.iv95 br i1 %cmp23, label %if.then25, label %if.else if.then25: ; preds = %if.then20 store i32 0, ptr %arrayidx27, align 4, !tbaa !5 br label %if.end52 if.else: ; preds = %if.then20 store i32 1, ptr %arrayidx27, align 4, !tbaa !5 br label %if.end52 if.then34: ; preds = %for.body11 %arrayidx36 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv95 %20 = load i32, ptr %arrayidx36, align 4, !tbaa !5 %cmp37 = icmp eq i32 %20, 1 %arrayidx41 = getelementptr inbounds i32, ptr %vla6, i64 %indvars.iv95 br i1 %cmp37, label %if.then39, label %if.else42 if.then39: ; preds = %if.then34 store i32 1, ptr %arrayidx41, align 4, !tbaa !5 br label %if.end52 if.else42: ; preds = %if.then34 store i32 0, ptr %arrayidx41, align 4, !tbaa !5 br label %if.end52 if.then49: ; preds = %for.body11 %arrayidx51 = getelementptr inbounds i32, ptr %vla6, i64 %indvars.iv95 store i32 1, ptr %arrayidx51, align 4, !tbaa !5 br label %if.end52 if.end52: ; preds = %if.else42, %if.then39, %if.else, %if.then25, %for.body11, %if.then49 %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1 %exitcond100.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count br i1 %exitcond100.not, label %for.cond56.preheader, label %for.body11, !llvm.loop !15 for.body59: ; preds = %for.cond56.preheader, %for.body59 %indvars.iv101 = phi i64 [ %indvars.iv.next102, %for.body59 ], [ 0, %for.cond56.preheader ] %arrayidx61 = getelementptr inbounds i32, ptr %vla6, i64 %indvars.iv101 %21 = load i32, ptr %arrayidx61, align 4, !tbaa !5 %call62 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %21) %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1 %22 = load i32, ptr %n, align 4, !tbaa !5 %23 = sext i32 %22 to i64 %cmp57 = icmp slt i64 %indvars.iv.next102, %23 br i1 %cmp57, label %for.body59, label %for.end65, !llvm.loop !16 for.end65: ; preds = %for.body59, %if.end, %for.cond56.preheader %putchar = call i32 @putchar(i32 10) %sub67 = add nsw i32 %t, -1 call void @scan_loop(i32 noundef %sub67) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 br label %return return: ; preds = %entry, %for.end65 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !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"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11}
#include<stdio.h> #include<math.h> int main(){ long long int n,k; scanf("%lld %lld",&n,&k); double x = pow(k - 1,n - 1); long long int y = x; printf("%lld",k * y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290473/source.c" 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 [10 x i8] c"%lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i64, ptr %k, align 8, !tbaa !5 %sub = add nsw i64 %0, -1 %conv = sitofp i64 %sub to double %1 = load i64, ptr %n, align 8, !tbaa !5 %sub1 = add nsw i64 %1, -1 %conv2 = sitofp i64 %sub1 to double %call3 = call double @pow(double noundef %conv, double noundef %conv2) #4 %conv4 = fptosi double %call3 to i64 %2 = load i64, ptr %k, align 8, !tbaa !5 %mul = mul nsw i64 %2, %conv4 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %mul) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nounwind } !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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<math.h> #include<stdlib.h> #define rep(index,num) for(int index=0;index<num;index++) #define eps 1e-15 typedef long long ll; int main(){ int N,K; ll nurikata; scanf("%d %d",&N,&K); printf("%d\n",(int)(K*pow(K-1,N-1))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290516/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %K = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %K) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %K) %0 = load i32, ptr %K, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %sub = add nsw i32 %0, -1 %conv1 = sitofp i32 %sub to double %1 = load i32, ptr %N, align 4, !tbaa !5 %sub2 = add nsw i32 %1, -1 %conv3 = sitofp i32 %sub2 to double %call4 = call double @pow(double noundef %conv1, double noundef %conv3) #4 %mul = fmul double %call4, %conv %conv5 = fptosi double %mul to i32 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nounwind } !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"}
#include <stdio.h> int c[1000001]; int a[500000]; int main() { int n, k, i = 0, j, cnt = 0; int max = -1, max_i, max_j; scanf("%d %d", &n, &k); for (j = 0; j < n; j++) { scanf("%d", &a[j]); if ((c[a[j]]++) == 0) cnt++; if (cnt > k) do { if ((--c[a[i]]) == 0) cnt--; i++; } while (cnt > k); if (j - i > max) { max = j - i; max_i = i; max_j = j; } } printf("%d %d", max_i + 1, max_j + 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29056/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @a = dso_local global [500000 x i32] zeroinitializer, align 16 @c = dso_local local_unnamed_addr global [1000001 x i32] zeroinitializer, align 16 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp42 = icmp sgt i32 %0, 0 call void @llvm.assume(i1 %cmp42) br label %for.body for.body: ; preds = %entry, %if.end20 %indvars.iv51 = phi i64 [ %indvars.iv.next52, %if.end20 ], [ 0, %entry ] %max_j.048 = phi i32 [ %max_j.1, %if.end20 ], [ undef, %entry ] %max_i.047 = phi i32 [ %max_i.1, %if.end20 ], [ undef, %entry ] %max.046 = phi i32 [ %max.1, %if.end20 ], [ -1, %entry ] %cnt.045 = phi i32 [ %cnt.4, %if.end20 ], [ 0, %entry ] %i.043 = phi i32 [ %i.2, %if.end20 ], [ 0, %entry ] %arrayidx = getelementptr inbounds [500000 x i32], ptr @a, i64 0, i64 %indvars.iv51 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %idxprom4 = sext i32 %1 to i64 %arrayidx5 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %idxprom4 %2 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %inc = add nsw i32 %2, 1 store i32 %inc, ptr %arrayidx5, align 4, !tbaa !5 %cmp6 = icmp eq i32 %2, 0 %inc7 = zext i1 %cmp6 to i32 %spec.select = add nsw i32 %cnt.045, %inc7 %3 = load i32, ptr %k, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %spec.select, %3 br i1 %cmp8, label %do.body.preheader, label %if.end20 do.body.preheader: ; preds = %for.body %4 = sext i32 %i.043 to i64 br label %do.body do.body: ; preds = %do.body.preheader, %do.body %indvars.iv = phi i64 [ %4, %do.body.preheader ], [ %indvars.iv.next, %do.body ] %cnt.2 = phi i32 [ %spec.select, %do.body.preheader ], [ %spec.select41, %do.body ] %arrayidx11 = getelementptr inbounds [500000 x i32], ptr @a, i64 0, i64 %indvars.iv %5 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %idxprom12 = sext i32 %5 to i64 %arrayidx13 = getelementptr inbounds [1000001 x i32], ptr @c, i64 0, i64 %idxprom12 %6 = load i32, ptr %arrayidx13, align 4, !tbaa !5 %dec = add nsw i32 %6, -1 store i32 %dec, ptr %arrayidx13, align 4, !tbaa !5 %cmp14 = icmp eq i32 %dec, 0 %dec16 = sext i1 %cmp14 to i32 %spec.select41 = add nsw i32 %cnt.2, %dec16 %indvars.iv.next = add i64 %indvars.iv, 1 %cmp19 = icmp sgt i32 %spec.select41, %3 br i1 %cmp19, label %do.body, label %if.end20.loopexit, !llvm.loop !9 if.end20.loopexit: ; preds = %do.body %7 = trunc i64 %indvars.iv.next to i32 br label %if.end20 if.end20: ; preds = %if.end20.loopexit, %for.body %i.2 = phi i32 [ %i.043, %for.body ], [ %7, %if.end20.loopexit ] %cnt.4 = phi i32 [ %spec.select, %for.body ], [ %spec.select41, %if.end20.loopexit ] %8 = trunc i64 %indvars.iv51 to i32 %sub = sub nsw i32 %8, %i.2 %cmp21 = icmp sgt i32 %sub, %max.046 %max.1 = call i32 @llvm.smax.i32(i32 %sub, i32 %max.046) %max_i.1 = select i1 %cmp21, i32 %i.2, i32 %max_i.047 %max_j.1 = select i1 %cmp21, i32 %8, i32 %max_j.048 %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1 %9 = load i32, ptr %n, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp = icmp slt i64 %indvars.iv.next52, %10 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !11 for.end.loopexit: ; preds = %if.end20 %11 = add nsw i32 %max_i.1, 1 %12 = add nsw i32 %max_j.1, 1 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %11, i32 noundef %12) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #define INF 999999999 int asumikana[512][512]; int main(void) { int N, M; int i, j, k; if (scanf("%d%d", &N, &M) != 2) return 1; for (i = 1; i <= N; i++) { for (j = 1; j <= N; j++) { asumikana[i][j] = INF; } asumikana[i][i] = 0; } for (i = 0; i < M; i++) { int a, b; if (scanf("%d%d", &a, &b) != 2) return 1; asumikana[a][b] = 1; } for (k = 1; k <= N; k++) { for (i = 1; i <= N; i++) { for (j = 1; j <= N; j++) { if (asumikana[i][j] > asumikana[i][k] + asumikana[k][j]) { asumikana[i][j] = asumikana[i][k] + asumikana[k][j]; } } } } for (i = 1; i <= N; i++) { int isFirst = 1; for (j = 1; j <= N; j++) { if (asumikana[i][j] < INF && asumikana[j][i] < INF) { if (!isFirst) putchar(' '); printf("%d", j); isFirst = 0; } } putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290602/source.c" 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 [5 x i8] c"%d%d\00", align 1 @asumikana = dso_local local_unnamed_addr global [512 x [512 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) %cmp.not = icmp eq i32 %call, 2 br i1 %cmp.not, label %for.cond.preheader, label %cleanup104 for.cond.preheader: ; preds = %entry %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp1.not148 = icmp slt i32 %0, 1 br i1 %cmp1.not148, label %for.cond14.preheader, label %for.cond2.preheader.preheader for.cond2.preheader.preheader: ; preds = %for.cond.preheader %1 = add nuw i32 %0, 1 %wide.trip.count167 = zext i32 %1 to i64 %2 = add nsw i64 %wide.trip.count167, -1 %min.iters.check = icmp ult i32 %0, 8 %n.vec = and i64 %2, -8 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %2, %n.vec br label %for.cond2.preheader for.cond2.preheader: ; preds = %for.cond2.preheader.preheader, %for.cond2.for.end_crit_edge %indvars.iv164 = phi i64 [ 1, %for.cond2.preheader.preheader ], [ %indvars.iv.next165, %for.cond2.for.end_crit_edge ] br i1 %min.iters.check, label %for.body4.preheader, label %vector.body vector.body: ; preds = %for.cond2.preheader, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond2.preheader ] %offset.idx = or i64 %index, 1 %3 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv164, i64 %offset.idx store <4 x i32> <i32 999999999, i32 999999999, i32 999999999, i32 999999999>, ptr %3, align 4, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 999999999, i32 999999999, i32 999999999, i32 999999999>, ptr %4, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body br i1 %cmp.n, label %for.cond2.for.end_crit_edge, label %for.body4.preheader for.body4.preheader: ; preds = %for.cond2.preheader, %middle.block %indvars.iv.ph = phi i64 [ 1, %for.cond2.preheader ], [ %ind.end, %middle.block ] br label %for.body4 for.cond14.preheader: ; preds = %for.cond2.for.end_crit_edge, %for.cond.preheader %6 = load i32, ptr %M, align 4, !tbaa !5 %cmp15150 = icmp sgt i32 %6, 0 br i1 %cmp15150, label %for.body16, label %for.cond29.preheader for.body4: ; preds = %for.body4.preheader, %for.body4 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ %indvars.iv.ph, %for.body4.preheader ] %arrayidx6 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv164, i64 %indvars.iv store i32 999999999, ptr %arrayidx6, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count167 br i1 %exitcond.not, label %for.cond2.for.end_crit_edge, label %for.body4, !llvm.loop !13 for.cond2.for.end_crit_edge: ; preds = %for.body4, %middle.block %arrayidx10 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv164, i64 %indvars.iv164 store i32 0, ptr %arrayidx10, align 4, !tbaa !5 %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1 %exitcond168.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count167 br i1 %exitcond168.not, label %for.cond14.preheader, label %for.cond2.preheader, !llvm.loop !14 for.cond29.preheader.loopexit: ; preds = %for.inc26 %.pre = load i32, ptr %N, align 4, !tbaa !5 br label %for.cond29.preheader for.cond29.preheader: ; preds = %for.cond29.preheader.loopexit, %for.cond14.preheader %7 = phi i32 [ %.pre, %for.cond29.preheader.loopexit ], [ %0, %for.cond14.preheader ] %cmp30.not156 = icmp slt i32 %7, 1 br i1 %cmp30.not156, label %cleanup104, label %for.cond32.preheader.preheader for.cond32.preheader.preheader: ; preds = %for.cond29.preheader %8 = add i32 %7, 1 %wide.trip.count182 = zext i32 %8 to i64 %9 = shl nuw nsw i64 %wide.trip.count182, 2 %10 = add nuw nsw i64 %9, 2048 %11 = add nsw i64 %wide.trip.count182, -1 %12 = getelementptr i8, ptr @asumikana, i64 %10 %min.iters.check203 = icmp ult i64 %11, 12 %13 = getelementptr i8, ptr @asumikana, i64 %10 %n.vec206 = and i64 %11, -8 %ind.end207 = or i64 %n.vec206, 1 %cmp.n209 = icmp eq i64 %11, %n.vec206 %14 = and i64 %wide.trip.count182, 1 %lcmp.mod.not.not = icmp eq i64 %14, 0 %15 = sub nsw i64 0, %wide.trip.count182 br label %for.cond32.preheader for.body16: ; preds = %for.cond14.preheader, %for.inc26 %i.1151 = phi i32 [ %inc27, %for.inc26 ], [ 0, %for.cond14.preheader ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %cmp18.not = icmp eq i32 %call17, 2 br i1 %cmp18.not, label %for.inc26, label %cleanup cleanup: ; preds = %for.body16 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 br label %cleanup104 for.inc26: ; preds = %for.body16 %16 = load i32, ptr %a, align 4, !tbaa !5 %idxprom21 = sext i32 %16 to i64 %17 = load i32, ptr %b, align 4, !tbaa !5 %idxprom23 = sext i32 %17 to i64 %arrayidx24 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %idxprom21, i64 %idxprom23 store i32 1, ptr %arrayidx24, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 %inc27 = add nuw nsw i32 %i.1151, 1 %18 = load i32, ptr %M, align 4, !tbaa !5 %cmp15 = icmp slt i32 %inc27, %18 br i1 %cmp15, label %for.body16, label %for.cond29.preheader.loopexit, !llvm.loop !15 for.cond32.preheader: ; preds = %for.cond32.preheader.preheader, %for.cond32.for.inc72_crit_edge.split %indvar192 = phi i64 [ 0, %for.cond32.preheader.preheader ], [ %indvar.next193, %for.cond32.for.inc72_crit_edge.split ] %indvars.iv179 = phi i64 [ 1, %for.cond32.preheader.preheader ], [ %indvars.iv.next180, %for.cond32.for.inc72_crit_edge.split ] %19 = shl nuw nsw i64 %indvar192, 2 %20 = shl nuw nsw i64 %indvar192, 11 %gep233 = getelementptr i8, ptr getelementptr (i8, ptr @asumikana, i64 2052), i64 %20 %scevgep197 = getelementptr i8, ptr %12, i64 %20 %gep234 = getelementptr i8, ptr getelementptr (i8, ptr @asumikana, i64 2056), i64 %19 %gep235 = getelementptr i8, ptr getelementptr (i8, ptr @asumikana, i64 2052), i64 %19 %bound1 = icmp ult ptr %gep235, %13 br label %for.cond35.preheader for.cond75.preheader: ; preds = %for.cond32.for.inc72_crit_edge.split br i1 %cmp30.not156, label %cleanup104, label %for.cond78.preheader for.cond35.preheader: ; preds = %for.cond32.preheader, %for.cond35.for.inc69_crit_edge %indvar = phi i64 [ 0, %for.cond32.preheader ], [ %indvar.next, %for.cond35.for.inc69_crit_edge ] %indvars.iv174 = phi i64 [ 1, %for.cond32.preheader ], [ %indvars.iv.next175, %for.cond35.for.inc69_crit_edge ] %arrayidx45 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %indvars.iv179 br i1 %min.iters.check203, label %for.body37.preheader, label %vector.memcheck vector.memcheck: ; preds = %for.cond35.preheader %21 = shl nuw nsw i64 %indvar, 11 %scevgep195 = getelementptr i8, ptr %gep234, i64 %21 %scevgep191 = getelementptr i8, ptr %13, i64 %21 %gep = getelementptr i8, ptr getelementptr (i8, ptr @asumikana, i64 2052), i64 %21 %bound0 = icmp ult ptr %gep, %scevgep195 %found.conflict = and i1 %bound0, %bound1 %bound0198 = icmp ult ptr %gep, %scevgep197 %bound1199 = icmp ult ptr %gep233, %scevgep191 %found.conflict200 = and i1 %bound0198, %bound1199 %conflict.rdx = or i1 %found.conflict, %found.conflict200 br i1 %conflict.rdx, label %for.body37.preheader, label %vector.ph204 vector.ph204: ; preds = %vector.memcheck %22 = load i32, ptr %arrayidx45, align 4, !tbaa !5, !alias.scope !16 %broadcast.splatinsert216 = insertelement <4 x i32> poison, i32 %22, i64 0 %broadcast.splat217 = shufflevector <4 x i32> %broadcast.splatinsert216, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body210 vector.body210: ; preds = %pred.store.continue231, %vector.ph204 %index211 = phi i64 [ 0, %vector.ph204 ], [ %index.next232, %pred.store.continue231 ] %offset.idx212 = or i64 %index211, 1 %23 = or i64 %index211, 5 %24 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %offset.idx212 %wide.load = load <4 x i32>, ptr %24, align 4, !tbaa !5, !alias.scope !19, !noalias !21 %25 = getelementptr inbounds i32, ptr %24, i64 4 %wide.load213 = load <4 x i32>, ptr %25, align 4, !tbaa !5, !alias.scope !19, !noalias !21 %26 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv179, i64 %offset.idx212 %wide.load214 = load <4 x i32>, ptr %26, align 4, !tbaa !5, !alias.scope !23 %27 = getelementptr inbounds i32, ptr %26, i64 4 %wide.load215 = load <4 x i32>, ptr %27, align 4, !tbaa !5, !alias.scope !23 %28 = add nsw <4 x i32> %wide.load214, %broadcast.splat217 %29 = add nsw <4 x i32> %wide.load215, %broadcast.splat217 %30 = icmp sgt <4 x i32> %wide.load, %28 %31 = icmp sgt <4 x i32> %wide.load213, %29 %32 = extractelement <4 x i1> %30, i64 0 br i1 %32, label %pred.store.if, label %pred.store.continue pred.store.if: ; preds = %vector.body210 %33 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %offset.idx212 %34 = extractelement <4 x i32> %28, i64 0 store i32 %34, ptr %33, align 4, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue pred.store.continue: ; preds = %pred.store.if, %vector.body210 %35 = extractelement <4 x i1> %30, i64 1 br i1 %35, label %pred.store.if218, label %pred.store.continue219 pred.store.if218: ; preds = %pred.store.continue %36 = or i64 %index211, 2 %37 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %36 %38 = extractelement <4 x i32> %28, i64 1 store i32 %38, ptr %37, align 8, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue219 pred.store.continue219: ; preds = %pred.store.if218, %pred.store.continue %39 = extractelement <4 x i1> %30, i64 2 br i1 %39, label %pred.store.if220, label %pred.store.continue221 pred.store.if220: ; preds = %pred.store.continue219 %40 = or i64 %index211, 3 %41 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %40 %42 = extractelement <4 x i32> %28, i64 2 store i32 %42, ptr %41, align 4, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue221 pred.store.continue221: ; preds = %pred.store.if220, %pred.store.continue219 %43 = extractelement <4 x i1> %30, i64 3 br i1 %43, label %pred.store.if222, label %pred.store.continue223 pred.store.if222: ; preds = %pred.store.continue221 %44 = or i64 %index211, 4 %45 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %44 %46 = extractelement <4 x i32> %28, i64 3 store i32 %46, ptr %45, align 16, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue223 pred.store.continue223: ; preds = %pred.store.if222, %pred.store.continue221 %47 = extractelement <4 x i1> %31, i64 0 br i1 %47, label %pred.store.if224, label %pred.store.continue225 pred.store.if224: ; preds = %pred.store.continue223 %48 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %23 %49 = extractelement <4 x i32> %29, i64 0 store i32 %49, ptr %48, align 4, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue225 pred.store.continue225: ; preds = %pred.store.if224, %pred.store.continue223 %50 = extractelement <4 x i1> %31, i64 1 br i1 %50, label %pred.store.if226, label %pred.store.continue227 pred.store.if226: ; preds = %pred.store.continue225 %51 = or i64 %index211, 6 %52 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %51 %53 = extractelement <4 x i32> %29, i64 1 store i32 %53, ptr %52, align 8, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue227 pred.store.continue227: ; preds = %pred.store.if226, %pred.store.continue225 %54 = extractelement <4 x i1> %31, i64 2 br i1 %54, label %pred.store.if228, label %pred.store.continue229 pred.store.if228: ; preds = %pred.store.continue227 %55 = or i64 %index211, 7 %56 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %55 %57 = extractelement <4 x i32> %29, i64 2 store i32 %57, ptr %56, align 4, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue229 pred.store.continue229: ; preds = %pred.store.if228, %pred.store.continue227 %58 = extractelement <4 x i1> %31, i64 3 br i1 %58, label %pred.store.if230, label %pred.store.continue231 pred.store.if230: ; preds = %pred.store.continue229 %59 = add i64 %index211, 8 %60 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %59 %61 = extractelement <4 x i32> %29, i64 3 store i32 %61, ptr %60, align 16, !tbaa !5, !alias.scope !19, !noalias !21 br label %pred.store.continue231 pred.store.continue231: ; preds = %pred.store.if230, %pred.store.continue229 %index.next232 = add nuw i64 %index211, 8 %62 = icmp eq i64 %index.next232, %n.vec206 br i1 %62, label %middle.block201, label %vector.body210, !llvm.loop !24 middle.block201: ; preds = %pred.store.continue231 br i1 %cmp.n209, label %for.cond35.for.inc69_crit_edge, label %for.body37.preheader for.body37.preheader: ; preds = %vector.memcheck, %for.cond35.preheader, %middle.block201 %indvars.iv169.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %for.cond35.preheader ], [ %ind.end207, %middle.block201 ] br i1 %lcmp.mod.not.not, label %for.body37.prol, label %for.body37.prol.loopexit for.body37.prol: ; preds = %for.body37.preheader %arrayidx41.prol = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %indvars.iv169.ph %63 = load i32, ptr %arrayidx41.prol, align 4, !tbaa !5 %64 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %arrayidx49.prol = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv179, i64 %indvars.iv169.ph %65 = load i32, ptr %arrayidx49.prol, align 4, !tbaa !5 %add.prol = add nsw i32 %65, %64 %cmp50.prol = icmp sgt i32 %63, %add.prol br i1 %cmp50.prol, label %if.then51.prol, label %for.inc66.prol if.then51.prol: ; preds = %for.body37.prol store i32 %add.prol, ptr %arrayidx41.prol, align 4, !tbaa !5 br label %for.inc66.prol for.inc66.prol: ; preds = %if.then51.prol, %for.body37.prol %indvars.iv.next170.prol = add nuw nsw i64 %indvars.iv169.ph, 1 br label %for.body37.prol.loopexit for.body37.prol.loopexit: ; preds = %for.inc66.prol, %for.body37.preheader %indvars.iv169.unr = phi i64 [ %indvars.iv169.ph, %for.body37.preheader ], [ %indvars.iv.next170.prol, %for.inc66.prol ] %66 = xor i64 %indvars.iv169.ph, %15 %67 = icmp eq i64 %66, -1 br i1 %67, label %for.cond35.for.inc69_crit_edge, label %for.body37 for.body37: ; preds = %for.body37.prol.loopexit, %for.inc66.1 %indvars.iv169 = phi i64 [ %indvars.iv.next170.1, %for.inc66.1 ], [ %indvars.iv169.unr, %for.body37.prol.loopexit ] %arrayidx41 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %indvars.iv169 %68 = load i32, ptr %arrayidx41, align 4, !tbaa !5 %69 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %arrayidx49 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv179, i64 %indvars.iv169 %70 = load i32, ptr %arrayidx49, align 4, !tbaa !5 %add = add nsw i32 %70, %69 %cmp50 = icmp sgt i32 %68, %add br i1 %cmp50, label %if.then51, label %for.inc66 if.then51: ; preds = %for.body37 store i32 %add, ptr %arrayidx41, align 4, !tbaa !5 br label %for.inc66 for.inc66: ; preds = %for.body37, %if.then51 %indvars.iv.next170 = add nuw nsw i64 %indvars.iv169, 1 %arrayidx41.1 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv174, i64 %indvars.iv.next170 %71 = load i32, ptr %arrayidx41.1, align 4, !tbaa !5 %72 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %arrayidx49.1 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv179, i64 %indvars.iv.next170 %73 = load i32, ptr %arrayidx49.1, align 4, !tbaa !5 %add.1 = add nsw i32 %73, %72 %cmp50.1 = icmp sgt i32 %71, %add.1 br i1 %cmp50.1, label %if.then51.1, label %for.inc66.1 if.then51.1: ; preds = %for.inc66 store i32 %add.1, ptr %arrayidx41.1, align 4, !tbaa !5 br label %for.inc66.1 for.inc66.1: ; preds = %if.then51.1, %for.inc66 %indvars.iv.next170.1 = add nuw nsw i64 %indvars.iv169, 2 %exitcond173.not.1 = icmp eq i64 %indvars.iv.next170.1, %wide.trip.count182 br i1 %exitcond173.not.1, label %for.cond35.for.inc69_crit_edge, label %for.body37, !llvm.loop !25 for.cond35.for.inc69_crit_edge: ; preds = %for.body37.prol.loopexit, %for.inc66.1, %middle.block201 %indvars.iv.next175 = add nuw nsw i64 %indvars.iv174, 1 %exitcond178.not = icmp eq i64 %indvars.iv.next175, %wide.trip.count182 %indvar.next = add i64 %indvar, 1 br i1 %exitcond178.not, label %for.cond32.for.inc72_crit_edge.split, label %for.cond35.preheader, !llvm.loop !26 for.cond32.for.inc72_crit_edge.split: ; preds = %for.cond35.for.inc69_crit_edge %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1 %exitcond183.not = icmp eq i64 %indvars.iv.next180, %wide.trip.count182 %indvar.next193 = add i64 %indvar192, 1 br i1 %exitcond183.not, label %for.cond75.preheader, label %for.cond32.preheader, !llvm.loop !27 for.cond78.preheader: ; preds = %for.cond75.preheader, %for.end99 %74 = phi i32 [ %83, %for.end99 ], [ %7, %for.cond75.preheader ] %indvars.iv187 = phi i64 [ %indvars.iv.next188, %for.end99 ], [ 1, %for.cond75.preheader ] %cmp79.not158 = icmp slt i32 %74, 1 br i1 %cmp79.not158, label %for.end99, label %for.body80 for.body80: ; preds = %for.cond78.preheader, %for.inc97 %75 = phi i32 [ %80, %for.inc97 ], [ %74, %for.cond78.preheader ] %indvars.iv184 = phi i64 [ %indvars.iv.next185, %for.inc97 ], [ 1, %for.cond78.preheader ] %isFirst.0160 = phi i32 [ %isFirst.1, %for.inc97 ], [ 1, %for.cond78.preheader ] %arrayidx84 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv187, i64 %indvars.iv184 %76 = load i32, ptr %arrayidx84, align 4, !tbaa !5 %cmp85 = icmp slt i32 %76, 999999999 br i1 %cmp85, label %land.lhs.true, label %for.inc97 land.lhs.true: ; preds = %for.body80 %arrayidx89 = getelementptr inbounds [512 x [512 x i32]], ptr @asumikana, i64 0, i64 %indvars.iv184, i64 %indvars.iv187 %77 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %cmp90 = icmp slt i32 %77, 999999999 br i1 %cmp90, label %if.then91, label %for.inc97 if.then91: ; preds = %land.lhs.true %tobool.not = icmp eq i32 %isFirst.0160, 0 br i1 %tobool.not, label %if.then92, label %if.end94 if.then92: ; preds = %if.then91 %78 = load ptr, ptr @stdout, align 8, !tbaa !28 %call.i = call i32 @putc(i32 noundef 32, ptr noundef %78) br label %if.end94 if.end94: ; preds = %if.then92, %if.then91 %79 = trunc i64 %indvars.iv184 to i32 %call95 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %79) %.pre190 = load i32, ptr %N, align 4, !tbaa !5 br label %for.inc97 for.inc97: ; preds = %for.body80, %land.lhs.true, %if.end94 %80 = phi i32 [ %.pre190, %if.end94 ], [ %75, %land.lhs.true ], [ %75, %for.body80 ] %isFirst.1 = phi i32 [ 0, %if.end94 ], [ %isFirst.0160, %land.lhs.true ], [ %isFirst.0160, %for.body80 ] %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1 %81 = sext i32 %80 to i64 %cmp79.not.not = icmp slt i64 %indvars.iv184, %81 br i1 %cmp79.not.not, label %for.body80, label %for.end99, !llvm.loop !30 for.end99: ; preds = %for.inc97, %for.cond78.preheader %82 = load ptr, ptr @stdout, align 8, !tbaa !28 %call.i143 = call i32 @putc(i32 noundef 10, ptr noundef %82) %indvars.iv.next188 = add nuw nsw i64 %indvars.iv187, 1 %83 = load i32, ptr %N, align 4, !tbaa !5 %84 = sext i32 %83 to i64 %cmp76.not.not = icmp slt i64 %indvars.iv187, %84 br i1 %cmp76.not.not, label %for.cond78.preheader, label %cleanup104, !llvm.loop !31 cleanup104: ; preds = %for.end99, %for.cond29.preheader, %for.cond75.preheader, %cleanup, %entry %retval.2 = phi i32 [ 1, %cleanup ], [ 1, %entry ], [ 0, %for.cond75.preheader ], [ 0, %for.cond29.preheader ], [ 0, %for.end99 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 %retval.2 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = !{!17} !17 = distinct !{!17, !18} !18 = distinct !{!18, !"LVerDomain"} !19 = !{!20} !20 = distinct !{!20, !18} !21 = !{!17, !22} !22 = distinct !{!22, !18} !23 = !{!22} !24 = distinct !{!24, !10, !11, !12} !25 = distinct !{!25, !10, !11} !26 = distinct !{!26, !10} !27 = distinct !{!27, !10} !28 = !{!29, !29, i64 0} !29 = !{!"any pointer", !7, i64 0} !30 = distinct !{!30, !10} !31 = distinct !{!31, !10}
#include <stdio.h> int main(void) { int x; scanf("%d",&x); if(x >= 1200) printf("ARC"); else printf("ABC"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290646/source.c" 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 [4 x i8] c"ARC\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"ABC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 1199 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"}
#include<stdio.h> int b[1000001]; int a[1000001]; int main() { int n,k; scanf("%d %d",&n,&k); int i,j,z; for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<1000001;i++) b[i]=0; int noele=0; int l=0,r=0,max=0; j=0; for(i=0;i<n;i++) { for(;j<n;j++) { if(noele==k && b[a[j]]==0) { break; } else { if(b[a[j]]==0) { noele++; } b[a[j]]++; } } if(j-i>max) { l=i; r=j-1; max=j-i; } /* for(z=0;z<7;z++) { printf("%d\n",b[z]); } printf(" %d\n",noele);*/ b[a[i]]--; if(b[a[i]]==0) noele--; } /* for(i=0;i<10;i++) printf("%d\n",b[i]);*/ printf("%d %d",l+1,r+1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29069/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @a = dso_local global [1000001 x i32] zeroinitializer, align 16 @b = dso_local local_unnamed_addr global [1000001 x i32] zeroinitializer, align 16 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp81 = icmp sgt i32 %0, 0 br i1 %cmp81, label %for.body, label %for.cond2.preheader.thread for.cond2.preheader.thread: ; preds = %entry call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000004) @b, i8 0, i64 4000004, i1 false), !tbaa !5 br label %for.end57 for.cond2.preheader: ; preds = %for.body call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000004) @b, i8 0, i64 4000004, i1 false), !tbaa !5 %cmp1191 = icmp sgt i32 %1, 0 br i1 %cmp1191, label %for.cond13.preheader.lr.ph, label %for.end57 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000001 x i32], ptr @a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond13.preheader.lr.ph: ; preds = %for.cond2.preheader %3 = load i32, ptr %k, align 4 %4 = zext i32 %1 to i64 %wide.trip.count = zext i32 %1 to i64 br label %for.cond13.preheader for.cond13.preheader: ; preds = %for.cond13.preheader.lr.ph, %for.end37 %indvars.iv108 = phi i64 [ 0, %for.cond13.preheader.lr.ph ], [ %indvars.iv.next109, %for.end37 ] %max.097 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %max.1, %for.end37 ] %r.096 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %r.1, %for.end37 ] %l.095 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %l.1, %for.end37 ] %noele.094 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %noele.3, %for.end37 ] %j.092 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %j.1.lcssa, %for.end37 ] %cmp1484 = icmp slt i32 %j.092, %1 br i1 %cmp1484, label %for.body15.preheader, label %for.end37 for.body15.preheader: ; preds = %for.cond13.preheader %5 = sext i32 %j.092 to i64 br label %for.body15 for.body15: ; preds = %for.body15.preheader, %if.else %indvars.iv105 = phi i64 [ %5, %for.body15.preheader ], [ %indvars.iv.next106, %if.else ] %noele.186 = phi i32 [ %noele.094, %for.body15.preheader ], [ %spec.select, %if.else ] %cmp16 = icmp eq i32 %noele.186, %3 %arrayidx18 = getelementptr inbounds [1000001 x i32], ptr @a, i64 0, i64 %indvars.iv105 %6 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %idxprom19 = sext i32 %6 to i64 %arrayidx20 = getelementptr inbounds [1000001 x i32], ptr @b, i64 0, i64 %idxprom19 %7 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %cmp21 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp16, i1 %cmp21, i1 false br i1 %or.cond, label %for.end37.loopexit.split.loop.exit, label %if.else if.else: ; preds = %for.body15 %arrayidx25 = getelementptr inbounds [1000001 x i32], ptr @b, i64 0, i64 %idxprom19 %cmp26 = icmp eq i32 %7, 0 %inc28 = zext i1 %cmp26 to i32 %spec.select = add nsw i32 %noele.186, %inc28 %inc33 = add nsw i32 %7, 1 store i32 %inc33, ptr %arrayidx25, align 4, !tbaa !5 %indvars.iv.next106 = add nsw i64 %indvars.iv105, 1 %exitcond.not = icmp eq i64 %indvars.iv.next106, %4 br i1 %exitcond.not, label %for.end37, label %for.body15, !llvm.loop !11 for.end37.loopexit.split.loop.exit: ; preds = %for.body15 %8 = trunc i64 %indvars.iv105 to i32 br label %for.end37 for.end37: ; preds = %if.else, %for.end37.loopexit.split.loop.exit, %for.cond13.preheader %j.1.lcssa = phi i32 [ %j.092, %for.cond13.preheader ], [ %8, %for.end37.loopexit.split.loop.exit ], [ %1, %if.else ] %noele.1.lcssa = phi i32 [ %noele.094, %for.cond13.preheader ], [ %3, %for.end37.loopexit.split.loop.exit ], [ %spec.select, %if.else ] %9 = trunc i64 %indvars.iv108 to i32 %sub = sub nsw i32 %j.1.lcssa, %9 %cmp38 = icmp sgt i32 %sub, %max.097 %sub40 = add nsw i32 %j.1.lcssa, -1 %l.1 = select i1 %cmp38, i32 %9, i32 %l.095 %r.1 = select i1 %cmp38, i32 %sub40, i32 %r.096 %max.1 = call i32 @llvm.smax.i32(i32 %sub, i32 %max.097) %arrayidx44 = getelementptr inbounds [1000001 x i32], ptr @a, i64 0, i64 %indvars.iv108 %10 = load i32, ptr %arrayidx44, align 4, !tbaa !5 %idxprom45 = sext i32 %10 to i64 %arrayidx46 = getelementptr inbounds [1000001 x i32], ptr @b, i64 0, i64 %idxprom45 %11 = load i32, ptr %arrayidx46, align 4, !tbaa !5 %dec = add nsw i32 %11, -1 store i32 %dec, ptr %arrayidx46, align 4, !tbaa !5 %cmp51 = icmp eq i32 %dec, 0 %dec53 = sext i1 %cmp51 to i32 %noele.3 = add nsw i32 %noele.1.lcssa, %dec53 %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1 %exitcond111.not = icmp eq i64 %indvars.iv.next109, %wide.trip.count br i1 %exitcond111.not, label %for.end57.loopexit, label %for.cond13.preheader, !llvm.loop !12 for.end57.loopexit: ; preds = %for.end37 %12 = add nsw i32 %l.1, 1 %13 = add nsw i32 %r.1, 1 br label %for.end57 for.end57: ; preds = %for.cond2.preheader.thread, %for.end57.loopexit, %for.cond2.preheader %l.0.lcssa = phi i32 [ 1, %for.cond2.preheader ], [ %12, %for.end57.loopexit ], [ 1, %for.cond2.preheader.thread ] %r.0.lcssa = phi i32 [ 1, %for.cond2.preheader ], [ %13, %for.end57.loopexit ], [ 1, %for.cond2.preheader.thread ] %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %l.0.lcssa, i32 noundef %r.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main(){ int x; scanf("%d",&x); if(x<1200)printf("ABC\n"); else printf("ARC\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290732/source.c" 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 = private unnamed_addr constant [4 x i8] c"ARC\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"ABC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp slt i32 %0, 1200 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { int x; scanf("%d", &x); if (x < 1200) { printf("ABC\n"); } else { printf("ARC\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290783/source.c" 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 = private unnamed_addr constant [4 x i8] c"ARC\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"ABC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp slt i32 %0, 1200 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { int x; scanf("%d", &x); printf("%s\n", x<1200?"ABC":"ARC"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290826/source.c" 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.2 = private unnamed_addr constant [4 x i8] c"ABC\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"ARC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp slt i32 %0, 1200 %cond = select i1 %cmp, ptr @.str.2, ptr @.str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %cond) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include<stdio.h> int main() { int f,b; scanf("%d %d",&b,&f); int a[b][f],i,j; for(i=0;i<b;i++) for(j=0;j<f;j++) scanf("%d",&a[i][j]); int max=0; for(i=0;i<b;i++) { int minrow=a[i][0]; for(j=1;j<f;j++) { if(a[i][j]<minrow) minrow=a[i][j]; } if(minrow>max) max=minrow; } printf("%d",max); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29087/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %f = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b, ptr noundef nonnull %f) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = load i32, ptr %f, align 4, !tbaa !5 %3 = zext i32 %2 to i64 %4 = call ptr @llvm.stacksave.p0() %5 = mul nuw i64 %3, %1 %vla = alloca i32, i64 %5, align 16 %6 = load i32, ptr %b, align 4, !tbaa !5 %cmp57 = icmp sgt i32 %6, 0 br i1 %cmp57, label %for.cond1.preheader.lr.ph, label %for.end36 for.cond1.preheader.lr.ph: ; preds = %entry %7 = load i32, ptr %f, align 4, !tbaa !5 %8 = icmp sgt i32 %7, 0 br i1 %8, label %for.cond1.preheader, label %for.body12.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc7 %9 = phi i32 [ %36, %for.inc7 ], [ %6, %for.cond1.preheader.lr.ph ] %10 = phi i32 [ %37, %for.inc7 ], [ %7, %for.cond1.preheader.lr.ph ] %indvars.iv72 = phi i64 [ %indvars.iv.next73, %for.inc7 ], [ 0, %for.cond1.preheader.lr.ph ] %cmp255 = icmp sgt i32 %10, 0 br i1 %cmp255, label %for.body3.lr.ph, label %for.inc7 for.body3.lr.ph: ; preds = %for.cond1.preheader %11 = mul nuw nsw i64 %indvars.iv72, %3 %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %11 br label %for.body3 for.cond10.preheader: ; preds = %for.inc7 %cmp1163 = icmp sgt i32 %36, 0 br i1 %cmp1163, label %for.body12.lr.ph, label %for.end36 for.body12.lr.ph: ; preds = %for.cond10.preheader %.pr = load i32, ptr %f, align 4, !tbaa !5 %cmp1759 = icmp sgt i32 %.pr, 1 br i1 %cmp1759, label %for.body12.us.preheader, label %for.body12.preheader for.body12.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.body12.lr.ph %.lcssa9096 = phi i32 [ %36, %for.body12.lr.ph ], [ %6, %for.cond1.preheader.lr.ph ] %wide.trip.count = zext i32 %.lcssa9096 to i64 %min.iters.check = icmp ugt i32 %.lcssa9096, 7 %ident.check.not = icmp eq i32 %2, 1 %or.cond = select i1 %min.iters.check, i1 %ident.check.not, i1 false br i1 %or.cond, label %vector.ph, label %for.body12.preheader122 vector.ph: ; preds = %for.body12.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %15, %vector.body ] %vec.phi101 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ] %12 = mul nuw nsw i64 %index, %3 %13 = getelementptr inbounds i32, ptr %vla, i64 %12 %wide.load = load <4 x i32>, ptr %13, align 16, !tbaa !5 %14 = getelementptr inbounds i32, ptr %13, i64 4 %wide.load102 = load <4 x i32>, ptr %14, align 16, !tbaa !5 %15 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi) %16 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load102, <4 x i32> %vec.phi101) %index.next = add nuw i64 %index, 8 %17 = icmp eq i64 %index.next, %n.vec br i1 %17, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %rdx.minmax = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %15, <4 x i32> %16) %18 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end36, label %for.body12.preheader122 for.body12.preheader122: ; preds = %for.body12.preheader, %middle.block %indvars.iv75.ph = phi i64 [ 0, %for.body12.preheader ], [ %n.vec, %middle.block ] %max.065.ph = phi i32 [ 0, %for.body12.preheader ], [ %18, %middle.block ] %19 = xor i64 %indvars.iv75.ph, -1 %20 = add nsw i64 %19, %wide.trip.count %xtraiter = and i64 %wide.trip.count, 3 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body12.prol.loopexit, label %for.body12.prol for.body12.prol: ; preds = %for.body12.preheader122, %for.body12.prol %indvars.iv75.prol = phi i64 [ %indvars.iv.next76.prol, %for.body12.prol ], [ %indvars.iv75.ph, %for.body12.preheader122 ] %max.065.prol = phi i32 [ %spec.select54.prol, %for.body12.prol ], [ %max.065.ph, %for.body12.preheader122 ] %prol.iter = phi i64 [ %prol.iter.next, %for.body12.prol ], [ 0, %for.body12.preheader122 ] %21 = mul nuw nsw i64 %indvars.iv75.prol, %3 %arrayidx14.prol = getelementptr inbounds i32, ptr %vla, i64 %21 %22 = load i32, ptr %arrayidx14.prol, align 4, !tbaa !5 %spec.select54.prol = call i32 @llvm.smax.i32(i32 %22, i32 %max.065.prol) %indvars.iv.next76.prol = add nuw nsw i64 %indvars.iv75.prol, 1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %for.body12.prol.loopexit, label %for.body12.prol, !llvm.loop !13 for.body12.prol.loopexit: ; preds = %for.body12.prol, %for.body12.preheader122 %spec.select54.lcssa.unr = phi i32 [ undef, %for.body12.preheader122 ], [ %spec.select54.prol, %for.body12.prol ] %indvars.iv75.unr = phi i64 [ %indvars.iv75.ph, %for.body12.preheader122 ], [ %indvars.iv.next76.prol, %for.body12.prol ] %max.065.unr = phi i32 [ %max.065.ph, %for.body12.preheader122 ], [ %spec.select54.prol, %for.body12.prol ] %23 = icmp ult i64 %20, 3 br i1 %23, label %for.end36, label %for.body12 for.body12.us.preheader: ; preds = %for.body12.lr.ph %wide.trip.count86 = zext i32 %36 to i64 %wide.trip.count81 = zext i32 %.pr to i64 %24 = add nsw i64 %wide.trip.count81, -1 %min.iters.check105 = icmp ult i32 %.pr, 9 %n.vec108 = and i64 %24, -8 %ind.end = or i64 %n.vec108, 1 %cmp.n110 = icmp eq i64 %24, %n.vec108 br label %for.body12.us for.body12.us: ; preds = %for.body12.us.preheader, %for.cond16.for.end30_crit_edge.us %indvars.iv83 = phi i64 [ 0, %for.body12.us.preheader ], [ %indvars.iv.next84, %for.cond16.for.end30_crit_edge.us ] %max.065.us = phi i32 [ 0, %for.body12.us.preheader ], [ %spec.select54.us, %for.cond16.for.end30_crit_edge.us ] %25 = mul nuw nsw i64 %indvars.iv83, %3 %arrayidx14.us = getelementptr inbounds i32, ptr %vla, i64 %25 %26 = load i32, ptr %arrayidx14.us, align 4, !tbaa !5 br i1 %min.iters.check105, label %for.body18.us.preheader, label %vector.ph106 vector.ph106: ; preds = %for.body12.us %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %26, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body111 vector.body111: ; preds = %vector.body111, %vector.ph106 %index112 = phi i64 [ 0, %vector.ph106 ], [ %index.next117, %vector.body111 ] %vec.phi113 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph106 ], [ %29, %vector.body111 ] %vec.phi114 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph106 ], [ %30, %vector.body111 ] %offset.idx = or i64 %index112, 1 %27 = getelementptr inbounds i32, ptr %arrayidx14.us, i64 %offset.idx %wide.load115 = load <4 x i32>, ptr %27, align 4, !tbaa !5 %28 = getelementptr inbounds i32, ptr %27, i64 4 %wide.load116 = load <4 x i32>, ptr %28, align 4, !tbaa !5 %29 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load115, <4 x i32> %vec.phi113) %30 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load116, <4 x i32> %vec.phi114) %index.next117 = add nuw i64 %index112, 8 %31 = icmp eq i64 %index.next117, %n.vec108 br i1 %31, label %middle.block103, label %vector.body111, !llvm.loop !15 middle.block103: ; preds = %vector.body111 %rdx.minmax118 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %29, <4 x i32> %30) %32 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax118) br i1 %cmp.n110, label %for.cond16.for.end30_crit_edge.us, label %for.body18.us.preheader for.body18.us.preheader: ; preds = %for.body12.us, %middle.block103 %indvars.iv78.ph = phi i64 [ 1, %for.body12.us ], [ %ind.end, %middle.block103 ] %minrow.061.us.ph = phi i32 [ %26, %for.body12.us ], [ %32, %middle.block103 ] br label %for.body18.us for.body18.us: ; preds = %for.body18.us.preheader, %for.body18.us %indvars.iv78 = phi i64 [ %indvars.iv.next79, %for.body18.us ], [ %indvars.iv78.ph, %for.body18.us.preheader ] %minrow.061.us = phi i32 [ %spec.select.us, %for.body18.us ], [ %minrow.061.us.ph, %for.body18.us.preheader ] %arrayidx22.us = getelementptr inbounds i32, ptr %arrayidx14.us, i64 %indvars.iv78 %33 = load i32, ptr %arrayidx22.us, align 4, !tbaa !5 %spec.select.us = call i32 @llvm.smin.i32(i32 %33, i32 %minrow.061.us) %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1 %exitcond82.not = icmp eq i64 %indvars.iv.next79, %wide.trip.count81 br i1 %exitcond82.not, label %for.cond16.for.end30_crit_edge.us, label %for.body18.us, !llvm.loop !16 for.cond16.for.end30_crit_edge.us: ; preds = %for.body18.us, %middle.block103 %spec.select.us.lcssa = phi i32 [ %32, %middle.block103 ], [ %spec.select.us, %for.body18.us ] %spec.select54.us = call i32 @llvm.smax.i32(i32 %spec.select.us.lcssa, i32 %max.065.us) %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %exitcond87.not = icmp eq i64 %indvars.iv.next84, %wide.trip.count86 br i1 %exitcond87.not, label %for.end36, label %for.body12.us, !llvm.loop !17 for.body3: ; preds = %for.body3.lr.ph, %for.body3 %indvars.iv = phi i64 [ 0, %for.body3.lr.ph ], [ %indvars.iv.next, %for.body3 ] %arrayidx5 = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %34 = load i32, ptr %f, align 4, !tbaa !5 %35 = sext i32 %34 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %35 br i1 %cmp2, label %for.body3, label %for.inc7.loopexit, !llvm.loop !18 for.inc7.loopexit: ; preds = %for.body3 %.pre = load i32, ptr %b, align 4, !tbaa !5 br label %for.inc7 for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader %36 = phi i32 [ %.pre, %for.inc7.loopexit ], [ %9, %for.cond1.preheader ] %37 = phi i32 [ %34, %for.inc7.loopexit ], [ %10, %for.cond1.preheader ] %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1 %38 = sext i32 %36 to i64 %cmp = icmp slt i64 %indvars.iv.next73, %38 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !19 for.body12: ; preds = %for.body12.prol.loopexit, %for.body12 %indvars.iv75 = phi i64 [ %indvars.iv.next76.3, %for.body12 ], [ %indvars.iv75.unr, %for.body12.prol.loopexit ] %max.065 = phi i32 [ %spec.select54.3, %for.body12 ], [ %max.065.unr, %for.body12.prol.loopexit ] %39 = mul nuw nsw i64 %indvars.iv75, %3 %arrayidx14 = getelementptr inbounds i32, ptr %vla, i64 %39 %40 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %spec.select54 = call i32 @llvm.smax.i32(i32 %40, i32 %max.065) %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %41 = mul nuw nsw i64 %indvars.iv.next76, %3 %arrayidx14.1 = getelementptr inbounds i32, ptr %vla, i64 %41 %42 = load i32, ptr %arrayidx14.1, align 4, !tbaa !5 %spec.select54.1 = call i32 @llvm.smax.i32(i32 %42, i32 %spec.select54) %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 2 %43 = mul nuw nsw i64 %indvars.iv.next76.1, %3 %arrayidx14.2 = getelementptr inbounds i32, ptr %vla, i64 %43 %44 = load i32, ptr %arrayidx14.2, align 4, !tbaa !5 %spec.select54.2 = call i32 @llvm.smax.i32(i32 %44, i32 %spec.select54.1) %indvars.iv.next76.2 = add nuw nsw i64 %indvars.iv75, 3 %45 = mul nuw nsw i64 %indvars.iv.next76.2, %3 %arrayidx14.3 = getelementptr inbounds i32, ptr %vla, i64 %45 %46 = load i32, ptr %arrayidx14.3, align 4, !tbaa !5 %spec.select54.3 = call i32 @llvm.smax.i32(i32 %46, i32 %spec.select54.2) %indvars.iv.next76.3 = add nuw nsw i64 %indvars.iv75, 4 %exitcond.not.3 = icmp eq i64 %indvars.iv.next76.3, %wide.trip.count br i1 %exitcond.not.3, label %for.end36, label %for.body12, !llvm.loop !21 for.end36: ; preds = %for.body12.prol.loopexit, %for.body12, %for.cond16.for.end30_crit_edge.us, %middle.block, %entry, %for.cond10.preheader %max.0.lcssa = phi i32 [ 0, %for.cond10.preheader ], [ 0, %entry ], [ %18, %middle.block ], [ %spec.select54.us, %for.cond16.for.end30_crit_edge.us ], [ %spec.select54.lcssa.unr, %for.body12.prol.loopexit ], [ %spec.select54.3, %for.body12 ] %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %max.0.lcssa) call void @llvm.stackrestore.p0(ptr %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.unroll.disable"} !15 = distinct !{!15, !10, !11, !12} !16 = distinct !{!16, !10, !12, !11} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10, !20} !20 = !{!"llvm.loop.unswitch.partial.disable"} !21 = distinct !{!21, !10, !11}
#include<stdio.h> int main(void){ int P; scanf("%d",&P); (P < 1200)?printf("ABC\n"):printf("ARC\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290912/source.c" 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 = private unnamed_addr constant [4 x i8] c"ARC\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"ABC\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %P = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %P) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %P) %0 = load i32, ptr %P, align 4, !tbaa !5 %cmp = icmp slt i32 %0, 1200 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %P) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"}
#include <stdio.h> int main(void) { char s[3]; int c=0; scanf("%s",s); for(int i=0;i<3;i++) if(s[i]=='o')c++; printf("%d\n",700+c*100); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290956/source.c" 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"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %inc = zext i1 %cmp1 to i32 %arrayidx.1 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 111 %inc.1 = zext i1 %cmp1.1 to i32 %spec.select.1 = add nuw nsw i32 %inc, %inc.1 %arrayidx.2 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 111 %inc.2 = zext i1 %cmp1.2 to i32 %spec.select.2 = add nuw nsw i32 %spec.select.1, %inc.2 %mul = mul nuw nsw i32 %spec.select.2, 100 %add = add nuw nsw i32 %mul, 700 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int n,m,l; scanf("%d",&n); l = n%7; m = n/7; if(l==0) printf("%d\n",m); else if(l==1) { printf("%d\n",m+1); } else if(l>=2 && l<=6) printf("%d\n",m+1); m=0,l=0; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291/source.c" 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 [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec19 = add nsw i32 %0, -1 store i32 %dec19, ptr %t, align 4, !tbaa !5 %tobool.not20 = icmp eq i32 %0, 0 br i1 %tobool.not20, label %while.end, label %while.body while.body: ; preds = %entry, %if.end13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %rem = srem i32 %1, 7 %div = sdiv i32 %1, 7 switch i32 %rem, label %if.else6 [ i32 0, label %if.end13.sink.split i32 1, label %if.then4 ] if.then4: ; preds = %while.body %add = add nsw i32 %div, 1 br label %if.end13.sink.split if.else6: ; preds = %while.body %cmp7 = icmp sgt i32 %rem, 1 br i1 %cmp7, label %if.then9, label %if.end13 if.then9: ; preds = %if.else6 %add10 = add nsw i32 %div, 1 br label %if.end13.sink.split if.end13.sink.split: ; preds = %while.body, %if.then9, %if.then4 %add.sink = phi i32 [ %add, %if.then4 ], [ %add10, %if.then9 ], [ %div, %while.body ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.sink) br label %if.end13 if.end13: ; preds = %if.end13.sink.split, %if.else6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 %2 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.end13, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <math.h> int main(){ char s[3]; int ans = 700; scanf("%s",s); for(int i=0; i<3; i++){ if(s[i] == 'o'){ ans += 100; } } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291041/source.c" 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"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %spec.select = select i1 %cmp1, i32 800, i32 700 %arrayidx.1 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 111 %add.1 = add nuw nsw i32 %spec.select, 100 %spec.select.1 = select i1 %cmp1.1, i32 %add.1, i32 %spec.select %arrayidx.2 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 111 %add.2 = add nuw nsw i32 %spec.select.1, 100 %spec.select.2 = select i1 %cmp1.2, i32 %add.2, i32 %spec.select.1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.2) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ char s[3]; int i,t=0; scanf("%s",s); for(i=0;i<3;i++) if(s[i]-'x')t++; printf("%d",700+100*t); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291085/source.c" 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"%s\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %tobool.not = icmp ne i8 %0, 120 %inc = zext i1 %tobool.not to i32 %arrayidx.1 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %tobool.not.1 = icmp ne i8 %1, 120 %inc.1 = zext i1 %tobool.not.1 to i32 %spec.select.1 = add nuw nsw i32 %inc, %inc.1 %arrayidx.2 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %tobool.not.2 = icmp ne i8 %2, 120 %inc.2 = zext i1 %tobool.not.2 to i32 %spec.select.2 = add nuw nsw i32 %spec.select.1, %inc.2 %mul = mul nuw nsw i32 %spec.select.2, 100 %add = add nuw nsw i32 %mul, 700 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ char s[4]; scanf("%s", s); printf("%d\n", 700 + (s[0] == 'o' ? 100 : 0) + (s[1] == 'o' ? 100 : 0) + (s[2] == 'o' ? 100 : 0)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291135/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291135/source.c" 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"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [4 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %cmp = icmp eq i8 %0, 111 %add = select i1 %cmp, i32 800, i32 700 %arrayidx2 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx2, align 1, !tbaa !5 %cmp4 = icmp eq i8 %1, 111 %cond6 = select i1 %cmp4, i32 100, i32 0 %add7 = add nuw nsw i32 %cond6, %add %arrayidx8 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx8, align 1, !tbaa !5 %cmp10 = icmp eq i8 %2, 111 %cond12 = select i1 %cmp10, i32 100, i32 0 %add13 = add nuw nsw i32 %add7, %cond12 %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add13) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ char order[3]; int i; int x = 0; scanf(" %s", order); /*printf("%s\n", order);*/ /*printf("%c\n", order[1]);*/ for (i = 0; i < 3; i++) { /*printf("%c\n", order[i]);*/ if (order[i] == 'o') x = (x + 1); } printf("%d\n", 700 + (100 * x)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291179/source.c" 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 [4 x i8] c" %s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %order = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %order) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %order) %0 = load i8, ptr %order, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %add = zext i1 %cmp1 to i32 %arrayidx.1 = getelementptr inbounds [3 x i8], ptr %order, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 111 %add.1 = zext i1 %cmp1.1 to i32 %spec.select.1 = add nuw nsw i32 %add, %add.1 %arrayidx.2 = getelementptr inbounds [3 x i8], ptr %order, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 111 %add.2 = zext i1 %cmp1.2 to i32 %spec.select.2 = add nuw nsw i32 %spec.select.1, %add.2 %mul = mul nuw nsw i32 %spec.select.2, 100 %add3 = add nuw nsw i32 %mul, 700 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %order) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ char s[3]; int i; int cnt=700; scanf("%s",s); for(i=0;i<3;i++){ if(s[i]=='o')cnt+=100; } printf("%d\n",cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291221/source.c" 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"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %spec.select = select i1 %cmp1, i32 800, i32 700 %arrayidx.1 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 111 %add.1 = add nuw nsw i32 %spec.select, 100 %spec.select.1 = select i1 %cmp1.1, i32 %add.1, i32 %spec.select %arrayidx.2 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 111 %add.2 = add nuw nsw i32 %spec.select.1, 100 %spec.select.2 = select i1 %cmp1.2, i32 %add.2, i32 %spec.select.1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.2) call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %s) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int gcd(int x, int y); int main(void){ char str[257]; char this[] = "this"; char that[] = "that"; char alpha[27]; int C[10000]; int num = 0; int n; int len; int i, j, k, l, m; int a, b; for(i=1; i <= 10000; i++){ if(gcd(i, 26) == 1){ C[num] = i; num++; } } scanf("%d", &n); for(i=0; i<n; i++){ scanf(" %[^\n]%*c", str); len = strlen(str); for(j=0; j < num; j++){ for(k=1; k <= 100; k++){ for(l=0; l<4; l++){ this[l] = ((C[j] * (this[l] - 97) + k) % 26) + 97; } for(l=0; l<4; l++){ that[l] = ((C[j] * (that[l] - 97) + k) % 26) + 97; } if(strstr(str, this) != NULL || strstr(str, that) != NULL){ strcpy(alpha, "abcdefghijklmnopqrstuvwxyz"); for(l=0; l<26; l++){ alpha[l] = ((C[j] * (alpha[l] - 97) + k) % 26) + 97; } for(l=0; l<len; l++){ if(str[l] == ' ') continue; for(m=0; m<26; m++){ if(str[l] == alpha[m]){ str[l] = m+97; break; } } } printf("%s\n", str); goto NEXT; } strcpy(this, "this"); strcpy(that, "that"); } } NEXT: ; } return 0; } int gcd(int x, int y){ int r; while((r = x % y) != 0){ x = y; y = r; } return y; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291272/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291272/source.c" 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 [10 x i8] c" %[^\0A]%*c\00", align 1 @.str.4 = private unnamed_addr constant [5 x i8] c"this\00", align 1 @.str.5 = private unnamed_addr constant [5 x i8] c"that\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [257 x i8], align 16 %this = alloca [5 x i8], align 4 %that = alloca [5 x i8], align 4 %C = alloca [10000 x i32], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 257, ptr nonnull %str) #7 call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %this) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %this, ptr noundef nonnull align 1 dereferenceable(5) @.str.4, i64 5, i1 false) call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %that) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %that, ptr noundef nonnull align 1 dereferenceable(5) @.str.5, i64 5, i1 false) call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %C) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 br label %while.cond.i.preheader while.cond.i.preheader: ; preds = %entry, %for.inc %num.0176 = phi i32 [ 0, %entry ], [ %num.1.fr, %for.inc ] %i.0175 = phi i32 [ 1, %entry ], [ %inc2, %for.inc ] br label %while.cond.i while.cond.i: ; preds = %while.cond.i.preheader, %while.cond.i %y.addr.0.i = phi i32 [ %rem.i, %while.cond.i ], [ 26, %while.cond.i.preheader ] %x.addr.0.i = phi i32 [ %y.addr.0.i, %while.cond.i ], [ %i.0175, %while.cond.i.preheader ] %rem.i = srem i32 %x.addr.0.i, %y.addr.0.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.cond.i, !llvm.loop !5 gcd.exit: ; preds = %while.cond.i %cmp1 = icmp eq i32 %y.addr.0.i, 1 br i1 %cmp1, label %if.then, label %for.inc if.then: ; preds = %gcd.exit %idxprom = sext i32 %num.0176 to i64 %arrayidx = getelementptr inbounds [10000 x i32], ptr %C, i64 0, i64 %idxprom store i32 %i.0175, ptr %arrayidx, align 4, !tbaa !7 %inc = add nsw i32 %num.0176, 1 br label %for.inc for.inc: ; preds = %gcd.exit, %if.then %num.1 = phi i32 [ %inc, %if.then ], [ %num.0176, %gcd.exit ] %num.1.fr = freeze i32 %num.1 %inc2 = add nuw nsw i32 %i.0175, 1 %exitcond.not = icmp eq i32 %inc2, 10001 br i1 %exitcond.not, label %for.end, label %while.cond.i.preheader, !llvm.loop !11 for.end: ; preds = %for.inc %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !7 %cmp5186 = icmp sgt i32 %0, 0 br i1 %cmp5186, label %for.body6.lr.ph, label %for.end137 for.body6.lr.ph: ; preds = %for.end %cmp11180 = icmp sgt i32 %num.1.fr, 0 br i1 %cmp11180, label %for.body6.us.preheader, label %for.body6 for.body6.us.preheader: ; preds = %for.body6.lr.ph %wide.trip.count = zext i32 %num.1.fr to i64 br label %for.body6.us for.body6.us: ; preds = %for.body6.us.preheader, %for.inc135.us %i.1187.us = phi i32 [ %inc136.us, %for.inc135.us ], [ 0, %for.body6.us.preheader ] %1 = phi <8 x i8> [ %20, %for.inc135.us ], [ <i8 116, i8 97, i8 104, i8 116, i8 115, i8 105, i8 104, i8 116>, %for.body6.us.preheader ] %call7.us = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %call9.us = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #8 %conv.us = trunc i64 %call9.us to i32 br label %for.cond14.preheader.us for.inc132.us: ; preds = %if.end124.us %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond198.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond198.not, label %for.inc135.us, label %for.cond14.preheader.us, !llvm.loop !12 lor.lhs.false.us: ; preds = %for.cond18.preheader.us %call61.us = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %str, ptr noundef nonnull dereferenceable(1) %that) #8 %cmp62.not.us = icmp eq ptr %call61.us, null br i1 %cmp62.not.us, label %if.end124.us, label %if.then64.us if.then64.us: ; preds = %lor.lhs.false.us.peel, %for.cond14.preheader.us, %lor.lhs.false.us, %for.cond18.preheader.us %k.0179.us.lcssa = phi i32 [ %k.0179.us, %for.cond18.preheader.us ], [ %k.0179.us, %lor.lhs.false.us ], [ 1, %for.cond14.preheader.us ], [ 1, %lor.lhs.false.us.peel ] %.lcssa = phi <8 x i8> [ %28, %for.cond18.preheader.us ], [ %28, %lor.lhs.false.us ], [ %41, %for.cond14.preheader.us ], [ %41, %lor.lhs.false.us.peel ] %idxprom71.us = and i64 %indvars.iv, 4294967295 %arrayidx72.us = getelementptr inbounds [10000 x i32], ptr %C, i64 0, i64 %idxprom71.us %2 = load i32, ptr %arrayidx72.us, align 4, !tbaa !7 %broadcast.splatinsert234 = insertelement <8 x i32> poison, i32 %k.0179.us.lcssa, i64 0 %broadcast.splat235 = shufflevector <8 x i32> %broadcast.splatinsert234, <8 x i32> poison, <8 x i32> zeroinitializer %broadcast.splatinsert = insertelement <8 x i32> poison, i32 %2, i64 0 %broadcast.splat = shufflevector <8 x i32> %broadcast.splatinsert, <8 x i32> poison, <8 x i32> zeroinitializer %3 = mul nsw <8 x i32> %broadcast.splat, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> %4 = add nsw <8 x i32> %3, %broadcast.splat235 %5 = srem <8 x i32> %4, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %6 = trunc <8 x i32> %5 to <8 x i8> %7 = add nsw <8 x i8> %6, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97> %8 = mul nsw <8 x i32> %broadcast.splat, <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> %9 = add nsw <8 x i32> %8, %broadcast.splat235 %10 = srem <8 x i32> %9, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %11 = trunc <8 x i32> %10 to <8 x i8> %12 = add nsw <8 x i8> %11, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97> %13 = mul nsw <8 x i32> %broadcast.splat, <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23> %14 = add nsw <8 x i32> %13, %broadcast.splat235 %15 = srem <8 x i32> %14, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %16 = trunc <8 x i32> %15 to <8 x i8> %17 = add nsw <8 x i8> %16, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97> %mul77.us = mul nsw i32 %2, 24 %add78.us = add nsw i32 %mul77.us, %k.0179.us.lcssa %rem79.us = srem i32 %add78.us, 26 %18 = trunc i32 %rem79.us to i8 %conv81.us = add nsw i8 %18, 97 %mul77.us.1 = mul nsw i32 %2, 25 %add78.us.1 = add nsw i32 %mul77.us.1, %k.0179.us.lcssa %rem79.us.1 = srem i32 %add78.us.1, 26 %19 = trunc i32 %rem79.us.1 to i8 %conv81.us.1 = add nsw i8 %19, 97 %cmp88184.us = icmp sgt i32 %conv.us, 0 br i1 %cmp88184.us, label %for.body90.us.preheader, label %for.end121.us for.end121.us: ; preds = %for.inc119.us, %if.then64.us %puts.us = call i32 @puts(ptr nonnull dereferenceable(1) %str) br label %for.inc135.us for.inc135.us: ; preds = %for.inc132.us, %for.end121.us %20 = phi <8 x i8> [ %.lcssa, %for.end121.us ], [ <i8 116, i8 97, i8 104, i8 116, i8 115, i8 105, i8 104, i8 116>, %for.inc132.us ] %inc136.us = add nuw nsw i32 %i.1187.us, 1 %21 = load i32, ptr %n, align 4, !tbaa !7 %cmp5.us = icmp slt i32 %inc136.us, %21 br i1 %cmp5.us, label %for.body6.us, label %for.end137, !llvm.loop !13 for.body90.us: ; preds = %for.body90.us.preheader, %for.inc119.us %indvars.iv207 = phi i64 [ 0, %for.body90.us.preheader ], [ %indvars.iv.next208, %for.inc119.us ] %arrayidx92.us = getelementptr inbounds [257 x i8], ptr %str, i64 0, i64 %indvars.iv207 %22 = load i8, ptr %arrayidx92.us, align 1, !tbaa !14 %cmp94.us = icmp eq i8 %22, 32 br i1 %cmp94.us, label %for.inc119.us, label %for.body101.us.preheader for.body101.us.preheader: ; preds = %for.body90.us %cmp108.us = icmp eq i8 %22, %alpha.sroa.0.0.vec.extract br i1 %cmp108.us, label %if.then110.us, label %for.inc116.us for.inc116.us: ; preds = %for.body101.us.preheader %cmp108.us.1 = icmp eq i8 %22, %alpha.sroa.0.1.vec.extract br i1 %cmp108.us.1, label %if.then110.us, label %for.inc116.us.1 for.inc116.us.1: ; preds = %for.inc116.us %cmp108.us.2 = icmp eq i8 %22, %alpha.sroa.0.2.vec.extract br i1 %cmp108.us.2, label %if.then110.us, label %for.inc116.us.2 for.inc116.us.2: ; preds = %for.inc116.us.1 %cmp108.us.3 = icmp eq i8 %22, %alpha.sroa.0.3.vec.extract br i1 %cmp108.us.3, label %if.then110.us, label %for.inc116.us.3 for.inc116.us.3: ; preds = %for.inc116.us.2 %cmp108.us.4 = icmp eq i8 %22, %alpha.sroa.0.4.vec.extract br i1 %cmp108.us.4, label %if.then110.us, label %for.inc116.us.4 for.inc116.us.4: ; preds = %for.inc116.us.3 %cmp108.us.5 = icmp eq i8 %22, %alpha.sroa.0.5.vec.extract br i1 %cmp108.us.5, label %if.then110.us, label %for.inc116.us.5 for.inc116.us.5: ; preds = %for.inc116.us.4 %cmp108.us.6 = icmp eq i8 %22, %alpha.sroa.0.6.vec.extract br i1 %cmp108.us.6, label %if.then110.us, label %for.inc116.us.6 for.inc116.us.6: ; preds = %for.inc116.us.5 %cmp108.us.7 = icmp eq i8 %22, %alpha.sroa.0.7.vec.extract br i1 %cmp108.us.7, label %if.then110.us, label %for.inc116.us.7 for.inc116.us.7: ; preds = %for.inc116.us.6 %cmp108.us.8 = icmp eq i8 %22, %alpha.sroa.13.8.vec.extract br i1 %cmp108.us.8, label %if.then110.us, label %for.inc116.us.8 for.inc116.us.8: ; preds = %for.inc116.us.7 %cmp108.us.9 = icmp eq i8 %22, %alpha.sroa.13.9.vec.extract br i1 %cmp108.us.9, label %if.then110.us, label %for.inc116.us.9 for.inc116.us.9: ; preds = %for.inc116.us.8 %cmp108.us.10 = icmp eq i8 %22, %alpha.sroa.13.10.vec.extract br i1 %cmp108.us.10, label %if.then110.us, label %for.inc116.us.10 for.inc116.us.10: ; preds = %for.inc116.us.9 %cmp108.us.11 = icmp eq i8 %22, %alpha.sroa.13.11.vec.extract br i1 %cmp108.us.11, label %if.then110.us, label %for.inc116.us.11 for.inc116.us.11: ; preds = %for.inc116.us.10 %cmp108.us.12 = icmp eq i8 %22, %alpha.sroa.13.12.vec.extract br i1 %cmp108.us.12, label %if.then110.us, label %for.inc116.us.12 for.inc116.us.12: ; preds = %for.inc116.us.11 %cmp108.us.13 = icmp eq i8 %22, %alpha.sroa.13.13.vec.extract br i1 %cmp108.us.13, label %if.then110.us, label %for.inc116.us.13 for.inc116.us.13: ; preds = %for.inc116.us.12 %cmp108.us.14 = icmp eq i8 %22, %alpha.sroa.13.14.vec.extract br i1 %cmp108.us.14, label %if.then110.us, label %for.inc116.us.14 for.inc116.us.14: ; preds = %for.inc116.us.13 %cmp108.us.15 = icmp eq i8 %22, %alpha.sroa.13.15.vec.extract br i1 %cmp108.us.15, label %if.then110.us, label %for.inc116.us.15 for.inc116.us.15: ; preds = %for.inc116.us.14 %cmp108.us.16 = icmp eq i8 %22, %alpha.sroa.23.16.vec.extract br i1 %cmp108.us.16, label %if.then110.us, label %for.inc116.us.16 for.inc116.us.16: ; preds = %for.inc116.us.15 %cmp108.us.17 = icmp eq i8 %22, %alpha.sroa.23.17.vec.extract br i1 %cmp108.us.17, label %if.then110.us, label %for.inc116.us.17 for.inc116.us.17: ; preds = %for.inc116.us.16 %cmp108.us.18 = icmp eq i8 %22, %alpha.sroa.23.18.vec.extract br i1 %cmp108.us.18, label %if.then110.us, label %for.inc116.us.18 for.inc116.us.18: ; preds = %for.inc116.us.17 %cmp108.us.19 = icmp eq i8 %22, %alpha.sroa.23.19.vec.extract br i1 %cmp108.us.19, label %if.then110.us, label %for.inc116.us.19 for.inc116.us.19: ; preds = %for.inc116.us.18 %cmp108.us.20 = icmp eq i8 %22, %alpha.sroa.23.20.vec.extract br i1 %cmp108.us.20, label %if.then110.us, label %for.inc116.us.20 for.inc116.us.20: ; preds = %for.inc116.us.19 %cmp108.us.21 = icmp eq i8 %22, %alpha.sroa.23.21.vec.extract br i1 %cmp108.us.21, label %if.then110.us, label %for.inc116.us.21 for.inc116.us.21: ; preds = %for.inc116.us.20 %cmp108.us.22 = icmp eq i8 %22, %alpha.sroa.23.22.vec.extract br i1 %cmp108.us.22, label %if.then110.us, label %for.inc116.us.22 for.inc116.us.22: ; preds = %for.inc116.us.21 %cmp108.us.23 = icmp eq i8 %22, %alpha.sroa.23.23.vec.extract br i1 %cmp108.us.23, label %if.then110.us, label %for.inc116.us.23 for.inc116.us.23: ; preds = %for.inc116.us.22 %cmp108.us.24 = icmp eq i8 %22, %conv81.us br i1 %cmp108.us.24, label %if.then110.us, label %for.inc116.us.24 for.inc116.us.24: ; preds = %for.inc116.us.23 %cmp108.us.25 = icmp eq i8 %22, %conv81.us.1 br i1 %cmp108.us.25, label %if.then110.us, label %for.inc119.us if.then110.us: ; preds = %for.inc116.us.24, %for.inc116.us.23, %for.inc116.us.22, %for.inc116.us.21, %for.inc116.us.20, %for.inc116.us.19, %for.inc116.us.18, %for.inc116.us.17, %for.inc116.us.16, %for.inc116.us.15, %for.inc116.us.14, %for.inc116.us.13, %for.inc116.us.12, %for.inc116.us.11, %for.inc116.us.10, %for.inc116.us.9, %for.inc116.us.8, %for.inc116.us.7, %for.inc116.us.6, %for.inc116.us.5, %for.inc116.us.4, %for.inc116.us.3, %for.inc116.us.2, %for.inc116.us.1, %for.inc116.us, %for.body101.us.preheader %m.0183.us.lcssa.wide = phi i8 [ 97, %for.body101.us.preheader ], [ 98, %for.inc116.us ], [ 99, %for.inc116.us.1 ], [ 100, %for.inc116.us.2 ], [ 101, %for.inc116.us.3 ], [ 102, %for.inc116.us.4 ], [ 103, %for.inc116.us.5 ], [ 104, %for.inc116.us.6 ], [ 105, %for.inc116.us.7 ], [ 106, %for.inc116.us.8 ], [ 107, %for.inc116.us.9 ], [ 108, %for.inc116.us.10 ], [ 109, %for.inc116.us.11 ], [ 110, %for.inc116.us.12 ], [ 111, %for.inc116.us.13 ], [ 112, %for.inc116.us.14 ], [ 113, %for.inc116.us.15 ], [ 114, %for.inc116.us.16 ], [ 115, %for.inc116.us.17 ], [ 116, %for.inc116.us.18 ], [ 117, %for.inc116.us.19 ], [ 118, %for.inc116.us.20 ], [ 119, %for.inc116.us.21 ], [ 120, %for.inc116.us.22 ], [ 121, %for.inc116.us.23 ], [ 122, %for.inc116.us.24 ] store i8 %m.0183.us.lcssa.wide, ptr %arrayidx92.us, align 1, !tbaa !14 br label %for.inc119.us for.inc119.us: ; preds = %for.inc116.us.24, %if.then110.us, %for.body90.us %indvars.iv.next208 = add nuw nsw i64 %indvars.iv207, 1 %exitcond211.not = icmp eq i64 %indvars.iv.next208, %wide.trip.count210 br i1 %exitcond211.not, label %for.end121.us, label %for.body90.us, !llvm.loop !15 if.end124.us: ; preds = %lor.lhs.false.us call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %this, ptr noundef nonnull align 1 dereferenceable(5) @.str.4, i64 5, i1 false) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %that, ptr noundef nonnull align 1 dereferenceable(5) @.str.5, i64 5, i1 false) #7 %inc130.us = add nuw nsw i32 %k.0179.us, 1 %exitcond196.not = icmp eq i32 %inc130.us, 101 br i1 %exitcond196.not, label %for.inc132.us, label %for.cond18.preheader.us, !llvm.loop !16 for.cond18.preheader.us: ; preds = %if.end124.us.peel, %if.end124.us %k.0179.us = phi i32 [ 2, %if.end124.us.peel ], [ %inc130.us, %if.end124.us ] %23 = insertelement <8 x i32> poison, i32 %k.0179.us, i64 0 %24 = shufflevector <8 x i32> %23, <8 x i32> poison, <8 x i32> zeroinitializer %25 = add nsw <8 x i32> %44, %24 %26 = srem <8 x i32> %25, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %27 = trunc <8 x i32> %26 to <8 x i8> %28 = add nsw <8 x i8> %27, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97> %29 = shufflevector <8 x i8> %28, <8 x i8> poison, <4 x i32> <i32 7, i32 6, i32 5, i32 4> store <4 x i8> %29, ptr %this, align 4, !tbaa !14 %30 = shufflevector <8 x i8> %28, <8 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> store <4 x i8> %30, ptr %that, align 4, !tbaa !14 %call56.us = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %str, ptr noundef nonnull dereferenceable(1) %this) #8 %cmp57.not.us = icmp eq ptr %call56.us, null br i1 %cmp57.not.us, label %lor.lhs.false.us, label %if.then64.us for.cond14.preheader.us: ; preds = %for.body6.us, %for.inc132.us %indvars.iv = phi i64 [ 0, %for.body6.us ], [ %indvars.iv.next, %for.inc132.us ] %31 = phi <8 x i8> [ %1, %for.body6.us ], [ <i8 116, i8 97, i8 104, i8 116, i8 115, i8 105, i8 104, i8 116>, %for.inc132.us ] %arrayidx23.us = getelementptr inbounds [10000 x i32], ptr %C, i64 0, i64 %indvars.iv %32 = load i32, ptr %arrayidx23.us, align 4, !tbaa !7 %33 = insertelement <8 x i32> poison, i32 %32, i64 0 %34 = shufflevector <8 x i32> %33, <8 x i32> poison, <8 x i32> zeroinitializer %35 = zext <8 x i8> %31 to <8 x i32> %36 = add nsw <8 x i32> %35, <i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97, i32 -97> %37 = mul nsw <8 x i32> %36, %34 %38 = add nsw <8 x i32> %37, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %39 = srem <8 x i32> %38, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %40 = trunc <8 x i32> %39 to <8 x i8> %41 = add nsw <8 x i8> %40, <i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97, i8 97> %42 = shufflevector <8 x i8> %41, <8 x i8> poison, <4 x i32> <i32 7, i32 6, i32 5, i32 4> store <4 x i8> %42, ptr %this, align 4, !tbaa !14 %43 = shufflevector <8 x i8> %41, <8 x i8> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> store <4 x i8> %43, ptr %that, align 4, !tbaa !14 %call56.us.peel = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %str, ptr noundef nonnull dereferenceable(1) %this) #8 %cmp57.not.us.peel = icmp eq ptr %call56.us.peel, null br i1 %cmp57.not.us.peel, label %lor.lhs.false.us.peel, label %if.then64.us lor.lhs.false.us.peel: ; preds = %for.cond14.preheader.us %call61.us.peel = call ptr @strstr(ptr noundef nonnull dereferenceable(1) %str, ptr noundef nonnull dereferenceable(1) %that) #8 %cmp62.not.us.peel = icmp eq ptr %call61.us.peel, null br i1 %cmp62.not.us.peel, label %if.end124.us.peel, label %if.then64.us if.end124.us.peel: ; preds = %lor.lhs.false.us.peel call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %this, ptr noundef nonnull align 1 dereferenceable(5) @.str.4, i64 5, i1 false) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %that, ptr noundef nonnull align 1 dereferenceable(5) @.str.5, i64 5, i1 false) #7 %44 = mul nsw <8 x i32> %34, <i32 19, i32 0, i32 7, i32 19, i32 18, i32 8, i32 7, i32 19> br label %for.cond18.preheader.us for.body90.us.preheader: ; preds = %if.then64.us %wide.trip.count210 = and i64 %call9.us, 4294967295 %alpha.sroa.0.0.vec.extract = extractelement <8 x i8> %7, i64 0 %alpha.sroa.0.1.vec.extract = extractelement <8 x i8> %7, i64 1 %alpha.sroa.0.2.vec.extract = extractelement <8 x i8> %7, i64 2 %alpha.sroa.0.3.vec.extract = extractelement <8 x i8> %7, i64 3 %alpha.sroa.0.4.vec.extract = extractelement <8 x i8> %7, i64 4 %alpha.sroa.0.5.vec.extract = extractelement <8 x i8> %7, i64 5 %alpha.sroa.0.6.vec.extract = extractelement <8 x i8> %7, i64 6 %alpha.sroa.0.7.vec.extract = extractelement <8 x i8> %7, i64 7 %alpha.sroa.13.8.vec.extract = extractelement <8 x i8> %12, i64 0 %alpha.sroa.13.9.vec.extract = extractelement <8 x i8> %12, i64 1 %alpha.sroa.13.10.vec.extract = extractelement <8 x i8> %12, i64 2 %alpha.sroa.13.11.vec.extract = extractelement <8 x i8> %12, i64 3 %alpha.sroa.13.12.vec.extract = extractelement <8 x i8> %12, i64 4 %alpha.sroa.13.13.vec.extract = extractelement <8 x i8> %12, i64 5 %alpha.sroa.13.14.vec.extract = extractelement <8 x i8> %12, i64 6 %alpha.sroa.13.15.vec.extract = extractelement <8 x i8> %12, i64 7 %alpha.sroa.23.16.vec.extract = extractelement <8 x i8> %17, i64 0 %alpha.sroa.23.17.vec.extract = extractelement <8 x i8> %17, i64 1 %alpha.sroa.23.18.vec.extract = extractelement <8 x i8> %17, i64 2 %alpha.sroa.23.19.vec.extract = extractelement <8 x i8> %17, i64 3 %alpha.sroa.23.20.vec.extract = extractelement <8 x i8> %17, i64 4 %alpha.sroa.23.21.vec.extract = extractelement <8 x i8> %17, i64 5 %alpha.sroa.23.22.vec.extract = extractelement <8 x i8> %17, i64 6 %alpha.sroa.23.23.vec.extract = extractelement <8 x i8> %17, i64 7 br label %for.body90.us for.body6: ; preds = %for.body6.lr.ph, %for.body6 %i.1187 = phi i32 [ %inc136, %for.body6 ], [ 0, %for.body6.lr.ph ] %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %inc136 = add nuw nsw i32 %i.1187, 1 %45 = load i32, ptr %n, align 4, !tbaa !7 %cmp5 = icmp slt i32 %inc136, %45 br i1 %cmp5, label %for.body6, label %for.end137, !llvm.loop !13 for.end137: ; preds = %for.body6, %for.inc135.us, %for.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %C) #7 call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %that) #7 call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %this) #7 call void @llvm.lifetime.end.p0(i64 257, ptr nonnull %str) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %x, i32 noundef %y) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %y.addr.0 = phi i32 [ %y, %entry ], [ %rem, %while.cond ] %x.addr.0 = phi i32 [ %x, %entry ], [ %y.addr.0, %while.cond ] %rem = srem i32 %x.addr.0, %y.addr.0 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !5 while.end: ; preds = %while.cond ret i32 %y.addr.0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree norecurse nosync nounwind memory(none) 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 nofree nounwind willreturn memory(argmem: read) "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 #6 = { nofree nounwind } attributes #7 = { nounwind } attributes #8 = { nounwind willreturn memory(read) } !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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"} !11 = distinct !{!11, !6} !12 = distinct !{!12, !6} !13 = distinct !{!13, !6} !14 = !{!9, !9, i64 0} !15 = distinct !{!15, !6} !16 = distinct !{!16, !6, !17} !17 = !{!"llvm.loop.peeled.count", i32 1}
#include<stdio.h> #define M(a,b)a<b?b:a int w[100],v[100],n,W,i,j,dp[10005]; int main() { scanf("%d%d",&n,&W); for(i=0;i<n;i++) scanf("%d%d",&v[i],&w[i]); for(i=0;i<n;i++) for(j=W;j>=0;j--) if(j>=w[i]) dp[j]=M(dp[j],dp[j-w[i]]+v[i]); printf("%d\n",dp[W]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291322/source.c" 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 [5 x i8] c"%d%d\00", align 1 @n = dso_local global i32 0, align 4 @W = dso_local global i32 0, align 4 @i = dso_local local_unnamed_addr global i32 0, align 4 @v = dso_local global [100 x i32] zeroinitializer, align 16 @w = dso_local global [100 x i32] zeroinitializer, align 16 @j = dso_local local_unnamed_addr global i32 0, align 4 @dp = dso_local local_unnamed_addr global [10005 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @W) store i32 0, ptr @i, align 4, !tbaa !5 %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp47 = icmp sgt i32 %0, 0 br i1 %cmp47, label %for.body, label %for.cond4.preheader.thread for.cond4.preheader.thread: ; preds = %entry %.pre65 = load i32, ptr @W, align 4, !tbaa !5 br label %for.end38 for.cond4.preheader: ; preds = %for.body %cmp552 = icmp sgt i32 %9, 0 %.pre = load i32, ptr @W, align 4, !tbaa !5 br i1 %cmp552, label %for.body6.lr.ph, label %for.end38 for.body6.lr.ph: ; preds = %for.cond4.preheader %cmp849 = icmp sgt i32 %.pre, -1 br i1 %cmp849, label %for.body6.us.preheader, label %for.cond4.for.end38_crit_edge for.body6.us.preheader: ; preds = %for.body6.lr.ph %1 = zext i32 %.pre to i64 %wide.trip.count = zext i32 %9 to i64 br label %for.body6.us for.body6.us: ; preds = %for.body6.us.preheader, %for.cond7.for.inc36_crit_edge.us %indvars.iv60 = phi i64 [ 0, %for.body6.us.preheader ], [ %indvars.iv.next61, %for.cond7.for.inc36_crit_edge.us ] %arrayidx11.us = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %indvars.iv60 %2 = load i32, ptr %arrayidx11.us, align 4, !tbaa !5 %arrayidx20.us = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv60 %3 = sext i32 %2 to i64 br label %for.body9.us for.body9.us: ; preds = %for.body6.us, %for.inc34.us %indvars.iv = phi i64 [ %1, %for.body6.us ], [ %indvars.iv.next, %for.inc34.us ] %cmp12.not.us = icmp slt i64 %indvars.iv, %3 br i1 %cmp12.not.us, label %for.inc34.us, label %if.then.us if.then.us: ; preds = %for.body9.us %arrayidx14.us = getelementptr inbounds [10005 x i32], ptr @dp, i64 0, i64 %indvars.iv %4 = load i32, ptr %arrayidx14.us, align 4, !tbaa !5 %5 = sub nsw i64 %indvars.iv, %3 %arrayidx18.us = getelementptr inbounds [10005 x i32], ptr @dp, i64 0, i64 %5 %6 = load i32, ptr %arrayidx18.us, align 4, !tbaa !5 %7 = load i32, ptr %arrayidx20.us, align 4, !tbaa !5 %add.us = add nsw i32 %7, %6 %add..us = tail call i32 @llvm.smax.i32(i32 %4, i32 %add.us) store i32 %add..us, ptr %arrayidx14.us, align 4, !tbaa !5 br label %for.inc34.us for.inc34.us: ; preds = %if.then.us, %for.body9.us %indvars.iv.next = add nsw i64 %indvars.iv, -1 %cmp8.us = icmp sgt i64 %indvars.iv, 0 br i1 %cmp8.us, label %for.body9.us, label %for.cond7.for.inc36_crit_edge.us, !llvm.loop !9 for.cond7.for.inc36_crit_edge.us: ; preds = %for.inc34.us %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %exitcond.not = icmp eq i64 %indvars.iv.next61, %wide.trip.count br i1 %exitcond.not, label %for.cond4.for.end38_crit_edge, label %for.body6.us, !llvm.loop !11 for.body: ; preds = %entry, %for.body %storemerge48 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %idxprom = sext i32 %storemerge48 to i64 %arrayidx = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %idxprom %arrayidx2 = getelementptr inbounds [100 x i32], ptr @w, i64 0, i64 %idxprom %call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %8 = load i32, ptr @i, align 4, !tbaa !5 %inc = add nsw i32 %8, 1 store i32 %inc, ptr @i, align 4, !tbaa !5 %9 = load i32, ptr @n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %9 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !12 for.cond4.for.end38_crit_edge: ; preds = %for.cond7.for.inc36_crit_edge.us, %for.body6.lr.ph %.us-phi = phi i32 [ %.pre, %for.body6.lr.ph ], [ -1, %for.cond7.for.inc36_crit_edge.us ] store i32 %.us-phi, ptr @j, align 4, !tbaa !5 br label %for.end38 for.end38: ; preds = %for.cond4.preheader.thread, %for.cond4.for.end38_crit_edge, %for.cond4.preheader %.pre66 = phi i32 [ %.pre, %for.cond4.for.end38_crit_edge ], [ %.pre, %for.cond4.preheader ], [ %.pre65, %for.cond4.preheader.thread ] %storemerge45.lcssa = phi i32 [ %9, %for.cond4.for.end38_crit_edge ], [ 0, %for.cond4.preheader ], [ 0, %for.cond4.preheader.thread ] store i32 %storemerge45.lcssa, ptr @i, align 4, !tbaa !5 %idxprom39 = sext i32 %.pre66 to i64 %arrayidx40 = getelementptr inbounds [10005 x i32], ptr @dp, i64 0, i64 %idxprom39 %10 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %call41 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %10) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #2 attributes #0 = { 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 #1 = { 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 #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
// Aizu 1148: Analyzing Login/Logout Records // 2017.9.16 bal4u@uu #include <stdio.h> typedef struct { int t, pc, m, s; } R; R rd[1005]; int main() { int n, m, r, q, i, j, ts, te, t, ans, cnt; while (scanf("%d%d", &n, &m) && n) { scanf("%d", &r); for (i = 0; i < r; i++) scanf("%d%d%d%d", &rd[i].t, &rd[i].pc, &rd[i].m, &rd[i].s); scanf("%d", &q); for (i = 0; i < q; i++) { scanf("%d%d%d", &ts, &te, &m); for (ans = t = cnt = 0, j = 0; j < r; j++) { if (rd[j].t >= te) { if (t > 0) ans += te - t; break; } if (rd[j].m != m) continue; if (rd[j].s) { cnt++; if (t == 0) { if (rd[j].t < ts) t = ts; else t = rd[j].t; } } else { // lg[j].s == 0 if (--cnt == 0) { if (rd[j].t > ts && t > 0) ans += rd[j].t - t; t = 0; } } } printf("%d\n", ans); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291366/source.c" 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" %struct.R = type { i32, i32, i32, i32 } @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @rd = dso_local global [1005 x %struct.R] zeroinitializer, align 16 @.str.3 = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %r = alloca i32, align 4 %q = alloca i32, align 4 %ts = alloca i32, align 4 %te = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ts) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %te) #4 %call110 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %tobool111 = icmp ne i32 %call110, 0 %0 = load i32, ptr %n, align 4 %tobool1112 = icmp ne i32 %0, 0 %1 = select i1 %tobool111, i1 %tobool1112, i1 false br i1 %1, label %while.body, label %while.end while.cond.loopexit: ; preds = %for.end70, %for.end %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %tobool = icmp ne i32 %call, 0 %2 = load i32, ptr %n, align 4 %tobool1 = icmp ne i32 %2, 0 %3 = select i1 %tobool, i1 %tobool1, i1 false br i1 %3, label %while.body, label %while.end, !llvm.loop !5 while.body: ; preds = %entry, %while.cond.loopexit %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %r) %4 = load i32, ptr %r, align 4, !tbaa !7 %cmp101 = icmp sgt i32 %4, 0 br i1 %cmp101, label %for.body, label %for.end for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %while.body ] %arrayidx = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv %pc = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv, i32 1 %m8 = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv, i32 2 %s = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv, i32 3 %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx, ptr noundef nonnull %pc, ptr noundef nonnull %m8, ptr noundef nonnull %s) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %r, align 4, !tbaa !7 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body, %while.body %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %q) %7 = load i32, ptr %q, align 4, !tbaa !7 %cmp14108 = icmp sgt i32 %7, 0 br i1 %cmp14108, label %for.body15, label %while.cond.loopexit for.body15: ; preds = %for.end, %for.end70 %i.1109 = phi i32 [ %inc73, %for.end70 ], [ 0, %for.end ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %ts, ptr noundef nonnull %te, ptr noundef nonnull %m) %8 = load i32, ptr %r, align 4, !tbaa !7 %cmp18103 = icmp sgt i32 %8, 0 br i1 %cmp18103, label %for.body19.lr.ph, label %for.end70 for.body19.lr.ph: ; preds = %for.body15 %9 = load i32, ptr %te, align 4, !tbaa !7 %10 = load i32, ptr %m, align 4 %11 = load i32, ptr %ts, align 4 %wide.trip.count = zext i32 %8 to i64 br label %for.body19 for.body19: ; preds = %for.body19.lr.ph, %for.inc68 %indvars.iv116 = phi i64 [ 0, %for.body19.lr.ph ], [ %indvars.iv.next117, %for.inc68 ] %cnt.0107 = phi i32 [ 0, %for.body19.lr.ph ], [ %cnt.1, %for.inc68 ] %ans.0106 = phi i32 [ 0, %for.body19.lr.ph ], [ %ans.2, %for.inc68 ] %t.0105 = phi i32 [ 0, %for.body19.lr.ph ], [ %t.1, %for.inc68 ] %arrayidx21 = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv116 %12 = load i32, ptr %arrayidx21, align 16, !tbaa !12 %cmp23.not = icmp slt i32 %12, %9 br i1 %cmp23.not, label %if.end26, label %if.then if.then: ; preds = %for.body19 %cmp24 = icmp sgt i32 %t.0105, 0 br i1 %cmp24, label %if.then25, label %for.end70 if.then25: ; preds = %if.then %sub = sub i32 %ans.0106, %t.0105 %add = add i32 %sub, %9 br label %for.end70 if.end26: ; preds = %for.body19 %m29 = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv116, i32 2 %13 = load i32, ptr %m29, align 8, !tbaa !14 %cmp30.not = icmp eq i32 %13, %10 br i1 %cmp30.not, label %if.end32, label %for.inc68 if.end32: ; preds = %if.end26 %s35 = getelementptr inbounds [1005 x %struct.R], ptr @rd, i64 0, i64 %indvars.iv116, i32 3 %14 = load i32, ptr %s35, align 4, !tbaa !15 %tobool36.not = icmp eq i32 %14, 0 br i1 %tobool36.not, label %if.else51, label %if.then37 if.then37: ; preds = %if.end32 %inc38 = add nsw i32 %cnt.0107, 1 %cmp39 = icmp eq i32 %t.0105, 0 br i1 %cmp39, label %if.then40, label %for.inc68 if.then40: ; preds = %if.then37 %. = call i32 @llvm.smax.i32(i32 %12, i32 %11) br label %for.inc68 if.else51: ; preds = %if.end32 %dec = add nsw i32 %cnt.0107, -1 %cmp52 = icmp eq i32 %dec, 0 br i1 %cmp52, label %if.then53, label %for.inc68 if.then53: ; preds = %if.else51 %cmp57 = icmp sgt i32 %12, %11 %cmp58 = icmp sgt i32 %t.0105, 0 %or.cond = select i1 %cmp57, i1 %cmp58, i1 false %sub63 = sub nsw i32 %12, %t.0105 %add64 = select i1 %or.cond, i32 %sub63, i32 0 %ans.1 = add nsw i32 %add64, %ans.0106 br label %for.inc68 for.inc68: ; preds = %if.then40, %if.then37, %if.then53, %if.else51, %if.end26 %t.1 = phi i32 [ %t.0105, %if.end26 ], [ %t.0105, %if.then37 ], [ 0, %if.then53 ], [ %t.0105, %if.else51 ], [ %., %if.then40 ] %ans.2 = phi i32 [ %ans.0106, %if.end26 ], [ %ans.0106, %if.then37 ], [ %ans.1, %if.then53 ], [ %ans.0106, %if.else51 ], [ %ans.0106, %if.then40 ] %cnt.1 = phi i32 [ %cnt.0107, %if.end26 ], [ %inc38, %if.then37 ], [ 0, %if.then53 ], [ %dec, %if.else51 ], [ %inc38, %if.then40 ] %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1 %exitcond.not = icmp eq i64 %indvars.iv.next117, %wide.trip.count br i1 %exitcond.not, label %for.end70, label %for.body19, !llvm.loop !16 for.end70: ; preds = %for.inc68, %for.body15, %if.then, %if.then25 %ans.3 = phi i32 [ %add, %if.then25 ], [ %ans.0106, %if.then ], [ 0, %for.body15 ], [ %ans.2, %for.inc68 ] %call71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %ans.3) %inc73 = add nuw nsw i32 %i.1109, 1 %15 = load i32, ptr %q, align 4, !tbaa !7 %cmp14 = icmp slt i32 %inc73, %15 br i1 %cmp14, label %for.body15, label %while.cond.loopexit, !llvm.loop !17 while.end: ; preds = %while.cond.loopexit, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %te) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ts) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"} !11 = distinct !{!11, !6} !12 = !{!13, !8, i64 0} !13 = !{!"", !8, i64 0, !8, i64 4, !8, i64 8, !8, i64 12} !14 = !{!13, !8, i64 8} !15 = !{!13, !8, i64 12} !16 = distinct !{!16, !6} !17 = distinct !{!17, !6}
#include <stdio.h> int main(void){ char input[100]; int a=0; int b=0; int c=0; int d=0; int e=0; int f=0; int g=0; int h=0; int i=0; int j=0; int k=0; int l=0; int m=0; int n=0; int o=0; int p=0; int q=0; int r=0; int s=0; int t=0; int u=0; int v=0; int w=0; int x=0; int y=0; int z=0; int loop; char check; int flg=0; scanf("%s",input); for(loop=0;input[loop]!='\0';loop++){ check = input[loop]; switch(check){ case 'a': a++; break; case 'b': b++; break; case 'c': c++; break; case 'd': d++; break; case 'e': e++; break; case 'f': f++; break; case 'g': g++; break; case 'h': h++; break; case 'i': i++; break; case 'j': j++; break; case 'k': k++; break; case 'l': l++; break; case 'm': m++; break; case 'n': n++; break; case 'o': o++; break; case 'p': p++; break; case 'q': q++; break; case 'r': r++; break; case 's': s++; break; case 't': t++; break; case 'u': u++; break; case 'v': v++; break; case 'w': w++; break; case 'x': x++; break; case 'y': y++; break; case 'z': z++; break; default: break; } } if(a%2 != 0){ flg++; } if(b%2 != 0){ flg++; } if(c%2 != 0){ flg++; } if(d%2 != 0){ flg++; } if(e%2 != 0){ flg++; } if(f%2 != 0){ flg++; } if(g%2 != 0){ flg++; } if(h%2 != 0){ flg++; } if(i%2 != 0){ flg++; } if(j%2 != 0){ flg++; } if(k%2 != 0){ flg++; } if(l%2 != 0){ flg++; } if(m%2 != 0){ flg++; } if(n%2 != 0){ flg++; } if(o%2 != 0){ flg++; } if(p%2 != 0){ flg++; } if(q%2 != 0){ flg++; } if(r%2 != 0){ flg++; } if(s%2 != 0){ flg++; } if(t%2 != 0){ flg++; } if(u%2 != 0){ flg++; } if(v%2 != 0){ flg++; } if(w%2 != 0){ flg++; } if(x%2 != 0){ flg++; } if(y%2 != 0){ flg++; } if(z%2 != 0){ flg++; } if(flg != 0){ printf("No\n"); } else{ printf("Yes\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291416/source.c" 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"%s\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %input = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %input) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input) %0 = load i8, ptr %input, align 16, !tbaa !5 %cmp.not270 = icmp eq i8 %0, 0 br i1 %cmp.not270, label %for.end, label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %1 = phi i8 [ %2, %for.inc ], [ %0, %entry ] %a.0297 = phi i32 [ %a.1, %for.inc ], [ 0, %entry ] %z.0295 = phi i32 [ %z.1, %for.inc ], [ 0, %entry ] %y.0294 = phi i32 [ %y.1, %for.inc ], [ 0, %entry ] %x.0293 = phi i32 [ %x.1, %for.inc ], [ 0, %entry ] %w.0292 = phi i32 [ %w.1, %for.inc ], [ 0, %entry ] %v.0291 = phi i32 [ %v.1, %for.inc ], [ 0, %entry ] %u.0290 = phi i32 [ %u.1, %for.inc ], [ 0, %entry ] %t.0289 = phi i32 [ %t.1, %for.inc ], [ 0, %entry ] %s.0288 = phi i32 [ %s.1, %for.inc ], [ 0, %entry ] %r.0287 = phi i32 [ %r.1, %for.inc ], [ 0, %entry ] %q.0286 = phi i32 [ %q.1, %for.inc ], [ 0, %entry ] %p.0285 = phi i32 [ %p.1, %for.inc ], [ 0, %entry ] %o.0284 = phi i32 [ %o.1, %for.inc ], [ 0, %entry ] %n.0283 = phi i32 [ %n.1, %for.inc ], [ 0, %entry ] %m.0282 = phi i32 [ %m.1, %for.inc ], [ 0, %entry ] %l.0281 = phi i32 [ %l.1, %for.inc ], [ 0, %entry ] %k.0280 = phi i32 [ %k.1, %for.inc ], [ 0, %entry ] %j.0279 = phi i32 [ %j.1, %for.inc ], [ 0, %entry ] %i.0278 = phi i32 [ %i.1, %for.inc ], [ 0, %entry ] %h.0277 = phi i32 [ %h.1, %for.inc ], [ 0, %entry ] %g.0276 = phi i32 [ %g.1, %for.inc ], [ 0, %entry ] %f.0275 = phi i32 [ %f.1, %for.inc ], [ 0, %entry ] %e.0274 = phi i32 [ %e.1, %for.inc ], [ 0, %entry ] %d.0273 = phi i32 [ %d.1, %for.inc ], [ 0, %entry ] %c.0272 = phi i32 [ %c.1, %for.inc ], [ 0, %entry ] %b.0271 = phi i32 [ %b.1, %for.inc ], [ 0, %entry ] %conv = sext i8 %1 to i32 switch i32 %conv, label %for.inc [ i32 97, label %sw.bb i32 98, label %sw.bb5 i32 99, label %sw.bb7 i32 100, label %sw.bb9 i32 101, label %sw.bb11 i32 102, label %sw.bb13 i32 103, label %sw.bb15 i32 104, label %sw.bb17 i32 105, label %sw.bb19 i32 106, label %sw.bb21 i32 107, label %sw.bb23 i32 108, label %sw.bb25 i32 109, label %sw.bb27 i32 110, label %sw.bb29 i32 111, label %sw.bb31 i32 112, label %sw.bb33 i32 113, label %sw.bb35 i32 114, label %sw.bb37 i32 115, label %sw.bb39 i32 116, label %sw.bb41 i32 117, label %sw.bb43 i32 118, label %sw.bb45 i32 119, label %sw.bb47 i32 120, label %sw.bb49 i32 121, label %sw.bb51 i32 122, label %sw.bb53 ] sw.bb: ; preds = %for.body %inc = add nsw i32 %a.0297, 1 br label %for.inc sw.bb5: ; preds = %for.body %inc6 = add nsw i32 %b.0271, 1 br label %for.inc sw.bb7: ; preds = %for.body %inc8 = add nsw i32 %c.0272, 1 br label %for.inc sw.bb9: ; preds = %for.body %inc10 = add nsw i32 %d.0273, 1 br label %for.inc sw.bb11: ; preds = %for.body %inc12 = add nsw i32 %e.0274, 1 br label %for.inc sw.bb13: ; preds = %for.body %inc14 = add nsw i32 %f.0275, 1 br label %for.inc sw.bb15: ; preds = %for.body %inc16 = add nsw i32 %g.0276, 1 br label %for.inc sw.bb17: ; preds = %for.body %inc18 = add nsw i32 %h.0277, 1 br label %for.inc sw.bb19: ; preds = %for.body %inc20 = add nsw i32 %i.0278, 1 br label %for.inc sw.bb21: ; preds = %for.body %inc22 = add nsw i32 %j.0279, 1 br label %for.inc sw.bb23: ; preds = %for.body %inc24 = add nsw i32 %k.0280, 1 br label %for.inc sw.bb25: ; preds = %for.body %inc26 = add nsw i32 %l.0281, 1 br label %for.inc sw.bb27: ; preds = %for.body %inc28 = add nsw i32 %m.0282, 1 br label %for.inc sw.bb29: ; preds = %for.body %inc30 = add nsw i32 %n.0283, 1 br label %for.inc sw.bb31: ; preds = %for.body %inc32 = add nsw i32 %o.0284, 1 br label %for.inc sw.bb33: ; preds = %for.body %inc34 = add nsw i32 %p.0285, 1 br label %for.inc sw.bb35: ; preds = %for.body %inc36 = add nsw i32 %q.0286, 1 br label %for.inc sw.bb37: ; preds = %for.body %inc38 = add nsw i32 %r.0287, 1 br label %for.inc sw.bb39: ; preds = %for.body %inc40 = add nsw i32 %s.0288, 1 br label %for.inc sw.bb41: ; preds = %for.body %inc42 = add nsw i32 %t.0289, 1 br label %for.inc sw.bb43: ; preds = %for.body %inc44 = add nsw i32 %u.0290, 1 br label %for.inc sw.bb45: ; preds = %for.body %inc46 = add nsw i32 %v.0291, 1 br label %for.inc sw.bb47: ; preds = %for.body %inc48 = add nsw i32 %w.0292, 1 br label %for.inc sw.bb49: ; preds = %for.body %inc50 = add nsw i32 %x.0293, 1 br label %for.inc sw.bb51: ; preds = %for.body %inc52 = add nsw i32 %y.0294, 1 br label %for.inc sw.bb53: ; preds = %for.body %inc54 = add nsw i32 %z.0295, 1 br label %for.inc for.inc: ; preds = %sw.bb, %sw.bb5, %sw.bb7, %sw.bb9, %sw.bb11, %sw.bb13, %sw.bb15, %sw.bb17, %sw.bb19, %sw.bb21, %sw.bb23, %sw.bb25, %sw.bb27, %sw.bb29, %sw.bb31, %sw.bb33, %sw.bb35, %sw.bb37, %sw.bb39, %sw.bb41, %sw.bb43, %sw.bb45, %sw.bb47, %sw.bb49, %sw.bb51, %sw.bb53, %for.body %b.1 = phi i32 [ %b.0271, %for.body ], [ %b.0271, %sw.bb53 ], [ %b.0271, %sw.bb51 ], [ %b.0271, %sw.bb49 ], [ %b.0271, %sw.bb47 ], [ %b.0271, %sw.bb45 ], [ %b.0271, %sw.bb43 ], [ %b.0271, %sw.bb41 ], [ %b.0271, %sw.bb39 ], [ %b.0271, %sw.bb37 ], [ %b.0271, %sw.bb35 ], [ %b.0271, %sw.bb33 ], [ %b.0271, %sw.bb31 ], [ %b.0271, %sw.bb29 ], [ %b.0271, %sw.bb27 ], [ %b.0271, %sw.bb25 ], [ %b.0271, %sw.bb23 ], [ %b.0271, %sw.bb21 ], [ %b.0271, %sw.bb19 ], [ %b.0271, %sw.bb17 ], [ %b.0271, %sw.bb15 ], [ %b.0271, %sw.bb13 ], [ %b.0271, %sw.bb11 ], [ %b.0271, %sw.bb9 ], [ %b.0271, %sw.bb7 ], [ %inc6, %sw.bb5 ], [ %b.0271, %sw.bb ] %c.1 = phi i32 [ %c.0272, %for.body ], [ %c.0272, %sw.bb53 ], [ %c.0272, %sw.bb51 ], [ %c.0272, %sw.bb49 ], [ %c.0272, %sw.bb47 ], [ %c.0272, %sw.bb45 ], [ %c.0272, %sw.bb43 ], [ %c.0272, %sw.bb41 ], [ %c.0272, %sw.bb39 ], [ %c.0272, %sw.bb37 ], [ %c.0272, %sw.bb35 ], [ %c.0272, %sw.bb33 ], [ %c.0272, %sw.bb31 ], [ %c.0272, %sw.bb29 ], [ %c.0272, %sw.bb27 ], [ %c.0272, %sw.bb25 ], [ %c.0272, %sw.bb23 ], [ %c.0272, %sw.bb21 ], [ %c.0272, %sw.bb19 ], [ %c.0272, %sw.bb17 ], [ %c.0272, %sw.bb15 ], [ %c.0272, %sw.bb13 ], [ %c.0272, %sw.bb11 ], [ %c.0272, %sw.bb9 ], [ %inc8, %sw.bb7 ], [ %c.0272, %sw.bb5 ], [ %c.0272, %sw.bb ] %d.1 = phi i32 [ %d.0273, %for.body ], [ %d.0273, %sw.bb53 ], [ %d.0273, %sw.bb51 ], [ %d.0273, %sw.bb49 ], [ %d.0273, %sw.bb47 ], [ %d.0273, %sw.bb45 ], [ %d.0273, %sw.bb43 ], [ %d.0273, %sw.bb41 ], [ %d.0273, %sw.bb39 ], [ %d.0273, %sw.bb37 ], [ %d.0273, %sw.bb35 ], [ %d.0273, %sw.bb33 ], [ %d.0273, %sw.bb31 ], [ %d.0273, %sw.bb29 ], [ %d.0273, %sw.bb27 ], [ %d.0273, %sw.bb25 ], [ %d.0273, %sw.bb23 ], [ %d.0273, %sw.bb21 ], [ %d.0273, %sw.bb19 ], [ %d.0273, %sw.bb17 ], [ %d.0273, %sw.bb15 ], [ %d.0273, %sw.bb13 ], [ %d.0273, %sw.bb11 ], [ %inc10, %sw.bb9 ], [ %d.0273, %sw.bb7 ], [ %d.0273, %sw.bb5 ], [ %d.0273, %sw.bb ] %e.1 = phi i32 [ %e.0274, %for.body ], [ %e.0274, %sw.bb53 ], [ %e.0274, %sw.bb51 ], [ %e.0274, %sw.bb49 ], [ %e.0274, %sw.bb47 ], [ %e.0274, %sw.bb45 ], [ %e.0274, %sw.bb43 ], [ %e.0274, %sw.bb41 ], [ %e.0274, %sw.bb39 ], [ %e.0274, %sw.bb37 ], [ %e.0274, %sw.bb35 ], [ %e.0274, %sw.bb33 ], [ %e.0274, %sw.bb31 ], [ %e.0274, %sw.bb29 ], [ %e.0274, %sw.bb27 ], [ %e.0274, %sw.bb25 ], [ %e.0274, %sw.bb23 ], [ %e.0274, %sw.bb21 ], [ %e.0274, %sw.bb19 ], [ %e.0274, %sw.bb17 ], [ %e.0274, %sw.bb15 ], [ %e.0274, %sw.bb13 ], [ %inc12, %sw.bb11 ], [ %e.0274, %sw.bb9 ], [ %e.0274, %sw.bb7 ], [ %e.0274, %sw.bb5 ], [ %e.0274, %sw.bb ] %f.1 = phi i32 [ %f.0275, %for.body ], [ %f.0275, %sw.bb53 ], [ %f.0275, %sw.bb51 ], [ %f.0275, %sw.bb49 ], [ %f.0275, %sw.bb47 ], [ %f.0275, %sw.bb45 ], [ %f.0275, %sw.bb43 ], [ %f.0275, %sw.bb41 ], [ %f.0275, %sw.bb39 ], [ %f.0275, %sw.bb37 ], [ %f.0275, %sw.bb35 ], [ %f.0275, %sw.bb33 ], [ %f.0275, %sw.bb31 ], [ %f.0275, %sw.bb29 ], [ %f.0275, %sw.bb27 ], [ %f.0275, %sw.bb25 ], [ %f.0275, %sw.bb23 ], [ %f.0275, %sw.bb21 ], [ %f.0275, %sw.bb19 ], [ %f.0275, %sw.bb17 ], [ %f.0275, %sw.bb15 ], [ %inc14, %sw.bb13 ], [ %f.0275, %sw.bb11 ], [ %f.0275, %sw.bb9 ], [ %f.0275, %sw.bb7 ], [ %f.0275, %sw.bb5 ], [ %f.0275, %sw.bb ] %g.1 = phi i32 [ %g.0276, %for.body ], [ %g.0276, %sw.bb53 ], [ %g.0276, %sw.bb51 ], [ %g.0276, %sw.bb49 ], [ %g.0276, %sw.bb47 ], [ %g.0276, %sw.bb45 ], [ %g.0276, %sw.bb43 ], [ %g.0276, %sw.bb41 ], [ %g.0276, %sw.bb39 ], [ %g.0276, %sw.bb37 ], [ %g.0276, %sw.bb35 ], [ %g.0276, %sw.bb33 ], [ %g.0276, %sw.bb31 ], [ %g.0276, %sw.bb29 ], [ %g.0276, %sw.bb27 ], [ %g.0276, %sw.bb25 ], [ %g.0276, %sw.bb23 ], [ %g.0276, %sw.bb21 ], [ %g.0276, %sw.bb19 ], [ %g.0276, %sw.bb17 ], [ %inc16, %sw.bb15 ], [ %g.0276, %sw.bb13 ], [ %g.0276, %sw.bb11 ], [ %g.0276, %sw.bb9 ], [ %g.0276, %sw.bb7 ], [ %g.0276, %sw.bb5 ], [ %g.0276, %sw.bb ] %h.1 = phi i32 [ %h.0277, %for.body ], [ %h.0277, %sw.bb53 ], [ %h.0277, %sw.bb51 ], [ %h.0277, %sw.bb49 ], [ %h.0277, %sw.bb47 ], [ %h.0277, %sw.bb45 ], [ %h.0277, %sw.bb43 ], [ %h.0277, %sw.bb41 ], [ %h.0277, %sw.bb39 ], [ %h.0277, %sw.bb37 ], [ %h.0277, %sw.bb35 ], [ %h.0277, %sw.bb33 ], [ %h.0277, %sw.bb31 ], [ %h.0277, %sw.bb29 ], [ %h.0277, %sw.bb27 ], [ %h.0277, %sw.bb25 ], [ %h.0277, %sw.bb23 ], [ %h.0277, %sw.bb21 ], [ %h.0277, %sw.bb19 ], [ %inc18, %sw.bb17 ], [ %h.0277, %sw.bb15 ], [ %h.0277, %sw.bb13 ], [ %h.0277, %sw.bb11 ], [ %h.0277, %sw.bb9 ], [ %h.0277, %sw.bb7 ], [ %h.0277, %sw.bb5 ], [ %h.0277, %sw.bb ] %i.1 = phi i32 [ %i.0278, %for.body ], [ %i.0278, %sw.bb53 ], [ %i.0278, %sw.bb51 ], [ %i.0278, %sw.bb49 ], [ %i.0278, %sw.bb47 ], [ %i.0278, %sw.bb45 ], [ %i.0278, %sw.bb43 ], [ %i.0278, %sw.bb41 ], [ %i.0278, %sw.bb39 ], [ %i.0278, %sw.bb37 ], [ %i.0278, %sw.bb35 ], [ %i.0278, %sw.bb33 ], [ %i.0278, %sw.bb31 ], [ %i.0278, %sw.bb29 ], [ %i.0278, %sw.bb27 ], [ %i.0278, %sw.bb25 ], [ %i.0278, %sw.bb23 ], [ %i.0278, %sw.bb21 ], [ %inc20, %sw.bb19 ], [ %i.0278, %sw.bb17 ], [ %i.0278, %sw.bb15 ], [ %i.0278, %sw.bb13 ], [ %i.0278, %sw.bb11 ], [ %i.0278, %sw.bb9 ], [ %i.0278, %sw.bb7 ], [ %i.0278, %sw.bb5 ], [ %i.0278, %sw.bb ] %j.1 = phi i32 [ %j.0279, %for.body ], [ %j.0279, %sw.bb53 ], [ %j.0279, %sw.bb51 ], [ %j.0279, %sw.bb49 ], [ %j.0279, %sw.bb47 ], [ %j.0279, %sw.bb45 ], [ %j.0279, %sw.bb43 ], [ %j.0279, %sw.bb41 ], [ %j.0279, %sw.bb39 ], [ %j.0279, %sw.bb37 ], [ %j.0279, %sw.bb35 ], [ %j.0279, %sw.bb33 ], [ %j.0279, %sw.bb31 ], [ %j.0279, %sw.bb29 ], [ %j.0279, %sw.bb27 ], [ %j.0279, %sw.bb25 ], [ %j.0279, %sw.bb23 ], [ %inc22, %sw.bb21 ], [ %j.0279, %sw.bb19 ], [ %j.0279, %sw.bb17 ], [ %j.0279, %sw.bb15 ], [ %j.0279, %sw.bb13 ], [ %j.0279, %sw.bb11 ], [ %j.0279, %sw.bb9 ], [ %j.0279, %sw.bb7 ], [ %j.0279, %sw.bb5 ], [ %j.0279, %sw.bb ] %k.1 = phi i32 [ %k.0280, %for.body ], [ %k.0280, %sw.bb53 ], [ %k.0280, %sw.bb51 ], [ %k.0280, %sw.bb49 ], [ %k.0280, %sw.bb47 ], [ %k.0280, %sw.bb45 ], [ %k.0280, %sw.bb43 ], [ %k.0280, %sw.bb41 ], [ %k.0280, %sw.bb39 ], [ %k.0280, %sw.bb37 ], [ %k.0280, %sw.bb35 ], [ %k.0280, %sw.bb33 ], [ %k.0280, %sw.bb31 ], [ %k.0280, %sw.bb29 ], [ %k.0280, %sw.bb27 ], [ %k.0280, %sw.bb25 ], [ %inc24, %sw.bb23 ], [ %k.0280, %sw.bb21 ], [ %k.0280, %sw.bb19 ], [ %k.0280, %sw.bb17 ], [ %k.0280, %sw.bb15 ], [ %k.0280, %sw.bb13 ], [ %k.0280, %sw.bb11 ], [ %k.0280, %sw.bb9 ], [ %k.0280, %sw.bb7 ], [ %k.0280, %sw.bb5 ], [ %k.0280, %sw.bb ] %l.1 = phi i32 [ %l.0281, %for.body ], [ %l.0281, %sw.bb53 ], [ %l.0281, %sw.bb51 ], [ %l.0281, %sw.bb49 ], [ %l.0281, %sw.bb47 ], [ %l.0281, %sw.bb45 ], [ %l.0281, %sw.bb43 ], [ %l.0281, %sw.bb41 ], [ %l.0281, %sw.bb39 ], [ %l.0281, %sw.bb37 ], [ %l.0281, %sw.bb35 ], [ %l.0281, %sw.bb33 ], [ %l.0281, %sw.bb31 ], [ %l.0281, %sw.bb29 ], [ %l.0281, %sw.bb27 ], [ %inc26, %sw.bb25 ], [ %l.0281, %sw.bb23 ], [ %l.0281, %sw.bb21 ], [ %l.0281, %sw.bb19 ], [ %l.0281, %sw.bb17 ], [ %l.0281, %sw.bb15 ], [ %l.0281, %sw.bb13 ], [ %l.0281, %sw.bb11 ], [ %l.0281, %sw.bb9 ], [ %l.0281, %sw.bb7 ], [ %l.0281, %sw.bb5 ], [ %l.0281, %sw.bb ] %m.1 = phi i32 [ %m.0282, %for.body ], [ %m.0282, %sw.bb53 ], [ %m.0282, %sw.bb51 ], [ %m.0282, %sw.bb49 ], [ %m.0282, %sw.bb47 ], [ %m.0282, %sw.bb45 ], [ %m.0282, %sw.bb43 ], [ %m.0282, %sw.bb41 ], [ %m.0282, %sw.bb39 ], [ %m.0282, %sw.bb37 ], [ %m.0282, %sw.bb35 ], [ %m.0282, %sw.bb33 ], [ %m.0282, %sw.bb31 ], [ %m.0282, %sw.bb29 ], [ %inc28, %sw.bb27 ], [ %m.0282, %sw.bb25 ], [ %m.0282, %sw.bb23 ], [ %m.0282, %sw.bb21 ], [ %m.0282, %sw.bb19 ], [ %m.0282, %sw.bb17 ], [ %m.0282, %sw.bb15 ], [ %m.0282, %sw.bb13 ], [ %m.0282, %sw.bb11 ], [ %m.0282, %sw.bb9 ], [ %m.0282, %sw.bb7 ], [ %m.0282, %sw.bb5 ], [ %m.0282, %sw.bb ] %n.1 = phi i32 [ %n.0283, %for.body ], [ %n.0283, %sw.bb53 ], [ %n.0283, %sw.bb51 ], [ %n.0283, %sw.bb49 ], [ %n.0283, %sw.bb47 ], [ %n.0283, %sw.bb45 ], [ %n.0283, %sw.bb43 ], [ %n.0283, %sw.bb41 ], [ %n.0283, %sw.bb39 ], [ %n.0283, %sw.bb37 ], [ %n.0283, %sw.bb35 ], [ %n.0283, %sw.bb33 ], [ %n.0283, %sw.bb31 ], [ %inc30, %sw.bb29 ], [ %n.0283, %sw.bb27 ], [ %n.0283, %sw.bb25 ], [ %n.0283, %sw.bb23 ], [ %n.0283, %sw.bb21 ], [ %n.0283, %sw.bb19 ], [ %n.0283, %sw.bb17 ], [ %n.0283, %sw.bb15 ], [ %n.0283, %sw.bb13 ], [ %n.0283, %sw.bb11 ], [ %n.0283, %sw.bb9 ], [ %n.0283, %sw.bb7 ], [ %n.0283, %sw.bb5 ], [ %n.0283, %sw.bb ] %o.1 = phi i32 [ %o.0284, %for.body ], [ %o.0284, %sw.bb53 ], [ %o.0284, %sw.bb51 ], [ %o.0284, %sw.bb49 ], [ %o.0284, %sw.bb47 ], [ %o.0284, %sw.bb45 ], [ %o.0284, %sw.bb43 ], [ %o.0284, %sw.bb41 ], [ %o.0284, %sw.bb39 ], [ %o.0284, %sw.bb37 ], [ %o.0284, %sw.bb35 ], [ %o.0284, %sw.bb33 ], [ %inc32, %sw.bb31 ], [ %o.0284, %sw.bb29 ], [ %o.0284, %sw.bb27 ], [ %o.0284, %sw.bb25 ], [ %o.0284, %sw.bb23 ], [ %o.0284, %sw.bb21 ], [ %o.0284, %sw.bb19 ], [ %o.0284, %sw.bb17 ], [ %o.0284, %sw.bb15 ], [ %o.0284, %sw.bb13 ], [ %o.0284, %sw.bb11 ], [ %o.0284, %sw.bb9 ], [ %o.0284, %sw.bb7 ], [ %o.0284, %sw.bb5 ], [ %o.0284, %sw.bb ] %p.1 = phi i32 [ %p.0285, %for.body ], [ %p.0285, %sw.bb53 ], [ %p.0285, %sw.bb51 ], [ %p.0285, %sw.bb49 ], [ %p.0285, %sw.bb47 ], [ %p.0285, %sw.bb45 ], [ %p.0285, %sw.bb43 ], [ %p.0285, %sw.bb41 ], [ %p.0285, %sw.bb39 ], [ %p.0285, %sw.bb37 ], [ %p.0285, %sw.bb35 ], [ %inc34, %sw.bb33 ], [ %p.0285, %sw.bb31 ], [ %p.0285, %sw.bb29 ], [ %p.0285, %sw.bb27 ], [ %p.0285, %sw.bb25 ], [ %p.0285, %sw.bb23 ], [ %p.0285, %sw.bb21 ], [ %p.0285, %sw.bb19 ], [ %p.0285, %sw.bb17 ], [ %p.0285, %sw.bb15 ], [ %p.0285, %sw.bb13 ], [ %p.0285, %sw.bb11 ], [ %p.0285, %sw.bb9 ], [ %p.0285, %sw.bb7 ], [ %p.0285, %sw.bb5 ], [ %p.0285, %sw.bb ] %q.1 = phi i32 [ %q.0286, %for.body ], [ %q.0286, %sw.bb53 ], [ %q.0286, %sw.bb51 ], [ %q.0286, %sw.bb49 ], [ %q.0286, %sw.bb47 ], [ %q.0286, %sw.bb45 ], [ %q.0286, %sw.bb43 ], [ %q.0286, %sw.bb41 ], [ %q.0286, %sw.bb39 ], [ %q.0286, %sw.bb37 ], [ %inc36, %sw.bb35 ], [ %q.0286, %sw.bb33 ], [ %q.0286, %sw.bb31 ], [ %q.0286, %sw.bb29 ], [ %q.0286, %sw.bb27 ], [ %q.0286, %sw.bb25 ], [ %q.0286, %sw.bb23 ], [ %q.0286, %sw.bb21 ], [ %q.0286, %sw.bb19 ], [ %q.0286, %sw.bb17 ], [ %q.0286, %sw.bb15 ], [ %q.0286, %sw.bb13 ], [ %q.0286, %sw.bb11 ], [ %q.0286, %sw.bb9 ], [ %q.0286, %sw.bb7 ], [ %q.0286, %sw.bb5 ], [ %q.0286, %sw.bb ] %r.1 = phi i32 [ %r.0287, %for.body ], [ %r.0287, %sw.bb53 ], [ %r.0287, %sw.bb51 ], [ %r.0287, %sw.bb49 ], [ %r.0287, %sw.bb47 ], [ %r.0287, %sw.bb45 ], [ %r.0287, %sw.bb43 ], [ %r.0287, %sw.bb41 ], [ %r.0287, %sw.bb39 ], [ %inc38, %sw.bb37 ], [ %r.0287, %sw.bb35 ], [ %r.0287, %sw.bb33 ], [ %r.0287, %sw.bb31 ], [ %r.0287, %sw.bb29 ], [ %r.0287, %sw.bb27 ], [ %r.0287, %sw.bb25 ], [ %r.0287, %sw.bb23 ], [ %r.0287, %sw.bb21 ], [ %r.0287, %sw.bb19 ], [ %r.0287, %sw.bb17 ], [ %r.0287, %sw.bb15 ], [ %r.0287, %sw.bb13 ], [ %r.0287, %sw.bb11 ], [ %r.0287, %sw.bb9 ], [ %r.0287, %sw.bb7 ], [ %r.0287, %sw.bb5 ], [ %r.0287, %sw.bb ] %s.1 = phi i32 [ %s.0288, %for.body ], [ %s.0288, %sw.bb53 ], [ %s.0288, %sw.bb51 ], [ %s.0288, %sw.bb49 ], [ %s.0288, %sw.bb47 ], [ %s.0288, %sw.bb45 ], [ %s.0288, %sw.bb43 ], [ %s.0288, %sw.bb41 ], [ %inc40, %sw.bb39 ], [ %s.0288, %sw.bb37 ], [ %s.0288, %sw.bb35 ], [ %s.0288, %sw.bb33 ], [ %s.0288, %sw.bb31 ], [ %s.0288, %sw.bb29 ], [ %s.0288, %sw.bb27 ], [ %s.0288, %sw.bb25 ], [ %s.0288, %sw.bb23 ], [ %s.0288, %sw.bb21 ], [ %s.0288, %sw.bb19 ], [ %s.0288, %sw.bb17 ], [ %s.0288, %sw.bb15 ], [ %s.0288, %sw.bb13 ], [ %s.0288, %sw.bb11 ], [ %s.0288, %sw.bb9 ], [ %s.0288, %sw.bb7 ], [ %s.0288, %sw.bb5 ], [ %s.0288, %sw.bb ] %t.1 = phi i32 [ %t.0289, %for.body ], [ %t.0289, %sw.bb53 ], [ %t.0289, %sw.bb51 ], [ %t.0289, %sw.bb49 ], [ %t.0289, %sw.bb47 ], [ %t.0289, %sw.bb45 ], [ %t.0289, %sw.bb43 ], [ %inc42, %sw.bb41 ], [ %t.0289, %sw.bb39 ], [ %t.0289, %sw.bb37 ], [ %t.0289, %sw.bb35 ], [ %t.0289, %sw.bb33 ], [ %t.0289, %sw.bb31 ], [ %t.0289, %sw.bb29 ], [ %t.0289, %sw.bb27 ], [ %t.0289, %sw.bb25 ], [ %t.0289, %sw.bb23 ], [ %t.0289, %sw.bb21 ], [ %t.0289, %sw.bb19 ], [ %t.0289, %sw.bb17 ], [ %t.0289, %sw.bb15 ], [ %t.0289, %sw.bb13 ], [ %t.0289, %sw.bb11 ], [ %t.0289, %sw.bb9 ], [ %t.0289, %sw.bb7 ], [ %t.0289, %sw.bb5 ], [ %t.0289, %sw.bb ] %u.1 = phi i32 [ %u.0290, %for.body ], [ %u.0290, %sw.bb53 ], [ %u.0290, %sw.bb51 ], [ %u.0290, %sw.bb49 ], [ %u.0290, %sw.bb47 ], [ %u.0290, %sw.bb45 ], [ %inc44, %sw.bb43 ], [ %u.0290, %sw.bb41 ], [ %u.0290, %sw.bb39 ], [ %u.0290, %sw.bb37 ], [ %u.0290, %sw.bb35 ], [ %u.0290, %sw.bb33 ], [ %u.0290, %sw.bb31 ], [ %u.0290, %sw.bb29 ], [ %u.0290, %sw.bb27 ], [ %u.0290, %sw.bb25 ], [ %u.0290, %sw.bb23 ], [ %u.0290, %sw.bb21 ], [ %u.0290, %sw.bb19 ], [ %u.0290, %sw.bb17 ], [ %u.0290, %sw.bb15 ], [ %u.0290, %sw.bb13 ], [ %u.0290, %sw.bb11 ], [ %u.0290, %sw.bb9 ], [ %u.0290, %sw.bb7 ], [ %u.0290, %sw.bb5 ], [ %u.0290, %sw.bb ] %v.1 = phi i32 [ %v.0291, %for.body ], [ %v.0291, %sw.bb53 ], [ %v.0291, %sw.bb51 ], [ %v.0291, %sw.bb49 ], [ %v.0291, %sw.bb47 ], [ %inc46, %sw.bb45 ], [ %v.0291, %sw.bb43 ], [ %v.0291, %sw.bb41 ], [ %v.0291, %sw.bb39 ], [ %v.0291, %sw.bb37 ], [ %v.0291, %sw.bb35 ], [ %v.0291, %sw.bb33 ], [ %v.0291, %sw.bb31 ], [ %v.0291, %sw.bb29 ], [ %v.0291, %sw.bb27 ], [ %v.0291, %sw.bb25 ], [ %v.0291, %sw.bb23 ], [ %v.0291, %sw.bb21 ], [ %v.0291, %sw.bb19 ], [ %v.0291, %sw.bb17 ], [ %v.0291, %sw.bb15 ], [ %v.0291, %sw.bb13 ], [ %v.0291, %sw.bb11 ], [ %v.0291, %sw.bb9 ], [ %v.0291, %sw.bb7 ], [ %v.0291, %sw.bb5 ], [ %v.0291, %sw.bb ] %w.1 = phi i32 [ %w.0292, %for.body ], [ %w.0292, %sw.bb53 ], [ %w.0292, %sw.bb51 ], [ %w.0292, %sw.bb49 ], [ %inc48, %sw.bb47 ], [ %w.0292, %sw.bb45 ], [ %w.0292, %sw.bb43 ], [ %w.0292, %sw.bb41 ], [ %w.0292, %sw.bb39 ], [ %w.0292, %sw.bb37 ], [ %w.0292, %sw.bb35 ], [ %w.0292, %sw.bb33 ], [ %w.0292, %sw.bb31 ], [ %w.0292, %sw.bb29 ], [ %w.0292, %sw.bb27 ], [ %w.0292, %sw.bb25 ], [ %w.0292, %sw.bb23 ], [ %w.0292, %sw.bb21 ], [ %w.0292, %sw.bb19 ], [ %w.0292, %sw.bb17 ], [ %w.0292, %sw.bb15 ], [ %w.0292, %sw.bb13 ], [ %w.0292, %sw.bb11 ], [ %w.0292, %sw.bb9 ], [ %w.0292, %sw.bb7 ], [ %w.0292, %sw.bb5 ], [ %w.0292, %sw.bb ] %x.1 = phi i32 [ %x.0293, %for.body ], [ %x.0293, %sw.bb53 ], [ %x.0293, %sw.bb51 ], [ %inc50, %sw.bb49 ], [ %x.0293, %sw.bb47 ], [ %x.0293, %sw.bb45 ], [ %x.0293, %sw.bb43 ], [ %x.0293, %sw.bb41 ], [ %x.0293, %sw.bb39 ], [ %x.0293, %sw.bb37 ], [ %x.0293, %sw.bb35 ], [ %x.0293, %sw.bb33 ], [ %x.0293, %sw.bb31 ], [ %x.0293, %sw.bb29 ], [ %x.0293, %sw.bb27 ], [ %x.0293, %sw.bb25 ], [ %x.0293, %sw.bb23 ], [ %x.0293, %sw.bb21 ], [ %x.0293, %sw.bb19 ], [ %x.0293, %sw.bb17 ], [ %x.0293, %sw.bb15 ], [ %x.0293, %sw.bb13 ], [ %x.0293, %sw.bb11 ], [ %x.0293, %sw.bb9 ], [ %x.0293, %sw.bb7 ], [ %x.0293, %sw.bb5 ], [ %x.0293, %sw.bb ] %y.1 = phi i32 [ %y.0294, %for.body ], [ %y.0294, %sw.bb53 ], [ %inc52, %sw.bb51 ], [ %y.0294, %sw.bb49 ], [ %y.0294, %sw.bb47 ], [ %y.0294, %sw.bb45 ], [ %y.0294, %sw.bb43 ], [ %y.0294, %sw.bb41 ], [ %y.0294, %sw.bb39 ], [ %y.0294, %sw.bb37 ], [ %y.0294, %sw.bb35 ], [ %y.0294, %sw.bb33 ], [ %y.0294, %sw.bb31 ], [ %y.0294, %sw.bb29 ], [ %y.0294, %sw.bb27 ], [ %y.0294, %sw.bb25 ], [ %y.0294, %sw.bb23 ], [ %y.0294, %sw.bb21 ], [ %y.0294, %sw.bb19 ], [ %y.0294, %sw.bb17 ], [ %y.0294, %sw.bb15 ], [ %y.0294, %sw.bb13 ], [ %y.0294, %sw.bb11 ], [ %y.0294, %sw.bb9 ], [ %y.0294, %sw.bb7 ], [ %y.0294, %sw.bb5 ], [ %y.0294, %sw.bb ] %z.1 = phi i32 [ %z.0295, %for.body ], [ %inc54, %sw.bb53 ], [ %z.0295, %sw.bb51 ], [ %z.0295, %sw.bb49 ], [ %z.0295, %sw.bb47 ], [ %z.0295, %sw.bb45 ], [ %z.0295, %sw.bb43 ], [ %z.0295, %sw.bb41 ], [ %z.0295, %sw.bb39 ], [ %z.0295, %sw.bb37 ], [ %z.0295, %sw.bb35 ], [ %z.0295, %sw.bb33 ], [ %z.0295, %sw.bb31 ], [ %z.0295, %sw.bb29 ], [ %z.0295, %sw.bb27 ], [ %z.0295, %sw.bb25 ], [ %z.0295, %sw.bb23 ], [ %z.0295, %sw.bb21 ], [ %z.0295, %sw.bb19 ], [ %z.0295, %sw.bb17 ], [ %z.0295, %sw.bb15 ], [ %z.0295, %sw.bb13 ], [ %z.0295, %sw.bb11 ], [ %z.0295, %sw.bb9 ], [ %z.0295, %sw.bb7 ], [ %z.0295, %sw.bb5 ], [ %z.0295, %sw.bb ] %a.1 = phi i32 [ %a.0297, %for.body ], [ %a.0297, %sw.bb53 ], [ %a.0297, %sw.bb51 ], [ %a.0297, %sw.bb49 ], [ %a.0297, %sw.bb47 ], [ %a.0297, %sw.bb45 ], [ %a.0297, %sw.bb43 ], [ %a.0297, %sw.bb41 ], [ %a.0297, %sw.bb39 ], [ %a.0297, %sw.bb37 ], [ %a.0297, %sw.bb35 ], [ %a.0297, %sw.bb33 ], [ %a.0297, %sw.bb31 ], [ %a.0297, %sw.bb29 ], [ %a.0297, %sw.bb27 ], [ %a.0297, %sw.bb25 ], [ %a.0297, %sw.bb23 ], [ %a.0297, %sw.bb21 ], [ %a.0297, %sw.bb19 ], [ %a.0297, %sw.bb17 ], [ %a.0297, %sw.bb15 ], [ %a.0297, %sw.bb13 ], [ %a.0297, %sw.bb11 ], [ %a.0297, %sw.bb9 ], [ %a.0297, %sw.bb7 ], [ %a.0297, %sw.bb5 ], [ %inc, %sw.bb ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [100 x i8], ptr %input, i64 0, i64 %indvars.iv.next %2 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i8 %2, 0 br i1 %cmp.not, label %for.end.loopexit, label %for.body, !llvm.loop !8 for.end.loopexit: ; preds = %for.inc %3 = and i32 %a.1, 1 %4 = and i32 %b.1, 1 %5 = and i32 %c.1, 1 %6 = and i32 %d.1, 1 %7 = and i32 %e.1, 1 %8 = and i32 %f.1, 1 %9 = and i32 %g.1, 1 %10 = and i32 %h.1, 1 %11 = and i32 %i.1, 1 %12 = and i32 %j.1, 1 %13 = and i32 %k.1, 1 %14 = and i32 %l.1, 1 %15 = and i32 %m.1, 1 %16 = and i32 %n.1, 1 %17 = and i32 %o.1, 1 %18 = and i32 %p.1, 1 %19 = and i32 %q.1, 1 %20 = and i32 %r.1, 1 %21 = and i32 %s.1, 1 %22 = and i32 %t.1, 1 %23 = and i32 %u.1, 1 %24 = and i32 %v.1, 1 %25 = and i32 %w.1, 1 %26 = and i32 %x.1, 1 %27 = and i32 %y.1, 1 %28 = add nuw nsw i32 %5, %4 %29 = add nuw nsw i32 %28, %6 %30 = add nuw nsw i32 %29, %7 %31 = add nuw nsw i32 %30, %8 %32 = add nuw nsw i32 %31, %9 %33 = add nuw nsw i32 %32, %10 %34 = add nuw nsw i32 %33, %11 %35 = add nuw nsw i32 %34, %12 %36 = add nuw nsw i32 %35, %13 %37 = add nuw nsw i32 %36, %14 %38 = add nuw nsw i32 %37, %15 %39 = add nuw nsw i32 %38, %16 %40 = add nuw nsw i32 %39, %17 %41 = add nuw nsw i32 %40, %18 %42 = add nuw nsw i32 %41, %19 %43 = add nuw nsw i32 %42, %20 %44 = add nuw nsw i32 %43, %21 %45 = add nuw nsw i32 %44, %22 %46 = add nuw nsw i32 %45, %23 %47 = add nuw nsw i32 %46, %24 %48 = add nuw nsw i32 %47, %25 %49 = add nuw nsw i32 %48, %26 %50 = add nuw nsw i32 %49, %27 %51 = add nuw nsw i32 %50, %3 %52 = and i32 %z.1, 1 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %z.0.lcssa = phi i32 [ 0, %entry ], [ %52, %for.end.loopexit ] %flg.24 = phi i32 [ 0, %entry ], [ %51, %for.end.loopexit ] %flg.25 = sub nsw i32 0, %z.0.lcssa %cmp209.not = icmp eq i32 %flg.24, %flg.25 %str.str.3 = select i1 %cmp209.not, ptr @str, ptr @str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.str.3) call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %input) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int t; scanf("%i", &t); for (int i = 0; i < t; i++) { int p; scanf("%i", &p); int p1 = p - 1; if (p1 == 4) printf("%i %i\n", 2, 4); else printf("%i %i\n", 2, p1 / 2); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29146/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29146/source.c" 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"%i\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%i %i\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %p = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp7 = icmp sgt i32 %0, 0 br i1 %cmp7, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 ret i32 0 for.body: ; preds = %entry, %for.body %i.08 = phi i32 [ %inc, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %p) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p) %1 = load i32, ptr %p, align 4, !tbaa !5 %sub = add nsw i32 %1, -1 %cmp2 = icmp eq i32 %sub, 4 %div = sdiv i32 %sub, 2 %div.sink = select i1 %cmp2, i32 4, i32 %div %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 2, i32 noundef %div.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %p) #3 %inc = add nuw nsw i32 %i.08, 1 %2 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %2 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> char w[100];int len;int n[33]; int main() { scanf("%s",w); len=strlen(w); int value; for(int i=0;i<len;i++) { value=w[i]-'a'; if(value>=0)n[value]++; } int ans=1; for(int i=0;i<26;i++) { if(n[i]%2==1)ans=0; } if(ans==1)printf("Yes"); else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291553/source.c" 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"%s\00", align 1 @w = dso_local global [100 x i8] zeroinitializer, align 16 @len = dso_local local_unnamed_addr global i32 0, align 4 @n = dso_local local_unnamed_addr global [33 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w) %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @w) #3 %conv = trunc i64 %call1 to i32 store i32 %conv, ptr @len, align 4, !tbaa !5 %cmp35 = icmp sgt i32 %conv, 0 br i1 %cmp35, label %for.body.preheader, label %for.cond10.preheader for.body.preheader: ; preds = %entry %wide.trip.count = and i64 %call1, 4294967295 %xtraiter = and i64 %call1, 1 %0 = icmp eq i64 %wide.trip.count, 1 br i1 %0, label %for.cond10.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter br label %for.body for.cond10.preheader.loopexit.unr-lcssa: ; preds = %for.inc.1, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.inc.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond10.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond10.preheader.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds [100 x i8], ptr @w, i64 0, i64 %indvars.iv.unr %1 = load i8, ptr %arrayidx.epil, align 1, !tbaa !9 %cmp4.epil = icmp sgt i8 %1, 96 br i1 %cmp4.epil, label %if.then.epil, label %for.cond10.preheader if.then.epil: ; preds = %for.body.epil %conv3.epil = zext i8 %1 to i64 %sub.epil = add nuw nsw i64 %conv3.epil, 4294967199 %idxprom6.epil = and i64 %sub.epil, 4294967295 %arrayidx7.epil = getelementptr inbounds [33 x i32], ptr @n, i64 0, i64 %idxprom6.epil %2 = load i32, ptr %arrayidx7.epil, align 4, !tbaa !5 %inc.epil = add nsw i32 %2, 1 store i32 %inc.epil, ptr %arrayidx7.epil, align 4, !tbaa !5 br label %for.cond10.preheader for.cond10.preheader: ; preds = %for.cond10.preheader.loopexit.unr-lcssa, %if.then.epil, %for.body.epil, %entry %3 = load i32, ptr @n, align 16, !tbaa !5 %4 = and i32 %3, -2147483647 %cmp17 = icmp ne i32 %4, 1 %5 = load i32, ptr getelementptr inbounds ([33 x i32], ptr @n, i64 0, i64 1), align 4, !tbaa !5 %.fr60 = freeze i32 %5 %6 = and i32 %.fr60, -2147483647 %cmp17.1 = icmp ne i32 %6, 1 %7 = load <8 x i32>, ptr getelementptr inbounds ([33 x i32], ptr @n, i64 0, i64 2), align 8, !tbaa !5 %.fr59 = freeze <8 x i32> %7 %8 = and <8 x i32> %.fr59, <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647> %9 = icmp eq <8 x i32> %8, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %10 = load <16 x i32>, ptr getelementptr inbounds ([33 x i32], ptr @n, i64 0, i64 10), align 8, !tbaa !5 %.fr58 = freeze <16 x i32> %10 %11 = and <16 x i32> %.fr58, <i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647, i32 -2147483647> %12 = icmp eq <16 x i32> %11, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %13 = bitcast <16 x i1> %12 to i16 %14 = icmp eq i16 %13, 0 %15 = bitcast <8 x i1> %9 to i8 %16 = icmp eq i8 %15, 0 %op.rdx = and i1 %14, %16 %op.rdx56 = and i1 %op.rdx, %cmp17.1 %op.rdx57 = select i1 %op.rdx56, i1 %cmp17, i1 false %.str.1..str.2 = select i1 %op.rdx57, ptr @.str.1, ptr @.str.2 %call28 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) ret i32 0 for.body: ; preds = %for.inc.1, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ] %arrayidx = getelementptr inbounds [100 x i8], ptr @w, i64 0, i64 %indvars.iv %17 = load i8, ptr %arrayidx, align 2, !tbaa !9 %cmp4 = icmp sgt i8 %17, 96 br i1 %cmp4, label %if.then, label %for.inc if.then: ; preds = %for.body %conv3 = zext i8 %17 to i64 %sub = add nuw nsw i64 %conv3, 4294967199 %idxprom6 = and i64 %sub, 4294967295 %arrayidx7 = getelementptr inbounds [33 x i32], ptr @n, i64 0, i64 %idxprom6 %18 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %inc = add nsw i32 %18, 1 store i32 %inc, ptr %arrayidx7, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body, %if.then %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [100 x i8], ptr @w, i64 0, i64 %indvars.iv.next %19 = load i8, ptr %arrayidx.1, align 1, !tbaa !9 %cmp4.1 = icmp sgt i8 %19, 96 br i1 %cmp4.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %conv3.1 = zext i8 %19 to i64 %sub.1 = add nuw nsw i64 %conv3.1, 4294967199 %idxprom6.1 = and i64 %sub.1, 4294967295 %arrayidx7.1 = getelementptr inbounds [33 x i32], ptr @n, i64 0, i64 %idxprom6.1 %20 = load i32, ptr %arrayidx7.1, align 4, !tbaa !5 %inc.1 = add nsw i32 %20, 1 store i32 %inc.1, ptr %arrayidx7.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond10.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !10 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 attributes #0 = { 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 #1 = { 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 #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 #3 = { nounwind willreturn memory(read) } !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"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main(void){ int c[128]={0},i; char s[128]; scanf("%s",s); for(i = 0;i < strlen(s);i++){c[s[i]]++;} for(i = 'a';i <= 'z';i++){if(c[i]%2){printf("No\n");return 0;}} printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291610/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291610/source.c" 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"%s\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca [128 x i32], align 16 %s = alloca [128 x i8], align 16 call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %c) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(512) %c, i8 0, i64 512, i1 false) call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %s) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #7 %cmp26.not = icmp eq i64 %call2, 0 br i1 %cmp26.not, label %for.cond7, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %call2, 3 %0 = icmp ult i64 %call2, 4 br i1 %0, label %for.cond7.preheader.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %call2, -4 br label %for.body for.cond7.preheader.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond7.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond7.preheader.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.cond7.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond7.preheader.unr-lcssa ] %arrayidx.epil = getelementptr inbounds [128 x i8], ptr %s, i64 0, i64 %indvars.iv.epil %1 = load i8, ptr %arrayidx.epil, align 1, !tbaa !5 %idxprom4.epil = sext i8 %1 to i64 %arrayidx5.epil = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 %idxprom4.epil %2 = load i32, ptr %arrayidx5.epil, align 4, !tbaa !8 %inc.epil = add nsw i32 %2, 1 store i32 %inc.epil, ptr %arrayidx5.epil, align 4, !tbaa !8 %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond7.preheader, label %for.body.epil, !llvm.loop !10 for.cond7.preheader: ; preds = %for.body.epil, %for.cond7.preheader.unr-lcssa %arrayidx12.phi.trans.insert = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 97 %.pre = load i32, ptr %arrayidx12.phi.trans.insert, align 4, !tbaa !8 %3 = and i32 %.pre, 1 %4 = icmp eq i32 %3, 0 br i1 %4, label %for.cond7, label %if.then for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.3, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.3, %for.body ] %arrayidx = getelementptr inbounds [128 x i8], ptr %s, i64 0, i64 %indvars.iv %5 = load i8, ptr %arrayidx, align 4, !tbaa !5 %idxprom4 = sext i8 %5 to i64 %arrayidx5 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 %idxprom4 %6 = load i32, ptr %arrayidx5, align 4, !tbaa !8 %inc = add nsw i32 %6, 1 store i32 %inc, ptr %arrayidx5, align 4, !tbaa !8 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [128 x i8], ptr %s, i64 0, i64 %indvars.iv.next %7 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %idxprom4.1 = sext i8 %7 to i64 %arrayidx5.1 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 %idxprom4.1 %8 = load i32, ptr %arrayidx5.1, align 4, !tbaa !8 %inc.1 = add nsw i32 %8, 1 store i32 %inc.1, ptr %arrayidx5.1, align 4, !tbaa !8 %indvars.iv.next.1 = or i64 %indvars.iv, 2 %arrayidx.2 = getelementptr inbounds [128 x i8], ptr %s, i64 0, i64 %indvars.iv.next.1 %9 = load i8, ptr %arrayidx.2, align 2, !tbaa !5 %idxprom4.2 = sext i8 %9 to i64 %arrayidx5.2 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 %idxprom4.2 %10 = load i32, ptr %arrayidx5.2, align 4, !tbaa !8 %inc.2 = add nsw i32 %10, 1 store i32 %inc.2, ptr %arrayidx5.2, align 4, !tbaa !8 %indvars.iv.next.2 = or i64 %indvars.iv, 3 %arrayidx.3 = getelementptr inbounds [128 x i8], ptr %s, i64 0, i64 %indvars.iv.next.2 %11 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %idxprom4.3 = sext i8 %11 to i64 %arrayidx5.3 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 %idxprom4.3 %12 = load i32, ptr %arrayidx5.3, align 4, !tbaa !8 %inc.3 = add nsw i32 %12, 1 store i32 %inc.3, ptr %arrayidx5.3, align 4, !tbaa !8 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond7.preheader.unr-lcssa, label %for.body, !llvm.loop !12 for.cond7: ; preds = %entry, %for.cond7.preheader %arrayidx12.1 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 98 %13 = load i32, ptr %arrayidx12.1, align 8, !tbaa !8 %14 = and i32 %13, 1 %tobool.not.1 = icmp eq i32 %14, 0 br i1 %tobool.not.1, label %for.cond7.1, label %if.then for.cond7.1: ; preds = %for.cond7 %arrayidx12.2 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 99 %15 = load i32, ptr %arrayidx12.2, align 4, !tbaa !8 %16 = and i32 %15, 1 %tobool.not.2 = icmp eq i32 %16, 0 br i1 %tobool.not.2, label %for.cond7.2, label %if.then for.cond7.2: ; preds = %for.cond7.1 %arrayidx12.3 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 100 %17 = load i32, ptr %arrayidx12.3, align 16, !tbaa !8 %18 = and i32 %17, 1 %tobool.not.3 = icmp eq i32 %18, 0 br i1 %tobool.not.3, label %for.cond7.3, label %if.then for.cond7.3: ; preds = %for.cond7.2 %arrayidx12.4 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 101 %19 = load i32, ptr %arrayidx12.4, align 4, !tbaa !8 %20 = and i32 %19, 1 %tobool.not.4 = icmp eq i32 %20, 0 br i1 %tobool.not.4, label %for.cond7.4, label %if.then for.cond7.4: ; preds = %for.cond7.3 %arrayidx12.5 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 102 %21 = load i32, ptr %arrayidx12.5, align 8, !tbaa !8 %22 = and i32 %21, 1 %tobool.not.5 = icmp eq i32 %22, 0 br i1 %tobool.not.5, label %for.cond7.5, label %if.then for.cond7.5: ; preds = %for.cond7.4 %arrayidx12.6 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 103 %23 = load i32, ptr %arrayidx12.6, align 4, !tbaa !8 %24 = and i32 %23, 1 %tobool.not.6 = icmp eq i32 %24, 0 br i1 %tobool.not.6, label %for.cond7.6, label %if.then for.cond7.6: ; preds = %for.cond7.5 %arrayidx12.7 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 104 %25 = load i32, ptr %arrayidx12.7, align 16, !tbaa !8 %26 = and i32 %25, 1 %tobool.not.7 = icmp eq i32 %26, 0 br i1 %tobool.not.7, label %for.cond7.7, label %if.then for.cond7.7: ; preds = %for.cond7.6 %arrayidx12.8 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 105 %27 = load i32, ptr %arrayidx12.8, align 4, !tbaa !8 %28 = and i32 %27, 1 %tobool.not.8 = icmp eq i32 %28, 0 br i1 %tobool.not.8, label %for.cond7.8, label %if.then for.cond7.8: ; preds = %for.cond7.7 %arrayidx12.9 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 106 %29 = load i32, ptr %arrayidx12.9, align 8, !tbaa !8 %30 = and i32 %29, 1 %tobool.not.9 = icmp eq i32 %30, 0 br i1 %tobool.not.9, label %for.cond7.9, label %if.then for.cond7.9: ; preds = %for.cond7.8 %arrayidx12.10 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 107 %31 = load i32, ptr %arrayidx12.10, align 4, !tbaa !8 %32 = and i32 %31, 1 %tobool.not.10 = icmp eq i32 %32, 0 br i1 %tobool.not.10, label %for.cond7.10, label %if.then for.cond7.10: ; preds = %for.cond7.9 %arrayidx12.11 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 108 %33 = load i32, ptr %arrayidx12.11, align 16, !tbaa !8 %34 = and i32 %33, 1 %tobool.not.11 = icmp eq i32 %34, 0 br i1 %tobool.not.11, label %for.cond7.11, label %if.then for.cond7.11: ; preds = %for.cond7.10 %arrayidx12.12 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 109 %35 = load i32, ptr %arrayidx12.12, align 4, !tbaa !8 %36 = and i32 %35, 1 %tobool.not.12 = icmp eq i32 %36, 0 br i1 %tobool.not.12, label %for.cond7.12, label %if.then for.cond7.12: ; preds = %for.cond7.11 %arrayidx12.13 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 110 %37 = load i32, ptr %arrayidx12.13, align 8, !tbaa !8 %38 = and i32 %37, 1 %tobool.not.13 = icmp eq i32 %38, 0 br i1 %tobool.not.13, label %for.cond7.13, label %if.then for.cond7.13: ; preds = %for.cond7.12 %arrayidx12.14 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 111 %39 = load i32, ptr %arrayidx12.14, align 4, !tbaa !8 %40 = and i32 %39, 1 %tobool.not.14 = icmp eq i32 %40, 0 br i1 %tobool.not.14, label %for.cond7.14, label %if.then for.cond7.14: ; preds = %for.cond7.13 %arrayidx12.15 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 112 %41 = load i32, ptr %arrayidx12.15, align 16, !tbaa !8 %42 = and i32 %41, 1 %tobool.not.15 = icmp eq i32 %42, 0 br i1 %tobool.not.15, label %for.cond7.15, label %if.then for.cond7.15: ; preds = %for.cond7.14 %arrayidx12.16 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 113 %43 = load i32, ptr %arrayidx12.16, align 4, !tbaa !8 %44 = and i32 %43, 1 %tobool.not.16 = icmp eq i32 %44, 0 br i1 %tobool.not.16, label %for.cond7.16, label %if.then for.cond7.16: ; preds = %for.cond7.15 %arrayidx12.17 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 114 %45 = load i32, ptr %arrayidx12.17, align 8, !tbaa !8 %46 = and i32 %45, 1 %tobool.not.17 = icmp eq i32 %46, 0 br i1 %tobool.not.17, label %for.cond7.17, label %if.then for.cond7.17: ; preds = %for.cond7.16 %arrayidx12.18 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 115 %47 = load i32, ptr %arrayidx12.18, align 4, !tbaa !8 %48 = and i32 %47, 1 %tobool.not.18 = icmp eq i32 %48, 0 br i1 %tobool.not.18, label %for.cond7.18, label %if.then for.cond7.18: ; preds = %for.cond7.17 %arrayidx12.19 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 116 %49 = load i32, ptr %arrayidx12.19, align 16, !tbaa !8 %50 = and i32 %49, 1 %tobool.not.19 = icmp eq i32 %50, 0 br i1 %tobool.not.19, label %for.cond7.19, label %if.then for.cond7.19: ; preds = %for.cond7.18 %arrayidx12.20 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 117 %51 = load i32, ptr %arrayidx12.20, align 4, !tbaa !8 %52 = and i32 %51, 1 %tobool.not.20 = icmp eq i32 %52, 0 br i1 %tobool.not.20, label %for.cond7.20, label %if.then for.cond7.20: ; preds = %for.cond7.19 %arrayidx12.21 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 118 %53 = load i32, ptr %arrayidx12.21, align 8, !tbaa !8 %54 = and i32 %53, 1 %tobool.not.21 = icmp eq i32 %54, 0 br i1 %tobool.not.21, label %for.cond7.21, label %if.then for.cond7.21: ; preds = %for.cond7.20 %arrayidx12.22 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 119 %55 = load i32, ptr %arrayidx12.22, align 4, !tbaa !8 %56 = and i32 %55, 1 %tobool.not.22 = icmp eq i32 %56, 0 br i1 %tobool.not.22, label %for.cond7.22, label %if.then for.cond7.22: ; preds = %for.cond7.21 %arrayidx12.23 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 120 %57 = load i32, ptr %arrayidx12.23, align 16, !tbaa !8 %58 = and i32 %57, 1 %tobool.not.23 = icmp eq i32 %58, 0 br i1 %tobool.not.23, label %for.cond7.23, label %if.then for.cond7.23: ; preds = %for.cond7.22 %arrayidx12.24 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 121 %59 = load i32, ptr %arrayidx12.24, align 4, !tbaa !8 %60 = and i32 %59, 1 %tobool.not.24 = icmp eq i32 %60, 0 br i1 %tobool.not.24, label %for.cond7.24, label %if.then for.cond7.24: ; preds = %for.cond7.23 %arrayidx12.25 = getelementptr inbounds [128 x i32], ptr %c, i64 0, i64 122 %61 = load i32, ptr %arrayidx12.25, align 8, !tbaa !8 %62 = and i32 %61, 1 %tobool.not.25 = icmp eq i32 %62, 0 br i1 %tobool.not.25, label %cleanup, label %if.then if.then: ; preds = %for.cond7.24, %for.cond7.23, %for.cond7.22, %for.cond7.21, %for.cond7.20, %for.cond7.19, %for.cond7.18, %for.cond7.17, %for.cond7.16, %for.cond7.15, %for.cond7.14, %for.cond7.13, %for.cond7.12, %for.cond7.11, %for.cond7.10, %for.cond7.9, %for.cond7.8, %for.cond7.7, %for.cond7.6, %for.cond7.5, %for.cond7.4, %for.cond7.3, %for.cond7.2, %for.cond7.1, %for.cond7, %for.cond7.preheader br label %cleanup cleanup: ; preds = %for.cond7.24, %if.then %str.sink = phi ptr [ @str.3, %if.then ], [ @str, %for.cond7.24 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %s) #6 call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %c) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { 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 #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { nofree nounwind } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.unroll.disable"} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> typedef long LONG; LONG memo[10][1001][101]; LONG comb(int *use, int n, int s, int m) { int i; LONG c; // printf("<%d %d %d>\n", n, s, m); if (memo[n][s][m] != -1){ return (memo[n][s][m]); } if (n == 1){ if (0 <= s && s <= 100 && s >= m && use[s] == 0){ // printf("["); // for (i = 0; i <= 100; i++){ // if (use[i])printf("%d ", i); // } // printf("%d]", s); memo[n][s][m] = 1; return (1); } memo[n][s][m] = 0; return (0); } c = 0; for (i = m; i <= 100; i++){ if (use[i] == 0){ use[i] = 1; if (s - i >= 0){ c += comb(use, n - 1, s - i, i + 1); } use[i] = 0; } } memo[n][s][m] = c; return (c); } int main(void) { int n, s; int use[101]; int c; int i; while (1){ scanf("%d%d", &n, &s); if (n == 0 && s == 0){ break; } memset(use, 0, sizeof(use)); memset(memo, -1, sizeof(memo)); printf("%ld\n", comb(use, n, s, 0)); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291661/source.c" 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" @memo = dso_local local_unnamed_addr global [10 x [1001 x [101 x i64]]] zeroinitializer, align 16 @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local i64 @comb(ptr nocapture noundef %use, i32 noundef %n, i32 noundef %s, i32 noundef %m) local_unnamed_addr #0 { entry: %idxprom = sext i32 %n to i64 %idxprom1 = sext i32 %s to i64 %idxprom3 = sext i32 %m to i64 %arrayidx4 = getelementptr inbounds [10 x [1001 x [101 x i64]]], ptr @memo, i64 0, i64 %idxprom, i64 %idxprom1, i64 %idxprom3 %0 = load i64, ptr %arrayidx4, align 8, !tbaa !5 %cmp.not = icmp eq i64 %0, -1 br i1 %cmp.not, label %if.end, label %cleanup if.end: ; preds = %entry %cmp11 = icmp eq i32 %n, 1 br i1 %cmp11, label %if.then12, label %for.cond.preheader for.cond.preheader: ; preds = %if.end %cmp3695 = icmp slt i32 %m, 101 br i1 %cmp3695, label %for.body.lr.ph, label %cleanup.sink.split for.body.lr.ph: ; preds = %for.cond.preheader %sub45 = add nsw i32 %n, -1 br label %for.body if.then12: ; preds = %if.end %or.cond = icmp ugt i32 %s, 100 %cmp16.not = icmp slt i32 %s, %m %or.cond94 = or i1 %or.cond, %cmp16.not br i1 %or.cond94, label %if.end28, label %land.lhs.true17 land.lhs.true17: ; preds = %if.then12 %arrayidx19 = getelementptr inbounds i32, ptr %use, i64 %idxprom1 %1 = load i32, ptr %arrayidx19, align 4, !tbaa !9 %cmp20 = icmp eq i32 %1, 0 br i1 %cmp20, label %cleanup.sink.split, label %if.end28 if.end28: ; preds = %land.lhs.true17, %if.then12 br label %cleanup.sink.split for.body: ; preds = %for.body.lr.ph, %for.inc %indvars.iv = phi i64 [ %idxprom3, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc ] %c.098 = phi i64 [ 0, %for.body.lr.ph ], [ %c.2, %for.inc ] %indvars101 = trunc i64 %indvars.iv to i32 %arrayidx38 = getelementptr inbounds i32, ptr %use, i64 %indvars.iv %2 = load i32, ptr %arrayidx38, align 4, !tbaa !9 %cmp39 = icmp eq i32 %2, 0 br i1 %cmp39, label %if.then40, label %for.inc if.then40: ; preds = %for.body store i32 1, ptr %arrayidx38, align 4, !tbaa !9 %3 = sub nsw i64 %idxprom1, %indvars.iv %cmp43 = icmp sgt i64 %3, -1 br i1 %cmp43, label %if.then44, label %if.end48 if.then44: ; preds = %if.then40 %add = add nsw i32 %indvars101, 1 %4 = trunc i64 %3 to i32 %call = tail call i64 @comb(ptr noundef nonnull %use, i32 noundef %sub45, i32 noundef %4, i32 noundef %add) %add47 = add nsw i64 %call, %c.098 br label %if.end48 if.end48: ; preds = %if.then44, %if.then40 %c.1 = phi i64 [ %add47, %if.then44 ], [ %c.098, %if.then40 ] store i32 0, ptr %arrayidx38, align 4, !tbaa !9 br label %for.inc for.inc: ; preds = %for.body, %if.end48 %c.2 = phi i64 [ %c.1, %if.end48 ], [ %c.098, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %5 = and i64 %indvars.iv.next, 4294967295 %exitcond.not = icmp eq i64 %5, 101 br i1 %exitcond.not, label %cleanup.sink.split, label %for.body, !llvm.loop !11 cleanup.sink.split: ; preds = %for.inc, %for.cond.preheader, %land.lhs.true17, %if.end28 %c.0.lcssa.sink = phi i64 [ 0, %if.end28 ], [ 1, %land.lhs.true17 ], [ 0, %for.cond.preheader ], [ %c.2, %for.inc ] store i64 %c.0.lcssa.sink, ptr %arrayidx4, align 8, !tbaa !5 br label %cleanup cleanup: ; preds = %cleanup.sink.split, %entry %retval.0 = phi i64 [ %0, %entry ], [ %c.0.lcssa.sink, %cleanup.sink.split ] ret i64 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %s = alloca i32, align 4 %use = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #5 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %use) #5 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %s) %0 = load i32, ptr %n, align 4, !tbaa !9 %cmp6 = icmp eq i32 %0, 0 %1 = load i32, ptr %s, align 4 %cmp17 = icmp eq i32 %1, 0 %or.cond8 = select i1 %cmp6, i1 %cmp17, i1 false br i1 %or.cond8, label %while.end, label %if.end if.end: ; preds = %entry, %if.end %2 = phi i32 [ %5, %if.end ], [ %1, %entry ] %3 = phi i32 [ %4, %if.end ], [ %0, %entry ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %use, i8 0, i64 404, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(8088080) @memo, i8 -1, i64 8088080, i1 false) %call3 = call i64 @comb(ptr noundef nonnull %use, i32 noundef %3, i32 noundef %2, i32 noundef 0) %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %call3) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %s) %4 = load i32, ptr %n, align 4, !tbaa !9 %cmp = icmp eq i32 %4, 0 %5 = load i32, ptr %s, align 4 %cmp1 = icmp eq i32 %5, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %if.end while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %use) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { 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 #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main() { int a,b,i,j; scanf("%d %d",&a,&b); char s1[101],s2[101]; for(i=0;i<b;i++) { s1[i]=a+48; } s1[b]='\0'; for(j=0;j<a;j++) { s2[j]=b+48; } s2[a]='\0'; int x=strcasecmp(s1,s2); if(x<0) printf("%s\n",s1); else if(x>0) printf("%s\n",s2); else printf("%s\n",s1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291704/source.c" 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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %s1 = alloca [101 x i8], align 16 %s2 = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s1) #6 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s2) #6 %0 = load i32, ptr %b, align 4, !tbaa !5 %cmp40 = icmp sgt i32 %0, 0 %.pre = load i32, ptr %a, align 4, !tbaa !5 br i1 %cmp40, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %1 = trunc i32 %.pre to i8 %conv = add i8 %1, 48 %2 = zext i32 %0 to i64 call void @llvm.memset.p0.i64(ptr nonnull align 16 %s1, i8 %conv, i64 %2, i1 false), !tbaa !9 br label %for.end for.end: ; preds = %for.body.lr.ph, %entry %idxprom1 = sext i32 %0 to i64 %arrayidx2 = getelementptr inbounds [101 x i8], ptr %s1, i64 0, i64 %idxprom1 store i8 0, ptr %arrayidx2, align 1, !tbaa !9 %cmp442 = icmp sgt i32 %.pre, 0 br i1 %cmp442, label %for.body6.lr.ph, label %for.end13 for.body6.lr.ph: ; preds = %for.end %3 = trunc i32 %0 to i8 %conv8 = add i8 %3, 48 %4 = zext i32 %.pre to i64 call void @llvm.memset.p0.i64(ptr nonnull align 16 %s2, i8 %conv8, i64 %4, i1 false), !tbaa !9 br label %for.end13 for.end13: ; preds = %for.body6.lr.ph, %for.end %idxprom14 = sext i32 %.pre to i64 %arrayidx15 = getelementptr inbounds [101 x i8], ptr %s2, i64 0, i64 %idxprom14 store i8 0, ptr %arrayidx15, align 1, !tbaa !9 %call17 = call i32 @strcasecmp(ptr noundef nonnull %s1, ptr noundef nonnull %s2) #7 %5 = icmp slt i32 %call17, 1 %s2.sink = select i1 %5, ptr %s1, ptr %s2 %puts37 = call i32 @puts(ptr nonnull dereferenceable(1) %s2.sink) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s2) #6 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s1) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(read) declare i32 @strcasecmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(read) "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 } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !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"} !9 = !{!7, !7, i64 0}
#include<stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); if(a>=b){ for(int i=0;i<a;i++){ printf("%d",b); } }else{ for(int i=0;i<b;i++){ printf("%d",a); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291748/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %1 br i1 %cmp.not, label %for.cond4.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp115 = icmp sgt i32 %0, 0 br i1 %cmp115, label %for.body, label %if.end for.cond4.preheader: ; preds = %entry %cmp517 = icmp sgt i32 %1, 0 br i1 %cmp517, label %for.body7, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.016 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %b, align 4, !tbaa !5 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) %inc = add nuw nsw i32 %i.016, 1 %3 = load i32, ptr %a, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %3 br i1 %cmp1, label %for.body, label %if.end, !llvm.loop !9 for.body7: ; preds = %for.cond4.preheader, %for.body7 %i3.018 = phi i32 [ %inc10, %for.body7 ], [ 0, %for.cond4.preheader ] %4 = load i32, ptr %a, align 4, !tbaa !5 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc10 = add nuw nsw i32 %i3.018, 1 %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc10, %5 br i1 %cmp5, label %for.body7, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body, %for.body7, %for.cond.preheader, %for.cond4.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int a, b; scanf("%d %d", &a, &b); if(a < b){ for(int i=0;i<b;++i){ printf("%d", a); } } else{ for(int i=0;i<a;++i){ printf("%d", b); } } printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291834/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291834/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %for.cond.preheader, label %for.cond4.preheader for.cond4.preheader: ; preds = %entry %cmp516 = icmp sgt i32 %0, 0 br i1 %cmp516, label %for.body7, label %if.end for.cond.preheader: ; preds = %entry %cmp118 = icmp sgt i32 %1, 0 br i1 %cmp118, label %for.body, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.019 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %a, align 4, !tbaa !5 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) %inc = add nuw nsw i32 %i.019, 1 %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %3 br i1 %cmp1, label %for.body, label %if.end, !llvm.loop !9 for.body7: ; preds = %for.cond4.preheader, %for.body7 %i3.017 = phi i32 [ %inc10, %for.body7 ], [ 0, %for.cond4.preheader ] %4 = load i32, ptr %b, align 4, !tbaa !5 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc10 = add nuw nsw i32 %i3.017, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc10, %5 br i1 %cmp5, label %for.body7, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body7, %for.body, %for.cond4.preheader, %for.cond.preheader %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(){ int a,b; scanf("%d%d", &a, &b); if(a>=b) { for(int i=0; i<a; ++i){ printf("%d", b); } } else { for(int i=0; i<b; ++i){ printf("%d", a); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291892/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %1 br i1 %cmp.not, label %for.cond4.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp115 = icmp sgt i32 %0, 0 br i1 %cmp115, label %for.body, label %if.end for.cond4.preheader: ; preds = %entry %cmp517 = icmp sgt i32 %1, 0 br i1 %cmp517, label %for.body7, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.016 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %b, align 4, !tbaa !5 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) %inc = add nuw nsw i32 %i.016, 1 %3 = load i32, ptr %a, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %3 br i1 %cmp1, label %for.body, label %if.end, !llvm.loop !9 for.body7: ; preds = %for.cond4.preheader, %for.body7 %i3.018 = phi i32 [ %inc10, %for.body7 ], [ 0, %for.cond4.preheader ] %4 = load i32, ptr %a, align 4, !tbaa !5 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc10 = add nuw nsw i32 %i3.018, 1 %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc10, %5 br i1 %cmp5, label %for.body7, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body, %for.body7, %for.cond.preheader, %for.cond4.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int a, b; scanf("%d %d", &a, &b); int min, max; if (a < b) { min = a; max = b; } else { min = b; max = a; } for (int i = 0; i < max; ++i) { printf("%d", min); } printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291935/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %. = call i32 @llvm.smin.i32(i32 %0, i32 %1) %.7 = call i32 @llvm.smax.i32(i32 %0, i32 %1) %cmp18 = icmp sgt i32 %.7, 0 br i1 %cmp18, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #5 ret i32 0 for.body: ; preds = %entry, %for.body %i.09 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.) %inc = add nuw nsw i32 %i.09, 1 %exitcond.not = icmp eq i32 %inc, %.7 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int a, b, ab[9], ba[9], i; scanf("%d", &a); scanf("%d", &b); if (a < b) { for (i = 0; i < b; i++) { printf("%d", a); } } else { for (i = 0; i < a; i++) { printf("%d", b); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291986/source.c" 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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %for.cond.preheader, label %for.cond4.preheader for.cond4.preheader: ; preds = %entry %cmp516 = icmp sgt i32 %0, 0 br i1 %cmp516, label %for.body6, label %if.end for.cond.preheader: ; preds = %entry %cmp218 = icmp sgt i32 %1, 0 br i1 %cmp218, label %for.body, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.019 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %a, align 4, !tbaa !5 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %2) %inc = add nuw nsw i32 %i.019, 1 %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %3 br i1 %cmp2, label %for.body, label %if.end, !llvm.loop !9 for.body6: ; preds = %for.cond4.preheader, %for.body6 %i.117 = phi i32 [ %inc9, %for.body6 ], [ 0, %for.cond4.preheader ] %4 = load i32, ptr %b, align 4, !tbaa !5 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %4) %inc9 = add nuw nsw i32 %i.117, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc9, %5 br i1 %cmp5, label %for.body6, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body6, %for.body, %for.cond4.preheader, %for.cond.preheader %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree nounwind } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int a,b,c,d,m,n; scanf("%d %d",&m,&n); a=m; b=n; c=0; d=0; while(a!=0) { a--; c=10*c+n; } while(b!=0) { b--; d=10*d+m; } if(c>=d) printf("%d",c); else printf("%d",d); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292028/source.c" 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 [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m, ptr noundef nonnull %n) %0 = load i32, ptr %m, align 4, !tbaa !5 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not17 = icmp eq i32 %0, 0 br i1 %cmp.not17, label %while.cond1.preheader, label %while.body.preheader while.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 7 %2 = icmp ult i32 %0, 8 br i1 %2, label %while.cond1.preheader.loopexit.unr-lcssa, label %while.body.preheader.new while.body.preheader.new: ; preds = %while.body.preheader %unroll_iter = and i32 %0, -8 br label %while.body while.cond1.preheader.loopexit.unr-lcssa: ; preds = %while.body, %while.body.preheader %add.lcssa.ph = phi i32 [ undef, %while.body.preheader ], [ %add.7, %while.body ] %c.019.unr = phi i32 [ 0, %while.body.preheader ], [ %add.7, %while.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.cond1.preheader, label %while.body.epil while.body.epil: ; preds = %while.cond1.preheader.loopexit.unr-lcssa, %while.body.epil %c.019.epil = phi i32 [ %add.epil, %while.body.epil ], [ %c.019.unr, %while.cond1.preheader.loopexit.unr-lcssa ] %epil.iter = phi i32 [ %epil.iter.next, %while.body.epil ], [ 0, %while.cond1.preheader.loopexit.unr-lcssa ] %mul.epil = mul nsw i32 %c.019.epil, 10 %add.epil = add nsw i32 %mul.epil, %1 %epil.iter.next = add i32 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %while.cond1.preheader, label %while.body.epil, !llvm.loop !9 while.cond1.preheader: ; preds = %while.cond1.preheader.loopexit.unr-lcssa, %while.body.epil, %entry %c.0.lcssa = phi i32 [ 0, %entry ], [ %add.lcssa.ph, %while.cond1.preheader.loopexit.unr-lcssa ], [ %add.epil, %while.body.epil ] %cmp2.not20 = icmp eq i32 %1, 0 br i1 %cmp2.not20, label %while.end7, label %while.body3.preheader while.body3.preheader: ; preds = %while.cond1.preheader %xtraiter25 = and i32 %1, 7 %3 = icmp ult i32 %1, 8 br i1 %3, label %while.end7.loopexit.unr-lcssa, label %while.body3.preheader.new while.body3.preheader.new: ; preds = %while.body3.preheader %unroll_iter29 = and i32 %1, -8 br label %while.body3 while.body: ; preds = %while.body, %while.body.preheader.new %c.019 = phi i32 [ 0, %while.body.preheader.new ], [ %add.7, %while.body ] %niter = phi i32 [ 0, %while.body.preheader.new ], [ %niter.next.7, %while.body ] %mul = mul nsw i32 %c.019, 10 %add = add nsw i32 %mul, %1 %mul.1 = mul nsw i32 %add, 10 %add.1 = add nsw i32 %mul.1, %1 %mul.2 = mul nsw i32 %add.1, 10 %add.2 = add nsw i32 %mul.2, %1 %mul.3 = mul nsw i32 %add.2, 10 %add.3 = add nsw i32 %mul.3, %1 %mul.4 = mul nsw i32 %add.3, 10 %add.4 = add nsw i32 %mul.4, %1 %mul.5 = mul nsw i32 %add.4, 10 %add.5 = add nsw i32 %mul.5, %1 %mul.6 = mul nsw i32 %add.5, 10 %add.6 = add nsw i32 %mul.6, %1 %mul.7 = mul nsw i32 %add.6, 10 %add.7 = add nsw i32 %mul.7, %1 %niter.next.7 = add i32 %niter, 8 %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %while.cond1.preheader.loopexit.unr-lcssa, label %while.body, !llvm.loop !11 while.body3: ; preds = %while.body3, %while.body3.preheader.new %d.022 = phi i32 [ 0, %while.body3.preheader.new ], [ %add6.7, %while.body3 ] %niter30 = phi i32 [ 0, %while.body3.preheader.new ], [ %niter30.next.7, %while.body3 ] %mul5 = mul nsw i32 %d.022, 10 %add6 = add nsw i32 %mul5, %0 %mul5.1 = mul nsw i32 %add6, 10 %add6.1 = add nsw i32 %mul5.1, %0 %mul5.2 = mul nsw i32 %add6.1, 10 %add6.2 = add nsw i32 %mul5.2, %0 %mul5.3 = mul nsw i32 %add6.2, 10 %add6.3 = add nsw i32 %mul5.3, %0 %mul5.4 = mul nsw i32 %add6.3, 10 %add6.4 = add nsw i32 %mul5.4, %0 %mul5.5 = mul nsw i32 %add6.4, 10 %add6.5 = add nsw i32 %mul5.5, %0 %mul5.6 = mul nsw i32 %add6.5, 10 %add6.6 = add nsw i32 %mul5.6, %0 %mul5.7 = mul nsw i32 %add6.6, 10 %add6.7 = add nsw i32 %mul5.7, %0 %niter30.next.7 = add i32 %niter30, 8 %niter30.ncmp.7 = icmp eq i32 %niter30.next.7, %unroll_iter29 br i1 %niter30.ncmp.7, label %while.end7.loopexit.unr-lcssa, label %while.body3, !llvm.loop !13 while.end7.loopexit.unr-lcssa: ; preds = %while.body3, %while.body3.preheader %add6.lcssa.ph = phi i32 [ undef, %while.body3.preheader ], [ %add6.7, %while.body3 ] %d.022.unr = phi i32 [ 0, %while.body3.preheader ], [ %add6.7, %while.body3 ] %lcmp.mod27.not = icmp eq i32 %xtraiter25, 0 br i1 %lcmp.mod27.not, label %while.end7, label %while.body3.epil while.body3.epil: ; preds = %while.end7.loopexit.unr-lcssa, %while.body3.epil %d.022.epil = phi i32 [ %add6.epil, %while.body3.epil ], [ %d.022.unr, %while.end7.loopexit.unr-lcssa ] %epil.iter26 = phi i32 [ %epil.iter26.next, %while.body3.epil ], [ 0, %while.end7.loopexit.unr-lcssa ] %mul5.epil = mul nsw i32 %d.022.epil, 10 %add6.epil = add nsw i32 %mul5.epil, %0 %epil.iter26.next = add i32 %epil.iter26, 1 %epil.iter26.cmp.not = icmp eq i32 %epil.iter26.next, %xtraiter25 br i1 %epil.iter26.cmp.not, label %while.end7, label %while.body3.epil, !llvm.loop !14 while.end7: ; preds = %while.end7.loopexit.unr-lcssa, %while.body3.epil, %while.cond1.preheader %d.0.lcssa = phi i32 [ 0, %while.cond1.preheader ], [ %add6.lcssa.ph, %while.end7.loopexit.unr-lcssa ], [ %add6.epil, %while.body3.epil ] %d.0.lcssa.c.0.lcssa = call i32 @llvm.smax.i32(i32 %c.0.lcssa, i32 %d.0.lcssa) %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %d.0.lcssa.c.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.unroll.disable"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !10}
#include<stdio.h> int main() { int a,b; scanf("%d%d",&a,&b); if(a>=b) for(int i=0;i<a;i++) printf("%d",b); if(a<b) for(int i=0;i<b;i++) printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292071/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292071/source.c" 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 [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4 %1 = load i32, ptr %b, align 4 %cmp.not = icmp sge i32 %0, %1 %cmp117 = icmp sgt i32 %0, 0 %or.cond = and i1 %cmp.not, %cmp117 br i1 %or.cond, label %for.body, label %if.end for.body: ; preds = %entry, %for.body %i.018 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %2 = load i32, ptr %b, align 4, !tbaa !5 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) %inc = add nuw nsw i32 %i.018, 1 %3 = load i32, ptr %a, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %3 br i1 %cmp1, label %for.body, label %if.end.loopexit, !llvm.loop !9 if.end.loopexit: ; preds = %for.body %.pre = load i32, ptr %b, align 4 br label %if.end if.end: ; preds = %if.end.loopexit, %entry %4 = phi i32 [ %.pre, %if.end.loopexit ], [ %1, %entry ] %5 = phi i32 [ %3, %if.end.loopexit ], [ %0, %entry ] %cmp3 = icmp slt i32 %5, %4 %cmp719 = icmp sgt i32 %4, 0 %or.cond21 = and i1 %cmp3, %cmp719 br i1 %or.cond21, label %for.body9, label %if.end14 for.body9: ; preds = %if.end, %for.body9 %i5.020 = phi i32 [ %inc12, %for.body9 ], [ 0, %if.end ] %6 = load i32, ptr %a, align 4, !tbaa !5 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6) %inc12 = add nuw nsw i32 %i5.020, 1 %7 = load i32, ptr %b, align 4, !tbaa !5 %cmp7 = icmp slt i32 %inc12, %7 br i1 %cmp7, label %for.body9, label %if.end14, !llvm.loop !11 if.end14: ; preds = %for.body9, %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#define _CRT_SECURE_NO_WARNINGS #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <inttypes.h> #include <limits.h> #include <ctype.h> #include <stdint.h> #include <string.h> #include <wchar.h> #include <math.h> #define N_MAX (100) #define P_MAX (100) #define DP_ARRAY_SIZE (N_MAX * P_MAX / 32 + 1) #define MIN(a, b) ((a) < (b) ? (a) : (b)) #define MAX(a, b) ((a) > (b) ? (a) : (b)) #define ABS(a) ((a) < 0 ? -(a) : (a)) #define ABSS(a, b) ((a) > (b) ? (a) - (b) : (b) - (a)) #define SWAP(type, a, b) { const type tmp = a; a = b; b = tmp; } int compare_sz_asc(const void* a, const void* b) { return *((size_t*)a) < *((size_t*)b) ? -1 : 1; } int compare_sz_desc(const void* a, const void* b) { return *((size_t*)a) > * ((size_t*)b) ? -1 : 1; } int compare_i64_asc(const void* a, const void* b) { return *((int64_t*)a) < *((int64_t*)b) ? -1 : 1; } int compare_i64_desc(const void* a, const void* b) { return *((int64_t*)a) > * ((int64_t*)b) ? -1 : 1; } int compare_u64_asc(const void* a, const void* b) { return *((uint64_t*)a) < *((uint64_t*)b) ? -1 : 1; } int compare_u64_desc(const void* a, const void* b) { return *((uint64_t*)a) > * ((uint64_t*)b) ? -1 : 1; } int compare_c_asc(const void* a, const void* b) { return *((char*)a) < *((char*)b) ? -1 : 1; } int compare_c_desc(const void* a, const void* b) { return *((char*)a) > * ((char*)b) ? -1 : 1; } int compare_dp_asc(const void* a, const void* b) { return *((double*)a) < *((double*)b) ? -1 : 1; } static uint64_t modinvU64(const uint64_t a, const uint64_t m) { int64_t aa = (int64_t)a; const int64_t mm = (int64_t)m; int64_t b = mm; int64_t u = 1; int64_t v = 0; while (b != 0) { const int64_t t = aa / b; aa -= t * b; SWAP(uint64_t, aa, b); u -= t * v; SWAP(uint64_t, u, v); } u %= mm; if (u < 0) { u += m; } return (uint64_t)u; } static size_t powSz(const size_t base, const size_t exp) { if (exp == 0) { return 1; } if (exp == 1) { return base; } if (exp % 2 == 0) { return powSz(base * base, exp / 2); } else { return base * powSz(base, exp - 1); } } static uint64_t powU64(const uint64_t base, const uint64_t exp) { if (exp == 0) { return 1; } if (exp == 1) { return base; } if (exp % 2 == 0) { return powU64(base * base, exp / 2); } else { return base * powU64(base, exp - 1); } } static uint64_t powU64WMod(const uint64_t base, const uint64_t exp, const uint64_t m) { if (exp == 0) { return 1; } if (exp == 1) { return base % m; } if (exp % 2 == 0) { return powU64WMod(base * base % m, exp / 2, m); } else { return base * powU64WMod(base, exp - 1, m) % m; } } static size_t combSz(const size_t n, const size_t r) { size_t result = 1; for (size_t i = 0; i < r; i++) { result *= n - i; result /= i + 1; } return result; } static uint64_t combU64(const uint64_t n, const uint64_t r) { uint64_t result = 1; for (uint64_t i = 0; i < r; i++) { result *= n - i; result /= i + 1; } return result; } static uint64_t combU64WMod(const uint64_t n, const uint64_t r, const uint64_t m) { uint64_t result = 1; uint64_t inv = 1; for (uint64_t i = 0; i < r; i++) { result = result * (n - i) % m; inv = inv * (i + 1) % m; } return result * modinvU64(inv, m) % m; } static uint64_t permU64(const uint64_t n) { uint64_t result = 1; for (uint64_t v = 2; v <= n; v++) { result *= v; } return result; } static uint64_t permU64WMod(const uint64_t n, const uint64_t m) { uint64_t result = 1; for (uint64_t v = 2; v <= n; v++) { result *= v; result %= m; } return result; } static size_t gcdZu(size_t m, size_t n) { size_t temp; while (m % n != 0) { temp = n; n = m % n; m = temp; } return n; } static uint64_t gcdU64(uint64_t m, uint64_t n) { uint64_t temp; while (m % n != 0) { temp = n; n = m % n; m = temp; } return n; } static uint64_t popcntU64(uint64_t val) { uint64_t cnt = 0; while (val != 0) { if ((val & UINT64_C(0x1)) != 0) { cnt++; } val >>= UINT64_C(0x1); } return cnt; } typedef struct { uint64_t val; }BHeap_Val; #define BHEAP_VAL_TYPE BHeap_Val #define BHEAP_INVALID_NODE ((size_t)100000000) typedef struct { BHEAP_VAL_TYPE val; } BHeap_Node; struct _BHeap_Ctx { size_t size; int (*compare)(const BHEAP_VAL_TYPE* parent, const BHEAP_VAL_TYPE* node); void(*notifyNodeChange)(const struct _BHeap_Ctx* const ctx, const size_t nodeListSize, const size_t* const nodeList); BHeap_Node* node; }; typedef struct _BHeap_Ctx BHeap_Ctx; static void bHeap_Init(BHeap_Ctx* const ctx, int(*compare)(const BHEAP_VAL_TYPE* parent, const BHEAP_VAL_TYPE* node), void(*notifyNodeChange)(const BHeap_Ctx* const ctx, const size_t nodeListSize, const size_t* const nodeList), BHeap_Node* const nodes) { ctx->size = 0; ctx->compare = compare; ctx->notifyNodeChange = notifyNodeChange; ctx->node = nodes; } static void bHeap_Swap(BHeap_Ctx* const ctx, const size_t node0, const size_t node1) { const BHEAP_VAL_TYPE tmp = ctx->node[node0].val; ctx->node[node0].val = ctx->node[node1].val; ctx->node[node1].val = tmp; if (ctx->notifyNodeChange != NULL) { const size_t nodeList[2] = { node0,node1 }; ctx->notifyNodeChange(ctx, 2, nodeList); } } static void bHeap_UpHeap(BHeap_Ctx* const ctx, const size_t nodeIdx) { if (nodeIdx == 0) { return; } const size_t parentIdx = (nodeIdx + 1) / 2 - 1; const int compareResult = ctx->compare(&(ctx->node[parentIdx].val), &(ctx->node[nodeIdx].val)); if (0 < compareResult) { bHeap_Swap(ctx, nodeIdx, parentIdx); if (parentIdx != 0) { bHeap_UpHeap(ctx, parentIdx); } } } static void bHeap_DownHeap(BHeap_Ctx* const ctx, const size_t nodeIdx) { if (ctx->size - 1 <= nodeIdx) { return; } const size_t leftIdx = 2 * (nodeIdx + 1) - 1; if (leftIdx < ctx->size) { const int leftResult = ctx->compare(&(ctx->node[nodeIdx].val), &(ctx->node[leftIdx].val)); size_t swapTarget = leftResult < 0 ? BHEAP_INVALID_NODE : leftIdx; const size_t rightIdx = leftIdx + 1; if (rightIdx < ctx->size) { const int rightResult = ctx->compare(&(ctx->node[nodeIdx].val), &(ctx->node[rightIdx].val)); if (swapTarget == BHEAP_INVALID_NODE) { if (0 < rightResult) { swapTarget = rightIdx; } } else { if (0 < rightResult) { const int rightLeftResult = ctx->compare(&(ctx->node[leftIdx].val), &(ctx->node[rightIdx].val)); if (0 < rightLeftResult) { swapTarget = rightIdx; } } } } if (swapTarget != BHEAP_INVALID_NODE) { bHeap_Swap(ctx, nodeIdx, swapTarget); bHeap_DownHeap(ctx, swapTarget); } } } static void bHeap_Add(BHeap_Ctx* const ctx, const BHEAP_VAL_TYPE val) { ctx->node[ctx->size].val = val; ctx->size++; if (ctx->notifyNodeChange != NULL) { const size_t node = ctx->size - 1; ctx->notifyNodeChange(ctx, 1, &node); } bHeap_UpHeap(ctx, ctx->size - 1); } static void bHeap_RemoveTop(BHeap_Ctx* const ctx) { if (ctx->size == 0) { return; } if (ctx->size == 1) { ctx->size--; return; } ctx->node[0].val = ctx->node[ctx->size - 1].val; if (ctx->notifyNodeChange != NULL) { const size_t node = 0; ctx->notifyNodeChange(ctx, 1, &node); } ctx->size--; bHeap_DownHeap(ctx, 0); } static void bHeap_RemoveNode(BHeap_Ctx* const ctx, const size_t node) { if (node == ctx->size - 1) { ctx->size--; } else { ctx->node[node].val = ctx->node[ctx->size - 1].val; ctx->size--; if (ctx->notifyNodeChange != NULL) { ctx->notifyNodeChange(ctx, 1, &node); } bHeap_DownHeap(ctx, node); bHeap_UpHeap(ctx, node); } } static BHEAP_VAL_TYPE* bHeap_GetTopVal(const BHeap_Ctx* const ctx) { return ctx->size == 0 ? NULL : &(ctx->node[0].val); } typedef struct { uint64_t cnt; size_t* child; size_t numChild; size_t maxNumChild; } Tree_Node; #define TREE_INIT_ALLOC (128) static Tree_Node tree_Node[200000]; static void tree_Init(const uint64_t N) { for (uint64_t i = 0; i < N; i++) { tree_Node[i].cnt = 0; tree_Node[i].numChild = 0; tree_Node[i].child = malloc(sizeof(size_t) * TREE_INIT_ALLOC); tree_Node[i].maxNumChild = TREE_INIT_ALLOC; } } static void tree_AddChild(const size_t parent, const size_t child) { if (tree_Node[parent].maxNumChild <= tree_Node[parent].numChild) { tree_Node[parent].child = realloc(tree_Node[parent].child, sizeof(size_t) * tree_Node[parent].maxNumChild * 2); tree_Node[parent].maxNumChild *= 2; } tree_Node[parent].child[tree_Node[parent].numChild] = child; tree_Node[parent].numChild++; } static BHeap_Node BN_Asc[200000]; static BHeap_Node BN_Desc[200000]; static int _bHeap_Compare_Asc(const BHEAP_VAL_TYPE* parent, const BHEAP_VAL_TYPE* node) { return parent->val <= node->val ? -1 : 1; } static int _bHeap_Compare_Desc(const BHEAP_VAL_TYPE* parent, const BHEAP_VAL_TYPE* node) { return parent->val >= node->val ? -1 : 1; } static size_t PBHeap_Asc_Idx[200000]; static size_t PBHeap_Desc_Idx[200000]; static void _bHeap_NotifyNodeChange_Asc(const BHeap_Ctx* const ctx, const size_t nodeListSize, const size_t* const nodeList) { for (size_t i = 0; i < nodeListSize; i++) { PBHeap_Asc_Idx[ctx->node[nodeList[i]].val.val] = nodeList[i]; } } static void _bHeap_NotifyNodeChange_Desc(const BHeap_Ctx* const ctx, const size_t nodeListSize, const size_t* const nodeList) { for (size_t i = 0; i < nodeListSize; i++) { PBHeap_Desc_Idx[ctx->node[nodeList[i]].val.val] = nodeList[i]; } } #define UF_ROOT ((size_t)10000000) typedef struct { size_t parent; uint64_t w; uint64_t v; uint64_t wSum; uint64_t vSum; } UF_Node; static UF_Node uf_Node[101]; static size_t uf_GetRoot(const size_t idx) { if (uf_Node[idx].parent == UF_ROOT) { return idx; } const size_t root = uf_GetRoot(uf_Node[idx].parent); uf_Node[idx].parent = root; return root; } static void uf_Merge(const size_t a, const size_t b) { const size_t aRoot = uf_GetRoot(a); const size_t bRoot = uf_GetRoot(b); if (aRoot != bRoot) { uf_Node[aRoot].parent = bRoot; uf_Node[bRoot].wSum += uf_Node[aRoot].wSum; uf_Node[bRoot].vSum += uf_Node[aRoot].vSum; } } #define MOD_VAL (UINT64_C(1000000007)) int main(void) { uint64_t a, b; scanf("%"PRIu64"%"PRIu64, &a, &b); const uint64_t m = MIN(a, b); const uint64_t c = MAX(a, b); for (uint64_t i = 0; i < c; i++) { printf("%"PRIu64, m); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292114/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292114/source.c" 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 [7 x i8] c"%lu%lu\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%lu\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_sz_asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp ult i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_sz_desc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp ugt i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_i64_asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_i64_desc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp sgt i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_u64_asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp ult i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_u64_desc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp ugt i64 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_c_asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i8, ptr %a, align 1, !tbaa !9 %1 = load i8, ptr %b, align 1, !tbaa !9 %cmp = icmp slt i8 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_c_desc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i8, ptr %a, align 1, !tbaa !9 %1 = load i8, ptr %b, align 1, !tbaa !9 %cmp = icmp sgt i8 %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_dp_asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load double, ptr %a, align 8, !tbaa !10 %1 = load double, ptr %b, align 8, !tbaa !10 %cmp = fcmp olt double %0, %1 %cond = select i1 %cmp, i32 -1, i32 1 ret i32 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i64, ptr %a, align 8 %1 = load i64, ptr %b, align 8 %cond = call i64 @llvm.umin.i64(i64 %0, i64 %1) %cond5 = call i64 @llvm.umax.i64(i64 %0, i64 %1) %cmp69.not = icmp eq i64 %cond5, 0 br i1 %cmp69.not, label %for.cond.cleanup, label %for.body for.cond.cleanup: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #5 ret i32 0 for.body: ; preds = %entry, %for.body %i.010 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %cond) %inc = add nuw i64 %i.010, 1 %exitcond.not = icmp eq i64 %inc, %cond5 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umax.i64(i64, i64) #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 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"double", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int a,b,t; scanf("%d %d %d",&a,&b,&t); printf("%d",t/a*b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292158/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292158/source.c" 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 [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %2 = load i32, ptr %b, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"}
#include<stdio.h> int main() { int a,b,c,d,n,i; scanf("%d%d%d",&a,&b,&c); d=c/a*b; printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292200/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292200/source.c" 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 [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %c, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %2 = load i32, ptr %b, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nounwind } !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"}