Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <math.h> #include <string.h> int gcd(int a,int b){ if(a<b){ int now=a; a=b; b=a; } int r=a%b; while(r!=0){ a=b; b=r; r=a%b; } return b; } /* 値を入れ替える関数 */ void swap (int *x, int *y) { int temp; // 値を一時保存する変数 temp = *x; *x = *y; *y = temp; } /*** * pivotを決め、 * 全データをpivotを境目に振り分け、 * pivotの添え字を返す ***/ int partition (int array[], int left, int right) { int i, j, pivot; i = left; j = right + 1; pivot = left; // 先頭要素をpivotとする do { do { i++; } while (array[i] < array[pivot]); do { j--; } while (array[pivot] < array[j]); // pivotより小さいものを左へ、大きいものを右へ if (i < j) { swap(&array[i], &array[j]); } } while (i < j); swap(&array[pivot], &array[j]); //pivotを更新 return j; } /* クイックソート */ void quick_sort (int array[], int left, int right) { int pivot; if (left < right) { pivot = partition(array, left, right); quick_sort(array, left, pivot-1); // pivotを境に再帰的にクイックソート quick_sort(array, pivot+1, right); } } int main(void){ char c; scanf("%c",&c); int d=c-'A'; if(d<=26){ printf("A\n"); } else{ printf("a\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289941/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289941/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 nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %spec.select = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %rem = srem i32 %spec.select, %b %cmp1.not13 = icmp eq i32 %rem, 0 br i1 %cmp1.not13, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.015 = phi i32 [ %rem2, %while.body ], [ %rem, %entry ] %b.addr.114 = phi i32 [ %r.015, %while.body ], [ %b, %entry ] %rem2 = srem i32 %b.addr.114, %r.015 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %b.addr.1.lcssa = phi i32 [ %b, %entry ], [ %r.015, %while.body ] ret i32 %b.addr.1.lcssa } ; 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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #2 { entry: %0 = load i32, ptr %x, align 4, !tbaa !7 %1 = load i32, ptr %y, align 4, !tbaa !7 store i32 %1, ptr %x, align 4, !tbaa !7 store i32 %0, ptr %y, align 4, !tbaa !7 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @partition(ptr nocapture noundef %array, i32 noundef %left, i32 noundef %right) local_unnamed_addr #3 { entry: %add = add nsw i32 %right, 1 %idxprom2 = sext i32 %left to i64 %arrayidx3 = getelementptr inbounds i32, ptr %array, i64 %idxprom2 br label %do.body do.body: ; preds = %if.then, %entry %j.0 = phi i32 [ %add, %entry ], [ %6, %if.then ] %i.0 = phi i32 [ %left, %entry ], [ %3, %if.then ] %0 = load i32, ptr %arrayidx3, align 4, !tbaa !7 %1 = sext i32 %i.0 to i64 br label %do.body1 do.body1: ; preds = %do.body1, %do.body %indvars.iv = phi i64 [ %indvars.iv.next, %do.body1 ], [ %1, %do.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %2 = load i32, ptr %arrayidx, align 4, !tbaa !7 %cmp = icmp slt i32 %2, %0 br i1 %cmp, label %do.body1, label %do.body4.preheader, !llvm.loop !11 do.body4.preheader: ; preds = %do.body1 %arrayidx.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %3 = trunc i64 %indvars.iv.next to i32 %4 = sext i32 %j.0 to i64 br label %do.body4 do.body4: ; preds = %do.body4.preheader, %do.body4 %indvars.iv49 = phi i64 [ %4, %do.body4.preheader ], [ %indvars.iv.next50, %do.body4 ] %indvars.iv.next50 = add i64 %indvars.iv49, -1 %arrayidx9 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50 %5 = load i32, ptr %arrayidx9, align 4, !tbaa !7 %cmp10 = icmp slt i32 %0, %5 br i1 %cmp10, label %do.body4, label %do.end11, !llvm.loop !12 do.end11: ; preds = %do.body4 %arrayidx9.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50 %6 = trunc i64 %indvars.iv.next50 to i32 %cmp12 = icmp slt i32 %3, %6 br i1 %cmp12, label %if.then, label %do.end19 if.then: ; preds = %do.end11 store i32 %5, ptr %arrayidx.le, align 4, !tbaa !7 store i32 %2, ptr %arrayidx9.le, align 4, !tbaa !7 br label %do.body, !llvm.loop !13 do.end19: ; preds = %do.end11 store i32 %5, ptr %arrayidx3, align 4, !tbaa !7 store i32 %0, ptr %arrayidx9.le, align 4, !tbaa !7 ret i32 %6 } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quick_sort(ptr nocapture noundef %array, i32 noundef %left, i32 noundef %right) local_unnamed_addr #4 { entry: %cmp13 = icmp slt i32 %left, %right br i1 %cmp13, label %if.then.lr.ph, label %if.end if.then.lr.ph: ; preds = %entry %add.i = add nsw i32 %right, 1 br label %if.then if.then: ; preds = %if.then.lr.ph, %partition.exit %left.tr14 = phi i32 [ %left, %if.then.lr.ph ], [ %add, %partition.exit ] %idxprom2.i = sext i32 %left.tr14 to i64 %arrayidx3.i = getelementptr inbounds i32, ptr %array, i64 %idxprom2.i br label %do.body.i do.body.i: ; preds = %if.then.i, %if.then %j.0.i = phi i32 [ %add.i, %if.then ], [ %6, %if.then.i ] %i.0.i = phi i32 [ %left.tr14, %if.then ], [ %5, %if.then.i ] %0 = load i32, ptr %arrayidx3.i, align 4, !tbaa !7 %1 = sext i32 %i.0.i to i64 br label %do.body1.i do.body1.i: ; preds = %do.body1.i, %do.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %do.body1.i ], [ %1, %do.body.i ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %2 = load i32, ptr %arrayidx.i, align 4, !tbaa !7 %cmp.i = icmp slt i32 %2, %0 br i1 %cmp.i, label %do.body1.i, label %do.body4.preheader.i, !llvm.loop !11 do.body4.preheader.i: ; preds = %do.body1.i %arrayidx.i.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %3 = sext i32 %j.0.i to i64 br label %do.body4.i do.body4.i: ; preds = %do.body4.i, %do.body4.preheader.i %indvars.iv49.i = phi i64 [ %3, %do.body4.preheader.i ], [ %indvars.iv.next50.i, %do.body4.i ] %indvars.iv.next50.i = add i64 %indvars.iv49.i, -1 %arrayidx9.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50.i %4 = load i32, ptr %arrayidx9.i, align 4, !tbaa !7 %cmp10.i = icmp slt i32 %0, %4 br i1 %cmp10.i, label %do.body4.i, label %do.end11.i, !llvm.loop !12 do.end11.i: ; preds = %do.body4.i %arrayidx9.i.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50.i %5 = trunc i64 %indvars.iv.next.i to i32 %6 = trunc i64 %indvars.iv.next50.i to i32 %cmp12.i = icmp slt i32 %5, %6 br i1 %cmp12.i, label %if.then.i, label %partition.exit if.then.i: ; preds = %do.end11.i store i32 %4, ptr %arrayidx.i.le, align 4, !tbaa !7 store i32 %2, ptr %arrayidx9.i.le, align 4, !tbaa !7 br label %do.body.i, !llvm.loop !13 partition.exit: ; preds = %do.end11.i store i32 %4, ptr %arrayidx3.i, align 4, !tbaa !7 store i32 %0, ptr %arrayidx9.i.le, align 4, !tbaa !7 %sub = add nsw i32 %6, -1 tail call void @quick_sort(ptr noundef nonnull %array, i32 noundef %left.tr14, i32 noundef %sub) %add = add nsw i32 %6, 1 %cmp = icmp slt i32 %add, %right br i1 %cmp, label %if.then, label %if.end if.end: ; preds = %partition.exit, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i8, ptr %c, align 1, !tbaa !14 %cmp = icmp slt i8 %0, 92 %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 1, ptr nonnull %c) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #8 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree norecurse 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 #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 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 #5 = { 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 #6 = { 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 #7 = { nofree nounwind } attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #9 = { 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 = distinct !{!12, !6} !13 = distinct !{!13, !6} !14 = !{!9, !9, i64 0}
#include<stdio.h> int main(void){ int i; char moji; scanf("%c", &moji); if((moji>= 'a') && (moji<='z')){ printf("a"); } else if((moji>= 'A') && (moji<='Z')){ printf("A"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_289985/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_289985/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 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 %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(void){ char a; scanf("%c",&a); if(a >= 'a'){ printf("a"); }else{ printf("A"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290026/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, !tbaa !5 %cmp = icmp sgt i8 %0, 96 %. = select i1 %cmp, i32 97, i32 65 %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)"} !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,i; scanf("%d",&n); char a[n+1];char p; scanf("%s",a); printf("1"); a[0]+=1; //printf("%c",a[0]); for(i=1;a[i];i++){ p=a[i]+1; if(a[i-1]!=p){ printf("1"); a[i]+=1; //printf("%c",a[i]); } else{ printf("0"); // printf("%c",a[i]); } } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29007/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) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec37 = add nsw i32 %0, -1 store i32 %dec37, ptr %t, align 4, !tbaa !5 %tobool.not38 = icmp eq i32 %0, 0 br i1 %tobool.not38, label %while.end, label %while.body while.body: ; preds = %entry, %for.end call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %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 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla) %putchar = call i32 @putchar(i32 49) %4 = load i8, ptr %vla, align 16, !tbaa !9 %add4 = add i8 %4, 1 store i8 %add4, ptr %vla, align 16, !tbaa !9 %arrayidx633 = getelementptr inbounds i8, ptr %vla, i64 1 %5 = load i8, ptr %arrayidx633, align 1, !tbaa !9 %tobool7.not34 = icmp eq i8 %5, 0 br i1 %tobool7.not34, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %while.body %invariant.gep = getelementptr i8, ptr %vla, i64 -1 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.inc ] %6 = phi i8 [ %5, %for.body.preheader ], [ %9, %for.inc ] %arrayidx636 = phi ptr [ %arrayidx633, %for.body.preheader ], [ %arrayidx6, %for.inc ] %add11 = add i8 %6, 1 %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv %7 = load i8, ptr %gep, align 1, !tbaa !9 %cmp.not = icmp eq i8 %7, %add11 br i1 %cmp.not, label %if.else, label %if.then if.then: ; preds = %for.body %putchar32 = call i32 @putchar(i32 49) %8 = load i8, ptr %arrayidx636, align 1, !tbaa !9 %add22 = add i8 %8, 1 store i8 %add22, ptr %arrayidx636, align 1, !tbaa !9 br label %for.inc if.else: ; preds = %for.body %putchar31 = call i32 @putchar(i32 48) br label %for.inc for.inc: ; preds = %if.then, %if.else %indvars.iv.next = add nuw i64 %indvars.iv, 1 %idxprom = and i64 %indvars.iv.next, 4294967295 %arrayidx6 = getelementptr inbounds i8, ptr %vla, i64 %idxprom %9 = load i8, ptr %arrayidx6, align 1, !tbaa !9 %tobool7.not = icmp eq i8 %9, 0 br i1 %tobool7.not, label %for.end, label %for.body, !llvm.loop !10 for.end: ; preds = %for.inc, %while.body %putchar30 = call i32 @putchar(i32 10) call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 %10 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %10, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %10, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %for.end, %entry 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: 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: 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} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(){ int i; char moji; scanf("%c", &moji); if((moji>='a') && (moji<='z')){ printf("a"); }else if((moji>='A') && (moji<='Z')){ printf("A"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290112/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 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 %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> #include <stdlib.h> int main(){ char S; scanf("%c",&S); if((S>='A') && (S<='Z')) printf("A"); else printf("a"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290156/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290156/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: %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 %. = select i1 %or.cond, i32 65, i32 97 %putchar = call i32 @putchar(i32 %.) 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 @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(void){ int T, N; scanf("%d", &T); while(T--){ scanf("%d", &N); printf("%d\n", N/2+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2902/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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !5 %dec3 = add nsw i32 %0, -1 store i32 %dec3, ptr %T, align 4, !tbaa !5 %tobool.not4 = icmp eq i32 %0, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %1 = load i32, ptr %N, align 4, !tbaa !5 %div = sdiv i32 %1, 2 %add = add nsw i32 %div, 1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) %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 = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 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> int main(){ long int N, Naux; scanf("%ld", &N); Naux = N; int ans = 0; for(long int n = 2; n * n <= Naux; n++){ if(N % n == 0){ N /= n; int nDiv = 1; while(N % n == 0){ N /= n; nDiv++; } for(int i = 1; i*(i+1)/2 <= nDiv; i++) ans++; } } ans += N > 1 ? 1 : 0; printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290242/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290242/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"%ld\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: %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 %cmp.not40 = icmp slt i64 %0, 4 br i1 %cmp.not40, label %for.cond.cleanup, label %for.body for.cond.cleanup: ; preds = %for.inc13, %entry %1 = phi i64 [ %0, %entry ], [ %div4.lcssa37, %for.inc13 ] %ans.0.lcssa = phi i32 [ 0, %entry ], [ %ans.2, %for.inc13 ] %cmp16 = icmp sgt i64 %1, 1 %cond = zext i1 %cmp16 to i32 %add17 = add nsw i32 %ans.0.lcssa, %cond %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add17) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #3 ret i32 0 for.body: ; preds = %entry, %for.inc13 %n.043 = phi i64 [ %inc14, %for.inc13 ], [ 2, %entry ] %ans.042 = phi i32 [ %ans.2, %for.inc13 ], [ 0, %entry ] %div4.lcssa3841 = phi i64 [ %div4.lcssa37, %for.inc13 ], [ %0, %entry ] %rem = srem i64 %div4.lcssa3841, %n.043 %div = sdiv i64 %div4.lcssa3841, %n.043 %cmp1 = icmp eq i64 %rem, 0 br i1 %cmp1, label %if.then, label %for.inc13 if.then: ; preds = %for.body store i64 %div, ptr %N, align 8, !tbaa !5 %rem232 = srem i64 %div, %n.043 %cmp333 = icmp eq i64 %rem232, 0 br i1 %cmp333, label %while.body, label %for.cond5.preheader while.cond.for.cond5.preheader_crit_edge: ; preds = %while.body store i64 %div4, ptr %N, align 8, !tbaa !5 br label %for.cond5.preheader for.cond5.preheader: ; preds = %while.cond.for.cond5.preheader_crit_edge, %if.then %div4.lcssa39 = phi i64 [ %div4, %while.cond.for.cond5.preheader_crit_edge ], [ %div, %if.then ] %nDiv.0.lcssa = phi i32 [ %inc, %while.cond.for.cond5.preheader_crit_edge ], [ 1, %if.then ] br label %for.cond5 while.body: ; preds = %if.then, %while.body %nDiv.035 = phi i32 [ %inc, %while.body ], [ 1, %if.then ] %div43134 = phi i64 [ %div4, %while.body ], [ %div, %if.then ] %div4 = sdiv i64 %div43134, %n.043 %inc = add nuw nsw i32 %nDiv.035, 1 %rem2 = srem i64 %div4, %n.043 %cmp3 = icmp eq i64 %rem2, 0 br i1 %cmp3, label %while.body, label %while.cond.for.cond5.preheader_crit_edge, !llvm.loop !9 for.cond5: ; preds = %for.cond5, %for.cond5.preheader %ans.1 = phi i32 [ %inc11, %for.cond5 ], [ %ans.042, %for.cond5.preheader ] %i.0 = phi i32 [ %add, %for.cond5 ], [ 1, %for.cond5.preheader ] %add = add nuw nsw i32 %i.0, 1 %mul6 = mul nsw i32 %add, %i.0 %div730 = lshr i32 %mul6, 1 %cmp8.not = icmp ugt i32 %div730, %nDiv.0.lcssa %inc11 = add nsw i32 %ans.1, 1 br i1 %cmp8.not, label %for.inc13, label %for.cond5, !llvm.loop !11 for.inc13: ; preds = %for.cond5, %for.body %div4.lcssa37 = phi i64 [ %div4.lcssa3841, %for.body ], [ %div4.lcssa39, %for.cond5 ] %ans.2 = phi i32 [ %ans.042, %for.body ], [ %ans.1, %for.cond5 ] %inc14 = add nuw nsw i64 %n.043, 1 %mul = mul nsw i64 %inc14, %inc14 %cmp.not = icmp sgt i64 %mul, %0 br i1 %cmp.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) #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", !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> #include <stdlib.h> #include <string.h> #include <math.h> #define MAX 1000000 int main(void) { long long int n; scanf("%lld", &n); long long int factors[MAX]; long long int pointer = 0; for (long long int i = 2; i * i <= n; i++) { if (pointer > MAX) { printf("over\n"); break; } else { factors[pointer] = 0; } while (!(n % i)) { factors[pointer]++; n /= i; if (n % i) pointer++; } } // printf("%lld\n", pointer); long long int result = 0; for (long long int i = 0; i < pointer; i++) { long long int count = factors[i]; // printf("count: %lld\n", count); for (long long int j = 1; j <= count; j++) { result++; count -= j; } } if (n != 1) result++; printf("%lld\n", result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290286/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290286/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.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @str = private unnamed_addr constant [5 x i8] c"over\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %factors = alloca [1000000 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 8000000, ptr nonnull %factors) #4 %n.promoted62 = load i64, ptr %n, align 8, !tbaa !5 %cmp.not65 = icmp slt i64 %n.promoted62, 4 br i1 %cmp.not65, label %for.cond.cleanup13, label %for.body for.body: ; preds = %entry, %for.inc %i.068 = phi i64 [ %inc9, %for.inc ], [ 2, %entry ] %pointer.067 = phi i64 [ %pointer.1.lcssa, %for.inc ], [ 0, %entry ] %div.lcssa6466 = phi i64 [ %div.lcssa63, %for.inc ], [ %n.promoted62, %entry ] %cmp1 = icmp sgt i64 %pointer.067, 1000000 br i1 %cmp1, label %cleanup.thread, label %if.else cleanup.thread: ; preds = %for.body %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.body14.preheader if.else: ; preds = %for.body %arrayidx = getelementptr inbounds [1000000 x i64], ptr %factors, i64 0, i64 %pointer.067 store i64 0, ptr %arrayidx, align 8, !tbaa !5 %rem58 = srem i64 %div.lcssa6466, %i.068 %tobool.not59 = icmp eq i64 %rem58, 0 br i1 %tobool.not59, label %while.body, label %for.inc while.body: ; preds = %if.else, %while.body %pointer.161 = phi i64 [ %spec.select, %while.body ], [ %pointer.067, %if.else ] %div5760 = phi i64 [ %div, %while.body ], [ %div.lcssa6466, %if.else ] %arrayidx3 = getelementptr inbounds [1000000 x i64], ptr %factors, i64 0, i64 %pointer.161 %0 = load i64, ptr %arrayidx3, align 8, !tbaa !5 %inc = add nsw i64 %0, 1 store i64 %inc, ptr %arrayidx3, align 8, !tbaa !5 %div = sdiv i64 %div5760, %i.068 %rem4 = srem i64 %div, %i.068 %tobool5.not = icmp ne i64 %rem4, 0 %inc7 = zext i1 %tobool5.not to i64 %spec.select = add nsw i64 %pointer.161, %inc7 %tobool.not = icmp eq i64 %rem4, 0 br i1 %tobool.not, label %while.body, label %while.cond.for.inc_crit_edge, !llvm.loop !9 while.cond.for.inc_crit_edge: ; preds = %while.body store i64 %div, ptr %n, align 8, !tbaa !5 br label %for.inc for.inc: ; preds = %while.cond.for.inc_crit_edge, %if.else %div.lcssa63 = phi i64 [ %div, %while.cond.for.inc_crit_edge ], [ %div.lcssa6466, %if.else ] %pointer.1.lcssa = phi i64 [ %spec.select, %while.cond.for.inc_crit_edge ], [ %pointer.067, %if.else ] %inc9 = add nuw nsw i64 %i.068, 1 %mul = mul nsw i64 %inc9, %inc9 %cmp.not = icmp sgt i64 %mul, %div.lcssa63 br i1 %cmp.not, label %cleanup, label %for.body, !llvm.loop !11 cleanup: ; preds = %for.inc %cmp1275 = icmp sgt i64 %pointer.1.lcssa, 0 br i1 %cmp1275, label %for.body14.preheader, label %for.cond.cleanup13 for.body14.preheader: ; preds = %cleanup.thread, %cleanup %pointer.05682 = phi i64 [ %pointer.067, %cleanup.thread ], [ %pointer.1.lcssa, %cleanup ] %xtraiter = and i64 %pointer.05682, 1 %1 = icmp eq i64 %pointer.05682, 1 br i1 %1, label %for.cond.cleanup13.loopexit.unr-lcssa, label %for.body14.preheader.new for.body14.preheader.new: ; preds = %for.body14.preheader %unroll_iter = and i64 %pointer.05682, -2 br label %for.body14 for.cond.cleanup13.loopexit.unr-lcssa: ; preds = %for.cond.cleanup18.1, %for.body14.preheader %result.1.lcssa.lcssa.ph = phi i64 [ undef, %for.body14.preheader ], [ %result.1.lcssa.1, %for.cond.cleanup18.1 ] %i10.077.unr = phi i64 [ 0, %for.body14.preheader ], [ %inc26.1, %for.cond.cleanup18.1 ] %result.076.unr = phi i64 [ 0, %for.body14.preheader ], [ %result.1.lcssa.1, %for.cond.cleanup18.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup13, label %for.body14.epil for.body14.epil: ; preds = %for.cond.cleanup13.loopexit.unr-lcssa %arrayidx15.epil = getelementptr inbounds [1000000 x i64], ptr %factors, i64 0, i64 %i10.077.unr %2 = load i64, ptr %arrayidx15.epil, align 8, !tbaa !5 %cmp17.not70.epil = icmp slt i64 %2, 1 br i1 %cmp17.not70.epil, label %for.cond.cleanup13, label %for.body19.epil for.body19.epil: ; preds = %for.body14.epil, %for.body19.epil %j.073.epil = phi i64 [ %inc22.epil, %for.body19.epil ], [ 1, %for.body14.epil ] %count.072.epil = phi i64 [ %sub.epil, %for.body19.epil ], [ %2, %for.body14.epil ] %result.171.epil = phi i64 [ %inc20.epil, %for.body19.epil ], [ %result.076.unr, %for.body14.epil ] %inc20.epil = add nsw i64 %result.171.epil, 1 %sub.epil = sub nsw i64 %count.072.epil, %j.073.epil %inc22.epil = add nuw nsw i64 %j.073.epil, 1 %cmp17.not.not.epil = icmp slt i64 %j.073.epil, %sub.epil br i1 %cmp17.not.not.epil, label %for.body19.epil, label %for.cond.cleanup13, !llvm.loop !12 for.cond.cleanup13: ; preds = %for.cond.cleanup13.loopexit.unr-lcssa, %for.body19.epil, %for.body14.epil, %entry, %cleanup %result.0.lcssa = phi i64 [ 0, %cleanup ], [ 0, %entry ], [ %result.1.lcssa.lcssa.ph, %for.cond.cleanup13.loopexit.unr-lcssa ], [ %result.076.unr, %for.body14.epil ], [ %inc20.epil, %for.body19.epil ] %3 = load i64, ptr %n, align 8, !tbaa !5 %cmp29.not = icmp ne i64 %3, 1 %inc31 = zext i1 %cmp29.not to i64 %spec.select54 = add nsw i64 %result.0.lcssa, %inc31 %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %spec.select54) call void @llvm.lifetime.end.p0(i64 8000000, ptr nonnull %factors) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 for.body14: ; preds = %for.cond.cleanup18.1, %for.body14.preheader.new %i10.077 = phi i64 [ 0, %for.body14.preheader.new ], [ %inc26.1, %for.cond.cleanup18.1 ] %result.076 = phi i64 [ 0, %for.body14.preheader.new ], [ %result.1.lcssa.1, %for.cond.cleanup18.1 ] %niter = phi i64 [ 0, %for.body14.preheader.new ], [ %niter.next.1, %for.cond.cleanup18.1 ] %arrayidx15 = getelementptr inbounds [1000000 x i64], ptr %factors, i64 0, i64 %i10.077 %4 = load i64, ptr %arrayidx15, align 16, !tbaa !5 %cmp17.not70 = icmp slt i64 %4, 1 br i1 %cmp17.not70, label %for.cond.cleanup18, label %for.body19 for.cond.cleanup18: ; preds = %for.body19, %for.body14 %result.1.lcssa = phi i64 [ %result.076, %for.body14 ], [ %inc20, %for.body19 ] %inc26 = or i64 %i10.077, 1 %arrayidx15.1 = getelementptr inbounds [1000000 x i64], ptr %factors, i64 0, i64 %inc26 %5 = load i64, ptr %arrayidx15.1, align 8, !tbaa !5 %cmp17.not70.1 = icmp slt i64 %5, 1 br i1 %cmp17.not70.1, label %for.cond.cleanup18.1, label %for.body19.1 for.body19.1: ; preds = %for.cond.cleanup18, %for.body19.1 %j.073.1 = phi i64 [ %inc22.1, %for.body19.1 ], [ 1, %for.cond.cleanup18 ] %count.072.1 = phi i64 [ %sub.1, %for.body19.1 ], [ %5, %for.cond.cleanup18 ] %result.171.1 = phi i64 [ %inc20.1, %for.body19.1 ], [ %result.1.lcssa, %for.cond.cleanup18 ] %inc20.1 = add nsw i64 %result.171.1, 1 %sub.1 = sub nsw i64 %count.072.1, %j.073.1 %inc22.1 = add nuw nsw i64 %j.073.1, 1 %cmp17.not.not.1 = icmp slt i64 %j.073.1, %sub.1 br i1 %cmp17.not.not.1, label %for.body19.1, label %for.cond.cleanup18.1, !llvm.loop !12 for.cond.cleanup18.1: ; preds = %for.body19.1, %for.cond.cleanup18 %result.1.lcssa.1 = phi i64 [ %result.1.lcssa, %for.cond.cleanup18 ], [ %inc20.1, %for.body19.1 ] %inc26.1 = add nuw nsw i64 %i10.077, 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.cleanup13.loopexit.unr-lcssa, label %for.body14, !llvm.loop !13 for.body19: ; preds = %for.body14, %for.body19 %j.073 = phi i64 [ %inc22, %for.body19 ], [ 1, %for.body14 ] %count.072 = phi i64 [ %sub, %for.body19 ], [ %4, %for.body14 ] %result.171 = phi i64 [ %inc20, %for.body19 ], [ %result.076, %for.body14 ] %inc20 = add nsw i64 %result.171, 1 %sub = sub nsw i64 %count.072, %j.073 %inc22 = add nuw nsw i64 %j.073, 1 %cmp17.not.not = icmp slt i64 %j.073, %sub br i1 %cmp17.not.not, label %for.body19, label %for.cond.cleanup18, !llvm.loop !12 } ; 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 = !{!"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 N,M,t,r=0,i,j,x; int main() { scanf("%d%d",&N,&M); for(i=0;i<N;i++) { for(t=j=0;j<M;j++) { scanf("%1d",&x); t+=x; } r=r<t?t:r; } printf("%d\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290329/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290329/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" @r = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @N = dso_local global i32 0, align 4 @M = dso_local global i32 0, align 4 @i = dso_local local_unnamed_addr global i32 0, align 4 @j = dso_local local_unnamed_addr global i32 0, align 4 @t = dso_local local_unnamed_addr global i32 0, align 4 @.str.1 = private unnamed_addr constant [4 x i8] c"%1d\00", align 1 @x = dso_local global i32 0, align 4 @.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: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull @M) store i32 0, ptr @i, align 4, !tbaa !5 %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp11 = icmp sgt i32 %0, 0 br i1 %cmp11, label %for.body.preheader, label %entry.for.end8_crit_edge entry.for.end8_crit_edge: ; preds = %entry %.pre14 = load i32, ptr @r, align 4, !tbaa !5 br label %for.end8 for.body.preheader: ; preds = %entry %.pre = load i32, ptr @M, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.preheader, %for.end %1 = phi i32 [ %0, %for.body.preheader ], [ %8, %for.end ] %2 = phi i32 [ 0, %for.body.preheader ], [ %inc7, %for.end ] %3 = phi i32 [ %.pre, %for.body.preheader ], [ %11, %for.end ] store i32 0, ptr @j, align 4, !tbaa !5 store i32 0, ptr @t, align 4, !tbaa !5 %cmp210 = icmp sgt i32 %3, 0 br i1 %cmp210, label %for.body3, label %for.end for.body3: ; preds = %for.body, %for.body3 %call4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @x) %4 = load i32, ptr @x, align 4, !tbaa !5 %5 = load i32, ptr @t, align 4, !tbaa !5 %add = add nsw i32 %5, %4 store i32 %add, ptr @t, align 4, !tbaa !5 %6 = load i32, ptr @j, align 4, !tbaa !5 %inc = add nsw i32 %6, 1 store i32 %inc, ptr @j, align 4, !tbaa !5 %7 = load i32, ptr @M, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %7 br i1 %cmp2, label %for.body3, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body3 %.pre12 = load i32, ptr @i, align 4, !tbaa !5 %.pre13 = load i32, ptr @N, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit, %for.body %8 = phi i32 [ %.pre13, %for.end.loopexit ], [ %1, %for.body ] %9 = phi i32 [ %.pre12, %for.end.loopexit ], [ %2, %for.body ] %10 = phi i32 [ %add, %for.end.loopexit ], [ 0, %for.body ] %11 = phi i32 [ %7, %for.end.loopexit ], [ %3, %for.body ] %12 = load i32, ptr @r, align 4 %cond = tail call i32 @llvm.smax.i32(i32 %12, i32 %10) store i32 %cond, ptr @r, align 4, !tbaa !5 %inc7 = add nsw i32 %9, 1 store i32 %inc7, ptr @i, align 4, !tbaa !5 %cmp = icmp slt i32 %inc7, %8 br i1 %cmp, label %for.body, label %for.end8, !llvm.loop !11 for.end8: ; preds = %for.end, %entry.for.end8_crit_edge %13 = phi i32 [ %.pre14, %entry.for.end8_crit_edge ], [ %cond, %for.end ] %call9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13) 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}
#include<stdio.h> int main(){ int t,n; char b[100000],a[100000]; scanf("%d",&t); for(int i=0;i<t;i++){ scanf("%d",&n); scanf("%s",b); if(n==1){ printf("%d\n",1); continue; } a[0]='1'; for(int k=1;k<n;k++){ if(b[k-1]=='1' && a[k-1]=='1'){ if(b[k]=='1') a[k]='0'; else a[k]='1'; } else if(b[k-1]=='1' || a[k-1]=='1'){ if(b[k]=='0') a[k]='0'; else a[k]='1'; } else a[k]='1'; } for(int x=0;x<n;x++){ printf("%c",a[x]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29038/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29038/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 @.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: %t = alloca i32, align 4 %n = alloca i32, align 4 %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 void @llvm.lifetime.start.p0(i64 4, 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 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp97 = icmp sgt i32 %0, 0 br i1 %cmp97, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.inc74, %entry 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 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 for.body: ; preds = %entry, %for.inc74 %i.098 = phi i32 [ %inc75, %for.inc74 ], [ 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.1, ptr noundef nonnull %b) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp3 = icmp eq i32 %1, 1 br i1 %cmp3, label %if.then, label %if.end if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc74 if.end: ; preds = %for.body store i8 49, ptr %a, align 16, !tbaa !9 %cmp693 = icmp sgt i32 %1, 1 br i1 %cmp693, label %for.body8.preheader, label %for.cond.cleanup64 for.body8.preheader: ; preds = %if.end %wide.trip.count = zext i32 %1 to i64 br label %for.body8 for.cond61.preheader: ; preds = %for.inc %cmp6295 = icmp sgt i32 %1, 0 br i1 %cmp6295, label %for.body65, label %for.cond.cleanup64 for.body8: ; preds = %for.body8.preheader, %for.inc %indvars.iv = phi i64 [ 1, %for.body8.preheader ], [ %indvars.iv.next, %for.inc ] %2 = add nsw i64 %indvars.iv, -1 %arrayidx9 = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %2 %3 = load i8, ptr %arrayidx9, align 1, !tbaa !9 %cmp10 = icmp eq i8 %3, 49 %arrayidx14 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %2 %4 = load i8, ptr %arrayidx14, align 1, !tbaa !9 %cmp16 = icmp eq i8 %4, 49 br i1 %cmp10, label %land.lhs.true, label %lor.lhs.false land.lhs.true: ; preds = %for.body8 br i1 %cmp16, label %if.then18, label %if.then43 if.then18: ; preds = %land.lhs.true %arrayidx20 = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %indvars.iv %5 = load i8, ptr %arrayidx20, align 1, !tbaa !9 %cmp22 = icmp eq i8 %5, 49 %arrayidx26 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %indvars.iv br i1 %cmp22, label %if.then24, label %if.else if.then24: ; preds = %if.then18 store i8 48, ptr %arrayidx26, align 1, !tbaa !9 br label %for.inc if.else: ; preds = %if.then18 store i8 49, ptr %arrayidx26, align 1, !tbaa !9 br label %for.inc lor.lhs.false: ; preds = %for.body8 br i1 %cmp16, label %if.then43, label %if.else56 if.then43: ; preds = %land.lhs.true, %lor.lhs.false %arrayidx45 = getelementptr inbounds [100000 x i8], ptr %b, i64 0, i64 %indvars.iv %6 = load i8, ptr %arrayidx45, align 1, !tbaa !9 %cmp47 = icmp eq i8 %6, 48 %arrayidx51 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %indvars.iv br i1 %cmp47, label %if.then49, label %if.else52 if.then49: ; preds = %if.then43 store i8 48, ptr %arrayidx51, align 1, !tbaa !9 br label %for.inc if.else52: ; preds = %if.then43 store i8 49, ptr %arrayidx51, align 1, !tbaa !9 br label %for.inc if.else56: ; preds = %lor.lhs.false %arrayidx58 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %indvars.iv store i8 49, ptr %arrayidx58, align 1, !tbaa !9 br label %for.inc for.inc: ; preds = %if.else, %if.then24, %if.then49, %if.else52, %if.else56 %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.cond61.preheader, label %for.body8, !llvm.loop !10 for.cond.cleanup64: ; preds = %for.body65, %if.end, %for.cond61.preheader %putchar = call i32 @putchar(i32 10) br label %for.inc74 for.body65: ; preds = %for.cond61.preheader, %for.body65 %indvars.iv101 = phi i64 [ %indvars.iv.next102, %for.body65 ], [ 0, %for.cond61.preheader ] %arrayidx67 = getelementptr inbounds [100000 x i8], ptr %a, i64 0, i64 %indvars.iv101 %7 = load i8, ptr %arrayidx67, align 1, !tbaa !9 %conv68 = sext i8 %7 to i32 %putchar92 = call i32 @putchar(i32 %conv68) %indvars.iv.next102 = add nuw nsw i64 %indvars.iv101, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp62 = icmp slt i64 %indvars.iv.next102, %9 br i1 %cmp62, label %for.body65, label %for.cond.cleanup64, !llvm.loop !12 for.inc74: ; preds = %for.cond.cleanup64, %if.then %inc75 = add nuw nsw i32 %i.098, 1 %10 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc75, %10 br i1 %cmp, label %for.body, label %for.cond.cleanup, !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: 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 = !{!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> #include<string.h> int main(){ int N; int K; scanf("%d",&N); scanf("%d",&K); int sum = K; for(int i=1;i<N;i++){ sum*=K-1; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290422/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: %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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %K) %0 = load i32, ptr %K, align 4, !tbaa !5 %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp5 = icmp sgt i32 %1, 1 br i1 %cmp5, label %for.body.lr.ph, label %for.cond.cleanup for.body.lr.ph: ; preds = %entry %sub = add nsw i32 %0, -1 %2 = add i32 %1, -1 %min.iters.check = icmp ult i32 %1, 9 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %2, -8 %ind.end = or i32 %n.vec, 1 %3 = insertelement <4 x i32> <i32 poison, i32 1, i32 1, i32 1>, i32 %0, i64 0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %sub, 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 i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %3, %vector.ph ], [ %4, %vector.body ] %vec.phi8 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %5, %vector.body ] %4 = mul <4 x i32> %vec.phi, %broadcast.splat %5 = mul <4 x i32> %vec.phi8, %broadcast.splat %index.next = add nuw i32 %index, 8 %6 = icmp eq i32 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %5, %4 %7 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %2, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %i.07.ph = phi i32 [ 1, %for.body.lr.ph ], [ %ind.end, %middle.block ] %sum.06.ph = phi i32 [ %0, %for.body.lr.ph ], [ %7, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %sum.0.lcssa = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %mul, %for.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) 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 for.body: ; preds = %for.body.preheader, %for.body %i.07 = phi i32 [ %inc, %for.body ], [ %i.07.ph, %for.body.preheader ] %sum.06 = phi i32 [ %mul, %for.body ], [ %sum.06.ph, %for.body.preheader ] %mul = mul nsw i32 %sum.06, %sub %inc = add nuw nsw i32 %i.07, 1 %exitcond.not = icmp eq i32 %inc, %1 br i1 %exitcond.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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x 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 = distinct !{!13, !10, !12, !11}
#include <stdio.h> int main() { int n,k,ans; scanf("%d%d", &n,&k); ans=k; for(int i=0; i<n-1; i++) ans=ans*(k-1); printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290466/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290466/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: %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 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp5 = icmp sgt i32 %1, 1 br i1 %cmp5, label %for.body.lr.ph, label %for.cond.cleanup for.body.lr.ph: ; preds = %entry %sub1 = add nsw i32 %0, -1 %2 = add i32 %1, -2 %3 = add i32 %1, -1 %min.iters.check = icmp ult i32 %1, 9 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %3, -8 %4 = insertelement <4 x i32> <i32 poison, i32 1, i32 1, i32 1>, i32 %0, i64 0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %sub1, 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 i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %4, %vector.ph ], [ %5, %vector.body ] %vec.phi8 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %6, %vector.body ] %5 = mul <4 x i32> %vec.phi, %broadcast.splat %6 = mul <4 x i32> %vec.phi8, %broadcast.splat %index.next = add nuw i32 %index, 8 %7 = icmp eq i32 %index.next, %n.vec br i1 %7, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %6, %5 %8 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %3, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %i.07.ph = phi i32 [ 0, %for.body.lr.ph ], [ %n.vec, %middle.block ] %ans.06.ph = phi i32 [ %0, %for.body.lr.ph ], [ %8, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %ans.0.lcssa = phi i32 [ %0, %entry ], [ %8, %middle.block ], [ %mul, %for.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) 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 for.body: ; preds = %for.body.preheader, %for.body %i.07 = phi i32 [ %inc, %for.body ], [ %i.07.ph, %for.body.preheader ] %ans.06 = phi i32 [ %mul, %for.body ], [ %ans.06.ph, %for.body.preheader ] %mul = mul nsw i32 %ans.06, %sub1 %inc = add nuw nsw i32 %i.07, 1 %exitcond.not = icmp eq i32 %i.07, %2 br i1 %exitcond.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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x 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 = distinct !{!13, !10, !12, !11}
#include <stdio.h> int main(void){ int n, k, loop, num; scanf("%d %d", &n, &k); num = k; for(loop = 0; loop < n - 1; loop++){ num *= (k - 1); } printf("%d\n", num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290509/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 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp5 = icmp sgt i32 %1, 1 br i1 %cmp5, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %sub1 = add nsw i32 %0, -1 %2 = add i32 %1, -2 %3 = add i32 %1, -1 %min.iters.check = icmp ult i32 %1, 9 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %3, -8 %4 = insertelement <4 x i32> <i32 poison, i32 1, i32 1, i32 1>, i32 %0, i64 0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %sub1, 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 i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %4, %vector.ph ], [ %5, %vector.body ] %vec.phi8 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %6, %vector.body ] %5 = mul <4 x i32> %vec.phi, %broadcast.splat %6 = mul <4 x i32> %vec.phi8, %broadcast.splat %index.next = add nuw i32 %index, 8 %7 = icmp eq i32 %index.next, %n.vec br i1 %7, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %6, %5 %8 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %3, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %num.07.ph = phi i32 [ %0, %for.body.lr.ph ], [ %8, %middle.block ] %loop.06.ph = phi i32 [ 0, %for.body.lr.ph ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader, %for.body %num.07 = phi i32 [ %mul, %for.body ], [ %num.07.ph, %for.body.preheader ] %loop.06 = phi i32 [ %inc, %for.body ], [ %loop.06.ph, %for.body.preheader ] %mul = mul nsw i32 %num.07, %sub1 %inc = add nuw nsw i32 %loop.06, 1 %exitcond.not = icmp eq i32 %loop.06, %2 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %num.0.lcssa = phi i32 [ %0, %entry ], [ %8, %middle.block ], [ %mul, %for.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %num.0.lcssa) 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 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.vector.reduce.mul.v4i32(<4 x 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 = distinct !{!13, !10, !12, !11}
#include <stdio.h> #include <stdbool.h> #define N_MAX 50 #define INF 1145141919 #define SMAP(a, b) ((a)!=(b))&&((a)^=((b)^=((a)^= (b)))) int i, j; int n, m; int k; bool max[N_MAX * N_MAX]; bool d[N_MAX][N_MAX]; void solve(){ return; } int main (void) { int fuc, ker; scanf("%d%d", &n, &k); n--; k--; fuc = 1; ker = k; for (i = 0; i < n; i++) { fuc *= k; ker *= k; } printf("%d\n", fuc+ker); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290552/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 @k = dso_local global i32 0, align 4 @i = dso_local local_unnamed_addr global i32 0, align 4 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @j = dso_local local_unnamed_addr global i32 0, align 4 @m = dso_local local_unnamed_addr global i32 0, align 4 @max = dso_local local_unnamed_addr global [2500 x i8] zeroinitializer, align 16 @d = dso_local local_unnamed_addr global [50 x [50 x i8]] zeroinitializer, align 16 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local void @solve() local_unnamed_addr #0 { entry: ret void } ; 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, ptr noundef nonnull @k) %0 = load i32, ptr @n, align 4, !tbaa !5 %dec = add i32 %0, -1 store i32 %dec, ptr @n, align 4, !tbaa !5 %1 = load i32, ptr @k, align 4, !tbaa !5 %dec1 = add nsw i32 %1, -1 store i32 %dec1, ptr @k, align 4, !tbaa !5 %cmp6 = icmp sgt i32 %0, 1 br i1 %cmp6, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %0, 9 br i1 %min.iters.check, label %for.body.preheader17, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %dec, -8 %2 = insertelement <4 x i32> <i32 poison, i32 1, i32 1, i32 1>, i32 %dec1, i64 0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %dec1, 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 i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %2, %vector.ph ], [ %5, %vector.body ] %vec.phi12 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %6, %vector.body ] %vec.phi13 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %3, %vector.body ] %vec.phi14 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %4, %vector.body ] %3 = mul <4 x i32> %vec.phi13, %broadcast.splat %4 = mul <4 x i32> %vec.phi14, %broadcast.splat %5 = mul <4 x i32> %vec.phi, %broadcast.splat %6 = mul <4 x i32> %vec.phi12, %broadcast.splat %index.next = add nuw i32 %index, 8 %7 = icmp eq i32 %index.next, %n.vec br i1 %7, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx15 = mul <4 x i32> %4, %3 %8 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx15) %bin.rdx = mul <4 x i32> %6, %5 %9 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %dec, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader17 for.body.preheader17: ; preds = %for.body.preheader, %middle.block %ker.09.ph = phi i32 [ %dec1, %for.body.preheader ], [ %9, %middle.block ] %fuc.08.ph = phi i32 [ 1, %for.body.preheader ], [ %8, %middle.block ] %storemerge7.ph = phi i32 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader17, %for.body %ker.09 = phi i32 [ %mul2, %for.body ], [ %ker.09.ph, %for.body.preheader17 ] %fuc.08 = phi i32 [ %mul, %for.body ], [ %fuc.08.ph, %for.body.preheader17 ] %storemerge7 = phi i32 [ %inc, %for.body ], [ %storemerge7.ph, %for.body.preheader17 ] %mul = mul nsw i32 %fuc.08, %dec1 %mul2 = mul nsw i32 %ker.09, %dec1 %inc = add nuw nsw i32 %storemerge7, 1 %exitcond.not = icmp eq i32 %inc, %dec br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %storemerge.lcssa = phi i32 [ 0, %entry ], [ %dec, %middle.block ], [ %dec, %for.body ] %fuc.0.lcssa = phi i32 [ 1, %entry ], [ %8, %middle.block ], [ %mul, %for.body ] %ker.0.lcssa = phi i32 [ %dec1, %entry ], [ %9, %middle.block ], [ %mul2, %for.body ] store i32 %storemerge.lcssa, ptr @i, align 4, !tbaa !5 %add = add nsw i32 %ker.0.lcssa, %fuc.0.lcssa %call3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) ret i32 0 } ; 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 nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #3 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 = { 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) } !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}
#include <stdio.h> int main() { int N, K; scanf("%d %d",&N,&K); int i; int ans = K; for (i = 0; i < N-1; i++) { ans *= (K - 1); } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290596/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 %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp5 = icmp sgt i32 %1, 1 br i1 %cmp5, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %sub1 = add nsw i32 %0, -1 %2 = add i32 %1, -2 %3 = add i32 %1, -1 %min.iters.check = icmp ult i32 %1, 9 br i1 %min.iters.check, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %for.body.lr.ph %n.vec = and i32 %3, -8 %4 = insertelement <4 x i32> <i32 poison, i32 1, i32 1, i32 1>, i32 %0, i64 0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %sub1, 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 i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %4, %vector.ph ], [ %5, %vector.body ] %vec.phi8 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %6, %vector.body ] %5 = mul <4 x i32> %vec.phi, %broadcast.splat %6 = mul <4 x i32> %vec.phi8, %broadcast.splat %index.next = add nuw i32 %index, 8 %7 = icmp eq i32 %index.next, %n.vec br i1 %7, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %6, %5 %8 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %3, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph, %middle.block %ans.07.ph = phi i32 [ %0, %for.body.lr.ph ], [ %8, %middle.block ] %i.06.ph = phi i32 [ 0, %for.body.lr.ph ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader, %for.body %ans.07 = phi i32 [ %mul, %for.body ], [ %ans.07.ph, %for.body.preheader ] %i.06 = phi i32 [ %inc, %for.body ], [ %i.06.ph, %for.body.preheader ] %mul = mul nsw i32 %ans.07, %sub1 %inc = add nuw nsw i32 %i.06, 1 %exitcond.not = icmp eq i32 %i.06, %2 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %ans.0.lcssa = phi i32 [ %0, %entry ], [ %8, %middle.block ], [ %mul, %for.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) 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 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.vector.reduce.mul.v4i32(<4 x 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 = distinct !{!13, !10, !12, !11}
#include <stdio.h> #include <string.h> #include <stdlib.h> int main() { int x; scanf("%d", &x); puts(x<1200 ?"ABC":"ARC"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290639/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"ABC\00", align 1 @.str.2 = 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) #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 slt i32 %0, 1200 %cond = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call1 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond) 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 @puts(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 x; scanf("%d",&x); x<1200?printf("ABC\n"):printf("ARC\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290682/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() { int a; scanf("%d", &a); if (a >= 1200) printf("ARC\n"); else printf("ABC\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290725/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290725/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"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: %a = alloca i32, align 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 %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 1199 %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 %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 x; scanf("%d",&x); if(x<1200) puts("ABC"); else puts("ARC"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290776/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290776/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"ABC\00", align 1 @.str.2 = 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) #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 slt i32 %0, 1200 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call2 = call i32 @puts(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 @puts(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 x; char a; scanf("%d",&x); scanf(" %c", &a); if(1<= x || 3000>= x){ if(x < 1200){ printf("ABC\n"); return 0; }else{ printf("ARC\n"); return 0; } }else{ exit(1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290862/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 = private unnamed_addr constant [4 x i8] c"ARC\00", align 1 @str.4 = 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 %a = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 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 %x) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %0 = load i32, ptr %x, align 4 %cmp3 = icmp slt i32 %0, 1200 %str.4.str = select i1 %cmp3, ptr @str.4, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.str) call void @llvm.lifetime.end.p0(i64 1, 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 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> int main() { int a; scanf("%d", &a); if (a < 1200)printf("ABC\n"); else printf("ARC\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290905/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: %a = alloca i32, align 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 %a) %0 = load i32, ptr %a, 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 %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){ char data[4]; scanf("%s",data); printf("%d",(int)(700+(100*(data[0]=='o'))+(100*(data[1]=='o'))+(100*(data[2]=='o')))); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290949/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: %data = alloca [4 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %data) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %data) %0 = load i8, ptr %data, 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 %data, i64 0, i64 1 %1 = load i8, ptr %arrayidx2, align 1, !tbaa !5 %cmp4 = icmp eq i8 %1, 111 %mul6 = select i1 %cmp4, i32 100, i32 0 %add7 = add nuw nsw i32 %mul6, %add %arrayidx8 = getelementptr inbounds [4 x i8], ptr %data, i64 0, i64 2 %2 = load i8, ptr %arrayidx8, align 1, !tbaa !5 %cmp10 = icmp eq i8 %2, 111 %mul12 = select i1 %cmp10, i32 100, i32 0 %add13 = add nuw nsw i32 %add7, %mul12 %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 %data) #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("%3s", S); int i, pay; i = 0; pay = 700; do { if (S[i]== 'o') { pay += 100; } i += 1; } while (i < 3); printf("%d\n", pay); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_290992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_290992/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"%3s\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 %spec.select = select i1 %cmp, i32 800, i32 700 %arrayidx.1 = getelementptr inbounds [4 x i8], ptr %S, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp.1 = icmp eq i8 %1, 111 %add.1 = add nuw nsw i32 %spec.select, 100 %spec.select.1 = select i1 %cmp.1, i32 %add.1, i32 %spec.select %arrayidx.2 = getelementptr inbounds [4 x i8], ptr %S, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp.2 = icmp eq i8 %2, 111 %add.2 = add nuw nsw i32 %spec.select.1, 100 %spec.select.2 = select i1 %cmp.2, i32 %add.2, i32 %spec.select.1 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.2) 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(){ char str[4]; int ans = 700; int i; scanf("%s", &str); for(i = 0; i < 3; i++){ if(str[i] == 'o'){ ans += 100; } } printf("%d", ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291034/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: %str = alloca [4 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %str) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %0 = load i8, ptr %str, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %spec.select = select i1 %cmp1, i32 800, i32 700 %arrayidx.1 = getelementptr inbounds [4 x i8], ptr %str, 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 [4 x i8], ptr %str, 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 4, ptr nonnull %str) #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 a[5]; scanf("%s",a); int b=0,i; for(i=0;i<3;i++){ if(a[i]=='o'){ b++; } } printf("%d",700+b*100); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291078/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: %a = alloca [5 x i8], align 1 call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i8, ptr %a, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 111 %inc = zext i1 %cmp1 to i32 %arrayidx.1 = getelementptr inbounds [5 x i8], ptr %a, 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 [5 x i8], ptr %a, 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 5, 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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <wchar.h> #include <inttypes.h> #include <stdint.h> #include <string.h> #include <math.h> int main(void) { wchar_t S[4]; wscanf(L"%ls", S); uint32_t price = 700; for (size_t idx = 0; idx < 3; idx++) { if (S[idx] == L'o') { price += 100; } } printf("%"PRIu32, price); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291128/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 i32] [i32 37, i32 108, i32 115, i32 0], align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%u\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %S = alloca [4 x i32], align 16 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %S) #4 %call = call i32 (ptr, ...) @__isoc99_wscanf(ptr noundef nonnull @.str, ptr noundef nonnull %S) #4 %0 = load i32, ptr %S, align 16, !tbaa !5 %cmp1 = icmp eq i32 %0, 111 %spec.select = select i1 %cmp1, i32 800, i32 700 %arrayidx.1 = getelementptr inbounds [4 x i32], ptr %S, i64 0, i64 1 %1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp1.1 = icmp eq i32 %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 [4 x i32], ptr %S, i64 0, i64 2 %2 = load i32, ptr %arrayidx.2, align 8, !tbaa !5 %cmp1.2 = icmp eq i32 %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 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.2) call void @llvm.lifetime.end.p0(i64 16, 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 declare i32 @__isoc99_wscanf(ptr 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 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 = { "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 = { 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 str[3]; int i; int ans = 700; scanf("%s", str); for (i = 0; i < 3; i++) { if (str[i] == 'o') ans += 100; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291171/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: %str = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %str) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %0 = load i8, ptr %str, 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 %str, 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 %str, 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 %str) #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]; int i,price; scanf("%s", s); price = 700; for(i = 0; i < 4; i++){ if(s[i] == 'o'){ price += 100; } } printf("%d\n", price); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291214/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291214/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 4 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 <4 x i8>, ptr %s, align 4, !tbaa !5 %1 = icmp eq <4 x i8> %0, <i8 111, i8 111, i8 111, i8 111> %2 = extractelement <4 x i1> %1, i64 0 %spec.select = select i1 %2, i32 800, i32 700 %add.1 = add nuw nsw i32 %spec.select, 100 %3 = extractelement <4 x i1> %1, i64 1 %spec.select.1 = select i1 %3, i32 %add.1, i32 %spec.select %add.2 = add nuw nsw i32 %spec.select.1, 100 %4 = extractelement <4 x i1> %1, i64 2 %spec.select.2 = select i1 %4, i32 %add.2, i32 %spec.select.1 %add.3 = add nuw nsw i32 %spec.select.2, 100 %5 = extractelement <4 x i1> %1, i64 3 %spec.select.3 = select i1 %5, i32 %add.3, i32 %spec.select.2 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.3) 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"}
// Aizu Vol0 0040: Affine Cipher // 2017.7.31 #include <stdio.h> #include <ctype.h> #include <string.h> #include <stdlib.h> char *gets(char *); #define M 26 #define MAX 700 #define EN(alpha, beta, a) ((alpha*a+beta) % M) int key[MAX]; short half[2][26][26]; char buf[500 + 5], *p, *w; int AT[] = { 1, 3, 5, 7, 9, 11, 15, 17, 19, 21, 23, 25, 0 }; char TR[M + 5]; int main() { int i, n; int a, b, t, h; int di, dd; // for dataset t = 't'-'a', h = 'h'-'a'; // th for (i = 0; AT[i]; i++) { a = AT[i]; for (b = 0; b < M; b++) { n = EN(a, b, t) * M + EN(a, b, h); if (key[n] > 0) while (1); key[n] = a * M + b; } } t = 'i'-'a', h ='s'-'a'; // th-is for (i = 0; AT[i]; i++) { a = AT[i]; for (b = 0; b < M; b++) { n = EN(a, b, t) * M + EN(a, b, h); half[0][a][b] = n; } } t = 'a'-'a', h = 't'-'a'; // th-at for (i = 0; AT[i]; i++) { a = AT[i]; for (b = 0; b < M; b++) { n = EN(a, b, t) * M + EN(a, b, h); half[1][a][b] = n; } } gets(buf); dd = atoi(buf); for (di = 0; di < dd; di++) { gets(p = buf); while (*p) { while (*p && !isalpha(*p)) p++; if (!*p) while (1); w = p; while (isalpha(*p)) p++; if (p - w == 4) { i = *w++ - 'a'; i = i * M + (*w++ - 'a'); if (key[i] > 0) { a = key[i] / M, b = key[i] % M; n = *w++ - 'a'; n = n * M + (*w - 'a'); if (half[0][a][b] == n || half[1][a][b] == n) break; } } } for (i = 0; i < M; i++) TR[EN(a, b, i)] = i+'a'; p = buf; while (*p) { while (*p && !isalpha(*p)) putchar(*p++); if (!*p) break; while (isalpha(*p)) putchar(TR[*p++ - 'a']); } putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291258/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291258/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" @AT = dso_local local_unnamed_addr global [13 x i32] [i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 15, i32 17, i32 19, i32 21, i32 23, i32 25, i32 0], align 16 @key = dso_local local_unnamed_addr global [700 x i32] zeroinitializer, align 16 @half = dso_local local_unnamed_addr global [2 x [26 x [26 x i16]]] zeroinitializer, align 16 @buf = dso_local global [505 x i8] zeroinitializer, align 16 @p = dso_local local_unnamed_addr global ptr null, align 8 @w = dso_local local_unnamed_addr global ptr null, align 8 @TR = dso_local local_unnamed_addr global [31 x i8] zeroinitializer, align 16 @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 i32, ptr @AT, align 16, !tbaa !5 %tobool.not286 = icmp eq i32 %0, 0 br i1 %tobool.not286, label %for.end77, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry, %for.inc17 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc17 ], [ 0, %entry ] %1 = phi i32 [ %3, %for.inc17 ], [ %0, %entry ] %mul = mul nsw i32 %1, 19 %mul6 = mul nsw i32 %1, 7 %mul13 = mul nsw i32 %1, 26 br label %for.body4 for.cond20.preheader: ; preds = %for.inc17 br i1 %tobool.not286, label %for.end77, label %for.cond27.preheader for.body4: ; preds = %for.cond3.preheader, %if.end %b.1285 = phi i32 [ 0, %for.cond3.preheader ], [ %inc, %if.end ] %add = add nsw i32 %b.1285, %mul %rem = srem i32 %add, 26 %mul5 = mul nsw i32 %rem, 26 %add7 = add nsw i32 %b.1285, %mul6 %rem8 = srem i32 %add7, 26 %add9 = add nsw i32 %mul5, %rem8 %idxprom10 = sext i32 %add9 to i64 %arrayidx11 = getelementptr inbounds [700 x i32], ptr @key, i64 0, i64 %idxprom10 %2 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %2, 0 br i1 %cmp12, label %while.cond, label %if.end while.cond: ; preds = %for.body4, %while.cond br label %while.cond if.end: ; preds = %for.body4 %add14 = add nsw i32 %b.1285, %mul13 store i32 %add14, ptr %arrayidx11, align 4, !tbaa !5 %inc = add nuw nsw i32 %b.1285, 1 %exitcond.not = icmp eq i32 %inc, 26 br i1 %exitcond.not, label %for.inc17, label %for.body4, !llvm.loop !9 for.inc17: ; preds = %if.end %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [13 x i32], ptr @AT, i64 0, i64 %indvars.iv.next %3 = load i32, ptr %arrayidx, align 4, !tbaa !5 %tobool.not = icmp eq i32 %3, 0 br i1 %tobool.not, label %for.cond20.preheader, label %for.cond3.preheader, !llvm.loop !11 for.cond27.preheader: ; preds = %for.cond20.preheader, %for.cond27.preheader %indvars.iv340 = phi i64 [ %indvars.iv.next341, %for.cond27.preheader ], [ 0, %for.cond20.preheader ] %4 = phi i32 [ %29, %for.cond27.preheader ], [ %0, %for.cond20.preheader ] %mul30 = shl nsw i32 %4, 3 %mul34 = mul nsw i32 %4, 18 %idxprom38 = sext i32 %4 to i64 %broadcast.splatinsert375 = insertelement <8 x i32> poison, i32 %mul34, i64 0 %broadcast.splat376 = shufflevector <8 x i32> %broadcast.splatinsert375, <8 x i32> poison, <8 x i32> zeroinitializer %broadcast.splatinsert = insertelement <8 x i32> poison, i32 %mul30, i64 0 %broadcast.splat = shufflevector <8 x i32> %broadcast.splatinsert, <8 x i32> poison, <8 x i32> zeroinitializer %5 = or <8 x i32> %broadcast.splat, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> %6 = srem <8 x i32> %5, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %7 = mul nsw <8 x i32> %6, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %8 = add nsw <8 x i32> %broadcast.splat376, <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7> %9 = srem <8 x i32> %8, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %10 = add nsw <8 x i32> %7, %9 %11 = trunc <8 x i32> %10 to <8 x i16> %12 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom38, i64 0 store <8 x i16> %11, ptr %12, align 4, !tbaa !12 %13 = add nsw <8 x i32> %broadcast.splat, <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> %14 = srem <8 x i32> %13, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %15 = mul nsw <8 x i32> %14, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %16 = add nsw <8 x i32> %broadcast.splat376, <i32 8, i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15> %17 = srem <8 x i32> %16, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %18 = add nsw <8 x i32> %15, %17 %19 = trunc <8 x i32> %18 to <8 x i16> %20 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom38, i64 8 store <8 x i16> %19, ptr %20, align 4, !tbaa !12 %21 = add nsw <8 x i32> %broadcast.splat, <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23> %22 = srem <8 x i32> %21, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %23 = mul nsw <8 x i32> %22, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %24 = add nsw <8 x i32> %broadcast.splat376, <i32 16, i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23> %25 = srem <8 x i32> %24, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %26 = add nsw <8 x i32> %23, %25 %27 = trunc <8 x i32> %26 to <8 x i16> %28 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom38, i64 16 store <8 x i16> %27, ptr %28, align 4, !tbaa !12 %add31 = add nsw i32 %mul30, 24 %rem32 = srem i32 %add31, 26 %mul33 = mul nsw i32 %rem32, 26 %add35 = add nsw i32 %mul34, 24 %rem36 = srem i32 %add35, 26 %add37 = add nsw i32 %mul33, %rem36 %conv = trunc i32 %add37 to i16 %arrayidx41 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom38, i64 24 store i16 %conv, ptr %arrayidx41, align 4, !tbaa !12 %add31.1 = add nsw i32 %mul30, 25 %rem32.1 = srem i32 %add31.1, 26 %mul33.1 = mul nsw i32 %rem32.1, 26 %add35.1 = add nsw i32 %mul34, 25 %rem36.1 = srem i32 %add35.1, 26 %add37.1 = add nsw i32 %mul33.1, %rem36.1 %conv.1 = trunc i32 %add37.1 to i16 %arrayidx41.1 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom38, i64 25 store i16 %conv.1, ptr %arrayidx41.1, align 2, !tbaa !12 %indvars.iv.next341 = add nuw nsw i64 %indvars.iv340, 1 %arrayidx22 = getelementptr inbounds [13 x i32], ptr @AT, i64 0, i64 %indvars.iv.next341 %29 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %tobool23.not = icmp eq i32 %29, 0 br i1 %tobool23.not, label %for.cond48.preheader, label %for.cond27.preheader, !llvm.loop !14 for.cond48.preheader: ; preds = %for.cond27.preheader br i1 %tobool.not286, label %for.end77, label %for.cond55.preheader for.cond55.preheader: ; preds = %for.cond48.preheader, %for.cond55.preheader %indvars.iv348 = phi i64 [ %indvars.iv.next349, %for.cond55.preheader ], [ 0, %for.cond48.preheader ] %30 = phi i32 [ %46, %for.cond55.preheader ], [ %0, %for.cond48.preheader ] %mul63 = mul nsw i32 %30, 19 %idxprom68 = sext i32 %30 to i64 %rem65 = srem i32 %mul63, 26 %conv67 = trunc i32 %rem65 to i16 %arrayidx71 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom68, i64 0 store i16 %conv67, ptr %arrayidx71, align 4, !tbaa !12 %arrayidx71.1 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom68, i64 1 %31 = insertelement <8 x i32> poison, i32 %mul63, i64 0 %32 = shufflevector <8 x i32> %31, <8 x i32> poison, <8 x i32> zeroinitializer %33 = add nsw <8 x i32> %32, <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8> %34 = srem <8 x i32> %33, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %35 = trunc <8 x i32> %34 to <8 x i16> %36 = add nsw <8 x i16> %35, <i16 26, i16 52, i16 78, i16 104, i16 130, i16 156, i16 182, i16 208> store <8 x i16> %36, ptr %arrayidx71.1, align 2, !tbaa !12 %arrayidx71.9 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom68, i64 9 %37 = add nsw <8 x i32> %32, <i32 9, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 16> %38 = srem <8 x i32> %37, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %39 = trunc <8 x i32> %38 to <8 x i16> %40 = add nsw <8 x i16> %39, <i16 234, i16 260, i16 286, i16 312, i16 338, i16 364, i16 390, i16 416> store <8 x i16> %40, ptr %arrayidx71.9, align 2, !tbaa !12 %arrayidx71.17 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom68, i64 17 %41 = add nsw <8 x i32> %32, <i32 17, i32 18, i32 19, i32 20, i32 21, i32 22, i32 23, i32 24> %42 = srem <8 x i32> %41, <i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26, i32 26> %43 = trunc <8 x i32> %42 to <8 x i16> %44 = add nsw <8 x i16> %43, <i16 442, i16 468, i16 494, i16 520, i16 546, i16 572, i16 598, i16 624> store <8 x i16> %44, ptr %arrayidx71.17, align 2, !tbaa !12 %add64.25 = add nsw i32 %mul63, 25 %rem65.25 = srem i32 %add64.25, 26 %45 = trunc i32 %rem65.25 to i16 %conv67.25 = add nsw i16 %45, 650 %arrayidx71.25 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom68, i64 25 store i16 %conv67.25, ptr %arrayidx71.25, align 2, !tbaa !12 %indvars.iv.next349 = add nuw nsw i64 %indvars.iv348, 1 %arrayidx50 = getelementptr inbounds [13 x i32], ptr @AT, i64 0, i64 %indvars.iv.next349 %46 = load i32, ptr %arrayidx50, align 4, !tbaa !5 %tobool51.not = icmp eq i32 %46, 0 br i1 %tobool51.not, label %for.end77, label %for.cond55.preheader, !llvm.loop !15 for.end77: ; preds = %for.cond55.preheader, %entry, %for.cond20.preheader, %for.cond48.preheader %a.2.lcssa = phi i32 [ %4, %for.cond48.preheader ], [ %1, %for.cond20.preheader ], [ undef, %entry ], [ %30, %for.cond55.preheader ] %call = tail call ptr @gets(ptr noundef nonnull @buf) %call.i = tail call i64 @strtol(ptr nocapture noundef nonnull @buf, ptr noundef null, i32 noundef 10) #4 %conv.i = trunc i64 %call.i to i32 %cmp80324 = icmp sgt i32 %conv.i, 0 br i1 %cmp80324, label %for.body82, label %for.end218 for.body82: ; preds = %for.end77, %while.end214 %di.0327 = phi i32 [ %inc217, %while.end214 ], [ 0, %for.end77 ] %b.6326 = phi i32 [ %b.9, %while.end214 ], [ 26, %for.end77 ] %a.3325 = phi i32 [ %a.6, %while.end214 ], [ %a.2.lcssa, %for.end77 ] store ptr @buf, ptr @p, align 8, !tbaa !16 %call83 = tail call ptr @gets(ptr noundef nonnull @buf) %p.promoted306 = load ptr, ptr @p, align 8, !tbaa !16 %47 = load i8, ptr %p.promoted306, align 1, !tbaa !18 %tobool85.not309 = icmp eq i8 %47, 0 br i1 %tobool85.not309, label %while.end158, label %while.cond87.preheader.preheader while.cond87.preheader.preheader: ; preds = %for.body82 %call90 = tail call ptr @__ctype_b_loc() #5 br label %land.rhs.lr.ph land.rhs.lr.ph: ; preds = %if.end157, %while.cond87.preheader.preheader %48 = phi i8 [ %75, %if.end157 ], [ %47, %while.cond87.preheader.preheader ] %b.7311 = phi i32 [ %b.8, %if.end157 ], [ %b.6326, %while.cond87.preheader.preheader ] %a.4310 = phi i32 [ %a.5, %if.end157 ], [ %a.3325, %while.cond87.preheader.preheader ] %49 = phi ptr [ %65, %if.end157 ], [ %p.promoted306, %while.cond87.preheader.preheader ] br label %land.rhs land.rhs: ; preds = %land.rhs.lr.ph, %while.body96 %50 = phi ptr [ %49, %land.rhs.lr.ph ], [ %incdec.ptr, %while.body96 ] %51 = phi i8 [ %48, %land.rhs.lr.ph ], [ %55, %while.body96 ] %52 = load ptr, ptr %call90, align 8, !tbaa !16 %idxprom92 = sext i8 %51 to i64 %arrayidx93 = getelementptr inbounds i16, ptr %52, i64 %idxprom92 %53 = load i16, ptr %arrayidx93, align 2, !tbaa !12 %54 = and i16 %53, 1024 %tobool95.not = icmp eq i16 %54, 0 br i1 %tobool95.not, label %while.body96, label %if.end101 while.body96: ; preds = %land.rhs %incdec.ptr = getelementptr inbounds i8, ptr %50, i64 1 store ptr %incdec.ptr, ptr @p, align 8, !tbaa !16 %55 = load i8, ptr %incdec.ptr, align 1, !tbaa !18 %tobool89.not = icmp eq i8 %55, 0 br i1 %tobool89.not, label %while.cond99, label %land.rhs, !llvm.loop !19 while.cond99: ; preds = %while.body96, %while.cond99 br label %while.cond99 if.end101: ; preds = %land.rhs store ptr %50, ptr @w, align 8, !tbaa !16 %56 = load ptr, ptr %call90, align 8, !tbaa !16 %57 = load i8, ptr %50, align 1, !tbaa !18 %idxprom105302 = sext i8 %57 to i64 %arrayidx106303 = getelementptr inbounds i16, ptr %56, i64 %idxprom105302 %58 = load i16, ptr %arrayidx106303, align 2, !tbaa !12 %59 = and i16 %58, 1024 %tobool109.not304 = icmp eq i16 %59, 0 br i1 %tobool109.not304, label %while.end112, label %while.body110 while.body110: ; preds = %if.end101, %while.body110 %60 = phi ptr [ %incdec.ptr111, %while.body110 ], [ %50, %if.end101 ] %incdec.ptr111 = getelementptr inbounds i8, ptr %60, i64 1 store ptr %incdec.ptr111, ptr @p, align 8, !tbaa !16 %61 = load ptr, ptr %call90, align 8, !tbaa !16 %62 = load i8, ptr %incdec.ptr111, align 1, !tbaa !18 %idxprom105 = sext i8 %62 to i64 %arrayidx106 = getelementptr inbounds i16, ptr %61, i64 %idxprom105 %63 = load i16, ptr %arrayidx106, align 2, !tbaa !12 %64 = and i16 %63, 1024 %tobool109.not = icmp eq i16 %64, 0 br i1 %tobool109.not, label %while.end112, label %while.body110, !llvm.loop !20 while.end112: ; preds = %while.body110, %if.end101 %65 = phi ptr [ %50, %if.end101 ], [ %incdec.ptr111, %while.body110 ] %sub.ptr.lhs.cast = ptrtoint ptr %65 to i64 %sub.ptr.rhs.cast = ptrtoint ptr %50 to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %cmp113 = icmp eq i64 %sub.ptr.sub, 4 br i1 %cmp113, label %if.then115, label %if.end157 if.then115: ; preds = %while.end112 %incdec.ptr116 = getelementptr inbounds i8, ptr %50, i64 1 store ptr %incdec.ptr116, ptr @w, align 8, !tbaa !16 %66 = load i8, ptr %50, align 1, !tbaa !18 %conv117 = sext i8 %66 to i64 %67 = mul nsw i64 %conv117, 26 %incdec.ptr119 = getelementptr inbounds i8, ptr %50, i64 2 store ptr %incdec.ptr119, ptr @w, align 8, !tbaa !16 %68 = load i8, ptr %incdec.ptr116, align 1, !tbaa !18 %conv120 = sext i8 %68 to i64 %sub121 = add nsw i64 %67, -2619 %add122 = add nsw i64 %sub121, %conv120 %arrayidx124 = getelementptr inbounds [700 x i32], ptr @key, i64 0, i64 %add122 %69 = load i32, ptr %arrayidx124, align 4, !tbaa !5 %cmp125 = icmp sgt i32 %69, 0 br i1 %cmp125, label %if.then127, label %if.end157 if.then127: ; preds = %if.then115 %div = udiv i32 %69, 26 %rem132 = urem i32 %69, 26 %incdec.ptr133 = getelementptr inbounds i8, ptr %50, i64 3 store ptr %incdec.ptr133, ptr @w, align 8, !tbaa !16 %70 = load i8, ptr %incdec.ptr119, align 1, !tbaa !18 %conv134 = sext i8 %70 to i32 %71 = mul nsw i32 %conv134, 26 %72 = load i8, ptr %incdec.ptr133, align 1, !tbaa !18 %conv137 = sext i8 %72 to i32 %sub138 = add nsw i32 %conv137, -2619 %add139 = add nsw i32 %sub138, %71 %idxprom140 = zext i32 %div to i64 %idxprom142 = zext i32 %rem132 to i64 %arrayidx143 = getelementptr inbounds [26 x [26 x i16]], ptr @half, i64 0, i64 %idxprom140, i64 %idxprom142 %73 = load i16, ptr %arrayidx143, align 2, !tbaa !12 %conv144 = sext i16 %73 to i32 %cmp145 = icmp eq i32 %add139, %conv144 br i1 %cmp145, label %while.end158, label %lor.lhs.false lor.lhs.false: ; preds = %if.then127 %arrayidx150 = getelementptr inbounds [2 x [26 x [26 x i16]]], ptr @half, i64 0, i64 1, i64 %idxprom140, i64 %idxprom142 %74 = load i16, ptr %arrayidx150, align 2, !tbaa !12 %conv151 = sext i16 %74 to i32 %cmp152 = icmp eq i32 %add139, %conv151 br i1 %cmp152, label %while.end158, label %if.end157 if.end157: ; preds = %if.then115, %lor.lhs.false, %while.end112 %a.5 = phi i32 [ %div, %lor.lhs.false ], [ %a.4310, %if.then115 ], [ %a.4310, %while.end112 ] %b.8 = phi i32 [ %rem132, %lor.lhs.false ], [ %b.7311, %if.then115 ], [ %b.7311, %while.end112 ] %75 = load i8, ptr %65, align 1, !tbaa !18 %tobool85.not = icmp eq i8 %75, 0 br i1 %tobool85.not, label %while.end158, label %land.rhs.lr.ph, !llvm.loop !21 while.end158: ; preds = %if.end157, %lor.lhs.false, %if.then127, %for.body82 %a.6 = phi i32 [ %a.3325, %for.body82 ], [ %div, %if.then127 ], [ %div, %lor.lhs.false ], [ %a.5, %if.end157 ] %b.9 = phi i32 [ %b.6326, %for.body82 ], [ %rem132, %if.then127 ], [ %rem132, %lor.lhs.false ], [ %b.8, %if.end157 ] %rem167 = urem i32 %b.9, 26 %idxprom168 = zext i32 %rem167 to i64 %arrayidx169 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168 store i8 97, ptr %arrayidx169, align 1, !tbaa !18 %add166.1 = add nsw i32 %a.6, %b.9 %rem167.1 = srem i32 %add166.1, 26 %idxprom168.1 = sext i32 %rem167.1 to i64 %arrayidx169.1 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.1 store i8 98, ptr %arrayidx169.1, align 1, !tbaa !18 %mul165.2 = shl nsw i32 %a.6, 1 %add166.2 = add nsw i32 %mul165.2, %b.9 %rem167.2 = srem i32 %add166.2, 26 %idxprom168.2 = sext i32 %rem167.2 to i64 %arrayidx169.2 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.2 store i8 99, ptr %arrayidx169.2, align 1, !tbaa !18 %mul165.3 = mul nsw i32 %a.6, 3 %add166.3 = add nsw i32 %mul165.3, %b.9 %rem167.3 = srem i32 %add166.3, 26 %idxprom168.3 = sext i32 %rem167.3 to i64 %arrayidx169.3 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.3 store i8 100, ptr %arrayidx169.3, align 1, !tbaa !18 %mul165.4 = shl nsw i32 %a.6, 2 %add166.4 = add nsw i32 %mul165.4, %b.9 %rem167.4 = srem i32 %add166.4, 26 %idxprom168.4 = sext i32 %rem167.4 to i64 %arrayidx169.4 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.4 store i8 101, ptr %arrayidx169.4, align 1, !tbaa !18 %mul165.5 = mul nsw i32 %a.6, 5 %add166.5 = add nsw i32 %mul165.5, %b.9 %rem167.5 = srem i32 %add166.5, 26 %idxprom168.5 = sext i32 %rem167.5 to i64 %arrayidx169.5 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.5 store i8 102, ptr %arrayidx169.5, align 1, !tbaa !18 %mul165.6 = mul nsw i32 %a.6, 6 %add166.6 = add nsw i32 %mul165.6, %b.9 %rem167.6 = srem i32 %add166.6, 26 %idxprom168.6 = sext i32 %rem167.6 to i64 %arrayidx169.6 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.6 store i8 103, ptr %arrayidx169.6, align 1, !tbaa !18 %mul165.7 = mul nsw i32 %a.6, 7 %add166.7 = add nsw i32 %mul165.7, %b.9 %rem167.7 = srem i32 %add166.7, 26 %idxprom168.7 = sext i32 %rem167.7 to i64 %arrayidx169.7 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.7 store i8 104, ptr %arrayidx169.7, align 1, !tbaa !18 %mul165.8 = shl nsw i32 %a.6, 3 %add166.8 = add nsw i32 %mul165.8, %b.9 %rem167.8 = srem i32 %add166.8, 26 %idxprom168.8 = sext i32 %rem167.8 to i64 %arrayidx169.8 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.8 store i8 105, ptr %arrayidx169.8, align 1, !tbaa !18 %mul165.9 = mul nsw i32 %a.6, 9 %add166.9 = add nsw i32 %mul165.9, %b.9 %rem167.9 = srem i32 %add166.9, 26 %idxprom168.9 = sext i32 %rem167.9 to i64 %arrayidx169.9 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.9 store i8 106, ptr %arrayidx169.9, align 1, !tbaa !18 %mul165.10 = mul nsw i32 %a.6, 10 %add166.10 = add nsw i32 %mul165.10, %b.9 %rem167.10 = srem i32 %add166.10, 26 %idxprom168.10 = sext i32 %rem167.10 to i64 %arrayidx169.10 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.10 store i8 107, ptr %arrayidx169.10, align 1, !tbaa !18 %mul165.11 = mul nsw i32 %a.6, 11 %add166.11 = add nsw i32 %mul165.11, %b.9 %rem167.11 = srem i32 %add166.11, 26 %idxprom168.11 = sext i32 %rem167.11 to i64 %arrayidx169.11 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.11 store i8 108, ptr %arrayidx169.11, align 1, !tbaa !18 %mul165.12 = mul nsw i32 %a.6, 12 %add166.12 = add nsw i32 %mul165.12, %b.9 %rem167.12 = srem i32 %add166.12, 26 %idxprom168.12 = sext i32 %rem167.12 to i64 %arrayidx169.12 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.12 store i8 109, ptr %arrayidx169.12, align 1, !tbaa !18 %mul165.13 = mul nsw i32 %a.6, 13 %add166.13 = add nsw i32 %mul165.13, %b.9 %rem167.13 = srem i32 %add166.13, 26 %idxprom168.13 = sext i32 %rem167.13 to i64 %arrayidx169.13 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.13 store i8 110, ptr %arrayidx169.13, align 1, !tbaa !18 %mul165.14 = mul nsw i32 %a.6, 14 %add166.14 = add nsw i32 %mul165.14, %b.9 %rem167.14 = srem i32 %add166.14, 26 %idxprom168.14 = sext i32 %rem167.14 to i64 %arrayidx169.14 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.14 store i8 111, ptr %arrayidx169.14, align 1, !tbaa !18 %mul165.15 = mul nsw i32 %a.6, 15 %add166.15 = add nsw i32 %mul165.15, %b.9 %rem167.15 = srem i32 %add166.15, 26 %idxprom168.15 = sext i32 %rem167.15 to i64 %arrayidx169.15 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.15 store i8 112, ptr %arrayidx169.15, align 1, !tbaa !18 %mul165.16 = shl nsw i32 %a.6, 4 %add166.16 = add nsw i32 %mul165.16, %b.9 %rem167.16 = srem i32 %add166.16, 26 %idxprom168.16 = sext i32 %rem167.16 to i64 %arrayidx169.16 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.16 store i8 113, ptr %arrayidx169.16, align 1, !tbaa !18 %mul165.17 = mul nsw i32 %a.6, 17 %add166.17 = add nsw i32 %mul165.17, %b.9 %rem167.17 = srem i32 %add166.17, 26 %idxprom168.17 = sext i32 %rem167.17 to i64 %arrayidx169.17 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.17 store i8 114, ptr %arrayidx169.17, align 1, !tbaa !18 %mul165.18 = mul nsw i32 %a.6, 18 %add166.18 = add nsw i32 %mul165.18, %b.9 %rem167.18 = srem i32 %add166.18, 26 %idxprom168.18 = sext i32 %rem167.18 to i64 %arrayidx169.18 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.18 store i8 115, ptr %arrayidx169.18, align 1, !tbaa !18 %mul165.19 = mul nsw i32 %a.6, 19 %add166.19 = add nsw i32 %mul165.19, %b.9 %rem167.19 = srem i32 %add166.19, 26 %idxprom168.19 = sext i32 %rem167.19 to i64 %arrayidx169.19 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.19 store i8 116, ptr %arrayidx169.19, align 1, !tbaa !18 %mul165.20 = mul nsw i32 %a.6, 20 %add166.20 = add nsw i32 %mul165.20, %b.9 %rem167.20 = srem i32 %add166.20, 26 %idxprom168.20 = sext i32 %rem167.20 to i64 %arrayidx169.20 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.20 store i8 117, ptr %arrayidx169.20, align 1, !tbaa !18 %mul165.21 = mul nsw i32 %a.6, 21 %add166.21 = add nsw i32 %mul165.21, %b.9 %rem167.21 = srem i32 %add166.21, 26 %idxprom168.21 = sext i32 %rem167.21 to i64 %arrayidx169.21 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.21 store i8 118, ptr %arrayidx169.21, align 1, !tbaa !18 %mul165.22 = mul nsw i32 %a.6, 22 %add166.22 = add nsw i32 %mul165.22, %b.9 %rem167.22 = srem i32 %add166.22, 26 %idxprom168.22 = sext i32 %rem167.22 to i64 %arrayidx169.22 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.22 store i8 119, ptr %arrayidx169.22, align 1, !tbaa !18 %mul165.23 = mul nsw i32 %a.6, 23 %add166.23 = add nsw i32 %mul165.23, %b.9 %rem167.23 = srem i32 %add166.23, 26 %idxprom168.23 = sext i32 %rem167.23 to i64 %arrayidx169.23 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.23 store i8 120, ptr %arrayidx169.23, align 1, !tbaa !18 %mul165.24 = mul nsw i32 %a.6, 24 %add166.24 = add nsw i32 %mul165.24, %b.9 %rem167.24 = srem i32 %add166.24, 26 %idxprom168.24 = sext i32 %rem167.24 to i64 %arrayidx169.24 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.24 store i8 121, ptr %arrayidx169.24, align 1, !tbaa !18 %mul165.25 = mul nsw i32 %a.6, 25 %add166.25 = add nsw i32 %mul165.25, %b.9 %rem167.25 = srem i32 %add166.25, 26 %idxprom168.25 = sext i32 %rem167.25 to i64 %arrayidx169.25 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %idxprom168.25 store i8 122, ptr %arrayidx169.25, align 1, !tbaa !18 store ptr @buf, ptr @p, align 8, !tbaa !16 %76 = load i8, ptr @buf, align 16, !tbaa !18 %tobool174.not323 = icmp eq i8 %76, 0 br i1 %tobool174.not323, label %while.end214, label %while.cond176.preheader.preheader while.cond176.preheader.preheader: ; preds = %while.end158 %call180 = tail call ptr @__ctype_b_loc() #5 br label %land.rhs179 while.cond173.loopexit: ; preds = %while.body205 %tobool174.not = icmp eq i8 %92, 0 br i1 %tobool174.not, label %while.end214, label %land.rhs179.backedge land.rhs179: ; preds = %land.rhs179.backedge, %while.cond176.preheader.preheader %77 = phi i8 [ %76, %while.cond176.preheader.preheader ], [ %.be, %land.rhs179.backedge ] %78 = phi ptr [ @buf, %while.cond176.preheader.preheader ], [ %.be377, %land.rhs179.backedge ] %79 = load ptr, ptr %call180, align 8, !tbaa !16 %idxprom182 = sext i8 %77 to i64 %arrayidx183 = getelementptr inbounds i16, ptr %79, i64 %idxprom182 %80 = load i16, ptr %arrayidx183, align 2, !tbaa !12 %81 = and i16 %80, 1024 %tobool186.not = icmp eq i16 %81, 0 br i1 %tobool186.not, label %while.body189, label %while.body205 while.body189: ; preds = %land.rhs179 %incdec.ptr190 = getelementptr inbounds i8, ptr %78, i64 1 store ptr %incdec.ptr190, ptr @p, align 8, !tbaa !16 %82 = load i8, ptr %78, align 1, !tbaa !18 %conv191 = sext i8 %82 to i32 %83 = load ptr, ptr @stdout, align 8, !tbaa !16 %call.i277 = tail call i32 @putc(i32 noundef %conv191, ptr noundef %83) %84 = load ptr, ptr @p, align 8, !tbaa !16 %85 = load i8, ptr %84, align 1, !tbaa !18 %tobool178.not = icmp eq i8 %85, 0 br i1 %tobool178.not, label %while.end214, label %land.rhs179.backedge land.rhs179.backedge: ; preds = %while.body189, %while.cond173.loopexit %.be = phi i8 [ %85, %while.body189 ], [ %92, %while.cond173.loopexit ] %.be377 = phi ptr [ %84, %while.body189 ], [ %91, %while.cond173.loopexit ] br label %land.rhs179, !llvm.loop !22 while.body205: ; preds = %land.rhs179, %while.body205 %86 = phi ptr [ %91, %while.body205 ], [ %78, %land.rhs179 ] %incdec.ptr206 = getelementptr inbounds i8, ptr %86, i64 1 store ptr %incdec.ptr206, ptr @p, align 8, !tbaa !16 %87 = load i8, ptr %86, align 1, !tbaa !18 %conv207 = sext i8 %87 to i64 %sub208 = add nsw i64 %conv207, -97 %arrayidx210 = getelementptr inbounds [31 x i8], ptr @TR, i64 0, i64 %sub208 %88 = load i8, ptr %arrayidx210, align 1, !tbaa !18 %conv211 = sext i8 %88 to i32 %89 = load ptr, ptr @stdout, align 8, !tbaa !16 %call.i278 = tail call i32 @putc(i32 noundef %conv211, ptr noundef %89) %90 = load ptr, ptr %call180, align 8, !tbaa !16 %91 = load ptr, ptr @p, align 8, !tbaa !16 %92 = load i8, ptr %91, align 1, !tbaa !18 %idxprom200 = sext i8 %92 to i64 %arrayidx201 = getelementptr inbounds i16, ptr %90, i64 %idxprom200 %93 = load i16, ptr %arrayidx201, align 2, !tbaa !12 %94 = and i16 %93, 1024 %tobool204.not = icmp eq i16 %94, 0 br i1 %tobool204.not, label %while.cond173.loopexit, label %while.body205, !llvm.loop !23 while.end214: ; preds = %while.cond173.loopexit, %while.body189, %while.end158 %95 = load ptr, ptr @stdout, align 8, !tbaa !16 %call.i279 = tail call i32 @putc(i32 noundef 10, ptr noundef %95) %inc217 = add nuw nsw i32 %di.0327, 1 %exitcond352.not = icmp eq i32 %inc217, %conv.i br i1 %exitcond352.not, label %for.end218, label %for.body82, !llvm.loop !24 for.end218: ; preds = %while.end214, %for.end77 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef ptr @gets(ptr noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) declare ptr @__ctype_b_loc() local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #3 ; 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" } attributes #2 = { 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 #3 = { 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 #4 = { nounwind } attributes #5 = { 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 = !{!"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 = !{!"short", !7, i64 0} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = !{!17, !17, i64 0} !17 = !{!"any pointer", !7, i64 0} !18 = !{!7, !7, i64 0} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10} !22 = distinct !{!22, !10} !23 = distinct !{!23, !10} !24 = distinct !{!24, !10}
#include<stdio.h> int DP[101][10001],N,W,v[101],w[101]; int max(int x,int y) { return x > y ? x : y; } int dp(int n,int weight) { if(DP[n][weight] != -1) return DP[n][weight]; else if ( weight - w[n] >= 0) return DP[n][weight] = max(dp(n-1,weight),dp(n-1,weight-w[n])+v[n]); else return DP[n][weight] = dp(n-1,weight); } int main() { int i,j; scanf("%d %d",&N,&W); for(i=1;i<=N;i++) scanf("%d %d",&v[i],&w[i]); for(i=0;i<=W;i++) DP[0][i] = 0; for(i=1;i<=N;i++) for(j=0;j<=W;j++) DP[i][j] = -1; printf("%d\n",dp(N,W)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291315/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" @DP = dso_local local_unnamed_addr global [101 x [10001 x i32]] zeroinitializer, align 16 @w = dso_local global [101 x i32] zeroinitializer, align 16 @v = dso_local global [101 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @N = dso_local global i32 0, align 4 @W = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %x, i32 noundef %y) local_unnamed_addr #0 { entry: %cond = tail call i32 @llvm.smax.i32(i32 %x, i32 %y) ret i32 %cond } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @dp(i32 noundef %n, i32 noundef %weight) local_unnamed_addr #1 { entry: %idxprom = sext i32 %n to i64 %idxprom1 = sext i32 %weight to i64 %arrayidx2 = getelementptr inbounds [101 x [10001 x i32]], ptr @DP, i64 0, i64 %idxprom, i64 %idxprom1 %0 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp.not = icmp eq i32 %0, -1 br i1 %cmp.not, label %if.else, label %common.ret if.else: ; preds = %entry %arrayidx8 = getelementptr inbounds [101 x i32], ptr @w, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %cmp9.not = icmp sgt i32 %1, %weight %sub25 = add nsw i32 %n, -1 %call26 = tail call i32 @dp(i32 noundef %sub25, i32 noundef %weight) br i1 %cmp9.not, label %common.ret.sink.split, label %if.then10 common.ret.sink.split: ; preds = %if.else, %if.then10 %call26.sink = phi i32 [ %cond.i, %if.then10 ], [ %call26, %if.else ] store i32 %call26.sink, ptr %arrayidx2, align 4, !tbaa !5 br label %common.ret common.ret: ; preds = %common.ret.sink.split, %entry %common.ret.op = phi i32 [ %0, %entry ], [ %call26.sink, %common.ret.sink.split ] ret i32 %common.ret.op if.then10: ; preds = %if.else %2 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %sub15 = sub nsw i32 %weight, %2 %call16 = tail call i32 @dp(i32 noundef %sub25, i32 noundef %sub15) %arrayidx18 = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %idxprom %3 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %add = add nsw i32 %3, %call16 %cond.i = tail call i32 @llvm.smax.i32(i32 %call26, i32 %add) br label %common.ret.sink.split } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull @W) %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp.not42 = icmp slt i32 %0, 1 br i1 %cmp.not42, label %for.cond4.preheader, label %for.body for.cond4.preheader: ; preds = %for.body, %entry %.lcssa41 = phi i32 [ %0, %entry ], [ %2, %for.body ] %1 = load i32, ptr @W, align 4, !tbaa !5 %cmp5.not44 = icmp slt i32 %1, 0 br i1 %cmp5.not44, label %for.end27, label %for.cond12.preheader.thread for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [101 x i32], ptr @v, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [101 x i32], ptr @w, i64 0, i64 %indvars.iv %call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %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.cond4.preheader, !llvm.loop !9 for.cond12.preheader.thread: ; preds = %for.cond4.preheader %4 = add nuw i32 %1, 1 %5 = zext i32 %4 to i64 %6 = shl nuw nsw i64 %5, 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) @DP, i8 0, i64 %6, i1 false), !tbaa !5 %cmp13.not4959 = icmp slt i32 %.lcssa41, 1 br i1 %cmp13.not4959, label %for.end27, label %for.cond15.preheader.preheader for.cond15.preheader.preheader: ; preds = %for.cond12.preheader.thread %7 = add nuw i32 %1, 1 %8 = zext i32 %7 to i64 %9 = shl nuw nsw i64 %8, 2 %wide.trip.count = zext i32 %.lcssa41 to i64 %xtraiter = and i64 %wide.trip.count, 7 %10 = icmp ult i32 %.lcssa41, 8 br i1 %10, label %for.end27.loopexit.unr-lcssa, label %for.cond15.preheader.preheader.new for.cond15.preheader.preheader.new: ; preds = %for.cond15.preheader.preheader %unroll_iter = and i64 %wide.trip.count, 4294967288 br label %for.cond15.preheader for.cond15.preheader: ; preds = %for.cond15.preheader, %for.cond15.preheader.preheader.new %indvar = phi i64 [ 0, %for.cond15.preheader.preheader.new ], [ %indvar.next.7, %for.cond15.preheader ] %niter = phi i64 [ 0, %for.cond15.preheader.preheader.new ], [ %niter.next.7, %for.cond15.preheader ] %11 = mul nuw nsw i64 %indvar, 40004 %gep = getelementptr i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 %11 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %gep, i8 -1, i64 %9, i1 false), !tbaa !5 %12 = mul nuw i64 %indvar, 40004 %gep60 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 40004), i64 %12 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep60, i8 -1, i64 %9, i1 false), !tbaa !5 %13 = mul nuw i64 %indvar, 40004 %gep61 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 80008), i64 %13 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %gep61, i8 -1, i64 %9, i1 false), !tbaa !5 %14 = mul nuw i64 %indvar, 40004 %gep62 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 120012), i64 %14 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep62, i8 -1, i64 %9, i1 false), !tbaa !5 %15 = mul nuw i64 %indvar, 40004 %gep63 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 160016), i64 %15 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %gep63, i8 -1, i64 %9, i1 false), !tbaa !5 %16 = mul nuw i64 %indvar, 40004 %gep64 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 200020), i64 %16 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %gep64, i8 -1, i64 %9, i1 false), !tbaa !5 %17 = mul nuw i64 %indvar, 40004 %gep65 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 240024), i64 %17 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %gep65, i8 -1, i64 %9, i1 false), !tbaa !5 %18 = mul nuw i64 %indvar, 40004 %gep66 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 280028), i64 %18 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %gep66, i8 -1, i64 %9, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end27.loopexit.unr-lcssa, label %for.cond15.preheader, !llvm.loop !11 for.end27.loopexit.unr-lcssa: ; preds = %for.cond15.preheader, %for.cond15.preheader.preheader %indvar.unr = phi i64 [ 0, %for.cond15.preheader.preheader ], [ %indvar.next.7, %for.cond15.preheader ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end27, label %for.cond15.preheader.epil for.cond15.preheader.epil: ; preds = %for.end27.loopexit.unr-lcssa, %for.cond15.preheader.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond15.preheader.epil ], [ %indvar.unr, %for.end27.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond15.preheader.epil ], [ 0, %for.end27.loopexit.unr-lcssa ] %19 = mul nuw nsw i64 %indvar.epil, 40004 %gep.epil = getelementptr i8, ptr getelementptr inbounds ([101 x [10001 x i32]], ptr @DP, i64 0, i64 1, i64 0), i64 %19 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %gep.epil, i8 -1, i64 %9, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.end27, label %for.cond15.preheader.epil, !llvm.loop !12 for.end27: ; preds = %for.end27.loopexit.unr-lcssa, %for.cond15.preheader.epil, %for.cond4.preheader, %for.cond12.preheader.thread %call28 = tail call i32 @dp(i32 noundef %.lcssa41, i32 noundef %1) %call29 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %call28) ret i32 0 } ; 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: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #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 = { 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 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 #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { 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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.unroll.disable"}
#include<stdio.h> int d[10000][1500]={0}; int main(){ int n,m,i,j,s,t,k,a; while(scanf("%*d %d",&n),n){ for(i=0;i<n;i++){ for(j=500;j<=1270;j++)d[i][j]=0; } scanf("%d",&k); while(k--){ scanf("%d %*d %d %d",&m,&i,&j); d[i][m]+=(j%2)*2-1; } scanf("%d",&k); while(k--){ scanf("%d %d %d",&s,&t,&m); for(i=a=j=0;i<1300;i++){ j+=d[m][i];//printf("%d ",j); if(s<=i&&i<t&&j>0)a++; } printf("%d\n",a); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291359/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" @d = dso_local local_unnamed_addr global [10000 x [1500 x i32]] zeroinitializer, align 16 @.str = private unnamed_addr constant [7 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 [13 x i8] c"%d %*d %d %d\00", align 1 @.str.3 = private unnamed_addr constant [9 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 %i = alloca i32, align 4 %j = alloca i32, align 4 %s = alloca i32, align 4 %t = 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 %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 %call59 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not60 = icmp eq i32 %0, 0 br i1 %tobool.not60, label %while.end42, label %for.cond.preheader while.cond.loopexit: ; preds = %for.end39, %while.end %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %1, 0 br i1 %tobool.not, label %while.end42, label %for.cond.preheader, !llvm.loop !9 for.cond.preheader: ; preds = %entry, %while.cond.loopexit %2 = phi i32 [ %1, %while.cond.loopexit ], [ %0, %entry ] %cmp49 = icmp sgt i32 %2, 0 br i1 %cmp49, label %for.cond1.preheader.preheader, label %for.end8 for.cond1.preheader.preheader: ; preds = %for.cond.preheader %wide.trip.count = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count, 7 %3 = icmp ult i32 %2, 8 br i1 %3, label %for.cond.for.end8_crit_edge.unr-lcssa, label %for.cond1.preheader.preheader.new for.cond1.preheader.preheader.new: ; preds = %for.cond1.preheader.preheader %unroll_iter = and i64 %wide.trip.count, 4294967288 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %indvar.next.7, %for.cond1.preheader ] %niter = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %niter.next.7, %for.cond1.preheader ] %4 = mul nuw nsw i64 %indvar, 6000 %gep = getelementptr i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 %4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep, i8 0, i64 3084, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 6000 %gep65 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 6000), i64 %5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep65, i8 0, i64 3084, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 6000 %gep66 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 12000), i64 %6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep66, i8 0, i64 3084, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 6000 %gep67 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 18000), i64 %7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep67, i8 0, i64 3084, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 6000 %gep68 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 24000), i64 %8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep68, i8 0, i64 3084, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 6000 %gep69 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 30000), i64 %9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep69, i8 0, i64 3084, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 6000 %gep70 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 36000), i64 %10 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep70, i8 0, i64 3084, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 6000 %gep71 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 42000), i64 %11 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep71, i8 0, i64 3084, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond.for.end8_crit_edge.unr-lcssa, label %for.cond1.preheader, !llvm.loop !11 for.cond.for.end8_crit_edge.unr-lcssa: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.preheader ], [ %indvar.next.7, %for.cond1.preheader ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.for.end8_crit_edge, label %for.cond1.preheader.epil for.cond1.preheader.epil: ; preds = %for.cond.for.end8_crit_edge.unr-lcssa, %for.cond1.preheader.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.epil ], [ %indvar.unr, %for.cond.for.end8_crit_edge.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.epil ], [ 0, %for.cond.for.end8_crit_edge.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 6000 %gep.epil = getelementptr i8, ptr getelementptr inbounds ([10000 x [1500 x i32]], ptr @d, i64 0, i64 0, i64 500), i64 %12 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3084) %gep.epil, i8 0, i64 3084, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond.for.end8_crit_edge, label %for.cond1.preheader.epil, !llvm.loop !12 for.cond.for.end8_crit_edge: ; preds = %for.cond1.preheader.epil, %for.cond.for.end8_crit_edge.unr-lcssa store i32 1271, ptr %j, align 4, !tbaa !5 br label %for.end8 for.end8: ; preds = %for.cond.for.end8_crit_edge, %for.cond.preheader %storemerge.lcssa = phi i32 [ %2, %for.cond.for.end8_crit_edge ], [ 0, %for.cond.preheader ] store i32 %storemerge.lcssa, ptr %i, align 4, !tbaa !5 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %k) %13 = load i32, ptr %k, align 4, !tbaa !5 %dec51 = add nsw i32 %13, -1 store i32 %dec51, ptr %k, align 4, !tbaa !5 %tobool11.not52 = icmp eq i32 %13, 0 br i1 %tobool11.not52, label %while.end, label %while.body12 while.body12: ; preds = %for.end8, %while.body12 %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %m, ptr noundef nonnull %i, ptr noundef nonnull %j) %14 = load i32, ptr %j, align 4, !tbaa !5 %rem = srem i32 %14, 2 %mul = shl nsw i32 %rem, 1 %sub = add nsw i32 %mul, -1 %15 = load i32, ptr %i, align 4, !tbaa !5 %idxprom14 = sext i32 %15 to i64 %16 = load i32, ptr %m, align 4, !tbaa !5 %idxprom16 = sext i32 %16 to i64 %arrayidx17 = getelementptr inbounds [10000 x [1500 x i32]], ptr @d, i64 0, i64 %idxprom14, i64 %idxprom16 %17 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %add = add nsw i32 %sub, %17 store i32 %add, ptr %arrayidx17, align 4, !tbaa !5 %18 = load i32, ptr %k, align 4, !tbaa !5 %dec = add nsw i32 %18, -1 store i32 %dec, ptr %k, align 4, !tbaa !5 %tobool11.not = icmp eq i32 %18, 0 br i1 %tobool11.not, label %while.end, label %while.body12, !llvm.loop !14 while.end: ; preds = %while.body12, %for.end8 %call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %k) %19 = load i32, ptr %k, align 4, !tbaa !5 %dec2057 = add nsw i32 %19, -1 store i32 %dec2057, ptr %k, align 4, !tbaa !5 %tobool21.not58 = icmp eq i32 %19, 0 br i1 %tobool21.not58, label %while.cond.loopexit, label %while.body22 while.body22: ; preds = %while.end, %for.end39 %call23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %s, ptr noundef nonnull %t, ptr noundef nonnull %m) %20 = load i32, ptr %m, align 4, !tbaa !5 %idxprom27 = sext i32 %20 to i64 %21 = load i32, ptr %s, align 4, !tbaa !5 %22 = load i32, ptr %t, align 4 %23 = sext i32 %21 to i64 %24 = sext i32 %22 to i64 br label %for.body26 for.body26: ; preds = %for.inc37.1, %while.body22 %indvars.iv = phi i64 [ 0, %while.body22 ], [ %indvars.iv.next.1, %for.inc37.1 ] %a.056 = phi i32 [ 0, %while.body22 ], [ %a.1.1, %for.inc37.1 ] %add315354 = phi i32 [ 0, %while.body22 ], [ %add31.1, %for.inc37.1 ] %arrayidx30 = getelementptr inbounds [10000 x [1500 x i32]], ptr @d, i64 0, i64 %idxprom27, i64 %indvars.iv %25 = load i32, ptr %arrayidx30, align 8, !tbaa !5 %add31 = add nsw i32 %add315354, %25 %cmp32.not = icmp slt i64 %indvars.iv, %23 br i1 %cmp32.not, label %for.inc37, label %land.lhs.true land.lhs.true: ; preds = %for.body26 %cmp33 = icmp slt i64 %indvars.iv, %24 %cmp35 = icmp sgt i32 %add31, 0 %or.cond = select i1 %cmp33, i1 %cmp35, i1 false %inc36 = zext i1 %or.cond to i32 %spec.select = add nsw i32 %a.056, %inc36 br label %for.inc37 for.inc37: ; preds = %land.lhs.true, %for.body26 %a.1 = phi i32 [ %a.056, %for.body26 ], [ %spec.select, %land.lhs.true ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx30.1 = getelementptr inbounds [10000 x [1500 x i32]], ptr @d, i64 0, i64 %idxprom27, i64 %indvars.iv.next %26 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %add31.1 = add nsw i32 %add31, %26 %cmp32.not.1 = icmp slt i64 %indvars.iv.next, %23 br i1 %cmp32.not.1, label %for.inc37.1, label %land.lhs.true.1 land.lhs.true.1: ; preds = %for.inc37 %cmp33.1 = icmp slt i64 %indvars.iv.next, %24 %cmp35.1 = icmp sgt i32 %add31.1, 0 %or.cond.1 = select i1 %cmp33.1, i1 %cmp35.1, i1 false %inc36.1 = zext i1 %or.cond.1 to i32 %spec.select.1 = add nsw i32 %a.1, %inc36.1 br label %for.inc37.1 for.inc37.1: ; preds = %land.lhs.true.1, %for.inc37 %a.1.1 = phi i32 [ %a.1, %for.inc37 ], [ %spec.select.1, %land.lhs.true.1 ] %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %exitcond64.not.1 = icmp eq i64 %indvars.iv.next.1, 1300 br i1 %exitcond64.not.1, label %for.end39, label %for.body26, !llvm.loop !15 for.end39: ; preds = %for.inc37.1 store i32 1300, ptr %i, align 4, !tbaa !5 store i32 %add31.1, ptr %j, align 4, !tbaa !5 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %a.1.1) %27 = load i32, ptr %k, align 4, !tbaa !5 %dec20 = add nsw i32 %27, -1 store i32 %dec20, ptr %k, align 4, !tbaa !5 %tobool21.not = icmp eq i32 %27, 0 br i1 %tobool21.not, label %while.cond.loopexit, label %while.body22, !llvm.loop !16 while.end42: ; preds = %while.cond.loopexit, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, 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 nounwind willreturn memory(argmem: write) } 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, !13} !13 = !{!"llvm.loop.unroll.disable"} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include <stdio.h> #include <string.h> int main(void) { char moji[101] = { 0 }; int count[26] = { 0 }; int i; int t=0; int n; int no = 0; scanf("%s", moji); n = strlen(moji); for (i = 0;i < n;i++) { t = moji[i] - 'a'; if (t >= 0 && t < 26) { count[t] = count[t] + 1; } } for (t = 0;t < 26;t++) { if ((count[t] % 2) != 0) { no = no + 1; } } if (no == 0) { printf("Yes"); } else { printf("No"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291409/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"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: %moji = alloca [101 x i8], align 16 %count = alloca [26 x i32], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %moji) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(101) %moji, i8 0, i64 101, i1 false) call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %count) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %count, i8 0, i64 104, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %moji) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %moji) #7 %conv = trunc i64 %call2 to i32 %cmp42 = icmp sgt i32 %conv, 0 br i1 %cmp42, label %for.body.preheader, label %if.end32 for.body.preheader: ; preds = %entry %wide.trip.count = and i64 %call2, 4294967295 %xtraiter = and i64 %call2, 1 %0 = icmp eq i64 %wide.trip.count, 1 br i1 %0, label %for.cond13.preheader.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.cond13.preheader.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.cond13.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond13.preheader.unr-lcssa %arrayidx.epil = getelementptr inbounds [101 x i8], ptr %moji, i64 0, i64 %indvars.iv.unr %1 = load i8, ptr %arrayidx.epil, align 1, !tbaa !5 %2 = add i8 %1, -97 %or.cond.epil = icmp ult i8 %2, 26 br i1 %or.cond.epil, label %if.then.epil, label %for.cond13.preheader if.then.epil: ; preds = %for.body.epil %conv4.epil = zext i8 %1 to i64 %sub.epil = add nuw nsw i64 %conv4.epil, 4294967199 %idxprom9.epil = and i64 %sub.epil, 4294967295 %arrayidx10.epil = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 %idxprom9.epil %3 = load i32, ptr %arrayidx10.epil, align 4, !tbaa !8 %add.epil = add nsw i32 %3, 1 store i32 %add.epil, ptr %arrayidx10.epil, align 4, !tbaa !8 br label %for.cond13.preheader for.cond13.preheader: ; preds = %for.body.epil, %if.then.epil, %for.cond13.preheader.unr-lcssa %arrayidx18.16.phi.trans.insert = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 16 %arrayidx18.24.phi.trans.insert = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 24 %.pre74 = load i32, ptr %arrayidx18.24.phi.trans.insert, align 16, !tbaa !8 %arrayidx18.25.phi.trans.insert = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 25 %.pre75 = load i32, ptr %arrayidx18.25.phi.trans.insert, align 4, !tbaa !8 %4 = load <16 x i32>, ptr %count, align 16, !tbaa !8 %5 = and <16 x i32> %4, <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> %6 = load <8 x i32>, ptr %arrayidx18.16.phi.trans.insert, align 16, !tbaa !8 %7 = and <8 x i32> %6, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %8 = and i32 %.pre74, 1 %9 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %5) %10 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %7) %op.rdx = add i32 %9, %10 %op.rdx77 = add i32 %op.rdx, %8 %11 = and i32 %.pre75, 1 %12 = sub nsw i32 0, %op.rdx77 %13 = icmp eq i32 %11, %12 %spec.select = select i1 %13, ptr @.str.1, ptr @.str.2 br label %if.end32 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 [101 x i8], ptr %moji, i64 0, i64 %indvars.iv %14 = load i8, ptr %arrayidx, align 2, !tbaa !5 %15 = add i8 %14, -97 %or.cond = icmp ult i8 %15, 26 br i1 %or.cond, label %if.then, label %for.inc if.then: ; preds = %for.body %conv4 = zext i8 %14 to i64 %sub = add nuw nsw i64 %conv4, 4294967199 %idxprom9 = and i64 %sub, 4294967295 %arrayidx10 = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 %idxprom9 %16 = load i32, ptr %arrayidx10, align 4, !tbaa !8 %add = add nsw i32 %16, 1 store i32 %add, ptr %arrayidx10, align 4, !tbaa !8 br label %for.inc for.inc: ; preds = %for.body, %if.then %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [101 x i8], ptr %moji, i64 0, i64 %indvars.iv.next %17 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %18 = add i8 %17, -97 %or.cond.1 = icmp ult i8 %18, 26 br i1 %or.cond.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %conv4.1 = zext i8 %17 to i64 %sub.1 = add nuw nsw i64 %conv4.1, 4294967199 %idxprom9.1 = and i64 %sub.1, 4294967295 %arrayidx10.1 = getelementptr inbounds [26 x i32], ptr %count, i64 0, i64 %idxprom9.1 %19 = load i32, ptr %arrayidx10.1, align 4, !tbaa !8 %add.1 = add nsw i32 %19, 1 store i32 %add.1, ptr %arrayidx10.1, align 4, !tbaa !8 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.cond13.preheader.unr-lcssa, label %for.body, !llvm.loop !10 if.end32: ; preds = %for.cond13.preheader, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %for.cond13.preheader ] %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %count) #6 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %moji) #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: 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) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v16i32(<16 x i32>) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v8i32(<8 x i32>) #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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.mustprogress"}
#include <stdio.h> #include <stdlib.h> int main(void){ int arpha[26] = {0}; int i,len; char str[128]; char *p; int chk = 0; p = fgets(str, 128, stdin); for(i=0;128;i++){ if(str[i] < 'a' || str[i] > 'z'){ len=i; break; } } for(i=0;i<len;i++){ arpha[str[i] - 'a']++; } for(i=0;i<26;i++){ if(arpha[i] % 2) { chk = 1; break; } } (chk) ? printf("No\n"):printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291452/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 [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: %arpha = alloca [26 x i32], align 16 %str = alloca [128 x i8], align 16 call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %arpha) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %arpha, i8 0, i64 104, i1 false) call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %str) #5 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 128, ptr noundef %0) br label %for.cond for.cond: ; preds = %for.cond, %entry %indvars.iv51 = phi i32 [ %indvars.iv.next52, %for.cond ], [ 0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %entry ] %arrayidx = getelementptr inbounds [128 x i8], ptr %str, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %2 = add i8 %1, -123 %or.cond = icmp ult i8 %2, -26 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %indvars.iv.next52 = add nuw i32 %indvars.iv51, 1 br i1 %or.cond, label %for.cond7.preheader, label %for.cond for.cond7.preheader: ; preds = %for.cond %3 = and i64 %indvars.iv, 4294967295 %cmp844.not = icmp eq i64 %3, 0 br i1 %cmp844.not, label %for.cond20, label %for.body10.preheader for.body10.preheader: ; preds = %for.cond7.preheader %wide.trip.count = zext i32 %indvars.iv51 to i64 %xtraiter = and i64 %wide.trip.count, 1 %4 = icmp eq i32 %indvars.iv51, 1 br i1 %4, label %for.cond20.preheader.unr-lcssa, label %for.body10.preheader.new for.body10.preheader.new: ; preds = %for.body10.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body10 for.cond20.preheader.unr-lcssa: ; preds = %for.body10, %for.body10.preheader %indvars.iv48.unr = phi i64 [ 0, %for.body10.preheader ], [ %indvars.iv.next49.1, %for.body10 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond20.preheader, label %for.body10.epil for.body10.epil: ; preds = %for.cond20.preheader.unr-lcssa %arrayidx12.epil = getelementptr inbounds [128 x i8], ptr %str, i64 0, i64 %indvars.iv48.unr %5 = load i8, ptr %arrayidx12.epil, align 1, !tbaa !9 %conv13.epil = sext i8 %5 to i64 %sub.epil = add nsw i64 %conv13.epil, -97 %arrayidx15.epil = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 %sub.epil %6 = load i32, ptr %arrayidx15.epil, align 4, !tbaa !10 %inc16.epil = add nsw i32 %6, 1 store i32 %inc16.epil, ptr %arrayidx15.epil, align 4, !tbaa !10 br label %for.cond20.preheader for.cond20.preheader: ; preds = %for.cond20.preheader.unr-lcssa, %for.body10.epil %.pre = load i32, ptr %arpha, align 16, !tbaa !10 %7 = and i32 %.pre, 1 %8 = icmp eq i32 %7, 0 br i1 %8, label %for.cond20, label %cond.true for.body10: ; preds = %for.body10, %for.body10.preheader.new %indvars.iv48 = phi i64 [ 0, %for.body10.preheader.new ], [ %indvars.iv.next49.1, %for.body10 ] %niter = phi i64 [ 0, %for.body10.preheader.new ], [ %niter.next.1, %for.body10 ] %arrayidx12 = getelementptr inbounds [128 x i8], ptr %str, i64 0, i64 %indvars.iv48 %9 = load i8, ptr %arrayidx12, align 2, !tbaa !9 %conv13 = sext i8 %9 to i64 %sub = add nsw i64 %conv13, -97 %arrayidx15 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 %sub %10 = load i32, ptr %arrayidx15, align 4, !tbaa !10 %inc16 = add nsw i32 %10, 1 store i32 %inc16, ptr %arrayidx15, align 4, !tbaa !10 %indvars.iv.next49 = or i64 %indvars.iv48, 1 %arrayidx12.1 = getelementptr inbounds [128 x i8], ptr %str, i64 0, i64 %indvars.iv.next49 %11 = load i8, ptr %arrayidx12.1, align 1, !tbaa !9 %conv13.1 = sext i8 %11 to i64 %sub.1 = add nsw i64 %conv13.1, -97 %arrayidx15.1 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 %sub.1 %12 = load i32, ptr %arrayidx15.1, align 4, !tbaa !10 %inc16.1 = add nsw i32 %12, 1 store i32 %inc16.1, ptr %arrayidx15.1, align 4, !tbaa !10 %indvars.iv.next49.1 = add nuw nsw i64 %indvars.iv48, 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.cond20.preheader.unr-lcssa, label %for.body10, !llvm.loop !12 for.cond20: ; preds = %for.cond7.preheader, %for.cond20.preheader %arrayidx25.1 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 1 %13 = load i32, ptr %arrayidx25.1, align 4, !tbaa !10 %14 = and i32 %13, 1 %tobool.not.1 = icmp eq i32 %14, 0 br i1 %tobool.not.1, label %for.cond20.1, label %cond.true for.cond20.1: ; preds = %for.cond20 %arrayidx25.2 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 2 %15 = load i32, ptr %arrayidx25.2, align 8, !tbaa !10 %16 = and i32 %15, 1 %tobool.not.2 = icmp eq i32 %16, 0 br i1 %tobool.not.2, label %for.cond20.2, label %cond.true for.cond20.2: ; preds = %for.cond20.1 %arrayidx25.3 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 3 %17 = load i32, ptr %arrayidx25.3, align 4, !tbaa !10 %18 = and i32 %17, 1 %tobool.not.3 = icmp eq i32 %18, 0 br i1 %tobool.not.3, label %for.cond20.3, label %cond.true for.cond20.3: ; preds = %for.cond20.2 %arrayidx25.4 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 4 %19 = load i32, ptr %arrayidx25.4, align 16, !tbaa !10 %20 = and i32 %19, 1 %tobool.not.4 = icmp eq i32 %20, 0 br i1 %tobool.not.4, label %for.cond20.4, label %cond.true for.cond20.4: ; preds = %for.cond20.3 %arrayidx25.5 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 5 %21 = load i32, ptr %arrayidx25.5, align 4, !tbaa !10 %22 = and i32 %21, 1 %tobool.not.5 = icmp eq i32 %22, 0 br i1 %tobool.not.5, label %for.cond20.5, label %cond.true for.cond20.5: ; preds = %for.cond20.4 %arrayidx25.6 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 6 %23 = load i32, ptr %arrayidx25.6, align 8, !tbaa !10 %24 = and i32 %23, 1 %tobool.not.6 = icmp eq i32 %24, 0 br i1 %tobool.not.6, label %for.cond20.6, label %cond.true for.cond20.6: ; preds = %for.cond20.5 %arrayidx25.7 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 7 %25 = load i32, ptr %arrayidx25.7, align 4, !tbaa !10 %26 = and i32 %25, 1 %tobool.not.7 = icmp eq i32 %26, 0 br i1 %tobool.not.7, label %for.cond20.7, label %cond.true for.cond20.7: ; preds = %for.cond20.6 %arrayidx25.8 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 8 %27 = load i32, ptr %arrayidx25.8, align 16, !tbaa !10 %28 = and i32 %27, 1 %tobool.not.8 = icmp eq i32 %28, 0 br i1 %tobool.not.8, label %for.cond20.8, label %cond.true for.cond20.8: ; preds = %for.cond20.7 %arrayidx25.9 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 9 %29 = load i32, ptr %arrayidx25.9, align 4, !tbaa !10 %30 = and i32 %29, 1 %tobool.not.9 = icmp eq i32 %30, 0 br i1 %tobool.not.9, label %for.cond20.9, label %cond.true for.cond20.9: ; preds = %for.cond20.8 %arrayidx25.10 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 10 %31 = load i32, ptr %arrayidx25.10, align 8, !tbaa !10 %32 = and i32 %31, 1 %tobool.not.10 = icmp eq i32 %32, 0 br i1 %tobool.not.10, label %for.cond20.10, label %cond.true for.cond20.10: ; preds = %for.cond20.9 %arrayidx25.11 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 11 %33 = load i32, ptr %arrayidx25.11, align 4, !tbaa !10 %34 = and i32 %33, 1 %tobool.not.11 = icmp eq i32 %34, 0 br i1 %tobool.not.11, label %for.cond20.11, label %cond.true for.cond20.11: ; preds = %for.cond20.10 %arrayidx25.12 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 12 %35 = load i32, ptr %arrayidx25.12, align 16, !tbaa !10 %36 = and i32 %35, 1 %tobool.not.12 = icmp eq i32 %36, 0 br i1 %tobool.not.12, label %for.cond20.12, label %cond.true for.cond20.12: ; preds = %for.cond20.11 %arrayidx25.13 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 13 %37 = load i32, ptr %arrayidx25.13, align 4, !tbaa !10 %38 = and i32 %37, 1 %tobool.not.13 = icmp eq i32 %38, 0 br i1 %tobool.not.13, label %for.cond20.13, label %cond.true for.cond20.13: ; preds = %for.cond20.12 %arrayidx25.14 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 14 %39 = load i32, ptr %arrayidx25.14, align 8, !tbaa !10 %40 = and i32 %39, 1 %tobool.not.14 = icmp eq i32 %40, 0 br i1 %tobool.not.14, label %for.cond20.14, label %cond.true for.cond20.14: ; preds = %for.cond20.13 %arrayidx25.15 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 15 %41 = load i32, ptr %arrayidx25.15, align 4, !tbaa !10 %42 = and i32 %41, 1 %tobool.not.15 = icmp eq i32 %42, 0 br i1 %tobool.not.15, label %for.cond20.15, label %cond.true for.cond20.15: ; preds = %for.cond20.14 %arrayidx25.16 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 16 %43 = load i32, ptr %arrayidx25.16, align 16, !tbaa !10 %44 = and i32 %43, 1 %tobool.not.16 = icmp eq i32 %44, 0 br i1 %tobool.not.16, label %for.cond20.16, label %cond.true for.cond20.16: ; preds = %for.cond20.15 %arrayidx25.17 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 17 %45 = load i32, ptr %arrayidx25.17, align 4, !tbaa !10 %46 = and i32 %45, 1 %tobool.not.17 = icmp eq i32 %46, 0 br i1 %tobool.not.17, label %for.cond20.17, label %cond.true for.cond20.17: ; preds = %for.cond20.16 %arrayidx25.18 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 18 %47 = load i32, ptr %arrayidx25.18, align 8, !tbaa !10 %48 = and i32 %47, 1 %tobool.not.18 = icmp eq i32 %48, 0 br i1 %tobool.not.18, label %for.cond20.18, label %cond.true for.cond20.18: ; preds = %for.cond20.17 %arrayidx25.19 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 19 %49 = load i32, ptr %arrayidx25.19, align 4, !tbaa !10 %50 = and i32 %49, 1 %tobool.not.19 = icmp eq i32 %50, 0 br i1 %tobool.not.19, label %for.cond20.19, label %cond.true for.cond20.19: ; preds = %for.cond20.18 %arrayidx25.20 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 20 %51 = load i32, ptr %arrayidx25.20, align 16, !tbaa !10 %52 = and i32 %51, 1 %tobool.not.20 = icmp eq i32 %52, 0 br i1 %tobool.not.20, label %for.cond20.20, label %cond.true for.cond20.20: ; preds = %for.cond20.19 %arrayidx25.21 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 21 %53 = load i32, ptr %arrayidx25.21, align 4, !tbaa !10 %54 = and i32 %53, 1 %tobool.not.21 = icmp eq i32 %54, 0 br i1 %tobool.not.21, label %for.cond20.21, label %cond.true for.cond20.21: ; preds = %for.cond20.20 %arrayidx25.22 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 22 %55 = load i32, ptr %arrayidx25.22, align 8, !tbaa !10 %56 = and i32 %55, 1 %tobool.not.22 = icmp eq i32 %56, 0 br i1 %tobool.not.22, label %for.cond20.22, label %cond.true for.cond20.22: ; preds = %for.cond20.21 %arrayidx25.23 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 23 %57 = load i32, ptr %arrayidx25.23, align 4, !tbaa !10 %58 = and i32 %57, 1 %tobool.not.23 = icmp eq i32 %58, 0 br i1 %tobool.not.23, label %for.cond20.23, label %cond.true for.cond20.23: ; preds = %for.cond20.22 %arrayidx25.24 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 24 %59 = load i32, ptr %arrayidx25.24, align 16, !tbaa !10 %60 = and i32 %59, 1 %tobool.not.24 = icmp eq i32 %60, 0 br i1 %tobool.not.24, label %for.cond20.24, label %cond.true for.cond20.24: ; preds = %for.cond20.23 %arrayidx25.25 = getelementptr inbounds [26 x i32], ptr %arpha, i64 0, i64 25 %61 = load i32, ptr %arrayidx25.25, align 4, !tbaa !10 %62 = and i32 %61, 1 %tobool.not.25 = icmp eq i32 %62, 0 br i1 %tobool.not.25, label %cond.end, label %cond.true cond.true: ; preds = %for.cond20.24, %for.cond20.23, %for.cond20.22, %for.cond20.21, %for.cond20.20, %for.cond20.19, %for.cond20.18, %for.cond20.17, %for.cond20.16, %for.cond20.15, %for.cond20.14, %for.cond20.13, %for.cond20.12, %for.cond20.11, %for.cond20.10, %for.cond20.9, %for.cond20.8, %for.cond20.7, %for.cond20.6, %for.cond20.5, %for.cond20.4, %for.cond20.3, %for.cond20.2, %for.cond20.1, %for.cond20, %for.cond20.preheader br label %cond.end cond.end: ; preds = %for.cond20.24, %cond.true %str.sink = phi ptr [ @str.2, %cond.true ], [ @str, %for.cond20.24 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %str) #5 call void @llvm.lifetime.end.p0(i64 104, ptr nonnull %arpha) #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: 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 ptr @fgets(ptr noundef, i32 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 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 = { 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 = !{!"any pointer", !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 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> int ara[500]; int main() { int a,i,j,len=0,l; char s[500]; char alpha[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','\0'}; scanf("%s",s); l=strlen(s); for (i=0;i<l;i++){ for(j=0;j<26;j++){ if(s[i]==alpha[j]){ ara[j]++; } } } for(j=0;j<26;j++){ if(ara[j]%2==0){ len++; } } if(len==26) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291546/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291546/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 @ara = dso_local local_unnamed_addr global [500 x i32] zeroinitializer, align 64 @str = 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: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [500 x i8], align 16 call void @llvm.lifetime.start.p0(i64 500, 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 %conv = trunc i64 %call2 to i32 %cmp51 = icmp sgt i32 %conv, 0 br i1 %cmp51, label %for.cond4.preheader.preheader, label %for.cond20.preheader for.cond4.preheader.preheader: ; preds = %entry %wide.trip.count = and i64 %call2, 4294967295 %.promoted = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 25), align 4, !tbaa !5 %.promoted86 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 24), align 32, !tbaa !5 %.promoted87 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 23), align 4, !tbaa !5 %.promoted88 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 22), align 8, !tbaa !5 %.promoted89 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 21), align 4, !tbaa !5 %.promoted90 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 20), align 16, !tbaa !5 %.promoted91 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 19), align 4, !tbaa !5 %.promoted92 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 18), align 8, !tbaa !5 %.promoted93 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 17), align 4, !tbaa !5 %.promoted94 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 16), align 64, !tbaa !5 %.promoted95 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 15), align 4, !tbaa !5 %.promoted96 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 14), align 8, !tbaa !5 %.promoted97 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 13), align 4, !tbaa !5 %.promoted98 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 12), align 16, !tbaa !5 %.promoted99 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 11), align 4, !tbaa !5 %.promoted100 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 10), align 8, !tbaa !5 %.promoted101 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 9), align 4, !tbaa !5 %.promoted102 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 8), align 32, !tbaa !5 %.promoted103 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 7), align 4, !tbaa !5 %.promoted104 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 6), align 8, !tbaa !5 %.promoted105 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 5), align 4, !tbaa !5 %.promoted106 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 4), align 16, !tbaa !5 %.promoted107 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 3), align 4, !tbaa !5 %.promoted108 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 2), align 8, !tbaa !5 %.promoted109 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 1), align 4, !tbaa !5 %ara.promoted = load i32, ptr @ara, align 64, !tbaa !5 br label %for.cond4.preheader for.cond4.preheader: ; preds = %for.cond4.preheader.preheader, %for.inc.25 %0 = phi i32 [ %ara.promoted, %for.cond4.preheader.preheader ], [ %41, %for.inc.25 ] %1 = phi i32 [ %.promoted109, %for.cond4.preheader.preheader ], [ %42, %for.inc.25 ] %2 = phi i32 [ %.promoted108, %for.cond4.preheader.preheader ], [ %43, %for.inc.25 ] %3 = phi i32 [ %.promoted107, %for.cond4.preheader.preheader ], [ %44, %for.inc.25 ] %4 = phi i32 [ %.promoted106, %for.cond4.preheader.preheader ], [ %45, %for.inc.25 ] %5 = phi i32 [ %.promoted105, %for.cond4.preheader.preheader ], [ %46, %for.inc.25 ] %6 = phi i32 [ %.promoted104, %for.cond4.preheader.preheader ], [ %47, %for.inc.25 ] %7 = phi i32 [ %.promoted103, %for.cond4.preheader.preheader ], [ %48, %for.inc.25 ] %8 = phi i32 [ %.promoted102, %for.cond4.preheader.preheader ], [ %49, %for.inc.25 ] %9 = phi i32 [ %.promoted101, %for.cond4.preheader.preheader ], [ %50, %for.inc.25 ] %10 = phi i32 [ %.promoted100, %for.cond4.preheader.preheader ], [ %51, %for.inc.25 ] %11 = phi i32 [ %.promoted99, %for.cond4.preheader.preheader ], [ %52, %for.inc.25 ] %12 = phi i32 [ %.promoted98, %for.cond4.preheader.preheader ], [ %53, %for.inc.25 ] %13 = phi i32 [ %.promoted97, %for.cond4.preheader.preheader ], [ %54, %for.inc.25 ] %14 = phi i32 [ %.promoted96, %for.cond4.preheader.preheader ], [ %55, %for.inc.25 ] %15 = phi i32 [ %.promoted95, %for.cond4.preheader.preheader ], [ %56, %for.inc.25 ] %16 = phi i32 [ %.promoted94, %for.cond4.preheader.preheader ], [ %57, %for.inc.25 ] %17 = phi i32 [ %.promoted93, %for.cond4.preheader.preheader ], [ %58, %for.inc.25 ] %18 = phi i32 [ %.promoted92, %for.cond4.preheader.preheader ], [ %59, %for.inc.25 ] %19 = phi i32 [ %.promoted91, %for.cond4.preheader.preheader ], [ %60, %for.inc.25 ] %20 = phi i32 [ %.promoted90, %for.cond4.preheader.preheader ], [ %61, %for.inc.25 ] %21 = phi i32 [ %.promoted89, %for.cond4.preheader.preheader ], [ %62, %for.inc.25 ] %22 = phi i32 [ %.promoted88, %for.cond4.preheader.preheader ], [ %63, %for.inc.25 ] %23 = phi i32 [ %.promoted87, %for.cond4.preheader.preheader ], [ %64, %for.inc.25 ] %24 = phi i32 [ %.promoted86, %for.cond4.preheader.preheader ], [ %65, %for.inc.25 ] %25 = phi i32 [ %.promoted, %for.cond4.preheader.preheader ], [ %66, %for.inc.25 ] %indvars.iv = phi i64 [ 0, %for.cond4.preheader.preheader ], [ %indvars.iv.next, %for.inc.25 ] %arrayidx = getelementptr inbounds [500 x i8], ptr %s, i64 0, i64 %indvars.iv %26 = load i8, ptr %arrayidx, align 1, !tbaa !9 switch i8 %26, label %for.inc.25 [ i8 97, label %for.inc.thread i8 98, label %if.then.1 i8 99, label %if.then.2 i8 100, label %if.then.3 i8 101, label %if.then.4 i8 102, label %if.then.5 i8 103, label %if.then.6 i8 104, label %if.then.7 i8 105, label %if.then.8 i8 106, label %if.then.9 i8 107, label %if.then.10 i8 108, label %if.then.11 i8 109, label %if.then.12 i8 110, label %if.then.13 i8 111, label %if.then.14 i8 112, label %if.then.15 i8 113, label %if.then.16 i8 114, label %if.then.17 i8 115, label %if.then.18 i8 116, label %if.then.19 i8 117, label %if.then.20 i8 118, label %if.then.21 i8 119, label %if.then.22 i8 120, label %if.then.23 i8 121, label %if.then.24 i8 122, label %if.then.25 ] for.cond20.preheader: ; preds = %for.inc.25, %entry %27 = load <16 x i32>, ptr @ara, align 64, !tbaa !5 %28 = and <16 x i32> %27, <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> %29 = xor <16 x i32> %28, <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> %30 = load <8 x i32>, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 16), align 64, !tbaa !5 %31 = and <8 x i32> %30, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %32 = xor <8 x i32> %31, <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1> %33 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 24), align 32, !tbaa !5 %34 = and i32 %33, 1 %35 = xor i32 %34, 1 %36 = load i32, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 25), align 4, !tbaa !5 %37 = and i32 %36, 1 %38 = xor i32 %37, 1 %39 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %29) %40 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %32) %op.rdx = add i32 %39, %40 %op.rdx110 = add i32 %op.rdx, %35 %op.rdx111 = add i32 %op.rdx110, %38 %cmp34 = icmp eq i32 %op.rdx111, 26 %str.3.str = select i1 %cmp34, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 500, ptr nonnull %s) #6 ret i32 0 for.inc.thread: ; preds = %for.cond4.preheader %inc = add nsw i32 %0, 1 store i32 %inc, ptr @ara, align 64, !tbaa !5 br label %for.inc.25 if.then.1: ; preds = %for.cond4.preheader %inc.1 = add nsw i32 %1, 1 store i32 %inc.1, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 1), align 4, !tbaa !5 br label %for.inc.25 if.then.2: ; preds = %for.cond4.preheader %inc.2 = add nsw i32 %2, 1 store i32 %inc.2, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 2), align 8, !tbaa !5 br label %for.inc.25 if.then.3: ; preds = %for.cond4.preheader %inc.3 = add nsw i32 %3, 1 store i32 %inc.3, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 3), align 4, !tbaa !5 br label %for.inc.25 if.then.4: ; preds = %for.cond4.preheader %inc.4 = add nsw i32 %4, 1 store i32 %inc.4, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 4), align 16, !tbaa !5 br label %for.inc.25 if.then.5: ; preds = %for.cond4.preheader %inc.5 = add nsw i32 %5, 1 store i32 %inc.5, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 5), align 4, !tbaa !5 br label %for.inc.25 if.then.6: ; preds = %for.cond4.preheader %inc.6 = add nsw i32 %6, 1 store i32 %inc.6, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 6), align 8, !tbaa !5 br label %for.inc.25 if.then.7: ; preds = %for.cond4.preheader %inc.7 = add nsw i32 %7, 1 store i32 %inc.7, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 7), align 4, !tbaa !5 br label %for.inc.25 if.then.8: ; preds = %for.cond4.preheader %inc.8 = add nsw i32 %8, 1 store i32 %inc.8, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 8), align 32, !tbaa !5 br label %for.inc.25 if.then.9: ; preds = %for.cond4.preheader %inc.9 = add nsw i32 %9, 1 store i32 %inc.9, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 9), align 4, !tbaa !5 br label %for.inc.25 if.then.10: ; preds = %for.cond4.preheader %inc.10 = add nsw i32 %10, 1 store i32 %inc.10, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 10), align 8, !tbaa !5 br label %for.inc.25 if.then.11: ; preds = %for.cond4.preheader %inc.11 = add nsw i32 %11, 1 store i32 %inc.11, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 11), align 4, !tbaa !5 br label %for.inc.25 if.then.12: ; preds = %for.cond4.preheader %inc.12 = add nsw i32 %12, 1 store i32 %inc.12, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 12), align 16, !tbaa !5 br label %for.inc.25 if.then.13: ; preds = %for.cond4.preheader %inc.13 = add nsw i32 %13, 1 store i32 %inc.13, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 13), align 4, !tbaa !5 br label %for.inc.25 if.then.14: ; preds = %for.cond4.preheader %inc.14 = add nsw i32 %14, 1 store i32 %inc.14, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 14), align 8, !tbaa !5 br label %for.inc.25 if.then.15: ; preds = %for.cond4.preheader %inc.15 = add nsw i32 %15, 1 store i32 %inc.15, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 15), align 4, !tbaa !5 br label %for.inc.25 if.then.16: ; preds = %for.cond4.preheader %inc.16 = add nsw i32 %16, 1 store i32 %inc.16, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 16), align 64, !tbaa !5 br label %for.inc.25 if.then.17: ; preds = %for.cond4.preheader %inc.17 = add nsw i32 %17, 1 store i32 %inc.17, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 17), align 4, !tbaa !5 br label %for.inc.25 if.then.18: ; preds = %for.cond4.preheader %inc.18 = add nsw i32 %18, 1 store i32 %inc.18, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 18), align 8, !tbaa !5 br label %for.inc.25 if.then.19: ; preds = %for.cond4.preheader %inc.19 = add nsw i32 %19, 1 store i32 %inc.19, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 19), align 4, !tbaa !5 br label %for.inc.25 if.then.20: ; preds = %for.cond4.preheader %inc.20 = add nsw i32 %20, 1 store i32 %inc.20, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 20), align 16, !tbaa !5 br label %for.inc.25 if.then.21: ; preds = %for.cond4.preheader %inc.21 = add nsw i32 %21, 1 store i32 %inc.21, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 21), align 4, !tbaa !5 br label %for.inc.25 if.then.22: ; preds = %for.cond4.preheader %inc.22 = add nsw i32 %22, 1 store i32 %inc.22, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 22), align 8, !tbaa !5 br label %for.inc.25 if.then.23: ; preds = %for.cond4.preheader %inc.23 = add nsw i32 %23, 1 store i32 %inc.23, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 23), align 4, !tbaa !5 br label %for.inc.25 if.then.24: ; preds = %for.cond4.preheader %inc.24 = add nsw i32 %24, 1 store i32 %inc.24, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 24), align 32, !tbaa !5 br label %for.inc.25 if.then.25: ; preds = %for.cond4.preheader %inc.25 = add nsw i32 %25, 1 store i32 %inc.25, ptr getelementptr inbounds ([500 x i32], ptr @ara, i64 0, i64 25), align 4, !tbaa !5 br label %for.inc.25 for.inc.25: ; preds = %for.cond4.preheader, %if.then.1, %for.inc.thread, %if.then.2, %if.then.3, %if.then.4, %if.then.5, %if.then.6, %if.then.7, %if.then.8, %if.then.9, %if.then.10, %if.then.11, %if.then.12, %if.then.13, %if.then.14, %if.then.15, %if.then.16, %if.then.17, %if.then.18, %if.then.19, %if.then.20, %if.then.21, %if.then.22, %if.then.23, %if.then.24, %if.then.25 %41 = phi i32 [ %0, %if.then.1 ], [ %inc, %for.inc.thread ], [ %0, %if.then.2 ], [ %0, %if.then.3 ], [ %0, %if.then.4 ], [ %0, %if.then.5 ], [ %0, %if.then.6 ], [ %0, %if.then.7 ], [ %0, %if.then.8 ], [ %0, %if.then.9 ], [ %0, %if.then.10 ], [ %0, %if.then.11 ], [ %0, %if.then.12 ], [ %0, %if.then.13 ], [ %0, %if.then.14 ], [ %0, %if.then.15 ], [ %0, %if.then.16 ], [ %0, %if.then.17 ], [ %0, %if.then.18 ], [ %0, %if.then.19 ], [ %0, %if.then.20 ], [ %0, %if.then.21 ], [ %0, %if.then.22 ], [ %0, %if.then.23 ], [ %0, %if.then.24 ], [ %0, %if.then.25 ], [ %0, %for.cond4.preheader ] %42 = phi i32 [ %inc.1, %if.then.1 ], [ %1, %for.inc.thread ], [ %1, %if.then.2 ], [ %1, %if.then.3 ], [ %1, %if.then.4 ], [ %1, %if.then.5 ], [ %1, %if.then.6 ], [ %1, %if.then.7 ], [ %1, %if.then.8 ], [ %1, %if.then.9 ], [ %1, %if.then.10 ], [ %1, %if.then.11 ], [ %1, %if.then.12 ], [ %1, %if.then.13 ], [ %1, %if.then.14 ], [ %1, %if.then.15 ], [ %1, %if.then.16 ], [ %1, %if.then.17 ], [ %1, %if.then.18 ], [ %1, %if.then.19 ], [ %1, %if.then.20 ], [ %1, %if.then.21 ], [ %1, %if.then.22 ], [ %1, %if.then.23 ], [ %1, %if.then.24 ], [ %1, %if.then.25 ], [ %1, %for.cond4.preheader ] %43 = phi i32 [ %2, %if.then.1 ], [ %2, %for.inc.thread ], [ %inc.2, %if.then.2 ], [ %2, %if.then.3 ], [ %2, %if.then.4 ], [ %2, %if.then.5 ], [ %2, %if.then.6 ], [ %2, %if.then.7 ], [ %2, %if.then.8 ], [ %2, %if.then.9 ], [ %2, %if.then.10 ], [ %2, %if.then.11 ], [ %2, %if.then.12 ], [ %2, %if.then.13 ], [ %2, %if.then.14 ], [ %2, %if.then.15 ], [ %2, %if.then.16 ], [ %2, %if.then.17 ], [ %2, %if.then.18 ], [ %2, %if.then.19 ], [ %2, %if.then.20 ], [ %2, %if.then.21 ], [ %2, %if.then.22 ], [ %2, %if.then.23 ], [ %2, %if.then.24 ], [ %2, %if.then.25 ], [ %2, %for.cond4.preheader ] %44 = phi i32 [ %3, %if.then.1 ], [ %3, %for.inc.thread ], [ %3, %if.then.2 ], [ %inc.3, %if.then.3 ], [ %3, %if.then.4 ], [ %3, %if.then.5 ], [ %3, %if.then.6 ], [ %3, %if.then.7 ], [ %3, %if.then.8 ], [ %3, %if.then.9 ], [ %3, %if.then.10 ], [ %3, %if.then.11 ], [ %3, %if.then.12 ], [ %3, %if.then.13 ], [ %3, %if.then.14 ], [ %3, %if.then.15 ], [ %3, %if.then.16 ], [ %3, %if.then.17 ], [ %3, %if.then.18 ], [ %3, %if.then.19 ], [ %3, %if.then.20 ], [ %3, %if.then.21 ], [ %3, %if.then.22 ], [ %3, %if.then.23 ], [ %3, %if.then.24 ], [ %3, %if.then.25 ], [ %3, %for.cond4.preheader ] %45 = phi i32 [ %4, %if.then.1 ], [ %4, %for.inc.thread ], [ %4, %if.then.2 ], [ %4, %if.then.3 ], [ %inc.4, %if.then.4 ], [ %4, %if.then.5 ], [ %4, %if.then.6 ], [ %4, %if.then.7 ], [ %4, %if.then.8 ], [ %4, %if.then.9 ], [ %4, %if.then.10 ], [ %4, %if.then.11 ], [ %4, %if.then.12 ], [ %4, %if.then.13 ], [ %4, %if.then.14 ], [ %4, %if.then.15 ], [ %4, %if.then.16 ], [ %4, %if.then.17 ], [ %4, %if.then.18 ], [ %4, %if.then.19 ], [ %4, %if.then.20 ], [ %4, %if.then.21 ], [ %4, %if.then.22 ], [ %4, %if.then.23 ], [ %4, %if.then.24 ], [ %4, %if.then.25 ], [ %4, %for.cond4.preheader ] %46 = phi i32 [ %5, %if.then.1 ], [ %5, %for.inc.thread ], [ %5, %if.then.2 ], [ %5, %if.then.3 ], [ %5, %if.then.4 ], [ %inc.5, %if.then.5 ], [ %5, %if.then.6 ], [ %5, %if.then.7 ], [ %5, %if.then.8 ], [ %5, %if.then.9 ], [ %5, %if.then.10 ], [ %5, %if.then.11 ], [ %5, %if.then.12 ], [ %5, %if.then.13 ], [ %5, %if.then.14 ], [ %5, %if.then.15 ], [ %5, %if.then.16 ], [ %5, %if.then.17 ], [ %5, %if.then.18 ], [ %5, %if.then.19 ], [ %5, %if.then.20 ], [ %5, %if.then.21 ], [ %5, %if.then.22 ], [ %5, %if.then.23 ], [ %5, %if.then.24 ], [ %5, %if.then.25 ], [ %5, %for.cond4.preheader ] %47 = phi i32 [ %6, %if.then.1 ], [ %6, %for.inc.thread ], [ %6, %if.then.2 ], [ %6, %if.then.3 ], [ %6, %if.then.4 ], [ %6, %if.then.5 ], [ %inc.6, %if.then.6 ], [ %6, %if.then.7 ], [ %6, %if.then.8 ], [ %6, %if.then.9 ], [ %6, %if.then.10 ], [ %6, %if.then.11 ], [ %6, %if.then.12 ], [ %6, %if.then.13 ], [ %6, %if.then.14 ], [ %6, %if.then.15 ], [ %6, %if.then.16 ], [ %6, %if.then.17 ], [ %6, %if.then.18 ], [ %6, %if.then.19 ], [ %6, %if.then.20 ], [ %6, %if.then.21 ], [ %6, %if.then.22 ], [ %6, %if.then.23 ], [ %6, %if.then.24 ], [ %6, %if.then.25 ], [ %6, %for.cond4.preheader ] %48 = phi i32 [ %7, %if.then.1 ], [ %7, %for.inc.thread ], [ %7, %if.then.2 ], [ %7, %if.then.3 ], [ %7, %if.then.4 ], [ %7, %if.then.5 ], [ %7, %if.then.6 ], [ %inc.7, %if.then.7 ], [ %7, %if.then.8 ], [ %7, %if.then.9 ], [ %7, %if.then.10 ], [ %7, %if.then.11 ], [ %7, %if.then.12 ], [ %7, %if.then.13 ], [ %7, %if.then.14 ], [ %7, %if.then.15 ], [ %7, %if.then.16 ], [ %7, %if.then.17 ], [ %7, %if.then.18 ], [ %7, %if.then.19 ], [ %7, %if.then.20 ], [ %7, %if.then.21 ], [ %7, %if.then.22 ], [ %7, %if.then.23 ], [ %7, %if.then.24 ], [ %7, %if.then.25 ], [ %7, %for.cond4.preheader ] %49 = phi i32 [ %8, %if.then.1 ], [ %8, %for.inc.thread ], [ %8, %if.then.2 ], [ %8, %if.then.3 ], [ %8, %if.then.4 ], [ %8, %if.then.5 ], [ %8, %if.then.6 ], [ %8, %if.then.7 ], [ %inc.8, %if.then.8 ], [ %8, %if.then.9 ], [ %8, %if.then.10 ], [ %8, %if.then.11 ], [ %8, %if.then.12 ], [ %8, %if.then.13 ], [ %8, %if.then.14 ], [ %8, %if.then.15 ], [ %8, %if.then.16 ], [ %8, %if.then.17 ], [ %8, %if.then.18 ], [ %8, %if.then.19 ], [ %8, %if.then.20 ], [ %8, %if.then.21 ], [ %8, %if.then.22 ], [ %8, %if.then.23 ], [ %8, %if.then.24 ], [ %8, %if.then.25 ], [ %8, %for.cond4.preheader ] %50 = phi i32 [ %9, %if.then.1 ], [ %9, %for.inc.thread ], [ %9, %if.then.2 ], [ %9, %if.then.3 ], [ %9, %if.then.4 ], [ %9, %if.then.5 ], [ %9, %if.then.6 ], [ %9, %if.then.7 ], [ %9, %if.then.8 ], [ %inc.9, %if.then.9 ], [ %9, %if.then.10 ], [ %9, %if.then.11 ], [ %9, %if.then.12 ], [ %9, %if.then.13 ], [ %9, %if.then.14 ], [ %9, %if.then.15 ], [ %9, %if.then.16 ], [ %9, %if.then.17 ], [ %9, %if.then.18 ], [ %9, %if.then.19 ], [ %9, %if.then.20 ], [ %9, %if.then.21 ], [ %9, %if.then.22 ], [ %9, %if.then.23 ], [ %9, %if.then.24 ], [ %9, %if.then.25 ], [ %9, %for.cond4.preheader ] %51 = phi i32 [ %10, %if.then.1 ], [ %10, %for.inc.thread ], [ %10, %if.then.2 ], [ %10, %if.then.3 ], [ %10, %if.then.4 ], [ %10, %if.then.5 ], [ %10, %if.then.6 ], [ %10, %if.then.7 ], [ %10, %if.then.8 ], [ %10, %if.then.9 ], [ %inc.10, %if.then.10 ], [ %10, %if.then.11 ], [ %10, %if.then.12 ], [ %10, %if.then.13 ], [ %10, %if.then.14 ], [ %10, %if.then.15 ], [ %10, %if.then.16 ], [ %10, %if.then.17 ], [ %10, %if.then.18 ], [ %10, %if.then.19 ], [ %10, %if.then.20 ], [ %10, %if.then.21 ], [ %10, %if.then.22 ], [ %10, %if.then.23 ], [ %10, %if.then.24 ], [ %10, %if.then.25 ], [ %10, %for.cond4.preheader ] %52 = phi i32 [ %11, %if.then.1 ], [ %11, %for.inc.thread ], [ %11, %if.then.2 ], [ %11, %if.then.3 ], [ %11, %if.then.4 ], [ %11, %if.then.5 ], [ %11, %if.then.6 ], [ %11, %if.then.7 ], [ %11, %if.then.8 ], [ %11, %if.then.9 ], [ %11, %if.then.10 ], [ %inc.11, %if.then.11 ], [ %11, %if.then.12 ], [ %11, %if.then.13 ], [ %11, %if.then.14 ], [ %11, %if.then.15 ], [ %11, %if.then.16 ], [ %11, %if.then.17 ], [ %11, %if.then.18 ], [ %11, %if.then.19 ], [ %11, %if.then.20 ], [ %11, %if.then.21 ], [ %11, %if.then.22 ], [ %11, %if.then.23 ], [ %11, %if.then.24 ], [ %11, %if.then.25 ], [ %11, %for.cond4.preheader ] %53 = phi i32 [ %12, %if.then.1 ], [ %12, %for.inc.thread ], [ %12, %if.then.2 ], [ %12, %if.then.3 ], [ %12, %if.then.4 ], [ %12, %if.then.5 ], [ %12, %if.then.6 ], [ %12, %if.then.7 ], [ %12, %if.then.8 ], [ %12, %if.then.9 ], [ %12, %if.then.10 ], [ %12, %if.then.11 ], [ %inc.12, %if.then.12 ], [ %12, %if.then.13 ], [ %12, %if.then.14 ], [ %12, %if.then.15 ], [ %12, %if.then.16 ], [ %12, %if.then.17 ], [ %12, %if.then.18 ], [ %12, %if.then.19 ], [ %12, %if.then.20 ], [ %12, %if.then.21 ], [ %12, %if.then.22 ], [ %12, %if.then.23 ], [ %12, %if.then.24 ], [ %12, %if.then.25 ], [ %12, %for.cond4.preheader ] %54 = phi i32 [ %13, %if.then.1 ], [ %13, %for.inc.thread ], [ %13, %if.then.2 ], [ %13, %if.then.3 ], [ %13, %if.then.4 ], [ %13, %if.then.5 ], [ %13, %if.then.6 ], [ %13, %if.then.7 ], [ %13, %if.then.8 ], [ %13, %if.then.9 ], [ %13, %if.then.10 ], [ %13, %if.then.11 ], [ %13, %if.then.12 ], [ %inc.13, %if.then.13 ], [ %13, %if.then.14 ], [ %13, %if.then.15 ], [ %13, %if.then.16 ], [ %13, %if.then.17 ], [ %13, %if.then.18 ], [ %13, %if.then.19 ], [ %13, %if.then.20 ], [ %13, %if.then.21 ], [ %13, %if.then.22 ], [ %13, %if.then.23 ], [ %13, %if.then.24 ], [ %13, %if.then.25 ], [ %13, %for.cond4.preheader ] %55 = phi i32 [ %14, %if.then.1 ], [ %14, %for.inc.thread ], [ %14, %if.then.2 ], [ %14, %if.then.3 ], [ %14, %if.then.4 ], [ %14, %if.then.5 ], [ %14, %if.then.6 ], [ %14, %if.then.7 ], [ %14, %if.then.8 ], [ %14, %if.then.9 ], [ %14, %if.then.10 ], [ %14, %if.then.11 ], [ %14, %if.then.12 ], [ %14, %if.then.13 ], [ %inc.14, %if.then.14 ], [ %14, %if.then.15 ], [ %14, %if.then.16 ], [ %14, %if.then.17 ], [ %14, %if.then.18 ], [ %14, %if.then.19 ], [ %14, %if.then.20 ], [ %14, %if.then.21 ], [ %14, %if.then.22 ], [ %14, %if.then.23 ], [ %14, %if.then.24 ], [ %14, %if.then.25 ], [ %14, %for.cond4.preheader ] %56 = phi i32 [ %15, %if.then.1 ], [ %15, %for.inc.thread ], [ %15, %if.then.2 ], [ %15, %if.then.3 ], [ %15, %if.then.4 ], [ %15, %if.then.5 ], [ %15, %if.then.6 ], [ %15, %if.then.7 ], [ %15, %if.then.8 ], [ %15, %if.then.9 ], [ %15, %if.then.10 ], [ %15, %if.then.11 ], [ %15, %if.then.12 ], [ %15, %if.then.13 ], [ %15, %if.then.14 ], [ %inc.15, %if.then.15 ], [ %15, %if.then.16 ], [ %15, %if.then.17 ], [ %15, %if.then.18 ], [ %15, %if.then.19 ], [ %15, %if.then.20 ], [ %15, %if.then.21 ], [ %15, %if.then.22 ], [ %15, %if.then.23 ], [ %15, %if.then.24 ], [ %15, %if.then.25 ], [ %15, %for.cond4.preheader ] %57 = phi i32 [ %16, %if.then.1 ], [ %16, %for.inc.thread ], [ %16, %if.then.2 ], [ %16, %if.then.3 ], [ %16, %if.then.4 ], [ %16, %if.then.5 ], [ %16, %if.then.6 ], [ %16, %if.then.7 ], [ %16, %if.then.8 ], [ %16, %if.then.9 ], [ %16, %if.then.10 ], [ %16, %if.then.11 ], [ %16, %if.then.12 ], [ %16, %if.then.13 ], [ %16, %if.then.14 ], [ %16, %if.then.15 ], [ %inc.16, %if.then.16 ], [ %16, %if.then.17 ], [ %16, %if.then.18 ], [ %16, %if.then.19 ], [ %16, %if.then.20 ], [ %16, %if.then.21 ], [ %16, %if.then.22 ], [ %16, %if.then.23 ], [ %16, %if.then.24 ], [ %16, %if.then.25 ], [ %16, %for.cond4.preheader ] %58 = phi i32 [ %17, %if.then.1 ], [ %17, %for.inc.thread ], [ %17, %if.then.2 ], [ %17, %if.then.3 ], [ %17, %if.then.4 ], [ %17, %if.then.5 ], [ %17, %if.then.6 ], [ %17, %if.then.7 ], [ %17, %if.then.8 ], [ %17, %if.then.9 ], [ %17, %if.then.10 ], [ %17, %if.then.11 ], [ %17, %if.then.12 ], [ %17, %if.then.13 ], [ %17, %if.then.14 ], [ %17, %if.then.15 ], [ %17, %if.then.16 ], [ %inc.17, %if.then.17 ], [ %17, %if.then.18 ], [ %17, %if.then.19 ], [ %17, %if.then.20 ], [ %17, %if.then.21 ], [ %17, %if.then.22 ], [ %17, %if.then.23 ], [ %17, %if.then.24 ], [ %17, %if.then.25 ], [ %17, %for.cond4.preheader ] %59 = phi i32 [ %18, %if.then.1 ], [ %18, %for.inc.thread ], [ %18, %if.then.2 ], [ %18, %if.then.3 ], [ %18, %if.then.4 ], [ %18, %if.then.5 ], [ %18, %if.then.6 ], [ %18, %if.then.7 ], [ %18, %if.then.8 ], [ %18, %if.then.9 ], [ %18, %if.then.10 ], [ %18, %if.then.11 ], [ %18, %if.then.12 ], [ %18, %if.then.13 ], [ %18, %if.then.14 ], [ %18, %if.then.15 ], [ %18, %if.then.16 ], [ %18, %if.then.17 ], [ %inc.18, %if.then.18 ], [ %18, %if.then.19 ], [ %18, %if.then.20 ], [ %18, %if.then.21 ], [ %18, %if.then.22 ], [ %18, %if.then.23 ], [ %18, %if.then.24 ], [ %18, %if.then.25 ], [ %18, %for.cond4.preheader ] %60 = phi i32 [ %19, %if.then.1 ], [ %19, %for.inc.thread ], [ %19, %if.then.2 ], [ %19, %if.then.3 ], [ %19, %if.then.4 ], [ %19, %if.then.5 ], [ %19, %if.then.6 ], [ %19, %if.then.7 ], [ %19, %if.then.8 ], [ %19, %if.then.9 ], [ %19, %if.then.10 ], [ %19, %if.then.11 ], [ %19, %if.then.12 ], [ %19, %if.then.13 ], [ %19, %if.then.14 ], [ %19, %if.then.15 ], [ %19, %if.then.16 ], [ %19, %if.then.17 ], [ %19, %if.then.18 ], [ %inc.19, %if.then.19 ], [ %19, %if.then.20 ], [ %19, %if.then.21 ], [ %19, %if.then.22 ], [ %19, %if.then.23 ], [ %19, %if.then.24 ], [ %19, %if.then.25 ], [ %19, %for.cond4.preheader ] %61 = phi i32 [ %20, %if.then.1 ], [ %20, %for.inc.thread ], [ %20, %if.then.2 ], [ %20, %if.then.3 ], [ %20, %if.then.4 ], [ %20, %if.then.5 ], [ %20, %if.then.6 ], [ %20, %if.then.7 ], [ %20, %if.then.8 ], [ %20, %if.then.9 ], [ %20, %if.then.10 ], [ %20, %if.then.11 ], [ %20, %if.then.12 ], [ %20, %if.then.13 ], [ %20, %if.then.14 ], [ %20, %if.then.15 ], [ %20, %if.then.16 ], [ %20, %if.then.17 ], [ %20, %if.then.18 ], [ %20, %if.then.19 ], [ %inc.20, %if.then.20 ], [ %20, %if.then.21 ], [ %20, %if.then.22 ], [ %20, %if.then.23 ], [ %20, %if.then.24 ], [ %20, %if.then.25 ], [ %20, %for.cond4.preheader ] %62 = phi i32 [ %21, %if.then.1 ], [ %21, %for.inc.thread ], [ %21, %if.then.2 ], [ %21, %if.then.3 ], [ %21, %if.then.4 ], [ %21, %if.then.5 ], [ %21, %if.then.6 ], [ %21, %if.then.7 ], [ %21, %if.then.8 ], [ %21, %if.then.9 ], [ %21, %if.then.10 ], [ %21, %if.then.11 ], [ %21, %if.then.12 ], [ %21, %if.then.13 ], [ %21, %if.then.14 ], [ %21, %if.then.15 ], [ %21, %if.then.16 ], [ %21, %if.then.17 ], [ %21, %if.then.18 ], [ %21, %if.then.19 ], [ %21, %if.then.20 ], [ %inc.21, %if.then.21 ], [ %21, %if.then.22 ], [ %21, %if.then.23 ], [ %21, %if.then.24 ], [ %21, %if.then.25 ], [ %21, %for.cond4.preheader ] %63 = phi i32 [ %22, %if.then.1 ], [ %22, %for.inc.thread ], [ %22, %if.then.2 ], [ %22, %if.then.3 ], [ %22, %if.then.4 ], [ %22, %if.then.5 ], [ %22, %if.then.6 ], [ %22, %if.then.7 ], [ %22, %if.then.8 ], [ %22, %if.then.9 ], [ %22, %if.then.10 ], [ %22, %if.then.11 ], [ %22, %if.then.12 ], [ %22, %if.then.13 ], [ %22, %if.then.14 ], [ %22, %if.then.15 ], [ %22, %if.then.16 ], [ %22, %if.then.17 ], [ %22, %if.then.18 ], [ %22, %if.then.19 ], [ %22, %if.then.20 ], [ %22, %if.then.21 ], [ %inc.22, %if.then.22 ], [ %22, %if.then.23 ], [ %22, %if.then.24 ], [ %22, %if.then.25 ], [ %22, %for.cond4.preheader ] %64 = phi i32 [ %23, %if.then.1 ], [ %23, %for.inc.thread ], [ %23, %if.then.2 ], [ %23, %if.then.3 ], [ %23, %if.then.4 ], [ %23, %if.then.5 ], [ %23, %if.then.6 ], [ %23, %if.then.7 ], [ %23, %if.then.8 ], [ %23, %if.then.9 ], [ %23, %if.then.10 ], [ %23, %if.then.11 ], [ %23, %if.then.12 ], [ %23, %if.then.13 ], [ %23, %if.then.14 ], [ %23, %if.then.15 ], [ %23, %if.then.16 ], [ %23, %if.then.17 ], [ %23, %if.then.18 ], [ %23, %if.then.19 ], [ %23, %if.then.20 ], [ %23, %if.then.21 ], [ %23, %if.then.22 ], [ %inc.23, %if.then.23 ], [ %23, %if.then.24 ], [ %23, %if.then.25 ], [ %23, %for.cond4.preheader ] %65 = phi i32 [ %24, %if.then.1 ], [ %24, %for.inc.thread ], [ %24, %if.then.2 ], [ %24, %if.then.3 ], [ %24, %if.then.4 ], [ %24, %if.then.5 ], [ %24, %if.then.6 ], [ %24, %if.then.7 ], [ %24, %if.then.8 ], [ %24, %if.then.9 ], [ %24, %if.then.10 ], [ %24, %if.then.11 ], [ %24, %if.then.12 ], [ %24, %if.then.13 ], [ %24, %if.then.14 ], [ %24, %if.then.15 ], [ %24, %if.then.16 ], [ %24, %if.then.17 ], [ %24, %if.then.18 ], [ %24, %if.then.19 ], [ %24, %if.then.20 ], [ %24, %if.then.21 ], [ %24, %if.then.22 ], [ %24, %if.then.23 ], [ %inc.24, %if.then.24 ], [ %24, %if.then.25 ], [ %24, %for.cond4.preheader ] %66 = phi i32 [ %25, %if.then.1 ], [ %25, %for.inc.thread ], [ %25, %if.then.2 ], [ %25, %if.then.3 ], [ %25, %if.then.4 ], [ %25, %if.then.5 ], [ %25, %if.then.6 ], [ %25, %if.then.7 ], [ %25, %if.then.8 ], [ %25, %if.then.9 ], [ %25, %if.then.10 ], [ %25, %if.then.11 ], [ %25, %if.then.12 ], [ %25, %if.then.13 ], [ %25, %if.then.14 ], [ %25, %if.then.15 ], [ %25, %if.then.16 ], [ %25, %if.then.17 ], [ %25, %if.then.18 ], [ %25, %if.then.19 ], [ %25, %if.then.20 ], [ %25, %if.then.21 ], [ %25, %if.then.22 ], [ %25, %if.then.23 ], [ %25, %if.then.24 ], [ %inc.25, %if.then.25 ], [ %25, %for.cond4.preheader ] %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.cond20.preheader, label %for.cond4.preheader, !llvm.loop !10 } ; 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(argmem: read) declare i64 @strlen(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 nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v16i32(<16 x i32>) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v8i32(<8 x i32>) #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(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 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main() { int a[26] = {}; char c; int i; while((c = getchar()) != EOF) { int k = c - 'a'; a[k] += 1; } for (i=0; i<26; i++) { int tmp = a[i]; if (tmp % 2 == 0) continue; else { puts("No"); return 0; } } puts("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291597/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"No\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [26 x i32], align 16 call void @llvm.lifetime.start.p0(i64 104, ptr nonnull %a) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(104) %a, i8 0, i64 104, i1 false) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i17 = tail call i32 @getc(ptr noundef %0) %sext18 = shl i32 %call.i17, 24 %cmp.not19 = icmp eq i32 %sext18, -16777216 br i1 %cmp.not19, label %for.cond, label %while.body for.cond.preheader: ; preds = %while.body %.pre = load i32, ptr %a, align 16, !tbaa !9 %1 = and i32 %.pre, 1 %2 = icmp eq i32 %1, 0 br i1 %2, label %for.cond, label %if.else while.body: ; preds = %entry, %while.body %sext20 = phi i32 [ %sext, %while.body ], [ %sext18, %entry ] %conv1 = ashr exact i32 %sext20, 24 %sub = add nsw i32 %conv1, -97 %idxprom = sext i32 %sub to i64 %arrayidx = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 %idxprom %3 = load i32, ptr %arrayidx, align 4, !tbaa !9 %add = add nsw i32 %3, 1 store i32 %add, ptr %arrayidx, align 4, !tbaa !9 %4 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %4) %sext = shl i32 %call.i, 24 %cmp.not = icmp eq i32 %sext, -16777216 br i1 %cmp.not, label %for.cond.preheader, label %while.body, !llvm.loop !11 for.cond: ; preds = %entry, %for.cond.preheader %arrayidx7.1 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 1 %5 = load i32, ptr %arrayidx7.1, align 4, !tbaa !9 %6 = and i32 %5, 1 %cmp8.1 = icmp eq i32 %6, 0 br i1 %cmp8.1, label %for.cond.1, label %if.else for.cond.1: ; preds = %for.cond %arrayidx7.2 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 2 %7 = load i32, ptr %arrayidx7.2, align 8, !tbaa !9 %8 = and i32 %7, 1 %cmp8.2 = icmp eq i32 %8, 0 br i1 %cmp8.2, label %for.cond.2, label %if.else for.cond.2: ; preds = %for.cond.1 %arrayidx7.3 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 3 %9 = load i32, ptr %arrayidx7.3, align 4, !tbaa !9 %10 = and i32 %9, 1 %cmp8.3 = icmp eq i32 %10, 0 br i1 %cmp8.3, label %for.cond.3, label %if.else for.cond.3: ; preds = %for.cond.2 %arrayidx7.4 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 4 %11 = load i32, ptr %arrayidx7.4, align 16, !tbaa !9 %12 = and i32 %11, 1 %cmp8.4 = icmp eq i32 %12, 0 br i1 %cmp8.4, label %for.cond.4, label %if.else for.cond.4: ; preds = %for.cond.3 %arrayidx7.5 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 5 %13 = load i32, ptr %arrayidx7.5, align 4, !tbaa !9 %14 = and i32 %13, 1 %cmp8.5 = icmp eq i32 %14, 0 br i1 %cmp8.5, label %for.cond.5, label %if.else for.cond.5: ; preds = %for.cond.4 %arrayidx7.6 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 6 %15 = load i32, ptr %arrayidx7.6, align 8, !tbaa !9 %16 = and i32 %15, 1 %cmp8.6 = icmp eq i32 %16, 0 br i1 %cmp8.6, label %for.cond.6, label %if.else for.cond.6: ; preds = %for.cond.5 %arrayidx7.7 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 7 %17 = load i32, ptr %arrayidx7.7, align 4, !tbaa !9 %18 = and i32 %17, 1 %cmp8.7 = icmp eq i32 %18, 0 br i1 %cmp8.7, label %for.cond.7, label %if.else for.cond.7: ; preds = %for.cond.6 %arrayidx7.8 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 8 %19 = load i32, ptr %arrayidx7.8, align 16, !tbaa !9 %20 = and i32 %19, 1 %cmp8.8 = icmp eq i32 %20, 0 br i1 %cmp8.8, label %for.cond.8, label %if.else for.cond.8: ; preds = %for.cond.7 %arrayidx7.9 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 9 %21 = load i32, ptr %arrayidx7.9, align 4, !tbaa !9 %22 = and i32 %21, 1 %cmp8.9 = icmp eq i32 %22, 0 br i1 %cmp8.9, label %for.cond.9, label %if.else for.cond.9: ; preds = %for.cond.8 %arrayidx7.10 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 10 %23 = load i32, ptr %arrayidx7.10, align 8, !tbaa !9 %24 = and i32 %23, 1 %cmp8.10 = icmp eq i32 %24, 0 br i1 %cmp8.10, label %for.cond.10, label %if.else for.cond.10: ; preds = %for.cond.9 %arrayidx7.11 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 11 %25 = load i32, ptr %arrayidx7.11, align 4, !tbaa !9 %26 = and i32 %25, 1 %cmp8.11 = icmp eq i32 %26, 0 br i1 %cmp8.11, label %for.cond.11, label %if.else for.cond.11: ; preds = %for.cond.10 %arrayidx7.12 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 12 %27 = load i32, ptr %arrayidx7.12, align 16, !tbaa !9 %28 = and i32 %27, 1 %cmp8.12 = icmp eq i32 %28, 0 br i1 %cmp8.12, label %for.cond.12, label %if.else for.cond.12: ; preds = %for.cond.11 %arrayidx7.13 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 13 %29 = load i32, ptr %arrayidx7.13, align 4, !tbaa !9 %30 = and i32 %29, 1 %cmp8.13 = icmp eq i32 %30, 0 br i1 %cmp8.13, label %for.cond.13, label %if.else for.cond.13: ; preds = %for.cond.12 %arrayidx7.14 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 14 %31 = load i32, ptr %arrayidx7.14, align 8, !tbaa !9 %32 = and i32 %31, 1 %cmp8.14 = icmp eq i32 %32, 0 br i1 %cmp8.14, label %for.cond.14, label %if.else for.cond.14: ; preds = %for.cond.13 %arrayidx7.15 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 15 %33 = load i32, ptr %arrayidx7.15, align 4, !tbaa !9 %34 = and i32 %33, 1 %cmp8.15 = icmp eq i32 %34, 0 br i1 %cmp8.15, label %for.cond.15, label %if.else for.cond.15: ; preds = %for.cond.14 %arrayidx7.16 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 16 %35 = load i32, ptr %arrayidx7.16, align 16, !tbaa !9 %36 = and i32 %35, 1 %cmp8.16 = icmp eq i32 %36, 0 br i1 %cmp8.16, label %for.cond.16, label %if.else for.cond.16: ; preds = %for.cond.15 %arrayidx7.17 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 17 %37 = load i32, ptr %arrayidx7.17, align 4, !tbaa !9 %38 = and i32 %37, 1 %cmp8.17 = icmp eq i32 %38, 0 br i1 %cmp8.17, label %for.cond.17, label %if.else for.cond.17: ; preds = %for.cond.16 %arrayidx7.18 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 18 %39 = load i32, ptr %arrayidx7.18, align 8, !tbaa !9 %40 = and i32 %39, 1 %cmp8.18 = icmp eq i32 %40, 0 br i1 %cmp8.18, label %for.cond.18, label %if.else for.cond.18: ; preds = %for.cond.17 %arrayidx7.19 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 19 %41 = load i32, ptr %arrayidx7.19, align 4, !tbaa !9 %42 = and i32 %41, 1 %cmp8.19 = icmp eq i32 %42, 0 br i1 %cmp8.19, label %for.cond.19, label %if.else for.cond.19: ; preds = %for.cond.18 %arrayidx7.20 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 20 %43 = load i32, ptr %arrayidx7.20, align 16, !tbaa !9 %44 = and i32 %43, 1 %cmp8.20 = icmp eq i32 %44, 0 br i1 %cmp8.20, label %for.cond.20, label %if.else for.cond.20: ; preds = %for.cond.19 %arrayidx7.21 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 21 %45 = load i32, ptr %arrayidx7.21, align 4, !tbaa !9 %46 = and i32 %45, 1 %cmp8.21 = icmp eq i32 %46, 0 br i1 %cmp8.21, label %for.cond.21, label %if.else for.cond.21: ; preds = %for.cond.20 %arrayidx7.22 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 22 %47 = load i32, ptr %arrayidx7.22, align 8, !tbaa !9 %48 = and i32 %47, 1 %cmp8.22 = icmp eq i32 %48, 0 br i1 %cmp8.22, label %for.cond.22, label %if.else for.cond.22: ; preds = %for.cond.21 %arrayidx7.23 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 23 %49 = load i32, ptr %arrayidx7.23, align 4, !tbaa !9 %50 = and i32 %49, 1 %cmp8.23 = icmp eq i32 %50, 0 br i1 %cmp8.23, label %for.cond.23, label %if.else for.cond.23: ; preds = %for.cond.22 %arrayidx7.24 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 24 %51 = load i32, ptr %arrayidx7.24, align 16, !tbaa !9 %52 = and i32 %51, 1 %cmp8.24 = icmp eq i32 %52, 0 br i1 %cmp8.24, label %for.cond.24, label %if.else for.cond.24: ; preds = %for.cond.23 %arrayidx7.25 = getelementptr inbounds [26 x i32], ptr %a, i64 0, i64 25 %53 = load i32, ptr %arrayidx7.25, align 4, !tbaa !9 %54 = and i32 %53, 1 %cmp8.25 = icmp eq i32 %54, 0 br i1 %cmp8.25, label %cleanup12, label %if.else if.else: ; preds = %for.cond.24, %for.cond.23, %for.cond.22, %for.cond.21, %for.cond.20, %for.cond.19, %for.cond.18, %for.cond.17, %for.cond.16, %for.cond.15, %for.cond.14, %for.cond.13, %for.cond.12, %for.cond.11, %for.cond.10, %for.cond.9, %for.cond.8, %for.cond.7, %for.cond.6, %for.cond.5, %for.cond.4, %for.cond.3, %for.cond.2, %for.cond.1, %for.cond, %for.cond.preheader br label %cleanup12 cleanup12: ; preds = %for.cond.24, %if.else %.str.sink = phi ptr [ @.str, %if.else ], [ @.str.1, %for.cond.24 ] %call10 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.sink) call void @llvm.lifetime.end.p0(i64 104, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture 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 = { 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 = { 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 = !{!"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 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> int main() { char w[123]; int w_long, abc[26] = { 0 }, flag = 1; scanf("%s", &w); w_long = strlen(w); for (int i = 0; i < w_long; i++) { switch (w[i]) { case 'a': abc[0]++; break; case 'b': abc[1]++; break; case 'c': abc[2]++; break; case 'd': abc[3]++; break; case 'e': abc[4]++; break; case 'f': abc[5]++; break; case 'g': abc[6]++; break; case 'h': abc[7]++; break; case 'i': abc[8]++; break; case 'j': abc[9]++; break; case 'k': abc[10]++; break; case 'l': abc[11]++; break; case 'm': abc[12]++; break; case 'n': abc[13]++; break; case 'o': abc[14]++; break; case 'p': abc[15]++; break; case 'q': abc[16]++; break; case 'r': abc[17]++; break; case 's': abc[18]++; break; case 't': abc[19]++; break; case 'u': abc[20]++; break; case 'v': abc[21]++; break; case 'w': abc[22]++; break; case 'x': abc[23]++; break; case 'y': abc[24]++; break; case 'z': abc[25]++; break; } } for (int i = 0; i < 26; i++) { if (abc[i] % 2 != 0) { flag = -1; break; } } if (flag == 1) { printf("Yes"); } else { printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291654/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"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: %w = alloca [123 x i8], align 16 call void @llvm.lifetime.start.p0(i64 123, ptr nonnull %w) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %call1 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %w) #5 %conv = trunc i64 %call1 to i32 %cmp108 = icmp sgt i32 %conv, 0 br i1 %cmp108, label %for.body.lr.ph, label %if.end99 for.body.lr.ph: ; preds = %entry %wide.trip.count = and i64 %call1, 4294967295 br label %for.body for.cond82.preheader: ; preds = %for.inc %0 = and i32 %54, 1 %1 = icmp ne i32 %0, 0 %2 = and i32 %inc7158, 1 %3 = icmp ne i32 %2, 0 %4 = and i32 %inc10156, 1 %5 = icmp ne i32 %4, 0 %6 = and i32 %inc13154, 1 %7 = icmp ne i32 %6, 0 %8 = and i32 %inc16152, 1 %9 = icmp ne i32 %8, 0 %10 = and i32 %inc19150, 1 %11 = icmp ne i32 %10, 0 %12 = and i32 %inc22148, 1 %13 = icmp ne i32 %12, 0 %14 = and i32 %inc25146, 1 %15 = icmp ne i32 %14, 0 %16 = and i32 %inc28144, 1 %17 = icmp ne i32 %16, 0 %18 = and i32 %inc31142, 1 %19 = icmp ne i32 %18, 0 %20 = and i32 %inc34140, 1 %21 = icmp ne i32 %20, 0 %22 = and i32 %inc37138, 1 %23 = icmp ne i32 %22, 0 %24 = and i32 %inc40136, 1 %25 = icmp ne i32 %24, 0 %26 = and i32 %inc43134, 1 %27 = icmp ne i32 %26, 0 %28 = and i32 %inc46132, 1 %29 = icmp ne i32 %28, 0 %30 = and i32 %inc49130, 1 %31 = icmp ne i32 %30, 0 %32 = and i32 %inc52128, 1 %33 = icmp ne i32 %32, 0 %34 = and i32 %inc55126, 1 %35 = icmp ne i32 %34, 0 %36 = and i32 %inc58124, 1 %37 = icmp ne i32 %36, 0 %38 = and i32 %inc61122, 1 %39 = icmp ne i32 %38, 0 %40 = and i32 %inc64120, 1 %41 = icmp ne i32 %40, 0 %42 = and i32 %inc67118, 1 %43 = icmp ne i32 %42, 0 %44 = and i32 %inc70116, 1 %45 = icmp ne i32 %44, 0 %46 = and i32 %inc73114, 1 %47 = icmp ne i32 %46, 0 %48 = and i32 %inc76112, 1 %49 = icmp ne i32 %48, 0 %50 = and i32 %inc79110, 1 %51 = icmp ne i32 %50, 0 %brmerge = select i1 %1, i1 true, i1 %3 %brmerge870 = select i1 %brmerge, i1 true, i1 %5 %brmerge872 = select i1 %brmerge870, i1 true, i1 %7 %brmerge874 = select i1 %brmerge872, i1 true, i1 %9 %brmerge876 = select i1 %brmerge874, i1 true, i1 %11 %brmerge878 = select i1 %brmerge876, i1 true, i1 %13 %brmerge880 = select i1 %brmerge878, i1 true, i1 %15 %brmerge882 = select i1 %brmerge880, i1 true, i1 %17 %brmerge884 = select i1 %brmerge882, i1 true, i1 %19 %brmerge886 = select i1 %brmerge884, i1 true, i1 %21 %brmerge888 = select i1 %brmerge886, i1 true, i1 %23 %brmerge890 = select i1 %brmerge888, i1 true, i1 %25 %brmerge892 = select i1 %brmerge890, i1 true, i1 %27 %brmerge894 = select i1 %brmerge892, i1 true, i1 %29 %brmerge896 = select i1 %brmerge894, i1 true, i1 %31 %brmerge898 = select i1 %brmerge896, i1 true, i1 %33 %brmerge900 = select i1 %brmerge898, i1 true, i1 %35 %brmerge902 = select i1 %brmerge900, i1 true, i1 %37 %brmerge904 = select i1 %brmerge902, i1 true, i1 %39 %brmerge906 = select i1 %brmerge904, i1 true, i1 %41 %brmerge908 = select i1 %brmerge906, i1 true, i1 %43 %brmerge910 = select i1 %brmerge908, i1 true, i1 %45 %brmerge912 = select i1 %brmerge910, i1 true, i1 %47 %brmerge914 = select i1 %brmerge912, i1 true, i1 %49 %brmerge916 = select i1 %brmerge914, i1 true, i1 %51 %spec.select = select i1 %brmerge916, ptr @.str.2, ptr @.str.1 br label %if.end99 for.body: ; preds = %for.body.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc ] %inc7159 = phi i32 [ 0, %for.body.lr.ph ], [ %inc7158, %for.inc ] %inc10157 = phi i32 [ 0, %for.body.lr.ph ], [ %inc10156, %for.inc ] %inc13155 = phi i32 [ 0, %for.body.lr.ph ], [ %inc13154, %for.inc ] %inc16153 = phi i32 [ 0, %for.body.lr.ph ], [ %inc16152, %for.inc ] %inc19151 = phi i32 [ 0, %for.body.lr.ph ], [ %inc19150, %for.inc ] %inc22149 = phi i32 [ 0, %for.body.lr.ph ], [ %inc22148, %for.inc ] %inc25147 = phi i32 [ 0, %for.body.lr.ph ], [ %inc25146, %for.inc ] %inc28145 = phi i32 [ 0, %for.body.lr.ph ], [ %inc28144, %for.inc ] %inc31143 = phi i32 [ 0, %for.body.lr.ph ], [ %inc31142, %for.inc ] %inc34141 = phi i32 [ 0, %for.body.lr.ph ], [ %inc34140, %for.inc ] %inc37139 = phi i32 [ 0, %for.body.lr.ph ], [ %inc37138, %for.inc ] %inc40137 = phi i32 [ 0, %for.body.lr.ph ], [ %inc40136, %for.inc ] %inc43135 = phi i32 [ 0, %for.body.lr.ph ], [ %inc43134, %for.inc ] %inc46133 = phi i32 [ 0, %for.body.lr.ph ], [ %inc46132, %for.inc ] %inc49131 = phi i32 [ 0, %for.body.lr.ph ], [ %inc49130, %for.inc ] %inc52129 = phi i32 [ 0, %for.body.lr.ph ], [ %inc52128, %for.inc ] %inc55127 = phi i32 [ 0, %for.body.lr.ph ], [ %inc55126, %for.inc ] %inc58125 = phi i32 [ 0, %for.body.lr.ph ], [ %inc58124, %for.inc ] %inc61123 = phi i32 [ 0, %for.body.lr.ph ], [ %inc61122, %for.inc ] %inc64121 = phi i32 [ 0, %for.body.lr.ph ], [ %inc64120, %for.inc ] %inc67119 = phi i32 [ 0, %for.body.lr.ph ], [ %inc67118, %for.inc ] %inc70117 = phi i32 [ 0, %for.body.lr.ph ], [ %inc70116, %for.inc ] %inc73115 = phi i32 [ 0, %for.body.lr.ph ], [ %inc73114, %for.inc ] %inc76113 = phi i32 [ 0, %for.body.lr.ph ], [ %inc76112, %for.inc ] %inc79111 = phi i32 [ 0, %for.body.lr.ph ], [ %inc79110, %for.inc ] %52 = phi i32 [ 0, %for.body.lr.ph ], [ %54, %for.inc ] %arrayidx = getelementptr inbounds [123 x i8], ptr %w, i64 0, i64 %indvars.iv %53 = load i8, ptr %arrayidx, align 1, !tbaa !5 %conv3 = sext i8 %53 to i32 switch i32 %conv3, label %for.inc [ i32 97, label %sw.bb i32 98, label %sw.bb5 i32 99, label %sw.bb8 i32 100, label %sw.bb11 i32 101, label %sw.bb14 i32 102, label %sw.bb17 i32 103, label %sw.bb20 i32 104, label %sw.bb23 i32 105, label %sw.bb26 i32 106, label %sw.bb29 i32 107, label %sw.bb32 i32 108, label %sw.bb35 i32 109, label %sw.bb38 i32 110, label %sw.bb41 i32 111, label %sw.bb44 i32 112, label %sw.bb47 i32 113, label %sw.bb50 i32 114, label %sw.bb53 i32 115, label %sw.bb56 i32 116, label %sw.bb59 i32 117, label %sw.bb62 i32 118, label %sw.bb65 i32 119, label %sw.bb68 i32 120, label %sw.bb71 i32 121, label %sw.bb74 i32 122, label %sw.bb77 ] sw.bb: ; preds = %for.body %inc = add nsw i32 %52, 1 br label %for.inc sw.bb5: ; preds = %for.body %inc7 = add nsw i32 %inc7159, 1 br label %for.inc sw.bb8: ; preds = %for.body %inc10 = add nsw i32 %inc10157, 1 br label %for.inc sw.bb11: ; preds = %for.body %inc13 = add nsw i32 %inc13155, 1 br label %for.inc sw.bb14: ; preds = %for.body %inc16 = add nsw i32 %inc16153, 1 br label %for.inc sw.bb17: ; preds = %for.body %inc19 = add nsw i32 %inc19151, 1 br label %for.inc sw.bb20: ; preds = %for.body %inc22 = add nsw i32 %inc22149, 1 br label %for.inc sw.bb23: ; preds = %for.body %inc25 = add nsw i32 %inc25147, 1 br label %for.inc sw.bb26: ; preds = %for.body %inc28 = add nsw i32 %inc28145, 1 br label %for.inc sw.bb29: ; preds = %for.body %inc31 = add nsw i32 %inc31143, 1 br label %for.inc sw.bb32: ; preds = %for.body %inc34 = add nsw i32 %inc34141, 1 br label %for.inc sw.bb35: ; preds = %for.body %inc37 = add nsw i32 %inc37139, 1 br label %for.inc sw.bb38: ; preds = %for.body %inc40 = add nsw i32 %inc40137, 1 br label %for.inc sw.bb41: ; preds = %for.body %inc43 = add nsw i32 %inc43135, 1 br label %for.inc sw.bb44: ; preds = %for.body %inc46 = add nsw i32 %inc46133, 1 br label %for.inc sw.bb47: ; preds = %for.body %inc49 = add nsw i32 %inc49131, 1 br label %for.inc sw.bb50: ; preds = %for.body %inc52 = add nsw i32 %inc52129, 1 br label %for.inc sw.bb53: ; preds = %for.body %inc55 = add nsw i32 %inc55127, 1 br label %for.inc sw.bb56: ; preds = %for.body %inc58 = add nsw i32 %inc58125, 1 br label %for.inc sw.bb59: ; preds = %for.body %inc61 = add nsw i32 %inc61123, 1 br label %for.inc sw.bb62: ; preds = %for.body %inc64 = add nsw i32 %inc64121, 1 br label %for.inc sw.bb65: ; preds = %for.body %inc67 = add nsw i32 %inc67119, 1 br label %for.inc sw.bb68: ; preds = %for.body %inc70 = add nsw i32 %inc70117, 1 br label %for.inc sw.bb71: ; preds = %for.body %inc73 = add nsw i32 %inc73115, 1 br label %for.inc sw.bb74: ; preds = %for.body %inc76 = add nsw i32 %inc76113, 1 br label %for.inc sw.bb77: ; preds = %for.body %inc79 = add nsw i32 %inc79111, 1 br label %for.inc for.inc: ; preds = %sw.bb, %sw.bb5, %sw.bb8, %sw.bb11, %sw.bb14, %sw.bb17, %sw.bb20, %sw.bb23, %sw.bb26, %sw.bb29, %sw.bb32, %sw.bb35, %sw.bb38, %sw.bb41, %sw.bb44, %sw.bb47, %sw.bb50, %sw.bb53, %sw.bb56, %sw.bb59, %sw.bb62, %sw.bb65, %sw.bb68, %sw.bb71, %sw.bb74, %sw.bb77, %for.body %inc7158 = phi i32 [ %inc7159, %sw.bb ], [ %inc7, %sw.bb5 ], [ %inc7159, %sw.bb8 ], [ %inc7159, %sw.bb11 ], [ %inc7159, %sw.bb14 ], [ %inc7159, %sw.bb17 ], [ %inc7159, %sw.bb20 ], [ %inc7159, %sw.bb23 ], [ %inc7159, %sw.bb26 ], [ %inc7159, %sw.bb29 ], [ %inc7159, %sw.bb32 ], [ %inc7159, %sw.bb35 ], [ %inc7159, %sw.bb38 ], [ %inc7159, %sw.bb41 ], [ %inc7159, %sw.bb44 ], [ %inc7159, %sw.bb47 ], [ %inc7159, %sw.bb50 ], [ %inc7159, %sw.bb53 ], [ %inc7159, %sw.bb56 ], [ %inc7159, %sw.bb59 ], [ %inc7159, %sw.bb62 ], [ %inc7159, %sw.bb65 ], [ %inc7159, %sw.bb68 ], [ %inc7159, %sw.bb71 ], [ %inc7159, %sw.bb74 ], [ %inc7159, %sw.bb77 ], [ %inc7159, %for.body ] %inc10156 = phi i32 [ %inc10157, %sw.bb ], [ %inc10157, %sw.bb5 ], [ %inc10, %sw.bb8 ], [ %inc10157, %sw.bb11 ], [ %inc10157, %sw.bb14 ], [ %inc10157, %sw.bb17 ], [ %inc10157, %sw.bb20 ], [ %inc10157, %sw.bb23 ], [ %inc10157, %sw.bb26 ], [ %inc10157, %sw.bb29 ], [ %inc10157, %sw.bb32 ], [ %inc10157, %sw.bb35 ], [ %inc10157, %sw.bb38 ], [ %inc10157, %sw.bb41 ], [ %inc10157, %sw.bb44 ], [ %inc10157, %sw.bb47 ], [ %inc10157, %sw.bb50 ], [ %inc10157, %sw.bb53 ], [ %inc10157, %sw.bb56 ], [ %inc10157, %sw.bb59 ], [ %inc10157, %sw.bb62 ], [ %inc10157, %sw.bb65 ], [ %inc10157, %sw.bb68 ], [ %inc10157, %sw.bb71 ], [ %inc10157, %sw.bb74 ], [ %inc10157, %sw.bb77 ], [ %inc10157, %for.body ] %inc13154 = phi i32 [ %inc13155, %sw.bb ], [ %inc13155, %sw.bb5 ], [ %inc13155, %sw.bb8 ], [ %inc13, %sw.bb11 ], [ %inc13155, %sw.bb14 ], [ %inc13155, %sw.bb17 ], [ %inc13155, %sw.bb20 ], [ %inc13155, %sw.bb23 ], [ %inc13155, %sw.bb26 ], [ %inc13155, %sw.bb29 ], [ %inc13155, %sw.bb32 ], [ %inc13155, %sw.bb35 ], [ %inc13155, %sw.bb38 ], [ %inc13155, %sw.bb41 ], [ %inc13155, %sw.bb44 ], [ %inc13155, %sw.bb47 ], [ %inc13155, %sw.bb50 ], [ %inc13155, %sw.bb53 ], [ %inc13155, %sw.bb56 ], [ %inc13155, %sw.bb59 ], [ %inc13155, %sw.bb62 ], [ %inc13155, %sw.bb65 ], [ %inc13155, %sw.bb68 ], [ %inc13155, %sw.bb71 ], [ %inc13155, %sw.bb74 ], [ %inc13155, %sw.bb77 ], [ %inc13155, %for.body ] %inc16152 = phi i32 [ %inc16153, %sw.bb ], [ %inc16153, %sw.bb5 ], [ %inc16153, %sw.bb8 ], [ %inc16153, %sw.bb11 ], [ %inc16, %sw.bb14 ], [ %inc16153, %sw.bb17 ], [ %inc16153, %sw.bb20 ], [ %inc16153, %sw.bb23 ], [ %inc16153, %sw.bb26 ], [ %inc16153, %sw.bb29 ], [ %inc16153, %sw.bb32 ], [ %inc16153, %sw.bb35 ], [ %inc16153, %sw.bb38 ], [ %inc16153, %sw.bb41 ], [ %inc16153, %sw.bb44 ], [ %inc16153, %sw.bb47 ], [ %inc16153, %sw.bb50 ], [ %inc16153, %sw.bb53 ], [ %inc16153, %sw.bb56 ], [ %inc16153, %sw.bb59 ], [ %inc16153, %sw.bb62 ], [ %inc16153, %sw.bb65 ], [ %inc16153, %sw.bb68 ], [ %inc16153, %sw.bb71 ], [ %inc16153, %sw.bb74 ], [ %inc16153, %sw.bb77 ], [ %inc16153, %for.body ] %inc19150 = phi i32 [ %inc19151, %sw.bb ], [ %inc19151, %sw.bb5 ], [ %inc19151, %sw.bb8 ], [ %inc19151, %sw.bb11 ], [ %inc19151, %sw.bb14 ], [ %inc19, %sw.bb17 ], [ %inc19151, %sw.bb20 ], [ %inc19151, %sw.bb23 ], [ %inc19151, %sw.bb26 ], [ %inc19151, %sw.bb29 ], [ %inc19151, %sw.bb32 ], [ %inc19151, %sw.bb35 ], [ %inc19151, %sw.bb38 ], [ %inc19151, %sw.bb41 ], [ %inc19151, %sw.bb44 ], [ %inc19151, %sw.bb47 ], [ %inc19151, %sw.bb50 ], [ %inc19151, %sw.bb53 ], [ %inc19151, %sw.bb56 ], [ %inc19151, %sw.bb59 ], [ %inc19151, %sw.bb62 ], [ %inc19151, %sw.bb65 ], [ %inc19151, %sw.bb68 ], [ %inc19151, %sw.bb71 ], [ %inc19151, %sw.bb74 ], [ %inc19151, %sw.bb77 ], [ %inc19151, %for.body ] %inc22148 = phi i32 [ %inc22149, %sw.bb ], [ %inc22149, %sw.bb5 ], [ %inc22149, %sw.bb8 ], [ %inc22149, %sw.bb11 ], [ %inc22149, %sw.bb14 ], [ %inc22149, %sw.bb17 ], [ %inc22, %sw.bb20 ], [ %inc22149, %sw.bb23 ], [ %inc22149, %sw.bb26 ], [ %inc22149, %sw.bb29 ], [ %inc22149, %sw.bb32 ], [ %inc22149, %sw.bb35 ], [ %inc22149, %sw.bb38 ], [ %inc22149, %sw.bb41 ], [ %inc22149, %sw.bb44 ], [ %inc22149, %sw.bb47 ], [ %inc22149, %sw.bb50 ], [ %inc22149, %sw.bb53 ], [ %inc22149, %sw.bb56 ], [ %inc22149, %sw.bb59 ], [ %inc22149, %sw.bb62 ], [ %inc22149, %sw.bb65 ], [ %inc22149, %sw.bb68 ], [ %inc22149, %sw.bb71 ], [ %inc22149, %sw.bb74 ], [ %inc22149, %sw.bb77 ], [ %inc22149, %for.body ] %inc25146 = phi i32 [ %inc25147, %sw.bb ], [ %inc25147, %sw.bb5 ], [ %inc25147, %sw.bb8 ], [ %inc25147, %sw.bb11 ], [ %inc25147, %sw.bb14 ], [ %inc25147, %sw.bb17 ], [ %inc25147, %sw.bb20 ], [ %inc25, %sw.bb23 ], [ %inc25147, %sw.bb26 ], [ %inc25147, %sw.bb29 ], [ %inc25147, %sw.bb32 ], [ %inc25147, %sw.bb35 ], [ %inc25147, %sw.bb38 ], [ %inc25147, %sw.bb41 ], [ %inc25147, %sw.bb44 ], [ %inc25147, %sw.bb47 ], [ %inc25147, %sw.bb50 ], [ %inc25147, %sw.bb53 ], [ %inc25147, %sw.bb56 ], [ %inc25147, %sw.bb59 ], [ %inc25147, %sw.bb62 ], [ %inc25147, %sw.bb65 ], [ %inc25147, %sw.bb68 ], [ %inc25147, %sw.bb71 ], [ %inc25147, %sw.bb74 ], [ %inc25147, %sw.bb77 ], [ %inc25147, %for.body ] %inc28144 = phi i32 [ %inc28145, %sw.bb ], [ %inc28145, %sw.bb5 ], [ %inc28145, %sw.bb8 ], [ %inc28145, %sw.bb11 ], [ %inc28145, %sw.bb14 ], [ %inc28145, %sw.bb17 ], [ %inc28145, %sw.bb20 ], [ %inc28145, %sw.bb23 ], [ %inc28, %sw.bb26 ], [ %inc28145, %sw.bb29 ], [ %inc28145, %sw.bb32 ], [ %inc28145, %sw.bb35 ], [ %inc28145, %sw.bb38 ], [ %inc28145, %sw.bb41 ], [ %inc28145, %sw.bb44 ], [ %inc28145, %sw.bb47 ], [ %inc28145, %sw.bb50 ], [ %inc28145, %sw.bb53 ], [ %inc28145, %sw.bb56 ], [ %inc28145, %sw.bb59 ], [ %inc28145, %sw.bb62 ], [ %inc28145, %sw.bb65 ], [ %inc28145, %sw.bb68 ], [ %inc28145, %sw.bb71 ], [ %inc28145, %sw.bb74 ], [ %inc28145, %sw.bb77 ], [ %inc28145, %for.body ] %inc31142 = phi i32 [ %inc31143, %sw.bb ], [ %inc31143, %sw.bb5 ], [ %inc31143, %sw.bb8 ], [ %inc31143, %sw.bb11 ], [ %inc31143, %sw.bb14 ], [ %inc31143, %sw.bb17 ], [ %inc31143, %sw.bb20 ], [ %inc31143, %sw.bb23 ], [ %inc31143, %sw.bb26 ], [ %inc31, %sw.bb29 ], [ %inc31143, %sw.bb32 ], [ %inc31143, %sw.bb35 ], [ %inc31143, %sw.bb38 ], [ %inc31143, %sw.bb41 ], [ %inc31143, %sw.bb44 ], [ %inc31143, %sw.bb47 ], [ %inc31143, %sw.bb50 ], [ %inc31143, %sw.bb53 ], [ %inc31143, %sw.bb56 ], [ %inc31143, %sw.bb59 ], [ %inc31143, %sw.bb62 ], [ %inc31143, %sw.bb65 ], [ %inc31143, %sw.bb68 ], [ %inc31143, %sw.bb71 ], [ %inc31143, %sw.bb74 ], [ %inc31143, %sw.bb77 ], [ %inc31143, %for.body ] %inc34140 = phi i32 [ %inc34141, %sw.bb ], [ %inc34141, %sw.bb5 ], [ %inc34141, %sw.bb8 ], [ %inc34141, %sw.bb11 ], [ %inc34141, %sw.bb14 ], [ %inc34141, %sw.bb17 ], [ %inc34141, %sw.bb20 ], [ %inc34141, %sw.bb23 ], [ %inc34141, %sw.bb26 ], [ %inc34141, %sw.bb29 ], [ %inc34, %sw.bb32 ], [ %inc34141, %sw.bb35 ], [ %inc34141, %sw.bb38 ], [ %inc34141, %sw.bb41 ], [ %inc34141, %sw.bb44 ], [ %inc34141, %sw.bb47 ], [ %inc34141, %sw.bb50 ], [ %inc34141, %sw.bb53 ], [ %inc34141, %sw.bb56 ], [ %inc34141, %sw.bb59 ], [ %inc34141, %sw.bb62 ], [ %inc34141, %sw.bb65 ], [ %inc34141, %sw.bb68 ], [ %inc34141, %sw.bb71 ], [ %inc34141, %sw.bb74 ], [ %inc34141, %sw.bb77 ], [ %inc34141, %for.body ] %inc37138 = phi i32 [ %inc37139, %sw.bb ], [ %inc37139, %sw.bb5 ], [ %inc37139, %sw.bb8 ], [ %inc37139, %sw.bb11 ], [ %inc37139, %sw.bb14 ], [ %inc37139, %sw.bb17 ], [ %inc37139, %sw.bb20 ], [ %inc37139, %sw.bb23 ], [ %inc37139, %sw.bb26 ], [ %inc37139, %sw.bb29 ], [ %inc37139, %sw.bb32 ], [ %inc37, %sw.bb35 ], [ %inc37139, %sw.bb38 ], [ %inc37139, %sw.bb41 ], [ %inc37139, %sw.bb44 ], [ %inc37139, %sw.bb47 ], [ %inc37139, %sw.bb50 ], [ %inc37139, %sw.bb53 ], [ %inc37139, %sw.bb56 ], [ %inc37139, %sw.bb59 ], [ %inc37139, %sw.bb62 ], [ %inc37139, %sw.bb65 ], [ %inc37139, %sw.bb68 ], [ %inc37139, %sw.bb71 ], [ %inc37139, %sw.bb74 ], [ %inc37139, %sw.bb77 ], [ %inc37139, %for.body ] %inc40136 = phi i32 [ %inc40137, %sw.bb ], [ %inc40137, %sw.bb5 ], [ %inc40137, %sw.bb8 ], [ %inc40137, %sw.bb11 ], [ %inc40137, %sw.bb14 ], [ %inc40137, %sw.bb17 ], [ %inc40137, %sw.bb20 ], [ %inc40137, %sw.bb23 ], [ %inc40137, %sw.bb26 ], [ %inc40137, %sw.bb29 ], [ %inc40137, %sw.bb32 ], [ %inc40137, %sw.bb35 ], [ %inc40, %sw.bb38 ], [ %inc40137, %sw.bb41 ], [ %inc40137, %sw.bb44 ], [ %inc40137, %sw.bb47 ], [ %inc40137, %sw.bb50 ], [ %inc40137, %sw.bb53 ], [ %inc40137, %sw.bb56 ], [ %inc40137, %sw.bb59 ], [ %inc40137, %sw.bb62 ], [ %inc40137, %sw.bb65 ], [ %inc40137, %sw.bb68 ], [ %inc40137, %sw.bb71 ], [ %inc40137, %sw.bb74 ], [ %inc40137, %sw.bb77 ], [ %inc40137, %for.body ] %inc43134 = phi i32 [ %inc43135, %sw.bb ], [ %inc43135, %sw.bb5 ], [ %inc43135, %sw.bb8 ], [ %inc43135, %sw.bb11 ], [ %inc43135, %sw.bb14 ], [ %inc43135, %sw.bb17 ], [ %inc43135, %sw.bb20 ], [ %inc43135, %sw.bb23 ], [ %inc43135, %sw.bb26 ], [ %inc43135, %sw.bb29 ], [ %inc43135, %sw.bb32 ], [ %inc43135, %sw.bb35 ], [ %inc43135, %sw.bb38 ], [ %inc43, %sw.bb41 ], [ %inc43135, %sw.bb44 ], [ %inc43135, %sw.bb47 ], [ %inc43135, %sw.bb50 ], [ %inc43135, %sw.bb53 ], [ %inc43135, %sw.bb56 ], [ %inc43135, %sw.bb59 ], [ %inc43135, %sw.bb62 ], [ %inc43135, %sw.bb65 ], [ %inc43135, %sw.bb68 ], [ %inc43135, %sw.bb71 ], [ %inc43135, %sw.bb74 ], [ %inc43135, %sw.bb77 ], [ %inc43135, %for.body ] %inc46132 = phi i32 [ %inc46133, %sw.bb ], [ %inc46133, %sw.bb5 ], [ %inc46133, %sw.bb8 ], [ %inc46133, %sw.bb11 ], [ %inc46133, %sw.bb14 ], [ %inc46133, %sw.bb17 ], [ %inc46133, %sw.bb20 ], [ %inc46133, %sw.bb23 ], [ %inc46133, %sw.bb26 ], [ %inc46133, %sw.bb29 ], [ %inc46133, %sw.bb32 ], [ %inc46133, %sw.bb35 ], [ %inc46133, %sw.bb38 ], [ %inc46133, %sw.bb41 ], [ %inc46, %sw.bb44 ], [ %inc46133, %sw.bb47 ], [ %inc46133, %sw.bb50 ], [ %inc46133, %sw.bb53 ], [ %inc46133, %sw.bb56 ], [ %inc46133, %sw.bb59 ], [ %inc46133, %sw.bb62 ], [ %inc46133, %sw.bb65 ], [ %inc46133, %sw.bb68 ], [ %inc46133, %sw.bb71 ], [ %inc46133, %sw.bb74 ], [ %inc46133, %sw.bb77 ], [ %inc46133, %for.body ] %inc49130 = phi i32 [ %inc49131, %sw.bb ], [ %inc49131, %sw.bb5 ], [ %inc49131, %sw.bb8 ], [ %inc49131, %sw.bb11 ], [ %inc49131, %sw.bb14 ], [ %inc49131, %sw.bb17 ], [ %inc49131, %sw.bb20 ], [ %inc49131, %sw.bb23 ], [ %inc49131, %sw.bb26 ], [ %inc49131, %sw.bb29 ], [ %inc49131, %sw.bb32 ], [ %inc49131, %sw.bb35 ], [ %inc49131, %sw.bb38 ], [ %inc49131, %sw.bb41 ], [ %inc49131, %sw.bb44 ], [ %inc49, %sw.bb47 ], [ %inc49131, %sw.bb50 ], [ %inc49131, %sw.bb53 ], [ %inc49131, %sw.bb56 ], [ %inc49131, %sw.bb59 ], [ %inc49131, %sw.bb62 ], [ %inc49131, %sw.bb65 ], [ %inc49131, %sw.bb68 ], [ %inc49131, %sw.bb71 ], [ %inc49131, %sw.bb74 ], [ %inc49131, %sw.bb77 ], [ %inc49131, %for.body ] %inc52128 = phi i32 [ %inc52129, %sw.bb ], [ %inc52129, %sw.bb5 ], [ %inc52129, %sw.bb8 ], [ %inc52129, %sw.bb11 ], [ %inc52129, %sw.bb14 ], [ %inc52129, %sw.bb17 ], [ %inc52129, %sw.bb20 ], [ %inc52129, %sw.bb23 ], [ %inc52129, %sw.bb26 ], [ %inc52129, %sw.bb29 ], [ %inc52129, %sw.bb32 ], [ %inc52129, %sw.bb35 ], [ %inc52129, %sw.bb38 ], [ %inc52129, %sw.bb41 ], [ %inc52129, %sw.bb44 ], [ %inc52129, %sw.bb47 ], [ %inc52, %sw.bb50 ], [ %inc52129, %sw.bb53 ], [ %inc52129, %sw.bb56 ], [ %inc52129, %sw.bb59 ], [ %inc52129, %sw.bb62 ], [ %inc52129, %sw.bb65 ], [ %inc52129, %sw.bb68 ], [ %inc52129, %sw.bb71 ], [ %inc52129, %sw.bb74 ], [ %inc52129, %sw.bb77 ], [ %inc52129, %for.body ] %inc55126 = phi i32 [ %inc55127, %sw.bb ], [ %inc55127, %sw.bb5 ], [ %inc55127, %sw.bb8 ], [ %inc55127, %sw.bb11 ], [ %inc55127, %sw.bb14 ], [ %inc55127, %sw.bb17 ], [ %inc55127, %sw.bb20 ], [ %inc55127, %sw.bb23 ], [ %inc55127, %sw.bb26 ], [ %inc55127, %sw.bb29 ], [ %inc55127, %sw.bb32 ], [ %inc55127, %sw.bb35 ], [ %inc55127, %sw.bb38 ], [ %inc55127, %sw.bb41 ], [ %inc55127, %sw.bb44 ], [ %inc55127, %sw.bb47 ], [ %inc55127, %sw.bb50 ], [ %inc55, %sw.bb53 ], [ %inc55127, %sw.bb56 ], [ %inc55127, %sw.bb59 ], [ %inc55127, %sw.bb62 ], [ %inc55127, %sw.bb65 ], [ %inc55127, %sw.bb68 ], [ %inc55127, %sw.bb71 ], [ %inc55127, %sw.bb74 ], [ %inc55127, %sw.bb77 ], [ %inc55127, %for.body ] %inc58124 = phi i32 [ %inc58125, %sw.bb ], [ %inc58125, %sw.bb5 ], [ %inc58125, %sw.bb8 ], [ %inc58125, %sw.bb11 ], [ %inc58125, %sw.bb14 ], [ %inc58125, %sw.bb17 ], [ %inc58125, %sw.bb20 ], [ %inc58125, %sw.bb23 ], [ %inc58125, %sw.bb26 ], [ %inc58125, %sw.bb29 ], [ %inc58125, %sw.bb32 ], [ %inc58125, %sw.bb35 ], [ %inc58125, %sw.bb38 ], [ %inc58125, %sw.bb41 ], [ %inc58125, %sw.bb44 ], [ %inc58125, %sw.bb47 ], [ %inc58125, %sw.bb50 ], [ %inc58125, %sw.bb53 ], [ %inc58, %sw.bb56 ], [ %inc58125, %sw.bb59 ], [ %inc58125, %sw.bb62 ], [ %inc58125, %sw.bb65 ], [ %inc58125, %sw.bb68 ], [ %inc58125, %sw.bb71 ], [ %inc58125, %sw.bb74 ], [ %inc58125, %sw.bb77 ], [ %inc58125, %for.body ] %inc61122 = phi i32 [ %inc61123, %sw.bb ], [ %inc61123, %sw.bb5 ], [ %inc61123, %sw.bb8 ], [ %inc61123, %sw.bb11 ], [ %inc61123, %sw.bb14 ], [ %inc61123, %sw.bb17 ], [ %inc61123, %sw.bb20 ], [ %inc61123, %sw.bb23 ], [ %inc61123, %sw.bb26 ], [ %inc61123, %sw.bb29 ], [ %inc61123, %sw.bb32 ], [ %inc61123, %sw.bb35 ], [ %inc61123, %sw.bb38 ], [ %inc61123, %sw.bb41 ], [ %inc61123, %sw.bb44 ], [ %inc61123, %sw.bb47 ], [ %inc61123, %sw.bb50 ], [ %inc61123, %sw.bb53 ], [ %inc61123, %sw.bb56 ], [ %inc61, %sw.bb59 ], [ %inc61123, %sw.bb62 ], [ %inc61123, %sw.bb65 ], [ %inc61123, %sw.bb68 ], [ %inc61123, %sw.bb71 ], [ %inc61123, %sw.bb74 ], [ %inc61123, %sw.bb77 ], [ %inc61123, %for.body ] %inc64120 = phi i32 [ %inc64121, %sw.bb ], [ %inc64121, %sw.bb5 ], [ %inc64121, %sw.bb8 ], [ %inc64121, %sw.bb11 ], [ %inc64121, %sw.bb14 ], [ %inc64121, %sw.bb17 ], [ %inc64121, %sw.bb20 ], [ %inc64121, %sw.bb23 ], [ %inc64121, %sw.bb26 ], [ %inc64121, %sw.bb29 ], [ %inc64121, %sw.bb32 ], [ %inc64121, %sw.bb35 ], [ %inc64121, %sw.bb38 ], [ %inc64121, %sw.bb41 ], [ %inc64121, %sw.bb44 ], [ %inc64121, %sw.bb47 ], [ %inc64121, %sw.bb50 ], [ %inc64121, %sw.bb53 ], [ %inc64121, %sw.bb56 ], [ %inc64121, %sw.bb59 ], [ %inc64, %sw.bb62 ], [ %inc64121, %sw.bb65 ], [ %inc64121, %sw.bb68 ], [ %inc64121, %sw.bb71 ], [ %inc64121, %sw.bb74 ], [ %inc64121, %sw.bb77 ], [ %inc64121, %for.body ] %inc67118 = phi i32 [ %inc67119, %sw.bb ], [ %inc67119, %sw.bb5 ], [ %inc67119, %sw.bb8 ], [ %inc67119, %sw.bb11 ], [ %inc67119, %sw.bb14 ], [ %inc67119, %sw.bb17 ], [ %inc67119, %sw.bb20 ], [ %inc67119, %sw.bb23 ], [ %inc67119, %sw.bb26 ], [ %inc67119, %sw.bb29 ], [ %inc67119, %sw.bb32 ], [ %inc67119, %sw.bb35 ], [ %inc67119, %sw.bb38 ], [ %inc67119, %sw.bb41 ], [ %inc67119, %sw.bb44 ], [ %inc67119, %sw.bb47 ], [ %inc67119, %sw.bb50 ], [ %inc67119, %sw.bb53 ], [ %inc67119, %sw.bb56 ], [ %inc67119, %sw.bb59 ], [ %inc67119, %sw.bb62 ], [ %inc67, %sw.bb65 ], [ %inc67119, %sw.bb68 ], [ %inc67119, %sw.bb71 ], [ %inc67119, %sw.bb74 ], [ %inc67119, %sw.bb77 ], [ %inc67119, %for.body ] %inc70116 = phi i32 [ %inc70117, %sw.bb ], [ %inc70117, %sw.bb5 ], [ %inc70117, %sw.bb8 ], [ %inc70117, %sw.bb11 ], [ %inc70117, %sw.bb14 ], [ %inc70117, %sw.bb17 ], [ %inc70117, %sw.bb20 ], [ %inc70117, %sw.bb23 ], [ %inc70117, %sw.bb26 ], [ %inc70117, %sw.bb29 ], [ %inc70117, %sw.bb32 ], [ %inc70117, %sw.bb35 ], [ %inc70117, %sw.bb38 ], [ %inc70117, %sw.bb41 ], [ %inc70117, %sw.bb44 ], [ %inc70117, %sw.bb47 ], [ %inc70117, %sw.bb50 ], [ %inc70117, %sw.bb53 ], [ %inc70117, %sw.bb56 ], [ %inc70117, %sw.bb59 ], [ %inc70117, %sw.bb62 ], [ %inc70117, %sw.bb65 ], [ %inc70, %sw.bb68 ], [ %inc70117, %sw.bb71 ], [ %inc70117, %sw.bb74 ], [ %inc70117, %sw.bb77 ], [ %inc70117, %for.body ] %inc73114 = phi i32 [ %inc73115, %sw.bb ], [ %inc73115, %sw.bb5 ], [ %inc73115, %sw.bb8 ], [ %inc73115, %sw.bb11 ], [ %inc73115, %sw.bb14 ], [ %inc73115, %sw.bb17 ], [ %inc73115, %sw.bb20 ], [ %inc73115, %sw.bb23 ], [ %inc73115, %sw.bb26 ], [ %inc73115, %sw.bb29 ], [ %inc73115, %sw.bb32 ], [ %inc73115, %sw.bb35 ], [ %inc73115, %sw.bb38 ], [ %inc73115, %sw.bb41 ], [ %inc73115, %sw.bb44 ], [ %inc73115, %sw.bb47 ], [ %inc73115, %sw.bb50 ], [ %inc73115, %sw.bb53 ], [ %inc73115, %sw.bb56 ], [ %inc73115, %sw.bb59 ], [ %inc73115, %sw.bb62 ], [ %inc73115, %sw.bb65 ], [ %inc73115, %sw.bb68 ], [ %inc73, %sw.bb71 ], [ %inc73115, %sw.bb74 ], [ %inc73115, %sw.bb77 ], [ %inc73115, %for.body ] %inc76112 = phi i32 [ %inc76113, %sw.bb ], [ %inc76113, %sw.bb5 ], [ %inc76113, %sw.bb8 ], [ %inc76113, %sw.bb11 ], [ %inc76113, %sw.bb14 ], [ %inc76113, %sw.bb17 ], [ %inc76113, %sw.bb20 ], [ %inc76113, %sw.bb23 ], [ %inc76113, %sw.bb26 ], [ %inc76113, %sw.bb29 ], [ %inc76113, %sw.bb32 ], [ %inc76113, %sw.bb35 ], [ %inc76113, %sw.bb38 ], [ %inc76113, %sw.bb41 ], [ %inc76113, %sw.bb44 ], [ %inc76113, %sw.bb47 ], [ %inc76113, %sw.bb50 ], [ %inc76113, %sw.bb53 ], [ %inc76113, %sw.bb56 ], [ %inc76113, %sw.bb59 ], [ %inc76113, %sw.bb62 ], [ %inc76113, %sw.bb65 ], [ %inc76113, %sw.bb68 ], [ %inc76113, %sw.bb71 ], [ %inc76, %sw.bb74 ], [ %inc76113, %sw.bb77 ], [ %inc76113, %for.body ] %inc79110 = phi i32 [ %inc79111, %sw.bb ], [ %inc79111, %sw.bb5 ], [ %inc79111, %sw.bb8 ], [ %inc79111, %sw.bb11 ], [ %inc79111, %sw.bb14 ], [ %inc79111, %sw.bb17 ], [ %inc79111, %sw.bb20 ], [ %inc79111, %sw.bb23 ], [ %inc79111, %sw.bb26 ], [ %inc79111, %sw.bb29 ], [ %inc79111, %sw.bb32 ], [ %inc79111, %sw.bb35 ], [ %inc79111, %sw.bb38 ], [ %inc79111, %sw.bb41 ], [ %inc79111, %sw.bb44 ], [ %inc79111, %sw.bb47 ], [ %inc79111, %sw.bb50 ], [ %inc79111, %sw.bb53 ], [ %inc79111, %sw.bb56 ], [ %inc79111, %sw.bb59 ], [ %inc79111, %sw.bb62 ], [ %inc79111, %sw.bb65 ], [ %inc79111, %sw.bb68 ], [ %inc79111, %sw.bb71 ], [ %inc79111, %sw.bb74 ], [ %inc79, %sw.bb77 ], [ %inc79111, %for.body ] %54 = phi i32 [ %inc, %sw.bb ], [ %52, %sw.bb5 ], [ %52, %sw.bb8 ], [ %52, %sw.bb11 ], [ %52, %sw.bb14 ], [ %52, %sw.bb17 ], [ %52, %sw.bb20 ], [ %52, %sw.bb23 ], [ %52, %sw.bb26 ], [ %52, %sw.bb29 ], [ %52, %sw.bb32 ], [ %52, %sw.bb35 ], [ %52, %sw.bb38 ], [ %52, %sw.bb41 ], [ %52, %sw.bb44 ], [ %52, %sw.bb47 ], [ %52, %sw.bb50 ], [ %52, %sw.bb53 ], [ %52, %sw.bb56 ], [ %52, %sw.bb59 ], [ %52, %sw.bb62 ], [ %52, %sw.bb65 ], [ %52, %sw.bb68 ], [ %52, %sw.bb71 ], [ %52, %sw.bb74 ], [ %52, %sw.bb77 ], [ %52, %for.body ] %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.cond82.preheader, label %for.body, !llvm.loop !8 if.end99: ; preds = %for.cond82.preheader, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ %spec.select, %for.cond82.preheader ] %call98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 123, 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 nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(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 @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 = { 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 = { nounwind } attributes #5 = { 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 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int a,b,i; (void) scanf("%d %d",&a,&b); if(a<b) { for(i=1;i<=b;i++) { printf("%d",a); } return 0; } for(i=1;i<=a;i++) { printf("%d",b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291698/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291698/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 = icmp slt i32 %0, %1 br i1 %cmp, label %for.cond.preheader, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry %cmp4.not16 = icmp slt i32 %0, 1 br i1 %cmp4.not16, label %cleanup, label %for.body5 for.cond.preheader: ; preds = %entry %cmp1.not18 = icmp slt i32 %1, 1 br i1 %cmp1.not18, label %cleanup, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %i.019 = phi i32 [ %inc, %for.body ], [ 1, %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.not.not = icmp slt i32 %i.019, %3 br i1 %cmp1.not.not, label %for.body, label %cleanup, !llvm.loop !9 for.body5: ; preds = %for.cond3.preheader, %for.body5 %i.117 = phi i32 [ %inc8, %for.body5 ], [ 1, %for.cond3.preheader ] %4 = load i32, ptr %b, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc8 = add nuw nsw i32 %i.117, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %i.117, %5 br i1 %cmp4.not.not, label %for.body5, label %cleanup, !llvm.loop !11 cleanup: ; preds = %for.body5, %for.body, %for.cond3.preheader, %for.cond.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; int b; scanf("%d",&a); scanf("%d",&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"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291740/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291740/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.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %for.cond5.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp217 = icmp sgt i32 %1, 0 br i1 %cmp217, label %for.body, label %if.end for.cond5.preheader: ; preds = %entry %cmp619 = icmp sgt i32 %0, 0 br i1 %cmp619, label %for.body8, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.018 = 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.018, 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.body8: ; preds = %for.cond5.preheader, %for.body8 %i4.020 = phi i32 [ %inc11, %for.body8 ], [ 0, %for.cond5.preheader ] %4 = load i32, ptr %b, align 4, !tbaa !5 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %4) %inc11 = add nuw nsw i32 %i4.020, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc11, %5 br i1 %cmp6, label %for.body8, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body, %for.body8, %for.cond.preheader, %for.cond5.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> #include <string.h> #define rep(i, n) for (int i = 0; i <n; i++) int main(){ int a, b; scanf("%d %d", &a, &b); if(a < b ) rep(i,b){ printf( "%d", a); } else { rep(i,a){ printf( "%d", b); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291784/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> #include<stdlib.h> #include<ctype.h> int main() { int a,b,num; scanf("%d %d",&a,&b); if(b>a) { num=a; while(b>1) { num=num*10; num+=a; b--; } } else { num=b; while(a>1) { num=num*10; num+=b; a--; } } printf("%d\n",num); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291827/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291827/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: %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 %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %while.cond.preheader, label %while.cond2.preheader while.cond2.preheader: ; preds = %entry %cmp318 = icmp sgt i32 %1, 1 br i1 %cmp318, label %while.body4, label %if.end while.cond.preheader: ; preds = %entry %cmp120 = icmp sgt i32 %0, 1 br i1 %cmp120, label %while.body, label %if.end while.body: ; preds = %while.cond.preheader, %while.body %num.021 = phi i32 [ %add, %while.body ], [ %1, %while.cond.preheader ] %2 = phi i32 [ %dec, %while.body ], [ %0, %while.cond.preheader ] %mul = mul nsw i32 %num.021, 10 %add = add nsw i32 %mul, %1 %dec = add nsw i32 %2, -1 %cmp1 = icmp ugt i32 %2, 2 br i1 %cmp1, label %while.body, label %while.cond.if.end.loopexit_crit_edge, !llvm.loop !9 while.body4: ; preds = %while.cond2.preheader, %while.body4 %num.119 = phi i32 [ %add6, %while.body4 ], [ %0, %while.cond2.preheader ] %3 = phi i32 [ %dec7, %while.body4 ], [ %1, %while.cond2.preheader ] %mul5 = mul nsw i32 %num.119, 10 %add6 = add nsw i32 %mul5, %0 %dec7 = add nsw i32 %3, -1 %cmp3 = icmp ugt i32 %3, 2 br i1 %cmp3, label %while.body4, label %while.cond2.if.end.loopexit17_crit_edge, !llvm.loop !11 while.cond.if.end.loopexit_crit_edge: ; preds = %while.body store i32 1, ptr %b, align 4, !tbaa !5 br label %if.end while.cond2.if.end.loopexit17_crit_edge: ; preds = %while.body4 store i32 1, ptr %a, align 4, !tbaa !5 br label %if.end if.end: ; preds = %while.cond2.preheader, %while.cond2.if.end.loopexit17_crit_edge, %while.cond.preheader, %while.cond.if.end.loopexit_crit_edge %num.2 = phi i32 [ %add, %while.cond.if.end.loopexit_crit_edge ], [ %1, %while.cond.preheader ], [ %add6, %while.cond2.if.end.loopexit17_crit_edge ], [ %0, %while.cond2.preheader ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %num.2) 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 (void){ int a, b,i; scanf("%d %d", &a, &b); if(a>=b){ for(i=0;i<a; i++){ printf("%d", b); } }else{ for(i=0;i<b; i++){ printf("%d", a); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291885/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291885/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.cond3.preheader, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp114 = icmp sgt i32 %0, 0 br i1 %cmp114, label %for.body, label %if.end for.cond3.preheader: ; preds = %entry %cmp416 = icmp sgt i32 %1, 0 br i1 %cmp416, label %for.body5, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.015 = 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.015, 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.body5: ; preds = %for.cond3.preheader, %for.body5 %i.117 = phi i32 [ %inc8, %for.body5 ], [ 0, %for.cond3.preheader ] %4 = load i32, ptr %a, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc8 = add nuw nsw i32 %i.117, 1 %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc8, %5 br i1 %cmp4, label %for.body5, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body, %for.body5, %for.cond.preheader, %for.cond3.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,i; scanf("%d %d",&a,&b); if(a>b){ for(i=0;i<a;i++)printf("%d",b); } else for(i=0;i<b;i++)printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291928/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 = icmp sgt i32 %0, %1 br i1 %cmp, label %for.cond.preheader, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry %cmp414 = icmp sgt i32 %1, 0 br i1 %cmp414, label %for.body5, label %if.end for.cond.preheader: ; preds = %entry %cmp116 = icmp sgt i32 %0, 0 br i1 %cmp116, label %for.body, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %i.017 = 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.017, 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.body5: ; preds = %for.cond3.preheader, %for.body5 %i.115 = phi i32 [ %inc8, %for.body5 ], [ 0, %for.cond3.preheader ] %4 = load i32, ptr %a, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc8 = add nuw nsw i32 %i.115, 1 %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc8, %5 br i1 %cmp4, label %for.body5, label %if.end, !llvm.loop !11 if.end: ; preds = %for.body5, %for.body, %for.cond3.preheader, %for.cond.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> #include <stdlib.h> #include <math.h> int main() { int i,j,k; scanf("%d %d",&i,&j); if(i<j) { i=i+j; j=i-j; i=i-j; } for(k=0;k<i;k++) printf("%d",j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_291979/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_291979/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: %i = alloca i32, align 4 %j = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i, ptr noundef nonnull %j) %0 = load i32, ptr %i, align 4, !tbaa !5 %1 = load i32, ptr %j, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %j, align 4, !tbaa !5 store i32 %1, ptr %i, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %cmp26 = icmp sgt i32 %2, 0 br i1 %cmp26, label %for.body, label %for.end for.body: ; preds = %if.end, %for.body %k.07 = phi i32 [ %inc, %for.body ], [ 0, %if.end ] %3 = load i32, ptr %j, align 4, !tbaa !5 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %3) %inc = add nuw nsw i32 %k.07, 1 %4 = load i32, ptr %i, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %4 br i1 %cmp2, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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> #include <string.h> int out(int in1, int in2) { double result = 0, i = 0; for(i = 0; i < in2; i ++) { result += (double)in1 * pow(10, i); //printf("%lf\n", result); } return (int)result; } int main(int argc, char const *argv[]) { /* code */ int a, b; scanf("%d %d", &a, &b); if(a <= b) { printf("%d", out(a, b)); } else { printf("%d", out(b, a)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292020/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292020/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 memory(write) uwtable define dso_local i32 @out(i32 noundef %in1, i32 noundef %in2) local_unnamed_addr #0 { entry: %conv = sitofp i32 %in2 to double %cmp7 = icmp sgt i32 %in2, 0 br i1 %cmp7, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %conv2 = sitofp i32 %in1 to double br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %i.09 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %inc, %for.body ] %result.08 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %0, %for.body ] %call = tail call double @pow(double noundef 1.000000e+01, double noundef %i.09) #6 %0 = tail call double @llvm.fmuladd.f64(double %conv2, double %call, double %result.08) %inc = fadd double %i.09, 1.000000e+00 %cmp = fcmp olt double %inc, %conv br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !5 for.end.loopexit: ; preds = %for.body %1 = fptosi double %0 to i32 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %result.0.lcssa = phi i32 [ 0, %entry ], [ %1, %for.end.loopexit ] ret i32 %result.0.lcssa } ; 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 memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #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 uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #4 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 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) %0 = load i32, ptr %a, align 4, !tbaa !7 %1 = load i32, ptr %b, align 4, !tbaa !7 %cmp.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %if.else, label %if.then if.then: ; preds = %entry %conv.i = sitofp i32 %1 to double %cmp7.i = icmp sgt i32 %1, 0 br i1 %cmp7.i, label %for.body.lr.ph.i, label %if.end for.body.lr.ph.i: ; preds = %if.then %conv2.i = sitofp i32 %0 to double br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.lr.ph.i %i.09.i = phi double [ 0.000000e+00, %for.body.lr.ph.i ], [ %inc.i, %for.body.i ] %result.08.i = phi double [ 0.000000e+00, %for.body.lr.ph.i ], [ %2, %for.body.i ] %call.i = call double @pow(double noundef 1.000000e+01, double noundef %i.09.i) #6 %2 = call double @llvm.fmuladd.f64(double %conv2.i, double %call.i, double %result.08.i) %inc.i = fadd double %i.09.i, 1.000000e+00 %cmp.i = fcmp olt double %inc.i, %conv.i br i1 %cmp.i, label %for.body.i, label %for.end.loopexit.i, !llvm.loop !5 for.end.loopexit.i: ; preds = %for.body.i %3 = fptosi double %2 to i32 br label %if.end if.else: ; preds = %entry %conv.i7 = sitofp i32 %0 to double %cmp7.i8 = icmp sgt i32 %0, 0 br i1 %cmp7.i8, label %for.body.lr.ph.i10, label %if.end for.body.lr.ph.i10: ; preds = %if.else %conv2.i11 = sitofp i32 %1 to double br label %for.body.i12 for.body.i12: ; preds = %for.body.i12, %for.body.lr.ph.i10 %i.09.i13 = phi double [ 0.000000e+00, %for.body.lr.ph.i10 ], [ %inc.i16, %for.body.i12 ] %result.08.i14 = phi double [ 0.000000e+00, %for.body.lr.ph.i10 ], [ %4, %for.body.i12 ] %call.i15 = call double @pow(double noundef 1.000000e+01, double noundef %i.09.i13) #6 %4 = call double @llvm.fmuladd.f64(double %conv2.i11, double %call.i15, double %result.08.i14) %inc.i16 = fadd double %i.09.i13, 1.000000e+00 %cmp.i17 = fcmp olt double %inc.i16, %conv.i7 br i1 %cmp.i17, label %for.body.i12, label %for.end.loopexit.i18, !llvm.loop !5 for.end.loopexit.i18: ; preds = %for.body.i12 %5 = fptosi double %4 to i32 br label %if.end if.end: ; preds = %for.end.loopexit.i18, %if.else, %for.end.loopexit.i, %if.then %result.0.lcssa.i9.sink = phi i32 [ 0, %if.then ], [ %3, %for.end.loopexit.i ], [ 0, %if.else ], [ %5, %for.end.loopexit.i18 ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %result.0.lcssa.i9.sink) 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: 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 attributes #0 = { nofree nounwind memory(write) 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 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 #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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 = { 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"}
#include <stdio.h> int main(void){ int a = 0; int b = 0; scanf("%d %d", &a, &b); if (a < b){ for (int i = 0; i < b; i++){ printf("%d", a); } } else if (b <= a){ for (int i = 0; i < a; i++){ printf("%d", b); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292064/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292064/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 store i32 0, ptr %a, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 store i32 0, ptr %b, align 4, !tbaa !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 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %for.cond.preheader, label %for.cond6.preheader for.cond6.preheader: ; preds = %entry %cmp718 = icmp sgt i32 %0, 0 br i1 %cmp718, label %for.body9, label %if.end14 for.cond.preheader: ; preds = %entry %cmp120 = icmp sgt i32 %1, 0 br i1 %cmp120, label %for.body, label %if.end14 for.body: ; preds = %for.cond.preheader, %for.body %i.021 = 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.021, 1 %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %3 br i1 %cmp1, label %for.body, label %if.end14, !llvm.loop !9 for.body9: ; preds = %for.cond6.preheader, %for.body9 %i5.019 = phi i32 [ %inc12, %for.body9 ], [ 0, %for.cond6.preheader ] %4 = load i32, ptr %b, align 4, !tbaa !5 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4) %inc12 = add nuw nsw i32 %i5.019, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp7 = icmp slt i32 %inc12, %5 br i1 %cmp7, label %for.body9, label %if.end14, !llvm.loop !11 if.end14: ; preds = %for.body9, %for.body, %for.cond6.preheader, %for.cond.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> #include <string.h> #include <stdlib.h> #include <locale.h> int main() { int a,b; scanf("%d %d",&a, &b); if(b>a){ int tep = b; b=a; a=tep; } for(int i=0;i<a;i++){ printf("%d",b); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292107/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292107/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 %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %b, align 4, !tbaa !5 store i32 %0, ptr %a, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %cmp15 = icmp sgt i32 %2, 0 br i1 %cmp15, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %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 for.body: ; preds = %if.end, %for.body %i.06 = phi i32 [ %inc, %for.body ], [ 0, %if.end ] %3 = load i32, ptr %b, align 4, !tbaa !5 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %3) %inc = add nuw nsw i32 %i.06, 1 %4 = load i32, ptr %a, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc, %4 br i1 %cmp1, 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: 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int A,B,T; scanf("%d %d %d", &A, &B, &T); int bisket=0; for(int i=1; i<=T; i++){ if((i%A) == 0) bisket += B; } printf("%d", bisket); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292150/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 %cmp.not6 = icmp slt i32 %0, 1 br i1 %cmp.not6, label %for.cond.cleanup, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i32, ptr %A, align 4, !tbaa !5 %2 = load i32, ptr %B, align 4 %xtraiter = and i32 %0, 1 %3 = icmp eq i32 %0, 1 br i1 %3, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %0, -2 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %bisket.1.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %bisket.1.1, %for.body ] %i.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %bisket.07.unr = phi i32 [ 0, %for.body.lr.ph ], [ %bisket.1.1, %for.body ] %lcmp.mod.not = icmp eq i32 %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 %rem.epil = srem i32 %i.08.unr, %1 %cmp1.epil = icmp eq i32 %rem.epil, 0 %add.epil = select i1 %cmp1.epil, i32 %2, i32 0 %bisket.1.epil = add nsw i32 %add.epil, %bisket.07.unr br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.epil, %for.cond.cleanup.loopexit.unr-lcssa, %entry %bisket.0.lcssa = phi i32 [ 0, %entry ], [ %bisket.1.lcssa.ph, %for.cond.cleanup.loopexit.unr-lcssa ], [ %bisket.1.epil, %for.body.epil ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %bisket.0.lcssa) 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 for.body: ; preds = %for.body, %for.body.lr.ph.new %i.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %bisket.07 = phi i32 [ 0, %for.body.lr.ph.new ], [ %bisket.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %rem = srem i32 %i.08, %1 %cmp1 = icmp eq i32 %rem, 0 %add = select i1 %cmp1, i32 %2, i32 0 %bisket.1 = add nsw i32 %add, %bisket.07 %inc = add nuw i32 %i.08, 1 %rem.1 = srem i32 %inc, %1 %cmp1.1 = icmp eq i32 %rem.1, 0 %add.1 = select i1 %cmp1.1, i32 %2, i32 0 %bisket.1.1 = add nsw i32 %add.1, %bisket.1 %inc.1 = add nuw i32 %i.08, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, 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: 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int A, B, T; if (scanf("%d%d%d", &A, &B, &T) != 3) return 1; printf("%d\n", B * (T / A)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292194/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 [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 %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) %cmp.not = icmp eq i32 %call, 3 br i1 %cmp.not, label %if.end, label %cleanup if.end: ; preds = %entry %0 = load i32, ptr %B, align 4, !tbaa !5 %1 = load i32, ptr %T, align 4, !tbaa !5 %2 = load i32, ptr %A, align 4, !tbaa !5 %div = sdiv i32 %1, %2 %mul = mul nsw i32 %div, %0 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) br label %cleanup cleanup: ; preds = %entry, %if.end %retval.0 = phi i32 [ 0, %if.end ], [ 1, %entry ] 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 %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: 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, T; int N; scanf("%d %d %d", &A, &B, &T); N = T / A; printf("%d\n", N*B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292251/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292251/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 [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 %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; 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_292295/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292295/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"}
#include<stdio.h> int main() { int A, B, T; scanf("%d%d%d", &A, &B, &T); int times; times = T/A; printf("%d", times*B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292338/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292338/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 %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(void) { int i, j, k; scanf("%d %d %d", &i, &j, &k); printf("%d\n", k/i*j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292389/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292389/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 [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %i = alloca i32, align 4 %j = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i, ptr noundef nonnull %j, ptr noundef nonnull %k) %0 = load i32, ptr %k, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %2 = load i32, ptr %j, 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 %k) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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> #define STR_MAX 128 int calcSumBiscuit(unsigned char A, unsigned char B, unsigned char T) { int sum = 0; unsigned char i = 0; for(i=A; i<=T; i+=A){ sum += B; } return sum; } int main(){ int sum = 0; char str[STR_MAX]; unsigned char A=0, B=0, T=0; fgets(str, sizeof(str), stdin); sscanf(str, "%d %d %d", &A, &B, &T); sum = calcSumBiscuit(A, B, T); printf("%d", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292431/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292431/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 [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 norecurse nosync nounwind memory(none) uwtable define dso_local i32 @calcSumBiscuit(i8 noundef zeroext %A, i8 noundef zeroext %B, i8 noundef zeroext %T) local_unnamed_addr #0 { entry: %cmp.not11 = icmp ugt i8 %A, %T br i1 %cmp.not11, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %conv3 = zext i8 %B to i32 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %i.013 = phi i8 [ %A, %for.body.lr.ph ], [ %add6, %for.body ] %sum.012 = phi i32 [ 0, %for.body.lr.ph ], [ %add, %for.body ] %add = add nuw nsw i32 %sum.012, %conv3 %add6 = add i8 %i.013, %A %cmp.not = icmp ugt i8 %add6, %T br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !5 for.end: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] ret i32 %sum.0.lcssa } ; 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: %str = alloca [128 x i8], align 16 %A = alloca i8, align 1 %B = alloca i8, align 1 %T = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %str) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %A) #4 store i8 0, ptr %A, align 1, !tbaa !7 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %B) #4 store i8 0, ptr %B, align 1, !tbaa !7 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %T) #4 store i8 0, ptr %T, align 1, !tbaa !7 %0 = load ptr, ptr @stdin, align 8, !tbaa !10 %call = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 128, ptr noundef %0) %call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %str, ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %T) #4 %1 = load i8, ptr %A, align 1, !tbaa !7 %2 = load i8, ptr %T, align 1, !tbaa !7 %cmp.not11.i = icmp ugt i8 %1, %2 br i1 %cmp.not11.i, label %calcSumBiscuit.exit, label %for.body.lr.ph.i for.body.lr.ph.i: ; preds = %entry %3 = load i8, ptr %B, align 1, !tbaa !7 %conv3.i = zext i8 %3 to i32 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.lr.ph.i %i.013.i = phi i8 [ %1, %for.body.lr.ph.i ], [ %add6.i, %for.body.i ] %sum.012.i = phi i32 [ 0, %for.body.lr.ph.i ], [ %add.i, %for.body.i ] %add.i = add nuw nsw i32 %sum.012.i, %conv3.i %add6.i = add i8 %i.013.i, %1 %cmp.not.i = icmp ugt i8 %add6.i, %2 br i1 %cmp.not.i, label %calcSumBiscuit.exit, label %for.body.i, !llvm.loop !5 calcSumBiscuit.exit: ; preds = %for.body.i, %entry %sum.0.lcssa.i = phi i32 [ 0, %entry ], [ %add.i, %for.body.i ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %T) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %B) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %A) #4 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %str) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { 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 #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 = { 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 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !8, i64 0}
#include <stdio.h> int main(int argc, char const *argv[]) { int a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%d\n",(c/a)*b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292475/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292475/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 [4 x i8] c"%d\0A\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: %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"}
#include<stdio.h> #include<stdlib.h> #include <string.h> int main(void) { int a, b, t, c = 0, i; scanf("%d", &a); scanf("%d", &b); scanf("%d", &t); for(i=1; a*i <= t+0.5; i++){ c += b; } printf("%d", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292525/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292525/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 %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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %t, align 4, !tbaa !5 %conv3 = sitofp i32 %1 to double %add = fadd double %conv3, 5.000000e-01 %conv9 = sitofp i32 %0 to double %cmp10 = fcmp ult double %add, %conv9 br i1 %cmp10, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %2 = load i32, ptr %b, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %i.012 = phi i32 [ 1, %for.body.lr.ph ], [ %inc, %for.body ] %c.011 = phi i32 [ 0, %for.body.lr.ph ], [ %add5, %for.body ] %add5 = add nsw i32 %2, %c.011 %inc = add nuw nsw i32 %i.012, 1 %mul = mul nsw i32 %0, %inc %conv = sitofp i32 %mul to double %cmp = fcmp ult double %add, %conv br i1 %cmp, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %entry %c.0.lcssa = phi i32 [ 0, %entry ], [ %add5, %for.body ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %c.0.lcssa) 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int a,b,c,e= 0; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); e = c/a*b; printf("%d",e); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292569/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292569/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 %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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, 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 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, 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"}
#include <stdio.h> #include <string.h> int main(void){ int a,b,t; int da = 0; scanf("%d %d %d",&a,&b,&t); da=t/a; da=da*b; printf("%d",da); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292611/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292611/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 n, m; int p[64][1024]; int main(void) { while (scanf("%d%d", &n, &m) == 2 && (n|m) != 0) { int i, j; int gotiusa = 0, kinmoza; for (i = 0; i < m; i++) { for (j = 0; j < n; j++) { if (scanf("%d", &p[i][j]) != 1) return 1; } } for (i = 0; i < n; i++) { kinmoza = 0; for (j = 0; j < m; j++) { kinmoza += p[j][i]; } if (kinmoza > gotiusa) gotiusa = kinmoza; } printf("%d\n", gotiusa); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292655/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292655/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 @m = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @p = dso_local global [64 x [1024 x i32]] zeroinitializer, align 16 @.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: %call95 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m) %cmp96 = icmp eq i32 %call95, 2 %0 = load i32, ptr @n, align 4 %1 = load i32, ptr @m, align 4 %or97 = or i32 %1, %0 %cmp198 = icmp ne i32 %or97, 0 %2 = select i1 %cmp96, i1 %cmp198, i1 false br i1 %2, label %for.cond.preheader, label %return for.cond.preheader: ; preds = %entry, %cleanup %3 = phi i32 [ %51, %cleanup ], [ %1, %entry ] %4 = phi i32 [ %50, %cleanup ], [ %0, %entry ] %cmp2.not54 = icmp sgt i32 %3, 0 %5 = icmp sgt i32 %4, 0 %or.cond100 = select i1 %cmp2.not54, i1 %5, i1 false br i1 %or.cond100, label %for.cond3.preheader, label %for.cond13.preheader for.cond13.preheader: ; preds = %for.inc10, %for.cond.preheader %6 = phi i32 [ %4, %for.cond.preheader ], [ %48, %for.inc10 ] %.lcssa = phi i32 [ %3, %for.cond.preheader ], [ %47, %for.inc10 ] %cmp1463 = icmp sgt i32 %6, 0 %cmp1759 = icmp sgt i32 %.lcssa, 0 %or.cond = and i1 %cmp1463, %cmp1759 br i1 %or.cond, label %for.cond16.preheader.us.preheader, label %cleanup for.cond16.preheader.us.preheader: ; preds = %for.cond13.preheader %wide.trip.count83 = zext i32 %6 to i64 %wide.trip.count = zext i32 %.lcssa to i64 %min.iters.check = icmp ult i32 %.lcssa, 8 %n.vec = and i64 %wide.trip.count, 4294967288 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br label %for.cond16.preheader.us for.cond16.preheader.us: ; preds = %for.cond16.preheader.us.preheader, %for.cond16.for.end25_crit_edge.us %indvars.iv80 = phi i64 [ 0, %for.cond16.preheader.us.preheader ], [ %indvars.iv.next81, %for.cond16.for.end25_crit_edge.us ] %gotiusa.065.us = phi i32 [ 0, %for.cond16.preheader.us.preheader ], [ %spec.select.us, %for.cond16.for.end25_crit_edge.us ] br i1 %min.iters.check, label %for.body18.us.preheader, label %vector.body vector.body: ; preds = %for.cond16.preheader.us, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond16.preheader.us ] %vec.phi = phi <4 x i32> [ %38, %vector.body ], [ zeroinitializer, %for.cond16.preheader.us ] %vec.phi99 = phi <4 x i32> [ %39, %vector.body ], [ zeroinitializer, %for.cond16.preheader.us ] %7 = or i64 %index, 1 %8 = or i64 %index, 2 %9 = or i64 %index, 3 %10 = or i64 %index, 4 %11 = or i64 %index, 5 %12 = or i64 %index, 6 %13 = or i64 %index, 7 %14 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %index, i64 %indvars.iv80 %15 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %7, i64 %indvars.iv80 %16 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %8, i64 %indvars.iv80 %17 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %9, i64 %indvars.iv80 %18 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %10, i64 %indvars.iv80 %19 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %11, i64 %indvars.iv80 %20 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %12, i64 %indvars.iv80 %21 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %13, i64 %indvars.iv80 %22 = load i32, ptr %14, align 4, !tbaa !5 %23 = load i32, ptr %15, align 4, !tbaa !5 %24 = load i32, ptr %16, align 4, !tbaa !5 %25 = load i32, ptr %17, align 4, !tbaa !5 %26 = insertelement <4 x i32> poison, i32 %22, i64 0 %27 = insertelement <4 x i32> %26, i32 %23, i64 1 %28 = insertelement <4 x i32> %27, i32 %24, i64 2 %29 = insertelement <4 x i32> %28, i32 %25, i64 3 %30 = load i32, ptr %18, align 4, !tbaa !5 %31 = load i32, ptr %19, align 4, !tbaa !5 %32 = load i32, ptr %20, align 4, !tbaa !5 %33 = load i32, ptr %21, align 4, !tbaa !5 %34 = insertelement <4 x i32> poison, i32 %30, i64 0 %35 = insertelement <4 x i32> %34, i32 %31, i64 1 %36 = insertelement <4 x i32> %35, i32 %32, i64 2 %37 = insertelement <4 x i32> %36, i32 %33, i64 3 %38 = add <4 x i32> %29, %vec.phi %39 = add <4 x i32> %37, %vec.phi99 %index.next = add nuw i64 %index, 8 %40 = icmp eq i64 %index.next, %n.vec br i1 %40, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %39, %38 %41 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) br i1 %cmp.n, label %for.cond16.for.end25_crit_edge.us, label %for.body18.us.preheader for.body18.us.preheader: ; preds = %for.cond16.preheader.us, %middle.block %indvars.iv76.ph = phi i64 [ 0, %for.cond16.preheader.us ], [ %n.vec, %middle.block ] %kinmoza.061.us.ph = phi i32 [ 0, %for.cond16.preheader.us ], [ %41, %middle.block ] br label %for.body18.us for.body18.us: ; preds = %for.body18.us.preheader, %for.body18.us %indvars.iv76 = phi i64 [ %indvars.iv.next77, %for.body18.us ], [ %indvars.iv76.ph, %for.body18.us.preheader ] %kinmoza.061.us = phi i32 [ %add.us, %for.body18.us ], [ %kinmoza.061.us.ph, %for.body18.us.preheader ] %arrayidx22.us = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %indvars.iv76, i64 %indvars.iv80 %42 = load i32, ptr %arrayidx22.us, align 4, !tbaa !5 %add.us = add nsw i32 %42, %kinmoza.061.us %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1 %exitcond79.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count br i1 %exitcond79.not, label %for.cond16.for.end25_crit_edge.us, label %for.body18.us, !llvm.loop !13 for.cond16.for.end25_crit_edge.us: ; preds = %for.body18.us, %middle.block %add.us.lcssa = phi i32 [ %41, %middle.block ], [ %add.us, %for.body18.us ] %spec.select.us = tail call i32 @llvm.smax.i32(i32 %add.us.lcssa, i32 %gotiusa.065.us) %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %exitcond84.not = icmp eq i64 %indvars.iv.next81, %wide.trip.count83 br i1 %exitcond84.not, label %cleanup, label %for.cond16.preheader.us, !llvm.loop !14 for.cond3.preheader: ; preds = %for.cond.preheader, %for.inc10 %43 = phi i32 [ %47, %for.inc10 ], [ %3, %for.cond.preheader ] %44 = phi i32 [ %48, %for.inc10 ], [ %4, %for.cond.preheader ] %indvars.iv74 = phi i64 [ %indvars.iv.next75, %for.inc10 ], [ 0, %for.cond.preheader ] %cmp452 = icmp sgt i32 %44, 0 br i1 %cmp452, label %for.body5, label %for.inc10 for.cond3: ; preds = %for.body5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %45 = load i32, ptr @n, align 4, !tbaa !5 %46 = sext i32 %45 to i64 %cmp4 = icmp slt i64 %indvars.iv.next, %46 br i1 %cmp4, label %for.body5, label %for.inc10.loopexit, !llvm.loop !15 for.body5: ; preds = %for.cond3.preheader, %for.cond3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond3 ], [ 0, %for.cond3.preheader ] %arrayidx7 = getelementptr inbounds [64 x [1024 x i32]], ptr @p, i64 0, i64 %indvars.iv74, i64 %indvars.iv %call8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx7) %cmp9.not = icmp eq i32 %call8, 1 br i1 %cmp9.not, label %for.cond3, label %return for.inc10.loopexit: ; preds = %for.cond3 %.pre = load i32, ptr @m, align 4, !tbaa !5 br label %for.inc10 for.inc10: ; preds = %for.inc10.loopexit, %for.cond3.preheader %47 = phi i32 [ %.pre, %for.inc10.loopexit ], [ %43, %for.cond3.preheader ] %48 = phi i32 [ %45, %for.inc10.loopexit ], [ %44, %for.cond3.preheader ] %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1 %49 = sext i32 %47 to i64 %cmp2.not = icmp slt i64 %indvars.iv.next75, %49 br i1 %cmp2.not, label %for.cond3.preheader, label %for.cond13.preheader, !llvm.loop !16 cleanup: ; preds = %for.cond16.for.end25_crit_edge.us, %for.cond13.preheader %gotiusa.0.lcssa = phi i32 [ 0, %for.cond13.preheader ], [ %spec.select.us, %for.cond16.for.end25_crit_edge.us ] %call32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %gotiusa.0.lcssa) %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m) %cmp = icmp eq i32 %call, 2 %50 = load i32, ptr @n, align 4 %51 = load i32, ptr @m, align 4 %or = or i32 %51, %50 %cmp1 = icmp ne i32 %or, 0 %52 = select i1 %cmp, i1 %cmp1, i1 false br i1 %52, label %for.cond.preheader, label %return return: ; preds = %cleanup, %for.body5, %entry %retval.2 = phi i32 [ 0, %entry ], [ 1, %for.body5 ], [ 0, %cleanup ] ret i32 %retval.2 } ; 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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x 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, !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 = distinct !{!16, !10, !17} !17 = !{!"llvm.loop.unswitch.partial.disable"}
#include<stdio.h> static const int N = 100; int main(){ int M[N][N]; int n, i, j, u, k, v; scanf("%d",&n); for(i = 0 ; i < n ; i++){ for(j = 0 ; j < n ; j++){ M[i][j] = 0; } } for(i = 0 ; i < n ; i++){ scanf("%d%d",&u,&k); u--; for(j = 0 ; j < k ; j++){ scanf("%d",&v); v--; M[u][v] = 1; } } for(i = 0 ; i < n ; i++){ for(j = 0 ; j < n ; j++){ if(j){ printf(" "); } printf("%d",M[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292699/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292699/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 %vla62 = alloca [10000 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 %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp66 = icmp sgt i32 %0, 0 br i1 %cmp66, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %vla62, i64 400 %invariant.gep84 = getelementptr i8, ptr %vla62, i64 800 %invariant.gep86 = getelementptr i8, ptr %vla62, i64 1200 %invariant.gep88 = getelementptr i8, ptr %vla62, i64 1600 %invariant.gep90 = getelementptr i8, ptr %vla62, i64 2000 %invariant.gep92 = getelementptr i8, ptr %vla62, i64 2400 %invariant.gep94 = getelementptr i8, ptr %vla62, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %vla62, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep85 = getelementptr i8, ptr %invariant.gep84, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep85, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep87 = getelementptr i8, ptr %invariant.gep86, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep87, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep89 = getelementptr i8, ptr %invariant.gep88, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep89, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep91 = getelementptr i8, ptr %invariant.gep90, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep91, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep93 = getelementptr i8, ptr %invariant.gep92, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep93, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep95 = getelementptr i8, ptr %invariant.gep94, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep95, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %vla62, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp66, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2974 = icmp sgt i32 %19, 0 br i1 %cmp2974, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.171 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1468 = icmp sgt i32 %14, 0 br i1 %cmp1468, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.169 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %17 = mul nsw i64 %idxprom18, 100 %arrayidx19 = getelementptr inbounds i32, ptr %vla62, i64 %17 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds i32, ptr %arrayidx19, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.169, 1 %18 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %18 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.171, 1 %19 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %19 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %20 = phi i32 [ %27, %for.end42 ], [ %19, %for.cond28.preheader ] %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3272 = icmp sgt i32 %20, 0 br i1 %cmp3272, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %21 = mul nuw nsw i64 %indvars.iv80, 100 %arrayidx36 = getelementptr inbounds i32, ptr %vla62, i64 %21 %22 = load i32, ptr %arrayidx36, align 16, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %23 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %23, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar63 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds i32, ptr %arrayidx36, i64 %indvars.iv %24 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %24) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %26 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %27 = load i32, ptr %n, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp29 = icmp slt i64 %indvars.iv.next81, %28 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdio.h> #include <stdlib.h> static const int N = 100; int main(){ int M[N][N]; int n, u, k, v; int i,j; scanf("%d",&n); if(n < 1 || n > 100) exit(1); for(i = 0; i < n; i++){ for(j = 0; j < n;j++) M[i][j] = 0; } for(i = 0; i < n; i++){ scanf("%d %d",&u,&k); u--; for(j = 0; j < k;j++){ scanf("%d",&v); v--; M[u][v] = 1; } } for(i = 0; i < n; i++){ for(j = 0; j < n; j++){ if(j) printf(" "); printf("%d",M[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292741/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292741/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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 %vla66 = alloca [10000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4 %1 = add i32 %0, -101 %or.cond = icmp ult i32 %1, -100 br i1 %or.cond, label %if.then, label %for.cond3.preheader.us.preheader for.cond3.preheader.us.preheader: ; preds = %entry %2 = zext i32 %0 to i64 %3 = shl nuw nsw i64 %2, 2 %4 = add nsw i64 %2, -1 %xtraiter = and i64 %2, 7 %5 = icmp ult i64 %4, 7 br i1 %5, label %for.body13.preheader.unr-lcssa, label %for.cond3.preheader.us.preheader.new for.cond3.preheader.us.preheader.new: ; preds = %for.cond3.preheader.us.preheader %unroll_iter = and i64 %2, 4294967288 %invariant.gep = getelementptr i8, ptr %vla66, i64 400 %invariant.gep87 = getelementptr i8, ptr %vla66, i64 800 %invariant.gep89 = getelementptr i8, ptr %vla66, i64 1200 %invariant.gep91 = getelementptr i8, ptr %vla66, i64 1600 %invariant.gep93 = getelementptr i8, ptr %vla66, i64 2000 %invariant.gep95 = getelementptr i8, ptr %vla66, i64 2400 %invariant.gep97 = getelementptr i8, ptr %vla66, i64 2800 br label %for.cond3.preheader.us for.cond3.preheader.us: ; preds = %for.cond3.preheader.us, %for.cond3.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond3.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond3.preheader.us ] %niter = phi i64 [ 0, %for.cond3.preheader.us.preheader.new ], [ %niter.next.7, %for.cond3.preheader.us ] %6 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %vla66, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %3, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %3, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %3, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %3, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %3, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %3, i1 false), !tbaa !5 %12 = mul nuw i64 %indvar, 400 %gep96 = getelementptr i8, ptr %invariant.gep95, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %gep96, i8 0, i64 %3, i1 false), !tbaa !5 %13 = mul nuw i64 %indvar, 400 %gep98 = getelementptr i8, ptr %invariant.gep97, i64 %13 call void @llvm.memset.p0.i64(ptr align 16 %gep98, i8 0, i64 %3, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.body13.preheader.unr-lcssa, label %for.cond3.preheader.us, !llvm.loop !9 for.body13.preheader.unr-lcssa: ; preds = %for.cond3.preheader.us, %for.cond3.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond3.preheader.us.preheader ], [ %indvar.next.7, %for.cond3.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body13.preheader, label %for.cond3.preheader.us.epil for.cond3.preheader.us.epil: ; preds = %for.body13.preheader.unr-lcssa, %for.cond3.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond3.preheader.us.epil ], [ %indvar.unr, %for.body13.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond3.preheader.us.epil ], [ 0, %for.body13.preheader.unr-lcssa ] %14 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %vla66, i64 %14 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %3, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.body13.preheader, label %for.cond3.preheader.us.epil, !llvm.loop !11 for.body13.preheader: ; preds = %for.cond3.preheader.us.epil, %for.body13.preheader.unr-lcssa br label %for.body13 if.then: ; preds = %entry call void @exit(i32 noundef 1) #7 unreachable for.cond30.preheader: ; preds = %for.inc27 %cmp3178 = icmp sgt i32 %21, 0 br i1 %cmp3178, label %for.cond33.preheader, label %for.end50 for.body13: ; preds = %for.body13.preheader, %for.inc27 %i.175 = phi i32 [ %inc28, %for.inc27 ], [ 0, %for.body13.preheader ] %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %15 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %15, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %16 = load i32, ptr %k, align 4, !tbaa !5 %cmp1672 = icmp sgt i32 %16, 0 br i1 %cmp1672, label %for.body17, label %for.inc27 for.body17: ; preds = %for.body13, %for.body17 %j.173 = phi i32 [ %inc25, %for.body17 ], [ 0, %for.body13 ] %call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %17 = load i32, ptr %v, align 4, !tbaa !5 %dec19 = add nsw i32 %17, -1 store i32 %dec19, ptr %v, align 4, !tbaa !5 %18 = load i32, ptr %u, align 4, !tbaa !5 %idxprom20 = sext i32 %18 to i64 %19 = mul nsw i64 %idxprom20, 100 %arrayidx21 = getelementptr inbounds i32, ptr %vla66, i64 %19 %idxprom22 = sext i32 %dec19 to i64 %arrayidx23 = getelementptr inbounds i32, ptr %arrayidx21, i64 %idxprom22 store i32 1, ptr %arrayidx23, align 4, !tbaa !5 %inc25 = add nuw nsw i32 %j.173, 1 %20 = load i32, ptr %k, align 4, !tbaa !5 %cmp16 = icmp slt i32 %inc25, %20 br i1 %cmp16, label %for.body17, label %for.inc27, !llvm.loop !13 for.inc27: ; preds = %for.body17, %for.body13 %inc28 = add nuw nsw i32 %i.175, 1 %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc28, %21 br i1 %cmp12, label %for.body13, label %for.cond30.preheader, !llvm.loop !14 for.cond33.preheader: ; preds = %for.cond30.preheader, %for.end46 %22 = phi i32 [ %29, %for.end46 ], [ %21, %for.cond30.preheader ] %indvars.iv84 = phi i64 [ %indvars.iv.next85, %for.end46 ], [ 0, %for.cond30.preheader ] %cmp3476 = icmp sgt i32 %22, 0 br i1 %cmp3476, label %if.end38.peel, label %for.end46 if.end38.peel: ; preds = %for.cond33.preheader %23 = mul nuw nsw i64 %indvars.iv84, 100 %arrayidx40 = getelementptr inbounds i32, ptr %vla66, i64 %23 %24 = load i32, ptr %arrayidx40, align 16, !tbaa !5 %call43.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %24) %25 = load i32, ptr %n, align 4, !tbaa !5 %cmp34.peel = icmp sgt i32 %25, 1 br i1 %cmp34.peel, label %if.end38, label %for.end46 if.end38: ; preds = %if.end38.peel, %if.end38 %indvars.iv = phi i64 [ %indvars.iv.next, %if.end38 ], [ 1, %if.end38.peel ] %putchar67 = call i32 @putchar(i32 32) %arrayidx42 = getelementptr inbounds i32, ptr %arrayidx40, i64 %indvars.iv %26 = load i32, ptr %arrayidx42, align 4, !tbaa !5 %call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %26) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %27 = load i32, ptr %n, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp34 = icmp slt i64 %indvars.iv.next, %28 br i1 %cmp34, label %if.end38, label %for.end46, !llvm.loop !15 for.end46: ; preds = %if.end38, %if.end38.peel, %for.cond33.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 %29 = load i32, ptr %n, align 4, !tbaa !5 %30 = sext i32 %29 to i64 %cmp31 = icmp slt i64 %indvars.iv.next85, %30 br i1 %cmp31, label %for.cond33.preheader, label %for.end50, !llvm.loop !17 for.end50: ; preds = %for.end46, %for.cond30.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #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) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: noreturn nounwind declare void @exit(i32 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 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) 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 = { 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 = { 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 #4 = { nofree nounwind } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind } attributes #7 = { 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 = !{!"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, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include<stdio.h> int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++){ int a; scanf("%d",&a); printf("%d\n",(a/2)+1); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2928/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: %n = alloca i32, align 4 %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp4 = icmp sgt i32 %0, 0 br i1 %cmp4, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 for.body: ; preds = %entry, %for.body %i.05 = phi i32 [ %inc, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %1 = load i32, ptr %a, align 4, !tbaa !5 %div = sdiv i32 %1, 2 %add = add nsw i32 %div, 1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 %inc = add nuw nsw i32 %i.05, 1 %2 = load i32, ptr %n, 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> int main() { int n,k,max,sum1=0,sum2=0; scanf("%d",&n); int a[n+2]; for(int i=1;i<=n;i++) { scanf("%d",&a[i]); if(i==1) max=a[i]; else { if(a[i]>max) max=a[i]; } } k=max; for(int i=1;i<=n;) { sum1+=a[i]; sum2+=k-a[i]; if(i==n) { if(sum2>sum1) break; else { k++; i=1; sum1=0; sum2=0; continue; } } i++; } printf("%d\n",k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29285/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: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %0, 2 %1 = zext i32 %add to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not58 = icmp sgt i32 %3, 0 call void @llvm.assume(i1 %cmp.not58) %arrayidx.peel = getelementptr inbounds i32, ptr %vla, i64 1 %call1.peel = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.peel) %4 = load i32, ptr %arrayidx.peel, align 4, !tbaa !5 %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not.not.peel = icmp sgt i32 %5, 1 br i1 %cmp.not.not.peel, label %for.inc, label %for.cond13.preheader for.cond13.preheader: ; preds = %for.inc, %entry %max.0.lcssa = phi i32 [ %4, %entry ], [ %spec.select, %for.inc ] %.lcssa = phi i32 [ %5, %entry ], [ %8, %for.inc ] %cmp14.not62 = icmp slt i32 %.lcssa, 1 br i1 %cmp14.not62, label %cleanup, label %for.body16.lr.ph.preheader for.body16.lr.ph.preheader: ; preds = %for.cond13.preheader %6 = zext i32 %.lcssa to i64 %min.iters.check = icmp ult i32 %.lcssa, 8 %n.vec = and i64 %6, 4294967288 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %n.vec, %6 br label %for.body16.lr.ph for.inc: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 2, %entry ] %max.059 = phi i32 [ %spec.select, %for.inc ], [ %4, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %7 = load i32, ptr %arrayidx, align 4, !tbaa !5 %spec.select = call i32 @llvm.smax.i32(i32 %7, i32 %max.059) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %9 br i1 %cmp.not.not, label %for.inc, label %for.cond13.preheader, !llvm.loop !9 for.body16: ; preds = %for.body16.preheader, %for.body16 %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.body16 ], [ %indvars.iv79.ph, %for.body16.preheader ] %sum2.064 = phi i32 [ %add22, %for.body16 ], [ %sum2.064.ph, %for.body16.preheader ] %sum1.063 = phi i32 [ %add19, %for.body16 ], [ %sum1.063.ph, %for.body16.preheader ] %arrayidx18 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv79 %10 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %add19 = add nsw i32 %10, %sum1.063 %sub = sub nsw i32 %k.0.ph68, %10 %add22 = add nsw i32 %sub, %sum2.064 %cmp23 = icmp eq i64 %indvars.iv79, %6 %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 br i1 %cmp23, label %if.then24, label %for.body16, !llvm.loop !12 if.then24: ; preds = %for.body16, %middle.block %add19.lcssa = phi i32 [ %20, %middle.block ], [ %add19, %for.body16 ] %add22.lcssa = phi i32 [ %21, %middle.block ], [ %add22, %for.body16 ] %cmp25 = icmp sgt i32 %add22.lcssa, %add19.lcssa %inc28 = add nsw i32 %k.0.ph68, 1 br i1 %cmp25, label %cleanup, label %for.body16.lr.ph for.body16.lr.ph: ; preds = %if.then24, %for.body16.lr.ph.preheader %k.0.ph68 = phi i32 [ %inc28, %if.then24 ], [ %max.0.lcssa, %for.body16.lr.ph.preheader ] br i1 %min.iters.check, label %for.body16.preheader, label %vector.ph vector.ph: ; preds = %for.body16.lr.ph %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %k.0.ph68, 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.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ] %vec.phi87 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ] %vec.phi88 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ] %vec.phi89 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %offset.idx = or i64 %index, 1 %11 = getelementptr inbounds i32, ptr %vla, i64 %offset.idx %wide.load = load <4 x i32>, ptr %11, align 4, !tbaa !5 %12 = getelementptr inbounds i32, ptr %11, i64 4 %wide.load90 = load <4 x i32>, ptr %12, align 4, !tbaa !5 %13 = add <4 x i32> %wide.load, %vec.phi88 %14 = add <4 x i32> %wide.load90, %vec.phi89 %15 = sub nsw <4 x i32> %broadcast.splat, %wide.load %16 = sub nsw <4 x i32> %broadcast.splat, %wide.load90 %17 = add <4 x i32> %15, %vec.phi %18 = add <4 x i32> %16, %vec.phi87 %index.next = add nuw i64 %index, 8 %19 = icmp eq i64 %index.next, %n.vec br i1 %19, label %middle.block, label %vector.body, !llvm.loop !15 middle.block: ; preds = %vector.body %bin.rdx91 = add <4 x i32> %14, %13 %20 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx91) %bin.rdx = add <4 x i32> %18, %17 %21 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) br i1 %cmp.n, label %if.then24, label %for.body16.preheader for.body16.preheader: ; preds = %for.body16.lr.ph, %middle.block %indvars.iv79.ph = phi i64 [ 1, %for.body16.lr.ph ], [ %ind.end, %middle.block ] %sum2.064.ph = phi i32 [ 0, %for.body16.lr.ph ], [ %21, %middle.block ] %sum1.063.ph = phi i32 [ 0, %for.body16.lr.ph ], [ %20, %middle.block ] br label %for.body16 cleanup: ; preds = %if.then24, %for.cond13.preheader %k.0.ph57 = phi i32 [ %max.0.lcssa, %for.cond13.preheader ], [ %k.0.ph68, %if.then24 ] %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %k.0.ph57) call void @llvm.stackrestore.p0(ptr %2) 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) #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 willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 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, !11} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.peeled.count", i32 1} !12 = distinct !{!12, !13, !14} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = distinct !{!15, !14, !13}
#include <stdio.h> #include <stdlib.h> int main(void) { int n,i,j,u,k,tmp; int list[100][100]={}; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&u); scanf("%d",&k); for(j=0;j<k;j++){ scanf("%d",&tmp); list[u-1][tmp-1]=1; } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ printf("%d",list[i][j]); if(j==n-1){break;} printf(" "); }printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292914/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292914/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: %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %tmp = alloca i32, align 4 %list = alloca [100 x [100 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 %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #5 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %list) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40000) %list, i8 0, i64 40000, i1 false) %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.end33 for.cond13.preheader: ; preds = %for.inc10 %cmp1450 = icmp sgt i32 %5, 0 br i1 %cmp1450, label %for.cond16.preheader, label %for.end33 for.body: ; preds = %entry, %for.inc10 %i.047 = phi i32 [ %inc11, %for.inc10 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %u) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %1 = load i32, ptr %k, align 4, !tbaa !5 %cmp444 = icmp sgt i32 %1, 0 br i1 %cmp444, label %for.body5, label %for.inc10 for.body5: ; preds = %for.body, %for.body5 %j.045 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body ] %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %tmp) %2 = load i32, ptr %u, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom = sext i32 %sub to i64 %3 = load i32, ptr %tmp, align 4, !tbaa !5 %sub7 = add nsw i32 %3, -1 %idxprom8 = sext i32 %sub7 to i64 %arrayidx9 = getelementptr inbounds [100 x [100 x i32]], ptr %list, i64 0, i64 %idxprom, i64 %idxprom8 store i32 1, ptr %arrayidx9, align 4, !tbaa !5 %inc = add nuw nsw i32 %j.045, 1 %4 = load i32, ptr %k, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.inc10, !llvm.loop !9 for.inc10: ; preds = %for.body5, %for.body %inc11 = add nuw nsw i32 %i.047, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc11, %5 br i1 %cmp, label %for.body, label %for.cond13.preheader, !llvm.loop !11 for.cond16.preheader: ; preds = %for.cond13.preheader, %for.end29 %6 = phi i32 [ %12, %for.end29 ], [ %5, %for.cond13.preheader ] %indvars.iv53 = phi i64 [ %indvars.iv.next54, %for.end29 ], [ 0, %for.cond13.preheader ] %cmp1748 = icmp sgt i32 %6, 0 br i1 %cmp1748, label %for.body18, label %for.end29 for.body18: ; preds = %for.cond16.preheader, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %for.cond16.preheader ] %arrayidx22 = getelementptr inbounds [100 x [100 x i32]], ptr %list, i64 0, i64 %indvars.iv53, i64 %indvars.iv %7 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) %8 = load i32, ptr %n, align 4, !tbaa !5 %sub24 = add nsw i32 %8, -1 %9 = zext i32 %sub24 to i64 %cmp25 = icmp eq i64 %indvars.iv, %9 br i1 %cmp25, label %for.end29, label %if.end if.end: ; preds = %for.body18 %putchar = call i32 @putchar(i32 32) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %n, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp17 = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp17, label %for.body18, label %for.end29, !llvm.loop !12 for.end29: ; preds = %if.end, %for.body18, %for.cond16.preheader %putchar43 = call i32 @putchar(i32 10) %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1 %12 = load i32, ptr %n, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp14 = icmp slt i64 %indvars.iv.next54, %13 br i1 %cmp14, label %for.cond16.preheader, label %for.end33, !llvm.loop !13 for.end33: ; preds = %for.end29, %entry, %for.cond13.preheader call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %list) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #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: 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: 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) #1 ; 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 = { 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 = { 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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> #define MAX 101 int main() { int M[MAX][MAX],i,j,n,m,p,r; scanf("%d",&n); for(i = 1; i <= n; i++) { for(j = 1; j <= n; j++) { M[i][j] = 0; } } for(i = 1; i <= n; i++) { scanf("%d%d",&m,&r); for(j = 1; j <= r; j++) { scanf("%d",&p); M[i][p] = 1; } } for(i = 1; i <= n; i++) { for(j = 1; j <= n; j++) { printf("%d",M[i][j]); if(j == n) break; printf(" "); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_292958/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_292958/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M = alloca [101 x [101 x i32]], align 16 %n = alloca i32, align 4 %m = alloca i32, align 4 %p = alloca i32, align 4 %r = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %M) #5 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 4, ptr nonnull %p) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not66 = icmp slt i32 %0, 1 br i1 %cmp.not66, label %for.end46, label %for.cond1.preheader.preheader for.cond1.preheader.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %invariant.gep = getelementptr inbounds i8, ptr %M, i64 408 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.preheader.new for.cond1.preheader.preheader.new: ; preds = %for.cond1.preheader.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep85 = getelementptr i8, ptr %invariant.gep, i64 404 %invariant.gep87 = getelementptr i8, ptr %invariant.gep, i64 808 %invariant.gep89 = getelementptr i8, ptr %invariant.gep, i64 1212 %invariant.gep91 = getelementptr i8, ptr %invariant.gep, i64 1616 %invariant.gep93 = getelementptr i8, ptr %invariant.gep, i64 2020 %invariant.gep95 = getelementptr i8, ptr %invariant.gep, i64 2424 %invariant.gep97 = getelementptr i8, ptr %invariant.gep, i64 2828 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %indvar.next.7, %for.cond1.preheader ] %niter = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %niter.next.7, %for.cond1.preheader ] %4 = mul nuw nsw i64 %indvar, 404 %gep = getelementptr i8, ptr %invariant.gep, i64 %4 call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 404 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %5 call void @llvm.memset.p0.i64(ptr align 4 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 404 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 404 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %7 call void @llvm.memset.p0.i64(ptr align 4 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 404 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %8 call void @llvm.memset.p0.i64(ptr align 8 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 404 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %9 call void @llvm.memset.p0.i64(ptr align 4 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 404 %gep96 = getelementptr i8, ptr %invariant.gep95, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep96, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 404 %gep98 = getelementptr i8, ptr %invariant.gep97, i64 %11 call void @llvm.memset.p0.i64(ptr align 4 %gep98, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.preheader ], [ %indvar.next.7, %for.cond1.preheader ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.epil for.cond1.preheader.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 404 %gep.epil = getelementptr i8, ptr %invariant.gep, i64 %12 call void @llvm.memset.p0.i64(ptr align 4 %gep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp.not66, label %for.end46, label %for.body11 for.cond27.preheader: ; preds = %for.inc24 %cmp28.not74 = icmp slt i32 %16, 1 br i1 %cmp28.not74, label %for.end46, label %for.cond30.preheader for.body11: ; preds = %for.cond9.preheader, %for.inc24 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc24 ], [ 1, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %m, ptr noundef nonnull %r) %13 = load i32, ptr %r, align 4, !tbaa !5 %cmp14.not68 = icmp slt i32 %13, 1 br i1 %cmp14.not68, label %for.inc24, label %for.body15 for.body15: ; preds = %for.body11, %for.body15 %j.169 = phi i32 [ %inc22, %for.body15 ], [ 1, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p) %14 = load i32, ptr %p, align 4, !tbaa !5 %idxprom19 = sext i32 %14 to i64 %arrayidx20 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv, i64 %idxprom19 store i32 1, ptr %arrayidx20, align 4, !tbaa !5 %inc22 = add nuw nsw i32 %j.169, 1 %15 = load i32, ptr %r, align 4, !tbaa !5 %cmp14.not.not = icmp slt i32 %j.169, %15 br i1 %cmp14.not.not, label %for.body15, label %for.inc24, !llvm.loop !13 for.inc24: ; preds = %for.body15, %for.body11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %16 = load i32, ptr %n, align 4, !tbaa !5 %17 = sext i32 %16 to i64 %cmp10.not.not = icmp slt i64 %indvars.iv, %17 br i1 %cmp10.not.not, label %for.body11, label %for.cond27.preheader, !llvm.loop !14 for.cond30.preheader: ; preds = %for.cond27.preheader, %for.end42 %18 = phi i32 [ %24, %for.end42 ], [ %16, %for.cond27.preheader ] %indvars.iv81 = phi i64 [ %indvars.iv.next82, %for.end42 ], [ 1, %for.cond27.preheader ] %cmp31.not72 = icmp slt i32 %18, 1 br i1 %cmp31.not72, label %for.end42, label %for.body32 for.body32: ; preds = %for.cond30.preheader, %if.end %indvars.iv78 = phi i64 [ %indvars.iv.next79, %if.end ], [ 1, %for.cond30.preheader ] %arrayidx36 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv81, i64 %indvars.iv78 %19 = load i32, ptr %arrayidx36, align 4, !tbaa !5 %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %19) %20 = load i32, ptr %n, align 4, !tbaa !5 %21 = zext i32 %20 to i64 %cmp38 = icmp eq i64 %indvars.iv78, %21 br i1 %cmp38, label %for.end42, label %if.end if.end: ; preds = %for.body32 %putchar = call i32 @putchar(i32 32) %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1 %22 = load i32, ptr %n, align 4, !tbaa !5 %23 = sext i32 %22 to i64 %cmp31.not.not = icmp slt i64 %indvars.iv78, %23 br i1 %cmp31.not.not, label %for.body32, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %for.body32, %for.cond30.preheader %putchar63 = call i32 @putchar(i32 10) %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %24 = load i32, ptr %n, align 4, !tbaa !5 %25 = sext i32 %24 to i64 %cmp28.not.not = icmp slt i64 %indvars.iv81, %25 br i1 %cmp28.not.not, label %for.cond30.preheader, label %for.end46, !llvm.loop !16 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond27.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %p) #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 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %M) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include<stdio.h> int arr[110]; int main(){ int n,k,sum=0,max=0; scanf("%d",&n); for(int i=0;i<n;i++){ scanf("%d",&arr[i]); sum+=arr[i]; if(arr[i]>max) max=arr[i]; } k=(2*sum)/n+1; if(k<max) k=max; printf("%d\n",k); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29300/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29300/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 @arr = dso_local global [110 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: %n = alloca i32, align 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 %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp25 = icmp sgt i32 %0, 0 br i1 %cmp25, label %for.body, label %for.cond.cleanup for.cond.cleanup.loopexit: ; preds = %for.body %1 = shl nsw i32 %add, 1 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %1, %for.cond.cleanup.loopexit ] %max.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select24, %for.cond.cleanup.loopexit ] %.lcssa = phi i32 [ %0, %entry ], [ %3, %for.cond.cleanup.loopexit ] %div = sdiv i32 %sum.0.lcssa, %.lcssa %add9 = add nsw i32 %div, 1 %spec.select = call i32 @llvm.smax.i32(i32 %add9, i32 %max.0.lcssa) %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %max.027 = phi i32 [ %spec.select24, %for.body ], [ 0, %entry ] %sum.026 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [110 x i32], ptr @arr, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %2, %sum.026 %spec.select24 = call i32 @llvm.smax.i32(i32 %2, i32 %max.027) %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.loopexit, !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: 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: 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"}
#include<stdio.h> int main(){ int i,j,n,n2,n3,n4[101][101],n5[101]; scanf("%d",&n); for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ n4[i][j]=0; }} for(i=1;i<=n;i++){ scanf("%d",&n5[i]); scanf("%d",&n2); if(n2==0)continue; else{ for(j=0;j<n2;j++){ scanf("%d",&n3); n4[i][n3]=1; }} } for(i=1;i<=n;i++){ for(j=1;j<n;j++){ printf("%d ",n4[i][j]);} printf("%d\n",n4[i][n]);} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293043/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293043/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 \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 %n2 = alloca i32, align 4 %n3 = alloca i32, align 4 %n4 = alloca [101 x [101 x i32]], align 16 %n5 = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n2) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n3) #4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %n4) #4 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %n5) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not72 = icmp slt i32 %0, 1 br i1 %cmp.not72, label %for.end52, label %for.cond1.preheader.preheader for.cond1.preheader.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %invariant.gep = getelementptr inbounds i8, ptr %n4, i64 408 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.preheader.new for.cond1.preheader.preheader.new: ; preds = %for.cond1.preheader.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep96 = getelementptr i8, ptr %invariant.gep, i64 404 %invariant.gep98 = getelementptr i8, ptr %invariant.gep, i64 808 %invariant.gep100 = getelementptr i8, ptr %invariant.gep, i64 1212 %invariant.gep102 = getelementptr i8, ptr %invariant.gep, i64 1616 %invariant.gep104 = getelementptr i8, ptr %invariant.gep, i64 2020 %invariant.gep106 = getelementptr i8, ptr %invariant.gep, i64 2424 %invariant.gep108 = getelementptr i8, ptr %invariant.gep, i64 2828 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %indvar.next.7, %for.cond1.preheader ] %niter = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %niter.next.7, %for.cond1.preheader ] %4 = mul nuw nsw i64 %indvar, 404 %gep = getelementptr i8, ptr %invariant.gep, i64 %4 call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 404 %gep97 = getelementptr i8, ptr %invariant.gep96, i64 %5 call void @llvm.memset.p0.i64(ptr align 4 %gep97, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 404 %gep99 = getelementptr i8, ptr %invariant.gep98, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep99, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 404 %gep101 = getelementptr i8, ptr %invariant.gep100, i64 %7 call void @llvm.memset.p0.i64(ptr align 4 %gep101, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 404 %gep103 = getelementptr i8, ptr %invariant.gep102, i64 %8 call void @llvm.memset.p0.i64(ptr align 8 %gep103, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 404 %gep105 = getelementptr i8, ptr %invariant.gep104, i64 %9 call void @llvm.memset.p0.i64(ptr align 4 %gep105, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 404 %gep107 = getelementptr i8, ptr %invariant.gep106, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep107, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 404 %gep109 = getelementptr i8, ptr %invariant.gep108, i64 %11 call void @llvm.memset.p0.i64(ptr align 4 %gep109, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.preheader ], [ %indvar.next.7, %for.cond1.preheader ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.epil for.cond1.preheader.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 404 %gep.epil = getelementptr i8, ptr %invariant.gep, i64 %12 call void @llvm.memset.p0.i64(ptr align 4 %gep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp.not72, label %for.end52, label %for.body11 for.cond31.preheader: ; preds = %for.inc28 %cmp32.not80 = icmp slt i32 %16, 1 br i1 %cmp32.not80, label %for.end52, label %for.cond34.preheader for.body11: ; preds = %for.cond9.preheader, %for.inc28 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc28 ], [ 1, %for.cond9.preheader ] %arrayidx13 = getelementptr inbounds [101 x i32], ptr %n5, i64 0, i64 %indvars.iv %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx13) %call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n2) %13 = load i32, ptr %n2, align 4 %cmp1874 = icmp sgt i32 %13, 0 br i1 %cmp1874, label %for.body19, label %for.inc28 for.body19: ; preds = %for.body11, %for.body19 %j.175 = phi i32 [ %inc26, %for.body19 ], [ 0, %for.body11 ] %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n3) %14 = load i32, ptr %n3, align 4, !tbaa !5 %idxprom23 = sext i32 %14 to i64 %arrayidx24 = getelementptr inbounds [101 x [101 x i32]], ptr %n4, i64 0, i64 %indvars.iv, i64 %idxprom23 store i32 1, ptr %arrayidx24, align 4, !tbaa !5 %inc26 = add nuw nsw i32 %j.175, 1 %15 = load i32, ptr %n2, align 4, !tbaa !5 %cmp18 = icmp slt i32 %inc26, %15 br i1 %cmp18, label %for.body19, label %for.inc28, !llvm.loop !13 for.inc28: ; preds = %for.body19, %for.body11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %16 = load i32, ptr %n, align 4, !tbaa !5 %17 = sext i32 %16 to i64 %cmp10.not.not = icmp slt i64 %indvars.iv, %17 br i1 %cmp10.not.not, label %for.body11, label %for.cond31.preheader, !llvm.loop !14 for.cond34.preheader: ; preds = %for.cond31.preheader, %for.end44 %18 = phi i32 [ %23, %for.end44 ], [ %16, %for.cond31.preheader ] %indvars.iv88 = phi i64 [ %indvars.iv.next89, %for.end44 ], [ 1, %for.cond31.preheader ] %cmp3578 = icmp sgt i32 %18, 1 br i1 %cmp3578, label %for.body36, label %for.cond34.preheader.for.end44_crit_edge for.cond34.preheader.for.end44_crit_edge: ; preds = %for.cond34.preheader %.pre = sext i32 %18 to i64 br label %for.end44 for.body36: ; preds = %for.cond34.preheader, %for.body36 %indvars.iv85 = phi i64 [ %indvars.iv.next86, %for.body36 ], [ 1, %for.cond34.preheader ] %arrayidx40 = getelementptr inbounds [101 x [101 x i32]], ptr %n4, i64 0, i64 %indvars.iv88, i64 %indvars.iv85 %19 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %19) %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %20 = load i32, ptr %n, align 4, !tbaa !5 %21 = sext i32 %20 to i64 %cmp35 = icmp slt i64 %indvars.iv.next86, %21 br i1 %cmp35, label %for.body36, label %for.end44, !llvm.loop !15 for.end44: ; preds = %for.body36, %for.cond34.preheader.for.end44_crit_edge %idxprom47.pre-phi = phi i64 [ %.pre, %for.cond34.preheader.for.end44_crit_edge ], [ %21, %for.body36 ] %arrayidx48 = getelementptr inbounds [101 x [101 x i32]], ptr %n4, i64 0, i64 %indvars.iv88, i64 %idxprom47.pre-phi %22 = load i32, ptr %arrayidx48, align 4, !tbaa !5 %call49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %22) %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32.not.not = icmp slt i64 %indvars.iv88, %24 br i1 %cmp32.not.not, label %for.cond34.preheader, label %for.end52, !llvm.loop !16 for.end52: ; preds = %for.end44, %entry, %for.cond9.preheader, %for.cond31.preheader call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %n5) #4 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %n4) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n3) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n2) #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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, 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 nounwind willreturn memory(argmem: write) } 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, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include<stdio.h> int main(){ int i,j,n,s,t,u,g[100][100]; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ g[i][j]=0; } } for(i=0;i<n;i++){ scanf("%d%d",&s,&t); for(j=0;j<t;j++){ scanf("%d",&u); g[s-1][u-1]=1; } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(j!=0)printf(" "); printf("%d",g[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293087/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293087/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %s = alloca i32, align 4 %t = alloca i32, align 4 %u = alloca i32, align 4 %g = alloca [100 x [100 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 4, ptr nonnull %t) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %g) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp66 = icmp sgt i32 %0, 0 br i1 %cmp66, label %for.cond1.preheader.us.preheader, label %for.end47 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %g, i64 400 %invariant.gep84 = getelementptr i8, ptr %g, i64 800 %invariant.gep86 = getelementptr i8, ptr %g, i64 1200 %invariant.gep88 = getelementptr i8, ptr %g, i64 1600 %invariant.gep90 = getelementptr i8, ptr %g, i64 2000 %invariant.gep92 = getelementptr i8, ptr %g, i64 2400 %invariant.gep94 = getelementptr i8, ptr %g, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %g, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep85 = getelementptr i8, ptr %invariant.gep84, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep85, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep87 = getelementptr i8, ptr %invariant.gep86, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep87, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep89 = getelementptr i8, ptr %invariant.gep88, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep89, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep91 = getelementptr i8, ptr %invariant.gep90, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep91, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep93 = getelementptr i8, ptr %invariant.gep92, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep93, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep95 = getelementptr i8, ptr %invariant.gep94, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep95, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %g, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp66, label %for.body11, label %for.end47 for.cond28.preheader: ; preds = %for.inc25 %cmp2974 = icmp sgt i32 %17, 0 br i1 %cmp2974, label %for.cond31.preheader, label %for.end47 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.171 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s, ptr noundef nonnull %t) %13 = load i32, ptr %t, align 4, !tbaa !5 %cmp1468 = icmp sgt i32 %13, 0 br i1 %cmp1468, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.169 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %u) %14 = load i32, ptr %s, align 4, !tbaa !5 %sub = add nsw i32 %14, -1 %idxprom17 = sext i32 %sub to i64 %15 = load i32, ptr %u, align 4, !tbaa !5 %sub19 = add nsw i32 %15, -1 %idxprom20 = sext i32 %sub19 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %g, i64 0, i64 %idxprom17, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.169, 1 %16 = load i32, ptr %t, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %16 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.171, 1 %17 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %17 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end43 %18 = phi i32 [ %24, %for.end43 ], [ %17, %for.cond28.preheader ] %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.end43 ], [ 0, %for.cond28.preheader ] %cmp3272 = icmp sgt i32 %18, 0 br i1 %cmp3272, label %if.end.peel, label %for.end43 if.end.peel: ; preds = %for.cond31.preheader %arrayidx39.peel = getelementptr inbounds [100 x [100 x i32]], ptr %g, i64 0, i64 %indvars.iv80, i64 0 %19 = load i32, ptr %arrayidx39.peel, align 16, !tbaa !5 %call40.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %19) %20 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %20, 1 br i1 %cmp32.peel, label %if.end, label %for.end43 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar63 = call i32 @putchar(i32 32) %arrayidx39 = getelementptr inbounds [100 x [100 x i32]], ptr %g, i64 0, i64 %indvars.iv80, i64 %indvars.iv %21 = load i32, ptr %arrayidx39, align 4, !tbaa !5 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %21) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %22 = load i32, ptr %n, align 4, !tbaa !5 %23 = sext i32 %22 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %23 br i1 %cmp32, label %if.end, label %for.end43, !llvm.loop !15 for.end43: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %24 = load i32, ptr %n, align 4, !tbaa !5 %25 = sext i32 %24 to i64 %cmp29 = icmp slt i64 %indvars.iv.next81, %25 br i1 %cmp29, label %for.cond31.preheader, label %for.end47, !llvm.loop !17 for.end47: ; preds = %for.end43, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %g) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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: 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
//#include<iostream> //#include<cstdio> //#include<algorithm> //using namespace std; #include<stdio.h> int main() { int n; int a[100]; scanf("%d",&n); for(int i=0;i<n;i++) { scanf("%d",&a[i]); } int big=a[0]; for(int i=1;i<n;i++) { if(a[i]>big) { big=a[i]; } } int sum=0; for(int i=0;i<n;i++) { sum=sum+a[i]; } sum=sum*2; int ans1; if(sum%n!=0) { ans1=sum/n+1; } else { ans1=sum/n+1; } int ans2; if(ans1>big) { printf("%d\n",ans1); } else { printf("%d\n",big); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29313/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29313/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: %n = alloca i32, align 4 %a = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp53 = icmp sgt i32 %0, 0 br i1 %cmp53, label %for.body, label %if.then33 for.cond.cleanup: ; preds = %for.body %.pre = load i32, ptr %a, align 16, !tbaa !5 %cmp555 = icmp sgt i32 %8, 1 br i1 %cmp555, label %for.body7.preheader, label %for.cond17.preheader for.body7.preheader: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %8 to i64 %1 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %8, 9 br i1 %min.iters.check, label %for.body7.preheader108, label %vector.ph vector.ph: ; preds = %for.body7.preheader %n.vec = and i64 %1, -8 %ind.end = or i64 %n.vec, 1 %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %.pre, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.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.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ] %vec.phi87 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ] %offset.idx = or i64 %index, 1 %2 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 %wide.load88 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi) %5 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load88, <4 x i32> %vec.phi87) %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, 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> %4, <4 x i32> %5) %7 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %for.cond17.preheader, label %for.body7.preheader108 for.body7.preheader108: ; preds = %for.body7.preheader, %middle.block %indvars.iv65.ph = phi i64 [ 1, %for.body7.preheader ], [ %ind.end, %middle.block ] %big.056.ph = phi i32 [ %.pre, %for.body7.preheader ], [ %7, %middle.block ] br label %for.body7 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %a, 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 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next, %9 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13 for.cond17.preheader: ; preds = %for.body7, %middle.block, %for.cond.cleanup %big.0.lcssa = phi i32 [ %.pre, %for.cond.cleanup ], [ %7, %middle.block ], [ %spec.select, %for.body7 ] %cmp1859 = icmp sgt i32 %8, 0 br i1 %cmp1859, label %for.body20.preheader, label %for.cond.cleanup19 for.body20.preheader: ; preds = %for.cond17.preheader %wide.trip.count71 = zext i32 %8 to i64 %min.iters.check91 = icmp ult i32 %8, 8 br i1 %min.iters.check91, label %for.body20.preheader105, label %vector.ph92 vector.ph92: ; preds = %for.body20.preheader %n.vec94 = and i64 %wide.trip.count71, 4294967288 br label %vector.body97 vector.body97: ; preds = %vector.body97, %vector.ph92 %index98 = phi i64 [ 0, %vector.ph92 ], [ %index.next103, %vector.body97 ] %vec.phi99 = phi <4 x i32> [ zeroinitializer, %vector.ph92 ], [ %12, %vector.body97 ] %vec.phi100 = phi <4 x i32> [ zeroinitializer, %vector.ph92 ], [ %13, %vector.body97 ] %10 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %index98 %wide.load101 = load <4 x i32>, ptr %10, align 16, !tbaa !5 %11 = getelementptr inbounds i32, ptr %10, i64 4 %wide.load102 = load <4 x i32>, ptr %11, align 16, !tbaa !5 %12 = add <4 x i32> %wide.load101, %vec.phi99 %13 = add <4 x i32> %wide.load102, %vec.phi100 %index.next103 = add nuw i64 %index98, 8 %14 = icmp eq i64 %index.next103, %n.vec94 br i1 %14, label %middle.block89, label %vector.body97, !llvm.loop !14 middle.block89: ; preds = %vector.body97 %bin.rdx = add <4 x i32> %13, %12 %15 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n96 = icmp eq i64 %n.vec94, %wide.trip.count71 br i1 %cmp.n96, label %for.cond.cleanup19.loopexit, label %for.body20.preheader105 for.body20.preheader105: ; preds = %for.body20.preheader, %middle.block89 %indvars.iv68.ph = phi i64 [ 0, %for.body20.preheader ], [ %n.vec94, %middle.block89 ] %sum.060.ph = phi i32 [ 0, %for.body20.preheader ], [ %15, %middle.block89 ] br label %for.body20 for.body7: ; preds = %for.body7.preheader108, %for.body7 %indvars.iv65 = phi i64 [ %indvars.iv.next66, %for.body7 ], [ %indvars.iv65.ph, %for.body7.preheader108 ] %big.056 = phi i32 [ %spec.select, %for.body7 ], [ %big.056.ph, %for.body7.preheader108 ] %arrayidx9 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv65 %16 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %spec.select = call i32 @llvm.smax.i32(i32 %16, i32 %big.056) %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1 %exitcond.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count br i1 %exitcond.not, label %for.cond17.preheader, label %for.body7, !llvm.loop !15 for.cond.cleanup19.loopexit: ; preds = %for.body20, %middle.block89 %add.lcssa = phi i32 [ %15, %middle.block89 ], [ %add, %for.body20 ] %17 = shl nsw i32 %add.lcssa, 1 br label %for.cond.cleanup19 for.cond.cleanup19: ; preds = %for.cond.cleanup19.loopexit, %for.cond17.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond17.preheader ], [ %17, %for.cond.cleanup19.loopexit ] %ans1.0.in = sdiv i32 %sum.0.lcssa, %8 %cmp32.not = icmp slt i32 %ans1.0.in, %big.0.lcssa br i1 %cmp32.not, label %if.end37, label %if.then33 for.body20: ; preds = %for.body20.preheader105, %for.body20 %indvars.iv68 = phi i64 [ %indvars.iv.next69, %for.body20 ], [ %indvars.iv68.ph, %for.body20.preheader105 ] %sum.060 = phi i32 [ %add, %for.body20 ], [ %sum.060.ph, %for.body20.preheader105 ] %arrayidx22 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv68 %18 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %add = add nsw i32 %18, %sum.060 %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %exitcond72.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count71 br i1 %exitcond72.not, label %for.cond.cleanup19.loopexit, label %for.body20, !llvm.loop !16 if.then33: ; preds = %entry, %for.cond.cleanup19 %ans1.0.in86 = phi i32 [ %ans1.0.in, %for.cond.cleanup19 ], [ 0, %entry ] %ans1.0 = add nsw i32 %ans1.0.in86, 1 br label %if.end37 if.end37: ; preds = %for.cond.cleanup19, %if.then33 %big.0.lcssa.sink = phi i32 [ %ans1.0, %if.then33 ], [ %big.0.lcssa, %for.cond.cleanup19 ] %call36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %big.0.lcssa.sink) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %a) #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 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: 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 <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x 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 = distinct !{!13, !10} !14 = distinct !{!14, !10, !11, !12} !15 = distinct !{!15, !10, !12, !11} !16 = distinct !{!16, !10, !12, !11}
#include <stdio.h> int main() { int a,b,i,j,n,k,x[500][500]; scanf("%d",&k); for(i=0;i<k;i++){ scanf("%d%d",&a,&n); for(j=0;j<n;j++){ scanf("%d",&b); x[a][b]=1; } } for(i=1;i<=k;i++){ for(j=1;j<=k;j++){ printf("%d",x[i][j]); if(j!=k) printf(" "); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293173/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293173/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 ; 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 %n = alloca i32, align 4 %k = alloca i32, align 4 %x = alloca [500 x [500 x i32]], align 16 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 %k) #4 call void @llvm.lifetime.start.p0(i64 1000000, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %0 = load i32, ptr %k, align 4, !tbaa !5 %cmp43 = icmp sgt i32 %0, 0 br i1 %cmp43, label %for.body, label %for.end30 for.cond11.preheader: ; preds = %for.inc8 %cmp12.not47 = icmp slt i32 %5, 1 br i1 %cmp12.not47, label %for.end30, label %for.cond14.preheader for.body: ; preds = %entry, %for.inc8 %i.044 = phi i32 [ %inc9, %for.inc8 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp341 = icmp sgt i32 %1, 0 br i1 %cmp341, label %for.body4, label %for.inc8 for.body4: ; preds = %for.body, %for.body4 %j.042 = phi i32 [ %inc, %for.body4 ], [ 0, %for.body ] %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %2 = load i32, ptr %a, align 4, !tbaa !5 %idxprom = sext i32 %2 to i64 %3 = load i32, ptr %b, align 4, !tbaa !5 %idxprom6 = sext i32 %3 to i64 %arrayidx7 = getelementptr inbounds [500 x [500 x i32]], ptr %x, i64 0, i64 %idxprom, i64 %idxprom6 store i32 1, ptr %arrayidx7, align 4, !tbaa !5 %inc = add nuw nsw i32 %j.042, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %4 br i1 %cmp3, label %for.body4, label %for.inc8, !llvm.loop !9 for.inc8: ; preds = %for.body4, %for.body %inc9 = add nuw nsw i32 %i.044, 1 %5 = load i32, ptr %k, align 4, !tbaa !5 %cmp = icmp slt i32 %inc9, %5 br i1 %cmp, label %for.body, label %for.cond11.preheader, !llvm.loop !11 for.cond14.preheader: ; preds = %for.cond11.preheader, %for.end26 %6 = phi i32 [ %12, %for.end26 ], [ %5, %for.cond11.preheader ] %indvars.iv50 = phi i64 [ %indvars.iv.next51, %for.end26 ], [ 1, %for.cond11.preheader ] %cmp15.not45 = icmp slt i32 %6, 1 br i1 %cmp15.not45, label %for.end26, label %for.body16 for.body16: ; preds = %for.cond14.preheader, %for.inc24 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc24 ], [ 1, %for.cond14.preheader ] %arrayidx20 = getelementptr inbounds [500 x [500 x i32]], ptr %x, i64 0, i64 %indvars.iv50, i64 %indvars.iv %7 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) %8 = load i32, ptr %k, align 4, !tbaa !5 %9 = zext i32 %8 to i64 %cmp22.not = icmp eq i64 %indvars.iv, %9 br i1 %cmp22.not, label %for.inc24, label %if.then if.then: ; preds = %for.body16 %putchar40 = call i32 @putchar(i32 32) %.pre = load i32, ptr %k, align 4, !tbaa !5 br label %for.inc24 for.inc24: ; preds = %for.body16, %if.then %10 = phi i32 [ %8, %for.body16 ], [ %.pre, %if.then ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = sext i32 %10 to i64 %cmp15.not.not = icmp slt i64 %indvars.iv, %11 br i1 %cmp15.not.not, label %for.body16, label %for.end26, !llvm.loop !12 for.end26: ; preds = %for.inc24, %for.cond14.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1 %12 = load i32, ptr %k, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp12.not.not = icmp slt i64 %indvars.iv50, %13 br i1 %cmp12.not.not, label %for.cond14.preheader, label %for.end30, !llvm.loop !13 for.end30: ; preds = %for.end26, %entry, %for.cond11.preheader call void @llvm.lifetime.end.p0(i64 1000000, ptr nonnull %x) #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 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} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main() { int M[101][101] = {0}; int i, j; int n, u, k, v; scanf("%d", &n); for (i = 0; i < n; i++) { scanf("%d %d", &u, &k); for (j = 0; j < k; j++) { scanf("%d", &v); M[i][v-1] = 1; } } for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { printf("%d", M[i][j]); if (j == n-1) printf("\n"); else printf(" "); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293216/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293216/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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M = alloca [101 x [101 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %M) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40804) %M, i8 0, i64 40804, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp45 = icmp sgt i32 %0, 0 br i1 %cmp45, label %for.body, label %for.end31 for.cond11.preheader: ; preds = %for.inc8 %cmp1249 = icmp sgt i32 %4, 0 br i1 %cmp1249, label %for.cond14.preheader, label %for.end31 for.body: ; preds = %entry, %for.inc8 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc8 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %1 = load i32, ptr %k, align 4, !tbaa !5 %cmp343 = icmp sgt i32 %1, 0 br i1 %cmp343, label %for.body4, label %for.inc8 for.body4: ; preds = %for.body, %for.body4 %j.044 = phi i32 [ %inc, %for.body4 ], [ 0, %for.body ] %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %2 = load i32, ptr %v, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom6 = sext i32 %sub to i64 %arrayidx7 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv, i64 %idxprom6 store i32 1, ptr %arrayidx7, align 4, !tbaa !5 %inc = add nuw nsw i32 %j.044, 1 %3 = load i32, ptr %k, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %3 br i1 %cmp3, label %for.body4, label %for.inc8, !llvm.loop !9 for.inc8: ; preds = %for.body4, %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %for.body, label %for.cond11.preheader, !llvm.loop !11 for.cond14.preheader: ; preds = %for.cond11.preheader, %for.inc29 %6 = phi i32 [ %12, %for.inc29 ], [ %4, %for.cond11.preheader ] %indvars.iv56 = phi i64 [ %indvars.iv.next57, %for.inc29 ], [ 0, %for.cond11.preheader ] %cmp1547 = icmp sgt i32 %6, 0 br i1 %cmp1547, label %for.body16, label %for.cond14.preheader.for.inc29_crit_edge for.cond14.preheader.for.inc29_crit_edge: ; preds = %for.cond14.preheader %.pre = sext i32 %6 to i64 br label %for.inc29 for.body16: ; preds = %for.cond14.preheader, %for.body16 %indvars.iv53 = phi i64 [ %indvars.iv.next54, %for.body16 ], [ 0, %for.cond14.preheader ] %arrayidx20 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv56, i64 %indvars.iv53 %7 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) %8 = load i32, ptr %n, align 4, !tbaa !5 %sub22 = add nsw i32 %8, -1 %9 = zext i32 %sub22 to i64 %cmp23 = icmp eq i64 %indvars.iv53, %9 %. = select i1 %cmp23, i32 10, i32 32 %putchar42 = call i32 @putchar(i32 %.) %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1 %10 = load i32, ptr %n, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp15 = icmp slt i64 %indvars.iv.next54, %11 br i1 %cmp15, label %for.body16, label %for.inc29, !llvm.loop !12 for.inc29: ; preds = %for.body16, %for.cond14.preheader.for.inc29_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond14.preheader.for.inc29_crit_edge ], [ %11, %for.body16 ] %12 = phi i32 [ %6, %for.cond14.preheader.for.inc29_crit_edge ], [ %10, %for.body16 ] %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1 %cmp12 = icmp slt i64 %indvars.iv.next57, %.pre-phi br i1 %cmp12, label %for.cond14.preheader, label %for.end31, !llvm.loop !13 for.end31: ; preds = %for.inc29, %entry, %for.cond11.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %M) #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: 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: 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) #1 ; 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 = { 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 = { 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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10, !14} !14 = !{!"llvm.loop.unswitch.partial.disable"}
#include<stdio.h> int main() { int n,i; int sum = 0; int ans = 0; int max = 0; scanf("%d",&n); int a[n]; for(i=0;i<n;i++) { scanf("%d",&a[i]); sum+=a[i]; if(max <= a[i]) max = a[i]; } sum = sum*2; ans = sum/n; //if(sum%n == 0) // ans = ans; //else ans+=1; if(ans<=max) ans = max; printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29326/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29326/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: %n = alloca i32, align 4 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 %cmp27 = icmp sgt i32 %3, 0 br i1 %cmp27, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %max.029 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %sum.028 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %4, %sum.028 %spec.select = call i32 @llvm.smax.i32(i32 %max.029, i32 %4) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %7 = shl nsw i32 %add, 1 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %7, %for.end.loopexit ] %max.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.end.loopexit ] %.lcssa = phi i32 [ %3, %entry ], [ %5, %for.end.loopexit ] %div = sdiv i32 %sum.0.lcssa, %.lcssa %add9 = add nsw i32 %div, 1 %cmp10.not.not = icmp slt i32 %div, %max.0.lcssa %spec.select26 = select i1 %cmp10.not.not, i32 %max.0.lcssa, i32 %add9 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select26) call void @llvm.stackrestore.p0(ptr %2) 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: 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: 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) #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} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #define N 101 int main(){ int total,i,j,a,b,A[N][N],c; scanf("%d",&total); for(i=0;i<total;++i){ for(j=0;j<total;++j){ A[i][j]=0; } } for(i=0;i<total;++i){ scanf("%d%d",&a,&b); for(j=0;j<b;++j){ scanf("%d",&c); A[a-1][c-1]=1; } } for(i=0;i<total;++i){ for(j=0;j<total-1;j++){ printf("%d ",A[i][j]); } printf("%d\n",A[i][j]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293302/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293302/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.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 @.str.3 = 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: %total = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 %A = alloca [101 x [101 x i32]], align 16 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %total) #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 40804, ptr nonnull %A) #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 %total) %0 = load i32, ptr %total, align 4, !tbaa !5 %cmp69 = icmp sgt i32 %0, 0 br i1 %cmp69, label %for.cond1.preheader.us.preheader, label %for.end50 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %A, i64 404 %invariant.gep87 = getelementptr i8, ptr %A, i64 808 %invariant.gep89 = getelementptr i8, ptr %A, i64 1212 %invariant.gep91 = getelementptr i8, ptr %A, i64 1616 %invariant.gep93 = getelementptr i8, ptr %A, i64 2020 %invariant.gep95 = getelementptr i8, ptr %A, i64 2424 %invariant.gep97 = getelementptr i8, ptr %A, i64 2828 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 404 %scevgep = getelementptr i8, ptr %A, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 404 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 4 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 404 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %6 call void @llvm.memset.p0.i64(ptr align 8 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 404 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %7 call void @llvm.memset.p0.i64(ptr align 4 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 404 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 404 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %9 call void @llvm.memset.p0.i64(ptr align 4 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 404 %gep96 = getelementptr i8, ptr %invariant.gep95, i64 %10 call void @llvm.memset.p0.i64(ptr align 8 %gep96, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 404 %gep98 = getelementptr i8, ptr %invariant.gep97, i64 %11 call void @llvm.memset.p0.i64(ptr align 4 %gep98, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 404 %scevgep.epil = getelementptr i8, ptr %A, i64 %12 call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp69, label %for.body11, label %for.end50 for.cond28.preheader: ; preds = %for.inc25 %cmp2978 = icmp sgt i32 %17, 0 br i1 %cmp2978, label %for.cond31.preheader, label %for.end50 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.174 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b) %13 = load i32, ptr %b, align 4, !tbaa !5 %cmp1471 = icmp sgt i32 %13, 0 br i1 %cmp1471, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.172 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %14 = load i32, ptr %a, align 4, !tbaa !5 %sub = add nsw i32 %14, -1 %idxprom17 = sext i32 %sub to i64 %15 = load i32, ptr %c, align 4, !tbaa !5 %sub19 = add nsw i32 %15, -1 %idxprom20 = sext i32 %sub19 to i64 %arrayidx21 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %idxprom17, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.172, 1 %16 = load i32, ptr %b, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %16 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.174, 1 %17 = load i32, ptr %total, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %17 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %18 = phi i32 [ %23, %for.end42 ], [ %17, %for.cond28.preheader ] %indvars.iv83 = phi i64 [ %indvars.iv.next84, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3376 = icmp sgt i32 %18, 1 br i1 %cmp3376, label %for.body34, label %for.end42 for.body34: ; preds = %for.cond31.preheader, %for.body34 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body34 ], [ 0, %for.cond31.preheader ] %arrayidx38 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %indvars.iv83, i64 %indvars.iv %19 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %19) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %20 = load i32, ptr %total, align 4, !tbaa !5 %sub32 = add nsw i32 %20, -1 %21 = sext i32 %sub32 to i64 %cmp33 = icmp slt i64 %indvars.iv.next, %21 br i1 %cmp33, label %for.body34, label %for.end42, !llvm.loop !15 for.end42: ; preds = %for.body34, %for.cond31.preheader %j.2.lcssa = phi i64 [ 0, %for.cond31.preheader ], [ %indvars.iv.next, %for.body34 ] %idxprom45 = and i64 %j.2.lcssa, 4294967295 %arrayidx46 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %indvars.iv83, i64 %idxprom45 %22 = load i32, ptr %arrayidx46, align 4, !tbaa !5 %call47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %22) %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %23 = load i32, ptr %total, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp29 = icmp slt i64 %indvars.iv.next84, %24 br i1 %cmp29, label %for.cond31.preheader, label %for.end50, !llvm.loop !16 for.end50: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %A) #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 %total) #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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, 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 nounwind willreturn memory(argmem: write) } 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, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include<stdio.h> #define N 100 int main() { int G[N][N]; int n,u,k,v; int i,j; scanf("%d",&n); for(i=0;i<n;i++) { for(j=0;j<n;j++) { G[i][j]=0; } } for(i=0;i<n;i++) { scanf("%d %d",&u,&k); u--; for(j=0;j<k;j++) { scanf("%d",&v); v--; G[u][v]=1; } } for(i=0;i<n;i++) { for(j=0;j<n;j++) { if(j)printf(" "); printf("%d",G[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293346/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293346/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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %G = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %G) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %G, i64 400 %invariant.gep83 = getelementptr i8, ptr %G, i64 800 %invariant.gep85 = getelementptr i8, ptr %G, i64 1200 %invariant.gep87 = getelementptr i8, ptr %G, i64 1600 %invariant.gep89 = getelementptr i8, ptr %G, i64 2000 %invariant.gep91 = getelementptr i8, ptr %G, i64 2400 %invariant.gep93 = getelementptr i8, ptr %G, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %G, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep84, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %G, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp65, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2973 = icmp sgt i32 %18, 0 br i1 %cmp2973, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.170 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1467 = icmp sgt i32 %14, 0 br i1 %cmp1467, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.168 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %G, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.168, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.170, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %19 = phi i32 [ %25, %for.end42 ], [ %18, %for.cond28.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3271 = icmp sgt i32 %19, 0 br i1 %cmp3271, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %arrayidx38.peel = getelementptr inbounds [100 x [100 x i32]], ptr %G, i64 0, i64 %indvars.iv79, i64 0 %20 = load i32, ptr %arrayidx38.peel, align 16, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar62 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds [100 x [100 x i32]], ptr %G, i64 0, i64 %indvars.iv79, i64 %indvars.iv %22 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next80, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %G) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdio.h> #define N 100 int main () { int M[N][N]; int n, u, k, v; int i, j; scanf("%d",&n); for ( i = 0; i < n; i++) { for ( j = 0; j < n; j++) M[i][j] = 0; } for ( i = 0; i < n; i++) { scanf("%d%d", &u, &k); u--; for ( j = 0; j < k; j++) { scanf("%d",&v); v--; M[u][v] = 1; } } for ( i = 0; i < n; i++) { for ( j = 0; j < n; j++) { if (j) printf(" "); printf("%d",M[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293397/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293397/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %M) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %M, i64 400 %invariant.gep83 = getelementptr i8, ptr %M, i64 800 %invariant.gep85 = getelementptr i8, ptr %M, i64 1200 %invariant.gep87 = getelementptr i8, ptr %M, i64 1600 %invariant.gep89 = getelementptr i8, ptr %M, i64 2000 %invariant.gep91 = getelementptr i8, ptr %M, i64 2400 %invariant.gep93 = getelementptr i8, ptr %M, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %M, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep84, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %M, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp65, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2973 = icmp sgt i32 %18, 0 br i1 %cmp2973, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.170 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1467 = icmp sgt i32 %14, 0 br i1 %cmp1467, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.168 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.168, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.170, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %19 = phi i32 [ %25, %for.end42 ], [ %18, %for.cond28.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3271 = icmp sgt i32 %19, 0 br i1 %cmp3271, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %arrayidx38.peel = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 0 %20 = load i32, ptr %arrayidx38.peel, align 16, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar62 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 %indvars.iv %22 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next80, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %M) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include<stdio.h> int main () { int a[101][101]; int num; int n, k, v; int i, j; scanf("%d", &n); for(i = 0; i < n; i++) { scanf("%d%d", &num, &k); for(j = 0; j <= n; j++) { a[num][j] = 0; } for(j = 0; j < k; j++) { scanf("%d", &v); a[num][v] = 1; } } for(i = 1; i <= n; i++) { for(j = 1; j < n; j++) { printf("%d ", a[i][j]); } printf("%d\n", a[i][j]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293447/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293447/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.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 @.str.3 = 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 [101 x [101 x i32]], align 16 %num = alloca i32, align 4 %n = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %a) #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 %k) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp60 = icmp sgt i32 %0, 0 br i1 %cmp60, label %for.body, label %for.end42 for.cond21.preheader: ; preds = %for.inc18 %cmp22.not64 = icmp slt i32 %11, 1 br i1 %cmp22.not64, label %for.end42, label %for.cond24.preheader for.body: ; preds = %entry, %for.inc18 %i.061 = phi i32 [ %inc19, %for.inc18 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %num, ptr noundef nonnull %k) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp3.not56 = icmp slt i32 %1, 0 br i1 %cmp3.not56, label %for.cond7.preheader, label %for.body4.lr.ph for.body4.lr.ph: ; preds = %for.body %2 = load i32, ptr %num, align 4, !tbaa !5 %idxprom = sext i32 %2 to i64 %3 = mul nsw i64 %idxprom, 404 %scevgep = getelementptr i8, ptr %a, i64 %3 %4 = add nuw i32 %1, 1 %5 = zext i32 %4 to i64 %6 = shl nuw nsw i64 %5, 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %scevgep, i8 0, i64 %6, i1 false), !tbaa !5 br label %for.cond7.preheader for.cond7.preheader: ; preds = %for.body4.lr.ph, %for.body %7 = load i32, ptr %k, align 4, !tbaa !5 %cmp858 = icmp sgt i32 %7, 0 br i1 %cmp858, label %for.body9, label %for.inc18 for.body9: ; preds = %for.cond7.preheader, %for.body9 %j.159 = phi i32 [ %inc16, %for.body9 ], [ 0, %for.cond7.preheader ] %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %8 = load i32, ptr %num, align 4, !tbaa !5 %idxprom11 = sext i32 %8 to i64 %9 = load i32, ptr %v, align 4, !tbaa !5 %idxprom13 = sext i32 %9 to i64 %arrayidx14 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %idxprom11, i64 %idxprom13 store i32 1, ptr %arrayidx14, align 4, !tbaa !5 %inc16 = add nuw nsw i32 %j.159, 1 %10 = load i32, ptr %k, align 4, !tbaa !5 %cmp8 = icmp slt i32 %inc16, %10 br i1 %cmp8, label %for.body9, label %for.inc18.loopexit, !llvm.loop !9 for.inc18.loopexit: ; preds = %for.body9 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc18 for.inc18: ; preds = %for.inc18.loopexit, %for.cond7.preheader %11 = phi i32 [ %.pre, %for.inc18.loopexit ], [ %1, %for.cond7.preheader ] %inc19 = add nuw nsw i32 %i.061, 1 %cmp = icmp slt i32 %inc19, %11 br i1 %cmp, label %for.body, label %for.cond21.preheader, !llvm.loop !11 for.cond24.preheader: ; preds = %for.cond21.preheader, %for.end34 %12 = phi i32 [ %17, %for.end34 ], [ %11, %for.cond21.preheader ] %indvars.iv68 = phi i64 [ %indvars.iv.next69, %for.end34 ], [ 1, %for.cond21.preheader ] %cmp2562 = icmp sgt i32 %12, 1 br i1 %cmp2562, label %for.body26, label %for.end34 for.body26: ; preds = %for.cond24.preheader, %for.body26 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body26 ], [ 1, %for.cond24.preheader ] %arrayidx30 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv68, i64 %indvars.iv %13 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %13) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %14 = load i32, ptr %n, align 4, !tbaa !5 %15 = sext i32 %14 to i64 %cmp25 = icmp slt i64 %indvars.iv.next, %15 br i1 %cmp25, label %for.body26, label %for.end34, !llvm.loop !12 for.end34: ; preds = %for.body26, %for.cond24.preheader %j.2.lcssa = phi i64 [ 1, %for.cond24.preheader ], [ %indvars.iv.next, %for.body26 ] %idxprom37 = and i64 %j.2.lcssa, 4294967295 %arrayidx38 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv68, i64 %idxprom37 %16 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %16) %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %17 = load i32, ptr %n, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp22.not.not = icmp slt i64 %indvars.iv68, %18 br i1 %cmp22.not.not, label %for.cond24.preheader, label %for.end42, !llvm.loop !13 for.end42: ; preds = %for.end34, %entry, %for.cond21.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #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 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 40804, 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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, 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 nounwind willreturn memory(argmem: write) } 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> #define N 100 int main() { int m[N][N]; int i ,j ,n, u, k, v; scanf("%d", &n); for ( i = 0; i <n; i++ ) { for ( j = 0; j <n; j++ ) m[i][j] = 0; } for ( i = 0; i < n; i++ ) { scanf("%d %d", &u, &k); u--; for ( j = 0; j < k; j++ ) { scanf("%d", &v); v--; m[u][v] = 1; } } for ( i = 0; i < n; i++ ){ for ( j = 0; j < n; j++ ){ if (j) printf(" "); printf("%d", m[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293490/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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %m) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %m, i64 400 %invariant.gep83 = getelementptr i8, ptr %m, i64 800 %invariant.gep85 = getelementptr i8, ptr %m, i64 1200 %invariant.gep87 = getelementptr i8, ptr %m, i64 1600 %invariant.gep89 = getelementptr i8, ptr %m, i64 2000 %invariant.gep91 = getelementptr i8, ptr %m, i64 2400 %invariant.gep93 = getelementptr i8, ptr %m, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %m, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep84, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %m, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp65, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2973 = icmp sgt i32 %18, 0 br i1 %cmp2973, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.170 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1467 = icmp sgt i32 %14, 0 br i1 %cmp1467, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.168 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %m, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.168, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.170, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %19 = phi i32 [ %25, %for.end42 ], [ %18, %for.cond28.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3271 = icmp sgt i32 %19, 0 br i1 %cmp3271, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %arrayidx38.peel = getelementptr inbounds [100 x [100 x i32]], ptr %m, i64 0, i64 %indvars.iv79, i64 0 %20 = load i32, ptr %arrayidx38.peel, align 16, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar62 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds [100 x [100 x i32]], ptr %m, i64 0, i64 %indvars.iv79, i64 %indvars.iv %22 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next80, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %m) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdio.h> int main() { int i,j,n,M[101][101],u,k,v; scanf("%d",&n); for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { M[i][j] = 0; } } for (i = 0; i < n; i++) { scanf("%d%d",&u,&k); u--; for (j = 0; j < k; j++) { scanf("%d",&v); v--; M[u][v] = 1; } } for (i = 0; i < n; i++) { for (j = 0; j < n; j++) { if( j ) printf(" "); printf("%d",M[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293533/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293533/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %M = alloca [101 x [101 x i32]], align 16 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %M) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %M, i64 404 %invariant.gep83 = getelementptr i8, ptr %M, i64 808 %invariant.gep85 = getelementptr i8, ptr %M, i64 1212 %invariant.gep87 = getelementptr i8, ptr %M, i64 1616 %invariant.gep89 = getelementptr i8, ptr %M, i64 2020 %invariant.gep91 = getelementptr i8, ptr %M, i64 2424 %invariant.gep93 = getelementptr i8, ptr %M, i64 2828 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 404 %scevgep = getelementptr i8, ptr %M, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 404 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 4 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 404 %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %6 call void @llvm.memset.p0.i64(ptr align 8 %gep84, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 404 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %7 call void @llvm.memset.p0.i64(ptr align 4 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 404 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 404 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 4 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 404 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 8 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 404 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 4 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 404 %scevgep.epil = getelementptr i8, ptr %M, i64 %12 call void @llvm.memset.p0.i64(ptr align 4 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp65, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2973 = icmp sgt i32 %18, 0 br i1 %cmp2973, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.170 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1467 = icmp sgt i32 %14, 0 br i1 %cmp1467, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.168 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.168, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.170, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %19 = phi i32 [ %25, %for.end42 ], [ %18, %for.cond28.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3271 = icmp sgt i32 %19, 0 br i1 %cmp3271, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %arrayidx38.peel = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 0 %20 = load i32, ptr %arrayidx38.peel, align 4, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar62 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds [101 x [101 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 %indvars.iv %22 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next80, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 40804, 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 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include<stdio.h> #define MAX 101 int G[MAX][MAX]; int main(){ int n,i,j,k,u; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d %d",&u,&k); for(j=0;j<k;j++){ int v; scanf("%d",&v); G[u][v]=1; } } for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ if(j!=n)printf("%d ",G[i][j]); else printf("%d",G[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293584/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293584/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 [6 x i8] c"%d %d\00", align 1 @G = dso_local local_unnamed_addr global [101 x [101 x i32]] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d \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 %u = alloca i32, align 4 %v = 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 %u) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp48 = icmp sgt i32 %0, 0 br i1 %cmp48, label %for.body, label %for.end34 for.cond11.preheader: ; preds = %for.inc8 %cmp12.not52 = icmp slt i32 %5, 1 br i1 %cmp12.not52, label %for.end34, label %for.cond14.preheader for.body: ; preds = %entry, %for.inc8 %i.049 = phi i32 [ %inc9, %for.inc8 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %1 = load i32, ptr %k, align 4, !tbaa !5 %cmp346 = icmp sgt i32 %1, 0 br i1 %cmp346, label %for.body4, label %for.inc8 for.body4: ; preds = %for.body, %for.body4 %j.047 = phi i32 [ %inc, %for.body4 ], [ 0, %for.body ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #4 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %2 = load i32, ptr %u, align 4, !tbaa !5 %idxprom = sext i32 %2 to i64 %3 = load i32, ptr %v, align 4, !tbaa !5 %idxprom6 = sext i32 %3 to i64 %arrayidx7 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %idxprom, i64 %idxprom6 store i32 1, ptr %arrayidx7, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #4 %inc = add nuw nsw i32 %j.047, 1 %4 = load i32, ptr %k, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %4 br i1 %cmp3, label %for.body4, label %for.inc8, !llvm.loop !9 for.inc8: ; preds = %for.body4, %for.body %inc9 = add nuw nsw i32 %i.049, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc9, %5 br i1 %cmp, label %for.body, label %for.cond11.preheader, !llvm.loop !11 for.cond14.preheader: ; preds = %for.cond11.preheader, %for.end30 %6 = phi i32 [ %12, %for.end30 ], [ %5, %for.cond11.preheader ] %indvars.iv55 = phi i64 [ %indvars.iv.next56, %for.end30 ], [ 1, %for.cond11.preheader ] %cmp15.not50 = icmp slt i32 %6, 1 br i1 %cmp15.not50, label %for.end30, label %for.body16 for.body16: ; preds = %for.cond14.preheader, %for.body16 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body16 ], [ 1, %for.cond14.preheader ] %7 = phi i32 [ %10, %for.body16 ], [ %6, %for.cond14.preheader ] %8 = zext i32 %7 to i64 %cmp17.not = icmp eq i64 %indvars.iv, %8 %arrayidx26 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv55, i64 %indvars.iv %9 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %.str..str.2 = select i1 %cmp17.not, ptr @.str, ptr @.str.2 %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str..str.2, i32 noundef %9) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %n, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp15.not.not = icmp slt i64 %indvars.iv, %11 br i1 %cmp15.not.not, label %for.body16, label %for.end30, !llvm.loop !12 for.end30: ; preds = %for.body16, %for.cond14.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1 %12 = load i32, ptr %n, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp12.not.not = icmp slt i64 %indvars.iv55, %13 br i1 %cmp12.not.not, label %for.cond14.preheader, label %for.end34, !llvm.loop !13 for.end34: ; preds = %for.end30, %entry, %for.cond11.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #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 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 @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} !13 = distinct !{!13, !10}
#include<stdio.h> #define MAX 101 int main(){ int a[MAX][MAX] = {}; int datanum,temp,temp2,i,j; scanf("%d",&datanum); for(i=1;i<=datanum;i++){ scanf("%d",&temp); scanf("%d",&temp); for(j=0;j<temp;j++){ scanf("%d",&temp2); a[i][temp2] =1; } } for(i=1;i<=datanum;i++){ for(j=1;j<=datanum;j++){ if(j != 1)printf(" "); printf("%d",a[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293627/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293627/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 [101 x [101 x i32]], align 16 %datanum = alloca i32, align 4 %temp = alloca i32, align 4 %temp2 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %a) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40804) %a, i8 0, i64 40804, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %datanum) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %temp) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %temp2) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %datanum) %0 = load i32, ptr %datanum, align 4, !tbaa !5 %cmp.not45 = icmp slt i32 %0, 1 br i1 %cmp.not45, label %for.end31, label %for.body for.cond12.preheader: ; preds = %for.inc9 %cmp13.not49 = icmp slt i32 %4, 1 br i1 %cmp13.not49, label %for.end31, label %for.cond15.preheader for.body: ; preds = %entry, %for.inc9 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc9 ], [ 1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %temp) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %temp) %1 = load i32, ptr %temp, align 4, !tbaa !5 %cmp443 = icmp sgt i32 %1, 0 br i1 %cmp443, label %for.body5, label %for.inc9 for.body5: ; preds = %for.body, %for.body5 %j.044 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body ] %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %temp2) %2 = load i32, ptr %temp2, align 4, !tbaa !5 %idxprom7 = sext i32 %2 to i64 %arrayidx8 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 %idxprom7 store i32 1, ptr %arrayidx8, align 4, !tbaa !5 %inc = add nuw nsw i32 %j.044, 1 %3 = load i32, ptr %temp, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %3 br i1 %cmp4, label %for.body5, label %for.inc9, !llvm.loop !9 for.inc9: ; preds = %for.body5, %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %datanum, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %5 br i1 %cmp.not.not, label %for.body, label %for.cond12.preheader, !llvm.loop !11 for.cond15.preheader: ; preds = %for.cond12.preheader, %for.end27 %6 = phi i32 [ %12, %for.end27 ], [ %4, %for.cond12.preheader ] %indvars.iv56 = phi i64 [ %indvars.iv.next57, %for.end27 ], [ 1, %for.cond12.preheader ] %cmp16.not47 = icmp slt i32 %6, 1 br i1 %cmp16.not47, label %for.end27, label %if.end.peel if.end.peel: ; preds = %for.cond15.preheader %arrayidx23.peel = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv56, i64 1 %7 = load i32, ptr %arrayidx23.peel, align 4, !tbaa !5 %call24.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) %8 = load i32, ptr %datanum, align 4, !tbaa !5 %cmp16.not.not.peel = icmp sgt i32 %8, 1 br i1 %cmp16.not.not.peel, label %if.end, label %for.end27 if.end: ; preds = %if.end.peel, %if.end %indvars.iv52 = phi i64 [ %indvars.iv.next53, %if.end ], [ 2, %if.end.peel ] %putchar42 = call i32 @putchar(i32 32) %arrayidx23 = getelementptr inbounds [101 x [101 x i32]], ptr %a, i64 0, i64 %indvars.iv56, i64 %indvars.iv52 %9 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %9) %indvars.iv.next53 = add nuw nsw i64 %indvars.iv52, 1 %10 = load i32, ptr %datanum, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp16.not.not = icmp slt i64 %indvars.iv52, %11 br i1 %cmp16.not.not, label %if.end, label %for.end27, !llvm.loop !12 for.end27: ; preds = %if.end, %if.end.peel, %for.cond15.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1 %12 = load i32, ptr %datanum, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp13.not.not = icmp slt i64 %indvars.iv56, %13 br i1 %cmp13.not.not, label %for.cond15.preheader, label %for.end31, !llvm.loop !14 for.end31: ; preds = %for.end27, %entry, %for.cond12.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %temp2) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %temp) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %datanum) #5 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %a) #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: 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: 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) #1 ; 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 = { 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 = { 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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10, !13} !13 = !{!"llvm.loop.peeled.count", i32 1} !14 = distinct !{!14, !10}
#include<stdio.h> int main(){ int n, i, j, u, k, v; int AM[100][100]; scanf("%d",&n); for(i = 0 ; i < n ; i++){ for(j = 0 ; j < n ; j++){ AM[i][j] = 0; } } for(i = 0 ; i < n ; i++){ scanf("%d%d",&u,&k); u--; for(j = 0 ; j < k ; j++){ scanf("%d",&v); v--; AM[u][v] = 1; } } for(i = 0 ; i < n ; i++){ for(j = 0 ; j < n ; j++){ if(j > 0) printf(" "); printf("%d",AM[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293670/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293670/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 %AM = alloca [100 x [100 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 %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %AM) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp66 = icmp sgt i32 %0, 0 br i1 %cmp66, label %for.cond1.preheader.us.preheader, label %for.end47 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %AM, i64 400 %invariant.gep84 = getelementptr i8, ptr %AM, i64 800 %invariant.gep86 = getelementptr i8, ptr %AM, i64 1200 %invariant.gep88 = getelementptr i8, ptr %AM, i64 1600 %invariant.gep90 = getelementptr i8, ptr %AM, i64 2000 %invariant.gep92 = getelementptr i8, ptr %AM, i64 2400 %invariant.gep94 = getelementptr i8, ptr %AM, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %AM, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep85 = getelementptr i8, ptr %invariant.gep84, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep85, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep87 = getelementptr i8, ptr %invariant.gep86, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep87, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep89 = getelementptr i8, ptr %invariant.gep88, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep89, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep91 = getelementptr i8, ptr %invariant.gep90, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep91, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep93 = getelementptr i8, ptr %invariant.gep92, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep93, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep95 = getelementptr i8, ptr %invariant.gep94, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep95, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %AM, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp66, label %for.body11, label %for.end47 for.cond28.preheader: ; preds = %for.inc25 %cmp2974 = icmp sgt i32 %18, 0 br i1 %cmp2974, label %for.cond31.preheader, label %for.end47 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.171 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1468 = icmp sgt i32 %14, 0 br i1 %cmp1468, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.169 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %AM, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.169, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.171, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end43 %19 = phi i32 [ %25, %for.end43 ], [ %18, %for.cond28.preheader ] %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.end43 ], [ 0, %for.cond28.preheader ] %cmp3272 = icmp sgt i32 %19, 0 br i1 %cmp3272, label %if.end.peel, label %for.end43 if.end.peel: ; preds = %for.cond31.preheader %arrayidx39.peel = getelementptr inbounds [100 x [100 x i32]], ptr %AM, i64 0, i64 %indvars.iv80, i64 0 %20 = load i32, ptr %arrayidx39.peel, align 16, !tbaa !5 %call40.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end43 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar63 = call i32 @putchar(i32 32) %arrayidx39 = getelementptr inbounds [100 x [100 x i32]], ptr %AM, i64 0, i64 %indvars.iv80, i64 %indvars.iv %22 = load i32, ptr %arrayidx39, align 4, !tbaa !5 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end43, !llvm.loop !15 for.end43: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next81, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end47, !llvm.loop !17 for.end47: ; preds = %for.end43, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %AM) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdio.h> int main(){ int i,j; int adj[100][100]; int n,u,k,v; for(i=0;i<100;i++){for(j=0;j<100;j++){adj[i][j]=0;}} scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&u); scanf("%d",&k); u--; for(j=0;j<k;j++){ scanf("%d",&v); v--; adj[u][v]=1; } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(j>0){printf(" ");} printf("%d",adj[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293720/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293720/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: %adj = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %k = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %adj) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40000) %adj, i8 0, i64 40000, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1069 = icmp sgt i32 %0, 0 br i1 %cmp1069, label %for.body11, label %for.end48 for.cond29.preheader: ; preds = %for.inc26 %cmp3073 = icmp sgt i32 %6, 0 br i1 %cmp3073, label %for.cond32.preheader, label %for.end48 for.body11: ; preds = %entry, %for.inc26 %i.170 = phi i32 [ %inc27, %for.inc26 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %u) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %1 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %1, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %2 = load i32, ptr %k, align 4, !tbaa !5 %cmp1567 = icmp sgt i32 %2, 0 br i1 %cmp1567, label %for.body16, label %for.inc26 for.body16: ; preds = %for.body11, %for.body16 %j.168 = phi i32 [ %inc24, %for.body16 ], [ 0, %for.body11 ] %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %3 = load i32, ptr %v, align 4, !tbaa !5 %dec18 = add nsw i32 %3, -1 store i32 %dec18, ptr %v, align 4, !tbaa !5 %4 = load i32, ptr %u, align 4, !tbaa !5 %idxprom19 = sext i32 %4 to i64 %idxprom21 = sext i32 %dec18 to i64 %arrayidx22 = getelementptr inbounds [100 x [100 x i32]], ptr %adj, i64 0, i64 %idxprom19, i64 %idxprom21 store i32 1, ptr %arrayidx22, align 4, !tbaa !5 %inc24 = add nuw nsw i32 %j.168, 1 %5 = load i32, ptr %k, align 4, !tbaa !5 %cmp15 = icmp slt i32 %inc24, %5 br i1 %cmp15, label %for.body16, label %for.inc26, !llvm.loop !9 for.inc26: ; preds = %for.body16, %for.body11 %inc27 = add nuw nsw i32 %i.170, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc27, %6 br i1 %cmp10, label %for.body11, label %for.cond29.preheader, !llvm.loop !11 for.cond32.preheader: ; preds = %for.cond29.preheader, %for.end44 %7 = phi i32 [ %13, %for.end44 ], [ %6, %for.cond29.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end44 ], [ 0, %for.cond29.preheader ] %cmp3371 = icmp sgt i32 %7, 0 br i1 %cmp3371, label %if.end.peel, label %for.end44 if.end.peel: ; preds = %for.cond32.preheader %arrayidx40.peel = getelementptr inbounds [100 x [100 x i32]], ptr %adj, i64 0, i64 %indvars.iv79, i64 0 %8 = load i32, ptr %arrayidx40.peel, align 16, !tbaa !5 %call41.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %8) %9 = load i32, ptr %n, align 4, !tbaa !5 %cmp33.peel = icmp sgt i32 %9, 1 br i1 %cmp33.peel, label %if.end, label %for.end44 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar64 = call i32 @putchar(i32 32) %arrayidx40 = getelementptr inbounds [100 x [100 x i32]], ptr %adj, i64 0, i64 %indvars.iv79, i64 %indvars.iv %10 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %10) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = load i32, ptr %n, align 4, !tbaa !5 %12 = sext i32 %11 to i64 %cmp33 = icmp slt i64 %indvars.iv.next, %12 br i1 %cmp33, label %if.end, label %for.end44, !llvm.loop !12 for.end44: ; preds = %if.end, %if.end.peel, %for.cond32.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %13 = load i32, ptr %n, align 4, !tbaa !5 %14 = sext i32 %13 to i64 %cmp30 = icmp slt i64 %indvars.iv.next80, %14 br i1 %cmp30, label %for.cond32.preheader, label %for.end48, !llvm.loop !14 for.end48: ; preds = %for.end44, %entry, %for.cond29.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %adj) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10, !13} !13 = !{!"llvm.loop.peeled.count", i32 1} !14 = distinct !{!14, !10}
#include<stdio.h> int A[101][101], n; int main() { int n, i, j, k, l, m; scanf("%d", &n); for(i = 1; i <= n; i++) { for(j = 1; j <= n; j++) { A[i][j] = 0; } } for(i = 1; i <= n; i++) { scanf("%d %d", &k, &l); if(l > 0) { for(j = 1; j <= l; j++) { scanf("%d", &m); A[k][m] = 1; } } } for(i = 1; i <= n; i++) { for(j = 1; j <= n; j++) { if(j != 1) printf(" "); printf("%d", A[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293764/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293764/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 @A = dso_local local_unnamed_addr global [101 x [101 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @n = dso_local local_unnamed_addr global i32 0, align 4 ; 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 %l = alloca i32, align 4 %m = 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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not68 = icmp slt i32 %0, 1 br i1 %cmp.not68, label %for.end49, label %for.cond1.preheader.preheader for.cond1.preheader.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.preheader.new for.cond1.preheader.preheader.new: ; preds = %for.cond1.preheader.preheader %unroll_iter = and i64 %1, 4294967288 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %indvar.next.7, %for.cond1.preheader ] %niter = phi i64 [ 0, %for.cond1.preheader.preheader.new ], [ %niter.next.7, %for.cond1.preheader ] %4 = mul nuw nsw i64 %indvar, 404 %gep = getelementptr i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 %4 call void @llvm.memset.p0.i64(ptr align 8 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 404 %gep85 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 404), i64 %5 call void @llvm.memset.p0.i64(ptr align 4 %gep85, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 404 %gep86 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 808), i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 404 %gep87 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 1212), i64 %7 call void @llvm.memset.p0.i64(ptr align 4 %gep87, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 404 %gep88 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 1616), i64 %8 call void @llvm.memset.p0.i64(ptr align 8 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 404 %gep89 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 2020), i64 %9 call void @llvm.memset.p0.i64(ptr align 4 %gep89, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 404 %gep90 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 2424), i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 404 %gep91 = getelementptr i8, ptr getelementptr (i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 2828), i64 %11 call void @llvm.memset.p0.i64(ptr align 4 %gep91, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader, %for.cond1.preheader.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.preheader ], [ %indvar.next.7, %for.cond1.preheader ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.epil for.cond1.preheader.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 404 %gep.epil = getelementptr i8, ptr getelementptr inbounds ([101 x [101 x i32]], ptr @A, i64 0, i64 1, i64 1), i64 %12 call void @llvm.memset.p0.i64(ptr align 4 %gep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp.not68, label %for.end49, label %for.body11 for.cond28.preheader: ; preds = %for.inc25 %cmp29.not76 = icmp slt i32 %17, 1 br i1 %cmp29.not76, label %for.end49, label %for.cond31.preheader for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.173 = phi i32 [ %inc26, %for.inc25 ], [ 1, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %k, ptr noundef nonnull %l) %13 = load i32, ptr %l, align 4 %cmp13 = icmp slt i32 %13, 1 br i1 %cmp13, label %for.inc25, label %for.body16 for.body16: ; preds = %for.body11, %for.body16 %j.171 = phi i32 [ %inc23, %for.body16 ], [ 1, %for.body11 ] %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m) %14 = load i32, ptr %k, align 4, !tbaa !5 %idxprom18 = sext i32 %14 to i64 %15 = load i32, ptr %m, align 4, !tbaa !5 %idxprom20 = sext i32 %15 to i64 %arrayidx21 = getelementptr inbounds [101 x [101 x i32]], ptr @A, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.171, 1 %16 = load i32, ptr %l, align 4, !tbaa !5 %cmp15.not.not = icmp slt i32 %j.171, %16 br i1 %cmp15.not.not, label %for.body16, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body16, %for.body11 %inc26 = add nuw nsw i32 %i.173, 1 %17 = load i32, ptr %n, align 4, !tbaa !5 %cmp10.not.not = icmp slt i32 %i.173, %17 br i1 %cmp10.not.not, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end45 %18 = phi i32 [ %23, %for.end45 ], [ %17, %for.cond28.preheader ] %indvars.iv81 = phi i64 [ %indvars.iv.next82, %for.end45 ], [ 1, %for.cond28.preheader ] %cmp32.not74 = icmp slt i32 %18, 1 br i1 %cmp32.not74, label %for.end45, label %if.end37.peel if.end37.peel: ; preds = %for.cond31.preheader %arrayidx41.peel.phi.trans.insert = getelementptr inbounds [101 x [101 x i32]], ptr @A, i64 0, i64 %indvars.iv81, i64 1 %.pre = load i32, ptr %arrayidx41.peel.phi.trans.insert, align 4, !tbaa !5 %call42.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre) %19 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.not.not.peel = icmp sgt i32 %19, 1 br i1 %cmp32.not.not.peel, label %if.end37, label %for.end45 if.end37: ; preds = %if.end37.peel, %if.end37 %indvars.iv = phi i64 [ %indvars.iv.next, %if.end37 ], [ 2, %if.end37.peel ] %putchar65 = call i32 @putchar(i32 32) %arrayidx41 = getelementptr inbounds [101 x [101 x i32]], ptr @A, i64 0, i64 %indvars.iv81, i64 %indvars.iv %20 = load i32, ptr %arrayidx41, align 4, !tbaa !5 %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %21 = load i32, ptr %n, align 4, !tbaa !5 %22 = sext i32 %21 to i64 %cmp32.not.not = icmp slt i64 %indvars.iv, %22 br i1 %cmp32.not.not, label %if.end37, label %for.end45, !llvm.loop !15 for.end45: ; preds = %if.end37, %if.end37.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp29.not.not = icmp slt i64 %indvars.iv81, %24 br i1 %cmp29.not.not, label %for.cond31.preheader, label %for.end49, !llvm.loop !17 for.end49: ; preds = %for.end45, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #5 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: 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdio.h> #define N 100 int main(){ int M[N][N]; int n,u,v,k; int i,j; scanf("%d",&n); for(i=0; i<n; i++){ for(j=0; j<n; j++){ M[i][j] = 0; } } for(i=0; i<n; i++){ scanf("%d%d",&u,&k); u--; for(j=0; j<k; j++){ scanf("%d",&v); v--; M[u][v] = 1; } } for(i=0; i<n; i++){ for(j=0; j<n; j++){ if(j) printf(" "); printf("%d",M[i][j]); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293807/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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 %u = alloca i32, align 4 %v = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %M) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #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) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond1.preheader.us.preheader, label %for.end46 for.cond1.preheader.us.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 %xtraiter = and i64 %1, 7 %3 = icmp ult i32 %0, 8 br i1 %3, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us.preheader.new for.cond1.preheader.us.preheader.new: ; preds = %for.cond1.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 %invariant.gep = getelementptr i8, ptr %M, i64 400 %invariant.gep83 = getelementptr i8, ptr %M, i64 800 %invariant.gep85 = getelementptr i8, ptr %M, i64 1200 %invariant.gep87 = getelementptr i8, ptr %M, i64 1600 %invariant.gep89 = getelementptr i8, ptr %M, i64 2000 %invariant.gep91 = getelementptr i8, ptr %M, i64 2400 %invariant.gep93 = getelementptr i8, ptr %M, i64 2800 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond1.preheader.us ] %niter = phi i64 [ 0, %for.cond1.preheader.us.preheader.new ], [ %niter.next.7, %for.cond1.preheader.us ] %4 = mul nuw nsw i64 %indvar, 400 %scevgep = getelementptr i8, ptr %M, i64 %4 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %2, i1 false), !tbaa !5 %5 = mul nuw i64 %indvar, 400 %gep = getelementptr i8, ptr %invariant.gep, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %gep, i8 0, i64 %2, i1 false), !tbaa !5 %6 = mul nuw i64 %indvar, 400 %gep84 = getelementptr i8, ptr %invariant.gep83, i64 %6 call void @llvm.memset.p0.i64(ptr align 16 %gep84, i8 0, i64 %2, i1 false), !tbaa !5 %7 = mul nuw i64 %indvar, 400 %gep86 = getelementptr i8, ptr %invariant.gep85, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %gep86, i8 0, i64 %2, i1 false), !tbaa !5 %8 = mul nuw i64 %indvar, 400 %gep88 = getelementptr i8, ptr %invariant.gep87, i64 %8 call void @llvm.memset.p0.i64(ptr align 16 %gep88, i8 0, i64 %2, i1 false), !tbaa !5 %9 = mul nuw i64 %indvar, 400 %gep90 = getelementptr i8, ptr %invariant.gep89, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %gep90, i8 0, i64 %2, i1 false), !tbaa !5 %10 = mul nuw i64 %indvar, 400 %gep92 = getelementptr i8, ptr %invariant.gep91, i64 %10 call void @llvm.memset.p0.i64(ptr align 16 %gep92, i8 0, i64 %2, i1 false), !tbaa !5 %11 = mul nuw i64 %indvar, 400 %gep94 = getelementptr i8, ptr %invariant.gep93, i64 %11 call void @llvm.memset.p0.i64(ptr align 16 %gep94, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.cond9.preheader.unr-lcssa, label %for.cond1.preheader.us, !llvm.loop !9 for.cond9.preheader.unr-lcssa: ; preds = %for.cond1.preheader.us, %for.cond1.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond1.preheader.us.preheader ], [ %indvar.next.7, %for.cond1.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond9.preheader, label %for.cond1.preheader.us.epil for.cond1.preheader.us.epil: ; preds = %for.cond9.preheader.unr-lcssa, %for.cond1.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond1.preheader.us.epil ], [ %indvar.unr, %for.cond9.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond1.preheader.us.epil ], [ 0, %for.cond9.preheader.unr-lcssa ] %12 = mul nuw nsw i64 %indvar.epil, 400 %scevgep.epil = getelementptr i8, ptr %M, i64 %12 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.epil, i8 0, i64 %2, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond9.preheader, label %for.cond1.preheader.us.epil, !llvm.loop !11 for.cond9.preheader: ; preds = %for.cond1.preheader.us.epil, %for.cond9.preheader.unr-lcssa br i1 %cmp65, label %for.body11, label %for.end46 for.cond28.preheader: ; preds = %for.inc25 %cmp2973 = icmp sgt i32 %18, 0 br i1 %cmp2973, label %for.cond31.preheader, label %for.end46 for.body11: ; preds = %for.cond9.preheader, %for.inc25 %i.170 = phi i32 [ %inc26, %for.inc25 ], [ 0, %for.cond9.preheader ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %u, ptr noundef nonnull %k) %13 = load i32, ptr %u, align 4, !tbaa !5 %dec = add nsw i32 %13, -1 store i32 %dec, ptr %u, align 4, !tbaa !5 %14 = load i32, ptr %k, align 4, !tbaa !5 %cmp1467 = icmp sgt i32 %14, 0 br i1 %cmp1467, label %for.body15, label %for.inc25 for.body15: ; preds = %for.body11, %for.body15 %j.168 = phi i32 [ %inc23, %for.body15 ], [ 0, %for.body11 ] %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %15 = load i32, ptr %v, align 4, !tbaa !5 %dec17 = add nsw i32 %15, -1 store i32 %dec17, ptr %v, align 4, !tbaa !5 %16 = load i32, ptr %u, align 4, !tbaa !5 %idxprom18 = sext i32 %16 to i64 %idxprom20 = sext i32 %dec17 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %idxprom18, i64 %idxprom20 store i32 1, ptr %arrayidx21, align 4, !tbaa !5 %inc23 = add nuw nsw i32 %j.168, 1 %17 = load i32, ptr %k, align 4, !tbaa !5 %cmp14 = icmp slt i32 %inc23, %17 br i1 %cmp14, label %for.body15, label %for.inc25, !llvm.loop !13 for.inc25: ; preds = %for.body15, %for.body11 %inc26 = add nuw nsw i32 %i.170, 1 %18 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc26, %18 br i1 %cmp10, label %for.body11, label %for.cond28.preheader, !llvm.loop !14 for.cond31.preheader: ; preds = %for.cond28.preheader, %for.end42 %19 = phi i32 [ %25, %for.end42 ], [ %18, %for.cond28.preheader ] %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.end42 ], [ 0, %for.cond28.preheader ] %cmp3271 = icmp sgt i32 %19, 0 br i1 %cmp3271, label %if.end.peel, label %for.end42 if.end.peel: ; preds = %for.cond31.preheader %arrayidx38.peel = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 0 %20 = load i32, ptr %arrayidx38.peel, align 16, !tbaa !5 %call39.peel = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %20) %21 = load i32, ptr %n, align 4, !tbaa !5 %cmp32.peel = icmp sgt i32 %21, 1 br i1 %cmp32.peel, label %if.end, label %for.end42 if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar62 = call i32 @putchar(i32 32) %arrayidx38 = getelementptr inbounds [100 x [100 x i32]], ptr %M, i64 0, i64 %indvars.iv79, i64 %indvars.iv %22 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %22) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp32 = icmp slt i64 %indvars.iv.next, %24 br i1 %cmp32, label %if.end, label %for.end42, !llvm.loop !15 for.end42: ; preds = %if.end, %if.end.peel, %for.cond31.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %25 = load i32, ptr %n, align 4, !tbaa !5 %26 = sext i32 %25 to i64 %cmp29 = icmp slt i64 %indvars.iv.next80, %26 br i1 %cmp29, label %for.cond31.preheader, label %for.end46, !llvm.loop !17 for.end46: ; preds = %for.end42, %entry, %for.cond9.preheader, %for.cond28.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %M) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10}
#include <stdlib.h> #include <stdio.h> int main() { int n,m; scanf("%d%d",&n,&m); int a[m],b[m]; int f[200001]={0},s[200001]={0}; for(int i=0;i<m;i++){ scanf("%d%d",&a[i],&b[i]); if(a[i]==1){ f[b[i]]=1; } if(b[i]==n){ s[a[i]]=1; } } for(int i=1;i<=n;i++){ if(f[i]==1&&s[i]==1){ printf("POSSIBLE"); return 0; } } printf("IMPOSSIBLE"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293850/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293850/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 [9 x i8] c"POSSIBLE\00", align 1 @.str.2 = private unnamed_addr constant [11 x i8] c"IMPOSSIBLE\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 %f = alloca [200001 x i32], align 16 %s = alloca [200001 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 %m) #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 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %m, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 call void @llvm.lifetime.start.p0(i64 800004, ptr nonnull %f) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800004) %f, i8 0, i64 800004, i1 false) call void @llvm.lifetime.start.p0(i64 800004, ptr nonnull %s) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(800004) %s, i8 0, i64 800004, i1 false) %cmp54 = icmp sgt i32 %3, 0 br i1 %cmp54, label %for.body, label %entry.for.cond22.preheader_crit_edge entry.for.cond22.preheader_crit_edge: ; preds = %entry %.pre62 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond22.preheader for.cond22.preheader: ; preds = %for.inc, %entry.for.cond22.preheader_crit_edge %5 = phi i32 [ %.pre62, %entry.for.cond22.preheader_crit_edge ], [ %8, %for.inc ] %cmp23.not56 = icmp slt i32 %5, 1 br i1 %cmp23.not56, label %cleanup39, label %for.body25.preheader for.body25.preheader: ; preds = %for.cond22.preheader %6 = add nuw i32 %5, 1 %wide.trip.count = zext i32 %6 to i64 br label %for.body25 for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %arrayidx3 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx3) %7 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp7 = icmp eq i32 %7, 1 %.pre = load i32, ptr %arrayidx3, align 4, !tbaa !5 br i1 %cmp7, label %if.then, label %if.end if.then: ; preds = %for.body %idxprom10 = sext i32 %.pre to i64 %arrayidx11 = getelementptr inbounds [200001 x i32], ptr %f, i64 0, i64 %idxprom10 store i32 1, ptr %arrayidx11, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %for.body %8 = load i32, ptr %n, align 4, !tbaa !5 %cmp14 = icmp eq i32 %.pre, %8 br i1 %cmp14, label %if.then15, label %for.inc if.then15: ; preds = %if.end %idxprom18 = sext i32 %7 to i64 %arrayidx19 = getelementptr inbounds [200001 x i32], ptr %s, i64 0, i64 %idxprom18 store i32 1, ptr %arrayidx19, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %if.end, %if.then15 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %9 = load i32, ptr %m, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp = icmp slt i64 %indvars.iv.next, %10 br i1 %cmp, label %for.body, label %for.cond22.preheader, !llvm.loop !9 for.body25: ; preds = %for.body25.preheader, %for.inc35 %indvars.iv59 = phi i64 [ 1, %for.body25.preheader ], [ %indvars.iv.next60, %for.inc35 ] %arrayidx27 = getelementptr inbounds [200001 x i32], ptr %f, i64 0, i64 %indvars.iv59 %11 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %cmp28 = icmp eq i32 %11, 1 br i1 %cmp28, label %land.lhs.true, label %for.inc35 land.lhs.true: ; preds = %for.body25 %arrayidx30 = getelementptr inbounds [200001 x i32], ptr %s, i64 0, i64 %indvars.iv59 %12 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %cmp31 = icmp eq i32 %12, 1 br i1 %cmp31, label %cleanup39, label %for.inc35 for.inc35: ; preds = %for.body25, %land.lhs.true %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1 %exitcond.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count br i1 %exitcond.not, label %cleanup39, label %for.body25, !llvm.loop !11 cleanup39: ; preds = %for.inc35, %land.lhs.true, %for.cond22.preheader %.str.1.sink = phi ptr [ @.str.2, %for.cond22.preheader ], [ @.str.1, %land.lhs.true ], [ @.str.2, %for.inc35 ] %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 800004, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 800004, ptr nonnull %f) #5 call void @llvm.stackrestore.p0(ptr %2) 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: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #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: 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 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 = { 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 = !{!"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 c[200000]; int table[200000] = {0}; int main(void){ int N, M; scanf("%d %d", &N, &M); int a, b; int i, count=0; for(i=0;i<M;i++){ scanf("%d %d", &a, &b); if(b == N) table[a] = 1; if(a == 1){ c[count] = b; count++; } } int possible=0; for(i=0;i<count;i++){ if(table[c[i]] == 1){ possible = 1; break; } } if(possible == 1) printf("POSSIBLE\n"); else printf("IMPOSSIBLE\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293894/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293894/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" @table = dso_local local_unnamed_addr global [200000 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @c = dso_local local_unnamed_addr global [200000 x i32] zeroinitializer, align 16 @str = private unnamed_addr constant [11 x i8] c"IMPOSSIBLE\00", align 1 @str.3 = private unnamed_addr constant [9 x i8] c"POSSIBLE\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 %b = 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 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %0 = load i32, ptr %M, align 4, !tbaa !5 %cmp34 = icmp sgt i32 %0, 0 br i1 %cmp34, label %for.body, label %if.end26 for.cond9.preheader: ; preds = %for.inc %cmp1037 = icmp sgt i32 %count.1, 0 br i1 %cmp1037, label %for.body11.preheader, label %if.end26 for.body11.preheader: ; preds = %for.cond9.preheader %wide.trip.count = zext i32 %count.1 to i64 br label %for.body11 for.body: ; preds = %entry, %for.inc %count.036 = phi i32 [ %count.1, %for.inc ], [ 0, %entry ] %i.035 = phi i32 [ %inc8, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %1 = load i32, ptr %b, align 4, !tbaa !5 %2 = load i32, ptr %N, align 4, !tbaa !5 %cmp2 = icmp eq i32 %1, %2 %3 = load i32, ptr %a, align 4, !tbaa !5 br i1 %cmp2, label %if.then, label %if.end if.then: ; preds = %for.body %idxprom = sext i32 %3 to i64 %arrayidx = getelementptr inbounds [200000 x i32], ptr @table, i64 0, i64 %idxprom store i32 1, ptr %arrayidx, align 4, !tbaa !5 br label %if.end if.end: ; preds = %for.body, %if.then %cmp3 = icmp eq i32 %3, 1 br i1 %cmp3, label %if.then4, label %for.inc if.then4: ; preds = %if.end %idxprom5 = sext i32 %count.036 to i64 %arrayidx6 = getelementptr inbounds [200000 x i32], ptr @c, i64 0, i64 %idxprom5 store i32 %1, ptr %arrayidx6, align 4, !tbaa !5 %inc = add nsw i32 %count.036, 1 br label %for.inc for.inc: ; preds = %if.end, %if.then4 %count.1 = phi i32 [ %inc, %if.then4 ], [ %count.036, %if.end ] %inc8 = add nuw nsw i32 %i.035, 1 %4 = load i32, ptr %M, align 4, !tbaa !5 %cmp = icmp slt i32 %inc8, %4 br i1 %cmp, label %for.body, label %for.cond9.preheader, !llvm.loop !9 for.cond9: ; preds = %for.body11 %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 %if.end26, label %for.body11, !llvm.loop !11 for.body11: ; preds = %for.body11.preheader, %for.cond9 %indvars.iv = phi i64 [ 0, %for.body11.preheader ], [ %indvars.iv.next, %for.cond9 ] %arrayidx13 = getelementptr inbounds [200000 x i32], ptr @c, i64 0, i64 %indvars.iv %5 = load i32, ptr %arrayidx13, align 4, !tbaa !5 %idxprom14 = sext i32 %5 to i64 %arrayidx15 = getelementptr inbounds [200000 x i32], ptr @table, i64 0, i64 %idxprom14 %6 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %cmp16 = icmp eq i32 %6, 1 br i1 %cmp16, label %if.end26, label %for.cond9 if.end26: ; preds = %for.cond9, %for.body11, %for.cond9.preheader, %entry %str.sink = phi ptr [ @str, %entry ], [ @str, %for.cond9.preheader ], [ @str.3, %for.body11 ], [ @str, %for.cond9 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.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 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: 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}
// Aizu 1209: Square Coins // 2017.9.22 bal4u@uu #include <stdio.h> #define N 17 int tbl[20]; int dp[20][303]; int main() { int n, i, j; for (i = 1; i <= N; i++) tbl[i] = i*i; dp[0][0] = 1; for (i = 1; i <= N; i++) for (n = 0; n <= 300; n++) { dp[i][n] += dp[i-1][n]; for (j = tbl[i]; n+j <= 300; j += tbl[i]) dp[i][n+j] += dp[i-1][n]; } while (scanf("%d", &n) && n) printf("%d\n", dp[N][n]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293944/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" @tbl = dso_local local_unnamed_addr global [20 x i32] zeroinitializer, align 16 @dp = dso_local local_unnamed_addr global [20 x [303 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 nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 store <4 x i32> <i32 1, i32 4, i32 9, i32 16>, ptr getelementptr inbounds ([20 x i32], ptr @tbl, i64 0, i64 1), align 4, !tbaa !5 store <4 x i32> <i32 25, i32 36, i32 49, i32 64>, ptr getelementptr inbounds ([20 x i32], ptr @tbl, i64 0, i64 5), align 4, !tbaa !5 store <4 x i32> <i32 81, i32 100, i32 121, i32 144>, ptr getelementptr inbounds ([20 x i32], ptr @tbl, i64 0, i64 9), align 4, !tbaa !5 store <4 x i32> <i32 169, i32 196, i32 225, i32 256>, ptr getelementptr inbounds ([20 x i32], ptr @tbl, i64 0, i64 13), align 4, !tbaa !5 store i32 289, ptr getelementptr inbounds ([20 x i32], ptr @tbl, i64 0, i64 17), align 4, !tbaa !5 store i32 1, ptr @dp, align 16, !tbaa !5 br label %for.cond4.preheader for.cond4.preheader: ; preds = %entry, %for.inc40 %indvars.iv81 = phi i64 [ 1, %entry ], [ %indvars.iv.next82, %for.inc40 ] %0 = add nsw i64 %indvars.iv81, -1 %arrayidx16 = getelementptr inbounds [20 x i32], ptr @tbl, i64 0, i64 %indvars.iv81 %1 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %2 = sext i32 %1 to i64 br label %for.body6 while.cond.preheader: ; preds = %for.inc40 store i32 301, ptr %n, align 4, !tbaa !5 %call70 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool71 = icmp ne i32 %call70, 0 %3 = load i32, ptr %n, align 4 %tobool4372 = icmp ne i32 %3, 0 %4 = select i1 %tobool71, i1 %tobool4372, i1 false br i1 %4, label %while.body, label %while.end for.body6: ; preds = %for.cond4.preheader, %for.inc37 %indvars.iv77 = phi i64 [ 0, %for.cond4.preheader ], [ %indvars.iv.next78, %for.inc37 ] %arrayidx10 = getelementptr inbounds [20 x [303 x i32]], ptr @dp, i64 0, i64 %0, i64 %indvars.iv77 %5 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %arrayidx14 = getelementptr inbounds [20 x [303 x i32]], ptr @dp, i64 0, i64 %indvars.iv81, i64 %indvars.iv77 %6 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %add = add nsw i32 %6, %5 store i32 %add, ptr %arrayidx14, align 4, !tbaa !5 %7 = add nsw i64 %indvars.iv77, %2 %cmp1964 = icmp slt i64 %7, 301 br i1 %cmp1964, label %for.body20, label %for.inc37 for.body20: ; preds = %for.body6, %for.body20 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body20 ], [ %2, %for.body6 ] %add1866.in = phi i64 [ %10, %for.body20 ], [ %7, %for.body6 ] %8 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %sext = shl i64 %add1866.in, 32 %idxprom29 = ashr exact i64 %sext, 32 %arrayidx30 = getelementptr inbounds [20 x [303 x i32]], ptr @dp, i64 0, i64 %indvars.iv81, i64 %idxprom29 %9 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %add31 = add nsw i32 %9, %8 store i32 %add31, ptr %arrayidx30, align 4, !tbaa !5 %indvars.iv.next = add i64 %indvars.iv, %2 %10 = add nsw i64 %indvars.iv.next, %indvars.iv77 %cmp19 = icmp slt i64 %10, 301 br i1 %cmp19, label %for.body20, label %for.inc37, !llvm.loop !9 for.inc37: ; preds = %for.body20, %for.body6 %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %exitcond.not = icmp eq i64 %indvars.iv.next78, 301 br i1 %exitcond.not, label %for.inc40, label %for.body6, !llvm.loop !11 for.inc40: ; preds = %for.inc37 %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %exitcond85.not = icmp eq i64 %indvars.iv.next82, 18 br i1 %exitcond85.not, label %while.cond.preheader, label %for.cond4.preheader, !llvm.loop !12 while.body: ; preds = %while.cond.preheader, %while.body %11 = phi i32 [ %13, %while.body ], [ %3, %while.cond.preheader ] %idxprom44 = sext i32 %11 to i64 %arrayidx45 = getelementptr inbounds [20 x [303 x i32]], ptr @dp, i64 0, i64 17, i64 %idxprom44 %12 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %call46 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %12) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool = icmp ne i32 %call, 0 %13 = load i32, ptr %n, align 4 %tobool43 = icmp ne i32 %13, 0 %14 = select i1 %tobool, i1 %tobool43, i1 false br i1 %14, label %while.body, label %while.end, !llvm.loop !13 while.end: ; preds = %while.body, %while.cond.preheader 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 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> int main(void) { int H, R; scanf("%d%d", &H, &R); if (H + R == 0){ printf("0\n"); } else if (H + R < 0){ printf("-1\n"); } else { printf("1\n"); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_293988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_293988/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 [2 x i8] c"1\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 @str.5 = 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: %H = alloca i32, align 4 %R = 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 %R) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %R) %0 = load i32, ptr %H, align 4, !tbaa !5 %1 = load i32, ptr %R, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %cmp = icmp eq i32 %add, 0 %cmp3 = icmp slt i32 %add, 0 %str.4.str = select i1 %cmp3, 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 %R) #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 @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> int findmax(int *a,int s,int n); void mergsort(long long int a[],long long int t[],int size,int n); void merg(long long int a[],long long int t[],int l1,int u1,int l2,int u2); void copy(long long int a[],long long int t[],int n); long long int min( long long int a,long long int b) { if(a<b) return(a); else return(b); } long long int max( long long int a,long long int b) { if(a>b) return(a); else return(b); } long long int mod(long long int a) { if(a<0) return(-a); else return(a); } long long int p=1000000007; long long int fre(long long int a,long long int m) { if(a<m) return(0); if(a==m) return(1); long long int j,mul=1; for(j=(a-m+1);j<=a;j++) { mul=((mul*j)%p); } a=mul;long long int power=p-2; mul=1; for(j=1;j<=m;j++) { mul =((mul*j)%p); } m=mul; while(power>0) { if(power%2==0) { power/=2;m=((m*m)%p);continue; } else { power--;a=((a*m)%p); } } return(a); } int decimal(int n) { int u=0; while(n>0) { if((n%10)==7){ u++;break; } n/=10; } if(u>0) return(1); else return(0); } int octal(int n) { int u=0; while(n>0) { if((n%8)==7){ u++;break; } n/=8; } if(u>0) return(1); else return(0); } int cal(int *a,int j,int temp,int n) { int ans=0; if(((a[j-1]<temp)&&(a[j+1]<temp))||((a[j-1]>temp)&&(a[j+1]>temp))) { } else ans++; if((j-2)>=0) { if(((a[j-2]<a[j-1])&&(a[j-1]>temp))||((a[j-2]>a[j-1])&&(a[j-1]<temp))) { } else ans++; } if((j+2)<n) { if(((a[j+2]<a[j+1])&&(a[j+1]>temp))||((a[j+2]>a[j+1])&&(a[j+1]<temp))) { } else ans++; } return(ans); } int main() { int q;scanf("%d",&q); while(q--) { int n;int d,j,size=1,x=0;scanf("%d %d",&n,&d);long long int a[n],t[n];for(j=0;j<n;j++)scanf("%lld",(a+j)); for(j=0;j<n;j++)t[j]=a[j]; while(size<n){mergsort(a,t,size,n);size*=2;} for(j=0;j<n;j++){if(a[j]<=d)x++;} if(((a[0]+a[1])<=d)||(x==n)) printf("YES\n"); else printf("NO\n"); } return 0; } void mergsort(long long int a[],long long int t[],int size,int n) { int l1=0,l2,u1,u2; u1=l1+size-1; l2=u1+1; u2=l2+size-1; if(u2>=n-1) u2=n-1; while(u1<n-1) { if(u2>=n-1) u2=n-1; merg(a,t,l1,u1,l2,u2); l1=u2+1; u1=l1+size-1; l2=u1+1; u2=l2+size-1; } copy(a,t,n); } void merg(long long int a[],long long int t[],int l1,int u1,int l2,int u2) { int i=l1,j=l2,k=l1; while((i<=u1)&&(j<=u2)) { if(a[i]<=a[j]) { t[k]=a[i]; i++;k++; continue; } else if(a[j]<a[i]) { t[k]=a[j];k++;j++; } } while(i<=u1) { t[k]=a[i];k++;i++; } while(j<=u2) { t[k]=a[j];k++;j++; } } void copy(long long int a[],long long int t[],int n) { int j; for(j=0;j<n;j++) { a[j]=t[j]; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_29403/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_29403/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" @p = dso_local local_unnamed_addr global i64 1000000007, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"YES\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: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @mod(i64 noundef %a) local_unnamed_addr #0 { entry: %retval.0 = tail call i64 @llvm.abs.i64(i64 %a, i1 true) ret i64 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i64 @fre(i64 noundef %a, i64 noundef %m) local_unnamed_addr #1 { entry: %cmp = icmp slt i64 %a, %m br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %cmp1 = icmp eq i64 %a, %m br i1 %cmp1, label %return, label %if.end3 if.end3: ; preds = %if.end %cmp4.not.not49 = icmp sgt i64 %m, 0 %.pre = load i64, ptr @p, align 8, !tbaa !5 br i1 %cmp4.not.not49, label %for.body.lr.ph, label %while.cond.preheader for.body.lr.ph: ; preds = %if.end3 %sub = sub nsw i64 %a, %m br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %mul.051 = phi i64 [ 1, %for.body.lr.ph ], [ %rem, %for.body ] %j.0.in50 = phi i64 [ %sub, %for.body.lr.ph ], [ %j.0, %for.body ] %j.0 = add nsw i64 %j.0.in50, 1 %mul5 = mul nsw i64 %mul.051, %j.0 %rem = srem i64 %mul5, %.pre %cmp4.not.not = icmp slt i64 %j.0, %a br i1 %cmp4.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body %cmp8.not52 = icmp slt i64 %m, 1 br i1 %cmp8.not52, label %while.cond.preheader, label %for.body9.preheader for.body9.preheader: ; preds = %for.end %xtraiter = and i64 %m, 3 %0 = icmp ult i64 %m, 4 br i1 %0, label %while.cond.preheader.loopexit.unr-lcssa, label %for.body9.preheader.new for.body9.preheader.new: ; preds = %for.body9.preheader %unroll_iter = and i64 %m, -4 br label %for.body9 while.cond.preheader.loopexit.unr-lcssa: ; preds = %for.body9, %for.body9.preheader %rem11.lcssa.ph = phi i64 [ undef, %for.body9.preheader ], [ %rem11.3, %for.body9 ] %mul.154.unr = phi i64 [ 1, %for.body9.preheader ], [ %rem11.3, %for.body9 ] %j.153.unr = phi i64 [ 1, %for.body9.preheader ], [ %inc13.3, %for.body9 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.cond.preheader, label %for.body9.epil for.body9.epil: ; preds = %while.cond.preheader.loopexit.unr-lcssa, %for.body9.epil %mul.154.epil = phi i64 [ %rem11.epil, %for.body9.epil ], [ %mul.154.unr, %while.cond.preheader.loopexit.unr-lcssa ] %j.153.epil = phi i64 [ %inc13.epil, %for.body9.epil ], [ %j.153.unr, %while.cond.preheader.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body9.epil ], [ 0, %while.cond.preheader.loopexit.unr-lcssa ] %mul10.epil = mul nsw i64 %mul.154.epil, %j.153.epil %rem11.epil = srem i64 %mul10.epil, %.pre %inc13.epil = add nuw i64 %j.153.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 %while.cond.preheader, label %for.body9.epil, !llvm.loop !11 while.cond.preheader: ; preds = %while.cond.preheader.loopexit.unr-lcssa, %for.body9.epil, %if.end3, %for.end %mul.0.lcssa73 = phi i64 [ %rem, %for.end ], [ 1, %if.end3 ], [ %rem, %for.body9.epil ], [ %rem, %while.cond.preheader.loopexit.unr-lcssa ] %mul.1.lcssa = phi i64 [ 1, %for.end ], [ 1, %if.end3 ], [ %rem11.lcssa.ph, %while.cond.preheader.loopexit.unr-lcssa ], [ %rem11.epil, %for.body9.epil ] %cmp155661 = icmp sgt i64 %.pre, 2 br i1 %cmp155661, label %while.body.lr.ph.preheader, label %return while.body.lr.ph.preheader: ; preds = %while.cond.preheader %sub674 = add nsw i64 %.pre, -2 br label %while.body.lr.ph for.body9: ; preds = %for.body9, %for.body9.preheader.new %mul.154 = phi i64 [ 1, %for.body9.preheader.new ], [ %rem11.3, %for.body9 ] %j.153 = phi i64 [ 1, %for.body9.preheader.new ], [ %inc13.3, %for.body9 ] %niter = phi i64 [ 0, %for.body9.preheader.new ], [ %niter.next.3, %for.body9 ] %mul10 = mul nsw i64 %mul.154, %j.153 %rem11 = srem i64 %mul10, %.pre %inc13 = add nuw nsw i64 %j.153, 1 %mul10.1 = mul nsw i64 %rem11, %inc13 %rem11.1 = srem i64 %mul10.1, %.pre %inc13.1 = add nuw nsw i64 %j.153, 2 %mul10.2 = mul nsw i64 %rem11.1, %inc13.1 %rem11.2 = srem i64 %mul10.2, %.pre %inc13.2 = add nuw i64 %j.153, 3 %mul10.3 = mul nsw i64 %rem11.2, %inc13.2 %rem11.3 = srem i64 %mul10.3, %.pre %inc13.3 = add nuw i64 %j.153, 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 %while.cond.preheader.loopexit.unr-lcssa, label %for.body9, !llvm.loop !13 while.body: ; preds = %while.body.lr.ph, %if.then18 %power.058 = phi i64 [ %power.0.ph64, %while.body.lr.ph ], [ %div46, %if.then18 ] %m.addr.057 = phi i64 [ %m.addr.0.ph63, %while.body.lr.ph ], [ %rem20, %if.then18 ] %rem16 = and i64 %power.058, 1 %cmp17 = icmp eq i64 %rem16, 0 br i1 %cmp17, label %if.then18, label %if.else if.then18: ; preds = %while.body %div46 = lshr i64 %power.058, 1 %mul19 = mul nsw i64 %m.addr.057, %m.addr.057 %rem20 = srem i64 %mul19, %.pre %cmp15.not = icmp ult i64 %power.058, 2 br i1 %cmp15.not, label %return, label %while.body, !llvm.loop !14 if.else: ; preds = %while.body %dec = add nsw i64 %power.058, -1 %mul21 = mul nsw i64 %m.addr.057, %a.addr.0.ph62 %rem22 = srem i64 %mul21, %.pre %cmp1556 = icmp sgt i64 %power.058, 1 br i1 %cmp1556, label %while.body.lr.ph, label %return, !llvm.loop !14 while.body.lr.ph: ; preds = %while.body.lr.ph.preheader, %if.else %power.0.ph64 = phi i64 [ %dec, %if.else ], [ %sub674, %while.body.lr.ph.preheader ] %m.addr.0.ph63 = phi i64 [ %m.addr.057, %if.else ], [ %mul.1.lcssa, %while.body.lr.ph.preheader ] %a.addr.0.ph62 = phi i64 [ %rem22, %if.else ], [ %mul.0.lcssa73, %while.body.lr.ph.preheader ] br label %while.body return: ; preds = %if.else, %if.then18, %while.cond.preheader, %if.end, %entry %retval.0 = phi i64 [ 0, %entry ], [ 1, %if.end ], [ %mul.0.lcssa73, %while.cond.preheader ], [ %a.addr.0.ph62, %if.then18 ], [ %rem22, %if.else ] 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) #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(none) uwtable define dso_local i32 @decimal(i32 noundef %n) local_unnamed_addr #3 { entry: %cmp7 = icmp slt i32 %n, 1 %rem8 = urem i32 %n, 10 %cmp19 = icmp eq i32 %rem8, 7 %or.cond10 = or i1 %cmp7, %cmp19 br i1 %or.cond10, label %while.end, label %if.end if.end: ; preds = %entry, %if.end %n.addr.011 = phi i32 [ %div, %if.end ], [ %n, %entry ] %div = udiv i32 %n.addr.011, 10 %cmp = icmp ult i32 %n.addr.011, 10 %rem = urem i32 %div, 10 %cmp1 = icmp eq i32 %rem, 7 %or.cond = or i1 %cmp, %cmp1 br i1 %or.cond, label %while.end, label %if.end, !llvm.loop !15 while.end: ; preds = %if.end, %entry %cmp.lcssa = phi i1 [ %cmp7, %entry ], [ %cmp, %if.end ] %not.cmp = xor i1 %cmp.lcssa, true %. = zext i1 %not.cmp to i32 ret i32 %. } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @octal(i32 noundef %n) local_unnamed_addr #3 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %n.addr.0 = phi i32 [ %n, %entry ], [ %div7, %while.cond ] %cmp = icmp slt i32 %n.addr.0, 1 %rem = and i32 %n.addr.0, 7 %cmp1 = icmp eq i32 %rem, 7 %or.cond = or i1 %cmp, %cmp1 %div7 = lshr i32 %n.addr.0, 3 br i1 %or.cond, label %while.end, label %while.cond, !llvm.loop !16 while.end: ; preds = %while.cond %not.cmp = xor i1 %cmp, true %. = zext i1 %not.cmp to i32 ret i32 %. } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cal(ptr nocapture noundef readonly %a, i32 noundef %j, i32 noundef %temp, i32 noundef %n) local_unnamed_addr #4 { entry: %sub = add nsw i32 %j, -1 %idxprom = sext i32 %sub to i64 %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !17 %cmp = icmp sge i32 %0, %temp br i1 %cmp, label %lor.lhs.false, label %land.lhs.true land.lhs.true: ; preds = %entry %add = add nsw i32 %j, 1 %idxprom1 = sext i32 %add to i64 %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 %idxprom1 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !17 %cmp3 = icmp slt i32 %1, %temp br i1 %cmp3, label %if.end, label %lor.lhs.false lor.lhs.false: ; preds = %land.lhs.true, %entry %cmp7 = icmp sgt i32 %0, %temp br i1 %cmp7, label %land.lhs.true8, label %if.else land.lhs.true8: ; preds = %lor.lhs.false %add9 = add nsw i32 %j, 1 %idxprom10 = sext i32 %add9 to i64 %arrayidx11 = getelementptr inbounds i32, ptr %a, i64 %idxprom10 %2 = load i32, ptr %arrayidx11, align 4, !tbaa !17 %cmp12 = icmp sgt i32 %2, %temp br i1 %cmp12, label %if.end, label %if.else if.else: ; preds = %land.lhs.true8, %lor.lhs.false br label %if.end if.end: ; preds = %land.lhs.true, %land.lhs.true8, %if.else %ans.0 = phi i32 [ 0, %land.lhs.true ], [ 0, %land.lhs.true8 ], [ 1, %if.else ] %cmp14 = icmp sgt i32 %j, 1 br i1 %cmp14, label %if.then15, label %if.end45 if.then15: ; preds = %if.end %sub13 = add nsw i32 %j, -2 %idxprom17 = zext i32 %sub13 to i64 %arrayidx18 = getelementptr inbounds i32, ptr %a, i64 %idxprom17 %3 = load i32, ptr %arrayidx18, align 4, !tbaa !17 %cmp22 = icmp slt i32 %3, %0 %cmp27 = icmp sgt i32 %0, %temp %or.cond = and i1 %cmp27, %cmp22 br i1 %or.cond, label %if.end45, label %lor.lhs.false28 lor.lhs.false28: ; preds = %if.then15 %cmp35 = icmp sle i32 %3, %0 %or.cond124.not = or i1 %cmp, %cmp35 %inc43 = zext i1 %or.cond124.not to i32 %spec.select = add nuw nsw i32 %ans.0, %inc43 br label %if.end45 if.end45: ; preds = %lor.lhs.false28, %if.then15, %if.end %ans.1 = phi i32 [ %ans.0, %if.end ], [ %ans.0, %if.then15 ], [ %spec.select, %lor.lhs.false28 ] %add46 = add nsw i32 %j, 2 %cmp47 = icmp slt i32 %add46, %n br i1 %cmp47, label %if.then48, label %if.end78 if.then48: ; preds = %if.end45 %idxprom50 = sext i32 %add46 to i64 %arrayidx51 = getelementptr inbounds i32, ptr %a, i64 %idxprom50 %4 = load i32, ptr %arrayidx51, align 4, !tbaa !17 %add52 = add nsw i32 %j, 1 %idxprom53 = sext i32 %add52 to i64 %arrayidx54 = getelementptr inbounds i32, ptr %a, i64 %idxprom53 %5 = load i32, ptr %arrayidx54, align 4, !tbaa !17 %cmp55 = icmp slt i32 %4, %5 %cmp60 = icmp sgt i32 %5, %temp %or.cond125 = and i1 %cmp55, %cmp60 br i1 %or.cond125, label %if.end78, label %lor.lhs.false61 lor.lhs.false61: ; preds = %if.then48 %cmp68 = icmp sle i32 %4, %5 %cmp73 = icmp sge i32 %5, %temp %or.cond126.not = or i1 %cmp68, %cmp73 %inc76 = zext i1 %or.cond126.not to i32 %spec.select127 = add nuw nsw i32 %ans.1, %inc76 br label %if.end78 if.end78: ; preds = %lor.lhs.false61, %if.then48, %if.end45 %ans.2 = phi i32 [ %ans.1, %if.end45 ], [ %ans.1, %if.then48 ], [ %spec.select127, %lor.lhs.false61 ] ret i32 %ans.2 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: %q = alloca i32, align 4 %n = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #13 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %q) %0 = load i32, ptr %q, align 4, !tbaa !17 %dec70 = add nsw i32 %0, -1 store i32 %dec70, ptr %q, align 4, !tbaa !17 %tobool.not71 = icmp eq i32 %0, 0 br i1 %tobool.not71, label %while.end37, label %while.body while.body: ; preds = %entry, %for.end25 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #13 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n, ptr noundef nonnull %d) %1 = load i32, ptr %n, align 4, !tbaa !17 %2 = zext i32 %1 to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i64, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !17 %5 = zext i32 %4 to i64 %vla2 = alloca i64, i64 %5, align 16 %cmp60 = icmp sgt i32 %4, 0 br i1 %cmp60, label %for.body, label %for.cond15.preheader.thread104 for.cond4.preheader: ; preds = %for.body %cmp562 = icmp sgt i32 %.pr, 0 br i1 %cmp562, label %while.cond12.preheader, label %for.cond15.preheader.thread104 for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %while.body ] %add.ptr = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.pr = load i32, ptr %n, align 4, !tbaa !17 %6 = sext i32 %.pr to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !19 for.cond15.preheader.thread104: ; preds = %while.body, %for.cond4.preheader %.lcssa91.ph = phi i32 [ %.pr, %for.cond4.preheader ], [ %4, %while.body ] %.pre107 = load i32, ptr %d, align 4, !tbaa !17 br label %for.cond15.preheader.for.end25_crit_edge while.cond12.preheader: ; preds = %for.cond4.preheader %7 = zext i32 %.pr to i64 %8 = shl nuw nsw i64 %7, 3 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %vla2, ptr nonnull align 16 %vla, i64 %8, i1 false), !tbaa !5 %cmp1364.not = icmp eq i32 %.pr, 1 br i1 %cmp1364.not, label %for.cond15.preheader.thread, label %while.body.lr.ph.i.lr.ph for.cond15.preheader.thread: ; preds = %while.cond12.preheader %.pre100 = load i32, ptr %d, align 4, !tbaa !17 br label %for.body17.lr.ph while.body.lr.ph.i.lr.ph: ; preds = %while.cond12.preheader %sub4.i = add nsw i32 %.pr, -1 %wide.trip.count.i.i = zext i32 %.pr to i64 %9 = shl nuw nsw i64 %wide.trip.count.i.i, 3 br label %while.body.lr.ph.i for.cond15.preheader: ; preds = %mergsort.exit %.pre = load i32, ptr %d, align 4, !tbaa !17 br i1 %cmp562, label %for.body17.lr.ph, label %for.cond15.preheader.for.end25_crit_edge for.cond15.preheader.for.end25_crit_edge: ; preds = %for.cond15.preheader.thread104, %for.cond15.preheader %.pre109 = phi i32 [ %.pre107, %for.cond15.preheader.thread104 ], [ %.pre, %for.cond15.preheader ] %.lcssa9197108 = phi i32 [ %.lcssa91.ph, %for.cond15.preheader.thread104 ], [ %.pr, %for.cond15.preheader ] %.pre88 = sext i32 %.pre109 to i64 br label %for.end25 for.body17.lr.ph: ; preds = %for.cond15.preheader.thread, %for.cond15.preheader %.pre103 = phi i32 [ %.pre100, %for.cond15.preheader.thread ], [ %.pre, %for.cond15.preheader ] %.lcssa9197102 = phi i32 [ 1, %for.cond15.preheader.thread ], [ %.pr, %for.cond15.preheader ] %conv = sext i32 %.pre103 to i64 %wide.trip.count = zext i32 %.lcssa9197102 to i64 %min.iters.check = icmp ult i32 %.lcssa9197102, 4 br i1 %min.iters.check, label %for.body17.preheader, label %vector.ph vector.ph: ; preds = %for.body17.lr.ph %n.vec = and i64 %wide.trip.count, 2147483644 %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %conv, i64 0 %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 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.phi = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %16, %vector.body ] %vec.phi120 = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ] %10 = getelementptr inbounds i64, ptr %vla, i64 %index %wide.load = load <2 x i64>, ptr %10, align 16, !tbaa !5 %11 = getelementptr inbounds i64, ptr %10, i64 2 %wide.load121 = load <2 x i64>, ptr %11, align 16, !tbaa !5 %12 = icmp sle <2 x i64> %wide.load, %broadcast.splat %13 = icmp sle <2 x i64> %wide.load121, %broadcast.splat %14 = zext <2 x i1> %12 to <2 x i32> %15 = zext <2 x i1> %13 to <2 x i32> %16 = add <2 x i32> %vec.phi, %14 %17 = add <2 x i32> %vec.phi120, %15 %index.next = add nuw i64 %index, 4 %18 = icmp eq i64 %index.next, %n.vec br i1 %18, label %middle.block, label %vector.body, !llvm.loop !20 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i32> %17, %16 %19 = call i32 @llvm.vector.reduce.add.v2i32(<2 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end25, label %for.body17.preheader for.body17.preheader: ; preds = %for.body17.lr.ph, %middle.block %indvars.iv85.ph = phi i64 [ 0, %for.body17.lr.ph ], [ %n.vec, %middle.block ] %x.067.ph = phi i32 [ 0, %for.body17.lr.ph ], [ %19, %middle.block ] br label %for.body17 while.body.lr.ph.i: ; preds = %while.body.lr.ph.i.lr.ph, %mergsort.exit %size.065 = phi i32 [ 1, %while.body.lr.ph.i.lr.ph ], [ %add2.i, %mergsort.exit ] %sub.i = add i32 %size.065, -1 %add2.i = shl nsw i32 %size.065, 1 %cmp.not.i = icmp slt i32 %add2.i, %.pr %sub3.i = add nsw i32 %add2.i, -1 %spec.select.i = select i1 %cmp.not.i, i32 %sub3.i, i32 %sub4.i br label %while.body.i while.body.i: ; preds = %merg.exit.i, %while.body.lr.ph.i %u2.155.i = phi i32 [ %spec.select.i, %while.body.lr.ph.i ], [ %sub18.i, %merg.exit.i ] %u1.054.i = phi i32 [ %sub.i, %while.body.lr.ph.i ], [ %sub15.i, %merg.exit.i ] %l2.053.i = phi i32 [ %size.065, %while.body.lr.ph.i ], [ %add14.i, %merg.exit.i ] %l1.052.i = phi i32 [ 0, %while.body.lr.ph.i ], [ %add13.pre-phi.i, %merg.exit.i ] %spec.select39.i = call i32 @llvm.smin.i32(i32 %u2.155.i, i32 %sub4.i) %cmp97.i.i = icmp sle i32 %l1.052.i, %u1.054.i %cmp18098.i.i = icmp sle i32 %l2.053.i, %spec.select39.i %20 = and i1 %cmp18098.i.i, %cmp97.i.i br i1 %20, label %while.body.preheader.i.i, label %while.cond23.preheader.i.i while.body.preheader.i.i: ; preds = %while.body.i, %if.then.i.i %k.0.ph101.i.i = phi i32 [ %inc9.i.i, %if.then.i.i ], [ %l1.052.i, %while.body.i ] %j.0.ph100.i.i = phi i32 [ %37, %if.then.i.i ], [ %l2.053.i, %while.body.i ] %i.0.ph99.i.i = phi i32 [ %inc.i.i, %if.then.i.i ], [ %l1.052.i, %while.body.i ] %idxprom.i.i = sext i32 %i.0.ph99.i.i to i64 %arrayidx.i.i = getelementptr inbounds i64, ptr %vla, i64 %idxprom.i.i %21 = sext i32 %k.0.ph101.i.i to i64 %22 = sext i32 %j.0.ph100.i.i to i64 %smax.i.i = call i32 @llvm.smax.i32(i32 %j.0.ph100.i.i, i32 %spec.select39.i) %23 = add i32 %smax.i.i, 1 %24 = load i64, ptr %arrayidx.i.i, align 8, !tbaa !5 br label %while.body.i.i while.cond23.preheader.loopexit.i.i: ; preds = %if.then15.i.i %25 = trunc i64 %indvars.iv.next.i.i to i32 br label %while.cond23.preheader.i.i while.cond23.preheader.i.i: ; preds = %if.then.i.i, %while.cond23.preheader.loopexit.i.i, %while.body.i %i.0.ph.lcssa.i.i = phi i32 [ %l1.052.i, %while.body.i ], [ %i.0.ph99.i.i, %while.cond23.preheader.loopexit.i.i ], [ %inc.i.i, %if.then.i.i ] %j.0.lcssa.i.i = phi i32 [ %l2.053.i, %while.body.i ], [ %23, %while.cond23.preheader.loopexit.i.i ], [ %37, %if.then.i.i ] %k.0.lcssa.i.i = phi i32 [ %l1.052.i, %while.body.i ], [ %25, %while.cond23.preheader.loopexit.i.i ], [ %inc9.i.i, %if.then.i.i ] %cmp24.not106.i.i = icmp sgt i32 %i.0.ph.lcssa.i.i, %u1.054.i br i1 %cmp24.not106.i.i, label %while.cond33.preheader.i.i, label %while.body25.preheader.i.i while.body25.preheader.i.i: ; preds = %while.cond23.preheader.i.i %26 = sext i32 %k.0.lcssa.i.i to i64 %27 = sext i32 %i.0.ph.lcssa.i.i to i64 %28 = shl nsw i64 %26, 3 %scevgep = getelementptr i8, ptr %vla2, i64 %28 %29 = shl nsw i64 %27, 3 %scevgep82 = getelementptr i8, ptr %vla, i64 %29 %30 = sub i32 %u1.054.i, %i.0.ph.lcssa.i.i %31 = zext i32 %30 to i64 %32 = shl nuw nsw i64 %31, 3 %33 = add nuw nsw i64 %32, 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep, ptr noundef nonnull align 8 dereferenceable(1) %scevgep82, i64 %33, i1 false), !tbaa !5 %34 = add i32 %k.0.lcssa.i.i, 1 %35 = add i32 %34, %30 br label %while.cond33.preheader.i.i while.body.i.i: ; preds = %if.then15.i.i, %while.body.preheader.i.i %indvars.iv124.i.i = phi i64 [ %22, %while.body.preheader.i.i ], [ %indvars.iv.next125.i.i, %if.then15.i.i ] %indvars.iv.i.i = phi i64 [ %21, %while.body.preheader.i.i ], [ %indvars.iv.next.i.i, %if.then15.i.i ] %arrayidx3.i.i = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv124.i.i %36 = load i64, ptr %arrayidx3.i.i, align 8, !tbaa !5 %cmp4.not.i.i = icmp sgt i64 %24, %36 br i1 %cmp4.not.i.i, label %if.then15.i.i, label %if.then.i.i if.then.i.i: ; preds = %while.body.i.i %37 = trunc i64 %indvars.iv124.i.i to i32 %38 = trunc i64 %indvars.iv.i.i to i32 %sext.i.i = shl i64 %indvars.iv.i.i, 32 %idxprom7.i.i = ashr exact i64 %sext.i.i, 32 %arrayidx8.i.i = getelementptr inbounds i64, ptr %vla2, i64 %idxprom7.i.i store i64 %24, ptr %arrayidx8.i.i, align 8, !tbaa !5 %inc.i.i = add i32 %i.0.ph99.i.i, 1 %inc9.i.i = add nsw i32 %38, 1 %cmp.i.i = icmp sle i32 %inc.i.i, %u1.054.i %cmp180.i.i = icmp sge i32 %spec.select39.i, %37 %39 = and i1 %cmp.i.i, %cmp180.i.i br i1 %39, label %while.body.preheader.i.i, label %while.cond23.preheader.i.i, !llvm.loop !23 if.then15.i.i: ; preds = %while.body.i.i %arrayidx19.i.i = getelementptr inbounds i64, ptr %vla2, i64 %indvars.iv.i.i store i64 %36, ptr %arrayidx19.i.i, align 8, !tbaa !5 %indvars.iv.next125.i.i = add nsw i64 %indvars.iv124.i.i, 1 %indvars.iv.next.i.i = add nsw i64 %indvars.iv.i.i, 1 %lftr.wideiv.i.i = trunc i64 %indvars.iv.next125.i.i to i32 %exitcond.not.i.i = icmp eq i32 %23, %lftr.wideiv.i.i br i1 %exitcond.not.i.i, label %while.cond23.preheader.loopexit.i.i, label %while.body.i.i, !llvm.loop !23 while.cond33.preheader.i.i: ; preds = %while.body25.preheader.i.i, %while.cond23.preheader.i.i %k.2.lcssa.i.i = phi i32 [ %k.0.lcssa.i.i, %while.cond23.preheader.i.i ], [ %35, %while.body25.preheader.i.i ] %cmp34.not110.i.i = icmp sgt i32 %j.0.lcssa.i.i, %spec.select39.i br i1 %cmp34.not110.i.i, label %merg.exit.i, label %while.body35.preheader.i.i while.body35.preheader.i.i: ; preds = %while.cond33.preheader.i.i %40 = sext i32 %k.2.lcssa.i.i to i64 %41 = sext i32 %j.0.lcssa.i.i to i64 %42 = shl nsw i64 %40, 3 %scevgep83 = getelementptr i8, ptr %vla2, i64 %42 %43 = shl nsw i64 %41, 3 %scevgep84 = getelementptr i8, ptr %vla, i64 %43 %44 = sub i32 %spec.select39.i, %j.0.lcssa.i.i %45 = zext i32 %44 to i64 %46 = shl nuw nsw i64 %45, 3 %47 = add nuw nsw i64 %46, 8 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(1) %scevgep83, ptr noundef nonnull align 8 dereferenceable(1) %scevgep84, i64 %47, i1 false), !tbaa !5 br label %merg.exit.i merg.exit.i: ; preds = %while.cond33.preheader.i.i, %while.body35.preheader.i.i %add13.pre-phi.i = add i32 %spec.select39.i, 1 %add14.i = add nsw i32 %add13.pre-phi.i, %size.065 %sub15.i = add i32 %spec.select39.i, %size.065 %sub18.i = add i32 %add14.i, %sub.i %cmp7.i = icmp slt i32 %sub15.i, %sub4.i br i1 %cmp7.i, label %while.body.i, label %mergsort.exit, !llvm.loop !24 mergsort.exit: ; preds = %merg.exit.i call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %vla, ptr nonnull align 16 %vla2, i64 %9, i1 false), !tbaa !5 br i1 %cmp.not.i, label %while.body.lr.ph.i, label %for.cond15.preheader, !llvm.loop !25 for.body17: ; preds = %for.body17.preheader, %for.body17 %indvars.iv85 = phi i64 [ %indvars.iv.next86, %for.body17 ], [ %indvars.iv85.ph, %for.body17.preheader ] %x.067 = phi i32 [ %spec.select, %for.body17 ], [ %x.067.ph, %for.body17.preheader ] %arrayidx19 = getelementptr inbounds i64, ptr %vla, i64 %indvars.iv85 %48 = load i64, ptr %arrayidx19, align 8, !tbaa !5 %cmp20.not = icmp sle i64 %48, %conv %inc22 = zext i1 %cmp20.not to i32 %spec.select = add nuw nsw i32 %x.067, %inc22 %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %exitcond.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count br i1 %exitcond.not, label %for.end25, label %for.body17, !llvm.loop !26 for.end25: ; preds = %for.body17, %middle.block, %for.cond15.preheader.for.end25_crit_edge %.lcssa9197101 = phi i32 [ %.lcssa9197108, %for.cond15.preheader.for.end25_crit_edge ], [ %.lcssa9197102, %middle.block ], [ %.lcssa9197102, %for.body17 ] %conv28.pre-phi = phi i64 [ %.pre88, %for.cond15.preheader.for.end25_crit_edge ], [ %conv, %middle.block ], [ %conv, %for.body17 ] %x.0.lcssa = phi i32 [ 0, %for.cond15.preheader.for.end25_crit_edge ], [ %19, %middle.block ], [ %spec.select, %for.body17 ] %49 = load i64, ptr %vla, align 16, !tbaa !5 %arrayidx27 = getelementptr inbounds i64, ptr %vla, i64 1 %50 = load i64, ptr %arrayidx27, align 8, !tbaa !5 %add = add nsw i64 %50, %49 %cmp29.not = icmp sle i64 %add, %conv28.pre-phi %cmp31 = icmp eq i32 %x.0.lcssa, %.lcssa9197101 %or.cond = select i1 %cmp29.not, i1 true, i1 %cmp31 %str.5.str = select i1 %or.cond, ptr @str.5, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.5.str) call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #13 %51 = load i32, ptr %q, align 4, !tbaa !17 %dec = add nsw i32 %51, -1 store i32 %dec, ptr %q, align 4, !tbaa !17 %tobool.not = icmp eq i32 %51, 0 br i1 %tobool.not, label %while.end37, label %while.body, !llvm.loop !27 while.end37: ; preds = %for.end25, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #13 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #7 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @mergsort(ptr nocapture noundef %a, ptr nocapture noundef %t, i32 noundef %size, i32 noundef %n) local_unnamed_addr #8 { entry: %t108 = ptrtoint ptr %t to i64 %a87 = ptrtoint ptr %a to i64 %t86 = ptrtoint ptr %t to i64 %a80 = ptrtoint ptr %a to i64 %t79 = ptrtoint ptr %t to i64 %sub4 = add nsw i32 %n, -1 %cmp751 = icmp slt i32 %size, %n br i1 %cmp751, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %sub = add i32 %size, -1 %add2 = shl nsw i32 %size, 1 %cmp.not = icmp slt i32 %add2, %n %sub3 = add nsw i32 %add2, -1 %spec.select = select i1 %cmp.not, i32 %sub3, i32 %sub4 %invariant.gep146 = getelementptr i64, ptr %a, i64 1 %invariant.gep148 = getelementptr i64, ptr %t, i64 1 %invariant.gep150 = getelementptr i64, ptr %a, i64 2 %invariant.gep152 = getelementptr i64, ptr %t, i64 2 %invariant.gep154 = getelementptr i64, ptr %a, i64 3 %invariant.gep156 = getelementptr i64, ptr %t, i64 3 %invariant.gep162 = getelementptr i64, ptr %a, i64 1 %invariant.gep164 = getelementptr i64, ptr %t, i64 1 %invariant.gep166 = getelementptr i64, ptr %a, i64 2 %invariant.gep168 = getelementptr i64, ptr %t, i64 2 %invariant.gep170 = getelementptr i64, ptr %a, i64 3 %invariant.gep172 = getelementptr i64, ptr %t, i64 3 br label %while.body while.body: ; preds = %while.body.lr.ph, %merg.exit %u2.155 = phi i32 [ %spec.select, %while.body.lr.ph ], [ %sub18, %merg.exit ] %u1.054 = phi i32 [ %sub, %while.body.lr.ph ], [ %sub15, %merg.exit ] %l2.053 = phi i32 [ %size, %while.body.lr.ph ], [ %add14, %merg.exit ] %l1.052 = phi i32 [ 0, %while.body.lr.ph ], [ %add13.pre-phi, %merg.exit ] %spec.select39 = tail call i32 @llvm.smin.i32(i32 %u2.155, i32 %sub4) %cmp97.i = icmp sle i32 %l1.052, %u1.054 %cmp18098.i = icmp sle i32 %l2.053, %spec.select39 %0 = and i1 %cmp97.i, %cmp18098.i br i1 %0, label %while.body.preheader.i, label %while.cond23.preheader.i while.body.preheader.i: ; preds = %while.body, %if.then.i %k.0.ph101.i = phi i32 [ %inc9.i, %if.then.i ], [ %l1.052, %while.body ] %j.0.ph100.i = phi i32 [ %27, %if.then.i ], [ %l2.053, %while.body ] %i.0.ph99.i = phi i32 [ %inc.i, %if.then.i ], [ %l1.052, %while.body ] %idxprom.i = sext i32 %i.0.ph99.i to i64 %arrayidx.i = getelementptr inbounds i64, ptr %a, i64 %idxprom.i %1 = sext i32 %k.0.ph101.i to i64 %2 = sext i32 %j.0.ph100.i to i64 %smax.i = tail call i32 @llvm.smax.i32(i32 %j.0.ph100.i, i32 %spec.select39) %3 = add i32 %smax.i, 1 br label %while.body.i while.cond23.preheader.loopexit.i: ; preds = %if.then15.i %4 = trunc i64 %indvars.iv.next.i to i32 br label %while.cond23.preheader.i while.cond23.preheader.i: ; preds = %if.then.i, %while.cond23.preheader.loopexit.i, %while.body %i.0.ph.lcssa.i = phi i32 [ %l1.052, %while.body ], [ %i.0.ph99.i, %while.cond23.preheader.loopexit.i ], [ %inc.i, %if.then.i ] %j.0.lcssa.i = phi i32 [ %l2.053, %while.body ], [ %3, %while.cond23.preheader.loopexit.i ], [ %27, %if.then.i ] %k.0.lcssa.i = phi i32 [ %l1.052, %while.body ], [ %4, %while.cond23.preheader.loopexit.i ], [ %inc9.i, %if.then.i ] %cmp24.not106.i = icmp sgt i32 %i.0.ph.lcssa.i, %u1.054 br i1 %cmp24.not106.i, label %while.cond33.preheader.i, label %while.body25.preheader.i while.body25.preheader.i: ; preds = %while.cond23.preheader.i %5 = sext i32 %k.0.lcssa.i to i64 %6 = sext i32 %i.0.ph.lcssa.i to i64 %7 = add i32 %u1.054, 1 %8 = sub i32 %u1.054, %i.0.ph.lcssa.i %9 = zext i32 %8 to i64 %10 = add nuw nsw i64 %9, 1 %min.iters.check91 = icmp ult i32 %8, 11 br i1 %min.iters.check91, label %while.body25.i.preheader, label %vector.memcheck85 vector.memcheck85: ; preds = %while.body25.preheader.i %11 = shl nsw i64 %5, 3 %12 = add i64 %11, %t86 %13 = shl nsw i64 %6, 3 %14 = add i64 %13, %a87 %15 = sub i64 %12, %14 %diff.check88 = icmp ult i64 %15, 32 br i1 %diff.check88, label %while.body25.i.preheader, label %vector.ph92 vector.ph92: ; preds = %vector.memcheck85 %n.vec94 = and i64 %10, 8589934588 %ind.end95 = add nsw i64 %n.vec94, %6 %ind.end97 = add nsw i64 %n.vec94, %5 %invariant.gep = getelementptr i64, ptr %a, i64 %6 %invariant.gep144 = getelementptr i64, ptr %t, i64 %5 br label %vector.body100 vector.body100: ; preds = %vector.body100, %vector.ph92 %index101 = phi i64 [ 0, %vector.ph92 ], [ %index.next106, %vector.body100 ] %gep = getelementptr i64, ptr %invariant.gep, i64 %index101 %wide.load104 = load <2 x i64>, ptr %gep, align 8, !tbaa !5 %16 = getelementptr inbounds i64, ptr %gep, i64 2 %wide.load105 = load <2 x i64>, ptr %16, align 8, !tbaa !5 %gep145 = getelementptr i64, ptr %invariant.gep144, i64 %index101 store <2 x i64> %wide.load104, ptr %gep145, align 8, !tbaa !5 %17 = getelementptr inbounds i64, ptr %gep145, i64 2 store <2 x i64> %wide.load105, ptr %17, align 8, !tbaa !5 %index.next106 = add nuw i64 %index101, 4 %18 = icmp eq i64 %index.next106, %n.vec94 br i1 %18, label %middle.block89, label %vector.body100, !llvm.loop !28 middle.block89: ; preds = %vector.body100 %cmp.n99 = icmp eq i64 %10, %n.vec94 br i1 %cmp.n99, label %while.cond33.preheader.loopexit.i, label %while.body25.i.preheader while.body25.i.preheader: ; preds = %vector.memcheck85, %while.body25.preheader.i, %middle.block89 %indvars.iv132.i.ph = phi i64 [ %6, %vector.memcheck85 ], [ %6, %while.body25.preheader.i ], [ %ind.end95, %middle.block89 ] %indvars.iv130.i.ph = phi i64 [ %5, %vector.memcheck85 ], [ %5, %while.body25.preheader.i ], [ %ind.end97, %middle.block89 ] %19 = add i32 %u1.054, 1 %20 = trunc i64 %indvars.iv132.i.ph to i32 %21 = sub i32 %19, %20 %22 = sub i32 %u1.054, %20 %xtraiter = and i32 %21, 3 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.body25.i.prol.loopexit, label %while.body25.i.prol while.body25.i.prol: ; preds = %while.body25.i.preheader, %while.body25.i.prol %indvars.iv132.i.prol = phi i64 [ %indvars.iv.next133.i.prol, %while.body25.i.prol ], [ %indvars.iv132.i.ph, %while.body25.i.preheader ] %indvars.iv130.i.prol = phi i64 [ %indvars.iv.next131.i.prol, %while.body25.i.prol ], [ %indvars.iv130.i.ph, %while.body25.i.preheader ] %prol.iter = phi i32 [ %prol.iter.next, %while.body25.i.prol ], [ 0, %while.body25.i.preheader ] %arrayidx27.i.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv132.i.prol %23 = load i64, ptr %arrayidx27.i.prol, align 8, !tbaa !5 %arrayidx29.i.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv130.i.prol store i64 %23, ptr %arrayidx29.i.prol, align 8, !tbaa !5 %indvars.iv.next131.i.prol = add nsw i64 %indvars.iv130.i.prol, 1 %indvars.iv.next133.i.prol = add nsw i64 %indvars.iv132.i.prol, 1 %prol.iter.next = add i32 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %while.body25.i.prol.loopexit, label %while.body25.i.prol, !llvm.loop !29 while.body25.i.prol.loopexit: ; preds = %while.body25.i.prol, %while.body25.i.preheader %indvars.iv.next131.i.lcssa130.unr = phi i64 [ undef, %while.body25.i.preheader ], [ %indvars.iv.next131.i.prol, %while.body25.i.prol ] %indvars.iv132.i.unr = phi i64 [ %indvars.iv132.i.ph, %while.body25.i.preheader ], [ %indvars.iv.next133.i.prol, %while.body25.i.prol ] %indvars.iv130.i.unr = phi i64 [ %indvars.iv130.i.ph, %while.body25.i.preheader ], [ %indvars.iv.next131.i.prol, %while.body25.i.prol ] %24 = icmp ult i32 %22, 3 br i1 %24, label %while.cond33.preheader.loopexit.i, label %while.body25.i while.body.i: ; preds = %if.then15.i, %while.body.preheader.i %indvars.iv124.i = phi i64 [ %2, %while.body.preheader.i ], [ %indvars.iv.next125.i, %if.then15.i ] %indvars.iv.i = phi i64 [ %1, %while.body.preheader.i ], [ %indvars.iv.next.i, %if.then15.i ] %25 = load i64, ptr %arrayidx.i, align 8, !tbaa !5 %arrayidx3.i = getelementptr inbounds i64, ptr %a, i64 %indvars.iv124.i %26 = load i64, ptr %arrayidx3.i, align 8, !tbaa !5 %cmp4.not.i = icmp sgt i64 %25, %26 br i1 %cmp4.not.i, label %if.then15.i, label %if.then.i if.then.i: ; preds = %while.body.i %27 = trunc i64 %indvars.iv124.i to i32 %28 = trunc i64 %indvars.iv.i to i32 %sext.i = shl i64 %indvars.iv.i, 32 %idxprom7.i = ashr exact i64 %sext.i, 32 %arrayidx8.i = getelementptr inbounds i64, ptr %t, i64 %idxprom7.i store i64 %25, ptr %arrayidx8.i, align 8, !tbaa !5 %inc.i = add i32 %i.0.ph99.i, 1 %inc9.i = add nsw i32 %28, 1 %cmp.i = icmp sle i32 %inc.i, %u1.054 %cmp180.i = icmp sge i32 %spec.select39, %27 %29 = and i1 %cmp.i, %cmp180.i br i1 %29, label %while.body.preheader.i, label %while.cond23.preheader.i, !llvm.loop !23 if.then15.i: ; preds = %while.body.i %arrayidx19.i = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.i store i64 %26, ptr %arrayidx19.i, align 8, !tbaa !5 %indvars.iv.next125.i = add nsw i64 %indvars.iv124.i, 1 %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %lftr.wideiv.i = trunc i64 %indvars.iv.next125.i to i32 %exitcond.not.i = icmp eq i32 %3, %lftr.wideiv.i br i1 %exitcond.not.i, label %while.cond23.preheader.loopexit.i, label %while.body.i, !llvm.loop !23 while.cond33.preheader.loopexit.i: ; preds = %while.body25.i.prol.loopexit, %while.body25.i, %middle.block89 %indvars.iv.next131.i.lcssa = phi i64 [ %ind.end97, %middle.block89 ], [ %indvars.iv.next131.i.lcssa130.unr, %while.body25.i.prol.loopexit ], [ %indvars.iv.next131.i.3, %while.body25.i ] %30 = trunc i64 %indvars.iv.next131.i.lcssa to i32 br label %while.cond33.preheader.i while.cond33.preheader.i: ; preds = %while.cond33.preheader.loopexit.i, %while.cond23.preheader.i %k.2.lcssa.i = phi i32 [ %k.0.lcssa.i, %while.cond23.preheader.i ], [ %30, %while.cond33.preheader.loopexit.i ] %cmp34.not110.i = icmp sgt i32 %j.0.lcssa.i, %spec.select39 br i1 %cmp34.not110.i, label %while.cond33.preheader.i.merg.exit_crit_edge, label %while.body35.preheader.i while.cond33.preheader.i.merg.exit_crit_edge: ; preds = %while.cond33.preheader.i %.pre = add nsw i32 %spec.select39, 1 br label %merg.exit while.body35.preheader.i: ; preds = %while.cond33.preheader.i %31 = sext i32 %k.2.lcssa.i to i64 %32 = sext i32 %j.0.lcssa.i to i64 %33 = add i32 %spec.select39, 1 %34 = sub i32 %spec.select39, %j.0.lcssa.i %35 = zext i32 %34 to i64 %36 = add nuw nsw i64 %35, 1 %min.iters.check = icmp ult i32 %34, 11 br i1 %min.iters.check, label %while.body35.i.preheader, label %vector.memcheck vector.memcheck: ; preds = %while.body35.preheader.i %37 = shl nsw i64 %31, 3 %38 = add i64 %37, %t79 %39 = shl nsw i64 %32, 3 %40 = add i64 %39, %a80 %41 = sub i64 %38, %40 %diff.check = icmp ult i64 %41, 32 br i1 %diff.check, label %while.body35.i.preheader, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %36, 8589934588 %ind.end = add nsw i64 %n.vec, %32 %ind.end81 = add nsw i64 %n.vec, %31 %invariant.gep158 = getelementptr i64, ptr %a, i64 %32 %invariant.gep160 = getelementptr i64, ptr %t, i64 %31 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %gep159 = getelementptr i64, ptr %invariant.gep158, i64 %index %wide.load = load <2 x i64>, ptr %gep159, align 8, !tbaa !5 %42 = getelementptr inbounds i64, ptr %gep159, i64 2 %wide.load84 = load <2 x i64>, ptr %42, align 8, !tbaa !5 %gep161 = getelementptr i64, ptr %invariant.gep160, i64 %index store <2 x i64> %wide.load, ptr %gep161, align 8, !tbaa !5 %43 = getelementptr inbounds i64, ptr %gep161, i64 2 store <2 x i64> %wide.load84, ptr %43, align 8, !tbaa !5 %index.next = add nuw i64 %index, 4 %44 = icmp eq i64 %index.next, %n.vec br i1 %44, label %middle.block, label %vector.body, !llvm.loop !30 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %36, %n.vec br i1 %cmp.n, label %merg.exit, label %while.body35.i.preheader while.body35.i.preheader: ; preds = %vector.memcheck, %while.body35.preheader.i, %middle.block %indvars.iv142.i.ph = phi i64 [ %32, %vector.memcheck ], [ %32, %while.body35.preheader.i ], [ %ind.end, %middle.block ] %indvars.iv140.i.ph = phi i64 [ %31, %vector.memcheck ], [ %31, %while.body35.preheader.i ], [ %ind.end81, %middle.block ] %45 = add i32 %spec.select39, 1 %46 = trunc i64 %indvars.iv142.i.ph to i32 %47 = sub i32 %45, %46 %48 = sub i32 %spec.select39, %46 %xtraiter131 = and i32 %47, 3 %lcmp.mod132.not = icmp eq i32 %xtraiter131, 0 br i1 %lcmp.mod132.not, label %while.body35.i.prol.loopexit, label %while.body35.i.prol while.body35.i.prol: ; preds = %while.body35.i.preheader, %while.body35.i.prol %indvars.iv142.i.prol = phi i64 [ %indvars.iv.next143.i.prol, %while.body35.i.prol ], [ %indvars.iv142.i.ph, %while.body35.i.preheader ] %indvars.iv140.i.prol = phi i64 [ %indvars.iv.next141.i.prol, %while.body35.i.prol ], [ %indvars.iv140.i.ph, %while.body35.i.preheader ] %prol.iter133 = phi i32 [ %prol.iter133.next, %while.body35.i.prol ], [ 0, %while.body35.i.preheader ] %arrayidx37.i.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv142.i.prol %49 = load i64, ptr %arrayidx37.i.prol, align 8, !tbaa !5 %arrayidx39.i.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv140.i.prol store i64 %49, ptr %arrayidx39.i.prol, align 8, !tbaa !5 %indvars.iv.next141.i.prol = add nsw i64 %indvars.iv140.i.prol, 1 %indvars.iv.next143.i.prol = add nsw i64 %indvars.iv142.i.prol, 1 %prol.iter133.next = add i32 %prol.iter133, 1 %prol.iter133.cmp.not = icmp eq i32 %prol.iter133.next, %xtraiter131 br i1 %prol.iter133.cmp.not, label %while.body35.i.prol.loopexit, label %while.body35.i.prol, !llvm.loop !31 while.body35.i.prol.loopexit: ; preds = %while.body35.i.prol, %while.body35.i.preheader %indvars.iv142.i.unr = phi i64 [ %indvars.iv142.i.ph, %while.body35.i.preheader ], [ %indvars.iv.next143.i.prol, %while.body35.i.prol ] %indvars.iv140.i.unr = phi i64 [ %indvars.iv140.i.ph, %while.body35.i.preheader ], [ %indvars.iv.next141.i.prol, %while.body35.i.prol ] %50 = icmp ult i32 %48, 3 br i1 %50, label %merg.exit, label %while.body35.i while.body25.i: ; preds = %while.body25.i.prol.loopexit, %while.body25.i %indvars.iv132.i = phi i64 [ %indvars.iv.next133.i.3, %while.body25.i ], [ %indvars.iv132.i.unr, %while.body25.i.prol.loopexit ] %indvars.iv130.i = phi i64 [ %indvars.iv.next131.i.3, %while.body25.i ], [ %indvars.iv130.i.unr, %while.body25.i.prol.loopexit ] %arrayidx27.i = getelementptr inbounds i64, ptr %a, i64 %indvars.iv132.i %51 = load i64, ptr %arrayidx27.i, align 8, !tbaa !5 %arrayidx29.i = getelementptr inbounds i64, ptr %t, i64 %indvars.iv130.i store i64 %51, ptr %arrayidx29.i, align 8, !tbaa !5 %gep147 = getelementptr i64, ptr %invariant.gep146, i64 %indvars.iv132.i %52 = load i64, ptr %gep147, align 8, !tbaa !5 %gep149 = getelementptr i64, ptr %invariant.gep148, i64 %indvars.iv130.i store i64 %52, ptr %gep149, align 8, !tbaa !5 %gep151 = getelementptr i64, ptr %invariant.gep150, i64 %indvars.iv132.i %53 = load i64, ptr %gep151, align 8, !tbaa !5 %gep153 = getelementptr i64, ptr %invariant.gep152, i64 %indvars.iv130.i store i64 %53, ptr %gep153, align 8, !tbaa !5 %gep155 = getelementptr i64, ptr %invariant.gep154, i64 %indvars.iv132.i %54 = load i64, ptr %gep155, align 8, !tbaa !5 %gep157 = getelementptr i64, ptr %invariant.gep156, i64 %indvars.iv130.i store i64 %54, ptr %gep157, align 8, !tbaa !5 %indvars.iv.next131.i.3 = add nsw i64 %indvars.iv130.i, 4 %indvars.iv.next133.i.3 = add nsw i64 %indvars.iv132.i, 4 %lftr.wideiv137.i.3 = trunc i64 %indvars.iv.next133.i.3 to i32 %exitcond138.not.i.3 = icmp eq i32 %7, %lftr.wideiv137.i.3 br i1 %exitcond138.not.i.3, label %while.cond33.preheader.loopexit.i, label %while.body25.i, !llvm.loop !32 while.body35.i: ; preds = %while.body35.i.prol.loopexit, %while.body35.i %indvars.iv142.i = phi i64 [ %indvars.iv.next143.i.3, %while.body35.i ], [ %indvars.iv142.i.unr, %while.body35.i.prol.loopexit ] %indvars.iv140.i = phi i64 [ %indvars.iv.next141.i.3, %while.body35.i ], [ %indvars.iv140.i.unr, %while.body35.i.prol.loopexit ] %arrayidx37.i = getelementptr inbounds i64, ptr %a, i64 %indvars.iv142.i %55 = load i64, ptr %arrayidx37.i, align 8, !tbaa !5 %arrayidx39.i = getelementptr inbounds i64, ptr %t, i64 %indvars.iv140.i store i64 %55, ptr %arrayidx39.i, align 8, !tbaa !5 %gep163 = getelementptr i64, ptr %invariant.gep162, i64 %indvars.iv142.i %56 = load i64, ptr %gep163, align 8, !tbaa !5 %gep165 = getelementptr i64, ptr %invariant.gep164, i64 %indvars.iv140.i store i64 %56, ptr %gep165, align 8, !tbaa !5 %gep167 = getelementptr i64, ptr %invariant.gep166, i64 %indvars.iv142.i %57 = load i64, ptr %gep167, align 8, !tbaa !5 %gep169 = getelementptr i64, ptr %invariant.gep168, i64 %indvars.iv140.i store i64 %57, ptr %gep169, align 8, !tbaa !5 %gep171 = getelementptr i64, ptr %invariant.gep170, i64 %indvars.iv142.i %58 = load i64, ptr %gep171, align 8, !tbaa !5 %gep173 = getelementptr i64, ptr %invariant.gep172, i64 %indvars.iv140.i store i64 %58, ptr %gep173, align 8, !tbaa !5 %indvars.iv.next141.i.3 = add nsw i64 %indvars.iv140.i, 4 %indvars.iv.next143.i.3 = add nsw i64 %indvars.iv142.i, 4 %lftr.wideiv147.i.3 = trunc i64 %indvars.iv.next143.i.3 to i32 %exitcond148.not.i.3 = icmp eq i32 %33, %lftr.wideiv147.i.3 br i1 %exitcond148.not.i.3, label %merg.exit, label %while.body35.i, !llvm.loop !33 merg.exit: ; preds = %while.body35.i.prol.loopexit, %while.body35.i, %middle.block, %while.cond33.preheader.i.merg.exit_crit_edge %add13.pre-phi = phi i32 [ %.pre, %while.cond33.preheader.i.merg.exit_crit_edge ], [ %33, %middle.block ], [ %33, %while.body35.i ], [ %33, %while.body35.i.prol.loopexit ] %add14 = add nsw i32 %add13.pre-phi, %size %sub15 = add i32 %spec.select39, %size %sub18 = add i32 %sub, %add14 %cmp7 = icmp slt i32 %sub15, %sub4 br i1 %cmp7, label %while.body, label %while.end, !llvm.loop !24 while.end: ; preds = %merg.exit, %entry %cmp6.i = icmp sgt i32 %n, 0 br i1 %cmp6.i, label %for.body.preheader.i, label %copy.exit for.body.preheader.i: ; preds = %while.end %wide.trip.count.i = zext i32 %n to i64 %min.iters.check112 = icmp ult i32 %n, 6 %59 = sub i64 %a87, %t108 %diff.check109 = icmp ult i64 %59, 32 %or.cond = or i1 %min.iters.check112, %diff.check109 br i1 %or.cond, label %for.body.i.preheader, label %vector.ph113 vector.ph113: ; preds = %for.body.preheader.i %n.vec115 = and i64 %wide.trip.count.i, 4294967292 br label %vector.body118 vector.body118: ; preds = %vector.body118, %vector.ph113 %index119 = phi i64 [ 0, %vector.ph113 ], [ %index.next122, %vector.body118 ] %60 = getelementptr inbounds i64, ptr %t, i64 %index119 %wide.load120 = load <2 x i64>, ptr %60, align 8, !tbaa !5 %61 = getelementptr inbounds i64, ptr %60, i64 2 %wide.load121 = load <2 x i64>, ptr %61, align 8, !tbaa !5 %62 = getelementptr inbounds i64, ptr %a, i64 %index119 store <2 x i64> %wide.load120, ptr %62, align 8, !tbaa !5 %63 = getelementptr inbounds i64, ptr %62, i64 2 store <2 x i64> %wide.load121, ptr %63, align 8, !tbaa !5 %index.next122 = add nuw i64 %index119, 4 %64 = icmp eq i64 %index.next122, %n.vec115 br i1 %64, label %middle.block110, label %vector.body118, !llvm.loop !34 middle.block110: ; preds = %vector.body118 %cmp.n117 = icmp eq i64 %n.vec115, %wide.trip.count.i br i1 %cmp.n117, label %copy.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block110 %indvars.iv.i40.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec115, %middle.block110 ] %65 = xor i64 %indvars.iv.i40.ph, -1 %66 = add nsw i64 %65, %wide.trip.count.i %xtraiter134 = and i64 %wide.trip.count.i, 3 %lcmp.mod135.not = icmp eq i64 %xtraiter134, 0 br i1 %lcmp.mod135.not, label %for.body.i.prol.loopexit, label %for.body.i.prol for.body.i.prol: ; preds = %for.body.i.preheader, %for.body.i.prol %indvars.iv.i40.prol = phi i64 [ %indvars.iv.next.i42.prol, %for.body.i.prol ], [ %indvars.iv.i40.ph, %for.body.i.preheader ] %prol.iter136 = phi i64 [ %prol.iter136.next, %for.body.i.prol ], [ 0, %for.body.i.preheader ] %arrayidx.i41.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.i40.prol %67 = load i64, ptr %arrayidx.i41.prol, align 8, !tbaa !5 %arrayidx2.i.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.i40.prol store i64 %67, ptr %arrayidx2.i.prol, align 8, !tbaa !5 %indvars.iv.next.i42.prol = add nuw nsw i64 %indvars.iv.i40.prol, 1 %prol.iter136.next = add i64 %prol.iter136, 1 %prol.iter136.cmp.not = icmp eq i64 %prol.iter136.next, %xtraiter134 br i1 %prol.iter136.cmp.not, label %for.body.i.prol.loopexit, label %for.body.i.prol, !llvm.loop !35 for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader %indvars.iv.i40.unr = phi i64 [ %indvars.iv.i40.ph, %for.body.i.preheader ], [ %indvars.iv.next.i42.prol, %for.body.i.prol ] %68 = icmp ult i64 %66, 3 br i1 %68, label %copy.exit, label %for.body.i for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i %indvars.iv.i40 = phi i64 [ %indvars.iv.next.i42.3, %for.body.i ], [ %indvars.iv.i40.unr, %for.body.i.prol.loopexit ] %arrayidx.i41 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.i40 %69 = load i64, ptr %arrayidx.i41, align 8, !tbaa !5 %arrayidx2.i = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.i40 store i64 %69, ptr %arrayidx2.i, align 8, !tbaa !5 %indvars.iv.next.i42 = add nuw nsw i64 %indvars.iv.i40, 1 %arrayidx.i41.1 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next.i42 %70 = load i64, ptr %arrayidx.i41.1, align 8, !tbaa !5 %arrayidx2.i.1 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next.i42 store i64 %70, ptr %arrayidx2.i.1, align 8, !tbaa !5 %indvars.iv.next.i42.1 = add nuw nsw i64 %indvars.iv.i40, 2 %arrayidx.i41.2 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next.i42.1 %71 = load i64, ptr %arrayidx.i41.2, align 8, !tbaa !5 %arrayidx2.i.2 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next.i42.1 store i64 %71, ptr %arrayidx2.i.2, align 8, !tbaa !5 %indvars.iv.next.i42.2 = add nuw nsw i64 %indvars.iv.i40, 3 %arrayidx.i41.3 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next.i42.2 %72 = load i64, ptr %arrayidx.i41.3, align 8, !tbaa !5 %arrayidx2.i.3 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next.i42.2 store i64 %72, ptr %arrayidx2.i.3, align 8, !tbaa !5 %indvars.iv.next.i42.3 = add nuw nsw i64 %indvars.iv.i40, 4 %exitcond.not.i43.3 = icmp eq i64 %indvars.iv.next.i42.3, %wide.trip.count.i br i1 %exitcond.not.i43.3, label %copy.exit, label %for.body.i, !llvm.loop !36 copy.exit: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block110, %while.end ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #7 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @merg(ptr nocapture noundef readonly %a, ptr nocapture noundef writeonly %t, i32 noundef %l1, i32 noundef %u1, i32 noundef %l2, i32 noundef %u2) local_unnamed_addr #8 { entry: %a173 = ptrtoint ptr %a to i64 %t172 = ptrtoint ptr %t to i64 %a166 = ptrtoint ptr %a to i64 %t165 = ptrtoint ptr %t to i64 %cmp97 = icmp sle i32 %l1, %u1 %cmp18098 = icmp sle i32 %l2, %u2 %0 = and i1 %cmp97, %cmp18098 br i1 %0, label %while.body.preheader, label %while.cond23.preheader while.body.preheader: ; preds = %entry, %if.then %k.0.ph101 = phi i32 [ %inc9, %if.then ], [ %l1, %entry ] %j.0.ph100 = phi i32 [ %27, %if.then ], [ %l2, %entry ] %i.0.ph99 = phi i32 [ %inc, %if.then ], [ %l1, %entry ] %idxprom = sext i32 %i.0.ph99 to i64 %arrayidx = getelementptr inbounds i64, ptr %a, i64 %idxprom %1 = sext i32 %k.0.ph101 to i64 %2 = sext i32 %j.0.ph100 to i64 %smax = tail call i32 @llvm.smax.i32(i32 %j.0.ph100, i32 %u2) %3 = add i32 %smax, 1 br label %while.body while.cond23.preheader.loopexit: ; preds = %if.then15 %4 = trunc i64 %indvars.iv.next to i32 br label %while.cond23.preheader while.cond23.preheader: ; preds = %if.then, %while.cond23.preheader.loopexit, %entry %i.0.ph.lcssa = phi i32 [ %l1, %entry ], [ %i.0.ph99, %while.cond23.preheader.loopexit ], [ %inc, %if.then ] %j.0.lcssa = phi i32 [ %l2, %entry ], [ %3, %while.cond23.preheader.loopexit ], [ %27, %if.then ] %k.0.lcssa = phi i32 [ %l1, %entry ], [ %4, %while.cond23.preheader.loopexit ], [ %inc9, %if.then ] %cmp24.not106 = icmp sgt i32 %i.0.ph.lcssa, %u1 br i1 %cmp24.not106, label %while.cond33.preheader, label %while.body25.preheader while.body25.preheader: ; preds = %while.cond23.preheader %5 = sext i32 %k.0.lcssa to i64 %6 = sext i32 %i.0.ph.lcssa to i64 %7 = add i32 %u1, 1 %8 = sub i32 %u1, %i.0.ph.lcssa %9 = zext i32 %8 to i64 %10 = add nuw nsw i64 %9, 1 %min.iters.check = icmp ult i32 %8, 11 br i1 %min.iters.check, label %while.body25.preheader194, label %vector.memcheck vector.memcheck: ; preds = %while.body25.preheader %11 = shl nsw i64 %5, 3 %12 = add i64 %11, %t165 %13 = shl nsw i64 %6, 3 %14 = add i64 %13, %a166 %15 = sub i64 %12, %14 %diff.check = icmp ult i64 %15, 32 br i1 %diff.check, label %while.body25.preheader194, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %10, 8589934588 %ind.end = add nsw i64 %n.vec, %6 %ind.end167 = add nsw i64 %n.vec, %5 %invariant.gep = getelementptr i64, ptr %a, i64 %6 %invariant.gep214 = getelementptr i64, ptr %t, i64 %5 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %gep = getelementptr i64, ptr %invariant.gep, i64 %index %wide.load = load <2 x i64>, ptr %gep, align 8, !tbaa !5 %16 = getelementptr inbounds i64, ptr %gep, i64 2 %wide.load170 = load <2 x i64>, ptr %16, align 8, !tbaa !5 %gep215 = getelementptr i64, ptr %invariant.gep214, i64 %index store <2 x i64> %wide.load, ptr %gep215, align 8, !tbaa !5 %17 = getelementptr inbounds i64, ptr %gep215, i64 2 store <2 x i64> %wide.load170, ptr %17, align 8, !tbaa !5 %index.next = add nuw i64 %index, 4 %18 = icmp eq i64 %index.next, %n.vec br i1 %18, label %middle.block, label %vector.body, !llvm.loop !37 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %10, %n.vec br i1 %cmp.n, label %while.cond33.preheader.loopexit, label %while.body25.preheader194 while.body25.preheader194: ; preds = %vector.memcheck, %while.body25.preheader, %middle.block %indvars.iv132.ph = phi i64 [ %6, %vector.memcheck ], [ %6, %while.body25.preheader ], [ %ind.end, %middle.block ] %indvars.iv130.ph = phi i64 [ %5, %vector.memcheck ], [ %5, %while.body25.preheader ], [ %ind.end167, %middle.block ] %19 = add i32 %u1, 1 %20 = trunc i64 %indvars.iv132.ph to i32 %21 = sub i32 %19, %20 %22 = sub i32 %u1, %20 %xtraiter = and i32 %21, 3 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.body25.prol.loopexit, label %while.body25.prol while.body25.prol: ; preds = %while.body25.preheader194, %while.body25.prol %indvars.iv132.prol = phi i64 [ %indvars.iv.next133.prol, %while.body25.prol ], [ %indvars.iv132.ph, %while.body25.preheader194 ] %indvars.iv130.prol = phi i64 [ %indvars.iv.next131.prol, %while.body25.prol ], [ %indvars.iv130.ph, %while.body25.preheader194 ] %prol.iter = phi i32 [ %prol.iter.next, %while.body25.prol ], [ 0, %while.body25.preheader194 ] %arrayidx27.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv132.prol %23 = load i64, ptr %arrayidx27.prol, align 8, !tbaa !5 %arrayidx29.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv130.prol store i64 %23, ptr %arrayidx29.prol, align 8, !tbaa !5 %indvars.iv.next131.prol = add nsw i64 %indvars.iv130.prol, 1 %indvars.iv.next133.prol = add nsw i64 %indvars.iv132.prol, 1 %prol.iter.next = add i32 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i32 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %while.body25.prol.loopexit, label %while.body25.prol, !llvm.loop !38 while.body25.prol.loopexit: ; preds = %while.body25.prol, %while.body25.preheader194 %indvars.iv.next131.lcssa195.unr = phi i64 [ undef, %while.body25.preheader194 ], [ %indvars.iv.next131.prol, %while.body25.prol ] %indvars.iv132.unr = phi i64 [ %indvars.iv132.ph, %while.body25.preheader194 ], [ %indvars.iv.next133.prol, %while.body25.prol ] %indvars.iv130.unr = phi i64 [ %indvars.iv130.ph, %while.body25.preheader194 ], [ %indvars.iv.next131.prol, %while.body25.prol ] %24 = icmp ult i32 %22, 3 br i1 %24, label %while.cond33.preheader.loopexit, label %while.body25.preheader194.new while.body25.preheader194.new: ; preds = %while.body25.prol.loopexit %invariant.gep216 = getelementptr i64, ptr %a, i64 1 %invariant.gep218 = getelementptr i64, ptr %t, i64 1 %invariant.gep220 = getelementptr i64, ptr %a, i64 2 %invariant.gep222 = getelementptr i64, ptr %t, i64 2 %invariant.gep224 = getelementptr i64, ptr %a, i64 3 %invariant.gep226 = getelementptr i64, ptr %t, i64 3 br label %while.body25 while.body: ; preds = %while.body.preheader, %if.then15 %indvars.iv124 = phi i64 [ %2, %while.body.preheader ], [ %indvars.iv.next125, %if.then15 ] %indvars.iv = phi i64 [ %1, %while.body.preheader ], [ %indvars.iv.next, %if.then15 ] %25 = load i64, ptr %arrayidx, align 8, !tbaa !5 %arrayidx3 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv124 %26 = load i64, ptr %arrayidx3, align 8, !tbaa !5 %cmp4.not = icmp sgt i64 %25, %26 br i1 %cmp4.not, label %if.then15, label %if.then if.then: ; preds = %while.body %27 = trunc i64 %indvars.iv124 to i32 %28 = trunc i64 %indvars.iv to i32 %sext = shl i64 %indvars.iv, 32 %idxprom7 = ashr exact i64 %sext, 32 %arrayidx8 = getelementptr inbounds i64, ptr %t, i64 %idxprom7 store i64 %25, ptr %arrayidx8, align 8, !tbaa !5 %inc = add i32 %i.0.ph99, 1 %inc9 = add nsw i32 %28, 1 %cmp = icmp sle i32 %inc, %u1 %cmp180 = icmp sle i32 %27, %u2 %29 = and i1 %cmp, %cmp180 br i1 %29, label %while.body.preheader, label %while.cond23.preheader, !llvm.loop !23 if.then15: ; preds = %while.body %arrayidx19 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv store i64 %26, ptr %arrayidx19, align 8, !tbaa !5 %indvars.iv.next125 = add nsw i64 %indvars.iv124, 1 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next125 to i32 %exitcond.not = icmp eq i32 %3, %lftr.wideiv br i1 %exitcond.not, label %while.cond23.preheader.loopexit, label %while.body, !llvm.loop !23 while.cond33.preheader.loopexit: ; preds = %while.body25.prol.loopexit, %while.body25, %middle.block %indvars.iv.next131.lcssa = phi i64 [ %ind.end167, %middle.block ], [ %indvars.iv.next131.lcssa195.unr, %while.body25.prol.loopexit ], [ %indvars.iv.next131.3, %while.body25 ] %30 = trunc i64 %indvars.iv.next131.lcssa to i32 br label %while.cond33.preheader while.cond33.preheader: ; preds = %while.cond33.preheader.loopexit, %while.cond23.preheader %k.2.lcssa = phi i32 [ %k.0.lcssa, %while.cond23.preheader ], [ %30, %while.cond33.preheader.loopexit ] %cmp34.not110 = icmp sgt i32 %j.0.lcssa, %u2 br i1 %cmp34.not110, label %while.end42, label %while.body35.preheader while.body35.preheader: ; preds = %while.cond33.preheader %31 = sext i32 %k.2.lcssa to i64 %32 = sext i32 %j.0.lcssa to i64 %33 = add i32 %u2, 1 %34 = sub i32 %u2, %j.0.lcssa %35 = zext i32 %34 to i64 %36 = add nuw nsw i64 %35, 1 %min.iters.check177 = icmp ult i32 %34, 11 br i1 %min.iters.check177, label %while.body35.preheader193, label %vector.memcheck171 vector.memcheck171: ; preds = %while.body35.preheader %37 = shl nsw i64 %31, 3 %38 = add i64 %37, %t172 %39 = shl nsw i64 %32, 3 %40 = add i64 %39, %a173 %41 = sub i64 %38, %40 %diff.check174 = icmp ult i64 %41, 32 br i1 %diff.check174, label %while.body35.preheader193, label %vector.ph178 vector.ph178: ; preds = %vector.memcheck171 %n.vec180 = and i64 %36, 8589934588 %ind.end181 = add nsw i64 %n.vec180, %32 %ind.end183 = add nsw i64 %n.vec180, %31 %invariant.gep228 = getelementptr i64, ptr %a, i64 %32 %invariant.gep230 = getelementptr i64, ptr %t, i64 %31 br label %vector.body186 vector.body186: ; preds = %vector.body186, %vector.ph178 %index187 = phi i64 [ 0, %vector.ph178 ], [ %index.next192, %vector.body186 ] %gep229 = getelementptr i64, ptr %invariant.gep228, i64 %index187 %wide.load190 = load <2 x i64>, ptr %gep229, align 8, !tbaa !5 %42 = getelementptr inbounds i64, ptr %gep229, i64 2 %wide.load191 = load <2 x i64>, ptr %42, align 8, !tbaa !5 %gep231 = getelementptr i64, ptr %invariant.gep230, i64 %index187 store <2 x i64> %wide.load190, ptr %gep231, align 8, !tbaa !5 %43 = getelementptr inbounds i64, ptr %gep231, i64 2 store <2 x i64> %wide.load191, ptr %43, align 8, !tbaa !5 %index.next192 = add nuw i64 %index187, 4 %44 = icmp eq i64 %index.next192, %n.vec180 br i1 %44, label %middle.block175, label %vector.body186, !llvm.loop !39 middle.block175: ; preds = %vector.body186 %cmp.n185 = icmp eq i64 %36, %n.vec180 br i1 %cmp.n185, label %while.end42, label %while.body35.preheader193 while.body35.preheader193: ; preds = %vector.memcheck171, %while.body35.preheader, %middle.block175 %indvars.iv142.ph = phi i64 [ %32, %vector.memcheck171 ], [ %32, %while.body35.preheader ], [ %ind.end181, %middle.block175 ] %indvars.iv140.ph = phi i64 [ %31, %vector.memcheck171 ], [ %31, %while.body35.preheader ], [ %ind.end183, %middle.block175 ] %45 = add i32 %u2, 1 %46 = trunc i64 %indvars.iv142.ph to i32 %47 = sub i32 %45, %46 %48 = sub i32 %u2, %46 %xtraiter204 = and i32 %47, 3 %lcmp.mod205.not = icmp eq i32 %xtraiter204, 0 br i1 %lcmp.mod205.not, label %while.body35.prol.loopexit, label %while.body35.prol while.body35.prol: ; preds = %while.body35.preheader193, %while.body35.prol %indvars.iv142.prol = phi i64 [ %indvars.iv.next143.prol, %while.body35.prol ], [ %indvars.iv142.ph, %while.body35.preheader193 ] %indvars.iv140.prol = phi i64 [ %indvars.iv.next141.prol, %while.body35.prol ], [ %indvars.iv140.ph, %while.body35.preheader193 ] %prol.iter206 = phi i32 [ %prol.iter206.next, %while.body35.prol ], [ 0, %while.body35.preheader193 ] %arrayidx37.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv142.prol %49 = load i64, ptr %arrayidx37.prol, align 8, !tbaa !5 %arrayidx39.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv140.prol store i64 %49, ptr %arrayidx39.prol, align 8, !tbaa !5 %indvars.iv.next141.prol = add nsw i64 %indvars.iv140.prol, 1 %indvars.iv.next143.prol = add nsw i64 %indvars.iv142.prol, 1 %prol.iter206.next = add i32 %prol.iter206, 1 %prol.iter206.cmp.not = icmp eq i32 %prol.iter206.next, %xtraiter204 br i1 %prol.iter206.cmp.not, label %while.body35.prol.loopexit, label %while.body35.prol, !llvm.loop !40 while.body35.prol.loopexit: ; preds = %while.body35.prol, %while.body35.preheader193 %indvars.iv142.unr = phi i64 [ %indvars.iv142.ph, %while.body35.preheader193 ], [ %indvars.iv.next143.prol, %while.body35.prol ] %indvars.iv140.unr = phi i64 [ %indvars.iv140.ph, %while.body35.preheader193 ], [ %indvars.iv.next141.prol, %while.body35.prol ] %50 = icmp ult i32 %48, 3 br i1 %50, label %while.end42, label %while.body35.preheader193.new while.body35.preheader193.new: ; preds = %while.body35.prol.loopexit %invariant.gep232 = getelementptr i64, ptr %a, i64 1 %invariant.gep234 = getelementptr i64, ptr %t, i64 1 %invariant.gep236 = getelementptr i64, ptr %a, i64 2 %invariant.gep238 = getelementptr i64, ptr %t, i64 2 %invariant.gep240 = getelementptr i64, ptr %a, i64 3 %invariant.gep242 = getelementptr i64, ptr %t, i64 3 br label %while.body35 while.body25: ; preds = %while.body25, %while.body25.preheader194.new %indvars.iv132 = phi i64 [ %indvars.iv132.unr, %while.body25.preheader194.new ], [ %indvars.iv.next133.3, %while.body25 ] %indvars.iv130 = phi i64 [ %indvars.iv130.unr, %while.body25.preheader194.new ], [ %indvars.iv.next131.3, %while.body25 ] %arrayidx27 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv132 %51 = load i64, ptr %arrayidx27, align 8, !tbaa !5 %arrayidx29 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv130 store i64 %51, ptr %arrayidx29, align 8, !tbaa !5 %gep217 = getelementptr i64, ptr %invariant.gep216, i64 %indvars.iv132 %52 = load i64, ptr %gep217, align 8, !tbaa !5 %gep219 = getelementptr i64, ptr %invariant.gep218, i64 %indvars.iv130 store i64 %52, ptr %gep219, align 8, !tbaa !5 %gep221 = getelementptr i64, ptr %invariant.gep220, i64 %indvars.iv132 %53 = load i64, ptr %gep221, align 8, !tbaa !5 %gep223 = getelementptr i64, ptr %invariant.gep222, i64 %indvars.iv130 store i64 %53, ptr %gep223, align 8, !tbaa !5 %gep225 = getelementptr i64, ptr %invariant.gep224, i64 %indvars.iv132 %54 = load i64, ptr %gep225, align 8, !tbaa !5 %gep227 = getelementptr i64, ptr %invariant.gep226, i64 %indvars.iv130 store i64 %54, ptr %gep227, align 8, !tbaa !5 %indvars.iv.next131.3 = add nsw i64 %indvars.iv130, 4 %indvars.iv.next133.3 = add nsw i64 %indvars.iv132, 4 %lftr.wideiv137.3 = trunc i64 %indvars.iv.next133.3 to i32 %exitcond138.not.3 = icmp eq i32 %7, %lftr.wideiv137.3 br i1 %exitcond138.not.3, label %while.cond33.preheader.loopexit, label %while.body25, !llvm.loop !41 while.body35: ; preds = %while.body35, %while.body35.preheader193.new %indvars.iv142 = phi i64 [ %indvars.iv142.unr, %while.body35.preheader193.new ], [ %indvars.iv.next143.3, %while.body35 ] %indvars.iv140 = phi i64 [ %indvars.iv140.unr, %while.body35.preheader193.new ], [ %indvars.iv.next141.3, %while.body35 ] %arrayidx37 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv142 %55 = load i64, ptr %arrayidx37, align 8, !tbaa !5 %arrayidx39 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv140 store i64 %55, ptr %arrayidx39, align 8, !tbaa !5 %gep233 = getelementptr i64, ptr %invariant.gep232, i64 %indvars.iv142 %56 = load i64, ptr %gep233, align 8, !tbaa !5 %gep235 = getelementptr i64, ptr %invariant.gep234, i64 %indvars.iv140 store i64 %56, ptr %gep235, align 8, !tbaa !5 %gep237 = getelementptr i64, ptr %invariant.gep236, i64 %indvars.iv142 %57 = load i64, ptr %gep237, align 8, !tbaa !5 %gep239 = getelementptr i64, ptr %invariant.gep238, i64 %indvars.iv140 store i64 %57, ptr %gep239, align 8, !tbaa !5 %gep241 = getelementptr i64, ptr %invariant.gep240, i64 %indvars.iv142 %58 = load i64, ptr %gep241, align 8, !tbaa !5 %gep243 = getelementptr i64, ptr %invariant.gep242, i64 %indvars.iv140 store i64 %58, ptr %gep243, align 8, !tbaa !5 %indvars.iv.next141.3 = add nsw i64 %indvars.iv140, 4 %indvars.iv.next143.3 = add nsw i64 %indvars.iv142, 4 %lftr.wideiv147.3 = trunc i64 %indvars.iv.next143.3 to i32 %exitcond148.not.3 = icmp eq i32 %33, %lftr.wideiv147.3 br i1 %exitcond148.not.3, label %while.end42, label %while.body35, !llvm.loop !42 while.end42: ; preds = %while.body35.prol.loopexit, %while.body35, %middle.block175, %while.cond33.preheader ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @copy(ptr nocapture noundef writeonly %a, ptr nocapture noundef readonly %t, i32 noundef %n) local_unnamed_addr #9 { entry: %cmp6 = icmp sgt i32 %n, 0 br i1 %cmp6, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %a9 = ptrtoint ptr %a to i64 %t10 = ptrtoint ptr %t to i64 %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 6 %0 = sub i64 %a9, %t10 %diff.check = icmp ult i64 %0, 32 %or.cond = or i1 %min.iters.check, %diff.check br i1 %or.cond, label %for.body.preheader12, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967292 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %1 = getelementptr inbounds i64, ptr %t, i64 %index %wide.load = load <2 x i64>, ptr %1, align 8, !tbaa !5 %2 = getelementptr inbounds i64, ptr %1, i64 2 %wide.load11 = load <2 x i64>, ptr %2, align 8, !tbaa !5 %3 = getelementptr inbounds i64, ptr %a, i64 %index store <2 x i64> %wide.load, ptr %3, align 8, !tbaa !5 %4 = getelementptr inbounds i64, ptr %3, i64 2 store <2 x i64> %wide.load11, ptr %4, align 8, !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 !43 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.preheader12 for.body.preheader12: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %6 = xor i64 %indvars.iv.ph, -1 %7 = add nsw i64 %6, %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.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader12, %for.body.prol %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %for.body.prol ], [ %indvars.iv.ph, %for.body.preheader12 ] %prol.iter = phi i64 [ %prol.iter.next, %for.body.prol ], [ 0, %for.body.preheader12 ] %arrayidx.prol = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.prol %8 = load i64, ptr %arrayidx.prol, align 8, !tbaa !5 %arrayidx2.prol = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.prol store i64 %8, ptr %arrayidx2.prol, align 8, !tbaa !5 %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.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.body.prol.loopexit, label %for.body.prol, !llvm.loop !44 for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader12 %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader12 ], [ %indvars.iv.next.prol, %for.body.prol ] %9 = icmp ult i64 %7, 3 br i1 %9, label %for.end, label %for.body for.body: ; preds = %for.body.prol.loopexit, %for.body %indvars.iv = phi i64 [ %indvars.iv.next.3, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ] %arrayidx = getelementptr inbounds i64, ptr %t, i64 %indvars.iv %10 = load i64, ptr %arrayidx, align 8, !tbaa !5 %arrayidx2 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv store i64 %10, ptr %arrayidx2, align 8, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next %11 = load i64, ptr %arrayidx.1, align 8, !tbaa !5 %arrayidx2.1 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next store i64 %11, ptr %arrayidx2.1, align 8, !tbaa !5 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %arrayidx.2 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next.1 %12 = load i64, ptr %arrayidx.2, align 8, !tbaa !5 %arrayidx2.2 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next.1 store i64 %12, ptr %arrayidx2.2, align 8, !tbaa !5 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %arrayidx.3 = getelementptr inbounds i64, ptr %t, i64 %indvars.iv.next.2 %13 = load i64, ptr %arrayidx.3, align 8, !tbaa !5 %arrayidx2.3 = getelementptr inbounds i64, ptr %a, i64 %indvars.iv.next.2 store i64 %13, ptr %arrayidx2.3, align 8, !tbaa !5 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count br i1 %exitcond.not.3, label %for.end, label %for.body, !llvm.loop !45 for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #11 ; 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) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v2i32(<2 x i32>) #11 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 norecurse nosync nounwind 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 #2 = { mustprogress nocallback nofree nosync 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 = { 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 #5 = { 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 #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #8 = { nofree 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 #9 = { 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 #10 = { nofree nounwind } attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #12 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #13 = { 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, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = !{!18, !18, i64 0} !18 = !{!"int", !7, i64 0} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10, !21, !22} !21 = !{!"llvm.loop.isvectorized", i32 1} !22 = !{!"llvm.loop.unroll.runtime.disable"} !23 = distinct !{!23, !10} !24 = distinct !{!24, !10} !25 = distinct !{!25, !10} !26 = distinct !{!26, !10, !22, !21} !27 = distinct !{!27, !10} !28 = distinct !{!28, !10, !21, !22} !29 = distinct !{!29, !12} !30 = distinct !{!30, !10, !21, !22} !31 = distinct !{!31, !12} !32 = distinct !{!32, !10, !21} !33 = distinct !{!33, !10, !21} !34 = distinct !{!34, !10, !21, !22} !35 = distinct !{!35, !12} !36 = distinct !{!36, !10, !21} !37 = distinct !{!37, !10, !21, !22} !38 = distinct !{!38, !12} !39 = distinct !{!39, !10, !21, !22} !40 = distinct !{!40, !12} !41 = distinct !{!41, !10, !21} !42 = distinct !{!42, !10, !21} !43 = distinct !{!43, !10, !21, !22} !44 = distinct !{!44, !12} !45 = distinct !{!45, !10, !21}
#include<stdio.h> int main(){ int x,y,a,f,i; while(scanf("%d %d",&x,&y)!=EOF){ if(x==0 && y==0)break; a=x+y;f=0; for(i=1;i<5;i++){ scanf("%d %d",&x,&y); if(a<x+y)a=x+y,f=i; } printf("%c %d\n",65+f,a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294073/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294073/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 [7 x i8] c"%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 %y = 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 %y) #4 %call19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %cmp.not20 = icmp eq i32 %call19, -1 br i1 %cmp.not20, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp1 = icmp eq i32 %0, 0 %1 = load i32, ptr %y, align 4 %cmp2 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp1, i1 %cmp2, i1 false br i1 %or.cond, label %while.end, label %if.end if.end: ; preds = %while.body %add = add nsw i32 %1, %0 %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %2 = load i32, ptr %x, align 4, !tbaa !5 %3 = load i32, ptr %y, align 4, !tbaa !5 %add5 = add nsw i32 %3, %2 %cmp6 = icmp slt i32 %add, %add5 %spec.select = call i32 @llvm.smax.i32(i32 %add, i32 %add5) %call4.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %4 = load i32, ptr %x, align 4, !tbaa !5 %5 = load i32, ptr %y, align 4, !tbaa !5 %add5.1 = add nsw i32 %5, %4 %cmp6.1 = icmp slt i32 %spec.select, %add5.1 %spec.select.1 = call i32 @llvm.smax.i32(i32 %spec.select, i32 %add5.1) %6 = select i1 %cmp6, i32 66, i32 65 %call4.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %7 = load i32, ptr %x, align 4, !tbaa !5 %8 = load i32, ptr %y, align 4, !tbaa !5 %add5.2 = add nsw i32 %8, %7 %cmp6.2 = icmp slt i32 %spec.select.1, %add5.2 %spec.select.2 = call i32 @llvm.smax.i32(i32 %spec.select.1, i32 %add5.2) %9 = select i1 %cmp6.1, i32 67, i32 %6 %call4.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %10 = load i32, ptr %x, align 4, !tbaa !5 %11 = load i32, ptr %y, align 4, !tbaa !5 %add5.3 = add nsw i32 %11, %10 %cmp6.3 = icmp slt i32 %spec.select.2, %add5.3 %spec.select.3 = call i32 @llvm.smax.i32(i32 %spec.select.2, i32 %add5.3) %12 = select i1 %cmp6.2, i32 68, i32 %9 %add10 = select i1 %cmp6.3, i32 69, i32 %12 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add10, i32 noundef %spec.select.3) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.end, %while.body, %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 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"}
#include <stdio.h> int main(void) { int i, j, k, M, N, a[10010], b[10010]; scanf("%d", &N); M = N*(N-1)/2 - N/2; k = 0; for (i=1;i<=N;i++) for (j=i+1;j<=N;j++) { a[k] = i; b[k++] = j; } printf("%d\n", M); for (i=0;i<k;i++) { if ((N%2 && a[i]+b[i] == N) || (!(N%2) && a[i]+b[i] == N+1)) continue; printf("%d %d\n", a[i], b[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294116/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294116/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 [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: %N = alloca i32, align 4 %a = alloca [10010 x i32], align 16 %b = alloca [10010 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 40040, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 40040, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %mul = mul nsw i32 %sub, %0 %div = sdiv i32 %mul, 2 %div1.neg = sdiv i32 %0, -2 %sub2 = add nsw i32 %div, %div1.neg %cmp.not58 = icmp slt i32 %0, 1 br i1 %cmp.not58, label %for.end11.thread, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = add i32 %0, -2 br label %for.body for.end11.thread: ; preds = %entry %call1271 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub2) br label %for.end39 for.cond.loopexit.loopexit: ; preds = %for.body5, %middle.block %indvars.iv.next.lcssa = phi i64 [ %ind.end, %middle.block ], [ %indvars.iv.next, %for.body5 ] %2 = trunc i64 %indvars.iv.next.lcssa to i32 br label %for.cond.loopexit for.cond.loopexit: ; preds = %for.cond.loopexit.loopexit, %for.body %k.1.lcssa = phi i32 [ %k.059, %for.body ], [ %2, %for.cond.loopexit.loopexit ] %exitcond65.not = icmp eq i32 %i.060, %0 %indvar.next = add i32 %indvar, 1 br i1 %exitcond65.not, label %for.end11, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvar = phi i32 [ 0, %for.body.preheader ], [ %indvar.next, %for.cond.loopexit ] %i.060 = phi i32 [ 1, %for.body.preheader ], [ %add, %for.cond.loopexit ] %k.059 = phi i32 [ 0, %for.body.preheader ], [ %k.1.lcssa, %for.cond.loopexit ] %3 = sub i32 %1, %indvar %4 = zext i32 %3 to i64 %5 = add nuw nsw i64 %4, 1 %add = add nuw i32 %i.060, 1 %cmp4.not55.not = icmp slt i32 %i.060, %0 br i1 %cmp4.not55.not, label %for.body5.preheader, label %for.cond.loopexit for.body5.preheader: ; preds = %for.body %6 = sext i32 %k.059 to i64 %min.iters.check = icmp ult i32 %3, 7 br i1 %min.iters.check, label %for.body5.preheader76, label %vector.ph vector.ph: ; preds = %for.body5.preheader %n.vec = and i64 %5, 8589934584 %ind.end = add nsw i64 %n.vec, %6 %.cast = trunc i64 %n.vec to i32 %ind.end73 = add i32 %add, %.cast %.splatinsert = insertelement <4 x i32> poison, i32 %add, i64 0 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3> %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %i.060, 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> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %offset.idx = add i64 %index, %6 %7 = getelementptr inbounds [10010 x i32], ptr %a, i64 0, i64 %offset.idx store <4 x i32> %broadcast.splat, ptr %7, align 4, !tbaa !5 %8 = getelementptr inbounds i32, ptr %7, i64 4 store <4 x i32> %broadcast.splat, ptr %8, align 4, !tbaa !5 %9 = getelementptr inbounds [10010 x i32], ptr %b, i64 0, i64 %offset.idx store <4 x i32> %vec.ind, ptr %9, align 4, !tbaa !5 %10 = getelementptr inbounds i32, ptr %9, i64 4 store <4 x i32> %step.add, ptr %10, 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> %11 = icmp eq i64 %index.next, %n.vec br i1 %11, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %5, %n.vec br i1 %cmp.n, label %for.cond.loopexit.loopexit, label %for.body5.preheader76 for.body5.preheader76: ; preds = %for.body5.preheader, %middle.block %indvars.iv.ph = phi i64 [ %6, %for.body5.preheader ], [ %ind.end, %middle.block ] %j.056.ph = phi i32 [ %add, %for.body5.preheader ], [ %ind.end73, %middle.block ] br label %for.body5 for.body5: ; preds = %for.body5.preheader76, %for.body5 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body5 ], [ %indvars.iv.ph, %for.body5.preheader76 ] %j.056 = phi i32 [ %inc8, %for.body5 ], [ %j.056.ph, %for.body5.preheader76 ] %arrayidx = getelementptr inbounds [10010 x i32], ptr %a, i64 0, i64 %indvars.iv store i32 %i.060, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx7 = getelementptr inbounds [10010 x i32], ptr %b, i64 0, i64 %indvars.iv store i32 %j.056, ptr %arrayidx7, align 4, !tbaa !5 %inc8 = add i32 %j.056, 1 %exitcond.not = icmp eq i32 %j.056, %0 br i1 %exitcond.not, label %for.cond.loopexit.loopexit, label %for.body5, !llvm.loop !14 for.end11: ; preds = %for.cond.loopexit %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub2) %cmp1462 = icmp sgt i32 %k.1.lcssa, 0 br i1 %cmp1462, label %for.body15.preheader, label %for.end39 for.body15.preheader: ; preds = %for.end11 %wide.trip.count = zext i32 %k.1.lcssa to i64 br label %for.body15 for.body15: ; preds = %for.body15.preheader, %for.inc37 %indvars.iv66 = phi i64 [ 0, %for.body15.preheader ], [ %indvars.iv.next67, %for.inc37 ] %12 = load i32, ptr %N, align 4, !tbaa !5 %13 = and i32 %12, 1 %tobool.not = icmp eq i32 %13, 0 %arrayidx26 = getelementptr inbounds [10010 x i32], ptr %a, i64 0, i64 %indvars.iv66 %14 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %arrayidx28 = getelementptr inbounds [10010 x i32], ptr %b, i64 0, i64 %indvars.iv66 %15 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %add29 = add nsw i32 %15, %14 br i1 %tobool.not, label %land.lhs.true24, label %land.lhs.true land.lhs.true: ; preds = %for.body15 %cmp21 = icmp eq i32 %add29, %12 br i1 %cmp21, label %for.inc37, label %if.end land.lhs.true24: ; preds = %for.body15 %add30 = add nuw nsw i32 %12, 1 %cmp31 = icmp eq i32 %add29, %add30 br i1 %cmp31, label %for.inc37, label %if.end if.end: ; preds = %land.lhs.true, %land.lhs.true24 %call36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %14, i32 noundef %15) br label %for.inc37 for.inc37: ; preds = %land.lhs.true, %land.lhs.true24, %if.end %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %exitcond69.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count br i1 %exitcond69.not, label %for.end39, label %for.body15, !llvm.loop !15 for.end39: ; preds = %for.inc37, %for.end11.thread, %for.end11 call void @llvm.lifetime.end.p0(i64 40040, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 40040, ptr nonnull %a) #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 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, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10}
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) #define lld long long int int main(){ int sx, sy, tx, ty; scanf("%d %d %d %d", &sx, &sy, &tx, &ty); rep(i, 0, tx-sx){ printf("R"); } rep(i, 0, ty-sy){ printf("U"); } rep(i, 0, tx-sx){ printf("L"); } rep(i, 0, ty-sy){ printf("D"); } printf("D"); rep(i, 0, tx-sx+1){ printf("R"); } rep(i, 0, ty-sy+1){ printf("U"); } printf("LU"); rep(i, 0, tx-sx+1){ printf("L"); } rep(i, 0, ty-sy+1){ printf("D"); } printf("R"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294167/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 [12 x i8] c"%d %d %d %d\00", align 1 @.str.5 = private unnamed_addr constant [3 x i8] c"LU\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %sx = alloca i32, align 4 %sy = alloca i32, align 4 %tx = alloca i32, align 4 %ty = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sx) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sy) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tx) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ty) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sx, ptr noundef nonnull %sy, ptr noundef nonnull %tx, ptr noundef nonnull %ty) %0 = load i32, ptr %tx, align 4, !tbaa !5 %1 = load i32, ptr %sx, align 4, !tbaa !5 %cmp96 = icmp sgt i32 %0, %1 br i1 %cmp96, label %for.body, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.body, %entry %2 = phi i32 [ %1, %entry ], [ %7, %for.body ] %3 = phi i32 [ %0, %entry ], [ %6, %for.body ] %4 = load i32, ptr %ty, align 4, !tbaa !5 %5 = load i32, ptr %sy, align 4, !tbaa !5 %cmp599 = icmp sgt i32 %4, %5 br i1 %cmp599, label %for.body7, label %for.cond13.preheader for.body: ; preds = %entry, %for.body %i.097 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %putchar94 = call i32 @putchar(i32 82) %inc = add nuw nsw i32 %i.097, 1 %6 = load i32, ptr %tx, align 4, !tbaa !5 %7 = load i32, ptr %sx, align 4, !tbaa !5 %sub = sub nsw i32 %6, %7 %cmp = icmp slt i32 %inc, %sub br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.cond13.preheader.loopexit: ; preds = %for.body7 %.pre = load i32, ptr %tx, align 4, !tbaa !5 %.pre119 = load i32, ptr %sx, align 4, !tbaa !5 br label %for.cond13.preheader for.cond13.preheader: ; preds = %for.cond13.preheader.loopexit, %for.cond3.preheader %8 = phi i32 [ %13, %for.cond13.preheader.loopexit ], [ %5, %for.cond3.preheader ] %9 = phi i32 [ %12, %for.cond13.preheader.loopexit ], [ %4, %for.cond3.preheader ] %10 = phi i32 [ %.pre119, %for.cond13.preheader.loopexit ], [ %2, %for.cond3.preheader ] %11 = phi i32 [ %.pre, %for.cond13.preheader.loopexit ], [ %3, %for.cond3.preheader ] %cmp15102 = icmp sgt i32 %11, %10 br i1 %cmp15102, label %for.body17, label %for.cond23.preheader for.body7: ; preds = %for.cond3.preheader, %for.body7 %i2.0100 = phi i32 [ %inc10, %for.body7 ], [ 0, %for.cond3.preheader ] %putchar93 = call i32 @putchar(i32 85) %inc10 = add nuw nsw i32 %i2.0100, 1 %12 = load i32, ptr %ty, align 4, !tbaa !5 %13 = load i32, ptr %sy, align 4, !tbaa !5 %sub4 = sub nsw i32 %12, %13 %cmp5 = icmp slt i32 %inc10, %sub4 br i1 %cmp5, label %for.body7, label %for.cond13.preheader.loopexit, !llvm.loop !11 for.cond23.preheader.loopexit: ; preds = %for.body17 %.pre120 = load i32, ptr %ty, align 4, !tbaa !5 %.pre121 = load i32, ptr %sy, align 4, !tbaa !5 br label %for.cond23.preheader for.cond23.preheader: ; preds = %for.cond23.preheader.loopexit, %for.cond13.preheader %14 = phi i32 [ %.pre121, %for.cond23.preheader.loopexit ], [ %8, %for.cond13.preheader ] %15 = phi i32 [ %.pre120, %for.cond23.preheader.loopexit ], [ %9, %for.cond13.preheader ] %cmp25105 = icmp sgt i32 %15, %14 br i1 %cmp25105, label %for.body27, label %for.cond.cleanup26 for.body17: ; preds = %for.cond13.preheader, %for.body17 %i12.0103 = phi i32 [ %inc20, %for.body17 ], [ 0, %for.cond13.preheader ] %putchar92 = call i32 @putchar(i32 76) %inc20 = add nuw nsw i32 %i12.0103, 1 %16 = load i32, ptr %tx, align 4, !tbaa !5 %17 = load i32, ptr %sx, align 4, !tbaa !5 %sub14 = sub nsw i32 %16, %17 %cmp15 = icmp slt i32 %inc20, %sub14 br i1 %cmp15, label %for.body17, label %for.cond23.preheader.loopexit, !llvm.loop !12 for.cond.cleanup26: ; preds = %for.body27, %for.cond23.preheader %putchar = call i32 @putchar(i32 68) %18 = load i32, ptr %tx, align 4, !tbaa !5 %19 = load i32, ptr %sx, align 4, !tbaa !5 %cmp36.not108 = icmp slt i32 %18, %19 br i1 %cmp36.not108, label %for.cond44.preheader, label %for.body38 for.body27: ; preds = %for.cond23.preheader, %for.body27 %i22.0106 = phi i32 [ %inc30, %for.body27 ], [ 0, %for.cond23.preheader ] %putchar91 = call i32 @putchar(i32 68) %inc30 = add nuw nsw i32 %i22.0106, 1 %20 = load i32, ptr %ty, align 4, !tbaa !5 %21 = load i32, ptr %sy, align 4, !tbaa !5 %sub24 = sub nsw i32 %20, %21 %cmp25 = icmp slt i32 %inc30, %sub24 br i1 %cmp25, label %for.body27, label %for.cond.cleanup26, !llvm.loop !13 for.cond44.preheader: ; preds = %for.body38, %for.cond.cleanup26 %22 = load i32, ptr %ty, align 4, !tbaa !5 %23 = load i32, ptr %sy, align 4, !tbaa !5 %cmp47.not111 = icmp slt i32 %22, %23 br i1 %cmp47.not111, label %for.cond.cleanup48, label %for.body49 for.body38: ; preds = %for.cond.cleanup26, %for.body38 %i33.0109 = phi i32 [ %inc41, %for.body38 ], [ 0, %for.cond.cleanup26 ] %putchar90 = call i32 @putchar(i32 82) %inc41 = add nuw nsw i32 %i33.0109, 1 %24 = load i32, ptr %tx, align 4, !tbaa !5 %25 = load i32, ptr %sx, align 4, !tbaa !5 %sub35 = sub nsw i32 %24, %25 %cmp36.not.not = icmp slt i32 %i33.0109, %sub35 br i1 %cmp36.not.not, label %for.body38, label %for.cond44.preheader, !llvm.loop !14 for.cond.cleanup48: ; preds = %for.body49, %for.cond44.preheader %call54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5) %26 = load i32, ptr %tx, align 4, !tbaa !5 %27 = load i32, ptr %sx, align 4, !tbaa !5 %cmp59.not114 = icmp slt i32 %26, %27 br i1 %cmp59.not114, label %for.cond67.preheader, label %for.body61 for.body49: ; preds = %for.cond44.preheader, %for.body49 %i43.0112 = phi i32 [ %inc52, %for.body49 ], [ 0, %for.cond44.preheader ] %putchar89 = call i32 @putchar(i32 85) %inc52 = add nuw nsw i32 %i43.0112, 1 %28 = load i32, ptr %ty, align 4, !tbaa !5 %29 = load i32, ptr %sy, align 4, !tbaa !5 %sub45 = sub nsw i32 %28, %29 %cmp47.not.not = icmp slt i32 %i43.0112, %sub45 br i1 %cmp47.not.not, label %for.body49, label %for.cond.cleanup48, !llvm.loop !15 for.cond67.preheader: ; preds = %for.body61, %for.cond.cleanup48 %30 = load i32, ptr %ty, align 4, !tbaa !5 %31 = load i32, ptr %sy, align 4, !tbaa !5 %cmp70.not117 = icmp slt i32 %30, %31 br i1 %cmp70.not117, label %for.cond.cleanup71, label %for.body72 for.body61: ; preds = %for.cond.cleanup48, %for.body61 %i55.0115 = phi i32 [ %inc64, %for.body61 ], [ 0, %for.cond.cleanup48 ] %putchar88 = call i32 @putchar(i32 76) %inc64 = add nuw nsw i32 %i55.0115, 1 %32 = load i32, ptr %tx, align 4, !tbaa !5 %33 = load i32, ptr %sx, align 4, !tbaa !5 %sub57 = sub nsw i32 %32, %33 %cmp59.not.not = icmp slt i32 %i55.0115, %sub57 br i1 %cmp59.not.not, label %for.body61, label %for.cond67.preheader, !llvm.loop !16 for.cond.cleanup71: ; preds = %for.body72, %for.cond67.preheader %putchar86 = call i32 @putchar(i32 82) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ty) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tx) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sy) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sx) #4 ret i32 0 for.body72: ; preds = %for.cond67.preheader, %for.body72 %i66.0118 = phi i32 [ %inc75, %for.body72 ], [ 0, %for.cond67.preheader ] %putchar87 = call i32 @putchar(i32 68) %inc75 = add nuw nsw i32 %i66.0118, 1 %34 = load i32, ptr %ty, align 4, !tbaa !5 %35 = load i32, ptr %sy, align 4, !tbaa !5 %sub68 = sub nsw i32 %34, %35 %cmp70.not.not = icmp slt i32 %i66.0118, %sub68 br i1 %cmp70.not.not, label %for.body72, label %for.cond.cleanup71, !llvm.loop !17 } ; 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} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10}
#define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807; #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #define rev(i,n) for(i=n-1;i>=0;i--) /* #define sort(a,n) qsort(a,n,sizeof(TYPE),cmp) #define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r) */ #define chsort(s,n) qsort(s,n,sizeof(char),cmp) #define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r) #define TYPE long long #define ll long long #define MEMSET(a) memset(a,0,sizeof(a)) #define MEMSET_U(a) memset(a,-1,sizeof(a)) #define bool _Bool const int mod = (int)1e09 + 7; //#define DEBUG1 //#define DEBUG2 //#define DEBUGF #define DUMMY int in(void) { int i; scanf("%d", &i); return i; } long long llin(void) { long long i; scanf("%lld", &i); return i; } double din(void) { double i; scanf("%lf", &i); return i; } void chin(char s[]) { scanf("%s", s); } void print(int a) { printf("%d\n", a); } void llprint(long long a) { printf("%lld\n", a); } void dprint(double a) { printf("%.10f\n", a); } void print2(int a, int b) { printf("%d %d\n", a, b); } int Max(int a, int b) { if (a > b) { return a; }return b; } int Min(int a, int b) { if (a < b) { return a; }return b; } long long llmax(long long a, long long b) { return a > b ? a : b; } long long llmin(long long a, long long b) { return a < b ? a : b; } double dmax(double a, double b) { return a > b ? a : b; } double dmin(double a, double b) { return a < b ? a : b; } //long long llmax(long long a, long long b) { return a > b ? a : b; } //long long llmin(long long a, long long b) { return a < b ? a : b; } //double dmax(double a, double b) { return a > b ? a : b; } int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; } int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; } int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); } int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); } void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; } int main() { int sx, sy, tx, ty; scanf("%d%d%d%d", &sx, &sy, &tx, &ty); int dx = (tx - sx); int dy = (ty - sy); //path1 for (int i = 0; i < dx; i++) { printf("R"); } for (int i = 0; i < dy; i++) { printf("U"); } //path2 for (int i = 0; i < dx; i++) { printf("L"); } for (int i = 0; i < dy; i++) { printf("D"); } //path3 printf("D"); for (int i = 0; i < dx+1; i++) { printf("R"); } for (int i = 0; i < dy+1; i++) { printf("U"); } printf("L"); //path4 printf("U"); for (int i = 0; i < dx + 1; i++) { printf("L"); } for (int i = 0; i < dy + 1; i++) { printf("D"); } printf("R"); printf("\n"); #ifdef DEBUGF getch(); #endif return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294217/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294217/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" @mod = dso_local local_unnamed_addr constant i32 1000000007, align 4 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%lf\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @.str.6 = private unnamed_addr constant [7 x i8] c"%.10f\0A\00", align 1 @.str.7 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.8 = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @in() local_unnamed_addr #0 { entry: %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %i, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #11 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 uwtable define dso_local i64 @llin() local_unnamed_addr #0 { entry: %i = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %i) %0 = load i64, ptr %i, align 8, !tbaa !9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #11 ret i64 %0 } ; Function Attrs: nofree nounwind uwtable define dso_local double @din() local_unnamed_addr #0 { entry: %i = alloca double, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %i) %0 = load double, ptr %i, align 8, !tbaa !11 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #11 ret double %0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @chin(ptr noundef %s) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %s) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print(i32 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %a) ret void } ; 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 @llprint(i64 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %a) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @dprint(double noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, double noundef %a) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print2(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %a, i32 noundef %b) ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @Max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @Min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dmax(double noundef %a, double noundef %b) local_unnamed_addr #4 { entry: %cmp = fcmp ogt double %a, %b %cond = select i1 %cmp, double %a, double %b ret double %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dmin(double noundef %a, double noundef %b) local_unnamed_addr #4 { entry: %cmp = fcmp olt double %a, %b %cond = select i1 %cmp, double %a, double %b ret double %cond } ; 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) local_unnamed_addr #5 { entry: %0 = load i64, ptr %a, align 8, !tbaa !9 %1 = load i64, ptr %b, align 8, !tbaa !9 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp_r(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i64, ptr %b, align 8, !tbaa !9 %1 = load i64, ptr %a, align 8, !tbaa !9 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @char_cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #12 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @char_cmp_r(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #12 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #8 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %sx = alloca i32, align 4 %sy = alloca i32, align 4 %tx = alloca i32, align 4 %ty = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sx) #11 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sy) #11 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tx) #11 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ty) #11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull %sx, ptr noundef nonnull %sy, ptr noundef nonnull %tx, ptr noundef nonnull %ty) %0 = load i32, ptr %tx, align 4, !tbaa !5 %1 = load i32, ptr %sx, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %2 = load i32, ptr %ty, align 4, !tbaa !5 %3 = load i32, ptr %sy, align 4, !tbaa !5 %sub1 = sub i32 %2, %3 %cmp100 = icmp sgt i32 %sub, 0 br i1 %cmp100, label %for.body, label %for.cond4.preheader for.cond4.preheader: ; preds = %for.body, %entry %cmp5102 = icmp sgt i32 %sub1, 0 br i1 %cmp5102, label %for.body7, label %for.cond13.preheader for.body: ; preds = %entry, %for.body %i.0101 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %putchar99 = call i32 @putchar(i32 82) %inc = add nuw nsw i32 %i.0101, 1 %exitcond.not = icmp eq i32 %inc, %sub br i1 %exitcond.not, label %for.cond4.preheader, label %for.body, !llvm.loop !13 for.cond13.preheader: ; preds = %for.body7, %for.cond4.preheader br i1 %cmp100, label %for.body16, label %for.cond22.preheader for.body7: ; preds = %for.cond4.preheader, %for.body7 %i3.0103 = phi i32 [ %inc10, %for.body7 ], [ 0, %for.cond4.preheader ] %putchar98 = call i32 @putchar(i32 85) %inc10 = add nuw nsw i32 %i3.0103, 1 %exitcond116.not = icmp eq i32 %inc10, %sub1 br i1 %exitcond116.not, label %for.cond13.preheader, label %for.body7, !llvm.loop !15 for.cond22.preheader: ; preds = %for.body16, %for.cond13.preheader br i1 %cmp5102, label %for.body25, label %for.cond.cleanup24 for.body16: ; preds = %for.cond13.preheader, %for.body16 %i12.0105 = phi i32 [ %inc19, %for.body16 ], [ 0, %for.cond13.preheader ] %putchar97 = call i32 @putchar(i32 76) %inc19 = add nuw nsw i32 %i12.0105, 1 %exitcond117.not = icmp eq i32 %inc19, %sub br i1 %exitcond117.not, label %for.cond22.preheader, label %for.body16, !llvm.loop !16 for.cond.cleanup24: ; preds = %for.body25, %for.cond22.preheader %putchar = call i32 @putchar(i32 68) %cmp33.not108 = icmp slt i32 %sub, 0 br i1 %cmp33.not108, label %for.cond41.preheader, label %for.body35.preheader for.body35.preheader: ; preds = %for.cond.cleanup24 %4 = add i32 %0, 1 %5 = sub i32 %4, %1 br label %for.body35 for.body25: ; preds = %for.cond22.preheader, %for.body25 %i21.0107 = phi i32 [ %inc28, %for.body25 ], [ 0, %for.cond22.preheader ] %putchar96 = call i32 @putchar(i32 68) %inc28 = add nuw nsw i32 %i21.0107, 1 %exitcond118.not = icmp eq i32 %inc28, %sub1 br i1 %exitcond118.not, label %for.cond.cleanup24, label %for.body25, !llvm.loop !17 for.cond41.preheader: ; preds = %for.body35, %for.cond.cleanup24 %cmp43.not110 = icmp slt i32 %sub1, 0 br i1 %cmp43.not110, label %for.cond.cleanup44, label %for.body45.preheader for.body45.preheader: ; preds = %for.cond41.preheader %6 = add i32 %2, 1 %7 = sub i32 %6, %3 br label %for.body45 for.body35: ; preds = %for.body35.preheader, %for.body35 %i31.0109 = phi i32 [ %inc38, %for.body35 ], [ 0, %for.body35.preheader ] %putchar95 = call i32 @putchar(i32 82) %inc38 = add nuw i32 %i31.0109, 1 %exitcond119.not = icmp eq i32 %inc38, %5 br i1 %exitcond119.not, label %for.cond41.preheader, label %for.body35, !llvm.loop !18 for.cond.cleanup44: ; preds = %for.body45, %for.cond41.preheader %putchar88 = call i32 @putchar(i32 76) %putchar89 = call i32 @putchar(i32 85) br i1 %cmp33.not108, label %for.cond63.preheader, label %for.body57.preheader for.body57.preheader: ; preds = %for.cond.cleanup44 %8 = add i32 %0, 1 %9 = sub i32 %8, %1 br label %for.body57 for.body45: ; preds = %for.body45.preheader, %for.body45 %i40.0111 = phi i32 [ %inc48, %for.body45 ], [ 0, %for.body45.preheader ] %putchar94 = call i32 @putchar(i32 85) %inc48 = add nuw i32 %i40.0111, 1 %exitcond120.not = icmp eq i32 %inc48, %7 br i1 %exitcond120.not, label %for.cond.cleanup44, label %for.body45, !llvm.loop !19 for.cond63.preheader: ; preds = %for.body57, %for.cond.cleanup44 br i1 %cmp43.not110, label %for.cond.cleanup66, label %for.body67.preheader for.body67.preheader: ; preds = %for.cond63.preheader %10 = add i32 %2, 1 %11 = sub i32 %10, %3 br label %for.body67 for.body57: ; preds = %for.body57.preheader, %for.body57 %i52.0113 = phi i32 [ %inc60, %for.body57 ], [ 0, %for.body57.preheader ] %putchar93 = call i32 @putchar(i32 76) %inc60 = add nuw i32 %i52.0113, 1 %exitcond121.not = icmp eq i32 %inc60, %9 br i1 %exitcond121.not, label %for.cond63.preheader, label %for.body57, !llvm.loop !20 for.cond.cleanup66: ; preds = %for.body67, %for.cond63.preheader %putchar90 = call i32 @putchar(i32 82) %putchar91 = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ty) #11 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tx) #11 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sy) #11 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sx) #11 ret i32 0 for.body67: ; preds = %for.body67.preheader, %for.body67 %i62.0115 = phi i32 [ %inc70, %for.body67 ], [ 0, %for.body67.preheader ] %putchar92 = call i32 @putchar(i32 68) %inc70 = add nuw i32 %i62.0115, 1 %exitcond122.not = icmp eq i32 %inc70, %11 br i1 %exitcond122.not, label %for.cond.cleanup66, label %for.body67, !llvm.loop !21 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #9 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #9 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) 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 = { 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 #5 = { 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 #6 = { mustprogress nofree 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 #7 = { 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 #8 = { mustprogress nofree norecurse 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 #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #10 = { nofree nounwind } attributes #11 = { nounwind } attributes #12 = { 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 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = !{!12, !12, i64 0} !12 = !{!"double", !7, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !14} !16 = distinct !{!16, !14} !17 = distinct !{!17, !14} !18 = distinct !{!18, !14} !19 = distinct !{!19, !14} !20 = distinct !{!20, !14} !21 = distinct !{!21, !14}
#include <stdio.h> #include <stdlib.h> int main() { int s1,s2,t1,t2,x,y,i; scanf("%d %d %d %d",&s1,&s2,&t1,&t2); x = t1-s1; y = t2-s2; for(i=0;i<y;i++) printf("U"); for(i=0;i<x;i++) printf("R"); for(i=0;i<y;i++) printf("D"); for(i=0;i<x;i++) printf("L"); printf("D"); for(i=0;i<=x;i++) printf("R"); for(i=0;i<=y;i++) printf("U"); printf("L"); printf("U"); for(i=0;i<=x;i++) printf("L"); for(i=0;i<=y;i++) printf("D"); printf("R"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294260/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294260/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 [12 x i8] c"%d %d %d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s1 = alloca i32, align 4 %s2 = alloca i32, align 4 %t1 = alloca i32, align 4 %t2 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s2) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t2) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s1, ptr noundef nonnull %s2, ptr noundef nonnull %t1, ptr noundef nonnull %t2) %0 = load i32, ptr %t1, align 4, !tbaa !5 %1 = load i32, ptr %s1, align 4, !tbaa !5 %sub = sub i32 %0, %1 %2 = load i32, ptr %t2, align 4, !tbaa !5 %3 = load i32, ptr %s2, align 4, !tbaa !5 %sub1 = sub nsw i32 %2, %3 %cmp88 = icmp sgt i32 %sub1, 0 br i1 %cmp88, label %for.body, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.body, %entry %cmp490 = icmp sgt i32 %sub, 0 br i1 %cmp490, label %for.body5, label %for.cond10.preheader for.body: ; preds = %entry, %for.body %i.089 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %putchar87 = call i32 @putchar(i32 85) %inc = add nuw nsw i32 %i.089, 1 %exitcond.not = icmp eq i32 %inc, %sub1 br i1 %exitcond.not, label %for.cond3.preheader, label %for.body, !llvm.loop !9 for.cond10.preheader: ; preds = %for.body5, %for.cond3.preheader br i1 %cmp88, label %for.body12, label %for.cond17.preheader for.body5: ; preds = %for.cond3.preheader, %for.body5 %i.191 = phi i32 [ %inc8, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar86 = call i32 @putchar(i32 82) %inc8 = add nuw nsw i32 %i.191, 1 %exitcond104.not = icmp eq i32 %inc8, %sub br i1 %exitcond104.not, label %for.cond10.preheader, label %for.body5, !llvm.loop !11 for.cond17.preheader: ; preds = %for.body12, %for.cond10.preheader br i1 %cmp490, label %for.body19, label %for.end23 for.body12: ; preds = %for.cond10.preheader, %for.body12 %i.293 = phi i32 [ %inc15, %for.body12 ], [ 0, %for.cond10.preheader ] %putchar85 = call i32 @putchar(i32 68) %inc15 = add nuw nsw i32 %i.293, 1 %exitcond105.not = icmp eq i32 %inc15, %sub1 br i1 %exitcond105.not, label %for.cond17.preheader, label %for.body12, !llvm.loop !12 for.body19: ; preds = %for.cond17.preheader, %for.body19 %i.395 = phi i32 [ %inc22, %for.body19 ], [ 0, %for.cond17.preheader ] %putchar84 = call i32 @putchar(i32 76) %inc22 = add nuw nsw i32 %i.395, 1 %exitcond106.not = icmp eq i32 %inc22, %sub br i1 %exitcond106.not, label %for.end23, label %for.body19, !llvm.loop !13 for.end23: ; preds = %for.body19, %for.cond17.preheader %putchar = call i32 @putchar(i32 68) %cmp26.not96 = icmp slt i32 %sub, 0 br i1 %cmp26.not96, label %for.cond32.preheader, label %for.body27.preheader for.body27.preheader: ; preds = %for.end23 %4 = add i32 %0, 1 %5 = sub i32 %4, %1 br label %for.body27 for.cond32.preheader: ; preds = %for.body27, %for.end23 %cmp33.not98 = icmp slt i32 %sub1, 0 br i1 %cmp33.not98, label %for.end38, label %for.body34.preheader for.body34.preheader: ; preds = %for.cond32.preheader %6 = add i32 %2, 1 %7 = sub i32 %6, %3 br label %for.body34 for.body27: ; preds = %for.body27.preheader, %for.body27 %i.497 = phi i32 [ %inc30, %for.body27 ], [ 0, %for.body27.preheader ] %putchar83 = call i32 @putchar(i32 82) %inc30 = add nuw i32 %i.497, 1 %exitcond107.not = icmp eq i32 %inc30, %5 br i1 %exitcond107.not, label %for.cond32.preheader, label %for.body27, !llvm.loop !14 for.body34: ; preds = %for.body34.preheader, %for.body34 %i.599 = phi i32 [ %inc37, %for.body34 ], [ 0, %for.body34.preheader ] %putchar82 = call i32 @putchar(i32 85) %inc37 = add nuw i32 %i.599, 1 %exitcond108.not = icmp eq i32 %inc37, %7 br i1 %exitcond108.not, label %for.end38, label %for.body34, !llvm.loop !15 for.end38: ; preds = %for.body34, %for.cond32.preheader %putchar77 = call i32 @putchar(i32 76) %putchar78 = call i32 @putchar(i32 85) br i1 %cmp26.not96, label %for.cond48.preheader, label %for.body43.preheader for.body43.preheader: ; preds = %for.end38 %8 = add i32 %0, 1 %9 = sub i32 %8, %1 br label %for.body43 for.cond48.preheader: ; preds = %for.body43, %for.end38 br i1 %cmp33.not98, label %for.end54, label %for.body50.preheader for.body50.preheader: ; preds = %for.cond48.preheader %10 = add i32 %2, 1 %11 = sub i32 %10, %3 br label %for.body50 for.body43: ; preds = %for.body43.preheader, %for.body43 %i.6101 = phi i32 [ %inc46, %for.body43 ], [ 0, %for.body43.preheader ] %putchar81 = call i32 @putchar(i32 76) %inc46 = add nuw i32 %i.6101, 1 %exitcond109.not = icmp eq i32 %inc46, %9 br i1 %exitcond109.not, label %for.cond48.preheader, label %for.body43, !llvm.loop !16 for.body50: ; preds = %for.body50.preheader, %for.body50 %i.7103 = phi i32 [ %inc53, %for.body50 ], [ 0, %for.body50.preheader ] %putchar80 = call i32 @putchar(i32 68) %inc53 = add nuw i32 %i.7103, 1 %exitcond110.not = icmp eq i32 %inc53, %11 br i1 %exitcond110.not, label %for.end54, label %for.body50, !llvm.loop !17 for.end54: ; preds = %for.body50, %for.cond48.preheader %putchar79 = call i32 @putchar(i32 82) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t1) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s1) #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} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10}
#include<stdio.h> int main(void){ int n; scanf("%d",&n); int k; scanf("%d",&k); int d[n]; int i; int a=0; for(i=0;i<n;i++){ scanf("%d",&d[i]);if(d[i]>=k){a=a+1;}} printf("%d",a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294303/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294303/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: %n = alloca i32, align 4 %k = alloca i32, align 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 %n) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %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 %cmp11 = icmp sgt i32 %3, 0 br i1 %cmp11, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %a.013 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %5 = load i32, ptr %k, align 4, !tbaa !5 %cmp5.not = icmp sge i32 %4, %5 %add = zext i1 %cmp5.not to i32 %spec.select = add nuw nsw i32 %a.013, %add %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 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %a.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %a.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) 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 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 memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int n,k; scanf("%d%d",&n,&k); int a[n],sum=0; for(int i=0;i<n;i++){ scanf("%d",&a[i]); if(a[i]>=k)sum++; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294347/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294347/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: %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 %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 %cmp11 = icmp sgt i32 %3, 0 br i1 %cmp11, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) 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 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.012 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %5 = load i32, ptr %k, align 4, !tbaa !5 %cmp4.not = icmp sge i32 %4, %5 %inc = zext i1 %cmp4.not to i32 %spec.select = add nuw nsw i32 %sum.012, %inc %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 = icmp slt i64 %indvars.iv.next, %7 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: 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 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int N,K,i,h,a=0; int polje[100000]; scanf("%d", &N); scanf("%d", &K); for(i=0;i<N;i++) scanf("%d", &polje[i]); for(i=0;i<N;i++) { if(polje[i]>=K) a=a+1; } printf("%d", a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294398/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: %N = alloca i32, align 4 %K = alloca i32, align 4 %polje = alloca [100000 x i32], align 16 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 400000, ptr nonnull %polje) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %K) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp19 = icmp sgt i32 %0, 0 br i1 %cmp19, label %for.body, label %for.end11 for.cond3.preheader: ; preds = %for.body %cmp421 = icmp sgt i32 %12, 0 br i1 %cmp421, label %for.body5.lr.ph, label %for.end11 for.body5.lr.ph: ; preds = %for.cond3.preheader %1 = load i32, ptr %K, align 4, !tbaa !5 %wide.trip.count = zext i32 %12 to i64 %min.iters.check = icmp ult i32 %12, 8 br i1 %min.iters.check, label %for.body5.preheader, label %vector.ph vector.ph: ; preds = %for.body5.lr.ph %n.vec = and i64 %wide.trip.count, 4294967288 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %1, 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.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ] %vec.phi32 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %9, %vector.body ] %2 = getelementptr inbounds [100000 x i32], ptr %polje, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 %wide.load33 = load <4 x i32>, ptr %3, align 16, !tbaa !5 %4 = icmp sge <4 x i32> %wide.load, %broadcast.splat %5 = icmp sge <4 x i32> %wide.load33, %broadcast.splat %6 = zext <4 x i1> %4 to <4 x i32> %7 = zext <4 x i1> %5 to <4 x i32> %8 = add <4 x i32> %vec.phi, %6 %9 = add <4 x i32> %vec.phi32, %7 %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 !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %9, %8 %11 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end11, label %for.body5.preheader for.body5.preheader: ; preds = %for.body5.lr.ph, %middle.block %indvars.iv27.ph = phi i64 [ 0, %for.body5.lr.ph ], [ %n.vec, %middle.block ] %a.023.ph = phi i32 [ 0, %for.body5.lr.ph ], [ %11, %middle.block ] br label %for.body5 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %polje, 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 %12 = load i32, ptr %N, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp = icmp slt i64 %indvars.iv.next, %13 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !13 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv27 = phi i64 [ %indvars.iv.next28, %for.body5 ], [ %indvars.iv27.ph, %for.body5.preheader ] %a.023 = phi i32 [ %spec.select, %for.body5 ], [ %a.023.ph, %for.body5.preheader ] %arrayidx7 = getelementptr inbounds [100000 x i32], ptr %polje, i64 0, i64 %indvars.iv27 %14 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8.not = icmp sge i32 %14, %1 %add = zext i1 %cmp8.not to i32 %spec.select = add nuw nsw i32 %a.023, %add %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1 %exitcond.not = icmp eq i64 %indvars.iv.next28, %wide.trip.count br i1 %exitcond.not, label %for.end11, label %for.body5, !llvm.loop !14 for.end11: ; preds = %for.body5, %middle.block, %entry, %for.cond3.preheader %a.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %11, %middle.block ], [ %spec.select, %for.body5 ] %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %a.0.lcssa) call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %polje) #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: 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.vector.reduce.add.v4i32(<4 x 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 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
#include<stdio.h> #define N 100000 int main() { int a,b,x[N],n; int sum=0; scanf("%d%d",&a,&b); for(n=0;n<a;n++) { scanf("%d",&x[n]); if(x[n]>=b) { sum++; } } printf("%d",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294440/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294440/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 %x = alloca [100000 x i32], align 16 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 400000, ptr nonnull %x) #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 %cmp11 = icmp sgt i32 %0, 0 br i1 %cmp11, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.013 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = load i32, ptr %b, align 4, !tbaa !5 %cmp4.not = icmp sge i32 %1, %2 %inc = zext i1 %cmp4.not to i32 %spec.select = add nuw nsw i32 %sum.013, %inc %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %a, 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.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %x) #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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int a,b,c[100000],i,j; scanf("%d%d",&a,&b); j=0; for(i=1;i<=a;i++){ scanf("%d",&c[i]); if(b<=c[i]){ j=j+1; } } printf("%d",j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294499/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294499/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 %c = alloca [100000 x i32], align 16 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 400000, ptr nonnull %c) #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 %cmp.not10 = icmp slt i32 %0, 1 br i1 %cmp.not10, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %j.012 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %c, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %b, align 4, !tbaa !5 %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp4.not = icmp sle i32 %1, %2 %add = zext i1 %cmp4.not to i32 %spec.select = add nuw nsw i32 %j.012, %add %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %a, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %4 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %j.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %j.0.lcssa) call void @llvm.lifetime.end.p0(i64 400000, 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int n; scanf("%d", &n); int k; scanf("%d", &k); int H[n]; int i; for(i = 0; i < n; i++){ scanf("%d", &H[i]); } int cnt = 0; for(i = 0; i < n; i++){ if(H[i] >= k){ cnt++; } } printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_294541/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_294541/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: %n = alloca i32, align 4 %k = alloca i32, align 4 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 4, ptr nonnull %k) #5 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %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 %cmp20 = icmp sgt i32 %3, 0 br i1 %cmp20, label %for.body, label %for.end12 for.cond3.preheader: ; preds = %for.body %cmp422 = icmp sgt i32 %15, 0 br i1 %cmp422, label %for.body5.lr.ph, label %for.end12 for.body5.lr.ph: ; preds = %for.cond3.preheader %4 = load i32, ptr %k, align 4, !tbaa !5 %wide.trip.count = zext i32 %15 to i64 %min.iters.check = icmp ult i32 %15, 8 br i1 %min.iters.check, label %for.body5.preheader, label %vector.ph vector.ph: ; preds = %for.body5.lr.ph %n.vec = and i64 %wide.trip.count, 4294967288 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %4, 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.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ] %vec.phi33 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ] %5 = getelementptr inbounds i32, ptr %vla, i64 %index %wide.load = load <4 x i32>, ptr %5, align 16, !tbaa !5 %6 = getelementptr inbounds i32, ptr %5, i64 4 %wide.load34 = load <4 x i32>, ptr %6, align 16, !tbaa !5 %7 = icmp sge <4 x i32> %wide.load, %broadcast.splat %8 = icmp sge <4 x i32> %wide.load34, %broadcast.splat %9 = zext <4 x i1> %7 to <4 x i32> %10 = zext <4 x i1> %8 to <4 x i32> %11 = add <4 x i32> %vec.phi, %9 %12 = add <4 x i32> %vec.phi33, %10 %index.next = add nuw i64 %index, 8 %13 = icmp eq i64 %index.next, %n.vec br i1 %13, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %12, %11 %14 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end12, label %for.body5.preheader for.body5.preheader: ; preds = %for.body5.lr.ph, %middle.block %indvars.iv28.ph = phi i64 [ 0, %for.body5.lr.ph ], [ %n.vec, %middle.block ] %cnt.024.ph = phi i32 [ 0, %for.body5.lr.ph ], [ %14, %middle.block ] br label %for.body5 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, 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 %15 = load i32, ptr %n, align 4, !tbaa !5 %16 = sext i32 %15 to i64 %cmp = icmp slt i64 %indvars.iv.next, %16 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !13 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv28 = phi i64 [ %indvars.iv.next29, %for.body5 ], [ %indvars.iv28.ph, %for.body5.preheader ] %cnt.024 = phi i32 [ %spec.select, %for.body5 ], [ %cnt.024.ph, %for.body5.preheader ] %arrayidx7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv28 %17 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8.not = icmp sge i32 %17, %4 %inc9 = zext i1 %cmp8.not to i32 %spec.select = add nuw nsw i32 %cnt.024, %inc9 %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1 %exitcond.not = icmp eq i64 %indvars.iv.next29, %wide.trip.count br i1 %exitcond.not, label %for.end12, label %for.body5, !llvm.loop !14 for.end12: ; preds = %for.body5, %middle.block, %entry, %for.cond3.preheader %cnt.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %14, %middle.block ], [ %spec.select, %for.body5 ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %cnt.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) 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: 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 memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; 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.vector.reduce.add.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, !10} !14 = distinct !{!14, !10, !12, !11}