Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <string.h> long A[1000100]; int main(){ long int i,j; long int x,y,a,b,c; long N,M,tmp; long long sum=0; scanf("%ld",&N); for(i=0;i<N-1;i++){ scanf("%ld",&tmp); A[tmp]++; } for(i=1;i<=N;i++){ printf("%ld\n",A[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128552/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 @A = dso_local local_unnamed_addr global [1000100 x i64] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i64, align 8 %tmp = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %tmp) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i64, ptr %N, align 8, !tbaa !5 %cmp16 = icmp sgt i64 %0, 1 br i1 %cmp16, label %for.body, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.body, %entry %1 = phi i64 [ %0, %entry ], [ %4, %for.body ] %cmp4.not18 = icmp slt i64 %1, 1 br i1 %cmp4.not18, label %for.end10, label %for.body5 for.body: ; preds = %entry, %for.body %i.017 = phi i64 [ %inc2, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %tmp) %2 = load i64, ptr %tmp, align 8, !tbaa !5 %arrayidx = getelementptr inbounds [1000100 x i64], ptr @A, i64 0, i64 %2 %3 = load i64, ptr %arrayidx, align 8, !tbaa !5 %inc = add nsw i64 %3, 1 store i64 %inc, ptr %arrayidx, align 8, !tbaa !5 %inc2 = add nuw nsw i64 %i.017, 1 %4 = load i64, ptr %N, align 8, !tbaa !5 %sub = add nsw i64 %4, -1 %cmp = icmp slt i64 %inc2, %sub br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.body5: ; preds = %for.cond3.preheader, %for.body5 %i.119 = phi i64 [ %inc9, %for.body5 ], [ 1, %for.cond3.preheader ] %arrayidx6 = getelementptr inbounds [1000100 x i64], ptr @A, i64 0, i64 %i.119 %5 = load i64, ptr %arrayidx6, align 8, !tbaa !5 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %5) %inc9 = add nuw nsw i64 %i.119, 1 %6 = load i64, ptr %N, align 8, !tbaa !5 %cmp4.not.not = icmp slt i64 %i.119, %6 br i1 %cmp4.not.not, label %for.body5, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.body5, %for.cond3.preheader call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %tmp) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !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 n; int i, j; int ice[10001]; int c[10]; while (1) { for (i = 0; i < 10; i++) { c[i] = 0; } scanf("%d", &n); if (n == 0) { break; } for (i = 0; i < n; i++) { scanf("%d", &ice[i]); c[ice[i]]++; } for (i = 0; i < 10; i++) { if (c[i] == 0) { puts("-"); continue; } for (j = 0; j < c[i]; j++) { printf("*"); } puts(""); } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128596/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 [2 x i8] c"-\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %ice = alloca [10001 x i32], align 16 %c = alloca [10 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 40004, ptr nonnull %ice) #5 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %c) #5 %arrayidx20.1 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 1 %arrayidx20.2 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 2 %arrayidx20.3 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 3 %arrayidx20.4 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 4 %arrayidx20.5 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 5 %arrayidx20.6 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 6 %arrayidx20.7 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 7 %arrayidx20.8 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 8 %arrayidx20.9 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %c, i8 0, i64 40, i1 false), !tbaa !5 %call63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp164 = icmp eq i32 %0, 0 br i1 %cmp164, label %while.end, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %for.inc35.9 %1 = phi i32 [ %15, %for.inc35.9 ], [ %0, %entry ] %cmp351 = icmp sgt i32 %1, 0 br i1 %cmp351, label %for.body4, label %if.then22 for.cond16.preheader: ; preds = %for.body4 %.pre = load i32, ptr %c, align 16, !tbaa !5 %cmp21 = icmp eq i32 %.pre, 0 br i1 %cmp21, label %if.then22, label %for.cond25.preheader for.body4: ; preds = %for.cond2.preheader, %for.body4 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ 0, %for.cond2.preheader ] %arrayidx6 = getelementptr inbounds [10001 x i32], ptr %ice, i64 0, i64 %indvars.iv %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %2 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %idxprom10 = sext i32 %2 to i64 %arrayidx11 = getelementptr inbounds [10 x i32], ptr %c, i64 0, i64 %idxprom10 %3 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %inc12 = add nsw i32 %3, 1 store i32 %inc12, ptr %arrayidx11, align 4, !tbaa !5 %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 %cmp3 = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp3, label %for.body4, label %for.cond16.preheader, !llvm.loop !9 for.cond25.preheader: ; preds = %for.cond16.preheader %cmp2853 = icmp sgt i32 %.pre, 0 br i1 %cmp2853, label %for.body29, label %for.end33 if.then22: ; preds = %for.cond2.preheader, %for.cond16.preheader %call23 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35 for.body29: ; preds = %for.cond25.preheader, %for.body29 %j.054 = phi i32 [ %inc32, %for.body29 ], [ 0, %for.cond25.preheader ] %putchar49 = call i32 @putchar(i32 42) %inc32 = add nuw nsw i32 %j.054, 1 %exitcond.not = icmp eq i32 %inc32, %.pre br i1 %exitcond.not, label %for.end33, label %for.body29, !llvm.loop !11 for.end33: ; preds = %for.body29, %for.cond25.preheader %putchar = call i32 @putchar(i32 10) br label %for.inc35 for.inc35: ; preds = %for.end33, %if.then22 %6 = load i32, ptr %arrayidx20.1, align 4, !tbaa !5 %cmp21.1 = icmp eq i32 %6, 0 br i1 %cmp21.1, label %if.then22.1, label %for.cond25.preheader.1 for.cond25.preheader.1: ; preds = %for.inc35 %cmp2853.1 = icmp sgt i32 %6, 0 br i1 %cmp2853.1, label %for.body29.1, label %for.end33.1 for.body29.1: ; preds = %for.cond25.preheader.1, %for.body29.1 %j.054.1 = phi i32 [ %inc32.1, %for.body29.1 ], [ 0, %for.cond25.preheader.1 ] %putchar49.1 = call i32 @putchar(i32 42) %inc32.1 = add nuw nsw i32 %j.054.1, 1 %exitcond.1.not = icmp eq i32 %inc32.1, %6 br i1 %exitcond.1.not, label %for.end33.1, label %for.body29.1, !llvm.loop !11 for.end33.1: ; preds = %for.body29.1, %for.cond25.preheader.1 %putchar.1 = call i32 @putchar(i32 10) br label %for.inc35.1 if.then22.1: ; preds = %for.inc35 %call23.1 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.1 for.inc35.1: ; preds = %if.then22.1, %for.end33.1 %7 = load i32, ptr %arrayidx20.2, align 8, !tbaa !5 %cmp21.2 = icmp eq i32 %7, 0 br i1 %cmp21.2, label %if.then22.2, label %for.cond25.preheader.2 for.cond25.preheader.2: ; preds = %for.inc35.1 %cmp2853.2 = icmp sgt i32 %7, 0 br i1 %cmp2853.2, label %for.body29.2, label %for.end33.2 for.body29.2: ; preds = %for.cond25.preheader.2, %for.body29.2 %j.054.2 = phi i32 [ %inc32.2, %for.body29.2 ], [ 0, %for.cond25.preheader.2 ] %putchar49.2 = call i32 @putchar(i32 42) %inc32.2 = add nuw nsw i32 %j.054.2, 1 %exitcond.2.not = icmp eq i32 %inc32.2, %7 br i1 %exitcond.2.not, label %for.end33.2, label %for.body29.2, !llvm.loop !11 for.end33.2: ; preds = %for.body29.2, %for.cond25.preheader.2 %putchar.2 = call i32 @putchar(i32 10) br label %for.inc35.2 if.then22.2: ; preds = %for.inc35.1 %call23.2 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.2 for.inc35.2: ; preds = %if.then22.2, %for.end33.2 %8 = load i32, ptr %arrayidx20.3, align 4, !tbaa !5 %cmp21.3 = icmp eq i32 %8, 0 br i1 %cmp21.3, label %if.then22.3, label %for.cond25.preheader.3 for.cond25.preheader.3: ; preds = %for.inc35.2 %cmp2853.3 = icmp sgt i32 %8, 0 br i1 %cmp2853.3, label %for.body29.3, label %for.end33.3 for.body29.3: ; preds = %for.cond25.preheader.3, %for.body29.3 %j.054.3 = phi i32 [ %inc32.3, %for.body29.3 ], [ 0, %for.cond25.preheader.3 ] %putchar49.3 = call i32 @putchar(i32 42) %inc32.3 = add nuw nsw i32 %j.054.3, 1 %exitcond.3.not = icmp eq i32 %inc32.3, %8 br i1 %exitcond.3.not, label %for.end33.3, label %for.body29.3, !llvm.loop !11 for.end33.3: ; preds = %for.body29.3, %for.cond25.preheader.3 %putchar.3 = call i32 @putchar(i32 10) br label %for.inc35.3 if.then22.3: ; preds = %for.inc35.2 %call23.3 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.3 for.inc35.3: ; preds = %if.then22.3, %for.end33.3 %9 = load i32, ptr %arrayidx20.4, align 16, !tbaa !5 %cmp21.4 = icmp eq i32 %9, 0 br i1 %cmp21.4, label %if.then22.4, label %for.cond25.preheader.4 for.cond25.preheader.4: ; preds = %for.inc35.3 %cmp2853.4 = icmp sgt i32 %9, 0 br i1 %cmp2853.4, label %for.body29.4, label %for.end33.4 for.body29.4: ; preds = %for.cond25.preheader.4, %for.body29.4 %j.054.4 = phi i32 [ %inc32.4, %for.body29.4 ], [ 0, %for.cond25.preheader.4 ] %putchar49.4 = call i32 @putchar(i32 42) %inc32.4 = add nuw nsw i32 %j.054.4, 1 %exitcond.4.not = icmp eq i32 %inc32.4, %9 br i1 %exitcond.4.not, label %for.end33.4, label %for.body29.4, !llvm.loop !11 for.end33.4: ; preds = %for.body29.4, %for.cond25.preheader.4 %putchar.4 = call i32 @putchar(i32 10) br label %for.inc35.4 if.then22.4: ; preds = %for.inc35.3 %call23.4 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.4 for.inc35.4: ; preds = %if.then22.4, %for.end33.4 %10 = load i32, ptr %arrayidx20.5, align 4, !tbaa !5 %cmp21.5 = icmp eq i32 %10, 0 br i1 %cmp21.5, label %if.then22.5, label %for.cond25.preheader.5 for.cond25.preheader.5: ; preds = %for.inc35.4 %cmp2853.5 = icmp sgt i32 %10, 0 br i1 %cmp2853.5, label %for.body29.5, label %for.end33.5 for.body29.5: ; preds = %for.cond25.preheader.5, %for.body29.5 %j.054.5 = phi i32 [ %inc32.5, %for.body29.5 ], [ 0, %for.cond25.preheader.5 ] %putchar49.5 = call i32 @putchar(i32 42) %inc32.5 = add nuw nsw i32 %j.054.5, 1 %exitcond.5.not = icmp eq i32 %inc32.5, %10 br i1 %exitcond.5.not, label %for.end33.5, label %for.body29.5, !llvm.loop !11 for.end33.5: ; preds = %for.body29.5, %for.cond25.preheader.5 %putchar.5 = call i32 @putchar(i32 10) br label %for.inc35.5 if.then22.5: ; preds = %for.inc35.4 %call23.5 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.5 for.inc35.5: ; preds = %if.then22.5, %for.end33.5 %11 = load i32, ptr %arrayidx20.6, align 8, !tbaa !5 %cmp21.6 = icmp eq i32 %11, 0 br i1 %cmp21.6, label %if.then22.6, label %for.cond25.preheader.6 for.cond25.preheader.6: ; preds = %for.inc35.5 %cmp2853.6 = icmp sgt i32 %11, 0 br i1 %cmp2853.6, label %for.body29.6, label %for.end33.6 for.body29.6: ; preds = %for.cond25.preheader.6, %for.body29.6 %j.054.6 = phi i32 [ %inc32.6, %for.body29.6 ], [ 0, %for.cond25.preheader.6 ] %putchar49.6 = call i32 @putchar(i32 42) %inc32.6 = add nuw nsw i32 %j.054.6, 1 %exitcond.6.not = icmp eq i32 %inc32.6, %11 br i1 %exitcond.6.not, label %for.end33.6, label %for.body29.6, !llvm.loop !11 for.end33.6: ; preds = %for.body29.6, %for.cond25.preheader.6 %putchar.6 = call i32 @putchar(i32 10) br label %for.inc35.6 if.then22.6: ; preds = %for.inc35.5 %call23.6 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.6 for.inc35.6: ; preds = %if.then22.6, %for.end33.6 %12 = load i32, ptr %arrayidx20.7, align 4, !tbaa !5 %cmp21.7 = icmp eq i32 %12, 0 br i1 %cmp21.7, label %if.then22.7, label %for.cond25.preheader.7 for.cond25.preheader.7: ; preds = %for.inc35.6 %cmp2853.7 = icmp sgt i32 %12, 0 br i1 %cmp2853.7, label %for.body29.7, label %for.end33.7 for.body29.7: ; preds = %for.cond25.preheader.7, %for.body29.7 %j.054.7 = phi i32 [ %inc32.7, %for.body29.7 ], [ 0, %for.cond25.preheader.7 ] %putchar49.7 = call i32 @putchar(i32 42) %inc32.7 = add nuw nsw i32 %j.054.7, 1 %exitcond.7.not = icmp eq i32 %inc32.7, %12 br i1 %exitcond.7.not, label %for.end33.7, label %for.body29.7, !llvm.loop !11 for.end33.7: ; preds = %for.body29.7, %for.cond25.preheader.7 %putchar.7 = call i32 @putchar(i32 10) br label %for.inc35.7 if.then22.7: ; preds = %for.inc35.6 %call23.7 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.7 for.inc35.7: ; preds = %if.then22.7, %for.end33.7 %13 = load i32, ptr %arrayidx20.8, align 16, !tbaa !5 %cmp21.8 = icmp eq i32 %13, 0 br i1 %cmp21.8, label %if.then22.8, label %for.cond25.preheader.8 for.cond25.preheader.8: ; preds = %for.inc35.7 %cmp2853.8 = icmp sgt i32 %13, 0 br i1 %cmp2853.8, label %for.body29.8, label %for.end33.8 for.body29.8: ; preds = %for.cond25.preheader.8, %for.body29.8 %j.054.8 = phi i32 [ %inc32.8, %for.body29.8 ], [ 0, %for.cond25.preheader.8 ] %putchar49.8 = call i32 @putchar(i32 42) %inc32.8 = add nuw nsw i32 %j.054.8, 1 %exitcond.8.not = icmp eq i32 %inc32.8, %13 br i1 %exitcond.8.not, label %for.end33.8, label %for.body29.8, !llvm.loop !11 for.end33.8: ; preds = %for.body29.8, %for.cond25.preheader.8 %putchar.8 = call i32 @putchar(i32 10) br label %for.inc35.8 if.then22.8: ; preds = %for.inc35.7 %call23.8 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.8 for.inc35.8: ; preds = %if.then22.8, %for.end33.8 %14 = load i32, ptr %arrayidx20.9, align 4, !tbaa !5 %cmp21.9 = icmp eq i32 %14, 0 br i1 %cmp21.9, label %if.then22.9, label %for.cond25.preheader.9 for.cond25.preheader.9: ; preds = %for.inc35.8 %cmp2853.9 = icmp sgt i32 %14, 0 br i1 %cmp2853.9, label %for.body29.9, label %for.end33.9 for.body29.9: ; preds = %for.cond25.preheader.9, %for.body29.9 %j.054.9 = phi i32 [ %inc32.9, %for.body29.9 ], [ 0, %for.cond25.preheader.9 ] %putchar49.9 = call i32 @putchar(i32 42) %inc32.9 = add nuw nsw i32 %j.054.9, 1 %exitcond.9.not = icmp eq i32 %inc32.9, %14 br i1 %exitcond.9.not, label %for.end33.9, label %for.body29.9, !llvm.loop !11 for.end33.9: ; preds = %for.body29.9, %for.cond25.preheader.9 %putchar.9 = call i32 @putchar(i32 10) br label %for.inc35.9 if.then22.9: ; preds = %for.inc35.8 %call23.9 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %for.inc35.9 for.inc35.9: ; preds = %if.then22.9, %for.end33.9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %c, i8 0, i64 40, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %15 = load i32, ptr %n, align 4, !tbaa !5 %cmp1 = icmp eq i32 %15, 0 br i1 %cmp1, label %while.end, label %for.cond2.preheader, !llvm.loop !12 while.end: ; preds = %for.inc35.9, %entry call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 40004, ptr nonnull %ice) #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 @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 ; 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}
#include <stdio.h> int main(void) { int count[10]; int i,j,num; int now; while(1) { scanf("%d",&num); if(num==0)break; for(i=0;i<10;i++)count[i]=0; for(i=0;i<num;i++) { scanf("%d",&now); count[now]++; } for(i=0;i<10;i++) { for(j=0;j<count[i];j++)putchar('*'); if(count[i]==0)putchar('-'); putchar('\n'); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128660/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 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %count = alloca [10 x i32], align 16 %num = alloca i32, align 4 %now = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %count) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %now) #4 %call51 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %0 = load i32, ptr %num, align 4, !tbaa !5 %cmp52 = icmp eq i32 %0, 0 br i1 %cmp52, label %while.end, label %for.cond.preheader.preheader for.cond.preheader.preheader: ; preds = %entry %arrayidx17.1 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 1 %arrayidx17.2 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 2 %arrayidx17.3 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 3 %arrayidx17.4 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 4 %arrayidx17.5 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 5 %arrayidx17.6 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 6 %arrayidx17.7 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 7 %arrayidx17.8 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 8 %arrayidx17.9 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 9 br label %for.cond.preheader for.cond.preheader: ; preds = %for.cond.preheader.preheader, %if.end29.9 %1 = phi i32 [ %0, %for.cond.preheader.preheader ], [ %44, %if.end29.9 ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40) %count, i8 0, i64 40, i1 false), !tbaa !5 %cmp346 = icmp sgt i32 %1, 0 br i1 %cmp346, label %for.body4, label %if.then27 for.cond12.preheader: ; preds = %for.body4 %.pre = load i32, ptr %count, align 16, !tbaa !5 %cmp1848 = icmp sgt i32 %.pre, 0 br i1 %cmp1848, label %for.body19, label %for.end23 for.body4: ; preds = %for.cond.preheader, %for.body4 %i.147 = phi i32 [ %inc10, %for.body4 ], [ 0, %for.cond.preheader ] %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %now) %2 = load i32, ptr %now, align 4, !tbaa !5 %idxprom6 = sext i32 %2 to i64 %arrayidx7 = getelementptr inbounds [10 x i32], ptr %count, i64 0, i64 %idxprom6 %3 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %inc8 = add nsw i32 %3, 1 store i32 %inc8, ptr %arrayidx7, align 4, !tbaa !5 %inc10 = add nuw nsw i32 %i.147, 1 %4 = load i32, ptr %num, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc10, %4 br i1 %cmp3, label %for.body4, label %for.cond12.preheader, !llvm.loop !9 for.body19: ; preds = %for.cond12.preheader, %for.body19 %j.049 = phi i32 [ %inc22, %for.body19 ], [ 0, %for.cond12.preheader ] %5 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i = call i32 @putc(i32 noundef 42, ptr noundef %5) %inc22 = add nuw nsw i32 %j.049, 1 %exitcond.not = icmp eq i32 %inc22, %.pre br i1 %exitcond.not, label %for.end23, label %for.body19, !llvm.loop !13 for.end23: ; preds = %for.body19, %for.cond12.preheader %cmp26 = icmp eq i32 %.pre, 0 br i1 %cmp26, label %if.then27, label %if.end29 if.then27: ; preds = %for.cond.preheader, %for.end23 %6 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43 = call i32 @putc(i32 noundef 45, ptr noundef %6) br label %if.end29 if.end29: ; preds = %if.then27, %for.end23 %7 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44 = call i32 @putc(i32 noundef 10, ptr noundef %7) %8 = load i32, ptr %arrayidx17.1, align 4, !tbaa !5 %cmp1848.1 = icmp sgt i32 %8, 0 br i1 %cmp1848.1, label %for.body19.1, label %for.end23.1 for.body19.1: ; preds = %if.end29, %for.body19.1 %j.049.1 = phi i32 [ %inc22.1, %for.body19.1 ], [ 0, %if.end29 ] %9 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.1 = call i32 @putc(i32 noundef 42, ptr noundef %9) %inc22.1 = add nuw nsw i32 %j.049.1, 1 %exitcond.1.not = icmp eq i32 %inc22.1, %8 br i1 %exitcond.1.not, label %for.end23.1, label %for.body19.1, !llvm.loop !13 for.end23.1: ; preds = %for.body19.1, %if.end29 %cmp26.1 = icmp eq i32 %8, 0 br i1 %cmp26.1, label %if.then27.1, label %if.end29.1 if.then27.1: ; preds = %for.end23.1 %10 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.1 = call i32 @putc(i32 noundef 45, ptr noundef %10) br label %if.end29.1 if.end29.1: ; preds = %if.then27.1, %for.end23.1 %11 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.1 = call i32 @putc(i32 noundef 10, ptr noundef %11) %12 = load i32, ptr %arrayidx17.2, align 8, !tbaa !5 %cmp1848.2 = icmp sgt i32 %12, 0 br i1 %cmp1848.2, label %for.body19.2, label %for.end23.2 for.body19.2: ; preds = %if.end29.1, %for.body19.2 %j.049.2 = phi i32 [ %inc22.2, %for.body19.2 ], [ 0, %if.end29.1 ] %13 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.2 = call i32 @putc(i32 noundef 42, ptr noundef %13) %inc22.2 = add nuw nsw i32 %j.049.2, 1 %exitcond.2.not = icmp eq i32 %inc22.2, %12 br i1 %exitcond.2.not, label %for.end23.2, label %for.body19.2, !llvm.loop !13 for.end23.2: ; preds = %for.body19.2, %if.end29.1 %cmp26.2 = icmp eq i32 %12, 0 br i1 %cmp26.2, label %if.then27.2, label %if.end29.2 if.then27.2: ; preds = %for.end23.2 %14 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.2 = call i32 @putc(i32 noundef 45, ptr noundef %14) br label %if.end29.2 if.end29.2: ; preds = %if.then27.2, %for.end23.2 %15 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.2 = call i32 @putc(i32 noundef 10, ptr noundef %15) %16 = load i32, ptr %arrayidx17.3, align 4, !tbaa !5 %cmp1848.3 = icmp sgt i32 %16, 0 br i1 %cmp1848.3, label %for.body19.3, label %for.end23.3 for.body19.3: ; preds = %if.end29.2, %for.body19.3 %j.049.3 = phi i32 [ %inc22.3, %for.body19.3 ], [ 0, %if.end29.2 ] %17 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.3 = call i32 @putc(i32 noundef 42, ptr noundef %17) %inc22.3 = add nuw nsw i32 %j.049.3, 1 %exitcond.3.not = icmp eq i32 %inc22.3, %16 br i1 %exitcond.3.not, label %for.end23.3, label %for.body19.3, !llvm.loop !13 for.end23.3: ; preds = %for.body19.3, %if.end29.2 %cmp26.3 = icmp eq i32 %16, 0 br i1 %cmp26.3, label %if.then27.3, label %if.end29.3 if.then27.3: ; preds = %for.end23.3 %18 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.3 = call i32 @putc(i32 noundef 45, ptr noundef %18) br label %if.end29.3 if.end29.3: ; preds = %if.then27.3, %for.end23.3 %19 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.3 = call i32 @putc(i32 noundef 10, ptr noundef %19) %20 = load i32, ptr %arrayidx17.4, align 16, !tbaa !5 %cmp1848.4 = icmp sgt i32 %20, 0 br i1 %cmp1848.4, label %for.body19.4, label %for.end23.4 for.body19.4: ; preds = %if.end29.3, %for.body19.4 %j.049.4 = phi i32 [ %inc22.4, %for.body19.4 ], [ 0, %if.end29.3 ] %21 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.4 = call i32 @putc(i32 noundef 42, ptr noundef %21) %inc22.4 = add nuw nsw i32 %j.049.4, 1 %exitcond.4.not = icmp eq i32 %inc22.4, %20 br i1 %exitcond.4.not, label %for.end23.4, label %for.body19.4, !llvm.loop !13 for.end23.4: ; preds = %for.body19.4, %if.end29.3 %cmp26.4 = icmp eq i32 %20, 0 br i1 %cmp26.4, label %if.then27.4, label %if.end29.4 if.then27.4: ; preds = %for.end23.4 %22 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.4 = call i32 @putc(i32 noundef 45, ptr noundef %22) br label %if.end29.4 if.end29.4: ; preds = %if.then27.4, %for.end23.4 %23 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.4 = call i32 @putc(i32 noundef 10, ptr noundef %23) %24 = load i32, ptr %arrayidx17.5, align 4, !tbaa !5 %cmp1848.5 = icmp sgt i32 %24, 0 br i1 %cmp1848.5, label %for.body19.5, label %for.end23.5 for.body19.5: ; preds = %if.end29.4, %for.body19.5 %j.049.5 = phi i32 [ %inc22.5, %for.body19.5 ], [ 0, %if.end29.4 ] %25 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.5 = call i32 @putc(i32 noundef 42, ptr noundef %25) %inc22.5 = add nuw nsw i32 %j.049.5, 1 %exitcond.5.not = icmp eq i32 %inc22.5, %24 br i1 %exitcond.5.not, label %for.end23.5, label %for.body19.5, !llvm.loop !13 for.end23.5: ; preds = %for.body19.5, %if.end29.4 %cmp26.5 = icmp eq i32 %24, 0 br i1 %cmp26.5, label %if.then27.5, label %if.end29.5 if.then27.5: ; preds = %for.end23.5 %26 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.5 = call i32 @putc(i32 noundef 45, ptr noundef %26) br label %if.end29.5 if.end29.5: ; preds = %if.then27.5, %for.end23.5 %27 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.5 = call i32 @putc(i32 noundef 10, ptr noundef %27) %28 = load i32, ptr %arrayidx17.6, align 8, !tbaa !5 %cmp1848.6 = icmp sgt i32 %28, 0 br i1 %cmp1848.6, label %for.body19.6, label %for.end23.6 for.body19.6: ; preds = %if.end29.5, %for.body19.6 %j.049.6 = phi i32 [ %inc22.6, %for.body19.6 ], [ 0, %if.end29.5 ] %29 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.6 = call i32 @putc(i32 noundef 42, ptr noundef %29) %inc22.6 = add nuw nsw i32 %j.049.6, 1 %exitcond.6.not = icmp eq i32 %inc22.6, %28 br i1 %exitcond.6.not, label %for.end23.6, label %for.body19.6, !llvm.loop !13 for.end23.6: ; preds = %for.body19.6, %if.end29.5 %cmp26.6 = icmp eq i32 %28, 0 br i1 %cmp26.6, label %if.then27.6, label %if.end29.6 if.then27.6: ; preds = %for.end23.6 %30 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.6 = call i32 @putc(i32 noundef 45, ptr noundef %30) br label %if.end29.6 if.end29.6: ; preds = %if.then27.6, %for.end23.6 %31 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.6 = call i32 @putc(i32 noundef 10, ptr noundef %31) %32 = load i32, ptr %arrayidx17.7, align 4, !tbaa !5 %cmp1848.7 = icmp sgt i32 %32, 0 br i1 %cmp1848.7, label %for.body19.7, label %for.end23.7 for.body19.7: ; preds = %if.end29.6, %for.body19.7 %j.049.7 = phi i32 [ %inc22.7, %for.body19.7 ], [ 0, %if.end29.6 ] %33 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.7 = call i32 @putc(i32 noundef 42, ptr noundef %33) %inc22.7 = add nuw nsw i32 %j.049.7, 1 %exitcond.7.not = icmp eq i32 %inc22.7, %32 br i1 %exitcond.7.not, label %for.end23.7, label %for.body19.7, !llvm.loop !13 for.end23.7: ; preds = %for.body19.7, %if.end29.6 %cmp26.7 = icmp eq i32 %32, 0 br i1 %cmp26.7, label %if.then27.7, label %if.end29.7 if.then27.7: ; preds = %for.end23.7 %34 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.7 = call i32 @putc(i32 noundef 45, ptr noundef %34) br label %if.end29.7 if.end29.7: ; preds = %if.then27.7, %for.end23.7 %35 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.7 = call i32 @putc(i32 noundef 10, ptr noundef %35) %36 = load i32, ptr %arrayidx17.8, align 16, !tbaa !5 %cmp1848.8 = icmp sgt i32 %36, 0 br i1 %cmp1848.8, label %for.body19.8, label %for.end23.8 for.body19.8: ; preds = %if.end29.7, %for.body19.8 %j.049.8 = phi i32 [ %inc22.8, %for.body19.8 ], [ 0, %if.end29.7 ] %37 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.8 = call i32 @putc(i32 noundef 42, ptr noundef %37) %inc22.8 = add nuw nsw i32 %j.049.8, 1 %exitcond.8.not = icmp eq i32 %inc22.8, %36 br i1 %exitcond.8.not, label %for.end23.8, label %for.body19.8, !llvm.loop !13 for.end23.8: ; preds = %for.body19.8, %if.end29.7 %cmp26.8 = icmp eq i32 %36, 0 br i1 %cmp26.8, label %if.then27.8, label %if.end29.8 if.then27.8: ; preds = %for.end23.8 %38 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.8 = call i32 @putc(i32 noundef 45, ptr noundef %38) br label %if.end29.8 if.end29.8: ; preds = %if.then27.8, %for.end23.8 %39 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.8 = call i32 @putc(i32 noundef 10, ptr noundef %39) %40 = load i32, ptr %arrayidx17.9, align 4, !tbaa !5 %cmp1848.9 = icmp sgt i32 %40, 0 br i1 %cmp1848.9, label %for.body19.9, label %for.end23.9 for.body19.9: ; preds = %if.end29.8, %for.body19.9 %j.049.9 = phi i32 [ %inc22.9, %for.body19.9 ], [ 0, %if.end29.8 ] %41 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i.9 = call i32 @putc(i32 noundef 42, ptr noundef %41) %inc22.9 = add nuw nsw i32 %j.049.9, 1 %exitcond.9.not = icmp eq i32 %inc22.9, %40 br i1 %exitcond.9.not, label %for.end23.9, label %for.body19.9, !llvm.loop !13 for.end23.9: ; preds = %for.body19.9, %if.end29.8 %cmp26.9 = icmp eq i32 %40, 0 br i1 %cmp26.9, label %if.then27.9, label %if.end29.9 if.then27.9: ; preds = %for.end23.9 %42 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i43.9 = call i32 @putc(i32 noundef 45, ptr noundef %42) br label %if.end29.9 if.end29.9: ; preds = %if.then27.9, %for.end23.9 %43 = load ptr, ptr @stdout, align 8, !tbaa !11 %call.i44.9 = call i32 @putc(i32 noundef 10, ptr noundef %43) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %44 = load i32, ptr %num, align 4, !tbaa !5 %cmp = icmp eq i32 %44, 0 br i1 %cmp, label %while.end, label %for.cond.preheader while.end: ; preds = %if.end29.9, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %now) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %count) #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 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree 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 = !{!12, !12, i64 0} !12 = !{!"any pointer", !7, i64 0} !13 = distinct !{!13, !10}
#include <stdio.h> int main(void) { int j, N, n, i; scanf("%d", &N); j = 1; while (j <= N){ scanf("%d", &n); printf("Case %d:\n", j); for (i = 0; i < 10; i++){ n = ((n * n) % 1000000) / 100; printf("%d\n", n); } j++; } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128703/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"Case %d:\0A\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 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %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 %cmp.not10 = icmp slt i32 %0, 1 br i1 %cmp.not10, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %j.011 = phi i32 [ %inc5, %while.body ], [ 1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %j.011) %1 = load i32, ptr %n, align 4, !tbaa !5 %mul = mul nsw i32 %1, %1 %rem = urem i32 %mul, 1000000 %div = udiv i32 %rem, 100 store i32 %div, ptr %n, align 4, !tbaa !5 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div) %2 = load i32, ptr %n, align 4, !tbaa !5 %mul.1 = mul nsw i32 %2, %2 %rem.1 = urem i32 %mul.1, 1000000 %div.1 = udiv i32 %rem.1, 100 store i32 %div.1, ptr %n, align 4, !tbaa !5 %call4.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.1) %3 = load i32, ptr %n, align 4, !tbaa !5 %mul.2 = mul nsw i32 %3, %3 %rem.2 = urem i32 %mul.2, 1000000 %div.2 = udiv i32 %rem.2, 100 store i32 %div.2, ptr %n, align 4, !tbaa !5 %call4.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.2) %4 = load i32, ptr %n, align 4, !tbaa !5 %mul.3 = mul nsw i32 %4, %4 %rem.3 = urem i32 %mul.3, 1000000 %div.3 = udiv i32 %rem.3, 100 store i32 %div.3, ptr %n, align 4, !tbaa !5 %call4.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.3) %5 = load i32, ptr %n, align 4, !tbaa !5 %mul.4 = mul nsw i32 %5, %5 %rem.4 = urem i32 %mul.4, 1000000 %div.4 = udiv i32 %rem.4, 100 store i32 %div.4, ptr %n, align 4, !tbaa !5 %call4.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.4) %6 = load i32, ptr %n, align 4, !tbaa !5 %mul.5 = mul nsw i32 %6, %6 %rem.5 = urem i32 %mul.5, 1000000 %div.5 = udiv i32 %rem.5, 100 store i32 %div.5, ptr %n, align 4, !tbaa !5 %call4.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.5) %7 = load i32, ptr %n, align 4, !tbaa !5 %mul.6 = mul nsw i32 %7, %7 %rem.6 = urem i32 %mul.6, 1000000 %div.6 = udiv i32 %rem.6, 100 store i32 %div.6, ptr %n, align 4, !tbaa !5 %call4.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.6) %8 = load i32, ptr %n, align 4, !tbaa !5 %mul.7 = mul nsw i32 %8, %8 %rem.7 = urem i32 %mul.7, 1000000 %div.7 = udiv i32 %rem.7, 100 store i32 %div.7, ptr %n, align 4, !tbaa !5 %call4.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.7) %9 = load i32, ptr %n, align 4, !tbaa !5 %mul.8 = mul nsw i32 %9, %9 %rem.8 = urem i32 %mul.8, 1000000 %div.8 = udiv i32 %rem.8, 100 store i32 %div.8, ptr %n, align 4, !tbaa !5 %call4.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.8) %10 = load i32, ptr %n, align 4, !tbaa !5 %mul.9 = mul nsw i32 %10, %10 %rem.9 = urem i32 %mul.9, 1000000 %div.9 = udiv i32 %rem.9, 100 store i32 %div.9, ptr %n, align 4, !tbaa !5 %call4.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div.9) %inc5 = add nuw nsw i32 %j.011, 1 %11 = load i32, ptr %N, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %j.011, %11 br i1 %cmp.not.not, label %while.body, label %while.end, !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 %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"}
#include <stdio.h> int main(void) { int n, i, j; int seed; scanf("%d", &n); for (i = 0; i < n; i++){ scanf("%d", &seed); printf("Case %d:\n", i + 1); for (j = 0; j < 10; j++){ seed *= seed; seed = (seed / 100) % 10000; printf("%d\n", seed); } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128754/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"Case %d:\0A\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 %seed = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %seed) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp14 = icmp sgt i32 %0, 0 br i1 %cmp14, label %for.body, label %for.end9 for.body: ; preds = %entry, %for.body %i.015 = phi i32 [ %add, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %seed) %add = add nuw nsw i32 %i.015, 1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) %1 = load i32, ptr %seed, align 4, !tbaa !5 %mul = mul nsw i32 %1, %1 %div = udiv i32 %mul, 100 %rem = urem i32 %div, 10000 store i32 %rem, ptr %seed, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem) %2 = load i32, ptr %seed, align 4, !tbaa !5 %mul.1 = mul nsw i32 %2, %2 %div.1 = udiv i32 %mul.1, 100 %rem.1 = urem i32 %div.1, 10000 store i32 %rem.1, ptr %seed, align 4, !tbaa !5 %call6.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.1) %3 = load i32, ptr %seed, align 4, !tbaa !5 %mul.2 = mul nsw i32 %3, %3 %div.2 = udiv i32 %mul.2, 100 %rem.2 = urem i32 %div.2, 10000 store i32 %rem.2, ptr %seed, align 4, !tbaa !5 %call6.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.2) %4 = load i32, ptr %seed, align 4, !tbaa !5 %mul.3 = mul nsw i32 %4, %4 %div.3 = udiv i32 %mul.3, 100 %rem.3 = urem i32 %div.3, 10000 store i32 %rem.3, ptr %seed, align 4, !tbaa !5 %call6.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.3) %5 = load i32, ptr %seed, align 4, !tbaa !5 %mul.4 = mul nsw i32 %5, %5 %div.4 = udiv i32 %mul.4, 100 %rem.4 = urem i32 %div.4, 10000 store i32 %rem.4, ptr %seed, align 4, !tbaa !5 %call6.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.4) %6 = load i32, ptr %seed, align 4, !tbaa !5 %mul.5 = mul nsw i32 %6, %6 %div.5 = udiv i32 %mul.5, 100 %rem.5 = urem i32 %div.5, 10000 store i32 %rem.5, ptr %seed, align 4, !tbaa !5 %call6.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.5) %7 = load i32, ptr %seed, align 4, !tbaa !5 %mul.6 = mul nsw i32 %7, %7 %div.6 = udiv i32 %mul.6, 100 %rem.6 = urem i32 %div.6, 10000 store i32 %rem.6, ptr %seed, align 4, !tbaa !5 %call6.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.6) %8 = load i32, ptr %seed, align 4, !tbaa !5 %mul.7 = mul nsw i32 %8, %8 %div.7 = udiv i32 %mul.7, 100 %rem.7 = urem i32 %div.7, 10000 store i32 %rem.7, ptr %seed, align 4, !tbaa !5 %call6.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.7) %9 = load i32, ptr %seed, align 4, !tbaa !5 %mul.8 = mul nsw i32 %9, %9 %div.8 = udiv i32 %mul.8, 100 %rem.8 = urem i32 %div.8, 10000 store i32 %rem.8, ptr %seed, align 4, !tbaa !5 %call6.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.8) %10 = load i32, ptr %seed, align 4, !tbaa !5 %mul.9 = mul nsw i32 %10, %10 %div.9 = udiv i32 %mul.9, 100 %rem.9 = urem i32 %div.9, 10000 store i32 %rem.9, ptr %seed, align 4, !tbaa !5 %call6.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %rem.9) %11 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %add, %11 br i1 %cmp, label %for.body, label %for.end9, !llvm.loop !9 for.end9: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %seed) #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"}
#include <stdio.h> int a,b; int main(void) { scanf("%d%d",&a,&b); int c=a+b; if(c<10) printf("%d",c); else printf("error"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128798/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 @a = dso_local global i32 0, align 4 @b = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"error\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 @a, ptr noundef nonnull @b) %0 = load i32, ptr @a, align 4, !tbaa !5 %1 = load i32, ptr @b, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %cmp = icmp slt i32 %add, 10 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) br label %if.end if.else: ; preds = %entry %call2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end if.end: ; preds = %if.else, %if.then 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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int A,B; scanf("%d%d",&A,&B); if(A+B>=10) printf("error\n"); else printf("%d\n",A+B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128840/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [6 x i8] c"error\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 %add = add nsw i32 %1, %0 %cmp = icmp sgt i32 %add, 9 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.else: ; preds = %entry %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add) br label %if.end if.end: ; preds = %if.else, %if.then 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int A, B; scanf("%d %d", &A, &B); if(A+B < 10) printf("%d\n", A+B); else printf("error\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128884/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 @str = private unnamed_addr constant [6 x i8] c"error\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 %add = add nsw i32 %1, %0 %cmp = icmp slt i32 %add, 10 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) br label %if.end if.else: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %if.then 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int a,b,sum=0; scanf("%d %d",&a,&b); sum+=(a+b); if(sum>=10) { printf("error\n"); } else { printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128927/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.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [6 x i8] c"error\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 %add = add nsw i32 %1, %0 %cmp = icmp sgt i32 %add, 9 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.else: ; preds = %entry %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add) br label %if.end if.end: ; preds = %if.else, %if.then 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int a, b; scanf("%d %d", &a, &b); if (a + b < 10) printf("%d\n", a + b); else puts("error"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_128970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_128970/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 @.str.2 = private unnamed_addr constant [6 x i8] c"error\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 %add = add nsw i32 %1, %0 %cmp = icmp slt i32 %add, 10 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) br label %if.end if.else: ; preds = %entry %call3 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end if.end: ; preds = %if.else, %if.then 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: 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(void){ int A; int B; int c; scanf("%d %d " , &A, &B); c = B + A; if(c >= 10){ printf("error");} else{ printf("%d",c);} }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129012/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129012/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 \00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"error\00", align 1 @.str.2 = 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 %add = add nsw i32 %1, %0 %cmp = icmp sgt i32 %add, 9 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) br label %if.end if.else: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add) br label %if.end if.end: ; preds = %if.else, %if.then 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; scanf("%d",&A); scanf("%d",&B); if(A+B<10) printf("%d\n",A+B); else printf("error\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129056/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129056/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 = private unnamed_addr constant [6 x i8] c"error\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 %add = add nsw i32 %1, %0 %cmp = icmp slt i32 %add, 10 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) br label %if.end if.else: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %if.then 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 @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) { long long x; int A[11],i=0,j=0,pro=1,max=-1,k; scanf("%lld",&x); while(x>0) { pro*=x%10; A[i++]=x%10; x/=10; } if(pro>max) max=pro; pro=1; if(i>1) { for(j=0; j<i-1; j++) { if(A[j]!=9) { A[j]=9; if(A[j+1]!=0) A[j+1]-=1; else { while(A[j+1]==0 && j+1<i) { A[j+1]=9; j++; } A[j+1]-=1; } x=i; while(A[x-1]==0) x--; for(k=0; k<x; k++) pro*=A[k]; if(pro>max) max=pro; pro=1; } } } printf("%d\n",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1291/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1291/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 %A = alloca [11 x i32], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 44, ptr nonnull %A) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %.pr = load i64, ptr %x, align 8, !tbaa !5 %cmp100 = icmp sgt i64 %.pr, 0 br i1 %cmp100, label %while.body, label %if.end72 while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %pro.0102 = phi i32 [ %conv1, %while.body ], [ 1, %entry ] %0 = phi i64 [ %div99, %while.body ], [ %.pr, %entry ] %rem = urem i64 %0, 10 %1 = trunc i64 %rem to i32 %conv1 = mul i32 %pro.0102, %1 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %indvars.iv store i32 %1, ptr %arrayidx, align 4, !tbaa !9 %div99 = udiv i64 %0, 10 %cmp.not = icmp ult i64 %0, 10 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %while.body %2 = trunc i64 %indvars.iv.next to i32 store i64 %div99, ptr %x, align 8, !tbaa !5 %spec.select = call i32 @llvm.smax.i32(i32 %conv1, i32 -1) %cmp6 = icmp ugt i32 %2, 1 br i1 %cmp6, label %for.cond.preheader, label %if.end72 for.cond.preheader: ; preds = %while.end %sub = add nsw i32 %2, -1 %cmp9120 = icmp sgt i32 %2, 1 br i1 %cmp9120, label %for.body.lr.ph, label %if.end72 for.body.lr.ph: ; preds = %for.cond.preheader %conv47 = and i64 %indvars.iv.next, 4294967295 %3 = and i64 %indvars.iv.next, 4294967295 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc69 %max.1122 = phi i32 [ %spec.select, %for.body.lr.ph ], [ %max.3, %for.inc69 ] %j.0121 = phi i32 [ 0, %for.body.lr.ph ], [ %inc70, %for.inc69 ] %idxprom11 = sext i32 %j.0121 to i64 %arrayidx12 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %idxprom11 %4 = load i32, ptr %arrayidx12, align 4, !tbaa !9 %cmp13.not = icmp eq i32 %4, 9 br i1 %cmp13.not, label %for.inc69, label %if.then15 if.then15: ; preds = %for.body store i32 9, ptr %arrayidx12, align 4, !tbaa !9 %add = add nsw i32 %j.0121, 1 %idxprom18 = sext i32 %add to i64 %arrayidx19 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %idxprom18 %5 = load i32, ptr %arrayidx19, align 4, !tbaa !9 %cmp20.not = icmp eq i32 %5, 0 br i1 %cmp20.not, label %while.cond27.preheader, label %if.end46 while.cond27.preheader: ; preds = %if.then15 %cmp34108 = icmp slt i32 %add, %2 br i1 %cmp34108, label %while.body36, label %if.end46 while.body36: ; preds = %while.cond27.preheader, %while.body36 %indvars.iv127 = phi i64 [ %indvars.iv.next128, %while.body36 ], [ %idxprom18, %while.cond27.preheader ] %arrayidx30110 = phi ptr [ %arrayidx30, %while.body36 ], [ %arrayidx19, %while.cond27.preheader ] store i32 9, ptr %arrayidx30110, align 4, !tbaa !9 %indvars.iv.next128 = add nsw i64 %indvars.iv127, 1 %arrayidx30 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %indvars.iv.next128 %6 = load i32, ptr %arrayidx30, align 4, !tbaa !9 %cmp31 = icmp eq i32 %6, 0 %cmp34 = icmp slt i64 %indvars.iv.next128, %3 %7 = and i1 %cmp31, %cmp34 br i1 %7, label %while.body36, label %while.end41.loopexit, !llvm.loop !13 while.end41.loopexit: ; preds = %while.body36 %8 = trunc i64 %indvars.iv127 to i32 br label %if.end46 if.end46: ; preds = %while.cond27.preheader, %while.end41.loopexit, %if.then15 %.lcssa.sink = phi i32 [ %5, %if.then15 ], [ 0, %while.cond27.preheader ], [ %6, %while.end41.loopexit ] %arrayidx30.lcssa.sink = phi ptr [ %arrayidx19, %if.then15 ], [ %arrayidx19, %while.cond27.preheader ], [ %arrayidx30, %while.end41.loopexit ] %j.2 = phi i32 [ %j.0121, %if.then15 ], [ %j.0121, %while.cond27.preheader ], [ %8, %while.end41.loopexit ] %sub45 = add nsw i32 %.lcssa.sink, -1 store i32 %sub45, ptr %arrayidx30.lcssa.sink, align 4, !tbaa !9 br label %while.cond48 while.cond48: ; preds = %while.cond48, %if.end46 %storemerge = phi i64 [ %conv47, %if.end46 ], [ %sub49, %while.cond48 ] %sub49 = add nsw i64 %storemerge, -1 %arrayidx50 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %sub49 %9 = load i32, ptr %arrayidx50, align 4, !tbaa !9 %cmp51 = icmp eq i32 %9, 0 br i1 %cmp51, label %while.cond48, label %for.cond55.preheader, !llvm.loop !14 for.cond55.preheader: ; preds = %while.cond48 store i64 %storemerge, ptr %x, align 8, !tbaa !5 %cmp57115 = icmp sgt i64 %storemerge, 0 br i1 %cmp57115, label %for.body59.preheader, label %for.end for.body59.preheader: ; preds = %for.cond55.preheader %min.iters.check = icmp ult i64 %storemerge, 8 br i1 %min.iters.check, label %for.body59.preheader141, label %vector.ph vector.ph: ; preds = %for.body59.preheader %n.vec = and i64 %storemerge, -8 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> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %12, %vector.body ] %vec.phi139 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %13, %vector.body ] %10 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %10, align 16, !tbaa !9 %11 = getelementptr inbounds i32, ptr %10, i64 4 %wide.load140 = load <4 x i32>, ptr %11, align 16, !tbaa !9 %12 = mul <4 x i32> %wide.load, %vec.phi %13 = mul <4 x i32> %wide.load140, %vec.phi139 %index.next = add nuw i64 %index, 8 %14 = icmp eq i64 %index.next, %n.vec br i1 %14, label %middle.block, label %vector.body, !llvm.loop !15 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %13, %12 %15 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %storemerge, %n.vec br i1 %cmp.n, label %for.end, label %for.body59.preheader141 for.body59.preheader141: ; preds = %for.body59.preheader, %middle.block %indvars.iv130.ph = phi i64 [ 0, %for.body59.preheader ], [ %n.vec, %middle.block ] %pro.2116.ph = phi i32 [ 1, %for.body59.preheader ], [ %15, %middle.block ] br label %for.body59 for.body59: ; preds = %for.body59.preheader141, %for.body59 %indvars.iv130 = phi i64 [ %indvars.iv.next131, %for.body59 ], [ %indvars.iv130.ph, %for.body59.preheader141 ] %pro.2116 = phi i32 [ %mul62, %for.body59 ], [ %pro.2116.ph, %for.body59.preheader141 ] %arrayidx61 = getelementptr inbounds [11 x i32], ptr %A, i64 0, i64 %indvars.iv130 %16 = load i32, ptr %arrayidx61, align 4, !tbaa !9 %mul62 = mul nsw i32 %16, %pro.2116 %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1 %cmp57 = icmp sgt i64 %storemerge, %indvars.iv.next131 br i1 %cmp57, label %for.body59, label %for.end, !llvm.loop !18 for.end: ; preds = %for.body59, %middle.block, %for.cond55.preheader %pro.2.lcssa = phi i32 [ 1, %for.cond55.preheader ], [ %15, %middle.block ], [ %mul62, %for.body59 ] %spec.select98 = call i32 @llvm.smax.i32(i32 %pro.2.lcssa, i32 %max.1122) br label %for.inc69 for.inc69: ; preds = %for.body, %for.end %j.3 = phi i32 [ %j.2, %for.end ], [ %j.0121, %for.body ] %max.3 = phi i32 [ %spec.select98, %for.end ], [ %max.1122, %for.body ] %inc70 = add nsw i32 %j.3, 1 %cmp9 = icmp slt i32 %inc70, %sub br i1 %cmp9, label %for.body, label %if.end72, !llvm.loop !19 if.end72: ; preds = %for.inc69, %entry, %for.cond.preheader, %while.end %max.4 = phi i32 [ %spec.select, %while.end ], [ %spec.select, %for.cond.preheader ], [ 1, %entry ], [ %max.3, %for.inc69 ] %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %max.4) call void @llvm.lifetime.end.p0(i64 44, ptr nonnull %A) #4 call void @llvm.lifetime.end.p0(i64 8, 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 ; 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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !12} !15 = distinct !{!15, !12, !16, !17} !16 = !{!"llvm.loop.isvectorized", i32 1} !17 = !{!"llvm.loop.unroll.runtime.disable"} !18 = distinct !{!18, !12, !17, !16} !19 = distinct !{!19, !12}
#include<stdio.h> int main() { int n,a[1000]={},z=0,l=0,m=0,x,y,c,i; scanf("%d",&n); for(i=0;i<n;i++) {scanf("%d",&a[i]); if(a[i]>0) {z++;} } for(i=0;i<n;i++) {if(z==0&&a[i]!=0) {l++; m++; if(l==1) {x=a[i]; a[i]=1001;} if(m==2) {y=a[i]; a[i]=1001;} if(m==3) {c=a[i]; a[i]=1001;}} if(z!=0&&a[i]!=0) {if(a[i]>0&&m==0) {m++; y=a[i]; a[i]=1001;} if(a[i]<0&&l==0) {l++; x=a[i]; a[i]=1001;} }} if(z==0) {printf("1 %d\n",x); printf("2 %d %d\n",y,c); printf("%d",n-3); printf(" "); for(i=0;i<n;i++) {if(a[i]!=1001) {printf("%d",a[i]); printf(" ");}}} else {printf("1 %d\n",x); printf("1 %d\n",y); printf("%d",n-2); printf(" "); for(i=0;i<n;i++) {if(a[i]!=1001) {printf("%d",a[i]); printf(" ");}}} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12915/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"1 %d\0A\00", align 1 @.str.2 = private unnamed_addr constant [9 x i8] c"2 %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 [1000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %a) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000) %a, i8 0, i64 4000, 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 %cmp170 = icmp sgt i32 %0, 0 call void @llvm.assume(i1 %cmp170) br label %for.body for.cond6.preheader: ; preds = %for.body %1 = icmp eq i32 %spec.select, 0 %cmp7174 = icmp sgt i32 %5, 0 call void @llvm.assume(i1 %cmp7174) %wide.trip.count200 = zext i32 %5 to i64 br i1 %1, label %for.body8.us, label %for.body8 for.body8.us: ; preds = %for.cond6.preheader, %for.inc69.us %indvars.iv197 = phi i64 [ %indvars.iv.next198, %for.inc69.us ], [ 0, %for.cond6.preheader ] %c.0179.us = phi i32 [ %c.1168.us, %for.inc69.us ], [ undef, %for.cond6.preheader ] %y.0178.us = phi i32 [ %y.4.us, %for.inc69.us ], [ undef, %for.cond6.preheader ] %x.0177.us = phi i32 [ %x.3.us, %for.inc69.us ], [ undef, %for.cond6.preheader ] %m.0176.us = phi i32 [ %m.3.us, %for.inc69.us ], [ 0, %for.cond6.preheader ] %l.0175.us = phi i32 [ %l.2.us, %for.inc69.us ], [ 0, %for.cond6.preheader ] %arrayidx11.us = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv197 %2 = load i32, ptr %arrayidx11.us, align 4, !tbaa !5 %cmp12.not.us = icmp eq i32 %2, 0 br i1 %cmp12.not.us, label %for.inc69.us, label %if.then13.us if.then13.us: ; preds = %for.body8.us %inc14.us = add nsw i32 %l.0175.us, 1 %inc15.us = add nsw i32 %m.0176.us, 1 %cmp16.us = icmp eq i32 %l.0175.us, 0 br i1 %cmp16.us, label %if.then17.us, label %if.end22.us if.then17.us: ; preds = %if.then13.us store i32 1001, ptr %arrayidx11.us, align 4, !tbaa !5 br label %if.end22.us if.end22.us: ; preds = %if.then17.us, %if.then13.us %3 = phi i32 [ 1001, %if.then17.us ], [ %2, %if.then13.us ] %x.1.us = phi i32 [ %2, %if.then17.us ], [ %x.0177.us, %if.then13.us ] switch i32 %m.0176.us, label %for.inc69.us [ i32 1, label %if.end29.thread.us i32 2, label %for.inc69.us.sink.split ] if.end29.thread.us: ; preds = %if.end22.us br label %for.inc69.us.sink.split for.inc69.us.sink.split: ; preds = %if.end22.us, %if.end29.thread.us %c.1168.us.ph = phi i32 [ %c.0179.us, %if.end29.thread.us ], [ %3, %if.end22.us ] %m.3.us.ph = phi i32 [ 2, %if.end29.thread.us ], [ 3, %if.end22.us ] %y.4.us.ph = phi i32 [ %3, %if.end29.thread.us ], [ %y.0178.us, %if.end22.us ] store i32 1001, ptr %arrayidx11.us, align 4, !tbaa !5 br label %for.inc69.us for.inc69.us: ; preds = %for.inc69.us.sink.split, %if.end22.us, %for.body8.us %c.1168.us = phi i32 [ %c.0179.us, %for.body8.us ], [ %c.0179.us, %if.end22.us ], [ %c.1168.us.ph, %for.inc69.us.sink.split ] %l.2.us = phi i32 [ %l.0175.us, %for.body8.us ], [ %inc14.us, %if.end22.us ], [ %inc14.us, %for.inc69.us.sink.split ] %m.3.us = phi i32 [ %m.0176.us, %for.body8.us ], [ %inc15.us, %if.end22.us ], [ %m.3.us.ph, %for.inc69.us.sink.split ] %x.3.us = phi i32 [ %x.0177.us, %for.body8.us ], [ %x.1.us, %if.end22.us ], [ %x.1.us, %for.inc69.us.sink.split ] %y.4.us = phi i32 [ %y.0178.us, %for.body8.us ], [ %y.0178.us, %if.end22.us ], [ %y.4.us.ph, %for.inc69.us.sink.split ] %indvars.iv.next198 = add nuw nsw i64 %indvars.iv197, 1 %exitcond201.not = icmp eq i64 %indvars.iv.next198, %wide.trip.count200 br i1 %exitcond201.not, label %for.end71, label %for.body8.us, !llvm.loop !9 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %z.0171 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000 x i32], ptr %a, i64 0, 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 %cmp4 = icmp sgt i32 %4, 0 %inc = zext i1 %cmp4 to i32 %spec.select = add nuw nsw i32 %z.0171, %inc %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.cond6.preheader, !llvm.loop !11 for.body8: ; preds = %for.cond6.preheader, %for.inc69 %indvars.iv194 = phi i64 [ %indvars.iv.next195, %for.inc69 ], [ 0, %for.cond6.preheader ] %y.0178 = phi i32 [ %y.4, %for.inc69 ], [ undef, %for.cond6.preheader ] %x.0177 = phi i32 [ %x.3, %for.inc69 ], [ undef, %for.cond6.preheader ] %m.0176 = phi i32 [ %m.3, %for.inc69 ], [ 0, %for.cond6.preheader ] %l.0175 = phi i32 [ %l.2, %for.inc69 ], [ 0, %for.cond6.preheader ] %arrayidx41 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv194 %7 = load i32, ptr %arrayidx41, align 4, !tbaa !5 %cmp42.not = icmp eq i32 %7, 0 br i1 %cmp42.not, label %for.inc69, label %if.then43 if.then43: ; preds = %for.body8 %cmp46 = icmp sgt i32 %7, 0 %cmp48 = icmp eq i32 %m.0176, 0 %or.cond = select i1 %cmp46, i1 %cmp48, i1 false br i1 %or.cond, label %for.inc69.sink.split, label %if.end55 if.end55: ; preds = %if.then43 %cmp58 = icmp slt i32 %7, 0 %cmp60 = icmp eq i32 %l.0175, 0 %or.cond114 = select i1 %cmp58, i1 %cmp60, i1 false br i1 %or.cond114, label %for.inc69.sink.split, label %for.inc69 for.inc69.sink.split: ; preds = %if.end55, %if.then43 %l.2.ph = phi i32 [ %l.0175, %if.then43 ], [ 1, %if.end55 ] %m.3.ph = phi i32 [ 1, %if.then43 ], [ %m.0176, %if.end55 ] %x.3.ph = phi i32 [ %x.0177, %if.then43 ], [ %7, %if.end55 ] %y.4.ph = phi i32 [ %7, %if.then43 ], [ %y.0178, %if.end55 ] store i32 1001, ptr %arrayidx41, align 4, !tbaa !5 br label %for.inc69 for.inc69: ; preds = %for.inc69.sink.split, %for.body8, %if.end55 %l.2 = phi i32 [ %l.0175, %if.end55 ], [ %l.0175, %for.body8 ], [ %l.2.ph, %for.inc69.sink.split ] %m.3 = phi i32 [ %m.0176, %if.end55 ], [ %m.0176, %for.body8 ], [ %m.3.ph, %for.inc69.sink.split ] %x.3 = phi i32 [ %x.0177, %if.end55 ], [ %x.0177, %for.body8 ], [ %x.3.ph, %for.inc69.sink.split ] %y.4 = phi i32 [ %y.0178, %if.end55 ], [ %y.0178, %for.body8 ], [ %y.4.ph, %for.inc69.sink.split ] %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1 %exitcond.not = icmp eq i64 %indvars.iv.next195, %wide.trip.count200 br i1 %exitcond.not, label %for.end71, label %for.body8, !llvm.loop !9 for.end71: ; preds = %for.inc69, %for.inc69.us %x.0.lcssa = phi i32 [ %x.3.us, %for.inc69.us ], [ %x.3, %for.inc69 ] %y.0.lcssa = phi i32 [ %y.4.us, %for.inc69.us ], [ %y.4, %for.inc69 ] %c.0.lcssa = phi i32 [ %c.1168.us, %for.inc69.us ], [ undef, %for.inc69 ] %call74 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %x.0.lcssa) br i1 %1, label %if.then73, label %if.else if.then73: ; preds = %for.end71 %call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %y.0.lcssa, i32 noundef %c.0.lcssa) %8 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %8, -3 %call76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %sub) %putchar159 = call i32 @putchar(i32 32) %9 = load i32, ptr %n, align 4, !tbaa !5 %cmp79188 = icmp sgt i32 %9, 0 br i1 %cmp79188, label %for.body80, label %if.end113 for.body80: ; preds = %if.then73, %for.inc90 %10 = phi i32 [ %12, %for.inc90 ], [ %9, %if.then73 ] %indvars.iv205 = phi i64 [ %indvars.iv.next206, %for.inc90 ], [ 0, %if.then73 ] %arrayidx82 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv205 %11 = load i32, ptr %arrayidx82, align 4, !tbaa !5 %cmp83.not = icmp eq i32 %11, 1001 br i1 %cmp83.not, label %for.inc90, label %if.then84 if.then84: ; preds = %for.body80 %call87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %11) %putchar160 = call i32 @putchar(i32 32) %.pre208 = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc90 for.inc90: ; preds = %for.body80, %if.then84 %12 = phi i32 [ %10, %for.body80 ], [ %.pre208, %if.then84 ] %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1 %13 = sext i32 %12 to i64 %cmp79 = icmp slt i64 %indvars.iv.next206, %13 br i1 %cmp79, label %for.body80, label %if.end113, !llvm.loop !12 if.else: ; preds = %for.end71 %call94 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %y.0.lcssa) %14 = load i32, ptr %n, align 4, !tbaa !5 %sub95 = add nsw i32 %14, -2 %call96 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %sub95) %putchar = call i32 @putchar(i32 32) %15 = load i32, ptr %n, align 4, !tbaa !5 %cmp99186 = icmp sgt i32 %15, 0 br i1 %cmp99186, label %for.body100, label %if.end113 for.body100: ; preds = %if.else, %for.inc110 %16 = phi i32 [ %18, %for.inc110 ], [ %15, %if.else ] %indvars.iv202 = phi i64 [ %indvars.iv.next203, %for.inc110 ], [ 0, %if.else ] %arrayidx102 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv202 %17 = load i32, ptr %arrayidx102, align 4, !tbaa !5 %cmp103.not = icmp eq i32 %17, 1001 br i1 %cmp103.not, label %for.inc110, label %if.then104 if.then104: ; preds = %for.body100 %call107 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %17) %putchar158 = call i32 @putchar(i32 32) %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc110 for.inc110: ; preds = %for.body100, %if.then104 %18 = phi i32 [ %16, %for.body100 ], [ %.pre, %if.then104 ] %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1 %19 = sext i32 %18 to i64 %cmp99 = icmp slt i64 %indvars.iv.next203, %19 br i1 %cmp99, label %for.body100, label %if.end113, !llvm.loop !13 if.end113: ; preds = %for.inc110, %for.inc90, %if.else, %if.then73 call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %a) #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: 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 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #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 = { nofree nounwind } 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} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main(){ int a; scanf("%d", &a); printf("%d", a + (a * a) + (a * a * a)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129193/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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; scanf("%d", &a); printf("%d\n", a + a * a + a * a * a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129236/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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() { char str[100000]; scanf("%s",str); int i,j,flag,len=strlen(str),fs[len],ss[len],k1=0,k2=0; if(len<4) { printf("NO\n"); return 0; } for(i=0;i<len-1;i++) { if(str[i]=='A' && str[i+1]=='B') { fs[k1]=i; fs[k1+1]=i+1; k1=k1+2; } if(str[i]=='B' && str[i+1]=='A') { ss[k2]=i; ss[k2+1]=i+1; k2=k2+2; } } for(i=0;i<k1-1;i=i+2) { for(j=0;j<k2-1;j=j+2) { if(fs[i]!=ss[j] &&fs[i]!=ss[j+1] && fs[i+1]!=ss[j] && fs[i+1]!=ss[j+1]) { printf("YES\n"); return 0; } } } printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_12928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_12928/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.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [100000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100000, ptr nonnull %str) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #7 %conv = trunc i64 %call2 to i32 %0 = and i64 %call2, 4294967295 %1 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %0, align 16 %vla3 = alloca i32, i64 %0, align 16 %cmp = icmp slt i32 %conv, 4 br i1 %cmp, label %cleanup, label %for.body.preheader for.body.preheader: ; preds = %entry %sub = add i64 %call2, 4294967295 %wide.trip.count = and i64 %sub, 4294967295 br label %for.body for.cond46.preheader: ; preds = %for.inc %sub47 = add nsw i32 %k1.1140, -1 %cmp48148 = icmp sgt i32 %k1.1140, 1 br i1 %cmp48148, label %for.cond51.preheader.lr.ph, label %cleanup for.cond51.preheader.lr.ph: ; preds = %for.cond46.preheader %sub52 = add nsw i32 %k2.1, -1 %cmp53146 = icmp sgt i32 %k2.1, 1 br i1 %cmp53146, label %for.cond51.preheader.us, label %cleanup for.cond51.preheader.us: ; preds = %for.cond51.preheader.lr.ph, %for.cond51.for.inc93_crit_edge.us %indvars.iv158 = phi i64 [ %indvars.iv.next159, %for.cond51.for.inc93_crit_edge.us ], [ 0, %for.cond51.preheader.lr.ph ] %arrayidx57.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv158 %2 = load i32, ptr %arrayidx57.us, align 8, !tbaa !5 %3 = or i64 %indvars.iv158, 1 %arrayidx73.us = getelementptr inbounds i32, ptr %vla, i64 %3 br label %for.body55.us for.body55.us: ; preds = %for.cond51.preheader.us, %for.inc90.us %indvars.iv154 = phi i64 [ 0, %for.cond51.preheader.us ], [ %indvars.iv.next155, %for.inc90.us ] %arrayidx59.us = getelementptr inbounds i32, ptr %vla3, i64 %indvars.iv154 %4 = load i32, ptr %arrayidx59.us, align 8, !tbaa !5 %cmp60.not.us = icmp eq i32 %2, %4 br i1 %cmp60.not.us, label %for.inc90.us, label %land.lhs.true62.us land.lhs.true62.us: ; preds = %for.body55.us %5 = or i64 %indvars.iv154, 1 %arrayidx67.us = getelementptr inbounds i32, ptr %vla3, i64 %5 %6 = load i32, ptr %arrayidx67.us, align 4, !tbaa !5 %cmp68.not.us = icmp eq i32 %2, %6 br i1 %cmp68.not.us, label %for.inc90.us, label %land.lhs.true70.us land.lhs.true70.us: ; preds = %land.lhs.true62.us %7 = load i32, ptr %arrayidx73.us, align 4, !tbaa !5 %cmp76.not.us = icmp eq i32 %7, %4 %cmp85.not.us = icmp eq i32 %7, %6 %or.cond.us = or i1 %cmp76.not.us, %cmp85.not.us br i1 %or.cond.us, label %for.inc90.us, label %cleanup for.inc90.us: ; preds = %land.lhs.true70.us, %land.lhs.true62.us, %for.body55.us %indvars.iv.next155 = add nuw i64 %indvars.iv154, 2 %8 = trunc i64 %indvars.iv.next155 to i32 %cmp53.us = icmp sgt i32 %sub52, %8 br i1 %cmp53.us, label %for.body55.us, label %for.cond51.for.inc93_crit_edge.us, !llvm.loop !9 for.cond51.for.inc93_crit_edge.us: ; preds = %for.inc90.us %indvars.iv.next159 = add nuw i64 %indvars.iv158, 2 %9 = trunc i64 %indvars.iv.next159 to i32 %cmp48.us = icmp sgt i32 %sub47, %9 br i1 %cmp48.us, label %for.cond51.preheader.us, label %cleanup, !llvm.loop !11 for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %.pre, %for.inc ] %k2.0144 = phi i32 [ 0, %for.body.preheader ], [ %k2.1, %for.inc ] %k1.0143 = phi i32 [ 0, %for.body.preheader ], [ %k1.1140, %for.inc ] %arrayidx = getelementptr inbounds [100000 x i8], ptr %str, i64 0, i64 %indvars.iv %10 = load i8, ptr %arrayidx, align 1, !tbaa !12 %.pre = add nuw nsw i64 %indvars.iv, 1 switch i8 %10, label %for.inc [ i8 65, label %land.lhs.true i8 66, label %land.lhs.true30 ] land.lhs.true: ; preds = %for.body %arrayidx12 = getelementptr inbounds [100000 x i8], ptr %str, i64 0, i64 %.pre %11 = load i8, ptr %arrayidx12, align 1, !tbaa !12 %cmp14 = icmp eq i8 %11, 66 br i1 %cmp14, label %if.then16, label %for.inc if.then16: ; preds = %land.lhs.true %idxprom17 = sext i32 %k1.0143 to i64 %arrayidx18 = getelementptr inbounds i32, ptr %vla, i64 %idxprom17 %12 = trunc i64 %indvars.iv to i32 store i32 %12, ptr %arrayidx18, align 4, !tbaa !5 %add20 = add nsw i32 %k1.0143, 1 %idxprom21 = sext i32 %add20 to i64 %arrayidx22 = getelementptr inbounds i32, ptr %vla, i64 %idxprom21 %13 = trunc i64 %.pre to i32 store i32 %13, ptr %arrayidx22, align 4, !tbaa !5 %add23 = add nsw i32 %k1.0143, 2 br label %for.inc land.lhs.true30: ; preds = %for.body %arrayidx33 = getelementptr inbounds [100000 x i8], ptr %str, i64 0, i64 %.pre %14 = load i8, ptr %arrayidx33, align 1, !tbaa !12 %cmp35 = icmp eq i8 %14, 65 br i1 %cmp35, label %if.then37, label %for.inc if.then37: ; preds = %land.lhs.true30 %idxprom38 = sext i32 %k2.0144 to i64 %arrayidx39 = getelementptr inbounds i32, ptr %vla3, i64 %idxprom38 %15 = trunc i64 %indvars.iv to i32 store i32 %15, ptr %arrayidx39, align 4, !tbaa !5 %add41 = add nsw i32 %k2.0144, 1 %idxprom42 = sext i32 %add41 to i64 %arrayidx43 = getelementptr inbounds i32, ptr %vla3, i64 %idxprom42 %16 = trunc i64 %.pre to i32 store i32 %16, ptr %arrayidx43, align 4, !tbaa !5 %add44 = add nsw i32 %k2.0144, 2 br label %for.inc for.inc: ; preds = %for.body, %land.lhs.true, %if.then16, %land.lhs.true30, %if.then37 %k1.1140 = phi i32 [ %k1.0143, %land.lhs.true ], [ %add23, %if.then16 ], [ %k1.0143, %land.lhs.true30 ], [ %k1.0143, %if.then37 ], [ %k1.0143, %for.body ] %k2.1 = phi i32 [ %k2.0144, %land.lhs.true ], [ %k2.0144, %if.then16 ], [ %k2.0144, %land.lhs.true30 ], [ %add44, %if.then37 ], [ %k2.0144, %for.body ] %exitcond.not = icmp eq i64 %.pre, %wide.trip.count br i1 %exitcond.not, label %for.cond46.preheader, label %for.body, !llvm.loop !13 cleanup: ; preds = %for.cond51.for.inc93_crit_edge.us, %land.lhs.true70.us, %for.cond46.preheader, %for.cond51.preheader.lr.ph, %entry %str.sink = phi ptr [ @str.4, %entry ], [ @str.4, %for.cond51.preheader.lr.ph ], [ @str.4, %for.cond46.preheader ], [ @str.3, %land.lhs.true70.us ], [ @str.4, %for.cond51.for.inc93_crit_edge.us ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.stackrestore.p0(ptr %1) call void @llvm.lifetime.end.p0(i64 100000, ptr nonnull %str) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #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: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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 = !{!7, !7, i64 0} !13 = distinct !{!13, !10}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int n; char buf[30]; fgets(buf, sizeof(buf), stdin); n= atoi(buf); int a=n; int b=n*n; int c=n*n*n; int x=a+b+c; printf("%d\n", x); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129322/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129322/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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %buf = alloca [30 x i8], align 16 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %buf) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 30, ptr noundef %0) %call.i = call i64 @strtol(ptr nocapture noundef nonnull %buf, ptr noundef null, i32 noundef 10) #4 %conv.i = trunc i64 %call.i to i32 %mul = mul nsw i32 %conv.i, %conv.i %mul4 = mul nsw i32 %mul, %conv.i %add = add nsw i32 %mul, %conv.i %add5 = add nsw i32 %add, %mul4 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add5) call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %buf) #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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) 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: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, 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 = { 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 } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int a; scanf("%d", &a); printf("%d\n", a+(a*a)+(a*a*a)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129366/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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<string.h> #include<stdio.h> #include<stdlib.h> int main(){ int a; char buf[30]; fgets(buf, sizeof(buf), stdin); a=atoi(buf); printf("%d\n", a+(a*a)+(a*a*a)); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129409/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"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %buf = alloca [30 x i8], align 16 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %buf) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 30, ptr noundef %0) %call.i = call i64 @strtol(ptr nocapture noundef nonnull %buf, ptr noundef null, i32 noundef 10) #4 %conv.i = trunc i64 %call.i to i32 %mul = mul nsw i32 %conv.i, %conv.i %add = add nsw i32 %mul, %conv.i %mul4 = mul nsw i32 %mul, %conv.i %add5 = add nsw i32 %add, %mul4 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add5) call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %buf) #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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) 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: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, 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 = { 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 } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int a; scanf("%d", &a); printf("%d", a+a*a+a*a*a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129452/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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; int b; scanf("%d",&a); b = a + a*a + a*a*a; printf("%d\n",b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129496/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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 a; scanf("%d", &a); int num = a + a*a + a*a*a; printf("%d\n", num); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129539/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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 a; scanf("%d",&a); printf("%d",a+a*a+a*a*a); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129582/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129582/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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 a; scanf("%d", &a); printf("%d", a+a*a+a*a*a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129632/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129632/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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; scanf("%d",&a); printf("%d\n",a+a*a+a*a*a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129676/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129676/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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; scanf("%d",&a); b=a+a*a+a*a*a; printf("%d\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129719/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129719/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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 <math.h> int main(){ int a; scanf("%d", &a); int wa; wa = 0; wa += a; wa += pow(a, 2); wa += pow(a, 3); printf("%d", wa); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129762/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 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 %conv = sitofp i32 %0 to double %square = fmul double %conv, %conv %add3 = fadd double %square, %conv %conv4 = fptosi double %add3 to i32 %call6 = call double @pow(double noundef %conv, double noundef 3.000000e+00) #4 %conv7 = sitofp i32 %conv4 to double %add8 = fadd double %call6, %conv7 %conv9 = fptosi double %add8 to i32 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %conv9) 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 nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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); printf("%d", a + a * a + a * a * a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129805/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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 a; scanf("%d",&a); printf("%d\n",a+a*a+a*a*a); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129849/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: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add3) 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; scanf("%d",&a); printf("%d",a + a*a + a*a*a); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129892/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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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"}
// cd Desktop/Atcoder #include <stdio.h> #include <stdlib.h> #include <string.h> #define rep(i,n) for(i=0;i<(n);i++) #define ll long long #define ull unsigned long long #define MOD 1000000007 int main(){ int n; scanf("%d",&n); printf("%d",n+n*n+n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129935/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 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 %mul = mul nsw i32 %0, %0 %add = add nsw i32 %mul, %0 %mul2 = mul nsw i32 %mul, %0 %add3 = add nsw i32 %add, %mul2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add3) 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"}
#include<stdio.h> int main(){ int n; for(scanf("%d",&n);n>=0;n-=4)if(n%7==0){printf("Yes");return 0;} printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_129986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_129986/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"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: %n = 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) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp4 = icmp sgt i32 %.pr, -1 br i1 %cmp4, label %for.body, label %cleanup for.body: ; preds = %entry, %for.inc %0 = phi i32 [ %sub, %for.inc ], [ %.pr, %entry ] %rem = urem i32 %0, 7 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %cleanup, label %for.inc for.inc: ; preds = %for.body %sub = add nsw i32 %0, -4 store i32 %sub, ptr %n, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 3 br i1 %cmp, label %for.body, label %cleanup, !llvm.loop !9 cleanup: ; preds = %for.inc, %for.body, %entry %.str.2.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body ], [ @.str.2, %for.inc ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) 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"}
#include <stdio.h> #include <stdbool.h> int main(void) { char arr[5]; int n; bool flag = false; fgets(arr, sizeof(arr), stdin); sscanf(arr, "%d", &n); for (int i=0; i*7 <= n; i++) { for (int j=0; (j*4 + i*7) <= n; j++) { if (n == j*4 + i*7) { flag = true; break; } } } if (flag == true) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @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: %arr = alloca [5 x i8], align 1 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %arr) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %arr, i32 noundef 5, ptr noundef %0) %call2 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %arr, ptr noundef nonnull @.str, ptr noundef nonnull %n) #4 %1 = load i32, ptr %n, align 4, !tbaa !9 %cmp.not34 = icmp slt i32 %1, 0 br i1 %cmp.not34, label %if.else, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry, %cleanup %mul37 = phi i32 [ %mul, %cleanup ], [ 0, %entry ] %i.036 = phi i32 [ %inc14, %cleanup ], [ 0, %entry ] %flag.035 = phi i8 [ %flag.1, %cleanup ], [ 0, %entry ] br label %for.body8 for.cond.cleanup: ; preds = %cleanup %2 = and i8 %flag.1, 1 %3 = icmp eq i8 %2, 0 br i1 %3, label %if.else, label %if.end22 for.cond3: ; preds = %for.body8 %inc = add nuw nsw i32 %j.032, 1 %mul4 = shl nsw i32 %inc, 2 %add = add nuw nsw i32 %mul4, %mul37 %cmp6.not = icmp sgt i32 %add, %1 br i1 %cmp6.not, label %cleanup, label %for.body8, !llvm.loop !11 for.body8: ; preds = %for.cond3.preheader, %for.cond3 %add33 = phi i32 [ %mul37, %for.cond3.preheader ], [ %add, %for.cond3 ] %j.032 = phi i32 [ 0, %for.cond3.preheader ], [ %inc, %for.cond3 ] %cmp12 = icmp eq i32 %1, %add33 br i1 %cmp12, label %cleanup, label %for.cond3 cleanup: ; preds = %for.body8, %for.cond3 %flag.1 = phi i8 [ %flag.035, %for.cond3 ], [ 1, %for.body8 ] %inc14 = add nuw nsw i32 %i.036, 1 %mul = mul nsw i32 %inc14, 7 %cmp.not = icmp sgt i32 %mul, %1 br i1 %cmp.not, label %for.cond.cleanup, label %for.cond3.preheader, !llvm.loop !13 if.else: ; preds = %entry, %for.cond.cleanup br label %if.end22 if.end22: ; preds = %for.cond.cleanup, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %for.cond.cleanup ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %arr) #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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, 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 = !{!"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"} !13 = distinct !{!13, !12}
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int n = 0; scanf("%d", &n); for (int i=0; i<=n/4; i++) { int buf = n - i*4; if (buf%7 == 0) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130070/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130070/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"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 store i32 0, ptr %n, align 4, !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 %cmp.not12 = icmp slt i32 %0, -3 br i1 %cmp.not12, label %cleanup6, label %for.body.preheader for.body.preheader: ; preds = %entry %div = sdiv i32 %0, 4 br label %for.body for.cond: ; preds = %for.body %inc = add nuw nsw i32 %i.013, 1 %exitcond.not = icmp eq i32 %i.013, %div br i1 %exitcond.not, label %cleanup6, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.preheader, %for.cond %i.013 = phi i32 [ %inc, %for.cond ], [ 0, %for.body.preheader ] %mul = shl nsw i32 %i.013, 2 %sub = sub nsw i32 %0, %mul %rem = srem i32 %sub, 7 %cmp1.not = icmp eq i32 %rem, 0 br i1 %cmp1.not, label %cleanup6, label %for.cond cleanup6: ; preds = %for.cond, %for.body, %entry %str.sink = phi ptr [ @str.3, %entry ], [ @str, %for.body ], [ @str.3, %for.cond ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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"}
#include <stdio.h> int main(void){ int N; int x, y; int buf; int flag = 0;//存在すれば1,存在しなければ0 scanf("%d", &N); for(y = 0; y <= N/7; y++){ buf = N - 7*y; if(buf%4 == 0 && buf >= 0){ flag = 1; y = buf; break; } } if(flag == 1){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130113/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130113/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 [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: %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 %cmp.not.not13 = icmp slt i32 %0, -6 br i1 %cmp.not.not13, label %if.end7, label %for.body.preheader for.body.preheader: ; preds = %entry %div = sdiv i32 %0, 7 br label %for.body for.cond: ; preds = %for.body %inc = add nuw nsw i32 %y.014, 1 %exitcond.not = icmp eq i32 %y.014, %div br i1 %exitcond.not, label %if.end7, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.preheader, %for.cond %y.014 = phi i32 [ %inc, %for.cond ], [ 0, %for.body.preheader ] %mul.neg = mul i32 %y.014, -7 %sub = add i32 %mul.neg, %0 %1 = and i32 %sub, -2147483645 %or.cond = icmp eq i32 %1, 0 br i1 %or.cond, label %if.end7, label %for.cond if.end7: ; preds = %for.cond, %for.body, %entry %str.sink = phi ptr [ @str, %entry ], [ @str.3, %for.body ], [ @str, %for.cond ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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"}
#include <stdio.h> int main(void){ int n; scanf("%d",&n); int flag=0; for(int i=0;i<=n/4;i++){ for(int j=0;j<=n/7;j++){ if(4*i+7*j==n){ flag = 1; break; } } if(flag==1) break; } if(flag==0) printf("No\n"); if(flag==1) printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130157/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130157/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 [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: %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 %div = sdiv i32 %0, 4 %cmp.not.not34 = icmp slt i32 %0, -3 br i1 %cmp.not.not34, label %if.end22, label %for.cond1.preheader.preheader for.cond1.preheader.preheader: ; preds = %entry %div2 = sdiv i32 %0, 7 %1 = mul i32 %0, -1227133513 br label %for.body5 for.body5: ; preds = %for.cond1.for.inc11_crit_edge, %for.cond1.preheader.preheader %indvars.iv = phi i32 [ %1, %for.cond1.preheader.preheader ], [ %indvars.iv.next, %for.cond1.for.inc11_crit_edge ] %i.035 = phi i32 [ 0, %for.cond1.preheader.preheader ], [ %inc12, %for.cond1.for.inc11_crit_edge ] %.not = icmp ugt i32 %indvars.iv, %div2 br i1 %.not, label %for.cond1.for.inc11_crit_edge, label %if.end22 for.cond1.for.inc11_crit_edge: ; preds = %for.body5 %inc12 = add nuw nsw i32 %i.035, 1 %indvars.iv.next = add i32 %indvars.iv, 613566756 %exitcond.not = icmp eq i32 %i.035, %div br i1 %exitcond.not, label %if.end22, label %for.body5, !llvm.loop !9 if.end22: ; preds = %for.cond1.for.inc11_crit_edge, %for.body5, %entry %str.sink = phi ptr [ @str, %entry ], [ @str.3, %for.body5 ], [ @str, %for.cond1.for.inc11_crit_edge ] %puts.c = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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"}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { int k; scanf("%d", &k); if (k % 4 == 0 || k % 7 == 0) { printf("Yes"); } else if (k < 3) { printf("No"); } else { int i; double j; j = k / 4; for (i = 0; i < j; i++) { if ((k - 4 * i) % 7 == 0) { printf("Yes"); return 0; } } printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130207/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130207/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"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: %k = alloca i32, align 4 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 %k) %0 = load i32, ptr %k, align 4, !tbaa !5 %1 = and i32 %0, 3 %cmp = icmp eq i32 %1, 0 %rem1 = srem i32 %0, 7 %cmp2 = icmp eq i32 %rem1, 0 %or.cond = or i1 %cmp, %cmp2 br i1 %or.cond, label %cleanup20, label %if.else if.else: ; preds = %entry %cmp4 = icmp slt i32 %0, 3 br i1 %cmp4, label %cleanup20, label %if.else7 if.else7: ; preds = %if.else %div23 = lshr i32 %0, 2 %cmp924 = icmp eq i32 %0, 3 br i1 %cmp924, label %cleanup20, label %for.body for.cond: ; preds = %for.body %inc = add nuw nsw i32 %i.025, 1 %cmp926.not = icmp ult i32 %inc, %div23 br i1 %cmp926.not, label %for.body, label %cleanup20, !llvm.loop !9 for.body: ; preds = %if.else7, %for.cond %i.025 = phi i32 [ %inc, %for.cond ], [ 0, %if.else7 ] %mul = shl nsw i32 %i.025, 2 %sub = sub nsw i32 %0, %mul %rem11 = srem i32 %sub, 7 %cmp12 = icmp eq i32 %rem11, 0 br i1 %cmp12, label %cleanup20, label %for.cond cleanup20: ; preds = %for.cond, %for.body, %if.else7, %if.else, %entry %.str.1.sink = phi ptr [ @.str.1, %entry ], [ @.str.2, %if.else ], [ @.str.2, %if.else7 ], [ @.str.1, %for.body ], [ @.str.2, %for.cond ] %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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 n; scanf("%d", &n); //処理 while(n > 0){ if(n % 4 == 0 || n % 7 == 0){ n = 0; } else{ n -= 11; } } //表示 if(n == 0){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130250/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130250/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 [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: %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) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp11 = icmp sgt i32 %.pr, 0 br i1 %cmp11, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %0 = phi i32 [ %sub, %while.body ], [ %.pr, %entry ] %rem = and i32 %0, 3 %cmp1 = icmp eq i32 %rem, 0 %rem2 = urem i32 %0, 7 %cmp3 = icmp eq i32 %rem2, 0 %or.cond = or i1 %cmp1, %cmp3 %sub = add nsw i32 %0, -11 %storemerge = select i1 %or.cond, i32 0, i32 %sub %cmp = icmp sgt i32 %storemerge, 0 br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %storemerge, ptr %n, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %.lcssa = phi i32 [ %storemerge, %while.cond.while.end_crit_edge ], [ %.pr, %entry ] %cmp4 = icmp eq i32 %.lcssa, 0 %str.3.str = select i1 %cmp4, 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 %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"}
#include<stdio.h> #include<string.h> #include<ctype.h> char w[10]; char T[1000]; int answer = 0; int i; char a[12] = "END_OF_TEXT"; int main(void){ scanf("%s",w); while(1) { scanf("%s",T); for(i = 0;i < 11;i++) { if(T[i] != a[i])break; } if(i == 11)break; if(strcasecmp(w,T) == 0) answer++; } printf("%d\n",answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130315/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" @answer = dso_local local_unnamed_addr global i32 0, align 4 @a = dso_local local_unnamed_addr global [12 x i8] c"END_OF_TEXT\00", align 1 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @w = dso_local global [10 x i8] zeroinitializer, align 1 @T = dso_local global [1000 x i8] zeroinitializer, align 16 @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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w) br label %while.body while.body: ; preds = %while.body.backedge, %entry %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @T) %0 = load i8, ptr @T, align 16, !tbaa !5 %1 = load i8, ptr @a, align 1, !tbaa !5 %cmp5.not = icmp eq i8 %0, %1 br i1 %cmp5.not, label %for.inc, label %if.end10 for.inc: ; preds = %while.body %2 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 1), align 1, !tbaa !5 %3 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 1), align 1, !tbaa !5 %cmp5.not.1 = icmp eq i8 %2, %3 br i1 %cmp5.not.1, label %for.inc.1, label %if.end10 for.inc.1: ; preds = %for.inc %4 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 2), align 2, !tbaa !5 %5 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 2), align 1, !tbaa !5 %cmp5.not.2 = icmp eq i8 %4, %5 br i1 %cmp5.not.2, label %for.inc.2, label %if.end10 for.inc.2: ; preds = %for.inc.1 %6 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 3), align 1, !tbaa !5 %7 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 3), align 1, !tbaa !5 %cmp5.not.3 = icmp eq i8 %6, %7 br i1 %cmp5.not.3, label %for.inc.3, label %if.end10 for.inc.3: ; preds = %for.inc.2 %8 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 4), align 4, !tbaa !5 %9 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 4), align 1, !tbaa !5 %cmp5.not.4 = icmp eq i8 %8, %9 br i1 %cmp5.not.4, label %for.inc.4, label %if.end10 for.inc.4: ; preds = %for.inc.3 %10 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 5), align 1, !tbaa !5 %11 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 5), align 1, !tbaa !5 %cmp5.not.5 = icmp eq i8 %10, %11 br i1 %cmp5.not.5, label %for.inc.5, label %if.end10 for.inc.5: ; preds = %for.inc.4 %12 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 6), align 2, !tbaa !5 %13 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 6), align 1, !tbaa !5 %cmp5.not.6 = icmp eq i8 %12, %13 br i1 %cmp5.not.6, label %for.inc.6, label %if.end10 for.inc.6: ; preds = %for.inc.5 %14 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 7), align 1, !tbaa !5 %15 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 7), align 1, !tbaa !5 %cmp5.not.7 = icmp eq i8 %14, %15 br i1 %cmp5.not.7, label %for.inc.7, label %if.end10 for.inc.7: ; preds = %for.inc.6 %16 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 8), align 8, !tbaa !5 %17 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 8), align 1, !tbaa !5 %cmp5.not.8 = icmp eq i8 %16, %17 br i1 %cmp5.not.8, label %for.inc.8, label %if.end10 for.inc.8: ; preds = %for.inc.7 %18 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 9), align 1, !tbaa !5 %19 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 9), align 1, !tbaa !5 %cmp5.not.9 = icmp eq i8 %18, %19 br i1 %cmp5.not.9, label %for.inc.9, label %if.end10 for.inc.9: ; preds = %for.inc.8 %20 = load i8, ptr getelementptr inbounds ([1000 x i8], ptr @T, i64 0, i64 10), align 2, !tbaa !5 %21 = load i8, ptr getelementptr inbounds ([12 x i8], ptr @a, i64 0, i64 10), align 1, !tbaa !5 %cmp5.not.10 = icmp eq i8 %20, %21 br i1 %cmp5.not.10, label %while.end, label %if.end10 if.end10: ; preds = %while.body, %for.inc, %for.inc.1, %for.inc.2, %for.inc.3, %for.inc.4, %for.inc.5, %for.inc.6, %for.inc.7, %for.inc.8, %for.inc.9 %storemerge22.lcssa.wide = phi i32 [ 0, %while.body ], [ 1, %for.inc ], [ 2, %for.inc.1 ], [ 3, %for.inc.2 ], [ 4, %for.inc.3 ], [ 5, %for.inc.4 ], [ 6, %for.inc.5 ], [ 7, %for.inc.6 ], [ 8, %for.inc.7 ], [ 9, %for.inc.8 ], [ 10, %for.inc.9 ] store i32 %storemerge22.lcssa.wide, ptr @i, align 4, !tbaa !8 %call11 = tail call i32 @strcasecmp(ptr noundef nonnull @w, ptr noundef nonnull @T) #3 %cmp12 = icmp eq i32 %call11, 0 br i1 %cmp12, label %if.then14, label %while.body.backedge if.then14: ; preds = %if.end10 %22 = load i32, ptr @answer, align 4, !tbaa !8 %inc15 = add nsw i32 %22, 1 store i32 %inc15, ptr @answer, align 4, !tbaa !8 br label %while.body.backedge while.body.backedge: ; preds = %if.then14, %if.end10 br label %while.body while.end: ; preds = %for.inc.9 store i32 11, ptr @i, align 4, !tbaa !8 %23 = load i32, ptr @answer, align 4, !tbaa !8 %call17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %23) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(read) declare i32 @strcasecmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0}
#include<stdio.h> #include<string.h> #include<ctype.h> int main(){ int n=0; char ward1[21]={"0"}; char ward2[21]={"0"}; int i; scanf("%s",ward1); for(i=0;ward1[i]!='\0';i++){ ward1[i]=tolower(ward1[i]); } while(1){ scanf("%s",ward2); if(!(strcmp(ward2,"END_OF_TEXT")))break; for(i=0;ward2[i]!='\0';i++){ ward2[i]=tolower(ward2[i]); } if(!(strcmp(ward1,ward2))){ n++; } } printf("%d\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130366/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" @__const.main.ward2 = private unnamed_addr constant [21 x i8] c"0\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", align 16 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [12 x i8] c"END_OF_TEXT\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: %ward1 = alloca [21 x i8], align 16 %ward2 = alloca [21 x i8], align 16 call void @llvm.lifetime.start.p0(i64 21, ptr nonnull %ward1) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(21) %ward1, ptr noundef nonnull align 16 dereferenceable(21) @__const.main.ward2, i64 21, i1 false) call void @llvm.lifetime.start.p0(i64 21, ptr nonnull %ward2) #7 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(21) %ward2, ptr noundef nonnull align 16 dereferenceable(21) @__const.main.ward2, i64 21, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ward1) %0 = load i8, ptr %ward1, align 16, !tbaa !5 %cmp.not52 = icmp eq i8 %0, 0 br i1 %cmp.not52, label %while.cond.preheader, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %call2 = tail call ptr @__ctype_tolower_loc() #8 br label %for.body while.cond.preheader: ; preds = %for.body, %entry %call1258 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ward2) %bcmp59 = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %ward2, ptr noundef nonnull dereferenceable(12) @.str.1, i64 12) %tobool.not60 = icmp eq i32 %bcmp59, 0 br i1 %tobool.not60, label %while.end, label %for.cond15.preheader for.body: ; preds = %for.body.lr.ph, %for.body %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] %1 = phi i8 [ %0, %for.body.lr.ph ], [ %4, %for.body ] %arrayidx54 = phi ptr [ %ward1, %for.body.lr.ph ], [ %arrayidx, %for.body ] %2 = load ptr, ptr %call2, align 8, !tbaa !8 %idxprom6 = sext i8 %1 to i64 %arrayidx7 = getelementptr inbounds i32, ptr %2, i64 %idxprom6 %3 = load i32, ptr %arrayidx7, align 4, !tbaa !10 %conv8 = trunc i32 %3 to i8 store i8 %conv8, ptr %arrayidx54, align 1, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [21 x i8], ptr %ward1, i64 0, i64 %indvars.iv.next %4 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i8 %4, 0 br i1 %cmp.not, label %while.cond.preheader, label %for.body, !llvm.loop !12 for.cond15.preheader: ; preds = %while.cond.preheader, %for.end35 %n.061 = phi i32 [ %spec.select, %for.end35 ], [ 0, %while.cond.preheader ] %5 = load i8, ptr %ward2, align 16, !tbaa !5 %cmp19.not55 = icmp eq i8 %5, 0 br i1 %cmp19.not55, label %for.end35, label %for.body21.lr.ph for.body21.lr.ph: ; preds = %for.cond15.preheader %call23 = tail call ptr @__ctype_tolower_loc() #8 br label %for.body21 for.body21: ; preds = %for.body21.lr.ph, %for.body21 %indvars.iv62 = phi i64 [ 0, %for.body21.lr.ph ], [ %indvars.iv.next63, %for.body21 ] %6 = phi i8 [ %5, %for.body21.lr.ph ], [ %9, %for.body21 ] %arrayidx1757 = phi ptr [ %ward2, %for.body21.lr.ph ], [ %arrayidx17, %for.body21 ] %7 = load ptr, ptr %call23, align 8, !tbaa !8 %idxprom27 = sext i8 %6 to i64 %arrayidx28 = getelementptr inbounds i32, ptr %7, i64 %idxprom27 %8 = load i32, ptr %arrayidx28, align 4, !tbaa !10 %conv30 = trunc i32 %8 to i8 store i8 %conv30, ptr %arrayidx1757, align 1, !tbaa !5 %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1 %arrayidx17 = getelementptr inbounds [21 x i8], ptr %ward2, i64 0, i64 %indvars.iv.next63 %9 = load i8, ptr %arrayidx17, align 1, !tbaa !5 %cmp19.not = icmp eq i8 %9, 0 br i1 %cmp19.not, label %for.end35, label %for.body21, !llvm.loop !14 for.end35: ; preds = %for.body21, %for.cond15.preheader %call38 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %ward1, ptr noundef nonnull dereferenceable(1) %ward2) #9 %tobool39.not = icmp eq i32 %call38, 0 %inc41 = zext i1 %tobool39.not to i32 %spec.select = add nuw nsw i32 %n.061, %inc41 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ward2) %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(12) %ward2, ptr noundef nonnull dereferenceable(12) @.str.1, i64 12) %tobool.not = icmp eq i32 %bcmp, 0 br i1 %tobool.not, label %while.end, label %for.cond15.preheader while.end: ; preds = %for.end35, %while.cond.preheader %n.0.lcssa = phi i32 [ 0, %while.cond.preheader ], [ %spec.select, %for.end35 ] %call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %n.0.lcssa) call void @llvm.lifetime.end.p0(i64 21, ptr nonnull %ward2) #7 call void @llvm.lifetime.end.p0(i64 21, ptr nonnull %ward1) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) declare ptr @__ctype_tolower_loc() local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree 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 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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind willreturn memory(argmem: read) } attributes #7 = { nounwind } attributes #8 = { nounwind willreturn memory(none) } attributes #9 = { 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 = !{!"any pointer", !6, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"int", !6, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13}
#include<stdio.h> int main() { int a, y; scanf("%d %d", &a, &y); if(a==2||y==2){ printf("No\n"); } else if((a==1||a==3||a==5||a==7||a==8||a==10||a==12)&&(y==1||y==3||y==5||y==7||y==8||y==10||y==12)) { printf("Yes\n"); } else if((a==4||a==6||a==9||a==11)&&(y==4||y==6||y==9||y==11)) { printf("Yes"); } else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130438/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130438/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.5 = 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: %a = alloca i32, align 4 %y = 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 %y) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %y) %0 = load i32, ptr %a, align 4 %cmp = icmp eq i32 %0, 2 %1 = load i32, ptr %y, align 4 %cmp1 = icmp eq i32 %1, 2 %or.cond = select i1 %cmp, i1 true, i1 %cmp1 br i1 %or.cond, label %if.then, label %if.else if.then: ; preds = %entry %puts72 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br label %if.end52 if.else: ; preds = %entry switch i32 %0, label %if.else49 [ i32 12, label %land.lhs.true i32 10, label %land.lhs.true i32 8, label %land.lhs.true i32 7, label %land.lhs.true i32 5, label %land.lhs.true i32 3, label %land.lhs.true i32 1, label %land.lhs.true i32 11, label %land.lhs.true39 i32 9, label %land.lhs.true39 i32 6, label %land.lhs.true39 i32 4, label %land.lhs.true39 ] land.lhs.true: ; preds = %if.else, %if.else, %if.else, %if.else, %if.else, %if.else, %if.else switch i32 %1, label %if.else31 [ i32 12, label %if.then29 i32 10, label %if.then29 i32 8, label %if.then29 i32 7, label %if.then29 i32 5, label %if.then29 i32 3, label %if.then29 i32 1, label %if.then29 ] if.then29: ; preds = %land.lhs.true, %land.lhs.true, %land.lhs.true, %land.lhs.true, %land.lhs.true, %land.lhs.true, %land.lhs.true %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end52 if.else31: ; preds = %land.lhs.true switch i32 %0, label %if.else49 [ i32 11, label %land.lhs.true39 i32 9, label %land.lhs.true39 i32 6, label %land.lhs.true39 i32 4, label %land.lhs.true39 ] land.lhs.true39: ; preds = %if.else, %if.else, %if.else, %if.else, %if.else31, %if.else31, %if.else31, %if.else31 switch i32 %1, label %if.else49 [ i32 11, label %if.then47 i32 9, label %if.then47 i32 6, label %if.then47 i32 4, label %if.then47 ] if.then47: ; preds = %land.lhs.true39, %land.lhs.true39, %land.lhs.true39, %land.lhs.true39 %call48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @str) br label %if.end52 if.else49: ; preds = %if.else, %land.lhs.true39, %if.else31 %call50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @str.5) br label %if.end52 if.end52: ; preds = %if.then29, %if.else49, %if.then47, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #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 @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(void){ int a[12]={0,1,3,1,2,1,2,1,1,2,1,2,1},x,y; scanf("%d%d",&x,&y); a[x]==a[y] ? printf("Yes") : printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130481/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130481/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" @__const.main.a = private unnamed_addr constant [12 x i32] [i32 0, i32 1, i32 3, i32 1, i32 2, i32 1, i32 2, i32 1, i32 1, i32 2, i32 1, i32 2], align 16 @.str = private unnamed_addr constant [5 x i8] c"%d%d\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: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds [12 x i32], ptr @__const.main.a, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = load i32, ptr %y, align 4, !tbaa !5 %idxprom1 = sext i32 %2 to i64 %arrayidx2 = getelementptr inbounds [12 x i32], ptr @__const.main.a, i64 0, i64 %idxprom1 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp = icmp eq i32 %1, %3 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int group[] = {0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1}; int x, y; scanf("%d %d", &x, &y); puts(group[x] == group[y] ? "Yes" : "No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130531/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130531/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" @__const.main.group = private unnamed_addr constant [13 x i32] [i32 0, i32 1, i32 3, i32 1, i32 2, i32 1, i32 2, i32 1, i32 1, i32 2, i32 1, i32 2, i32 1], align 16 @.str = private unnamed_addr constant [6 x i8] c"%d %d\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: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds [13 x i32], ptr @__const.main.group, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = load i32, ptr %y, align 4, !tbaa !5 %idxprom1 = sext i32 %2 to i64 %arrayidx2 = getelementptr inbounds [13 x i32], ptr @__const.main.group, i64 0, i64 %idxprom1 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp = icmp eq i32 %1, %3 %cond = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call3 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 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(void) { int x, y, i, j, a[7] = { 1, 3, 5, 7, 8, 10, 12 }, b[4] = { 4, 6, 9, 11 }, c[1] = { 2 }; scanf("%d %d", &x, &y); for (i = 0; i < 7; i++) { if (x == a[i]) { for (j = 0; j < 7; j++) { if (y == a[j]) { printf("Yes"); return(0); } } } } for (i = 0; i < 4; i++) { if (x == b[i]) { for (j = 0; j < 4; j++) { if (y == b[j]) { printf("Yes"); return(0); } } } } printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130575/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130575/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"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @switch.table.main.8 = private unnamed_addr constant [12 x ptr] [ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1], align 8 @switch.table.main.12 = private unnamed_addr constant [8 x ptr] [ptr @.str.1, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.2, ptr @.str.1, ptr @.str.2, ptr @.str.1], align 8 ; 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) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4 switch i32 %0, label %cleanup [ i32 1, label %for.body4.preheader i32 3, label %for.body4.preheader.1 i32 5, label %for.body4.preheader.2 i32 7, label %for.body4.preheader.3 i32 8, label %for.body4.preheader.4 i32 10, label %for.body4.preheader.5 i32 12, label %for.body4.preheader.6 i32 4, label %for.body23.preheader i32 6, label %for.body23.preheader.1 i32 9, label %for.body23.preheader.2 i32 11, label %for.body23.preheader.3 ] for.body4.preheader: ; preds = %entry %switch.tableidx = add i32 %1, -1 %2 = icmp ult i32 %switch.tableidx, 12 br i1 %2, label %switch.lookup, label %cleanup for.body4.preheader.1: ; preds = %entry %switch.tableidx106 = add i32 %1, -1 %3 = icmp ult i32 %switch.tableidx106, 12 br i1 %3, label %switch.lookup105, label %cleanup for.body4.preheader.2: ; preds = %entry %switch.tableidx110 = add i32 %1, -1 %4 = icmp ult i32 %switch.tableidx110, 12 br i1 %4, label %switch.lookup109, label %cleanup for.body4.preheader.3: ; preds = %entry %switch.tableidx114 = add i32 %1, -1 %5 = icmp ult i32 %switch.tableidx114, 12 br i1 %5, label %switch.lookup113, label %cleanup for.body4.preheader.4: ; preds = %entry %switch.tableidx118 = add i32 %1, -1 %6 = icmp ult i32 %switch.tableidx118, 12 br i1 %6, label %switch.lookup117, label %cleanup for.body4.preheader.5: ; preds = %entry %switch.tableidx122 = add i32 %1, -1 %7 = icmp ult i32 %switch.tableidx122, 12 br i1 %7, label %switch.lookup121, label %cleanup for.body4.preheader.6: ; preds = %entry %switch.tableidx126 = add i32 %1, -1 %8 = icmp ult i32 %switch.tableidx126, 12 br i1 %8, label %switch.lookup125, label %cleanup for.body23.preheader: ; preds = %entry %switch.tableidx130 = add i32 %1, -4 %9 = icmp ult i32 %switch.tableidx130, 8 br i1 %9, label %switch.lookup129, label %cleanup for.body23.preheader.1: ; preds = %entry %switch.tableidx134 = add i32 %1, -4 %10 = icmp ult i32 %switch.tableidx134, 8 br i1 %10, label %switch.lookup133, label %cleanup for.body23.preheader.2: ; preds = %entry %switch.tableidx138 = add i32 %1, -4 %11 = icmp ult i32 %switch.tableidx138, 8 br i1 %11, label %switch.lookup137, label %cleanup for.body23.preheader.3: ; preds = %entry %switch.tableidx142 = add i32 %1, -4 %12 = icmp ult i32 %switch.tableidx142, 8 br i1 %12, label %switch.lookup141, label %cleanup switch.lookup: ; preds = %for.body4.preheader %13 = sext i32 %switch.tableidx to i64 %switch.gep = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %13 br label %cleanup.sink.split switch.lookup105: ; preds = %for.body4.preheader.1 %14 = sext i32 %switch.tableidx106 to i64 %switch.gep107 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %14 br label %cleanup.sink.split switch.lookup109: ; preds = %for.body4.preheader.2 %15 = sext i32 %switch.tableidx110 to i64 %switch.gep111 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %15 br label %cleanup.sink.split switch.lookup113: ; preds = %for.body4.preheader.3 %16 = sext i32 %switch.tableidx114 to i64 %switch.gep115 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %16 br label %cleanup.sink.split switch.lookup117: ; preds = %for.body4.preheader.4 %17 = sext i32 %switch.tableidx118 to i64 %switch.gep119 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %17 br label %cleanup.sink.split switch.lookup121: ; preds = %for.body4.preheader.5 %18 = sext i32 %switch.tableidx122 to i64 %switch.gep123 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %18 br label %cleanup.sink.split switch.lookup125: ; preds = %for.body4.preheader.6 %19 = sext i32 %switch.tableidx126 to i64 %switch.gep127 = getelementptr inbounds [12 x ptr], ptr @switch.table.main.8, i64 0, i64 %19 br label %cleanup.sink.split switch.lookup129: ; preds = %for.body23.preheader %20 = sext i32 %switch.tableidx130 to i64 %switch.gep131 = getelementptr inbounds [8 x ptr], ptr @switch.table.main.12, i64 0, i64 %20 br label %cleanup.sink.split switch.lookup133: ; preds = %for.body23.preheader.1 %21 = sext i32 %switch.tableidx134 to i64 %switch.gep135 = getelementptr inbounds [8 x ptr], ptr @switch.table.main.12, i64 0, i64 %21 br label %cleanup.sink.split switch.lookup137: ; preds = %for.body23.preheader.2 %22 = sext i32 %switch.tableidx138 to i64 %switch.gep139 = getelementptr inbounds [8 x ptr], ptr @switch.table.main.12, i64 0, i64 %22 br label %cleanup.sink.split switch.lookup141: ; preds = %for.body23.preheader.3 %23 = sext i32 %switch.tableidx142 to i64 %switch.gep143 = getelementptr inbounds [8 x ptr], ptr @switch.table.main.12, i64 0, i64 %23 br label %cleanup.sink.split cleanup.sink.split: ; preds = %switch.lookup, %switch.lookup105, %switch.lookup109, %switch.lookup113, %switch.lookup117, %switch.lookup121, %switch.lookup125, %switch.lookup129, %switch.lookup133, %switch.lookup137, %switch.lookup141 %switch.gep143.sink = phi ptr [ %switch.gep143, %switch.lookup141 ], [ %switch.gep139, %switch.lookup137 ], [ %switch.gep135, %switch.lookup133 ], [ %switch.gep131, %switch.lookup129 ], [ %switch.gep127, %switch.lookup125 ], [ %switch.gep123, %switch.lookup121 ], [ %switch.gep119, %switch.lookup117 ], [ %switch.gep115, %switch.lookup113 ], [ %switch.gep111, %switch.lookup109 ], [ %switch.gep107, %switch.lookup105 ], [ %switch.gep, %switch.lookup ] %switch.load144 = load ptr, ptr %switch.gep143.sink, align 8 br label %cleanup cleanup: ; preds = %cleanup.sink.split, %entry, %for.body4.preheader, %for.body4.preheader.1, %for.body4.preheader.2, %for.body4.preheader.3, %for.body4.preheader.4, %for.body4.preheader.5, %for.body4.preheader.6, %for.body23.preheader, %for.body23.preheader.1, %for.body23.preheader.2, %for.body23.preheader.3 %.str.2.sink = phi ptr [ @.str.2, %for.body23.preheader.3 ], [ @.str.2, %for.body23.preheader.2 ], [ @.str.2, %for.body23.preheader.1 ], [ @.str.2, %for.body23.preheader ], [ @.str.2, %for.body4.preheader.6 ], [ @.str.2, %for.body4.preheader.5 ], [ @.str.2, %for.body4.preheader.4 ], [ @.str.2, %for.body4.preheader.3 ], [ @.str.2, %for.body4.preheader.2 ], [ @.str.2, %for.body4.preheader.1 ], [ @.str.2, %for.body4.preheader ], [ @.str.2, %entry ], [ %switch.load144, %cleanup.sink.split ] %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int x,y; int i; scanf("%d %d",&x,&y); if( 1 <= x && x <= 12 && y <= 12 && x <= y){ if( x != 2 && x != 4 && x != 6 && x != 9 && x != 11 && y != 2 && y != 4 && y != 6 && y != 9 && y != 11 ){ printf("Yes"); } else if( x == 4 || x == 6 || x == 9 || x == 11 && y == 4 || y == 6 || y == 9 || y == 11 ){ printf("Yes"); } else if( x == 2 && y == 2 ){ printf("Yes"); } else{ printf("No"); } }else{ printf("error"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130618/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130618/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"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"error\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) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4 %1 = add i32 %0, -13 %or.cond = icmp ult i32 %1, -12 %2 = load i32, ptr %y, align 4 %cmp3 = icmp sgt i32 %2, 12 %or.cond56.not75 = select i1 %or.cond, i1 true, i1 %cmp3 %cmp5.not = icmp sgt i32 %0, %2 %or.cond74 = select i1 %or.cond56.not75, i1 true, i1 %cmp5.not br i1 %or.cond74, label %if.end55, label %if.then if.then: ; preds = %entry %3 = and i32 %0, -5 %4 = and i32 %0, -3 %5 = insertelement <8 x i32> poison, i32 %3, i64 0 %6 = insertelement <8 x i32> %5, i32 %0, i64 1 %7 = insertelement <8 x i32> %6, i32 %4, i64 2 %8 = insertelement <8 x i32> %7, i32 %2, i64 3 %9 = shufflevector <8 x i32> %8, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 3, i32 3, i32 3, i32 3> %.fr = freeze <8 x i32> %9 %10 = icmp eq <8 x i32> %.fr, <i32 2, i32 4, i32 9, i32 2, i32 4, i32 6, i32 9, i32 11> %11 = bitcast <8 x i1> %10 to i8 %12 = icmp eq i8 %11, 0 br i1 %12, label %if.end55, label %if.else if.else: ; preds = %if.then switch i32 %0, label %lor.lhs.false31 [ i32 9, label %if.end55 i32 6, label %if.end55 i32 4, label %if.end55 ] lor.lhs.false31: ; preds = %if.else %cmp32 = icmp eq i32 %0, 11 %cmp34 = icmp eq i32 %2, 4 %or.cond68 = select i1 %cmp32, i1 %cmp34, i1 false %13 = freeze i1 %or.cond68 br i1 %13, label %if.end55, label %switch.early.test switch.early.test: ; preds = %lor.lhs.false31 switch i32 %2, label %if.else43 [ i32 11, label %if.end55 i32 9, label %if.end55 i32 6, label %if.end55 ] if.else43: ; preds = %switch.early.test %cmp44 = icmp eq i32 %0, 2 %cmp46 = icmp eq i32 %2, 2 %or.cond72 = select i1 %cmp44, i1 %cmp46, i1 false %.str.1..str.2 = select i1 %or.cond72, ptr @.str.1, ptr @.str.2 br label %if.end55 if.end55: ; preds = %entry, %if.else43, %if.else, %if.else, %if.else, %lor.lhs.false31, %switch.early.test, %switch.early.test, %switch.early.test, %if.then %.str.1.sink = phi ptr [ @.str.1, %if.then ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %lor.lhs.false31 ], [ @.str.1, %if.else ], [ @.str.1, %if.else ], [ @.str.1, %if.else ], [ %.str.1..str.2, %if.else43 ], [ @.str.3, %entry ] %call26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"}
#include <stdio.h> #include <string.h> #include <math.h> int main(void) { int x,y; scanf("%d %d",&x,&y); if(x==2){ x='c'; } else if(x==4 || x==6 || x==9 || x==11){ x='b'; } else{ x='a'; } if(y==2){ y='c'; } else if(y==4 || y==6 || y==9 || y==11){ y='b'; } else{ y='a'; } if(x==y){ puts("Yes"); } else{ puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130661/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130661/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"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: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4 switch i32 %0, label %if.else8 [ i32 2, label %if.then i32 11, label %if.then7 i32 9, label %if.then7 i32 6, label %if.then7 i32 4, label %if.then7 ] if.then: ; preds = %entry store i32 99, ptr %x, align 4, !tbaa !5 br label %if.end9 if.then7: ; preds = %entry, %entry, %entry, %entry store i32 98, ptr %x, align 4, !tbaa !5 br label %if.end9 if.else8: ; preds = %entry store i32 97, ptr %x, align 4, !tbaa !5 br label %if.end9 if.end9: ; preds = %if.then7, %if.else8, %if.then %1 = phi i32 [ 98, %if.then7 ], [ 97, %if.else8 ], [ 99, %if.then ] %2 = load i32, ptr %y, align 4 switch i32 %2, label %if.else21 [ i32 2, label %if.then11 i32 11, label %if.then20 i32 9, label %if.then20 i32 6, label %if.then20 i32 4, label %if.then20 ] if.then11: ; preds = %if.end9 store i32 99, ptr %y, align 4, !tbaa !5 br label %if.end23 if.then20: ; preds = %if.end9, %if.end9, %if.end9, %if.end9 store i32 98, ptr %y, align 4, !tbaa !5 br label %if.end23 if.else21: ; preds = %if.end9 store i32 97, ptr %y, align 4, !tbaa !5 br label %if.end23 if.end23: ; preds = %if.then20, %if.else21, %if.then11 %3 = phi i32 [ 98, %if.then20 ], [ 97, %if.else21 ], [ 99, %if.then11 ] %cmp24 = icmp eq i32 %1, %3 %.str.1..str.2 = select i1 %cmp24, ptr @.str.1, ptr @.str.2 %call28 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 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(void){ int x,y; scanf("%d%d",&x,&y); if(x==2||y==2) printf("No\n"); else if((x<8&&x%2==1)&&((y<8&&y%2==1)||(y>7&&y%2==0))) printf("Yes\n"); else if(x>7&&x%2==0&&y%2==0) printf("Yes\n"); else if((x<7&&x%2==0)&&((y<7&&y%2==0)||(y>8&&y%2==1))) printf("Yes\n"); else if(x==9&&y==11) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130704/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.6 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.7 = 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: %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 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 2 %1 = load i32, ptr %y, align 4 %cmp1 = icmp eq i32 %1, 2 %or.cond = select i1 %cmp, i1 true, i1 %cmp1 br i1 %or.cond, label %if.end55, label %if.else if.else: ; preds = %entry %cmp3 = icmp slt i32 %0, 8 %2 = and i32 %0, -2147483647 %cmp4 = icmp eq i32 %2, 1 %or.cond68 = and i1 %cmp3, %cmp4 br i1 %or.cond68, label %land.lhs.true5, label %if.else17 land.lhs.true5: ; preds = %if.else %cmp6 = icmp slt i32 %1, 8 %3 = and i32 %1, -2147483647 %cmp9 = icmp eq i32 %3, 1 %or.cond69 = and i1 %cmp6, %cmp9 br i1 %or.cond69, label %if.end55, label %lor.lhs.false10 lor.lhs.false10: ; preds = %land.lhs.true5 %cmp11 = icmp sgt i32 %1, 7 %rem13 = and i32 %1, 1 %cmp14 = icmp eq i32 %rem13, 0 %or.cond70 = and i1 %cmp11, %cmp14 br i1 %or.cond70, label %if.end55, label %if.else17.thread if.else17.thread: ; preds = %lor.lhs.false10 %rem2076 = and i32 %0, 1 %cmp2177 = icmp eq i32 %rem2076, 0 br label %if.else27 if.else17: ; preds = %if.else %cmp18 = icmp sgt i32 %0, 7 %rem20 = and i32 %0, 1 %cmp21 = icmp eq i32 %rem20, 0 %or.cond71 = and i1 %cmp18, %cmp21 br i1 %or.cond71, label %land.lhs.true22, label %if.else27 land.lhs.true22: ; preds = %if.else17 %4 = and i32 %1, 1 %cmp24 = icmp eq i32 %4, 0 br i1 %cmp24, label %if.end55, label %if.else44 if.else27: ; preds = %if.else17.thread, %if.else17 %cmp2179 = phi i1 [ %cmp2177, %if.else17.thread ], [ %cmp21, %if.else17 ] %cmp28 = icmp slt i32 %0, 7 %or.cond72 = and i1 %cmp28, %cmp2179 br i1 %or.cond72, label %land.lhs.true32, label %if.else44 land.lhs.true32: ; preds = %if.else27 %cmp33 = icmp slt i32 %1, 7 %5 = and i32 %1, 1 %cmp36 = icmp eq i32 %5, 0 %or.cond73 = and i1 %cmp33, %cmp36 %or.cond73.not = xor i1 %or.cond73, true %cmp38 = icmp slt i32 %1, 9 %or.cond74 = or i1 %cmp38, %cmp36 %or.cond86 = select i1 %or.cond73.not, i1 %or.cond74, i1 false br i1 %or.cond86, label %if.else50, label %if.end55 if.else44: ; preds = %land.lhs.true22, %if.else27 %cmp45 = icmp eq i32 %0, 9 %cmp47 = icmp eq i32 %1, 11 %or.cond56 = select i1 %cmp45, i1 %cmp47, i1 false br i1 %or.cond56, label %if.end55, label %if.else50 if.else50: ; preds = %land.lhs.true32, %if.else44 br label %if.end55 if.end55: ; preds = %if.else44, %land.lhs.true32, %land.lhs.true22, %land.lhs.true5, %lor.lhs.false10, %entry, %if.else50 %str.6.sink = phi ptr [ @str.7, %if.else50 ], [ @str.7, %entry ], [ @str.6, %lor.lhs.false10 ], [ @str.6, %land.lhs.true5 ], [ @str.6, %land.lhs.true22 ], [ @str.6, %land.lhs.true32 ], [ @str.6, %if.else44 ] %puts66 = call i32 @puts(ptr nonnull dereferenceable(1) %str.6.sink) 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int a,b,d,r; scanf("%d %d",&a,&b); double f; d=a/b; r=a%b; f=(double)a/b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130748/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130748/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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; scanf("%d%d",&a,&b); printf("%d %d %lf\n",a/b,a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130791/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130791/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 [11 x i8] c"%d %d %lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 argc, char *argv[]) { int a, b; int d, r; double f; scanf("%d %d", &a, &b); d = a / b; r = a % b; f = (double)a / b; printf("%d %d %.5f\n", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130834/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130834/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 [12 x i8] c"%d %d %.5f\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 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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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, d, r; double f; scanf("%d %d", &a, &b); d = a / b; r = a % b; f = (double)a / (double)b; printf("%d %d %lf", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130878/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130878/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 [10 x i8] c"%d %d %lf\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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> void shou(int *a,int *b); int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d %d ",a/b,a%b); shou(&a,&b); return 0; } void shou(int *a,int *b){ double c,d; c=*a; d=*b; printf("%f\n",c/d); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130920/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130920/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"%d %d \00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem) %2 = load i32, ptr %a, align 4, !tbaa !5 %conv.i = sitofp i32 %2 to double %3 = load i32, ptr %b, align 4, !tbaa !5 %conv1.i = sitofp i32 %3 to double %div.i = fdiv double %conv.i, %conv1.i %call.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div.i) 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: nofree nounwind uwtable define dso_local void @shou(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %1 = load i32, ptr %b, align 4, !tbaa !5 %conv1 = sitofp i32 %1 to double %div = fdiv double %conv, %conv1 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div) ret void } ; 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 a, b, divd, mod; double divf; scanf("%d %d", &a, &b); divd = a / b; mod = a % b; divf = (double) a / b; printf("%d %d %.5f\n", divd, mod, divf); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_130964/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_130964/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 [12 x i8] c"%d %d %.5f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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,d,r; double f; scanf("%d %d",&a,&b); r=a%b; d=(a-r)/b; f=1.0*a/b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131006/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131006/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %rem = srem i32 %0, %1 %div = sdiv i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a,b,d,r; double f; scanf("%d %d",&a,&b); d=a/b; r=a%b; f=(double)a/(double)b; printf("%d %d %lf",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131057/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131057/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 [10 x i8] c"%d %d %lf\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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> typedef struct chars { int x,cnt; }num; int compare(const void *a,const void *b){ return *(int*)a - *(int*)b; } int main() { int n; scanf("%d",&n); int i,a[5001]={}; num map[5001]; for ( i = 0; i < 5001; ++i) { map[i].x=-1; map[i].cnt=0; } for ( i = 0; i < n; ++i) { scanf("%d",&a[i]); } qsort(a,n,sizeof(int),compare); int ans=0,j=0; for(i=n;i>=0;i--) { if(map[j].x==-1){ map[j].x=a[i]; map[j].cnt=1; } else if(a[i] == a[i+1] && i!=n){ map[j].cnt++; } else{ j++; map[j].x=a[i]; map[j].cnt=1; } } int max=0; for(i=1;i<5001;i++){ if(map[i].x == -1){ break; } // printf("%d %d\n",map[i].x,map[i].cnt); if(map[i].cnt>max) max=map[i].cnt; } printf("%d\n",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13110/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13110/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.chars = type { i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %a = alloca [5001 x i32], align 16 %map = alloca [5001 x %struct.chars], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 20004, ptr nonnull %a) #7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(20004) %a, i8 0, i64 20004, i1 false) call void @llvm.lifetime.start.p0(i64 40008, ptr nonnull %map) #7 br label %vector.body vector.body: ; preds = %vector.body, %entry %index = phi i64 [ 0, %entry ], [ %index.next.1, %vector.body ] %0 = or i64 %index, 2 %1 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %index %2 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %0 store <4 x i32> <i32 -1, i32 0, i32 -1, i32 0>, ptr %1, align 16, !tbaa !5 store <4 x i32> <i32 -1, i32 0, i32 -1, i32 0>, ptr %2, align 16, !tbaa !5 %index.next = or i64 %index, 4 %3 = or i64 %index, 6 %4 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %index.next %5 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %3 store <4 x i32> <i32 -1, i32 0, i32 -1, i32 0>, ptr %4, align 16, !tbaa !5 store <4 x i32> <i32 -1, i32 0, i32 -1, i32 0>, ptr %5, align 16, !tbaa !5 %index.next.1 = add nuw nsw i64 %index, 8 %6 = icmp eq i64 %index.next.1, 5000 br i1 %6, label %for.body, label %vector.body, !llvm.loop !9 for.cond3.preheader.for.end11_crit_edge: ; preds = %for.body %.pre = sext i32 %7 to i64 br label %for.end11 for.body: ; preds = %vector.body %arrayidx = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 5000 store i32 -1, ptr %arrayidx, align 16, !tbaa !13 %cnt = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 5000, i32 1 store i32 0, ptr %cnt, align 4, !tbaa !15 %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp4107 = icmp sgt i32 %7, 0 br i1 %cmp4107, label %for.body5, label %for.cond3.preheader.for.end11_crit_edge for.body5: ; preds = %for.body, %for.body5 %indvars.iv116 = phi i64 [ %indvars.iv.next117, %for.body5 ], [ 0, %for.body ] %arrayidx7 = getelementptr inbounds [5001 x i32], ptr %a, i64 0, i64 %indvars.iv116 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx7) %indvars.iv.next117 = add nuw nsw i64 %indvars.iv116, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp4 = icmp slt i64 %indvars.iv.next117, %9 br i1 %cmp4, label %for.body5, label %for.end11, !llvm.loop !16 for.end11: ; preds = %for.body5, %for.cond3.preheader.for.end11_crit_edge %conv.pre-phi = phi i64 [ %.pre, %for.cond3.preheader.for.end11_crit_edge ], [ %9, %for.body5 ] call void @qsort(ptr noundef nonnull %a, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @compare) #7 %10 = load i32, ptr %n, align 4 %cmp13109 = icmp sgt i32 %10, -1 br i1 %cmp13109, label %for.body15.preheader, label %for.body58.preheader for.body15.preheader: ; preds = %for.end11 %11 = zext i32 %10 to i64 br label %for.body15 for.body15: ; preds = %for.body15.preheader, %for.inc53 %indvars.iv119 = phi i64 [ %11, %for.body15.preheader ], [ %indvars.iv.next120, %for.inc53 ] %j.0111 = phi i32 [ 0, %for.body15.preheader ], [ %j.1, %for.inc53 ] %idxprom16 = sext i32 %j.0111 to i64 %arrayidx17 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %idxprom16 %12 = load i32, ptr %arrayidx17, align 8, !tbaa !13 %cmp19 = icmp eq i32 %12, -1 %arrayidx22 = getelementptr inbounds [5001 x i32], ptr %a, i64 0, i64 %indvars.iv119 %13 = load i32, ptr %arrayidx22, align 4, !tbaa !5 br i1 %cmp19, label %if.then, label %if.else if.then: ; preds = %for.body15 store i32 %13, ptr %arrayidx17, align 8, !tbaa !13 %cnt28 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %idxprom16, i32 1 store i32 1, ptr %cnt28, align 4, !tbaa !15 br label %for.inc53 if.else: ; preds = %for.body15 %14 = add nuw nsw i64 %indvars.iv119, 1 %arrayidx32 = getelementptr inbounds [5001 x i32], ptr %a, i64 0, i64 %14 %15 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %cmp33 = icmp ne i32 %13, %15 %cmp35.not = icmp eq i64 %indvars.iv119, %11 %or.cond = or i1 %cmp33, %cmp35.not br i1 %or.cond, label %if.else42, label %if.then37 if.then37: ; preds = %if.else %cnt40 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %idxprom16, i32 1 %16 = load i32, ptr %cnt40, align 4, !tbaa !15 %inc41 = add nsw i32 %16, 1 store i32 %inc41, ptr %cnt40, align 4, !tbaa !15 br label %for.inc53 if.else42: ; preds = %if.else %inc43 = add nsw i32 %j.0111, 1 %idxprom46 = sext i32 %inc43 to i64 %arrayidx47 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %idxprom46 store i32 %13, ptr %arrayidx47, align 8, !tbaa !13 %cnt51 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %idxprom46, i32 1 store i32 1, ptr %cnt51, align 4, !tbaa !15 br label %for.inc53 for.inc53: ; preds = %if.then, %if.else42, %if.then37 %j.1 = phi i32 [ %j.0111, %if.then ], [ %j.0111, %if.then37 ], [ %inc43, %if.else42 ] %indvars.iv.next120 = add nsw i64 %indvars.iv119, -1 %cmp13 = icmp sgt i64 %indvars.iv119, 0 br i1 %cmp13, label %for.body15, label %for.body58.preheader, !llvm.loop !17 for.body58.preheader: ; preds = %for.inc53, %for.end11 br label %for.body58 for.body58: ; preds = %if.end65.1, %for.body58.preheader %indvars.iv123 = phi i64 [ 1, %for.body58.preheader ], [ %indvars.iv.next124.1, %if.end65.1 ] %max.0113 = phi i32 [ 0, %for.body58.preheader ], [ %spec.select.1, %if.end65.1 ] %arrayidx60 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %indvars.iv123 %17 = load i32, ptr %arrayidx60, align 8, !tbaa !13 %cmp62 = icmp eq i32 %17, -1 br i1 %cmp62, label %for.end78, label %if.end65 if.end65: ; preds = %for.body58 %cnt68 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %indvars.iv123, i32 1 %18 = load i32, ptr %cnt68, align 4, !tbaa !15 %spec.select = call i32 @llvm.smax.i32(i32 %18, i32 %max.0113) %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 1 %arrayidx60.1 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %indvars.iv.next124 %19 = load i32, ptr %arrayidx60.1, align 8, !tbaa !13 %cmp62.1 = icmp eq i32 %19, -1 br i1 %cmp62.1, label %for.end78, label %if.end65.1 if.end65.1: ; preds = %if.end65 %cnt68.1 = getelementptr inbounds [5001 x %struct.chars], ptr %map, i64 0, i64 %indvars.iv.next124, i32 1 %20 = load i32, ptr %cnt68.1, align 4, !tbaa !15 %spec.select.1 = call i32 @llvm.smax.i32(i32 %20, i32 %spec.select) %indvars.iv.next124.1 = add nuw nsw i64 %indvars.iv123, 2 %exitcond126.not.1 = icmp eq i64 %indvars.iv.next124.1, 5001 br i1 %exitcond126.not.1, label %for.end78, label %for.body58, !llvm.loop !18 for.end78: ; preds = %if.end65.1, %if.end65, %for.body58 %max.0.lcssa = phi i32 [ %max.0113, %for.body58 ], [ %spec.select, %if.end65 ], [ %spec.select.1, %if.end65.1 ] %call79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 40008, ptr nonnull %map) #7 call void @llvm.lifetime.end.p0(i64 20004, ptr nonnull %a) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = !{!14, !6, i64 0} !14 = !{!"chars", !6, i64 0, !6, i64 4} !15 = !{!14, !6, i64 4} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include<stdio.h> int main(void) { int a,b,d,r; double f; scanf("%d %d",&a,&b); if(1<=a && b<=1E+9){ d=a / b; r=a % b; f=(double)a / (double)b; printf("%d %d %lf\n",d,r,f); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131150/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131150/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 [11 x i8] c"%d %d %lf\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 %a, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 0 br i1 %cmp, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %entry %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp1 = icmp slt i32 %1, 1000000001 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %land.lhs.true %conv = sitofp i32 %1 to double %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv3 = sitofp i32 %0 to double %div5 = fdiv double %conv3, %conv %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div5) br label %if.end if.end: ; preds = %if.then, %land.lhs.true, %entry 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 a,b,d,r; double f; scanf("%d",&a); scanf("%d",&b); d=a/b; r=a%b; f=(double)a/b; printf("%d %d %lf\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131194/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131194/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 [11 x i8] c"%d %d %lf\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) %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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv2 = sitofp i32 %1 to double %div3 = fdiv double %conv, %conv2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div3) 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, d, r; double f; scanf("%d %d", &a, &b); d = a / b; r = a%b; f = 1.0*a / b; printf("%d %d %f", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131237/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 [9 x i8] c"%d %d %f\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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", &a, &b); c = a / b; d = a % b; double e; e = 1.0 * a / b; printf("%d %d %.8lf\n", c, d, e); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131280/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131280/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 [13 x i8] c"%d %d %.8lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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){ // Here your code ! int a,b,d,r; scanf("%d%d",&a,&b); printf("%d %d %.5f\n",a/b,a%b,(double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131323/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131323/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 [12 x i8] c"%d %d %.5f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a,b,d=0,r=0; double f=0; scanf("%d %d",&a,&b); d=a/b; r=a%b; f=(double)a/(double)b; printf("%d %d %lf\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131367/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131367/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 [11 x i8] c"%d %d %lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 ara[100000],i,j,k,h1,h2,a1,a2,c1,sum,tmp,a,b,c; scanf("%d%d%d%d%d",&h1,&a1,&c1,&h2,&a2); k=0; while(1){ if(h1<=a2){ if(a1>=h2){ ara[k++]=2; break; } else{ h1+=c1; h1-=a2; ara[k++]=1; } } else{ h2-=a1; h1-=a2; ara[k++]=2; } if(h2<=0) break; } printf("%d\n",k); for(i=0;i<k;i++){ if(ara[i]==1) printf("HEAL\n"); else printf("STRIKE\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13141/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 [11 x i8] c"%d%d%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [7 x i8] c"STRIKE\00", align 1 @str.4 = private unnamed_addr constant [5 x i8] c"HEAL\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %ara = alloca [100000 x i32], align 16 %h1 = alloca i32, align 4 %h2 = alloca i32, align 4 %a1 = alloca i32, align 4 %a2 = alloca i32, align 4 %c1 = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %ara) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h1) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h2) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a1) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a2) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c1) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h1, ptr noundef nonnull %a1, ptr noundef nonnull %c1, ptr noundef nonnull %h2, ptr noundef nonnull %a2) %0 = load i32, ptr %a2, align 4, !tbaa !5 %h1.promoted = load i32, ptr %h1, align 4, !tbaa !5 %h2.promoted = load i32, ptr %h2, align 4, !tbaa !5 %1 = load i32, ptr %a1, align 4 %2 = load i32, ptr %c1, align 4 br label %while.cond while.cond: ; preds = %if.end12, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %if.end12 ], [ 0, %entry ] %3 = phi i32 [ %5, %if.end12 ], [ %h2.promoted, %entry ] %sub835 = phi i32 [ %storemerge, %if.end12 ], [ %h1.promoted, %entry ] %cmp.not = icmp sgt i32 %sub835, %0 br i1 %cmp.not, label %if.else6, label %if.then if.then: ; preds = %while.cond %cmp1.not = icmp slt i32 %1, %3 br i1 %cmp1.not, label %if.else, label %if.then2 if.then2: ; preds = %if.then %4 = trunc i64 %indvars.iv to i32 %inc = add nuw nsw i32 %4, 1 %idxprom = and i64 %indvars.iv, 4294967295 %arrayidx = getelementptr inbounds [100000 x i32], ptr %ara, i64 0, i64 %idxprom store i32 2, ptr %arrayidx, align 4, !tbaa !5 br label %while.end if.else: ; preds = %if.then %add = sub i32 %sub835, %0 %sub = add i32 %add, %2 br label %if.end12 if.else6: ; preds = %while.cond %sub7 = sub nsw i32 %3, %1 store i32 %sub7, ptr %h2, align 4, !tbaa !5 %sub8 = sub nsw i32 %sub835, %0 br label %if.end12 if.end12: ; preds = %if.else6, %if.else %storemerge = phi i32 [ %sub, %if.else ], [ %sub8, %if.else6 ] %.sink = phi i32 [ 1, %if.else ], [ 2, %if.else6 ] %5 = phi i32 [ %3, %if.else ], [ %sub7, %if.else6 ] store i32 %storemerge, ptr %h1, align 4, !tbaa !5 %arrayidx11 = getelementptr inbounds [100000 x i32], ptr %ara, i64 0, i64 %indvars.iv store i32 %.sink, ptr %arrayidx11, align 4, !tbaa !5 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %cmp13 = icmp slt i32 %5, 1 br i1 %cmp13, label %while.end.loopexit, label %while.cond while.end.loopexit: ; preds = %if.end12 %6 = trunc i64 %indvars.iv.next to i32 br label %while.end while.end: ; preds = %while.end.loopexit, %if.then2 %k.2 = phi i32 [ %inc, %if.then2 ], [ %6, %while.end.loopexit ] %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %k.2) %smax = call i32 @llvm.smax.i32(i32 %k.2, i32 1) %wide.trip.count = zext i32 %smax to i64 br label %for.body for.body: ; preds = %while.end, %for.body %indvars.iv40 = phi i64 [ 0, %while.end ], [ %indvars.iv.next41, %for.body ] %arrayidx19 = getelementptr inbounds [100000 x i32], ptr %ara, i64 0, i64 %indvars.iv40 %7 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp20 = icmp eq i32 %7, 1 %str.4.str = select i1 %cmp20, ptr @str.4, ptr @str %puts33 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.str) %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1 %exitcond.not = icmp eq i64 %indvars.iv.next41, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c1) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a2) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a1) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h2) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h1) #5 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %ara) #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 @puts(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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int partitioning(int A[], int startI, int endI) { int index = startI; int i; for(i=startI; i<endI; i++) { if(A[i] <= A[endI]) { int temp = A[i]; A[i] = A[index]; A[index] = temp; index++; } } int temp = A[endI]; A[endI] = A[index]; A[index] = temp; return index; } void quicksort(int A[], int startI, int endI) { if(startI < endI) { int x = partitioning(A, startI, endI); quicksort(A, startI, x-1); quicksort(A, x+1, endI); } else return; } int ghotona(int A[], int soa) { int i; for(i=0; i < soa; i++) if(A[i] != -1) return 1; return 0; } int main() { int n; scanf("%d", &n); int arr[n]; int i; for(i=0; i<n; i++) scanf("%d", &arr[i]); quicksort(arr, 0, n-1); int box = 0; while(ghotona(arr, n)) { int temp = -1; for(i=0; i<n; i++) { if(arr[i] == -1) continue; if(arr[i] > temp) { temp = arr[i]; arr[i] = -1; } } box++; } printf("%d", box); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13149/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13149/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 norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @partitioning(ptr nocapture noundef %A, i32 noundef %startI, i32 noundef %endI) local_unnamed_addr #0 { entry: %cmp44 = icmp slt i32 %startI, %endI %idxprom1 = sext i32 %endI to i64 br i1 %cmp44, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %idxprom1 %0 = sext i32 %startI to i64 %1 = sub nsw i64 %idxprom1, %0 %xtraiter = and i64 %1, 1 %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.lr.ph %arrayidx.prol = getelementptr inbounds i32, ptr %A, i64 %0 %2 = load i32, ptr %arrayidx.prol, align 4, !tbaa !5 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp3.not.prol = icmp sgt i32 %2, %3 br i1 %cmp3.not.prol, label %for.inc.prol, label %if.then.prol if.then.prol: ; preds = %for.body.prol %idxprom6.prol = sext i32 %startI to i64 %arrayidx7.prol = getelementptr inbounds i32, ptr %A, i64 %idxprom6.prol %4 = load i32, ptr %arrayidx7.prol, align 4, !tbaa !5 store i32 %4, ptr %arrayidx.prol, align 4, !tbaa !5 store i32 %2, ptr %arrayidx7.prol, align 4, !tbaa !5 %inc.prol = add nsw i32 %startI, 1 br label %for.inc.prol for.inc.prol: ; preds = %if.then.prol, %for.body.prol %index.1.prol = phi i32 [ %inc.prol, %if.then.prol ], [ %startI, %for.body.prol ] %indvars.iv.next.prol = add nsw i64 %0, 1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.inc.prol, %for.body.lr.ph %index.1.lcssa.unr = phi i32 [ undef, %for.body.lr.ph ], [ %index.1.prol, %for.inc.prol ] %indvars.iv.unr = phi i64 [ %0, %for.body.lr.ph ], [ %indvars.iv.next.prol, %for.inc.prol ] %index.046.unr = phi i32 [ %startI, %for.body.lr.ph ], [ %index.1.prol, %for.inc.prol ] %5 = sub nsw i64 0, %idxprom1 %6 = xor i64 %0, %5 %7 = icmp eq i64 %6, -1 br i1 %7, label %for.end, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.prol.loopexit %invariant.gep = getelementptr i32, ptr %A, i64 1 br label %for.body for.body: ; preds = %for.inc.1, %for.body.lr.ph.new %indvars.iv = phi i64 [ %indvars.iv.unr, %for.body.lr.ph.new ], [ %indvars.iv.next.1, %for.inc.1 ] %index.046 = phi i32 [ %index.046.unr, %for.body.lr.ph.new ], [ %index.1.1, %for.inc.1 ] %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv %8 = load i32, ptr %arrayidx, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp3.not = icmp sgt i32 %8, %9 br i1 %cmp3.not, label %for.inc, label %if.then if.then: ; preds = %for.body %idxprom6 = sext i32 %index.046 to i64 %arrayidx7 = getelementptr inbounds i32, ptr %A, i64 %idxprom6 %10 = load i32, ptr %arrayidx7, align 4, !tbaa !5 store i32 %10, ptr %arrayidx, align 4, !tbaa !5 store i32 %8, ptr %arrayidx7, align 4, !tbaa !5 %inc = add nsw i32 %index.046, 1 br label %for.inc for.inc: ; preds = %for.body, %if.then %index.1 = phi i32 [ %inc, %if.then ], [ %index.046, %for.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv %11 = load i32, ptr %gep, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp3.not.1 = icmp sgt i32 %11, %12 br i1 %cmp3.not.1, label %for.inc.1, label %if.then.1 if.then.1: ; preds = %for.inc %idxprom6.1 = sext i32 %index.1 to i64 %arrayidx7.1 = getelementptr inbounds i32, ptr %A, i64 %idxprom6.1 %13 = load i32, ptr %arrayidx7.1, align 4, !tbaa !5 store i32 %13, ptr %gep, align 4, !tbaa !5 store i32 %11, ptr %arrayidx7.1, align 4, !tbaa !5 %inc.1 = add nsw i32 %index.1, 1 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %index.1.1 = phi i32 [ %inc.1, %if.then.1 ], [ %index.1, %for.inc ] %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %idxprom1 br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body.prol.loopexit, %for.inc.1, %entry %index.0.lcssa = phi i32 [ %startI, %entry ], [ %index.1.lcssa.unr, %for.body.prol.loopexit ], [ %index.1.1, %for.inc.1 ] %arrayidx15 = getelementptr inbounds i32, ptr %A, i64 %idxprom1 %14 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %idxprom16 = sext i32 %index.0.lcssa to i64 %arrayidx17 = getelementptr inbounds i32, ptr %A, i64 %idxprom16 %15 = load i32, ptr %arrayidx17, align 4, !tbaa !5 store i32 %15, ptr %arrayidx15, align 4, !tbaa !5 store i32 %14, ptr %arrayidx17, align 4, !tbaa !5 ret i32 %index.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 nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quicksort(ptr nocapture noundef %A, i32 noundef %startI, i32 noundef %endI) local_unnamed_addr #2 { entry: %cmp8 = icmp slt i32 %startI, %endI br i1 %cmp8, label %for.body.lr.ph.i.lr.ph, label %if.end for.body.lr.ph.i.lr.ph: ; preds = %entry %idxprom1.i = sext i32 %endI to i64 %arrayidx2.i = getelementptr inbounds i32, ptr %A, i64 %idxprom1.i %0 = sub nsw i64 0, %idxprom1.i %invariant.gep = getelementptr i32, ptr %A, i64 1 br label %for.body.lr.ph.i for.body.lr.ph.i: ; preds = %for.body.lr.ph.i.lr.ph, %partitioning.exit %startI.tr9 = phi i32 [ %startI, %for.body.lr.ph.i.lr.ph ], [ %add, %partitioning.exit ] %1 = sext i32 %startI.tr9 to i64 %2 = sub nsw i64 %idxprom1.i, %1 %xtraiter = and i64 %2, 1 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol for.body.i.prol: ; preds = %for.body.lr.ph.i %arrayidx.i.prol = getelementptr inbounds i32, ptr %A, i64 %1 %3 = load i32, ptr %arrayidx.i.prol, align 4, !tbaa !5 %4 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %cmp3.not.i.prol = icmp sgt i32 %3, %4 br i1 %cmp3.not.i.prol, label %for.inc.i.prol, label %if.then.i.prol if.then.i.prol: ; preds = %for.body.i.prol %idxprom6.i.prol = sext i32 %startI.tr9 to i64 %arrayidx7.i.prol = getelementptr inbounds i32, ptr %A, i64 %idxprom6.i.prol %5 = load i32, ptr %arrayidx7.i.prol, align 4, !tbaa !5 store i32 %5, ptr %arrayidx.i.prol, align 4, !tbaa !5 store i32 %3, ptr %arrayidx7.i.prol, align 4, !tbaa !5 %inc.i.prol = add nsw i32 %startI.tr9, 1 br label %for.inc.i.prol for.inc.i.prol: ; preds = %if.then.i.prol, %for.body.i.prol %index.1.i.prol = phi i32 [ %inc.i.prol, %if.then.i.prol ], [ %startI.tr9, %for.body.i.prol ] %indvars.iv.next.i.prol = add nsw i64 %1, 1 br label %for.body.i.prol.loopexit for.body.i.prol.loopexit: ; preds = %for.inc.i.prol, %for.body.lr.ph.i %index.1.i.lcssa.unr = phi i32 [ undef, %for.body.lr.ph.i ], [ %index.1.i.prol, %for.inc.i.prol ] %indvars.iv.i.unr = phi i64 [ %1, %for.body.lr.ph.i ], [ %indvars.iv.next.i.prol, %for.inc.i.prol ] %index.046.i.unr = phi i32 [ %startI.tr9, %for.body.lr.ph.i ], [ %index.1.i.prol, %for.inc.i.prol ] %6 = xor i64 %1, %0 %7 = icmp eq i64 %6, -1 br i1 %7, label %partitioning.exit, label %for.body.i for.body.i: ; preds = %for.body.i.prol.loopexit, %for.inc.i.1 %indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.inc.i.1 ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ] %index.046.i = phi i32 [ %index.1.i.1, %for.inc.i.1 ], [ %index.046.i.unr, %for.body.i.prol.loopexit ] %arrayidx.i = getelementptr inbounds i32, ptr %A, i64 %indvars.iv.i %8 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %cmp3.not.i = icmp sgt i32 %8, %9 br i1 %cmp3.not.i, label %for.inc.i, label %if.then.i if.then.i: ; preds = %for.body.i %idxprom6.i = sext i32 %index.046.i to i64 %arrayidx7.i = getelementptr inbounds i32, ptr %A, i64 %idxprom6.i %10 = load i32, ptr %arrayidx7.i, align 4, !tbaa !5 store i32 %10, ptr %arrayidx.i, align 4, !tbaa !5 store i32 %8, ptr %arrayidx7.i, align 4, !tbaa !5 %inc.i = add nsw i32 %index.046.i, 1 br label %for.inc.i for.inc.i: ; preds = %if.then.i, %for.body.i %index.1.i = phi i32 [ %inc.i, %if.then.i ], [ %index.046.i, %for.body.i ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.i %11 = load i32, ptr %gep, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %cmp3.not.i.1 = icmp sgt i32 %11, %12 br i1 %cmp3.not.i.1, label %for.inc.i.1, label %if.then.i.1 if.then.i.1: ; preds = %for.inc.i %idxprom6.i.1 = sext i32 %index.1.i to i64 %arrayidx7.i.1 = getelementptr inbounds i32, ptr %A, i64 %idxprom6.i.1 %13 = load i32, ptr %arrayidx7.i.1, align 4, !tbaa !5 store i32 %13, ptr %gep, align 4, !tbaa !5 store i32 %11, ptr %arrayidx7.i.1, align 4, !tbaa !5 %inc.i.1 = add nsw i32 %index.1.i, 1 br label %for.inc.i.1 for.inc.i.1: ; preds = %if.then.i.1, %for.inc.i %index.1.i.1 = phi i32 [ %inc.i.1, %if.then.i.1 ], [ %index.1.i, %for.inc.i ] %indvars.iv.next.i.1 = add nsw i64 %indvars.iv.i, 2 %exitcond.not.i.1 = icmp eq i64 %indvars.iv.next.i.1, %idxprom1.i br i1 %exitcond.not.i.1, label %partitioning.exit, label %for.body.i, !llvm.loop !9 partitioning.exit: ; preds = %for.inc.i.1, %for.body.i.prol.loopexit %index.1.i.lcssa = phi i32 [ %index.1.i.lcssa.unr, %for.body.i.prol.loopexit ], [ %index.1.i.1, %for.inc.i.1 ] %14 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %idxprom16.i = sext i32 %index.1.i.lcssa to i64 %arrayidx17.i = getelementptr inbounds i32, ptr %A, i64 %idxprom16.i %15 = load i32, ptr %arrayidx17.i, align 4, !tbaa !5 store i32 %15, ptr %arrayidx2.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx17.i, align 4, !tbaa !5 %sub = add nsw i32 %index.1.i.lcssa, -1 tail call void @quicksort(ptr noundef nonnull %A, i32 noundef %startI.tr9, i32 noundef %sub) %add = add nsw i32 %index.1.i.lcssa, 1 %cmp = icmp slt i32 %add, %endI br i1 %cmp, label %for.body.lr.ph.i, label %if.end if.end: ; preds = %partitioning.exit, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @ghotona(ptr nocapture noundef readonly %A, i32 noundef %soa) local_unnamed_addr #3 { entry: %cmp4 = icmp sgt i32 %soa, 0 br i1 %cmp4, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %soa to i64 br label %for.body for.cond: ; preds = %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 %cleanup, label %for.body, !llvm.loop !11 for.body: ; preds = %for.body.preheader, %for.cond %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.cond ] %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1.not = icmp eq i32 %0, -1 br i1 %cmp1.not, label %for.cond, label %cleanup cleanup: ; preds = %for.body, %for.cond, %entry %retval.0 = phi i32 [ 0, %entry ], [ 0, %for.cond ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %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 %cmp38 = icmp sgt i32 %3, 0 br i1 %cmp38, label %for.body, label %for.end.thread for.end.thread: ; preds = %entry %sub74 = add nsw i32 %3, -1 call void @quicksort(ptr noundef nonnull %vla, i32 noundef 0, i32 noundef %sub74) br label %while.end 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 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %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.end, !llvm.loop !12 for.end: ; preds = %for.body %sub = add nsw i32 %4, -1 call void @quicksort(ptr noundef nonnull %vla, i32 noundef 0, i32 noundef %sub) %cmp4.i = icmp sgt i32 %4, 0 br i1 %cmp4.i, label %for.body.preheader.i.us.us.preheader, label %while.end for.body.preheader.i.us.us.preheader: ; preds = %for.end %wide.trip.count.i = zext i32 %4 to i64 %xtraiter = and i64 %wide.trip.count.i, 1 %6 = icmp eq i32 %4, 1 %unroll_iter = and i64 %wide.trip.count.i, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body.preheader.i.us.us for.body.preheader.i.us.us: ; preds = %for.body.preheader.i.us.us.preheader, %for.cond3.for.end20_crit_edge.us.us %box.043.us.us = phi i32 [ %inc21.us.us, %for.cond3.for.end20_crit_edge.us.us ], [ 0, %for.body.preheader.i.us.us.preheader ] br label %for.body.i.us.us for.body.i.us.us: ; preds = %for.cond.i.us.us, %for.body.preheader.i.us.us %indvars.iv.i.us.us = phi i64 [ 0, %for.body.preheader.i.us.us ], [ %indvars.iv.next.i.us.us, %for.cond.i.us.us ] %arrayidx.i.us.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.i.us.us %7 = load i32, ptr %arrayidx.i.us.us, align 4, !tbaa !5 %cmp1.not.i.us.us = icmp eq i32 %7, -1 br i1 %cmp1.not.i.us.us, label %for.cond.i.us.us, label %for.body5.us.us.preheader for.body5.us.us.preheader: ; preds = %for.body.i.us.us br i1 %6, label %for.cond3.for.end20_crit_edge.us.us.unr-lcssa, label %for.body5.us.us for.body5.us.us: ; preds = %for.body5.us.us.preheader, %for.inc18.us.us.1 %indvars.iv68 = phi i64 [ %indvars.iv.next69.1, %for.inc18.us.us.1 ], [ 0, %for.body5.us.us.preheader ] %temp.042.us.us = phi i32 [ %temp.1.us.us.1, %for.inc18.us.us.1 ], [ -1, %for.body5.us.us.preheader ] %niter = phi i64 [ %niter.next.1, %for.inc18.us.us.1 ], [ 0, %for.body5.us.us.preheader ] %arrayidx7.us.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv68 %8 = load i32, ptr %arrayidx7.us.us, align 8, !tbaa !5 %cmp8.us.us = icmp ne i32 %8, -1 %cmp11.us.us = icmp sgt i32 %8, %temp.042.us.us %or.cond.us.us = select i1 %cmp8.us.us, i1 %cmp11.us.us, i1 false br i1 %or.cond.us.us, label %if.then12.us.us, label %for.inc18.us.us if.then12.us.us: ; preds = %for.body5.us.us store i32 -1, ptr %arrayidx7.us.us, align 8, !tbaa !5 br label %for.inc18.us.us for.inc18.us.us: ; preds = %if.then12.us.us, %for.body5.us.us %temp.1.us.us = phi i32 [ %temp.042.us.us, %for.body5.us.us ], [ %8, %if.then12.us.us ] %indvars.iv.next69 = or i64 %indvars.iv68, 1 %arrayidx7.us.us.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next69 %9 = load i32, ptr %arrayidx7.us.us.1, align 4, !tbaa !5 %cmp8.us.us.1 = icmp ne i32 %9, -1 %cmp11.us.us.1 = icmp sgt i32 %9, %temp.1.us.us %or.cond.us.us.1 = select i1 %cmp8.us.us.1, i1 %cmp11.us.us.1, i1 false br i1 %or.cond.us.us.1, label %if.then12.us.us.1, label %for.inc18.us.us.1 if.then12.us.us.1: ; preds = %for.inc18.us.us store i32 -1, ptr %arrayidx7.us.us.1, align 4, !tbaa !5 br label %for.inc18.us.us.1 for.inc18.us.us.1: ; preds = %if.then12.us.us.1, %for.inc18.us.us %temp.1.us.us.1 = phi i32 [ %temp.1.us.us, %for.inc18.us.us ], [ %9, %if.then12.us.us.1 ] %indvars.iv.next69.1 = add nuw nsw i64 %indvars.iv68, 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.cond3.for.end20_crit_edge.us.us.unr-lcssa, label %for.body5.us.us, !llvm.loop !13 for.cond.i.us.us: ; preds = %for.body.i.us.us %indvars.iv.next.i.us.us = add nuw nsw i64 %indvars.iv.i.us.us, 1 %exitcond.not.i.us.us = icmp eq i64 %indvars.iv.next.i.us.us, %wide.trip.count.i br i1 %exitcond.not.i.us.us, label %while.end, label %for.body.i.us.us, !llvm.loop !11 for.cond3.for.end20_crit_edge.us.us.unr-lcssa: ; preds = %for.inc18.us.us.1, %for.body5.us.us.preheader %indvars.iv68.unr = phi i64 [ 0, %for.body5.us.us.preheader ], [ %indvars.iv.next69.1, %for.inc18.us.us.1 ] %temp.042.us.us.unr = phi i32 [ -1, %for.body5.us.us.preheader ], [ %temp.1.us.us.1, %for.inc18.us.us.1 ] br i1 %lcmp.mod.not, label %for.cond3.for.end20_crit_edge.us.us, label %for.body5.us.us.epil for.body5.us.us.epil: ; preds = %for.cond3.for.end20_crit_edge.us.us.unr-lcssa %arrayidx7.us.us.epil = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv68.unr %10 = load i32, ptr %arrayidx7.us.us.epil, align 4, !tbaa !5 %cmp8.us.us.epil = icmp ne i32 %10, -1 %cmp11.us.us.epil = icmp sgt i32 %10, %temp.042.us.us.unr %or.cond.us.us.epil = select i1 %cmp8.us.us.epil, i1 %cmp11.us.us.epil, i1 false br i1 %or.cond.us.us.epil, label %if.then12.us.us.epil, label %for.cond3.for.end20_crit_edge.us.us if.then12.us.us.epil: ; preds = %for.body5.us.us.epil store i32 -1, ptr %arrayidx7.us.us.epil, align 4, !tbaa !5 br label %for.cond3.for.end20_crit_edge.us.us for.cond3.for.end20_crit_edge.us.us: ; preds = %for.body5.us.us.epil, %if.then12.us.us.epil, %for.cond3.for.end20_crit_edge.us.us.unr-lcssa %inc21.us.us = add nuw nsw i32 %box.043.us.us, 1 br label %for.body.preheader.i.us.us while.end: ; preds = %for.cond.i.us.us, %for.end.thread, %for.end %box.037 = phi i32 [ 0, %for.end ], [ 0, %for.end.thread ], [ %box.043.us.us, %for.cond.i.us.us ] %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %box.037) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #6 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #6 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #7 = { 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 a, b; int d, r; double f; scanf("%d %d", &a, &b); d = a/b; r = a%b; f = (double)a/b; printf("%d %d %.6f\n", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131532/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 [12 x i8] c"%d %d %.6f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a, b, d, r; double f; scanf("%d %d", &a, &b); d = a / b; r = a % b; f = (double)a / b; printf("%d %d %f", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131590/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131590/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 [9 x i8] c"%d %d %f\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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, d, r; double f; scanf("%d %d\n", &a, &b); d = a / b; r = a % b; f = (double) a / b; printf("%d %d %.8lf\n", d, r, f); return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131640/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131640/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\0A\00", align 1 @.str.1 = private unnamed_addr constant [13 x i8] c"%d %d %.8lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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> #include <math.h> #include <stdlib.h> int main(void){ char tmp[1000]; //??\??? fgets(tmp,sizeof(tmp),stdin); int num1=atoi(strtok(tmp," ")); int num2=atoi(strtok(NULL," ")); //?°???°?????????????????¨ double fnum1=num1; double fnum2=num2; //????????¨?????? printf("%d %d ",num1/num2,num1%num2); printf("%f\n",fnum1/fnum2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131705/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 [2 x i8] c" \00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d %d \00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %tmp = alloca [1000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %tmp) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %tmp, i32 noundef 1000, ptr noundef %0) %call2 = call ptr @strtok(ptr noundef nonnull %tmp, ptr noundef nonnull @.str) #4 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %call2, ptr noundef null, i32 noundef 10) #4 %conv.i = trunc i64 %call.i to i32 %call4 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #4 %call.i14 = call i64 @strtol(ptr nocapture noundef nonnull %call4, ptr noundef null, i32 noundef 10) #4 %conv.i15 = trunc i64 %call.i14 to i32 %conv = sitofp i32 %conv.i to double %conv6 = sitofp i32 %conv.i15 to double %div = sdiv i32 %conv.i, %conv.i15 %rem = srem i32 %conv.i, %conv.i15 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem) %div8 = fdiv double %conv, %conv6 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div8) call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %tmp) #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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) 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: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, 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 = { 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 } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int a,b; double c; scanf("%d %d",&a,&b); c=(double)a/b; printf("%d %d %f\n",a/b,a%b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131756/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %1 = load i32, ptr %b, align 4, !tbaa !5 %conv1 = sitofp i32 %1 to double %div = fdiv double %conv, %conv1 %div2 = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div2, i32 noundef %rem, double noundef %div) 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 arr[200000]; int main() { int i; int n; int rightDoor=0, leftDoor=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&arr[i]); arr[i]==0 ? leftDoor++ : rightDoor++; } for(i=0;i<n;i++) { arr[i]==0 ? leftDoor-- : rightDoor--; if(leftDoor == 0 || rightDoor == 0) break; } printf("%d\n",i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1318/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1318/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 [200000 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) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp35 = icmp sgt i32 %0, 0 br i1 %cmp35, label %for.body, label %for.end22 for.cond7.preheader: ; preds = %for.body %cmp841 = icmp sgt i32 %2, 0 br i1 %cmp841, label %for.body9.preheader, label %for.end22 for.body9.preheader: ; preds = %for.cond7.preheader %wide.trip.count = zext i32 %2 to i64 br label %for.body9 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %leftDoor.038 = phi i32 [ %leftDoor.1, %for.body ], [ 0, %entry ] %rightDoor.037 = phi i32 [ %rightDoor.1, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [200000 x i32], ptr @arr, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp4 = icmp ne i32 %1, 0 %inc5 = zext i1 %cmp4 to i32 %rightDoor.1 = add nuw nsw i32 %rightDoor.037, %inc5 %not.cmp4 = xor i1 %cmp4, true %inc = zext i1 %not.cmp4 to i32 %leftDoor.1 = add nuw nsw i32 %leftDoor.038, %inc %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.cond7.preheader, !llvm.loop !9 for.body9: ; preds = %for.body9.preheader, %for.inc20 %indvars.iv49 = phi i64 [ 0, %for.body9.preheader ], [ %indvars.iv.next50, %for.inc20 ] %leftDoor.244 = phi i32 [ %leftDoor.1, %for.body9.preheader ], [ %leftDoor.3, %for.inc20 ] %rightDoor.243 = phi i32 [ %rightDoor.1, %for.body9.preheader ], [ %rightDoor.3, %for.inc20 ] %arrayidx11 = getelementptr inbounds [200000 x i32], ptr @arr, i64 0, i64 %indvars.iv49 %4 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp12 = icmp ne i32 %4, 0 %dec15 = sext i1 %cmp12 to i32 %rightDoor.3 = add nsw i32 %rightDoor.243, %dec15 %not.cmp12 = xor i1 %cmp12, true %dec = sext i1 %not.cmp12 to i32 %leftDoor.3 = add nsw i32 %leftDoor.244, %dec %cmp18 = icmp eq i32 %leftDoor.3, 0 %cmp19 = icmp eq i32 %rightDoor.3, 0 %or.cond = select i1 %cmp18, i1 true, i1 %cmp19 br i1 %or.cond, label %for.end22.loopexit.split.loop.exit, label %for.inc20 for.inc20: ; preds = %for.body9 %indvars.iv.next50 = add nuw nsw i64 %indvars.iv49, 1 %exitcond.not = icmp eq i64 %indvars.iv.next50, %wide.trip.count br i1 %exitcond.not, label %for.end22.loopexit, label %for.body9, !llvm.loop !11 for.end22.loopexit.split.loop.exit: ; preds = %for.body9 %5 = trunc i64 %indvars.iv49 to i32 br label %for.end22.loopexit for.end22.loopexit: ; preds = %for.inc20, %for.end22.loopexit.split.loop.exit %i.1.lcssa.ph = phi i32 [ %5, %for.end22.loopexit.split.loop.exit ], [ %2, %for.inc20 ] %6 = add nuw nsw i32 %i.1.lcssa.ph, 1 br label %for.end22 for.end22: ; preds = %entry, %for.end22.loopexit, %for.cond7.preheader %i.1.lcssa = phi i32 [ 1, %for.cond7.preheader ], [ %6, %for.end22.loopexit ], [ 1, %entry ] %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.1.lcssa) 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}
#include <stdio.h> int main(void){ int a, b; int d, r; double f; scanf("%d %d\n", &a, &b); d = a / b; r = a % b; f = (double)a / b; printf("%d %d %f\n", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131842/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\0A\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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, d, r; double f; scanf("%d %d", &a, &b); d = a/b; r = a%b; f = (double)a/b; printf("%d %d %f\n", d, r, f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131893/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131893/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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,d,r; double f; scanf("%d %d",&a,&b); d = a/b; r = a%b; f = 1.0*a/b; printf("%d %d %.5lf\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_131936/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_131936/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 [13 x i8] c"%d %d %.5lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 t; scanf("%d",&t); while(t--){ int n; scanf("%d",&n); int m = n; if(n >= 3){ while(n % 3 != 0 && n >= 0) n = n-7; if(n % 3 == 0 && n >= 0){ printf("YES\n"); continue; } while(m % 7 != 0 && m >= 0) m = m - 3; if(m % 7 == 0 && m >= 0){ printf("YES\n"); continue; } } printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13198/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 [3 x i8] c"NO\00", align 1 @str.4 = 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: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec45 = add nsw i32 %0, -1 store i32 %dec45, ptr %t, align 4, !tbaa !5 %tobool.not46 = icmp eq i32 %0, 0 br i1 %tobool.not46, label %while.end30, label %while.body while.body: ; preds = %entry, %cleanup call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4 %cmp = icmp sgt i32 %1, 2 br i1 %cmp, label %while.cond2.preheader, label %if.end27 while.cond2.preheader: ; preds = %while.body %rem4049 = urem i32 %1, 3 %cmp341.not = icmp eq i32 %rem4049, 0 br i1 %cmp341.not, label %while.end, label %while.body5 while.body5: ; preds = %while.cond2.preheader, %while.body5 %sub3943 = phi i32 [ %sub, %while.body5 ], [ %1, %while.cond2.preheader ] %sub = add nsw i32 %sub3943, -7 %rem = srem i32 %sub, 3 %cmp3 = icmp ne i32 %rem, 0 %cmp4 = icmp ugt i32 %sub3943, 6 %2 = and i1 %cmp4, %cmp3 br i1 %2, label %while.body5, label %while.cond2.while.end_crit_edge, !llvm.loop !9 while.cond2.while.end_crit_edge: ; preds = %while.body5 store i32 %sub, ptr %n, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond2.while.end_crit_edge, %while.cond2.preheader %rem.lcssa = phi i32 [ %rem, %while.cond2.while.end_crit_edge ], [ 0, %while.cond2.preheader ] %cmp4.lcssa = phi i1 [ %cmp4, %while.cond2.while.end_crit_edge ], [ true, %while.cond2.preheader ] %cmp7 = icmp eq i32 %rem.lcssa, 0 %or.cond = and i1 %cmp4.lcssa, %cmp7 br i1 %or.cond, label %cleanup, label %while.cond11, !llvm.loop !11 while.cond11: ; preds = %while.end, %while.cond11 %m.0 = phi i32 [ %sub18, %while.cond11 ], [ %1, %while.end ] %rem12 = srem i32 %m.0, 7 %cmp13 = icmp ne i32 %rem12, 0 %cmp15 = icmp sgt i32 %m.0, -1 %3 = and i1 %cmp15, %cmp13 %sub18 = add nsw i32 %m.0, -3 br i1 %3, label %while.cond11, label %while.end19, !llvm.loop !12 while.end19: ; preds = %while.cond11 %cmp21 = icmp eq i32 %rem12, 0 %or.cond32 = and i1 %cmp15, %cmp21 br i1 %or.cond32, label %cleanup, label %if.end27, !llvm.loop !11 if.end27: ; preds = %while.end19, %while.body br label %cleanup cleanup: ; preds = %while.end19, %while.end, %if.end27 %str.sink = phi ptr [ @str, %if.end27 ], [ @str.4, %while.end ], [ @str.4, %while.end19 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 %4 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %4, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %4, 0 br i1 %tobool.not, label %while.end30, label %while.body while.end30: ; preds = %cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main() { int a,b,r,d; double f; scanf("%d %d\n", &a,&b); r=a%b; d=a/b; f=(double)a/(double)b; printf("%d %d %f\n",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132021/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132021/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\0A\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %rem = srem i32 %0, %1 %div = sdiv i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 d, r; scanf("%d %d", &d, &r); printf("%d %d %lf\n", d/r, d%r, (double)d/r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132065/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132065/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 [11 x i8] c"%d %d %lf\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %d = alloca i32, align 4 %r = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d, ptr noundef nonnull %r) %0 = load i32, ptr %d, align 4, !tbaa !5 %1 = load i32, ptr %r, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #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 x, y; scanf("%d %d", &x, &y); printf("%d\n", x/y); printf("%d\n", x%y); printf("%.8lf\n", 1.0*x/y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132108/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 @.str.2 = private unnamed_addr constant [7 x i8] c"%.8lf\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) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) %2 = load i32, ptr %x, align 4, !tbaa !5 %3 = load i32, ptr %y, align 4, !tbaa !5 %rem = srem i32 %2, %3 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %rem) %4 = load i32, ptr %x, align 4, !tbaa !5 %conv = sitofp i32 %4 to double %5 = load i32, ptr %y, align 4, !tbaa !5 %conv3 = sitofp i32 %5 to double %div4 = fdiv double %conv, %conv3 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int a, b; while(scanf("%d %d", &a, &b) == 2) { printf("%d %d %.5lf\n", a/b, a%b, 1.0*a/b); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132151/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 [13 x i8] c"%d %d %.5lf\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 %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %cmp5 = icmp eq i32 %call4, 2 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %cmp = icmp eq i32 %call, 2 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry 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,d,r; double f; scanf("%d %d",&a,&b); d = a/b; r = a%b; f = 1.0*a/b; printf("%d %d %f",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132201/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132201/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 [9 x i8] c"%d %d %f\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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; scanf("%d %d", &a, &b); printf("%d %d %lf\n", a/b, a%b, (double)a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132245/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132245/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 [11 x i8] c"%d %d %lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a,b; scanf("%d %d",&a,&b); printf("%d %d %.8lf\n",a/b,a%b,1.0*a/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132289/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132289/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 [13 x i8] c"%d %d %.8lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a,b,x,y; double z; scanf("%d %d",&a,&b); x=a/b; y=a%b; z=1.0*a/b; printf("%d %d %f\n",x,y,z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132331/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132331/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a,b; scanf("%d %d", &a, &b); printf("%d %d %.5f\n", a / b, a % b, (double)a / b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132375/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132375/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 [12 x i8] c"%d %d %.5f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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"}
/* a ÷ b : d (整数) a ÷ b の余り : r (整数) a ÷ b : f (浮動小数点数) */ #include <stdio.h> int main(void) { int a; int b; scanf("%d %d", &a, &b); printf("%d %d %.6f\n", a / b, a % b, a / (double)b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132418/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132418/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 [12 x i8] c"%d %d %.6f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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; scanf("%d%d", &a, &b); printf("%d %d %lf\n", a / b, a % b, (double)a / b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132461/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 [11 x i8] c"%d %d %lf\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 argc, char *argv[]) { int a, b; scanf("%d%d", &a, &b); printf("%d %d %f\n", a / b, a % b, (double)a / b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132504/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 [10 x i8] c"%d %d %f\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 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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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> #include <ctype.h> #define max(a, b) (((a) > (b)) ? (a) : (b)) /* 2個の値の最大値 */ #define min(a, b) (((a) < (b)) ? (a) : (b)) /* 2個の値の最小値 */ #define ENTER printf("\n") /* 改行プリント */ /********************************************************************************************************************************/ /* main *************************************************************************************************************************/ /********************************************************************************************************************************/ int DEBUG = 0; /* デバッグプリント 提出時は0 */ int main() { int a,b,c,i=0,ans=0; scanf("%d %d", &a,&b); printf("%d ",a/b); printf("%d ",a%b); printf("%.5f\n",(double)a/(double)b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132548/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132548/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" @DEBUG = dso_local local_unnamed_addr global i32 0, align 4 @.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 \00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%.5f\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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) %2 = load i32, ptr %a, align 4, !tbaa !5 %3 = load i32, ptr %b, align 4, !tbaa !5 %rem = srem i32 %2, %3 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %rem) %4 = load i32, ptr %a, align 4, !tbaa !5 %conv = sitofp i32 %4 to double %5 = load i32, ptr %b, align 4, !tbaa !5 %conv3 = sitofp i32 %5 to double %div4 = fdiv double %conv, %conv3 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div4) 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 a,b,d,r; double f; scanf("%d %d",&a,&b); d=a/b; r=a%b; f=(double)a/(double)b; printf("%d %d %f",d,r,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132591/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132591/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 [9 x i8] c"%d %d %f\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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 a, b; scanf("%d%d", &a, &b); printf("%d %d %f", a/b, a%b, (double)(a)/(double)(b)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132641/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132641/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"%d %d %f\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 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %conv = sitofp i32 %0 to double %conv1 = sitofp i32 %1 to double %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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; double c,d; scanf("%d %d",&a,&b); c=a; d=b; printf("%d %d %f\n",a/b,a%b,c/d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132685/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132685/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 [10 x i8] c"%d %d %f\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 %a, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %1 = load i32, ptr %b, align 4, !tbaa !5 %conv1 = sitofp i32 %1 to double %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %div2 = fdiv double %conv, %conv1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div, i32 noundef %rem, double noundef %div2) 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> #define N 7368791 static int m; static int n; static int h[N]; int main(void) { int i, j; for (;;) { scanf("%d%d", &m, &n); if (m == 0 && n == 0) break ; memset(h, 0, sizeof(h)); for (i = m; i < N; ++i) { if (h[i] != 0) continue ; if (n == 0) break ; for (j = i; j < N; j += i) h[j] = 1; --n; } printf("%d\n", i); } return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132735/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132735/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 @m = internal global i32 0, align 4 @n = internal global i32 0, align 4 @h = internal unnamed_addr global [7368791 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: %call35 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m, ptr noundef nonnull @n) %0 = load i32, ptr @m, align 4, !tbaa !5 %cmp36 = icmp eq i32 %0, 0 %1 = load i32, ptr @n, align 4 %cmp137 = icmp eq i32 %1, 0 %or.cond38 = select i1 %cmp36, i1 %cmp137, i1 false br i1 %or.cond38, label %for.end18, label %if.end if.end: ; preds = %entry, %for.end16 %n.promoted = phi i32 [ %8, %for.end16 ], [ %1, %entry ] %2 = phi i32 [ %7, %for.end16 ], [ %0, %entry ] tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(29475164) @h, i8 0, i64 29475164, i1 false) %cmp330 = icmp slt i32 %2, 7368791 br i1 %cmp330, label %for.body.preheader, label %for.end16 for.body.preheader: ; preds = %if.end %3 = sext i32 %2 to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc15 %indvars.iv = phi i64 [ %3, %for.body.preheader ], [ %indvars.iv.next, %for.inc15 ] %dec2931 = phi i32 [ %n.promoted, %for.body.preheader ], [ %dec28, %for.inc15 ] %arrayidx = getelementptr inbounds [7368791 x i32], ptr @h, i64 0, i64 %indvars.iv %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp4.not = icmp eq i32 %4, 0 br i1 %cmp4.not, label %if.end6, label %for.inc15 if.end6: ; preds = %for.body %cmp7 = icmp eq i32 %dec2931, 0 br i1 %cmp7, label %for.end16.loopexit.split.loop.exit, label %for.body12 for.body12: ; preds = %if.end6, %for.body12 %indvars.iv39 = phi i64 [ %indvars.iv.next40, %for.body12 ], [ %indvars.iv, %if.end6 ] %arrayidx14 = getelementptr inbounds [7368791 x i32], ptr @h, i64 0, i64 %indvars.iv39 store i32 1, ptr %arrayidx14, align 4, !tbaa !5 %indvars.iv.next40 = add i64 %indvars.iv39, %indvars.iv %cmp11 = icmp slt i64 %indvars.iv.next40, 7368791 br i1 %cmp11, label %for.body12, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body12 %dec = add nsw i32 %dec2931, -1 store i32 %dec, ptr @n, align 4, !tbaa !5 br label %for.inc15 for.inc15: ; preds = %for.body, %for.end %dec28 = phi i32 [ %dec2931, %for.body ], [ %dec, %for.end ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %5 = and i64 %indvars.iv.next, 4294967295 %exitcond.not = icmp eq i64 %5, 7368791 br i1 %exitcond.not, label %for.end16, label %for.body, !llvm.loop !11 for.end16.loopexit.split.loop.exit: ; preds = %if.end6 %6 = trunc i64 %indvars.iv to i32 br label %for.end16 for.end16: ; preds = %for.inc15, %for.end16.loopexit.split.loop.exit, %if.end %i.0.lcssa = phi i32 [ %2, %if.end ], [ %6, %for.end16.loopexit.split.loop.exit ], [ 7368791, %for.inc15 ] %call17 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.0.lcssa) %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @m, ptr noundef nonnull @n) %7 = load i32, ptr @m, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr @n, align 4 %cmp1 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end18, label %if.end for.end18: ; preds = %for.end16, %entry ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress 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}
#include <stdio.h> void change(int,int); int muki = 0,flag = 0; int main(){ int i,j,x = 0,y = 0,wall_x[4][5],wall_y[5][4]; for(i = 0;i < 9;i++){ if(i % 2 == 0) for(j = 0;j < 4;j++) scanf("%1d",&wall_x[j][i / 2]); else for(j = 0;j < 5;j++) scanf("%1d",&wall_y[j][(i - 1)/ 2]); } do{ if(muki == 0){ if(x != 4 && wall_x[x][y] == 1){ flag = 0; change(x,y); putchar('R'); x++; }else change(x,y); }else if(muki == 1){ if(y != 4 && wall_y[x][y] == 1){ flag = 0; change(x,y); putchar('D'); y++; }else change(x,y); }else if(muki == 2){ if(x != 0 && wall_x[x - 1][y] == 1){ flag = 0; change(x,y); putchar('L'); x--; }else change(x,y); }else if(muki == 3){ if(y != 0 && wall_y[x][y - 1] == 1){ flag = 0; change(x,y); putchar('U'); y--; }else change(x,y); } }while(x != 0 || y != 0); puts(""); return 0; } void change(int x,int y){ int i; if(!flag){ flag = 1; muki = (muki + 3) % 4; } else muki = (muki + 1) % 4; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132779/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132779/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" @muki = dso_local local_unnamed_addr global i32 0, align 4 @flag = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [4 x i8] c"%1d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { for.inc19.8: %wall_x = alloca [4 x [5 x i32]], align 16 %wall_y = alloca [5 x [4 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %wall_x) #4 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %wall_y) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %wall_x) %arrayidx6.1 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 1, i64 0 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1) %arrayidx6.2 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 2, i64 0 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2) %arrayidx6.3 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 3, i64 0 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3) %call15.1217 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %wall_y) %arrayidx14.1.1 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 1, i64 0 %call15.1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.1.1) %arrayidx14.2.1 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 2, i64 0 %call15.2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.2.1) %arrayidx14.3.1 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 3, i64 0 %call15.3.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.3.1) %arrayidx14.4.1 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 4, i64 0 %call15.4.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.4.1) %arrayidx6.2222 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 0, i64 1 %call.2223 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2222) %arrayidx6.1.2 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 1, i64 1 %call.1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1.2) %arrayidx6.2.2 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 2, i64 1 %call.2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2.2) %arrayidx6.3.2 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 3, i64 1 %call.3.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3.2) %arrayidx14.3224 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 0, i64 1 %call15.3225 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.3224) %arrayidx14.1.3 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 1, i64 1 %call15.1.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.1.3) %arrayidx14.2.3 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 2, i64 1 %call15.2.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.2.3) %arrayidx14.3.3 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 3, i64 1 %call15.3.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.3.3) %arrayidx14.4.3 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 4, i64 1 %call15.4.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.4.3) %arrayidx6.4 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 0, i64 2 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.4) %arrayidx6.1.4 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 1, i64 2 %call.1.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1.4) %arrayidx6.2.4 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 2, i64 2 %call.2.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2.4) %arrayidx6.3.4 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 3, i64 2 %call.3.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3.4) %arrayidx14.5 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 0, i64 2 %call15.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.5) %arrayidx14.1.5 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 1, i64 2 %call15.1.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.1.5) %arrayidx14.2.5 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 2, i64 2 %call15.2.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.2.5) %arrayidx14.3.5 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 3, i64 2 %call15.3.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.3.5) %arrayidx14.4.5 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 4, i64 2 %call15.4.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.4.5) %arrayidx6.6 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 0, i64 3 %call.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.6) %arrayidx6.1.6 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 1, i64 3 %call.1.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1.6) %arrayidx6.2.6 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 2, i64 3 %call.2.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2.6) %arrayidx6.3.6 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 3, i64 3 %call.3.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3.6) %arrayidx14.7 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 0, i64 3 %call15.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.7) %arrayidx14.1.7 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 1, i64 3 %call15.1.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.1.7) %arrayidx14.2.7 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 2, i64 3 %call15.2.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.2.7) %arrayidx14.3.7 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 3, i64 3 %call15.3.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.3.7) %arrayidx14.4.7 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 4, i64 3 %call15.4.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx14.4.7) %arrayidx6.8 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 0, i64 4 %call.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.8) %arrayidx6.1.8 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 1, i64 4 %call.1.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1.8) %arrayidx6.2.8 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 2, i64 4 %call.2.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2.8) %arrayidx6.3.8 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 3, i64 4 %call.3.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3.8) br label %do.body do.body: ; preds = %for.inc19.8, %do.cond %x.0 = phi i32 [ %x.1, %do.cond ], [ 0, %for.inc19.8 ] %y.0 = phi i32 [ %y.1, %do.cond ], [ 0, %for.inc19.8 ] %0 = load i32, ptr @muki, align 4, !tbaa !5 switch i32 %0, label %do.cond [ i32 0, label %if.then23 i32 1, label %if.then37 i32 2, label %if.then52 i32 3, label %if.then67 ] if.then23: ; preds = %do.body %cmp24.not = icmp eq i32 %x.0, 4 br i1 %cmp24.not, label %if.then23.split, label %land.lhs.true if.then23.split: ; preds = %if.then23 %1 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i = icmp eq i32 %1, 0 br i1 %tobool.not.i, label %if.then.i, label %change.exit if.then.i: ; preds = %if.then23.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit change.exit: ; preds = %if.then23.split, %if.then.i %.sink3.i = phi i32 [ 3, %if.then.i ], [ 1, %if.then23.split ] store i32 %.sink3.i, ptr @muki, align 4, !tbaa !5 br label %do.cond land.lhs.true: ; preds = %if.then23 %idxprom25 = sext i32 %x.0 to i64 %idxprom27 = sext i32 %y.0 to i64 %arrayidx28 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 %idxprom25, i64 %idxprom27 %2 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %cmp29 = icmp eq i32 %2, 1 br i1 %cmp29, label %change.exit141, label %land.lhs.true.split land.lhs.true.split: ; preds = %land.lhs.true %3 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i130 = icmp eq i32 %3, 0 br i1 %tobool.not.i130, label %if.then.i134, label %change.exit135 if.then.i134: ; preds = %land.lhs.true.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit135 change.exit135: ; preds = %land.lhs.true.split, %if.then.i134 %.sink3.i131 = phi i32 [ 3, %if.then.i134 ], [ 1, %land.lhs.true.split ] store i32 %.sink3.i131, ptr @muki, align 4, !tbaa !5 br label %do.cond change.exit141: ; preds = %land.lhs.true store i32 1, ptr @flag, align 4, !tbaa !5 store i32 3, ptr @muki, align 4, !tbaa !5 %4 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i = call noundef i32 @putc(i32 noundef 82, ptr noundef %4) %inc32 = add nsw i32 %x.0, 1 br label %do.cond if.then37: ; preds = %do.body %cmp38.not = icmp eq i32 %y.0, 4 br i1 %cmp38.not, label %if.then37.split, label %land.lhs.true39 if.then37.split: ; preds = %if.then37 %5 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i142.not = icmp eq i32 %5, 0 br i1 %tobool.not.i142.not, label %if.then.i146, label %change.exit147 if.then.i146: ; preds = %if.then37.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit147 change.exit147: ; preds = %if.then37.split, %if.then.i146 %.sink3.i143 = phi i32 [ 4, %if.then.i146 ], [ 2, %if.then37.split ] %storemerge.i145200.urem = add nsw i32 %.sink3.i143, -4 %storemerge.i145200 = select i1 %tobool.not.i142.not, i32 %storemerge.i145200.urem, i32 %.sink3.i143 store i32 %storemerge.i145200, ptr @muki, align 4, !tbaa !5 br label %do.cond land.lhs.true39: ; preds = %if.then37 %idxprom40 = sext i32 %x.0 to i64 %idxprom42 = sext i32 %y.0 to i64 %arrayidx43 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 %idxprom40, i64 %idxprom42 %6 = load i32, ptr %arrayidx43, align 4, !tbaa !5 %cmp44 = icmp eq i32 %6, 1 br i1 %cmp44, label %change.exit159, label %land.lhs.true39.split land.lhs.true39.split: ; preds = %land.lhs.true39 %7 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i148.not = icmp eq i32 %7, 0 br i1 %tobool.not.i148.not, label %if.then.i152, label %change.exit153 if.then.i152: ; preds = %land.lhs.true39.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit153 change.exit153: ; preds = %land.lhs.true39.split, %if.then.i152 %.sink3.i149 = phi i32 [ 4, %if.then.i152 ], [ 2, %land.lhs.true39.split ] %storemerge.i151202.urem = add nsw i32 %.sink3.i149, -4 %storemerge.i151202 = select i1 %tobool.not.i148.not, i32 %storemerge.i151202.urem, i32 %.sink3.i149 store i32 %storemerge.i151202, ptr @muki, align 4, !tbaa !5 br label %do.cond change.exit159: ; preds = %land.lhs.true39 store i32 1, ptr @flag, align 4, !tbaa !5 store i32 0, ptr @muki, align 4, !tbaa !5 %8 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i160 = call noundef i32 @putc(i32 noundef 68, ptr noundef %8) %inc47 = add nsw i32 %y.0, 1 br label %do.cond if.then52: ; preds = %do.body %cmp53.not = icmp eq i32 %x.0, 0 br i1 %cmp53.not, label %if.then52.split, label %land.lhs.true54 if.then52.split: ; preds = %if.then52 %9 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i161.not = icmp eq i32 %9, 0 br i1 %tobool.not.i161.not, label %if.then.i165, label %change.exit166 if.then.i165: ; preds = %if.then52.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit166 change.exit166: ; preds = %if.then52.split, %if.then.i165 %.sink3.i162 = phi i32 [ 5, %if.then.i165 ], [ 3, %if.then52.split ] %storemerge.i164203.urem = add nsw i32 %.sink3.i162, -4 %storemerge.i164203 = select i1 %tobool.not.i161.not, i32 %storemerge.i164203.urem, i32 %.sink3.i162 store i32 %storemerge.i164203, ptr @muki, align 4, !tbaa !5 br label %do.cond land.lhs.true54: ; preds = %if.then52 %sub55 = add nsw i32 %x.0, -1 %idxprom56 = sext i32 %sub55 to i64 %idxprom58 = sext i32 %y.0 to i64 %arrayidx59 = getelementptr inbounds [4 x [5 x i32]], ptr %wall_x, i64 0, i64 %idxprom56, i64 %idxprom58 %10 = load i32, ptr %arrayidx59, align 4, !tbaa !5 %cmp60 = icmp eq i32 %10, 1 br i1 %cmp60, label %change.exit178, label %land.lhs.true54.split land.lhs.true54.split: ; preds = %land.lhs.true54 %11 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i167.not = icmp eq i32 %11, 0 br i1 %tobool.not.i167.not, label %if.then.i171, label %change.exit172 if.then.i171: ; preds = %land.lhs.true54.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit172 change.exit172: ; preds = %land.lhs.true54.split, %if.then.i171 %.sink3.i168 = phi i32 [ 5, %if.then.i171 ], [ 3, %land.lhs.true54.split ] %storemerge.i170205.urem = add nsw i32 %.sink3.i168, -4 %storemerge.i170205 = select i1 %tobool.not.i167.not, i32 %storemerge.i170205.urem, i32 %.sink3.i168 store i32 %storemerge.i170205, ptr @muki, align 4, !tbaa !5 br label %do.cond change.exit178: ; preds = %land.lhs.true54 store i32 1, ptr @flag, align 4, !tbaa !5 store i32 1, ptr @muki, align 4, !tbaa !5 %12 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i179 = call noundef i32 @putc(i32 noundef 76, ptr noundef %12) br label %do.cond if.then67: ; preds = %do.body %cmp68.not = icmp eq i32 %y.0, 0 br i1 %cmp68.not, label %if.then67.split, label %land.lhs.true69 if.then67.split: ; preds = %if.then67 %13 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i180 = icmp eq i32 %13, 0 br i1 %tobool.not.i180, label %if.then.i184, label %change.exit185 if.then.i184: ; preds = %if.then67.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit185 change.exit185: ; preds = %if.then67.split, %if.then.i184 %.sink3.i181 = phi i32 [ 2, %if.then.i184 ], [ 0, %if.then67.split ] store i32 %.sink3.i181, ptr @muki, align 4, !tbaa !5 br label %do.cond land.lhs.true69: ; preds = %if.then67 %idxprom70 = sext i32 %x.0 to i64 %sub72 = add nsw i32 %y.0, -1 %idxprom73 = sext i32 %sub72 to i64 %arrayidx74 = getelementptr inbounds [5 x [4 x i32]], ptr %wall_y, i64 0, i64 %idxprom70, i64 %idxprom73 %14 = load i32, ptr %arrayidx74, align 4, !tbaa !5 %cmp75 = icmp eq i32 %14, 1 br i1 %cmp75, label %change.exit197, label %land.lhs.true69.split land.lhs.true69.split: ; preds = %land.lhs.true69 %15 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not.i186 = icmp eq i32 %15, 0 br i1 %tobool.not.i186, label %if.then.i190, label %change.exit191 if.then.i190: ; preds = %land.lhs.true69.split store i32 1, ptr @flag, align 4, !tbaa !5 br label %change.exit191 change.exit191: ; preds = %land.lhs.true69.split, %if.then.i190 %.sink3.i187 = phi i32 [ 2, %if.then.i190 ], [ 0, %land.lhs.true69.split ] store i32 %.sink3.i187, ptr @muki, align 4, !tbaa !5 br label %do.cond change.exit197: ; preds = %land.lhs.true69 store i32 1, ptr @flag, align 4, !tbaa !5 store i32 2, ptr @muki, align 4, !tbaa !5 %16 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i198 = call noundef i32 @putc(i32 noundef 85, ptr noundef %16) br label %do.cond do.cond: ; preds = %change.exit185, %change.exit191, %do.body, %change.exit166, %change.exit172, %change.exit147, %change.exit153, %change.exit, %change.exit135, %change.exit141, %change.exit178, %change.exit197, %change.exit159 %x.1 = phi i32 [ %inc32, %change.exit141 ], [ %x.0, %change.exit159 ], [ %sub55, %change.exit178 ], [ %x.0, %change.exit197 ], [ %x.0, %change.exit135 ], [ 4, %change.exit ], [ %x.0, %change.exit153 ], [ %x.0, %change.exit147 ], [ %x.0, %change.exit172 ], [ 0, %change.exit166 ], [ %x.0, %do.body ], [ %x.0, %change.exit191 ], [ %x.0, %change.exit185 ] %y.1 = phi i32 [ %y.0, %change.exit141 ], [ %inc47, %change.exit159 ], [ %y.0, %change.exit178 ], [ %sub72, %change.exit197 ], [ %y.0, %change.exit135 ], [ %y.0, %change.exit ], [ %y.0, %change.exit153 ], [ 4, %change.exit147 ], [ %y.0, %change.exit172 ], [ %y.0, %change.exit166 ], [ %y.0, %do.body ], [ %y.0, %change.exit191 ], [ 0, %change.exit185 ] %cmp85 = icmp ne i32 %x.1, 0 %cmp86 = icmp ne i32 %y.1, 0 %17 = select i1 %cmp85, i1 true, i1 %cmp86 br i1 %17, label %do.body, label %do.end, !llvm.loop !11 do.end: ; preds = %do.cond %18 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i199 = call noundef i32 @putc(i32 noundef 10, ptr noundef %18) call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %wall_y) #4 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %wall_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 nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @change(i32 noundef %x, i32 noundef %y) local_unnamed_addr #3 { entry: %0 = load i32, ptr @flag, align 4, !tbaa !5 %tobool.not = icmp eq i32 %0, 0 br i1 %tobool.not, label %if.then, label %if.end if.then: ; preds = %entry store i32 1, ptr @flag, align 4, !tbaa !5 br label %if.end if.end: ; preds = %entry, %if.then %.sink3 = phi i32 [ 3, %if.then ], [ 1, %entry ] %1 = load i32, ptr @muki, align 4, !tbaa !5 %add1 = add nsw i32 %1, %.sink3 %storemerge = srem i32 %add1, 4 store i32 %storemerge, ptr @muki, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn 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 #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 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include <float.h> #include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif #define getchar getchar #define putchar putchar int32_t nextint(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); bool s=false; if(c=='-'){s=true;c=getchar();} uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; } int64_t nextlong(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); int s=0; if(c=='-'){s=1;c=getchar();} uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; } uint32_t nextstr(char *s){ char c=getchar(); while(c==' '||c=='\n') c=getchar(); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getchar(); } *s='\0'; return len; } #define P 1000000007 int k[2000001]; int rk[2000001]; int getk(int a, int x){ if(x==1) return a; int b = getk(a, x/2); b = ((long)b)*b%P; if((x&1)==0){ return b; }else{ return ((long)b)*a%P; } } int comb(int a, int b){ if(a<b) return 0; return ((long)k[a])*rk[b]%P*rk[a-b]%P; } void comb_init(int n){ k[0]=1; for(int i=1; i<=n; i++){ k[i]=k[i-1]*((long)i)%P; } rk[n]=getk(k[n], P-2); for(int i=n-1; i>=0; i--){ rk[i]=((long)rk[i+1])*(i+1)%P; } } char s[1000001]; int r25[1000001]; int r26[1000001]; int main(void){ int m=nextint(); int n=nextstr(s); r25[0]=1; r26[0]=1; for(int i=1; i<=m; i++){ r25[i]=(long)r25[i-1]*25%P; r26[i]=(long)r26[i-1]*26%P; } long ans=0; comb_init(n+m); for(int i=m; i>=0; i--){ long now=(long)comb(n+i-1,i)*r25[i]%P*r26[m-i]%P; ans=(ans+now)%P; } printf("%ld\n", ans); /* a[0][0]=1; for(int i=1; i<=n+m; i++){ a[i][0]=(long)a[i-1][0]*26%P; for(int j=1; j<=n; j++){ a[i][j]=((long)a[i-1][j]*25+a[i-1][j-1])%P; } } printf("%d\n", a[n+m][n]); */ }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132872/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132872/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" @k = dso_local local_unnamed_addr global [2000001 x i32] zeroinitializer, align 16 @rk = dso_local local_unnamed_addr global [2000001 x i32] zeroinitializer, align 16 @s = dso_local local_unnamed_addr global [1000001 x i8] zeroinitializer, align 16 @r25 = dso_local local_unnamed_addr global [1000001 x i32] zeroinitializer, align 16 @r26 = dso_local local_unnamed_addr global [1000001 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @nextint() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %0) %sext45 = shl i32 %call.i, 24 %cmp.not46 = icmp ne i32 %sext45, 754974720 %1 = add i32 %sext45, -956301313 %2 = icmp ult i32 %1, -150994945 %or.cond47 = and i1 %cmp.not46, %2 br i1 %or.cond47, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i42 = tail call i32 @getc(ptr noundef %3) %sext = shl i32 %call.i42, 24 %cmp.not = icmp ne i32 %sext, 754974720 %4 = add i32 %sext, -956301313 %5 = icmp ult i32 %4, -150994945 %or.cond = and i1 %cmp.not, %5 br i1 %or.cond, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %c.0.in.lcssa = phi i32 [ %call.i, %entry ], [ %call.i42, %while.body ] %sext.lcssa = phi i32 [ %sext45, %entry ], [ %sext, %while.body ] %cmp12 = icmp eq i32 %sext.lcssa, 754974720 br i1 %cmp12, label %if.then, label %if.end if.then: ; preds = %while.end %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i43 = tail call i32 @getc(ptr noundef %6) br label %if.end if.end: ; preds = %if.then, %while.end %c.1.in = phi i32 [ %call.i43, %if.then ], [ %c.0.in.lcssa, %while.end ] %sext4049 = shl i32 %c.1.in, 24 %7 = add i32 %sext4049, -788529153 %8 = icmp ult i32 %7, 184549375 br i1 %8, label %while.body25, label %while.end29 while.body25: ; preds = %if.end, %while.body25 %x.051 = phi i32 [ %sub, %while.body25 ], [ 0, %if.end ] %c.2.in50 = phi i32 [ %call.i44, %while.body25 ], [ %c.1.in, %if.end ] %conv17 = and i32 %c.2.in50, 255 %mul = mul i32 %x.051, 10 %add = add nsw i32 %conv17, -48 %sub = add i32 %add, %mul %9 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i44 = tail call i32 @getc(ptr noundef %9) %sext40 = shl i32 %call.i44, 24 %10 = add i32 %sext40, -788529153 %11 = icmp ult i32 %10, 184549375 br i1 %11, label %while.body25, label %while.end29, !llvm.loop !11 while.end29: ; preds = %while.body25, %if.end %x.0.lcssa = phi i32 [ 0, %if.end ], [ %sub, %while.body25 ] %sub31 = sub i32 0, %x.0.lcssa %cond = select i1 %cmp12, i32 %sub31, i32 %x.0.lcssa ret i32 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i64 @nextlong() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %0) %sext45 = shl i32 %call.i, 24 %cmp.not46 = icmp ne i32 %sext45, 754974720 %1 = add i32 %sext45, -956301313 %2 = icmp ult i32 %1, -150994945 %or.cond47 = and i1 %cmp.not46, %2 br i1 %or.cond47, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i42 = tail call i32 @getc(ptr noundef %3) %sext = shl i32 %call.i42, 24 %cmp.not = icmp ne i32 %sext, 754974720 %4 = add i32 %sext, -956301313 %5 = icmp ult i32 %4, -150994945 %or.cond = and i1 %cmp.not, %5 br i1 %or.cond, label %while.body, label %while.end, !llvm.loop !12 while.end: ; preds = %while.body, %entry %c.0.in.lcssa = phi i32 [ %call.i, %entry ], [ %call.i42, %while.body ] %sext.lcssa = phi i32 [ %sext45, %entry ], [ %sext, %while.body ] %cmp12.not = icmp eq i32 %sext.lcssa, 754974720 br i1 %cmp12.not, label %if.then, label %if.end if.then: ; preds = %while.end %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i43 = tail call i32 @getc(ptr noundef %6) br label %if.end if.end: ; preds = %if.then, %while.end %c.1.in = phi i32 [ %call.i43, %if.then ], [ %c.0.in.lcssa, %while.end ] %sext3949 = shl i32 %c.1.in, 24 %7 = add i32 %sext3949, -788529153 %8 = icmp ult i32 %7, 184549375 br i1 %8, label %while.body25, label %while.end29 while.body25: ; preds = %if.end, %while.body25 %x.051 = phi i64 [ %sub, %while.body25 ], [ 0, %if.end ] %c.2.in50 = phi i32 [ %call.i44, %while.body25 ], [ %c.1.in, %if.end ] %c.2 = zext i32 %c.2.in50 to i64 %mul = mul i64 %x.051, 10 %sext40 = shl i64 %c.2, 56 %conv26 = ashr exact i64 %sext40, 56 %add = add i64 %mul, -48 %sub = add i64 %add, %conv26 %9 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i44 = tail call i32 @getc(ptr noundef %9) %sext39 = shl i32 %call.i44, 24 %10 = add i32 %sext39, -788529153 %11 = icmp ult i32 %10, 184549375 br i1 %11, label %while.body25, label %while.end29, !llvm.loop !13 while.end29: ; preds = %while.body25, %if.end %x.0.lcssa = phi i64 [ 0, %if.end ], [ %sub, %while.body25 ] %sub30 = sub i64 0, %x.0.lcssa %cond = select i1 %cmp12.not, i64 %sub30, i64 %x.0.lcssa ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @nextstr(ptr nocapture noundef writeonly %s) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond.backedge, %entry %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i26 = tail call i32 @getc(ptr noundef %0) %sext = shl i32 %call.i26, 24 switch i32 %sext, label %while.cond8 [ i32 536870912, label %while.cond.backedge i32 167772160, label %while.cond.backedge ] while.cond.backedge: ; preds = %while.cond, %while.cond br label %while.cond, !llvm.loop !14 while.cond8: ; preds = %while.cond, %while.body15 %s.addr.0 = phi ptr [ %incdec.ptr, %while.body15 ], [ %s, %while.cond ] %c.1.in = phi i32 [ %call.i27, %while.body15 ], [ %call.i26, %while.cond ] %len.0 = phi i32 [ %inc, %while.body15 ], [ 0, %while.cond ] %sext25 = shl i32 %c.1.in, 24 switch i32 %sext25, label %while.body15 [ i32 536870912, label %while.end18 i32 167772160, label %while.end18 ] while.body15: ; preds = %while.cond8 %c.1 = trunc i32 %c.1.in to i8 %incdec.ptr = getelementptr inbounds i8, ptr %s.addr.0, i64 1 store i8 %c.1, ptr %s.addr.0, align 1, !tbaa !15 %inc = add i32 %len.0, 1 %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i27 = tail call i32 @getc(ptr noundef %1) br label %while.cond8, !llvm.loop !16 while.end18: ; preds = %while.cond8, %while.cond8 store i8 0, ptr %s.addr.0, align 1, !tbaa !15 ret i32 %len.0 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @getk(i32 noundef %a, i32 noundef %x) local_unnamed_addr #1 { entry: %cmp = icmp eq i32 %x, 1 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %div = sdiv i32 %x, 2 %call = tail call i32 @getk(i32 noundef %a, i32 noundef %div) %conv = sext i32 %call to i64 %mul = mul nsw i64 %conv, %conv %rem = urem i64 %mul, 1000000007 %and = and i32 %x, 1 %cmp3 = icmp eq i32 %and, 0 br i1 %cmp3, label %cleanup, label %if.else if.else: ; preds = %if.end %conv7 = sext i32 %a to i64 %mul8 = mul nsw i64 %rem, %conv7 %rem9 = srem i64 %mul8, 1000000007 br label %cleanup cleanup: ; preds = %if.end, %if.else %retval.0.in = phi i64 [ %rem9, %if.else ], [ %rem, %if.end ] %retval.0 = trunc i64 %retval.0.in to i32 br label %return return: ; preds = %entry, %cleanup %retval.1 = phi i32 [ %retval.0, %cleanup ], [ %a, %entry ] ret i32 %retval.1 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @comb(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp = icmp slt i32 %a, %b br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %idxprom = sext i32 %a to i64 %arrayidx = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !17 %conv = sext i32 %0 to i64 %idxprom1 = sext i32 %b to i64 %arrayidx2 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom1 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !17 %conv3 = sext i32 %1 to i64 %mul = mul nsw i64 %conv3, %conv %rem = srem i64 %mul, 1000000007 %sub = sub nsw i32 %a, %b %idxprom4 = sext i32 %sub to i64 %arrayidx5 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom4 %2 = load i32, ptr %arrayidx5, align 4, !tbaa !17 %conv6 = sext i32 %2 to i64 %mul7 = mul nsw i64 %rem, %conv6 %rem8 = srem i64 %mul7, 1000000007 %conv9 = trunc i64 %rem8 to i32 br label %return return: ; preds = %entry, %if.end %retval.0 = phi i32 [ %conv9, %if.end ], [ 0, %entry ] ret i32 %retval.0 } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @comb_init(i32 noundef %n) local_unnamed_addr #3 { entry: store i32 1, ptr @k, align 16, !tbaa !17 %cmp.not39 = icmp slt i32 %n, 1 br i1 %cmp.not39, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = zext i32 %n to i64 %xtraiter = and i64 %0, 1 %1 = icmp eq i32 %n, 1 br i1 %1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %0, 4294967294 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %conv.unr = phi i64 [ 1, %for.body.preheader ], [ %rem.1, %for.body ] %indvars.iv.unr = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa %mul.epil = mul nsw i64 %conv.unr, %indvars.iv.unr %rem.epil = srem i64 %mul.epil, 1000000007 %conv2.epil = trunc i64 %rem.epil to i32 %arrayidx4.epil = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv.unr store i32 %conv2.epil, ptr %arrayidx4.epil, align 4, !tbaa !17 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.epil, %for.cond.cleanup.loopexit.unr-lcssa, %entry %idxprom5 = sext i32 %n to i64 %arrayidx6 = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %idxprom5 %2 = load i32, ptr %arrayidx6, align 4, !tbaa !17 %call = tail call i32 @getk(i32 noundef %2, i32 noundef 1000000005) %arrayidx8 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom5 store i32 %call, ptr %arrayidx8, align 4, !tbaa !17 %cmp1241 = icmp sgt i32 %n, 0 br i1 %cmp1241, label %for.body15.preheader, label %for.cond.cleanup14 for.body15.preheader: ; preds = %for.cond.cleanup %3 = zext i32 %n to i64 %xtraiter48 = and i64 %3, 1 %lcmp.mod49.not = icmp eq i64 %xtraiter48, 0 br i1 %lcmp.mod49.not, label %for.body15.prol.loopexit, label %for.body15.prol for.body15.prol: ; preds = %for.body15.preheader %indvars.iv.next46.prol = add nsw i64 %3, -1 %arrayidx17.prol = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %3 %4 = load i32, ptr %arrayidx17.prol, align 4, !tbaa !17 %conv18.prol = sext i32 %4 to i64 %mul21.prol = mul nsw i64 %3, %conv18.prol %rem22.prol = srem i64 %mul21.prol, 1000000007 %conv23.prol = trunc i64 %rem22.prol to i32 %idxprom24.prol = and i64 %indvars.iv.next46.prol, 4294967295 %arrayidx25.prol = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24.prol store i32 %conv23.prol, ptr %arrayidx25.prol, align 4, !tbaa !17 br label %for.body15.prol.loopexit for.body15.prol.loopexit: ; preds = %for.body15.prol, %for.body15.preheader %indvars.iv45.unr = phi i64 [ %3, %for.body15.preheader ], [ %indvars.iv.next46.prol, %for.body15.prol ] %5 = icmp eq i32 %n, 1 br i1 %5, label %for.cond.cleanup14, label %for.body15 for.body: ; preds = %for.body, %for.body.preheader.new %conv = phi i64 [ 1, %for.body.preheader.new ], [ %rem.1, %for.body ] %indvars.iv = phi i64 [ 1, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %mul = mul nsw i64 %conv, %indvars.iv %rem = srem i64 %mul, 1000000007 %conv2 = trunc i64 %rem to i32 %arrayidx4 = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv store i32 %conv2, ptr %arrayidx4, align 4, !tbaa !17 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %mul.1 = mul nsw i64 %rem, %indvars.iv.next %rem.1 = srem i64 %mul.1, 1000000007 %conv2.1 = trunc i64 %rem.1 to i32 %arrayidx4.1 = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv.next store i32 %conv2.1, ptr %arrayidx4.1, align 4, !tbaa !17 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !19 for.cond.cleanup14: ; preds = %for.body15.prol.loopexit, %for.body15, %for.cond.cleanup ret void for.body15: ; preds = %for.body15.prol.loopexit, %for.body15 %indvars.iv45 = phi i64 [ %indvars.iv.next46.1, %for.body15 ], [ %indvars.iv45.unr, %for.body15.prol.loopexit ] %indvars.iv.next46 = add nsw i64 %indvars.iv45, -1 %arrayidx17 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %indvars.iv45 %6 = load i32, ptr %arrayidx17, align 4, !tbaa !17 %conv18 = sext i32 %6 to i64 %mul21 = mul nsw i64 %indvars.iv45, %conv18 %rem22 = srem i64 %mul21, 1000000007 %conv23 = trunc i64 %rem22 to i32 %idxprom24 = and i64 %indvars.iv.next46, 4294967295 %arrayidx25 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24 store i32 %conv23, ptr %arrayidx25, align 4, !tbaa !17 %indvars.iv.next46.1 = add nsw i64 %indvars.iv45, -2 %arrayidx17.1 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %indvars.iv.next46 %7 = load i32, ptr %arrayidx17.1, align 4, !tbaa !17 %conv18.1 = sext i32 %7 to i64 %mul21.1 = mul nsw i64 %indvars.iv.next46, %conv18.1 %rem22.1 = srem i64 %mul21.1, 1000000007 %conv23.1 = trunc i64 %rem22.1 to i32 %idxprom24.1 = and i64 %indvars.iv.next46.1, 4294967295 %arrayidx25.1 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24.1 store i32 %conv23.1, ptr %arrayidx25.1, align 4, !tbaa !17 %cmp12.1 = icmp ugt i64 %indvars.iv.next46, 1 br i1 %cmp12.1, label %for.body15, label %for.cond.cleanup14, !llvm.loop !20 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 @nextint() br label %while.cond.i while.cond.i: ; preds = %while.cond.i.backedge, %entry %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i26.i = tail call i32 @getc(ptr noundef %0) %sext.i = shl i32 %call.i26.i, 24 switch i32 %sext.i, label %while.cond8.i [ i32 536870912, label %while.cond.i.backedge i32 167772160, label %while.cond.i.backedge ] while.cond.i.backedge: ; preds = %while.cond.i, %while.cond.i br label %while.cond.i, !llvm.loop !14 while.cond8.i: ; preds = %while.cond.i, %while.body15.i %s.addr.0.i = phi ptr [ %incdec.ptr.i, %while.body15.i ], [ @s, %while.cond.i ] %c.1.in.i = phi i32 [ %call.i27.i, %while.body15.i ], [ %call.i26.i, %while.cond.i ] %len.0.i = phi i32 [ %inc.i, %while.body15.i ], [ 0, %while.cond.i ] %sext25.i = shl i32 %c.1.in.i, 24 switch i32 %sext25.i, label %while.body15.i [ i32 536870912, label %nextstr.exit i32 167772160, label %nextstr.exit ] while.body15.i: ; preds = %while.cond8.i %c.1.i = trunc i32 %c.1.in.i to i8 %incdec.ptr.i = getelementptr inbounds i8, ptr %s.addr.0.i, i64 1 store i8 %c.1.i, ptr %s.addr.0.i, align 1, !tbaa !15 %inc.i = add i32 %len.0.i, 1 %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i27.i = tail call i32 @getc(ptr noundef %1) br label %while.cond8.i, !llvm.loop !16 nextstr.exit: ; preds = %while.cond8.i, %while.cond8.i store i8 0, ptr %s.addr.0.i, align 1, !tbaa !15 store i32 1, ptr @r25, align 16, !tbaa !17 store i32 1, ptr @r26, align 16, !tbaa !17 %cmp.not58 = icmp slt i32 %call, 1 br i1 %cmp.not58, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %nextstr.exit %2 = add nuw i32 %call, 1 %wide.trip.count = zext i32 %2 to i64 br label %for.body for.cond.cleanup: ; preds = %for.body, %nextstr.exit %add = add nsw i32 %len.0.i, %call store i32 1, ptr @k, align 16, !tbaa !17 %cmp.not39.i = icmp slt i32 %add, 1 br i1 %cmp.not39.i, label %for.cond.cleanup.i, label %for.body.preheader.i for.body.preheader.i: ; preds = %for.cond.cleanup %3 = zext i32 %add to i64 %xtraiter = and i64 %3, 1 %4 = icmp eq i32 %add, 1 br i1 %4, label %for.cond.cleanup.i.loopexit.unr-lcssa, label %for.body.preheader.i.new for.body.preheader.i.new: ; preds = %for.body.preheader.i %unroll_iter = and i64 %3, 4294967294 br label %for.body.i for.cond.cleanup.i.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.preheader.i %conv.i.unr = phi i64 [ 1, %for.body.preheader.i ], [ %rem.i.1, %for.body.i ] %indvars.iv.i.unr = phi i64 [ 1, %for.body.preheader.i ], [ %indvars.iv.next.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup.i, label %for.body.i.epil for.body.i.epil: ; preds = %for.cond.cleanup.i.loopexit.unr-lcssa %mul.i.epil = mul nsw i64 %indvars.iv.i.unr, %conv.i.unr %rem.i.epil = srem i64 %mul.i.epil, 1000000007 %conv2.i.epil = trunc i64 %rem.i.epil to i32 %arrayidx4.i.epil = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv.i.unr store i32 %conv2.i.epil, ptr %arrayidx4.i.epil, align 4, !tbaa !17 br label %for.cond.cleanup.i for.cond.cleanup.i: ; preds = %for.body.i.epil, %for.cond.cleanup.i.loopexit.unr-lcssa, %for.cond.cleanup %idxprom5.i = sext i32 %add to i64 %arrayidx6.i = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %idxprom5.i %5 = load i32, ptr %arrayidx6.i, align 4, !tbaa !17 %call.i = tail call i32 @getk(i32 noundef %5, i32 noundef 1000000005) %arrayidx8.i = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom5.i store i32 %call.i, ptr %arrayidx8.i, align 4, !tbaa !17 %cmp1241.i = icmp sgt i32 %add, 0 br i1 %cmp1241.i, label %for.body15.preheader.i, label %comb_init.exit for.body15.preheader.i: ; preds = %for.cond.cleanup.i %6 = zext i32 %add to i64 %xtraiter69 = and i64 %6, 1 %lcmp.mod70.not = icmp eq i64 %xtraiter69, 0 br i1 %lcmp.mod70.not, label %for.body15.i.prol.loopexit, label %for.body15.i.prol for.body15.i.prol: ; preds = %for.body15.preheader.i %indvars.iv.next46.i.prol = add nsw i64 %6, -1 %arrayidx17.i.prol = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %6 %7 = load i32, ptr %arrayidx17.i.prol, align 4, !tbaa !17 %conv18.i.prol = sext i32 %7 to i64 %mul21.i.prol = mul nsw i64 %6, %conv18.i.prol %rem22.i.prol = srem i64 %mul21.i.prol, 1000000007 %conv23.i.prol = trunc i64 %rem22.i.prol to i32 %idxprom24.i.prol = and i64 %indvars.iv.next46.i.prol, 4294967295 %arrayidx25.i.prol = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24.i.prol store i32 %conv23.i.prol, ptr %arrayidx25.i.prol, align 4, !tbaa !17 br label %for.body15.i.prol.loopexit for.body15.i.prol.loopexit: ; preds = %for.body15.i.prol, %for.body15.preheader.i %indvars.iv45.i.unr = phi i64 [ %6, %for.body15.preheader.i ], [ %indvars.iv.next46.i.prol, %for.body15.i.prol ] %8 = icmp eq i32 %add, 1 br i1 %8, label %comb_init.exit, label %for.body15.i for.body.i: ; preds = %for.body.i, %for.body.preheader.i.new %conv.i = phi i64 [ 1, %for.body.preheader.i.new ], [ %rem.i.1, %for.body.i ] %indvars.iv.i = phi i64 [ 1, %for.body.preheader.i.new ], [ %indvars.iv.next.i.1, %for.body.i ] %niter = phi i64 [ 0, %for.body.preheader.i.new ], [ %niter.next.1, %for.body.i ] %mul.i = mul nsw i64 %indvars.iv.i, %conv.i %rem.i = srem i64 %mul.i, 1000000007 %conv2.i = trunc i64 %rem.i to i32 %arrayidx4.i = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv.i store i32 %conv2.i, ptr %arrayidx4.i, align 4, !tbaa !17 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %mul.i.1 = mul nsw i64 %indvars.iv.next.i, %rem.i %rem.i.1 = srem i64 %mul.i.1, 1000000007 %conv2.i.1 = trunc i64 %rem.i.1 to i32 %arrayidx4.i.1 = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %indvars.iv.next.i store i32 %conv2.i.1, ptr %arrayidx4.i.1, align 4, !tbaa !17 %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup.i.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !19 for.body15.i: ; preds = %for.body15.i.prol.loopexit, %for.body15.i %indvars.iv45.i = phi i64 [ %indvars.iv.next46.i.1, %for.body15.i ], [ %indvars.iv45.i.unr, %for.body15.i.prol.loopexit ] %indvars.iv.next46.i = add nsw i64 %indvars.iv45.i, -1 %arrayidx17.i = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %indvars.iv45.i %9 = load i32, ptr %arrayidx17.i, align 4, !tbaa !17 %conv18.i = sext i32 %9 to i64 %mul21.i = mul nsw i64 %indvars.iv45.i, %conv18.i %rem22.i = srem i64 %mul21.i, 1000000007 %conv23.i = trunc i64 %rem22.i to i32 %idxprom24.i = and i64 %indvars.iv.next46.i, 4294967295 %arrayidx25.i = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24.i store i32 %conv23.i, ptr %arrayidx25.i, align 4, !tbaa !17 %indvars.iv.next46.i.1 = add nsw i64 %indvars.iv45.i, -2 %arrayidx17.i.1 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %indvars.iv.next46.i %10 = load i32, ptr %arrayidx17.i.1, align 4, !tbaa !17 %conv18.i.1 = sext i32 %10 to i64 %mul21.i.1 = mul nsw i64 %indvars.iv.next46.i, %conv18.i.1 %rem22.i.1 = srem i64 %mul21.i.1, 1000000007 %conv23.i.1 = trunc i64 %rem22.i.1 to i32 %idxprom24.i.1 = and i64 %indvars.iv.next46.i.1, 4294967295 %arrayidx25.i.1 = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom24.i.1 store i32 %conv23.i.1, ptr %arrayidx25.i.1, align 4, !tbaa !17 %cmp12.i.1 = icmp ugt i64 %indvars.iv.next46.i, 1 br i1 %cmp12.i.1, label %for.body15.i, label %comb_init.exit, !llvm.loop !20 comb_init.exit: ; preds = %for.body15.i.prol.loopexit, %for.body15.i, %for.cond.cleanup.i %cmp1660 = icmp sgt i32 %call, -1 br i1 %cmp1660, label %for.body19.lr.ph, label %for.cond.cleanup18 for.body19.lr.ph: ; preds = %comb_init.exit %cmp.i.not = icmp sgt i32 %len.0.i, 0 %add20 = add i32 %len.0.i, -1 %idxprom4.i = sext i32 %add20 to i64 %arrayidx5.i = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %idxprom4.i %11 = zext i32 %call to i64 br label %for.body19 for.body: ; preds = %for.body.preheader, %for.body %conv8 = phi i64 [ 1, %for.body.preheader ], [ %rem10, %for.body ] %conv = phi i64 [ 1, %for.body.preheader ], [ %rem, %for.body ] %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %mul = mul nsw i64 %conv, 25 %rem = srem i64 %mul, 1000000007 %conv2 = trunc i64 %rem to i32 %arrayidx4 = getelementptr inbounds [1000001 x i32], ptr @r25, i64 0, i64 %indvars.iv store i32 %conv2, ptr %arrayidx4, align 4, !tbaa !17 %mul9 = mul nsw i64 %conv8, 26 %rem10 = srem i64 %mul9, 1000000007 %conv11 = trunc i64 %rem10 to i32 %arrayidx13 = getelementptr inbounds [1000001 x i32], ptr @r26, i64 0, i64 %indvars.iv store i32 %conv11, ptr %arrayidx13, align 4, !tbaa !17 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !21 for.cond.cleanup18: ; preds = %comb.exit, %comb_init.exit %ans.0.lcssa = phi i64 [ 0, %comb_init.exit ], [ %rem36, %comb.exit ] %call39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %ans.0.lcssa) ret i32 0 for.body19: ; preds = %for.body19.lr.ph, %comb.exit %indvars.iv65 = phi i64 [ %11, %for.body19.lr.ph ], [ %indvars.iv.next66, %comb.exit ] %ans.061 = phi i64 [ 0, %for.body19.lr.ph ], [ %rem36, %comb.exit ] br i1 %cmp.i.not, label %if.end.i, label %comb.exit if.end.i: ; preds = %for.body19 %12 = trunc i64 %indvars.iv65 to i32 %sub21 = add i32 %add20, %12 %idxprom.i = sext i32 %sub21 to i64 %arrayidx.i = getelementptr inbounds [2000001 x i32], ptr @k, i64 0, i64 %idxprom.i %13 = load i32, ptr %arrayidx.i, align 4, !tbaa !17 %conv.i55 = sext i32 %13 to i64 %arrayidx2.i = getelementptr inbounds [2000001 x i32], ptr @rk, i64 0, i64 %indvars.iv65 %14 = load i32, ptr %arrayidx2.i, align 4, !tbaa !17 %conv3.i = sext i32 %14 to i64 %mul.i56 = mul nsw i64 %conv3.i, %conv.i55 %rem.i57 = srem i64 %mul.i56, 1000000007 %15 = load i32, ptr %arrayidx5.i, align 4, !tbaa !17 %conv6.i = sext i32 %15 to i64 %mul7.i = mul nsw i64 %rem.i57, %conv6.i %rem8.i = srem i64 %mul7.i, 1000000007 br label %comb.exit comb.exit: ; preds = %for.body19, %if.end.i %retval.0.i = phi i64 [ %rem8.i, %if.end.i ], [ 0, %for.body19 ] %arrayidx25 = getelementptr inbounds [1000001 x i32], ptr @r25, i64 0, i64 %indvars.iv65 %16 = load i32, ptr %arrayidx25, align 4, !tbaa !17 %conv26 = sext i32 %16 to i64 %mul27 = mul nsw i64 %retval.0.i, %conv26 %rem28 = srem i64 %mul27, 1000000007 %17 = sub nuw nsw i64 %11, %indvars.iv65 %arrayidx31 = getelementptr inbounds [1000001 x i32], ptr @r26, i64 0, i64 %17 %18 = load i32, ptr %arrayidx31, align 4, !tbaa !17 %conv32 = sext i32 %18 to i64 %mul33 = mul nsw i64 %rem28, %conv32 %rem34 = srem i64 %mul33, 1000000007 %add35 = add nsw i64 %rem34, %ans.061 %rem36 = srem i64 %add35, 1000000007 %indvars.iv.next66 = add nsw i64 %indvars.iv65, -1 %cmp16 = icmp sgt i64 %indvars.iv65, 0 br i1 %cmp16, label %for.body19, label %for.cond.cleanup18, !llvm.loop !22 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture 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 = { 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 #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { 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 #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } !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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = !{!7, !7, i64 0} !16 = distinct !{!16, !10} !17 = !{!18, !18, i64 0} !18 = !{!"int", !7, i64 0} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10} !22 = distinct !{!22, !10}
#include <stdio.h> int main(void){ int n,s,i,j,f; struct data{ int c,m; }d[25],t; while(1){ scanf("%d",&n); if(!n) break; for(i=0;i<n;i++) scanf("%d %d",&d[i].c,&d[i].m); for(i=0;i<n-1;i++){ for(j=n-1;j>i;j--){ if(d[j-1].m>d[j].m){ t=d[j-1]; d[j-1]=d[j]; d[j]=t; } } } s=0; f=1; for(i=0;i<n;i++){ s+=d[i].c; if(s>d[i].m){ f=0; break; } } if(f) puts("Yes"); else puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132915/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132915/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.data = type { i32, i32 } @.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 [4 x i8] c"Yes\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %d = alloca [25 x %struct.data], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %d) #3 %call82 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not83 = icmp eq i32 %0, 0 br i1 %tobool.not83, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %if.end55 %1 = phi i32 [ %12, %if.end55 ], [ %0, %entry ] %cmp74 = icmp sgt i32 %1, 0 br i1 %cmp74, label %for.body, label %if.end55 for.cond4.preheader: ; preds = %for.body %cmp577 = icmp sgt i32 %4, 1 br i1 %cmp577, label %for.cond8.preheader.preheader, label %for.cond36.preheader for.cond8.preheader.preheader: ; preds = %for.cond4.preheader %sub = add nsw i32 %4, -1 %2 = zext i32 %4 to i64 %3 = add nsw i64 %2, -1 %wide.trip.count = zext i32 %sub to i64 br label %for.cond8.preheader for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv %m = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv, i32 1 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %m) %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.cond4.preheader, !llvm.loop !9 for.cond36.preheader: ; preds = %for.inc33, %for.cond4.preheader %cmp3779 = icmp sgt i32 %4, 0 br i1 %cmp3779, label %for.body38.preheader, label %if.end55 for.body38.preheader: ; preds = %for.cond36.preheader %wide.trip.count95 = zext i32 %4 to i64 br label %for.body38 for.cond8.preheader: ; preds = %for.cond8.preheader.preheader, %for.inc33 %indvars.iv89 = phi i64 [ 0, %for.cond8.preheader.preheader ], [ %indvars.iv.next90, %for.inc33 ] br label %for.body10 for.body10: ; preds = %for.cond8.preheader, %for.inc31 %indvars.iv86 = phi i64 [ %3, %for.cond8.preheader ], [ %indvars.iv.next87, %for.inc31 ] %indvars.iv.next87 = add nsw i64 %indvars.iv86, -1 %m14 = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv.next87, i32 1 %6 = load i32, ptr %m14, align 4, !tbaa !11 %m17 = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv86, i32 1 %7 = load i32, ptr %m17, align 4, !tbaa !11 %cmp18 = icmp sgt i32 %6, %7 br i1 %cmp18, label %if.then19, label %for.inc31 if.then19: ; preds = %for.body10 %arrayidx13 = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv.next87 %8 = load <2 x i64>, ptr %arrayidx13, align 8 %9 = shufflevector <2 x i64> %8, <2 x i64> poison, <2 x i32> <i32 1, i32 0> store <2 x i64> %9, ptr %arrayidx13, align 8 br label %for.inc31 for.inc31: ; preds = %for.body10, %if.then19 %cmp9 = icmp sgt i64 %indvars.iv.next87, %indvars.iv89 br i1 %cmp9, label %for.body10, label %for.inc33, !llvm.loop !13 for.inc33: ; preds = %for.inc31 %indvars.iv.next90 = add nuw nsw i64 %indvars.iv89, 1 %exitcond.not = icmp eq i64 %indvars.iv.next90, %wide.trip.count br i1 %exitcond.not, label %for.cond36.preheader, label %for.cond8.preheader, !llvm.loop !14 for.cond36: ; preds = %for.body38 %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1 %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95 br i1 %exitcond96.not, label %if.end55, label %for.body38, !llvm.loop !15 for.body38: ; preds = %for.body38.preheader, %for.cond36 %indvars.iv92 = phi i64 [ 0, %for.body38.preheader ], [ %indvars.iv.next93, %for.cond36 ] %s.080 = phi i32 [ 0, %for.body38.preheader ], [ %add, %for.cond36 ] %arrayidx40 = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv92 %10 = load i32, ptr %arrayidx40, align 8, !tbaa !16 %add = add nsw i32 %10, %s.080 %m44 = getelementptr inbounds [25 x %struct.data], ptr %d, i64 0, i64 %indvars.iv92, i32 1 %11 = load i32, ptr %m44, align 4, !tbaa !11 %cmp45 = icmp sgt i32 %add, %11 br i1 %cmp45, label %if.end55, label %for.cond36 if.end55: ; preds = %for.body38, %for.cond36, %for.cond36.preheader, %for.cond.preheader %.str.3.sink = phi ptr [ @.str.2, %for.cond.preheader ], [ @.str.2, %for.cond36.preheader ], [ @.str.2, %for.cond36 ], [ @.str.3, %for.body38 ] %call54 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.3.sink) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %12 = load i32, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %12, 0 br i1 %tobool.not, label %while.end, label %for.cond.preheader while.end: ; preds = %if.end55, %entry call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %d) #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 @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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!12, !6, i64 4} !12 = !{!"data", !6, i64 0, !6, i64 4} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = !{!12, !6, i64 0}
/* ex 7_3 APG4b • AtCoder Beginner Contest 107 B nk777 */ #include<stdio.h> // メモリの動的確保 #include<stdlib.h> int main(void){ // H行line,W列col,,for文のカウンタi,j,黒がある行と列を記憶する配列lineBlack,colBlack(初期値0) int line, col, i, j, *lineBlack, *colBlack; // 入力格納2次元配列matrix char **matrix; // line, colを受け取る scanf("%d %d", &line, &col); // line分の領域を確保 lineBlack = (int*)calloc(line, sizeof(int)); // col分の領域を確保 colBlack = (int*)calloc(col, sizeof(int)); if (lineBlack == NULL || colBlack == NULL) { exit(1); } // 各行の配列へのポインタ分のメモリ領域を確保 matrix = (char**)calloc(line, sizeof(char*)); if (matrix == NULL) { exit(1); } // 各行の要素分のメモリ領域を確保 for (i = 0; i < line; i++) { matrix[i] = (char*)calloc(col, sizeof(char)); if (matrix[i] == NULL) { exit(1); } for (j = 0; j < col; j++) { // 入力されるマス目の色を受け取る scanf(" %c", &matrix[i][j]); // もし黒だったら if (matrix[i][j] == '#') { // 黒があることを記録 lineBlack[i] = 1; colBlack[j] = 1; } } } // 黒が一つでもある行と列を出力 for (i = 0; i < line; i++) { if (lineBlack[i] == 1) { for (j = 0; j < col; j++) { if (colBlack[j] == 1) { // 行も列も黒があるときだけ表示 printf("%c", matrix[i][j]); } } // 1行終わるごとに改行する printf("\n"); } // matrixの各行の要素を解放 free(matrix[i]); } // メモリ領域の解放 free(lineBlack); free(colBlack); // matrix各行の配列へのポインタ解放 free(matrix); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_132966/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_132966/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" %c\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %line = alloca i32, align 4 %col = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %line) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %col) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %line, ptr noundef nonnull %col) %0 = load i32, ptr %line, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #8 %1 = load i32, ptr %col, align 4, !tbaa !5 %conv2 = sext i32 %1 to i64 %call3 = call noalias ptr @calloc(i64 noundef %conv2, i64 noundef 4) #8 %cmp = icmp eq ptr %call1, null %cmp5 = icmp eq ptr %call3, null %or.cond = or i1 %cmp, %cmp5 br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %entry call void @exit(i32 noundef 1) #9 unreachable if.end: ; preds = %entry %call8 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #8 %cmp9 = icmp eq ptr %call8, null br i1 %cmp9, label %if.then11, label %for.cond.preheader for.cond.preheader: ; preds = %if.end %cmp13118 = icmp sgt i32 %0, 0 br i1 %cmp13118, label %for.body, label %for.end82 if.then11: ; preds = %if.end call void @exit(i32 noundef 1) #9 unreachable for.cond48.preheader: ; preds = %for.inc45 %2 = icmp sgt i32 %8, 0 br i1 %2, label %for.body51, label %for.end82 for.body: ; preds = %for.cond.preheader, %for.inc45 %3 = phi i32 [ %8, %for.inc45 ], [ %0, %for.cond.preheader ] %4 = phi i32 [ %9, %for.inc45 ], [ %1, %for.cond.preheader ] %indvars.iv125 = phi i64 [ %indvars.iv.next126, %for.inc45 ], [ 0, %for.cond.preheader ] %conv15 = sext i32 %4 to i64 %call16 = call noalias ptr @calloc(i64 noundef %conv15, i64 noundef 1) #8 %arrayidx = getelementptr inbounds ptr, ptr %call8, i64 %indvars.iv125 store ptr %call16, ptr %arrayidx, align 8, !tbaa !9 %cmp19 = icmp eq ptr %call16, null br i1 %cmp19, label %if.then21, label %for.cond23.preheader for.cond23.preheader: ; preds = %for.body %cmp24116 = icmp sgt i32 %4, 0 br i1 %cmp24116, label %for.body26.lr.ph, label %for.inc45 for.body26.lr.ph: ; preds = %for.cond23.preheader %arrayidx41 = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv125 br label %for.body26 if.then21: ; preds = %for.body call void @exit(i32 noundef 1) #9 unreachable for.body26: ; preds = %for.body26.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body26.lr.ph ], [ %indvars.iv.next, %for.inc ] %arrayidx30 = getelementptr inbounds i8, ptr %call16, i64 %indvars.iv %call31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx30) %5 = load i8, ptr %arrayidx30, align 1, !tbaa !11 %cmp37 = icmp eq i8 %5, 35 br i1 %cmp37, label %if.then39, label %for.inc if.then39: ; preds = %for.body26 store i32 1, ptr %arrayidx41, align 4, !tbaa !5 %arrayidx43 = getelementptr inbounds i32, ptr %call3, i64 %indvars.iv store i32 1, ptr %arrayidx43, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body26, %if.then39 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %col, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp24 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp24, label %for.body26, label %for.inc45.loopexit, !llvm.loop !12 for.inc45.loopexit: ; preds = %for.inc %.pre = load i32, ptr %line, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.loopexit, %for.cond23.preheader %8 = phi i32 [ %.pre, %for.inc45.loopexit ], [ %3, %for.cond23.preheader ] %9 = phi i32 [ %6, %for.inc45.loopexit ], [ %4, %for.cond23.preheader ] %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1 %10 = sext i32 %8 to i64 %cmp13 = icmp slt i64 %indvars.iv.next126, %10 br i1 %cmp13, label %for.body, label %for.cond48.preheader, !llvm.loop !14 for.body51: ; preds = %for.cond48.preheader, %if.end77 %indvars.iv131 = phi i64 [ %indvars.iv.next132, %if.end77 ], [ 0, %for.cond48.preheader ] %arrayidx53 = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv131 %11 = load i32, ptr %arrayidx53, align 4, !tbaa !5 %cmp54 = icmp eq i32 %11, 1 br i1 %cmp54, label %for.cond57.preheader, label %if.end77 for.cond57.preheader: ; preds = %for.body51 %12 = load i32, ptr %col, align 4, !tbaa !5 %cmp58120 = icmp sgt i32 %12, 0 br i1 %cmp58120, label %for.body60.lr.ph, label %for.end75 for.body60.lr.ph: ; preds = %for.cond57.preheader %arrayidx67 = getelementptr inbounds ptr, ptr %call8, i64 %indvars.iv131 br label %for.body60 for.body60: ; preds = %for.body60.lr.ph, %for.inc73 %13 = phi i32 [ %12, %for.body60.lr.ph ], [ %17, %for.inc73 ] %indvars.iv128 = phi i64 [ 0, %for.body60.lr.ph ], [ %indvars.iv.next129, %for.inc73 ] %arrayidx62 = getelementptr inbounds i32, ptr %call3, i64 %indvars.iv128 %14 = load i32, ptr %arrayidx62, align 4, !tbaa !5 %cmp63 = icmp eq i32 %14, 1 br i1 %cmp63, label %if.then65, label %for.inc73 if.then65: ; preds = %for.body60 %15 = load ptr, ptr %arrayidx67, align 8, !tbaa !9 %arrayidx69 = getelementptr inbounds i8, ptr %15, i64 %indvars.iv128 %16 = load i8, ptr %arrayidx69, align 1, !tbaa !11 %conv70 = sext i8 %16 to i32 %putchar115 = call i32 @putchar(i32 %conv70) %.pre134 = load i32, ptr %col, align 4, !tbaa !5 br label %for.inc73 for.inc73: ; preds = %for.body60, %if.then65 %17 = phi i32 [ %13, %for.body60 ], [ %.pre134, %if.then65 ] %indvars.iv.next129 = add nuw nsw i64 %indvars.iv128, 1 %18 = sext i32 %17 to i64 %cmp58 = icmp slt i64 %indvars.iv.next129, %18 br i1 %cmp58, label %for.body60, label %for.end75, !llvm.loop !15 for.end75: ; preds = %for.inc73, %for.cond57.preheader %putchar = call i32 @putchar(i32 10) br label %if.end77 if.end77: ; preds = %for.end75, %for.body51 %arrayidx79 = getelementptr inbounds ptr, ptr %call8, i64 %indvars.iv131 %19 = load ptr, ptr %arrayidx79, align 8, !tbaa !9 call void @free(ptr noundef %19) #7 %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1 %20 = load i32, ptr %line, align 4, !tbaa !5 %21 = sext i32 %20 to i64 %cmp49 = icmp slt i64 %indvars.iv.next132, %21 br i1 %cmp49, label %for.body51, label %for.end82, !llvm.loop !16 for.end82: ; preds = %if.end77, %for.cond.preheader, %for.cond48.preheader call void @free(ptr noundef %call1) #7 call void @free(ptr noundef %call3) #7 call void @free(ptr noundef %call8) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %col) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %line) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nounwind } attributes #8 = { nounwind allocsize(0,1) } attributes #9 = { 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 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !13} !16 = distinct !{!16, !13}
/* ex 7_3 TakayukiY*/ #include<stdio.h> #include<stdlib.h> int main(void){ //indexと行列の要素数と空行チェック用の配列のポインタの定義 int i,j,row,column,*chkrow,*chkcol; //aijの格納配列の定義 char **ptr; //要素数を代入して各行のメモリ確保、エラーチェック scanf("%d%d\n",&row,&column); ptr=(char**)calloc(row,sizeof(char*)); if(ptr==NULL) exit(1); for(i=0;i<row;i++){ //各列のメモリ確保、エラーチェック ptr[i]=(char*)calloc(column,sizeof(char)); if(ptr==NULL) exit(1); //各要素を代入 for(j=0;j<column;j++){ scanf("%c",&ptr[i][j]); } //末尾の改行をスキップ getchar(); } //空行チェック用の配列のメモリ確保 chkrow=(int*)calloc(row,sizeof(int)); chkcol=(int*)calloc(column,sizeof(int)); //0で初期化 for(i=0;i<row;i++) *(chkrow+i)=0; for(j=0;j<column;j++) *(chkcol+j)=0; //行列の各要素のいずれかが空白でないならチェック用配列に1を代入 for(i=0;i<row;i++){ for(j=0;j<column;j++){ if(ptr[i][j]=='#'){ *(chkrow+i)=1; *(chkcol+j)=1; } } } //空白でない行・列に対して出力→圧縮 for(i=0;i<row;i++){ if(chkrow[i]==1){ for(j=0;j<column;j++){ if(chkcol[j]==1){ printf("%c",ptr[i][j]); } } printf("\n"); } } //メモリの解放 for(i=0;i<row;i++){ free(ptr[i]); } free(ptr); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133008/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133008/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\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %row = alloca i32, align 4 %column = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %row) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %column) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %row, ptr noundef nonnull %column) %0 = load i32, ptr %row, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #8 %cmp = icmp eq ptr %call1, null br i1 %cmp, label %if.then, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp3157 = icmp sgt i32 %0, 0 br i1 %cmp3157, label %for.body, label %for.end23 if.then: ; preds = %entry call void @exit(i32 noundef 1) #9 unreachable for.body: ; preds = %for.cond.preheader, %for.end %indvars.iv176 = phi i64 [ %indvars.iv.next177, %for.end ], [ 0, %for.cond.preheader ] %1 = load i32, ptr %column, align 4, !tbaa !5 %conv5 = sext i32 %1 to i64 %call6 = call noalias ptr @calloc(i64 noundef %conv5, i64 noundef 1) #8 %arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv176 store ptr %call6, ptr %arrayidx, align 8, !tbaa !9 %cmp12155 = icmp sgt i32 %1, 0 br i1 %cmp12155, label %for.body14, label %for.end for.body14: ; preds = %for.body, %for.body14 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body14 ], [ 0, %for.body ] %arrayidx18 = getelementptr inbounds i8, ptr %call6, i64 %indvars.iv %call19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx18) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %column, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp12 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp12, label %for.body14, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body14, %for.body %4 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i = call i32 @getc(ptr noundef %4) %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1 %5 = load i32, ptr %row, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp3 = icmp slt i64 %indvars.iv.next177, %6 br i1 %cmp3, label %for.body, label %for.end23, !llvm.loop !13 for.end23: ; preds = %for.end, %for.cond.preheader %conv24.pre-phi = phi i64 [ %conv, %for.cond.preheader ], [ %6, %for.end ] %7 = phi i32 [ %0, %for.cond.preheader ], [ %5, %for.end ] %call25 = call noalias ptr @calloc(i64 noundef %conv24.pre-phi, i64 noundef 4) #8 %8 = load i32, ptr %column, align 4, !tbaa !5 %conv26 = sext i32 %8 to i64 %call27 = call noalias ptr @calloc(i64 noundef %conv26, i64 noundef 4) #8 %cmp29159 = icmp sgt i32 %7, 0 br i1 %cmp29159, label %for.cond35.preheader, label %for.end112 for.cond35.preheader: ; preds = %for.end23 %cmp36161 = icmp sgt i32 %8, 0 br i1 %cmp36161, label %for.cond48.preheader.us.preheader, label %for.body74.preheader for.cond48.preheader.us.preheader: ; preds = %for.cond35.preheader %wide.trip.count191 = zext i32 %7 to i64 %wide.trip.count = zext i32 %8 to i64 %xtraiter = and i64 %wide.trip.count, 1 %9 = icmp eq i32 %8, 1 %unroll_iter = and i64 %wide.trip.count, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.cond48.preheader.us for.cond48.preheader.us: ; preds = %for.cond48.preheader.us.preheader, %for.cond48.for.inc68_crit_edge.us %indvars.iv188 = phi i64 [ 0, %for.cond48.preheader.us.preheader ], [ %indvars.iv.next189, %for.cond48.for.inc68_crit_edge.us ] %arrayidx53.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv188 %10 = load ptr, ptr %arrayidx53.us, align 8, !tbaa !9 %add.ptr61.us = getelementptr inbounds i32, ptr %call25, i64 %indvars.iv188 br i1 %9, label %for.cond48.for.inc68_crit_edge.us.unr-lcssa, label %for.body51.us for.body51.us: ; preds = %for.cond48.preheader.us, %for.inc65.us.1 %indvars.iv185 = phi i64 [ %indvars.iv.next186.1, %for.inc65.us.1 ], [ 0, %for.cond48.preheader.us ] %niter = phi i64 [ %niter.next.1, %for.inc65.us.1 ], [ 0, %for.cond48.preheader.us ] %arrayidx55.us = getelementptr inbounds i8, ptr %10, i64 %indvars.iv185 %11 = load i8, ptr %arrayidx55.us, align 1, !tbaa !14 %cmp57.us = icmp eq i8 %11, 35 br i1 %cmp57.us, label %if.then59.us, label %for.inc65.us if.then59.us: ; preds = %for.body51.us store i32 1, ptr %add.ptr61.us, align 4, !tbaa !5 %add.ptr63.us = getelementptr inbounds i32, ptr %call27, i64 %indvars.iv185 store i32 1, ptr %add.ptr63.us, align 4, !tbaa !5 br label %for.inc65.us for.inc65.us: ; preds = %if.then59.us, %for.body51.us %indvars.iv.next186 = or i64 %indvars.iv185, 1 %arrayidx55.us.1 = getelementptr inbounds i8, ptr %10, i64 %indvars.iv.next186 %12 = load i8, ptr %arrayidx55.us.1, align 1, !tbaa !14 %cmp57.us.1 = icmp eq i8 %12, 35 br i1 %cmp57.us.1, label %if.then59.us.1, label %for.inc65.us.1 if.then59.us.1: ; preds = %for.inc65.us store i32 1, ptr %add.ptr61.us, align 4, !tbaa !5 %add.ptr63.us.1 = getelementptr inbounds i32, ptr %call27, i64 %indvars.iv.next186 store i32 1, ptr %add.ptr63.us.1, align 4, !tbaa !5 br label %for.inc65.us.1 for.inc65.us.1: ; preds = %if.then59.us.1, %for.inc65.us %indvars.iv.next186.1 = add nuw nsw i64 %indvars.iv185, 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.cond48.for.inc68_crit_edge.us.unr-lcssa, label %for.body51.us, !llvm.loop !15 for.cond48.for.inc68_crit_edge.us.unr-lcssa: ; preds = %for.inc65.us.1, %for.cond48.preheader.us %indvars.iv185.unr = phi i64 [ 0, %for.cond48.preheader.us ], [ %indvars.iv.next186.1, %for.inc65.us.1 ] br i1 %lcmp.mod.not, label %for.cond48.for.inc68_crit_edge.us, label %for.body51.us.epil for.body51.us.epil: ; preds = %for.cond48.for.inc68_crit_edge.us.unr-lcssa %arrayidx55.us.epil = getelementptr inbounds i8, ptr %10, i64 %indvars.iv185.unr %13 = load i8, ptr %arrayidx55.us.epil, align 1, !tbaa !14 %cmp57.us.epil = icmp eq i8 %13, 35 br i1 %cmp57.us.epil, label %if.then59.us.epil, label %for.cond48.for.inc68_crit_edge.us if.then59.us.epil: ; preds = %for.body51.us.epil store i32 1, ptr %add.ptr61.us, align 4, !tbaa !5 %add.ptr63.us.epil = getelementptr inbounds i32, ptr %call27, i64 %indvars.iv185.unr store i32 1, ptr %add.ptr63.us.epil, align 4, !tbaa !5 br label %for.cond48.for.inc68_crit_edge.us for.cond48.for.inc68_crit_edge.us: ; preds = %for.body51.us.epil, %if.then59.us.epil, %for.cond48.for.inc68_crit_edge.us.unr-lcssa %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1 %exitcond192.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count191 br i1 %exitcond192.not, label %for.cond71.preheader, label %for.cond48.preheader.us, !llvm.loop !16 for.cond71.preheader: ; preds = %for.cond48.for.inc68_crit_edge.us br i1 %cmp29159, label %for.body74.preheader, label %for.end112 for.body74.preheader: ; preds = %for.cond35.preheader, %for.cond71.preheader br label %for.body74 for.cond104.preheader: ; preds = %for.inc101 %14 = icmp sgt i32 %24, 0 br i1 %14, label %for.body107, label %for.end112 for.body74: ; preds = %for.body74.preheader, %for.inc101 %15 = phi i32 [ %24, %for.inc101 ], [ %7, %for.body74.preheader ] %indvars.iv196 = phi i64 [ %indvars.iv.next197, %for.inc101 ], [ 0, %for.body74.preheader ] %arrayidx76 = getelementptr inbounds i32, ptr %call25, i64 %indvars.iv196 %16 = load i32, ptr %arrayidx76, align 4, !tbaa !5 %cmp77 = icmp eq i32 %16, 1 br i1 %cmp77, label %for.cond80.preheader, label %for.inc101 for.cond80.preheader: ; preds = %for.body74 %17 = load i32, ptr %column, align 4, !tbaa !5 %cmp81167 = icmp sgt i32 %17, 0 br i1 %cmp81167, label %for.body83.lr.ph, label %for.end98 for.body83.lr.ph: ; preds = %for.cond80.preheader %arrayidx90 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv196 br label %for.body83 for.body83: ; preds = %for.body83.lr.ph, %for.inc96 %18 = phi i32 [ %17, %for.body83.lr.ph ], [ %22, %for.inc96 ] %indvars.iv193 = phi i64 [ 0, %for.body83.lr.ph ], [ %indvars.iv.next194, %for.inc96 ] %arrayidx85 = getelementptr inbounds i32, ptr %call27, i64 %indvars.iv193 %19 = load i32, ptr %arrayidx85, align 4, !tbaa !5 %cmp86 = icmp eq i32 %19, 1 br i1 %cmp86, label %if.then88, label %for.inc96 if.then88: ; preds = %for.body83 %20 = load ptr, ptr %arrayidx90, align 8, !tbaa !9 %arrayidx92 = getelementptr inbounds i8, ptr %20, i64 %indvars.iv193 %21 = load i8, ptr %arrayidx92, align 1, !tbaa !14 %conv93 = sext i8 %21 to i32 %putchar154 = call i32 @putchar(i32 %conv93) %.pre = load i32, ptr %column, align 4, !tbaa !5 br label %for.inc96 for.inc96: ; preds = %for.body83, %if.then88 %22 = phi i32 [ %18, %for.body83 ], [ %.pre, %if.then88 ] %indvars.iv.next194 = add nuw nsw i64 %indvars.iv193, 1 %23 = sext i32 %22 to i64 %cmp81 = icmp slt i64 %indvars.iv.next194, %23 br i1 %cmp81, label %for.body83, label %for.end98, !llvm.loop !17 for.end98: ; preds = %for.inc96, %for.cond80.preheader %putchar = call i32 @putchar(i32 10) %.pre202 = load i32, ptr %row, align 4, !tbaa !5 br label %for.inc101 for.inc101: ; preds = %for.body74, %for.end98 %24 = phi i32 [ %15, %for.body74 ], [ %.pre202, %for.end98 ] %indvars.iv.next197 = add nuw nsw i64 %indvars.iv196, 1 %25 = sext i32 %24 to i64 %cmp72 = icmp slt i64 %indvars.iv.next197, %25 br i1 %cmp72, label %for.body74, label %for.cond104.preheader, !llvm.loop !18 for.body107: ; preds = %for.cond104.preheader, %for.body107 %indvars.iv199 = phi i64 [ %indvars.iv.next200, %for.body107 ], [ 0, %for.cond104.preheader ] %arrayidx109 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv199 %26 = load ptr, ptr %arrayidx109, align 8, !tbaa !9 call void @free(ptr noundef %26) #7 %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1 %27 = load i32, ptr %row, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp105 = icmp slt i64 %indvars.iv.next200, %28 br i1 %cmp105, label %for.body107, label %for.end112, !llvm.loop !19 for.end112: ; preds = %for.body107, %for.end23, %for.cond71.preheader, %for.cond104.preheader call void @free(ptr noundef %call1) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %column) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %row) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nounwind } attributes #8 = { nounwind allocsize(0,1) } attributes #9 = { 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 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = !{!7, !7, i64 0} !15 = distinct !{!15, !12} !16 = distinct !{!16, !12} !17 = distinct !{!17, !12} !18 = distinct !{!18, !12} !19 = distinct !{!19, !12}
/*ex7_3 Sweet_Sweet_Soul */ #include <stdio.h> #include <stdlib.h> int main(void) { int hei,wid;/*hei=height、wid=width*/ int *hei_ture,*wid_ture;/*各行や列に'#'があれば1を記録する配列*/ char **grid;/*入力用の多次元配列*/ scanf("%d%d",&hei,&wid); grid=(char**)calloc(hei,sizeof(char*));/*まず各配列の先頭のポインタを確保*/ if(grid==NULL){ exit(1); } for(int i=0;i<hei;i++){ grid[i]=(char*)calloc(wid,sizeof(char));/*各配列の要素を確保*/ if(grid[i]==NULL){ exit(1); } } hei_ture=(int*)calloc(hei,sizeof(int));/*他二つのtrue配列も確保*/ if(hei_ture==NULL){ exit(1); } wid_ture=(int*)calloc(wid,sizeof(int)); if(wid_ture==NULL){ exit(1); } for(int i=0;i<hei;i++){ for(int j=0;j<wid;j++){ scanf(" %c",&grid[i][j]);/*gridに入力*/ if(grid[i][j]=='#'){ hei_ture[i]=1;/*ついでに真偽値も記録*/ wid_ture[j]=1; } } } for(int i=0;i<hei;i++){ if(hei_ture[i]==1){ for(int j=0;j<wid;j++){ if(wid_ture[j]==1){ printf("%c",grid[i][j]);/*行、列ともに真偽値1なら出力*/ } } printf("\n");/*行ごとに改行*/ } } /*先に各要素の配列のメモリを解放*/ for(int i=0;i<hei;i++){ free(grid[i]); } /*次に先頭のポインタを解放*/ free(grid); free(hei_ture); free(wid_ture); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133051/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133051/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 [4 x i8] c" %c\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %hei = alloca i32, align 4 %wid = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hei) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %wid) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %hei, ptr noundef nonnull %wid) %0 = load i32, ptr %hei, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 8) #8 %cmp = icmp eq ptr %call1, null br i1 %cmp, label %if.then, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp3141 = icmp sgt i32 %0, 0 br i1 %cmp3141, label %for.body.lr.ph, label %for.cond.cleanup for.body.lr.ph: ; preds = %for.cond.preheader %1 = load i32, ptr %wid, align 4, !tbaa !5 %conv5 = sext i32 %1 to i64 %wide.trip.count = zext i32 %0 to i64 br label %for.body if.then: ; preds = %entry call void @exit(i32 noundef 1) #9 unreachable for.cond: ; preds = %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.cond.cleanup, label %for.body, !llvm.loop !9 for.cond.cleanup: ; preds = %for.cond, %for.cond.preheader %call14 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #8 %cmp15 = icmp eq ptr %call14, null br i1 %cmp15, label %if.then17, label %if.end18 for.body: ; preds = %for.body.lr.ph, %for.cond %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.cond ] %call6 = call noalias ptr @calloc(i64 noundef %conv5, i64 noundef 1) #8 %arrayidx = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv store ptr %call6, ptr %arrayidx, align 8, !tbaa !11 %cmp9 = icmp eq ptr %call6, null br i1 %cmp9, label %if.then11, label %for.cond if.then11: ; preds = %for.body call void @exit(i32 noundef 1) #9 unreachable if.then17: ; preds = %for.cond.cleanup call void @exit(i32 noundef 1) #9 unreachable if.end18: ; preds = %for.cond.cleanup %2 = load i32, ptr %wid, align 4, !tbaa !5 %conv19 = sext i32 %2 to i64 %call20 = call noalias ptr @calloc(i64 noundef %conv19, i64 noundef 4) #8 %cmp21 = icmp eq ptr %call20, null br i1 %cmp21, label %if.then23, label %for.cond26.preheader for.cond26.preheader: ; preds = %if.end18 br i1 %cmp3141, label %for.cond31.preheader.lr.ph, label %for.cond.cleanup101 for.cond31.preheader.lr.ph: ; preds = %for.cond26.preheader %3 = icmp sgt i32 %2, 0 br i1 %3, label %for.cond31.preheader, label %for.body65.preheader if.then23: ; preds = %if.end18 call void @exit(i32 noundef 1) #9 unreachable for.cond31.preheader: ; preds = %for.cond31.preheader.lr.ph, %for.cond.cleanup34 %4 = phi i32 [ %7, %for.cond.cleanup34 ], [ %0, %for.cond31.preheader.lr.ph ] %5 = phi i32 [ %8, %for.cond.cleanup34 ], [ %2, %for.cond31.preheader.lr.ph ] %indvars.iv158 = phi i64 [ %indvars.iv.next159, %for.cond.cleanup34 ], [ 0, %for.cond31.preheader.lr.ph ] %cmp32143 = icmp sgt i32 %5, 0 br i1 %cmp32143, label %for.body35.lr.ph, label %for.cond.cleanup34 for.body35.lr.ph: ; preds = %for.cond31.preheader %arrayidx37 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv158 %6 = load ptr, ptr %arrayidx37, align 8, !tbaa !11 %arrayidx50 = getelementptr inbounds i32, ptr %call14, i64 %indvars.iv158 br label %for.body35 for.cond61.preheader: ; preds = %for.cond.cleanup34 %cmp62149 = icmp sgt i32 %7, 0 br i1 %cmp62149, label %for.body65.preheader, label %for.cond.cleanup101 for.body65.preheader: ; preds = %for.cond31.preheader.lr.ph, %for.cond61.preheader %.ph = phi i32 [ %0, %for.cond31.preheader.lr.ph ], [ %7, %for.cond61.preheader ] br label %for.body65 for.cond.cleanup34.loopexit: ; preds = %for.inc54 %.pre = load i32, ptr %hei, align 4, !tbaa !5 br label %for.cond.cleanup34 for.cond.cleanup34: ; preds = %for.cond.cleanup34.loopexit, %for.cond31.preheader %7 = phi i32 [ %.pre, %for.cond.cleanup34.loopexit ], [ %4, %for.cond31.preheader ] %8 = phi i32 [ %11, %for.cond.cleanup34.loopexit ], [ %5, %for.cond31.preheader ] %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1 %9 = sext i32 %7 to i64 %cmp27 = icmp slt i64 %indvars.iv.next159, %9 br i1 %cmp27, label %for.cond31.preheader, label %for.cond61.preheader, !llvm.loop !13 for.body35: ; preds = %for.body35.lr.ph, %for.inc54 %indvars.iv155 = phi i64 [ 0, %for.body35.lr.ph ], [ %indvars.iv.next156, %for.inc54 ] %arrayidx39 = getelementptr inbounds i8, ptr %6, i64 %indvars.iv155 %call40 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx39) %10 = load i8, ptr %arrayidx39, align 1, !tbaa !15 %cmp46 = icmp eq i8 %10, 35 br i1 %cmp46, label %if.then48, label %for.inc54 if.then48: ; preds = %for.body35 store i32 1, ptr %arrayidx50, align 4, !tbaa !5 %arrayidx52 = getelementptr inbounds i32, ptr %call20, i64 %indvars.iv155 store i32 1, ptr %arrayidx52, align 4, !tbaa !5 br label %for.inc54 for.inc54: ; preds = %for.body35, %if.then48 %indvars.iv.next156 = add nuw nsw i64 %indvars.iv155, 1 %11 = load i32, ptr %wid, align 4, !tbaa !5 %12 = sext i32 %11 to i64 %cmp32 = icmp slt i64 %indvars.iv.next156, %12 br i1 %cmp32, label %for.body35, label %for.cond.cleanup34.loopexit, !llvm.loop !16 for.cond98.preheader: ; preds = %for.inc94 %13 = icmp sgt i32 %23, 0 br i1 %13, label %for.body102, label %for.cond.cleanup101 for.body65: ; preds = %for.body65.preheader, %for.inc94 %14 = phi i32 [ %23, %for.inc94 ], [ %.ph, %for.body65.preheader ] %indvars.iv164 = phi i64 [ %indvars.iv.next165, %for.inc94 ], [ 0, %for.body65.preheader ] %arrayidx67 = getelementptr inbounds i32, ptr %call14, i64 %indvars.iv164 %15 = load i32, ptr %arrayidx67, align 4, !tbaa !5 %cmp68 = icmp eq i32 %15, 1 br i1 %cmp68, label %for.cond72.preheader, label %for.inc94 for.cond72.preheader: ; preds = %for.body65 %16 = load i32, ptr %wid, align 4, !tbaa !5 %cmp73147 = icmp sgt i32 %16, 0 br i1 %cmp73147, label %for.body76.lr.ph, label %for.cond.cleanup75 for.body76.lr.ph: ; preds = %for.cond72.preheader %arrayidx83 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv164 br label %for.body76 for.cond.cleanup75: ; preds = %for.inc89, %for.cond72.preheader %putchar = call i32 @putchar(i32 10) %.pre171 = load i32, ptr %hei, align 4, !tbaa !5 br label %for.inc94 for.body76: ; preds = %for.body76.lr.ph, %for.inc89 %17 = phi i32 [ %16, %for.body76.lr.ph ], [ %21, %for.inc89 ] %indvars.iv161 = phi i64 [ 0, %for.body76.lr.ph ], [ %indvars.iv.next162, %for.inc89 ] %arrayidx78 = getelementptr inbounds i32, ptr %call20, i64 %indvars.iv161 %18 = load i32, ptr %arrayidx78, align 4, !tbaa !5 %cmp79 = icmp eq i32 %18, 1 br i1 %cmp79, label %if.then81, label %for.inc89 if.then81: ; preds = %for.body76 %19 = load ptr, ptr %arrayidx83, align 8, !tbaa !11 %arrayidx85 = getelementptr inbounds i8, ptr %19, i64 %indvars.iv161 %20 = load i8, ptr %arrayidx85, align 1, !tbaa !15 %conv86 = sext i8 %20 to i32 %putchar140 = call i32 @putchar(i32 %conv86) %.pre170 = load i32, ptr %wid, align 4, !tbaa !5 br label %for.inc89 for.inc89: ; preds = %for.body76, %if.then81 %21 = phi i32 [ %17, %for.body76 ], [ %.pre170, %if.then81 ] %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1 %22 = sext i32 %21 to i64 %cmp73 = icmp slt i64 %indvars.iv.next162, %22 br i1 %cmp73, label %for.body76, label %for.cond.cleanup75, !llvm.loop !17 for.inc94: ; preds = %for.body65, %for.cond.cleanup75 %23 = phi i32 [ %14, %for.body65 ], [ %.pre171, %for.cond.cleanup75 ] %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1 %24 = sext i32 %23 to i64 %cmp62 = icmp slt i64 %indvars.iv.next165, %24 br i1 %cmp62, label %for.body65, label %for.cond98.preheader, !llvm.loop !18 for.cond.cleanup101: ; preds = %for.body102, %for.cond26.preheader, %for.cond61.preheader, %for.cond98.preheader call void @free(ptr noundef %call1) #7 call void @free(ptr noundef %call14) #7 call void @free(ptr noundef %call20) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %wid) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hei) #7 ret i32 0 for.body102: ; preds = %for.cond98.preheader, %for.body102 %indvars.iv167 = phi i64 [ %indvars.iv.next168, %for.body102 ], [ 0, %for.cond98.preheader ] %arrayidx104 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv167 %25 = load ptr, ptr %arrayidx104, align 8, !tbaa !11 call void @free(ptr noundef %25) #7 %indvars.iv.next168 = add nuw nsw i64 %indvars.iv167, 1 %26 = load i32, ptr %hei, align 4, !tbaa !5 %27 = sext i32 %26 to i64 %cmp99 = icmp slt i64 %indvars.iv.next168, %27 br i1 %cmp99, label %for.body102, label %for.cond.cleanup101, !llvm.loop !19 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nounwind } attributes #8 = { nounwind allocsize(0,1) } attributes #9 = { 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 = !{!12, !12, i64 0} !12 = !{!"any pointer", !7, i64 0} !13 = distinct !{!13, !10, !14} !14 = !{!"llvm.loop.unswitch.partial.disable"} !15 = !{!7, !7, i64 0} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10}
/* ex5_3 hangan2020 */ #include <stdio.h> #define IS 101 int main(void){ int H, W; int i, j; char row[IS][IS]; scanf("%d %d", &H, &W); //Input by loop for (i = 0; i < H ; i++){ for(j = 0; j < W ; j++){ scanf(" %c", &row[i][j]); } } // Scanning for '.' only rows for (i = 0; i < H ; i++){ for(j = 0; j < W ; j++){ if(row[i][j] != '.'){ break; } else if((j == W -1)&&(row[i][j] == '.')){ row[i][W] = 'n';// print none(n) } } } // Scanning for '.' only columns for (j = 0; j < W ; j++){ for(i = 0; i < H ; i++){ if(row[i][j] != '.'){ break; } else if((i == H-1)&&(row[i][j] == '.')){ row[H][j] = 'n';// print none(n) } } } /*for (i = 0; i < H ; i++){ for(j = 0; j < W ; j++){ printf("%c", row[i][j]); } printf("\n"); }*/ //Printing out by loop ( except for rows or columns that starts with 'n') for (i = 0; i < H ; i++){ if(row[i][W] != 'n'){ for(j = 0; j < W ; j++){ if(row[H][j] != 'n'){ printf("%c", row[i][j]); } } printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133101/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133101/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" %c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 %row = alloca [101 x [101 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.start.p0(i64 10201, ptr nonnull %row) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp159 = icmp sgt i32 %0, 0 br i1 %cmp159, label %for.cond1.preheader.lr.ph, label %for.end122 for.cond1.preheader.lr.ph: ; preds = %entry %.pre205.pre = load i32, ptr %W, align 4, !tbaa !5 %1 = icmp sgt i32 %.pre205.pre, 0 br i1 %1, label %for.cond1.preheader, label %for.body87.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc7 %2 = phi i32 [ %8, %for.inc7 ], [ %0, %for.cond1.preheader.lr.ph ] %3 = phi i32 [ %9, %for.inc7 ], [ %.pre205.pre, %for.cond1.preheader.lr.ph ] %indvars.iv178 = phi i64 [ %indvars.iv.next179, %for.inc7 ], [ 0, %for.cond1.preheader.lr.ph ] %cmp2157 = icmp sgt i32 %3, 0 br i1 %cmp2157, label %for.body3, label %for.inc7 for.cond10.preheader: ; preds = %for.inc7 %cmp11163 = icmp sgt i32 %8, 0 br i1 %cmp11163, label %for.cond13.preheader.lr.ph, label %for.cond43.preheader for.cond13.preheader.lr.ph: ; preds = %for.cond10.preheader %cmp14161 = icmp sgt i32 %9, 0 %idxprom34 = sext i32 %9 to i64 br i1 %cmp14161, label %for.cond13.preheader.us.preheader, label %for.body87.preheader for.cond13.preheader.us.preheader: ; preds = %for.cond13.preheader.lr.ph %sub = add nsw i32 %9, -1 %4 = zext i32 %sub to i64 %wide.trip.count187 = zext i32 %8 to i64 %wide.trip.count = zext i32 %9 to i64 br label %for.cond13.preheader.us for.cond13.preheader.us: ; preds = %for.cond13.preheader.us.preheader, %for.inc40.us %indvars.iv184 = phi i64 [ 0, %for.cond13.preheader.us.preheader ], [ %indvars.iv.next185, %for.inc40.us ] %arrayidx35.us = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv184, i64 %idxprom34 br label %for.body15.us for.body15.us: ; preds = %for.cond13.preheader.us, %for.inc37.us %indvars.iv181 = phi i64 [ 0, %for.cond13.preheader.us ], [ %indvars.iv.next182, %for.inc37.us ] %arrayidx19.us = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv184, i64 %indvars.iv181 %5 = load i8, ptr %arrayidx19.us, align 1, !tbaa !9 %cmp20.not.us = icmp eq i8 %5, 46 br i1 %cmp20.not.us, label %if.else.us, label %for.inc40.us for.inc40.us: ; preds = %for.body15.us, %for.inc37.us %indvars.iv.next185 = add nuw nsw i64 %indvars.iv184, 1 %exitcond188.not = icmp eq i64 %indvars.iv.next185, %wide.trip.count187 br i1 %exitcond188.not, label %for.cond43.preheader, label %for.cond13.preheader.us, !llvm.loop !10 if.else.us: ; preds = %for.body15.us %cmp22.us = icmp eq i64 %indvars.iv181, %4 br i1 %cmp22.us, label %if.then31.us, label %for.inc37.us if.then31.us: ; preds = %if.else.us store i8 110, ptr %arrayidx35.us, align 1, !tbaa !9 br label %for.inc37.us for.inc37.us: ; preds = %if.then31.us, %if.else.us %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1 %exitcond.not = icmp eq i64 %indvars.iv.next182, %wide.trip.count br i1 %exitcond.not, label %for.inc40.us, label %for.body15.us, !llvm.loop !12 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv178, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %W, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp2, label %for.body3, label %for.inc7.loopexit, !llvm.loop !13 for.inc7.loopexit: ; preds = %for.body3 %.pre = load i32, ptr %H, align 4, !tbaa !5 br label %for.inc7 for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader %8 = phi i32 [ %.pre, %for.inc7.loopexit ], [ %2, %for.cond1.preheader ] %9 = phi i32 [ %6, %for.inc7.loopexit ], [ %3, %for.cond1.preheader ] %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1 %10 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next179, %10 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !14 for.cond43.preheader: ; preds = %for.inc40.us, %for.cond10.preheader %cmp44167 = icmp sgt i32 %9, 0 br i1 %cmp44167, label %for.cond47.preheader.lr.ph, label %for.cond84.preheader for.cond47.preheader.lr.ph: ; preds = %for.cond43.preheader %idxprom72 = sext i32 %8 to i64 br i1 %cmp11163, label %for.cond47.preheader.us.preheader, label %for.end122 for.cond47.preheader.us.preheader: ; preds = %for.cond47.preheader.lr.ph %sub60 = add nsw i32 %8, -1 %11 = zext i32 %sub60 to i64 %wide.trip.count197 = zext i32 %9 to i64 %wide.trip.count192 = zext i32 %8 to i64 br label %for.cond47.preheader.us for.cond47.preheader.us: ; preds = %for.cond47.preheader.us.preheader, %for.inc81.us %indvars.iv194 = phi i64 [ 0, %for.cond47.preheader.us.preheader ], [ %indvars.iv.next195, %for.inc81.us ] %arrayidx75.us = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %idxprom72, i64 %indvars.iv194 br label %for.body50.us for.body50.us: ; preds = %for.cond47.preheader.us, %for.inc78.us %indvars.iv189 = phi i64 [ 0, %for.cond47.preheader.us ], [ %indvars.iv.next190, %for.inc78.us ] %arrayidx54.us = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv189, i64 %indvars.iv194 %12 = load i8, ptr %arrayidx54.us, align 1, !tbaa !9 %cmp56.not.us = icmp eq i8 %12, 46 br i1 %cmp56.not.us, label %if.else59.us, label %for.inc81.us for.inc81.us: ; preds = %for.body50.us, %for.inc78.us %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1 %exitcond198.not = icmp eq i64 %indvars.iv.next195, %wide.trip.count197 br i1 %exitcond198.not, label %for.cond84.preheader, label %for.cond47.preheader.us, !llvm.loop !16 if.else59.us: ; preds = %for.body50.us %cmp61.us = icmp eq i64 %indvars.iv189, %11 br i1 %cmp61.us, label %if.then71.us, label %for.inc78.us if.then71.us: ; preds = %if.else59.us store i8 110, ptr %arrayidx75.us, align 1, !tbaa !9 br label %for.inc78.us for.inc78.us: ; preds = %if.then71.us, %if.else59.us %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1 %exitcond193.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count192 br i1 %exitcond193.not, label %for.inc81.us, label %for.body50.us, !llvm.loop !17 for.cond84.preheader: ; preds = %for.inc81.us, %for.cond43.preheader br i1 %cmp11163, label %for.body87.preheader, label %for.end122 for.body87.preheader: ; preds = %for.cond13.preheader.lr.ph, %for.cond1.preheader.lr.ph, %for.cond84.preheader %.ph = phi i32 [ %8, %for.cond13.preheader.lr.ph ], [ %0, %for.cond1.preheader.lr.ph ], [ %8, %for.cond84.preheader ] br label %for.body87 for.body87: ; preds = %for.body87.preheader, %for.inc120 %13 = phi i32 [ %22, %for.inc120 ], [ %.ph, %for.body87.preheader ] %indvars.iv202 = phi i64 [ %indvars.iv.next203, %for.inc120 ], [ 0, %for.body87.preheader ] %14 = load i32, ptr %W, align 4, !tbaa !5 %idxprom90 = sext i32 %14 to i64 %arrayidx91 = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv202, i64 %idxprom90 %15 = load i8, ptr %arrayidx91, align 1, !tbaa !9 %cmp93.not = icmp eq i8 %15, 110 br i1 %cmp93.not, label %for.inc120, label %for.cond96.preheader for.cond96.preheader: ; preds = %for.body87 %cmp97169 = icmp sgt i32 %14, 0 br i1 %cmp97169, label %for.body99, label %for.end117 for.body99: ; preds = %for.cond96.preheader, %for.inc115 %16 = phi i32 [ %20, %for.inc115 ], [ %14, %for.cond96.preheader ] %indvars.iv199 = phi i64 [ %indvars.iv.next200, %for.inc115 ], [ 0, %for.cond96.preheader ] %17 = load i32, ptr %H, align 4, !tbaa !5 %idxprom100 = sext i32 %17 to i64 %arrayidx103 = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %idxprom100, i64 %indvars.iv199 %18 = load i8, ptr %arrayidx103, align 1, !tbaa !9 %cmp105.not = icmp eq i8 %18, 110 br i1 %cmp105.not, label %for.inc115, label %if.then107 if.then107: ; preds = %for.body99 %arrayidx111 = getelementptr inbounds [101 x [101 x i8]], ptr %row, i64 0, i64 %indvars.iv202, i64 %indvars.iv199 %19 = load i8, ptr %arrayidx111, align 1, !tbaa !9 %conv112 = sext i8 %19 to i32 %putchar156 = call i32 @putchar(i32 %conv112) %.pre206 = load i32, ptr %W, align 4, !tbaa !5 br label %for.inc115 for.inc115: ; preds = %for.body99, %if.then107 %20 = phi i32 [ %16, %for.body99 ], [ %.pre206, %if.then107 ] %indvars.iv.next200 = add nuw nsw i64 %indvars.iv199, 1 %21 = sext i32 %20 to i64 %cmp97 = icmp slt i64 %indvars.iv.next200, %21 br i1 %cmp97, label %for.body99, label %for.end117, !llvm.loop !18 for.end117: ; preds = %for.inc115, %for.cond96.preheader %putchar = call i32 @putchar(i32 10) %.pre207 = load i32, ptr %H, align 4, !tbaa !5 br label %for.inc120 for.inc120: ; preds = %for.body87, %for.end117 %22 = phi i32 [ %13, %for.body87 ], [ %.pre207, %for.end117 ] %indvars.iv.next203 = add nuw nsw i64 %indvars.iv202, 1 %23 = sext i32 %22 to i64 %cmp85 = icmp slt i64 %indvars.iv.next203, %23 br i1 %cmp85, label %for.body87, label %for.end122, !llvm.loop !19 for.end122: ; preds = %for.inc120, %entry, %for.cond47.preheader.lr.ph, %for.cond84.preheader call void @llvm.lifetime.end.p0(i64 10201, ptr nonnull %row) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11} !14 = distinct !{!14, !11, !15} !15 = !{!"llvm.loop.unswitch.partial.disable"} !16 = distinct !{!16, !11} !17 = distinct !{!17, !11} !18 = distinct !{!18, !11} !19 = distinct !{!19, !11}
/* ex5_3 riverstone*/ #include<stdio.h> #include <stdbool.h> #define LIM 100 //行数、列数の上限 int main(void){ int height, width, i, j; //多次元配列の定義 //black_rowとblack_colは各行と各列に1つ以上の黒が存在するかを記録 char block[LIM][LIM]; int black_row[LIM]={}, black_col[LIM]={}; //入力の受け取り scanf("%d %d", &height, &width); //行列の各マスを読み取る //各行と各列に1つ以上の黒が存在するかをblack_rowとblack_colに記録 for(i = 0; i < height; i++){ for(j = 0; j < width; j++){ scanf(" %c", &block[i][j]); if(block[i][j] == '#'){ //マス(i,j)が黒のとき,black_row[i],black_col[j]を1にする black_row[i] = 1; black_col[j] = 1; } } } //black_rowとblack_colを見て共に1であるようなマスの場合のみ出力 for(i = 0; i < height; i++){ if(black_row[i] == 1){ for(j = 0; j < width; j++){ if(black_col[j] == 1){ //black_row[i] = tureかつblack_col[j] = 0のときblock[i][j]を表示 printf("%c", block[i][j]); } } printf("\n"); //1行の処理が全て終わると改行する } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133145/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133145/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" %c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %height = alloca i32, align 4 %width = alloca i32, align 4 %block = alloca [100 x [100 x i8]], align 16 %black_row = alloca [100 x i32], align 16 %black_col = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #5 call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %block) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %black_row) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %black_row, i8 0, i64 400, i1 false) call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %black_col) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %black_col, i8 0, i64 400, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width) %0 = load i32, ptr %height, align 4, !tbaa !5 %cmp72 = icmp sgt i32 %0, 0 br i1 %cmp72, label %for.cond1.preheader.lr.ph, label %for.end52 for.cond1.preheader.lr.ph: ; preds = %entry %1 = load i32, ptr %width, align 4, !tbaa !5 %2 = icmp sgt i32 %1, 0 br i1 %2, label %for.cond1.preheader, label %for.body23.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc17 %3 = phi i32 [ %8, %for.inc17 ], [ %0, %for.cond1.preheader.lr.ph ] %4 = phi i32 [ %9, %for.inc17 ], [ %1, %for.cond1.preheader.lr.ph ] %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.inc17 ], [ 0, %for.cond1.preheader.lr.ph ] %cmp270 = icmp sgt i32 %4, 0 br i1 %cmp270, label %for.body3.lr.ph, label %for.inc17 for.body3.lr.ph: ; preds = %for.cond1.preheader %arrayidx14 = getelementptr inbounds [100 x i32], ptr %black_row, i64 0, i64 %indvars.iv80 br label %for.body3 for.cond20.preheader: ; preds = %for.inc17 %cmp2176 = icmp sgt i32 %8, 0 br i1 %cmp2176, label %for.body23.preheader, label %for.end52 for.body23.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond20.preheader %.ph = phi i32 [ %0, %for.cond1.preheader.lr.ph ], [ %8, %for.cond20.preheader ] br label %for.body23 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body3.lr.ph ], [ %indvars.iv.next, %for.inc ] %arrayidx5 = getelementptr inbounds [100 x [100 x i8]], ptr %block, i64 0, i64 %indvars.iv80, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5) %5 = load i8, ptr %arrayidx5, align 1, !tbaa !9 %cmp11 = icmp eq i8 %5, 35 br i1 %cmp11, label %if.then, label %for.inc if.then: ; preds = %for.body3 store i32 1, ptr %arrayidx14, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [100 x i32], ptr %black_col, i64 0, i64 %indvars.iv store i32 1, ptr %arrayidx16, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %width, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp2, label %for.body3, label %for.inc17.loopexit, !llvm.loop !10 for.inc17.loopexit: ; preds = %for.inc %.pre = load i32, ptr %height, align 4, !tbaa !5 br label %for.inc17 for.inc17: ; preds = %for.inc17.loopexit, %for.cond1.preheader %8 = phi i32 [ %.pre, %for.inc17.loopexit ], [ %3, %for.cond1.preheader ] %9 = phi i32 [ %6, %for.inc17.loopexit ], [ %4, %for.cond1.preheader ] %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %10 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next81, %10 br i1 %cmp, label %for.cond1.preheader, label %for.cond20.preheader, !llvm.loop !12 for.body23: ; preds = %for.body23.preheader, %for.inc50 %11 = phi i32 [ %19, %for.inc50 ], [ %.ph, %for.body23.preheader ] %indvars.iv86 = phi i64 [ %indvars.iv.next87, %for.inc50 ], [ 0, %for.body23.preheader ] %arrayidx25 = getelementptr inbounds [100 x i32], ptr %black_row, i64 0, i64 %indvars.iv86 %12 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %cmp26 = icmp eq i32 %12, 1 br i1 %cmp26, label %for.cond29.preheader, label %for.inc50 for.cond29.preheader: ; preds = %for.body23 %13 = load i32, ptr %width, align 4, !tbaa !5 %cmp3074 = icmp sgt i32 %13, 0 br i1 %cmp3074, label %for.body32, label %for.end47 for.body32: ; preds = %for.cond29.preheader, %for.inc45 %14 = phi i32 [ %17, %for.inc45 ], [ %13, %for.cond29.preheader ] %indvars.iv83 = phi i64 [ %indvars.iv.next84, %for.inc45 ], [ 0, %for.cond29.preheader ] %arrayidx34 = getelementptr inbounds [100 x i32], ptr %black_col, i64 0, i64 %indvars.iv83 %15 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %cmp35 = icmp eq i32 %15, 1 br i1 %cmp35, label %if.then37, label %for.inc45 if.then37: ; preds = %for.body32 %arrayidx41 = getelementptr inbounds [100 x [100 x i8]], ptr %block, i64 0, i64 %indvars.iv86, i64 %indvars.iv83 %16 = load i8, ptr %arrayidx41, align 1, !tbaa !9 %conv42 = sext i8 %16 to i32 %putchar69 = call i32 @putchar(i32 %conv42) %.pre89 = load i32, ptr %width, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.body32, %if.then37 %17 = phi i32 [ %14, %for.body32 ], [ %.pre89, %if.then37 ] %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %18 = sext i32 %17 to i64 %cmp30 = icmp slt i64 %indvars.iv.next84, %18 br i1 %cmp30, label %for.body32, label %for.end47, !llvm.loop !14 for.end47: ; preds = %for.inc45, %for.cond29.preheader %putchar = call i32 @putchar(i32 10) %.pre90 = load i32, ptr %height, align 4, !tbaa !5 br label %for.inc50 for.inc50: ; preds = %for.body23, %for.end47 %19 = phi i32 [ %11, %for.body23 ], [ %.pre90, %for.end47 ] %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1 %20 = sext i32 %19 to i64 %cmp21 = icmp slt i64 %indvars.iv.next87, %20 br i1 %cmp21, label %for.body23, label %for.end52, !llvm.loop !15 for.end52: ; preds = %for.inc50, %entry, %for.cond20.preheader call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %black_col) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %black_row) #5 call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %block) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #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: 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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11, !13} !13 = !{!"llvm.loop.unswitch.partial.disable"} !14 = distinct !{!14, !11} !15 = distinct !{!15, !11}