Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void){ int h,x,i,j; while(1){ scanf("%d" "%d",&h,&x); if(h==0&&x==0){ break; }else{ for(i=0;i<h;i++){ for(j=0;j<x;j++){ putchar('#'); } putchar('\n'); } } putchar('\n'); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134225/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134225/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %x) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %x, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %if.end %2 = phi i32 [ %9, %if.end ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %if.end for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %x, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %4 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i = call i32 @putc(i32 noundef 35, ptr noundef %4) %inc = add nuw nsw i32 %j.017, 1 %5 = load i32, ptr %x, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %5 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body5, %for.cond3.preheader %6 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i14 = call i32 @putc(i32 noundef 10, ptr noundef %6) %inc9 = add nuw nsw i32 %i.019, 1 %7 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %7 br i1 %cmp2, label %for.cond3.preheader, label %if.end, !llvm.loop !13 if.end: ; preds = %for.end, %for.cond.preheader %8 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i15 = call i32 @putc(i32 noundef 10, ptr noundef %8) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %x) %9 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %x, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include <stdio.h> #include <stdlib.h> int main() { int h; int w; scanf("%d %d", &h,&w); while (h!=0&&w!=0){ for(int i=0;i<h;i++){ for(int j=0;j<w;j++){ printf("#"); } puts(""); } puts(""); scanf("%d %d", &h,&w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %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 %cmp22 = icmp ne i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp123 = icmp ne i32 %1, 0 %2 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.cond.cleanup %3 = phi i32 [ %5, %for.cond.cleanup ], [ %0, %entry ] %cmp220 = icmp sgt i32 %3, 0 br i1 %cmp220, label %for.cond3.preheader, label %for.cond.cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.021 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp418 = icmp sgt i32 %4, 0 br i1 %cmp418, label %for.body6, label %for.cond.cleanup5 for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp ne i32 %5, 0 %6 = load i32, ptr %w, align 4 %cmp1 = icmp ne i32 %6, 0 %7 = select i1 %cmp, i1 %cmp1, i1 false br i1 %7, label %for.cond.preheader, label %while.end, !llvm.loop !9 for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader %putchar16 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %i.021, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc10, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11 for.body6: ; preds = %for.cond3.preheader, %for.body6 %j.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ] %putchar17 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.019, 1 %9 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %9 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !12 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main(){ int i, j; int h, w; while(1){ scanf("%d %d", &h, &w); if(h == 0 && w == 0) break; for(i = 0; i < h; i++){ for(j = 0; j < w; j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134319/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134319/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void) { int h, w; int i, j; while (scanf("%d %d", &h, &w), h || w) { for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { putchar('#'); } puts(""); } puts(""); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134362/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134362/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %tobool21 = icmp ne i32 %0, 0 %1 = load i32, ptr %w, align 4 %tobool122 = icmp ne i32 %1, 0 %2 = select i1 %tobool21, i1 true, i1 %tobool122 br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end9 %3 = phi i32 [ %10, %for.end9 ], [ %0, %entry ] %cmp18 = icmp sgt i32 %3, 0 br i1 %cmp18, label %for.cond2.preheader, label %for.end9 for.cond2.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc8, %for.end ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp316 = icmp sgt i32 %4, 0 br i1 %cmp316, label %for.body4, label %for.end for.body4: ; preds = %for.cond2.preheader, %for.body4 %j.017 = phi i32 [ %inc, %for.body4 ], [ 0, %for.cond2.preheader ] %5 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i = call noundef i32 @putc(i32 noundef 35, ptr noundef %5) %inc = add nuw nsw i32 %j.017, 1 %6 = load i32, ptr %w, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %6 br i1 %cmp3, label %for.body4, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body4, %for.cond2.preheader %7 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i14 = call noundef i32 @putc(i32 noundef 10, ptr noundef %7) %inc8 = add nuw nsw i32 %i.019, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp slt i32 %inc8, %8 br i1 %cmp, label %for.cond2.preheader, label %for.end9, !llvm.loop !13 for.end9: ; preds = %for.end, %for.cond.preheader %9 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i15 = call noundef i32 @putc(i32 noundef 10, ptr noundef %9) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %10 = load i32, ptr %h, align 4, !tbaa !5 %tobool = icmp ne i32 %10, 0 %11 = load i32, ptr %w, align 4 %tobool1 = icmp ne i32 %11, 0 %12 = select i1 %tobool, i1 true, i1 %tobool1 br i1 %12, label %for.cond.preheader, label %while.end, !llvm.loop !14 while.end: ; preds = %for.end9, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !12}
#include<stdio.h> int main(){ int h,w; int i,j; while(1){ scanf("%d %d",&h,&w); if(h==0 && w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134405/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134405/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(void) { int h,m,l,t; scanf("%d %d",&h,&m); while(h!=0 && m!=0){ for( l = 0; l < h; l++){ for( t = 0; t < m; t++){ printf("#"); } printf("\n"); } printf("\n"); scanf("%d %d",&h,&m); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134456/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %m) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp ne i32 %0, 0 %1 = load i32, ptr %m, align 4 %cmp122 = icmp ne i32 %1, 0 %2 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end10 %3 = phi i32 [ %7, %for.end10 ], [ %0, %entry ] %cmp219 = icmp sgt i32 %3, 0 br i1 %cmp219, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %l.020 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %m, align 4, !tbaa !5 %cmp417 = icmp sgt i32 %4, 0 br i1 %cmp417, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %t.018 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %t.018, 1 %5 = load i32, ptr %m, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %5 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %l.020, 1 %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %m) %7 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp ne i32 %7, 0 %8 = load i32, ptr %m, align 4 %cmp1 = icmp ne i32 %8, 0 %9 = select i1 %cmp, i1 %cmp1, i1 false br i1 %9, label %for.cond.preheader, label %while.end, !llvm.loop !12 while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> #include<stdlib.h> int main() { int n,i,a=0,b,c=0,d,g[2000000]; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&g[i]); } for(;n!=0;n--) { if(a!=1) { if(g[n-1]==1) { a=1; b=n; } } if(c!=1) { if(g[n-1]==0) { c=1; d=n; } } if(a==1&&c==1) break; } if(b<d) printf("%d",b); else printf("%d",d); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1345/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %g = alloca [2000000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 8000000, ptr nonnull %g) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp43 = icmp sgt i32 %0, 0 br i1 %cmp43, label %for.body, label %for.cond2.preheader for.cond2.preheader: ; preds = %for.body, %entry %.lcssa = phi i32 [ %0, %entry ], [ %2, %for.body ] %cmp3.not45 = icmp ne i32 %.lcssa, 0 call void @llvm.assume(i1 %cmp3.not45) %1 = sext i32 %.lcssa to i64 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [2000000 x i32], ptr %g, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %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.cond2.preheader, !llvm.loop !9 for.body4: ; preds = %for.cond2.preheader, %for.inc24 %indvars.iv56 = phi i64 [ %1, %for.cond2.preheader ], [ %indvars.iv.next57.pre-phi, %for.inc24 ] %d.049 = phi i32 [ undef, %for.cond2.preheader ], [ %d.142, %for.inc24 ] %c.048 = phi i32 [ 0, %for.cond2.preheader ], [ %c.141, %for.inc24 ] %b.047 = phi i32 [ undef, %for.cond2.preheader ], [ %b.1, %for.inc24 ] %a.046 = phi i32 [ 0, %for.cond2.preheader ], [ %a.1, %for.inc24 ] %cmp5.not = icmp eq i32 %a.046, 1 br i1 %cmp5.not, label %if.end10, label %if.then if.then: ; preds = %for.body4 %4 = add nsw i64 %indvars.iv56, -1 %arrayidx7 = getelementptr inbounds [2000000 x i32], ptr %g, i64 0, i64 %4 %5 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8 = icmp eq i32 %5, 1 br i1 %cmp8, label %if.then9, label %if.end10 if.then9: ; preds = %if.then %6 = trunc i64 %indvars.iv56 to i32 br label %if.end10 if.end10: ; preds = %if.then, %if.then9, %for.body4 %cmp20 = phi i1 [ true, %if.then9 ], [ false, %if.then ], [ true, %for.body4 ] %a.1 = phi i32 [ 1, %if.then9 ], [ 0, %if.then ], [ 1, %for.body4 ] %b.1 = phi i32 [ %6, %if.then9 ], [ %b.047, %if.then ], [ %b.047, %for.body4 ] %cmp11.not = icmp eq i32 %c.048, 1 br i1 %cmp11.not, label %if.end19, label %if.then12 if.then12: ; preds = %if.end10 %7 = add nsw i64 %indvars.iv56, -1 %arrayidx15 = getelementptr inbounds [2000000 x i32], ptr %g, i64 0, i64 %7 %8 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %cmp16 = icmp eq i32 %8, 0 %9 = trunc i64 %indvars.iv56 to i32 br i1 %cmp16, label %if.end19, label %for.inc24 if.end19: ; preds = %if.then12, %if.end10 %d.1 = phi i32 [ %d.049, %if.end10 ], [ %9, %if.then12 ] br i1 %cmp20, label %for.end25, label %if.end19.for.inc24_crit_edge if.end19.for.inc24_crit_edge: ; preds = %if.end19 %.pre = add nsw i64 %indvars.iv56, -1 br label %for.inc24 for.inc24: ; preds = %if.end19.for.inc24_crit_edge, %if.then12 %indvars.iv.next57.pre-phi = phi i64 [ %.pre, %if.end19.for.inc24_crit_edge ], [ %7, %if.then12 ] %d.142 = phi i32 [ %d.1, %if.end19.for.inc24_crit_edge ], [ %d.049, %if.then12 ] %c.141 = phi i32 [ 1, %if.end19.for.inc24_crit_edge ], [ 0, %if.then12 ] %10 = trunc i64 %indvars.iv.next57.pre-phi to i32 store i32 %10, ptr %n, align 4, !tbaa !5 %cmp3.not = icmp eq i32 %10, 0 br i1 %cmp3.not, label %for.end25, label %for.body4, !llvm.loop !11 for.end25: ; preds = %for.inc24, %if.end19 %d.2 = phi i32 [ %d.142, %for.inc24 ], [ %d.1, %if.end19 ] %b.1.lcssa.d.2 = call i32 @llvm.smin.i32(i32 %b.1, i32 %d.2) %call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %b.1.lcssa.d.2) call void @llvm.lifetime.end.p0(i64 8000000, ptr nonnull %g) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 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"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(void){ int h,w,i,j; while(1){ scanf("%d%d",&h,&w); if(h==0&&w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134557/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134557/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int gcd (int a, int b) { int r; while (b > 0) { r = a % b; a = b; b = r; } return a; } int main() { int i; int n, k, a, tmp, nsol; scanf("%d %d", &n, &k); scanf("%d", &a); for (i = 1; i < n; i++) { scanf("%d", &tmp); a = gcd(a, tmp); } a = gcd(a, k); nsol = k/a; tmp = 0; printf("%d\n", nsol); for (i = 0; i < nsol; i++) { printf("%d ", tmp); tmp += a; } printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13460/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13460/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %cmp4 = icmp sgt i32 %b, 0 br i1 %cmp4, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp = icmp sgt i32 %rem, 0 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %a = alloca i32, align 4 %tmp = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %0 = load i32, ptr %n, align 4, !tbaa !7 %cmp26 = icmp sgt i32 %0, 1 br i1 %cmp26, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre = load i32, ptr %a, align 4, !tbaa !7 br label %for.end for.body: ; preds = %entry, %gcd.exit %i.027 = phi i32 [ %inc, %gcd.exit ], [ 1, %entry ] %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %tmp) %1 = load i32, ptr %a, align 4, !tbaa !7 %2 = load i32, ptr %tmp, align 4, !tbaa !7 %cmp4.i = icmp sgt i32 %2, 0 br i1 %cmp4.i, label %while.body.i, label %gcd.exit while.body.i: ; preds = %for.body, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %1, %for.body ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %2, %for.body ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.i = icmp sgt i32 %rem.i, 0 br i1 %cmp.i, label %while.body.i, label %gcd.exit, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %for.body %a.addr.0.lcssa.i = phi i32 [ %1, %for.body ], [ %b.addr.05.i, %while.body.i ] store i32 %a.addr.0.lcssa.i, ptr %a, align 4, !tbaa !7 %inc = add nuw nsw i32 %i.027, 1 %3 = load i32, ptr %n, align 4, !tbaa !7 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %gcd.exit, %entry.for.end_crit_edge %4 = phi i32 [ %.pre, %entry.for.end_crit_edge ], [ %a.addr.0.lcssa.i, %gcd.exit ] %5 = load i32, ptr %k, align 4, !tbaa !7 %cmp4.i18 = icmp sgt i32 %5, 0 br i1 %cmp4.i18, label %while.body.i20, label %gcd.exit25 while.body.i20: ; preds = %for.end, %while.body.i20 %a.addr.06.i21 = phi i32 [ %b.addr.05.i22, %while.body.i20 ], [ %4, %for.end ] %b.addr.05.i22 = phi i32 [ %rem.i23, %while.body.i20 ], [ %5, %for.end ] %rem.i23 = srem i32 %a.addr.06.i21, %b.addr.05.i22 %cmp.i24 = icmp sgt i32 %rem.i23, 0 br i1 %cmp.i24, label %while.body.i20, label %gcd.exit25, !llvm.loop !5 gcd.exit25: ; preds = %while.body.i20, %for.end %a.addr.0.lcssa.i19 = phi i32 [ %4, %for.end ], [ %b.addr.05.i22, %while.body.i20 ] store i32 %a.addr.0.lcssa.i19, ptr %a, align 4, !tbaa !7 %div = sdiv i32 %5, %a.addr.0.lcssa.i19 store i32 0, ptr %tmp, align 4, !tbaa !7 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div) %cmp728 = icmp sgt i32 %div, 0 br i1 %cmp728, label %for.body8.preheader, label %for.end12 for.body8.preheader: ; preds = %gcd.exit25 %.pre30 = load i32, ptr %tmp, align 4, !tbaa !7 br label %for.body8 for.body8: ; preds = %for.body8.preheader, %for.body8 %6 = phi i32 [ %add, %for.body8 ], [ %.pre30, %for.body8.preheader ] %i.129 = phi i32 [ %inc11, %for.body8 ], [ 0, %for.body8.preheader ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %6) %7 = load i32, ptr %a, align 4, !tbaa !7 %8 = load i32, ptr %tmp, align 4, !tbaa !7 %add = add nsw i32 %8, %7 store i32 %add, ptr %tmp, align 4, !tbaa !7 %inc11 = add nuw nsw i32 %i.129, 1 %exitcond.not = icmp eq i32 %inc11, %div br i1 %exitcond.not, label %for.end12, label %for.body8, !llvm.loop !12 for.end12: ; preds = %for.body8, %gcd.exit25 %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: 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: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { 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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"} !11 = distinct !{!11, !6} !12 = distinct !{!12, !6}
#include <stdio.h> int main() { int h, w; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w == 0) { break; } for (int i=0; i<h; ++i) { for (int j=0; j<w; ++j) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134643/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134643/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp22 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp123 = icmp eq i32 %1, 0 %or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %or.cond24, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.cond.cleanup %2 = phi i32 [ %4, %for.cond.cleanup ], [ %0, %entry ] %cmp219 = icmp sgt i32 %2, 0 br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp417 = icmp sgt i32 %3, 0 br i1 %cmp417, label %for.body6, label %for.cond.cleanup5 for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %4, 0 %5 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %5, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %i.020, 1 %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc10, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !9 for.body6: ; preds = %for.cond3.preheader, %for.body6 %j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.018, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !11 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int w,h; while(1){ scanf("%d %d", &h, &w); if(h == 0 && w == 0){ break; } for(int i = 0; i < h; i++){ for(int j = 0; j < w; j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134687/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134687/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %w = alloca i32, align 4 %h = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 %call21 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp22 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp123 = icmp eq i32 %1, 0 %or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %or.cond24, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.cond.cleanup %2 = phi i32 [ %4, %for.cond.cleanup ], [ %0, %entry ] %cmp219 = icmp sgt i32 %2, 0 br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp417 = icmp sgt i32 %3, 0 br i1 %cmp417, label %for.body6, label %for.cond.cleanup5 for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %4, 0 %5 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %5, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %i.020, 1 %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc10, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !9 for.body6: ; preds = %for.cond3.preheader, %for.body6 %j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.018, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !11 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void){ int i,j,h,w; while(1){ scanf("%d %d",&h,&w); if(h==0 && w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("#"); }puts(""); }puts(""); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134744/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(void){ int H,W,i,j; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0) break; for(i=0;i<H;i++){ for(j=0;j<W;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134788/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int x,y; while(1){ scanf("%d %d",&x,&y); if(x == 0 && y == 0) break; for(int i = 0; i < x; i++){ //横のループ for(int j = 0; j < y; j++){ //縦のループ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134830/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134830/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %call21 = 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 %cmp22 = icmp eq i32 %0, 0 %1 = load i32, ptr %y, align 4 %cmp123 = icmp eq i32 %1, 0 %or.cond24 = select i1 %cmp22, i1 %cmp123, i1 false br i1 %or.cond24, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.cond.cleanup %2 = phi i32 [ %4, %for.cond.cleanup ], [ %0, %entry ] %cmp219 = icmp sgt i32 %2, 0 br i1 %cmp219, label %for.cond3.preheader, label %for.cond.cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.020 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %y, align 4, !tbaa !5 %cmp417 = icmp sgt i32 %3, 0 br i1 %cmp417, label %for.body6, label %for.cond.cleanup5 for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %4 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp eq i32 %4, 0 %5 = load i32, ptr %y, align 4 %cmp1 = icmp eq i32 %5, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %i.020, 1 %6 = load i32, ptr %x, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc10, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !9 for.body6: ; preds = %for.cond3.preheader, %for.body6 %j.018 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.018, 1 %7 = load i32, ptr %y, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !11 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void){ int h,w,i,j; while(1){ scanf("%d %d",&h,&w); if(h==0 && w==0)break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134874/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134874/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
// AOJ ITP2_11_B Enumeration of Subsets II // 2019.3.9 bal4u #include <stdio.h> #include <stdlib.h> #include <ctype.h> #if 1 #define gc() getchar_unlocked() #define pc(c) putchar_unlocked(c) #else #define gc() getchar() #define pc(c) putchar(c) #endif int in() { int n = 0, c = gc(); do n = 10 * n + (c & 0xf), c = gc(); while (isdigit(c)); return n; } void out(int n) { int i; char ob[30]; if (!n) pc('0'); else { i = 0; while (n) ob[i++] = n % 10 + '0', n /= 10; while (i--) pc(ob[i]); } } int main() { int i, j, k, n, max, mask; n = in(), max = 1 << n; k = in(), mask = 0; while (k--) mask |= 1 << in(); for (i = 0; i < max; i++) { if ((i & mask) != mask) continue; out(i), pc(':'); k = i; for (j = 0; k; j++) { if (k & 1) pc(' '), out(j); k >>= 1; } pc('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134917/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134917/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] } @stdin = external local_unnamed_addr global ptr, align 8 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @in() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %_IO_read_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i, align 8, !tbaa !14 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %entry %call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #5 %.pre16.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.preheader cond.false.i: ; preds = %entry %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i = zext i8 %3 to i32 br label %do.body.preheader do.body.preheader: ; preds = %cond.true.i, %cond.false.i %.ph = phi ptr [ %0, %cond.false.i ], [ %.pre16.pre, %cond.true.i ] %c.0.ph = phi i32 [ %conv3.i, %cond.false.i ], [ %call.i, %cond.true.i ] br label %do.body do.body: ; preds = %do.body.preheader, %getchar_unlocked.exit15 %4 = phi ptr [ %8, %getchar_unlocked.exit15 ], [ %.ph, %do.body.preheader ] %n.0 = phi i32 [ %add, %getchar_unlocked.exit15 ], [ 0, %do.body.preheader ] %c.0 = phi i32 [ %cond.i11, %getchar_unlocked.exit15 ], [ %c.0.ph, %do.body.preheader ] %mul = mul nsw i32 %n.0, 10 %and = and i32 %c.0, 15 %add = add nsw i32 %and, %mul %_IO_read_ptr.i6 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 1 %5 = load ptr, ptr %_IO_read_ptr.i6, align 8, !tbaa !9 %_IO_read_end.i7 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 2 %6 = load ptr, ptr %_IO_read_end.i7, align 8, !tbaa !14 %cmp.not.i8 = icmp ult ptr %5, %6 br i1 %cmp.not.i8, label %cond.false.i12, label %cond.true.i9, !prof !15 cond.true.i9: ; preds = %do.body %call.i10 = tail call i32 @__uflow(ptr noundef nonnull %4) #5 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit15 cond.false.i12: ; preds = %do.body %incdec.ptr.i13 = getelementptr inbounds i8, ptr %5, i64 1 store ptr %incdec.ptr.i13, ptr %_IO_read_ptr.i6, align 8, !tbaa !9 %7 = load i8, ptr %5, align 1, !tbaa !16 %conv3.i14 = zext i8 %7 to i32 br label %getchar_unlocked.exit15 getchar_unlocked.exit15: ; preds = %cond.true.i9, %cond.false.i12 %8 = phi ptr [ %.pre, %cond.true.i9 ], [ %4, %cond.false.i12 ] %cond.i11 = phi i32 [ %call.i10, %cond.true.i9 ], [ %conv3.i14, %cond.false.i12 ] %call2 = tail call ptr @__ctype_b_loc() #6 %9 = load ptr, ptr %call2, align 8, !tbaa !5 %idxprom = sext i32 %cond.i11 to i64 %arrayidx = getelementptr inbounds i16, ptr %9, i64 %idxprom %10 = load i16, ptr %arrayidx, align 2, !tbaa !17 %11 = and i16 %10, 2048 %tobool.not = icmp eq i16 %11, 0 br i1 %tobool.not, label %do.end, label %do.body, !llvm.loop !18 do.end: ; preds = %getchar_unlocked.exit15 ret i32 %add } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) declare ptr @__ctype_b_loc() 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: nounwind uwtable define dso_local void @out(i32 noundef %n) local_unnamed_addr #0 { entry: %ob = alloca [30 x i8], align 16 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %ob) #5 %tobool.not = icmp eq i32 %n, 0 br i1 %tobool.not, label %if.then, label %while.body if.then: ; preds = %entry %0 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 5 %1 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !20 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 6 %2 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !21 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %if.then %call.i = tail call i32 @__overflow(ptr noundef nonnull %0, i32 noundef 48) #5 br label %if.end cond.false.i: ; preds = %if.then %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !20 store i8 48, ptr %1, align 1, !tbaa !16 br label %if.end while.body: ; preds = %entry, %while.body %indvars.iv28 = phi i32 [ %indvars.iv.next29, %while.body ], [ 1, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %n.addr.024 = phi i32 [ %div, %while.body ], [ %n, %entry ] %rem = srem i32 %n.addr.024, 10 %3 = trunc i32 %rem to i8 %conv = add nsw i8 %3, 48 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [30 x i8], ptr %ob, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx, align 1, !tbaa !16 %div = sdiv i32 %n.addr.024, 10 %n.addr.024.off = add i32 %n.addr.024, 9 %tobool1.not = icmp ult i32 %n.addr.024.off, 19 %indvars.iv.next29 = add nuw i32 %indvars.iv28, 1 br i1 %tobool1.not, label %while.body4.preheader, label %while.body, !llvm.loop !22 while.body4.preheader: ; preds = %while.body %4 = sext i32 %indvars.iv28 to i64 br label %while.body4 while.body4: ; preds = %while.body4.preheader, %putchar_unlocked.exit23 %indvars.iv30 = phi i64 [ %4, %while.body4.preheader ], [ %indvars.iv.next31, %putchar_unlocked.exit23 ] %indvars.iv.next31 = add nsw i64 %indvars.iv30, -1 %arrayidx6 = getelementptr inbounds [30 x i8], ptr %ob, i64 0, i64 %indvars.iv.next31 %5 = load i8, ptr %arrayidx6, align 1, !tbaa !16 %6 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 5 %7 = load ptr, ptr %_IO_write_ptr.i15, align 8, !tbaa !20 %_IO_write_end.i16 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 6 %8 = load ptr, ptr %_IO_write_end.i16, align 8, !tbaa !21 %cmp.not.i17 = icmp ult ptr %7, %8 br i1 %cmp.not.i17, label %cond.false.i21, label %cond.true.i18, !prof !15 cond.true.i18: ; preds = %while.body4 %conv7 = zext i8 %5 to i32 %call.i19 = tail call i32 @__overflow(ptr noundef nonnull %6, i32 noundef %conv7) #5 br label %putchar_unlocked.exit23 cond.false.i21: ; preds = %while.body4 %incdec.ptr.i22 = getelementptr inbounds i8, ptr %7, i64 1 store ptr %incdec.ptr.i22, ptr %_IO_write_ptr.i15, align 8, !tbaa !20 store i8 %5, ptr %7, align 1, !tbaa !16 br label %putchar_unlocked.exit23 putchar_unlocked.exit23: ; preds = %cond.true.i18, %cond.false.i21 %9 = and i64 %indvars.iv.next31, 4294967295 %tobool3.not = icmp eq i64 %9, 0 br i1 %tobool3.not, label %if.end, label %while.body4, !llvm.loop !23 if.end: ; preds = %putchar_unlocked.exit23, %cond.false.i, %cond.true.i call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %ob) #5 ret void } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %ob.i112 = alloca [30 x i8], align 16 %ob.i = alloca [30 x i8], align 16 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %_IO_read_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i.i, align 8, !tbaa !14 %cmp.not.i.i = icmp ult ptr %1, %2 br i1 %cmp.not.i.i, label %cond.false.i.i, label %cond.true.i.i, !prof !15 cond.true.i.i: ; preds = %entry %call.i.i = tail call i32 @__uflow(ptr noundef nonnull %0) #5 %.pre16.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i.preheader cond.false.i.i: ; preds = %entry %incdec.ptr.i.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i.i, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i.i = zext i8 %3 to i32 br label %do.body.i.preheader do.body.i.preheader: ; preds = %cond.false.i.i, %cond.true.i.i %.ph176 = phi ptr [ %0, %cond.false.i.i ], [ %.pre16.pre.i, %cond.true.i.i ] %c.0.i.ph = phi i32 [ %conv3.i.i, %cond.false.i.i ], [ %call.i.i, %cond.true.i.i ] br label %do.body.i do.body.i: ; preds = %do.body.i.preheader, %getchar_unlocked.exit15.i %4 = phi ptr [ %8, %getchar_unlocked.exit15.i ], [ %.ph176, %do.body.i.preheader ] %n.0.i = phi i32 [ %add.i, %getchar_unlocked.exit15.i ], [ 0, %do.body.i.preheader ] %c.0.i = phi i32 [ %cond.i11.i, %getchar_unlocked.exit15.i ], [ %c.0.i.ph, %do.body.i.preheader ] %mul.i = mul nsw i32 %n.0.i, 10 %and.i = and i32 %c.0.i, 15 %add.i = add nsw i32 %and.i, %mul.i %_IO_read_ptr.i6.i = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 1 %5 = load ptr, ptr %_IO_read_ptr.i6.i, align 8, !tbaa !9 %_IO_read_end.i7.i = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 2 %6 = load ptr, ptr %_IO_read_end.i7.i, align 8, !tbaa !14 %cmp.not.i8.i = icmp ult ptr %5, %6 br i1 %cmp.not.i8.i, label %cond.false.i12.i, label %cond.true.i9.i, !prof !15 cond.true.i9.i: ; preds = %do.body.i %call.i10.i = tail call i32 @__uflow(ptr noundef nonnull %4) #5 %.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit15.i cond.false.i12.i: ; preds = %do.body.i %incdec.ptr.i13.i = getelementptr inbounds i8, ptr %5, i64 1 store ptr %incdec.ptr.i13.i, ptr %_IO_read_ptr.i6.i, align 8, !tbaa !9 %7 = load i8, ptr %5, align 1, !tbaa !16 %conv3.i14.i = zext i8 %7 to i32 br label %getchar_unlocked.exit15.i getchar_unlocked.exit15.i: ; preds = %cond.false.i12.i, %cond.true.i9.i %8 = phi ptr [ %.pre.i, %cond.true.i9.i ], [ %4, %cond.false.i12.i ] %cond.i11.i = phi i32 [ %call.i10.i, %cond.true.i9.i ], [ %conv3.i14.i, %cond.false.i12.i ] %call2.i = tail call ptr @__ctype_b_loc() #6 %9 = load ptr, ptr %call2.i, align 8, !tbaa !5 %idxprom.i = sext i32 %cond.i11.i to i64 %arrayidx.i = getelementptr inbounds i16, ptr %9, i64 %idxprom.i %10 = load i16, ptr %arrayidx.i, align 2, !tbaa !17 %11 = and i16 %10, 2048 %tobool.not.i = icmp eq i16 %11, 0 br i1 %tobool.not.i, label %in.exit, label %do.body.i, !llvm.loop !18 in.exit: ; preds = %getchar_unlocked.exit15.i %shl = shl nuw i32 1, %add.i %_IO_read_ptr.i.i28 = getelementptr inbounds %struct._IO_FILE, ptr %8, i64 0, i32 1 %12 = load ptr, ptr %_IO_read_ptr.i.i28, align 8, !tbaa !9 %_IO_read_end.i.i29 = getelementptr inbounds %struct._IO_FILE, ptr %8, i64 0, i32 2 %13 = load ptr, ptr %_IO_read_end.i.i29, align 8, !tbaa !14 %cmp.not.i.i30 = icmp ult ptr %12, %13 br i1 %cmp.not.i.i30, label %cond.false.i.i58, label %cond.true.i.i31, !prof !15 cond.true.i.i31: ; preds = %in.exit %call.i.i32 = tail call i32 @__uflow(ptr noundef nonnull %8) #5 %.pre16.pre.i33 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i37.preheader cond.false.i.i58: ; preds = %in.exit %incdec.ptr.i.i59 = getelementptr inbounds i8, ptr %12, i64 1 store ptr %incdec.ptr.i.i59, ptr %_IO_read_ptr.i.i28, align 8, !tbaa !9 %14 = load i8, ptr %12, align 1, !tbaa !16 %conv3.i.i60 = zext i8 %14 to i32 br label %do.body.i37.preheader do.body.i37.preheader: ; preds = %cond.false.i.i58, %cond.true.i.i31 %.ph174 = phi ptr [ %8, %cond.false.i.i58 ], [ %.pre16.pre.i33, %cond.true.i.i31 ] %c.0.i39.ph = phi i32 [ %conv3.i.i60, %cond.false.i.i58 ], [ %call.i.i32, %cond.true.i.i31 ] br label %do.body.i37 do.body.i37: ; preds = %do.body.i37.preheader, %getchar_unlocked.exit15.i49 %15 = phi ptr [ %19, %getchar_unlocked.exit15.i49 ], [ %.ph174, %do.body.i37.preheader ] %n.0.i38 = phi i32 [ %add.i42, %getchar_unlocked.exit15.i49 ], [ 0, %do.body.i37.preheader ] %c.0.i39 = phi i32 [ %cond.i11.i50, %getchar_unlocked.exit15.i49 ], [ %c.0.i39.ph, %do.body.i37.preheader ] %mul.i40 = mul nsw i32 %n.0.i38, 10 %and.i41 = and i32 %c.0.i39, 15 %add.i42 = add nsw i32 %and.i41, %mul.i40 %_IO_read_ptr.i6.i43 = getelementptr inbounds %struct._IO_FILE, ptr %15, i64 0, i32 1 %16 = load ptr, ptr %_IO_read_ptr.i6.i43, align 8, !tbaa !9 %_IO_read_end.i7.i44 = getelementptr inbounds %struct._IO_FILE, ptr %15, i64 0, i32 2 %17 = load ptr, ptr %_IO_read_end.i7.i44, align 8, !tbaa !14 %cmp.not.i8.i45 = icmp ult ptr %16, %17 br i1 %cmp.not.i8.i45, label %cond.false.i12.i55, label %cond.true.i9.i46, !prof !15 cond.true.i9.i46: ; preds = %do.body.i37 %call.i10.i47 = tail call i32 @__uflow(ptr noundef nonnull %15) #5 %.pre.i48 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit15.i49 cond.false.i12.i55: ; preds = %do.body.i37 %incdec.ptr.i13.i56 = getelementptr inbounds i8, ptr %16, i64 1 store ptr %incdec.ptr.i13.i56, ptr %_IO_read_ptr.i6.i43, align 8, !tbaa !9 %18 = load i8, ptr %16, align 1, !tbaa !16 %conv3.i14.i57 = zext i8 %18 to i32 br label %getchar_unlocked.exit15.i49 getchar_unlocked.exit15.i49: ; preds = %cond.false.i12.i55, %cond.true.i9.i46 %19 = phi ptr [ %.pre.i48, %cond.true.i9.i46 ], [ %15, %cond.false.i12.i55 ] %cond.i11.i50 = phi i32 [ %call.i10.i47, %cond.true.i9.i46 ], [ %conv3.i14.i57, %cond.false.i12.i55 ] %20 = load ptr, ptr %call2.i, align 8, !tbaa !5 %idxprom.i52 = sext i32 %cond.i11.i50 to i64 %arrayidx.i53 = getelementptr inbounds i16, ptr %20, i64 %idxprom.i52 %21 = load i16, ptr %arrayidx.i53, align 2, !tbaa !17 %22 = and i16 %21, 2048 %tobool.not.i54 = icmp eq i16 %22, 0 br i1 %tobool.not.i54, label %while.cond.preheader, label %do.body.i37, !llvm.loop !18 while.cond.preheader: ; preds = %getchar_unlocked.exit15.i49 %tobool.not159 = icmp eq i32 %add.i42, 0 br i1 %tobool.not159, label %for.cond.preheader, label %while.body for.cond.preheader: ; preds = %in.exit95, %while.cond.preheader %mask.0.lcssa = phi i32 [ 0, %while.cond.preheader ], [ %or, %in.exit95 ] %cmp166.not = icmp eq i32 %add.i, 31 br i1 %cmp166.not, label %for.end17, label %for.body.preheader for.body.preheader: ; preds = %for.cond.preheader %smax = tail call i32 @llvm.smax.i32(i32 %shl, i32 1) br label %for.body while.body: ; preds = %while.cond.preheader, %in.exit95 %23 = phi ptr [ %32, %in.exit95 ], [ %19, %while.cond.preheader ] %mask.0161 = phi i32 [ %or, %in.exit95 ], [ 0, %while.cond.preheader ] %k.0160 = phi i32 [ %dec, %in.exit95 ], [ %add.i42, %while.cond.preheader ] %dec = add nsw i32 %k.0160, -1 %_IO_read_ptr.i.i62 = getelementptr inbounds %struct._IO_FILE, ptr %23, i64 0, i32 1 %24 = load ptr, ptr %_IO_read_ptr.i.i62, align 8, !tbaa !9 %_IO_read_end.i.i63 = getelementptr inbounds %struct._IO_FILE, ptr %23, i64 0, i32 2 %25 = load ptr, ptr %_IO_read_end.i.i63, align 8, !tbaa !14 %cmp.not.i.i64 = icmp ult ptr %24, %25 br i1 %cmp.not.i.i64, label %cond.false.i.i92, label %cond.true.i.i65, !prof !15 cond.true.i.i65: ; preds = %while.body %call.i.i66 = tail call i32 @__uflow(ptr noundef nonnull %23) #5 %.pre16.pre.i67 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i71.preheader cond.false.i.i92: ; preds = %while.body %incdec.ptr.i.i93 = getelementptr inbounds i8, ptr %24, i64 1 store ptr %incdec.ptr.i.i93, ptr %_IO_read_ptr.i.i62, align 8, !tbaa !9 %26 = load i8, ptr %24, align 1, !tbaa !16 %conv3.i.i94 = zext i8 %26 to i32 br label %do.body.i71.preheader do.body.i71.preheader: ; preds = %cond.false.i.i92, %cond.true.i.i65 %.ph173 = phi ptr [ %23, %cond.false.i.i92 ], [ %.pre16.pre.i67, %cond.true.i.i65 ] %c.0.i73.ph = phi i32 [ %conv3.i.i94, %cond.false.i.i92 ], [ %call.i.i66, %cond.true.i.i65 ] br label %do.body.i71 do.body.i71: ; preds = %do.body.i71.preheader, %getchar_unlocked.exit15.i83 %27 = phi ptr [ %32, %getchar_unlocked.exit15.i83 ], [ %.ph173, %do.body.i71.preheader ] %28 = phi ptr [ %33, %getchar_unlocked.exit15.i83 ], [ %.ph173, %do.body.i71.preheader ] %n.0.i72 = phi i32 [ %add.i76, %getchar_unlocked.exit15.i83 ], [ 0, %do.body.i71.preheader ] %c.0.i73 = phi i32 [ %cond.i11.i84, %getchar_unlocked.exit15.i83 ], [ %c.0.i73.ph, %do.body.i71.preheader ] %mul.i74 = mul nsw i32 %n.0.i72, 10 %and.i75 = and i32 %c.0.i73, 15 %add.i76 = add nsw i32 %and.i75, %mul.i74 %_IO_read_ptr.i6.i77 = getelementptr inbounds %struct._IO_FILE, ptr %28, i64 0, i32 1 %29 = load ptr, ptr %_IO_read_ptr.i6.i77, align 8, !tbaa !9 %_IO_read_end.i7.i78 = getelementptr inbounds %struct._IO_FILE, ptr %28, i64 0, i32 2 %30 = load ptr, ptr %_IO_read_end.i7.i78, align 8, !tbaa !14 %cmp.not.i8.i79 = icmp ult ptr %29, %30 br i1 %cmp.not.i8.i79, label %cond.false.i12.i89, label %cond.true.i9.i80, !prof !15 cond.true.i9.i80: ; preds = %do.body.i71 %call.i10.i81 = tail call i32 @__uflow(ptr noundef nonnull %28) #5 %.pre.i82 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit15.i83 cond.false.i12.i89: ; preds = %do.body.i71 %incdec.ptr.i13.i90 = getelementptr inbounds i8, ptr %29, i64 1 store ptr %incdec.ptr.i13.i90, ptr %_IO_read_ptr.i6.i77, align 8, !tbaa !9 %31 = load i8, ptr %29, align 1, !tbaa !16 %conv3.i14.i91 = zext i8 %31 to i32 br label %getchar_unlocked.exit15.i83 getchar_unlocked.exit15.i83: ; preds = %cond.false.i12.i89, %cond.true.i9.i80 %32 = phi ptr [ %.pre.i82, %cond.true.i9.i80 ], [ %27, %cond.false.i12.i89 ] %33 = phi ptr [ %.pre.i82, %cond.true.i9.i80 ], [ %28, %cond.false.i12.i89 ] %cond.i11.i84 = phi i32 [ %call.i10.i81, %cond.true.i9.i80 ], [ %conv3.i14.i91, %cond.false.i12.i89 ] %34 = load ptr, ptr %call2.i, align 8, !tbaa !5 %idxprom.i86 = sext i32 %cond.i11.i84 to i64 %arrayidx.i87 = getelementptr inbounds i16, ptr %34, i64 %idxprom.i86 %35 = load i16, ptr %arrayidx.i87, align 2, !tbaa !17 %36 = and i16 %35, 2048 %tobool.not.i88 = icmp eq i16 %36, 0 br i1 %tobool.not.i88, label %in.exit95, label %do.body.i71, !llvm.loop !18 in.exit95: ; preds = %getchar_unlocked.exit15.i83 %shl3 = shl nuw i32 1, %add.i76 %or = or i32 %shl3, %mask.0161 %tobool.not = icmp eq i32 %dec, 0 br i1 %tobool.not, label %for.cond.preheader, label %while.body, !llvm.loop !24 for.body: ; preds = %for.body.preheader, %for.inc15 %i.0167 = phi i32 [ %inc16, %for.inc15 ], [ 0, %for.body.preheader ] %and = and i32 %i.0167, %mask.0.lcssa %cmp4.not = icmp eq i32 %and, %mask.0.lcssa br i1 %cmp4.not, label %if.end, label %for.inc15 if.end: ; preds = %for.body call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %ob.i) #5 %tobool.not.i96 = icmp eq i32 %i.0167, 0 br i1 %tobool.not.i96, label %if.then.i, label %while.body.i if.then.i: ; preds = %if.end %37 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %37, i64 0, i32 5 %38 = load ptr, ptr %_IO_write_ptr.i.i, align 8, !tbaa !20 %_IO_write_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %37, i64 0, i32 6 %39 = load ptr, ptr %_IO_write_end.i.i, align 8, !tbaa !21 %cmp.not.i.i98 = icmp ult ptr %38, %39 br i1 %cmp.not.i.i98, label %cond.false.i.i101, label %cond.true.i.i99, !prof !15 cond.true.i.i99: ; preds = %if.then.i %call.i.i100 = tail call i32 @__overflow(ptr noundef nonnull %37, i32 noundef 48) #5 br label %out.exit cond.false.i.i101: ; preds = %if.then.i %incdec.ptr.i.i102 = getelementptr inbounds i8, ptr %38, i64 1 store ptr %incdec.ptr.i.i102, ptr %_IO_write_ptr.i.i, align 8, !tbaa !20 store i8 48, ptr %38, align 1, !tbaa !16 br label %out.exit while.body.i: ; preds = %if.end, %while.body.i %indvars.iv28.i = phi i32 [ %indvars.iv.next29.i, %while.body.i ], [ 1, %if.end ] %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %while.body.i ], [ 0, %if.end ] %n.addr.024.i = phi i32 [ %div.i, %while.body.i ], [ %i.0167, %if.end ] %rem.i = srem i32 %n.addr.024.i, 10 %40 = trunc i32 %rem.i to i8 %conv.i = add nsw i8 %40, 48 %indvars.iv.next.i = add nuw i64 %indvars.iv.i, 1 %arrayidx.i97 = getelementptr inbounds [30 x i8], ptr %ob.i, i64 0, i64 %indvars.iv.i store i8 %conv.i, ptr %arrayidx.i97, align 1, !tbaa !16 %div.i = sdiv i32 %n.addr.024.i, 10 %n.addr.024.off.i = add i32 %n.addr.024.i, 9 %tobool1.not.i = icmp ult i32 %n.addr.024.off.i, 19 %indvars.iv.next29.i = add nuw i32 %indvars.iv28.i, 1 br i1 %tobool1.not.i, label %while.body4.preheader.i, label %while.body.i, !llvm.loop !22 while.body4.preheader.i: ; preds = %while.body.i %41 = sext i32 %indvars.iv28.i to i64 br label %while.body4.i while.body4.i: ; preds = %putchar_unlocked.exit23.i, %while.body4.preheader.i %indvars.iv30.i = phi i64 [ %41, %while.body4.preheader.i ], [ %indvars.iv.next31.i, %putchar_unlocked.exit23.i ] %indvars.iv.next31.i = add nsw i64 %indvars.iv30.i, -1 %arrayidx6.i = getelementptr inbounds [30 x i8], ptr %ob.i, i64 0, i64 %indvars.iv.next31.i %42 = load i8, ptr %arrayidx6.i, align 1, !tbaa !16 %43 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15.i = getelementptr inbounds %struct._IO_FILE, ptr %43, i64 0, i32 5 %44 = load ptr, ptr %_IO_write_ptr.i15.i, align 8, !tbaa !20 %_IO_write_end.i16.i = getelementptr inbounds %struct._IO_FILE, ptr %43, i64 0, i32 6 %45 = load ptr, ptr %_IO_write_end.i16.i, align 8, !tbaa !21 %cmp.not.i17.i = icmp ult ptr %44, %45 br i1 %cmp.not.i17.i, label %cond.false.i21.i, label %cond.true.i18.i, !prof !15 cond.true.i18.i: ; preds = %while.body4.i %conv7.i = zext i8 %42 to i32 %call.i19.i = tail call i32 @__overflow(ptr noundef nonnull %43, i32 noundef %conv7.i) #5 br label %putchar_unlocked.exit23.i cond.false.i21.i: ; preds = %while.body4.i %incdec.ptr.i22.i = getelementptr inbounds i8, ptr %44, i64 1 store ptr %incdec.ptr.i22.i, ptr %_IO_write_ptr.i15.i, align 8, !tbaa !20 store i8 %42, ptr %44, align 1, !tbaa !16 br label %putchar_unlocked.exit23.i putchar_unlocked.exit23.i: ; preds = %cond.false.i21.i, %cond.true.i18.i %46 = and i64 %indvars.iv.next31.i, 4294967295 %tobool3.not.i = icmp eq i64 %46, 0 br i1 %tobool3.not.i, label %out.exit, label %while.body4.i, !llvm.loop !23 out.exit: ; preds = %putchar_unlocked.exit23.i, %cond.true.i.i99, %cond.false.i.i101 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %ob.i) #5 %47 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %47, i64 0, i32 5 %48 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !20 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %47, i64 0, i32 6 %49 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !21 %cmp.not.i = icmp ult ptr %48, %49 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %out.exit %call.i = tail call i32 @__overflow(ptr noundef nonnull %47, i32 noundef 58) #5 br label %putchar_unlocked.exit cond.false.i: ; preds = %out.exit %incdec.ptr.i = getelementptr inbounds i8, ptr %48, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !20 store i8 58, ptr %48, align 1, !tbaa !16 br label %putchar_unlocked.exit putchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i br i1 %tobool.not.i96, label %for.end, label %for.body8 for.body8: ; preds = %putchar_unlocked.exit, %if.end13 %j.0164 = phi i32 [ %inc, %if.end13 ], [ 0, %putchar_unlocked.exit ] %k.1163 = phi i32 [ %shr, %if.end13 ], [ %i.0167, %putchar_unlocked.exit ] %and9 = and i32 %k.1163, 1 %tobool10.not = icmp eq i32 %and9, 0 br i1 %tobool10.not, label %if.end13, label %if.then11 if.then11: ; preds = %for.body8 %50 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i103 = getelementptr inbounds %struct._IO_FILE, ptr %50, i64 0, i32 5 %51 = load ptr, ptr %_IO_write_ptr.i103, align 8, !tbaa !20 %_IO_write_end.i104 = getelementptr inbounds %struct._IO_FILE, ptr %50, i64 0, i32 6 %52 = load ptr, ptr %_IO_write_end.i104, align 8, !tbaa !21 %cmp.not.i105 = icmp ult ptr %51, %52 br i1 %cmp.not.i105, label %cond.false.i109, label %cond.true.i106, !prof !15 cond.true.i106: ; preds = %if.then11 %call.i107 = tail call i32 @__overflow(ptr noundef nonnull %50, i32 noundef 32) #5 br label %putchar_unlocked.exit111 cond.false.i109: ; preds = %if.then11 %incdec.ptr.i110 = getelementptr inbounds i8, ptr %51, i64 1 store ptr %incdec.ptr.i110, ptr %_IO_write_ptr.i103, align 8, !tbaa !20 store i8 32, ptr %51, align 1, !tbaa !16 br label %putchar_unlocked.exit111 putchar_unlocked.exit111: ; preds = %cond.true.i106, %cond.false.i109 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %ob.i112) #5 %tobool.not.i113 = icmp eq i32 %j.0164, 0 br i1 %tobool.not.i113, label %if.then.i141, label %while.body.i114 if.then.i141: ; preds = %putchar_unlocked.exit111 %53 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i142 = getelementptr inbounds %struct._IO_FILE, ptr %53, i64 0, i32 5 %54 = load ptr, ptr %_IO_write_ptr.i.i142, align 8, !tbaa !20 %_IO_write_end.i.i143 = getelementptr inbounds %struct._IO_FILE, ptr %53, i64 0, i32 6 %55 = load ptr, ptr %_IO_write_end.i.i143, align 8, !tbaa !21 %cmp.not.i.i144 = icmp ult ptr %54, %55 br i1 %cmp.not.i.i144, label %cond.false.i.i147, label %cond.true.i.i145, !prof !15 cond.true.i.i145: ; preds = %if.then.i141 %call.i.i146 = tail call i32 @__overflow(ptr noundef nonnull %53, i32 noundef 48) #5 br label %out.exit149 cond.false.i.i147: ; preds = %if.then.i141 %incdec.ptr.i.i148 = getelementptr inbounds i8, ptr %54, i64 1 store ptr %incdec.ptr.i.i148, ptr %_IO_write_ptr.i.i142, align 8, !tbaa !20 store i8 48, ptr %54, align 1, !tbaa !16 br label %out.exit149 while.body.i114: ; preds = %putchar_unlocked.exit111, %while.body.i114 %indvars.iv28.i115 = phi i32 [ %indvars.iv.next29.i125, %while.body.i114 ], [ 1, %putchar_unlocked.exit111 ] %indvars.iv.i116 = phi i64 [ %indvars.iv.next.i120, %while.body.i114 ], [ 0, %putchar_unlocked.exit111 ] %n.addr.024.i117 = phi i32 [ %div.i122, %while.body.i114 ], [ %j.0164, %putchar_unlocked.exit111 ] %rem.i118 = srem i32 %n.addr.024.i117, 10 %56 = trunc i32 %rem.i118 to i8 %conv.i119 = add nsw i8 %56, 48 %indvars.iv.next.i120 = add nuw i64 %indvars.iv.i116, 1 %arrayidx.i121 = getelementptr inbounds [30 x i8], ptr %ob.i112, i64 0, i64 %indvars.iv.i116 store i8 %conv.i119, ptr %arrayidx.i121, align 1, !tbaa !16 %div.i122 = sdiv i32 %n.addr.024.i117, 10 %n.addr.024.off.i123 = add nsw i32 %n.addr.024.i117, 9 %tobool1.not.i124 = icmp ult i32 %n.addr.024.off.i123, 19 %indvars.iv.next29.i125 = add nuw i32 %indvars.iv28.i115, 1 br i1 %tobool1.not.i124, label %while.body4.preheader.i126, label %while.body.i114, !llvm.loop !22 while.body4.preheader.i126: ; preds = %while.body.i114 %57 = sext i32 %indvars.iv28.i115 to i64 br label %while.body4.i127 while.body4.i127: ; preds = %putchar_unlocked.exit23.i137, %while.body4.preheader.i126 %indvars.iv30.i128 = phi i64 [ %57, %while.body4.preheader.i126 ], [ %indvars.iv.next31.i129, %putchar_unlocked.exit23.i137 ] %indvars.iv.next31.i129 = add nsw i64 %indvars.iv30.i128, -1 %arrayidx6.i130 = getelementptr inbounds [30 x i8], ptr %ob.i112, i64 0, i64 %indvars.iv.next31.i129 %58 = load i8, ptr %arrayidx6.i130, align 1, !tbaa !16 %59 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i15.i131 = getelementptr inbounds %struct._IO_FILE, ptr %59, i64 0, i32 5 %60 = load ptr, ptr %_IO_write_ptr.i15.i131, align 8, !tbaa !20 %_IO_write_end.i16.i132 = getelementptr inbounds %struct._IO_FILE, ptr %59, i64 0, i32 6 %61 = load ptr, ptr %_IO_write_end.i16.i132, align 8, !tbaa !21 %cmp.not.i17.i133 = icmp ult ptr %60, %61 br i1 %cmp.not.i17.i133, label %cond.false.i21.i139, label %cond.true.i18.i134, !prof !15 cond.true.i18.i134: ; preds = %while.body4.i127 %conv7.i135 = zext i8 %58 to i32 %call.i19.i136 = tail call i32 @__overflow(ptr noundef nonnull %59, i32 noundef %conv7.i135) #5 br label %putchar_unlocked.exit23.i137 cond.false.i21.i139: ; preds = %while.body4.i127 %incdec.ptr.i22.i140 = getelementptr inbounds i8, ptr %60, i64 1 store ptr %incdec.ptr.i22.i140, ptr %_IO_write_ptr.i15.i131, align 8, !tbaa !20 store i8 %58, ptr %60, align 1, !tbaa !16 br label %putchar_unlocked.exit23.i137 putchar_unlocked.exit23.i137: ; preds = %cond.false.i21.i139, %cond.true.i18.i134 %62 = and i64 %indvars.iv.next31.i129, 4294967295 %tobool3.not.i138 = icmp eq i64 %62, 0 br i1 %tobool3.not.i138, label %out.exit149, label %while.body4.i127, !llvm.loop !23 out.exit149: ; preds = %putchar_unlocked.exit23.i137, %cond.true.i.i145, %cond.false.i.i147 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %ob.i112) #5 br label %if.end13 if.end13: ; preds = %out.exit149, %for.body8 %shr = lshr i32 %k.1163, 1 %inc = add nuw nsw i32 %j.0164, 1 %tobool7.not = icmp ult i32 %k.1163, 2 br i1 %tobool7.not, label %for.end, label %for.body8, !llvm.loop !25 for.end: ; preds = %if.end13, %putchar_unlocked.exit %63 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i150 = getelementptr inbounds %struct._IO_FILE, ptr %63, i64 0, i32 5 %64 = load ptr, ptr %_IO_write_ptr.i150, align 8, !tbaa !20 %_IO_write_end.i151 = getelementptr inbounds %struct._IO_FILE, ptr %63, i64 0, i32 6 %65 = load ptr, ptr %_IO_write_end.i151, align 8, !tbaa !21 %cmp.not.i152 = icmp ult ptr %64, %65 br i1 %cmp.not.i152, label %cond.false.i156, label %cond.true.i153, !prof !15 cond.true.i153: ; preds = %for.end %call.i154 = tail call i32 @__overflow(ptr noundef nonnull %63, i32 noundef 10) #5 br label %for.inc15 cond.false.i156: ; preds = %for.end %incdec.ptr.i157 = getelementptr inbounds i8, ptr %64, i64 1 store ptr %incdec.ptr.i157, ptr %_IO_write_ptr.i150, align 8, !tbaa !20 store i8 10, ptr %64, align 1, !tbaa !16 br label %for.inc15 for.inc15: ; preds = %cond.false.i156, %cond.true.i153, %for.body %inc16 = add nuw nsw i32 %i.0167, 1 %exitcond.not = icmp eq i32 %inc16, %smax br i1 %exitcond.not, label %for.end17, label %for.body, !llvm.loop !26 for.end17: ; preds = %for.inc15, %for.cond.preheader ret i32 0 } declare i32 @__uflow(ptr noundef) local_unnamed_addr #3 declare i32 @__overflow(ptr noundef, i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 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 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 8} !10 = !{!"_IO_FILE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !12, i64 120, !13, i64 128, !7, i64 130, !7, i64 131, !6, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !11, i64 192, !7, i64 196} !11 = !{!"int", !7, i64 0} !12 = !{!"long", !7, i64 0} !13 = !{!"short", !7, i64 0} !14 = !{!10, !6, i64 16} !15 = !{!"branch_weights", i32 2000, i32 1} !16 = !{!7, !7, i64 0} !17 = !{!13, !13, i64 0} !18 = distinct !{!18, !19} !19 = !{!"llvm.loop.mustprogress"} !20 = !{!10, !6, i64 40} !21 = !{!10, !6, i64 48} !22 = distinct !{!22, !19} !23 = distinct !{!23, !19} !24 = distinct !{!24, !19} !25 = distinct !{!25, !19} !26 = distinct !{!26, !19}
#include <stdio.h> int main(){ int N; char S[500000]; int W[500000],E[500000],w=0,e=0; int min=500000; scanf("%d",&N); scanf("%s",S); for(int i=0;i<N;i++) if(S[i]=='W') W[i]=w++; else W[i]=w; for(int i=N-1;i>=0;i--) if(S[i]=='E') E[i]=e++; else E[i]=e; for(int i=0;i<N;i++) if(min>W[i]+E[i]) min = W[i]+E[i]; printf("%d\n",min); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134968/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134968/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %S = alloca [500000 x i8], align 16 %W = alloca [500000 x i32], align 16 %E = alloca [500000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 500000, ptr nonnull %S) #4 call void @llvm.lifetime.start.p0(i64 2000000, ptr nonnull %W) #4 call void @llvm.lifetime.start.p0(i64 2000000, ptr nonnull %E) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %S) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp69 = icmp sgt i32 %0, 0 br i1 %cmp69, label %for.body.preheader, label %for.cond.cleanup34 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %1 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %wide.trip.count, 1 %2 = icmp eq i64 %1, 0 br i1 %2, label %for.cond10.preheader.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body for.cond10.preheader.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %w.070.unr = phi i32 [ 0, %for.body.preheader ], [ %spec.select90.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond10.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond10.preheader.unr-lcssa %3 = getelementptr inbounds [500000 x i32], ptr %W, i64 0, i64 %indvars.iv.unr store i32 %w.070.unr, ptr %3, align 4 br label %for.cond10.preheader for.cond10.preheader: ; preds = %for.cond10.preheader.unr-lcssa, %for.body.epil br i1 %cmp69, label %for.body14.preheader, label %for.cond.cleanup34 for.body14.preheader: ; preds = %for.cond10.preheader %4 = zext i32 %0 to i64 %xtraiter98 = and i64 %wide.trip.count, 1 %5 = icmp eq i64 %1, 0 br i1 %5, label %for.cond31.preheader.unr-lcssa, label %for.body14.preheader.new for.body14.preheader.new: ; preds = %for.body14.preheader %unroll_iter100 = and i64 %wide.trip.count, 4294967294 br label %for.body14 for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %w.070 = phi i32 [ 0, %for.body.preheader.new ], [ %spec.select90.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx = getelementptr inbounds [500000 x i8], ptr %S, i64 0, i64 %indvars.iv %6 = load i8, ptr %arrayidx, align 2, !tbaa !9 %cmp2 = icmp eq i8 %6, 87 %inc = zext i1 %cmp2 to i32 %spec.select90 = add nuw nsw i32 %w.070, %inc %7 = getelementptr inbounds [500000 x i32], ptr %W, i64 0, i64 %indvars.iv store i32 %w.070, ptr %7, align 8 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [500000 x i8], ptr %S, i64 0, i64 %indvars.iv.next %8 = load i8, ptr %arrayidx.1, align 1, !tbaa !9 %cmp2.1 = icmp eq i8 %8, 87 %inc.1 = zext i1 %cmp2.1 to i32 %spec.select90.1 = add nuw nsw i32 %spec.select90, %inc.1 %9 = getelementptr inbounds [500000 x i32], ptr %W, i64 0, i64 %indvars.iv.next store i32 %spec.select90, ptr %9, align 4 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond10.preheader.unr-lcssa, label %for.body, !llvm.loop !10 for.cond31.preheader.unr-lcssa: ; preds = %for.body14, %for.body14.preheader %indvars.iv81.unr = phi i64 [ %4, %for.body14.preheader ], [ %indvars.iv.next82.1, %for.body14 ] %e.074.unr = phi i32 [ 0, %for.body14.preheader ], [ %spec.select91.1, %for.body14 ] %lcmp.mod99.not = icmp eq i64 %xtraiter98, 0 br i1 %lcmp.mod99.not, label %for.cond31.preheader, label %for.body14.epil for.body14.epil: ; preds = %for.cond31.preheader.unr-lcssa %indvars.iv.next82.epil = add i64 %indvars.iv81.unr, 4294967295 %idxprom15.epil = and i64 %indvars.iv.next82.epil, 4294967295 %10 = getelementptr inbounds [500000 x i32], ptr %E, i64 0, i64 %idxprom15.epil store i32 %e.074.unr, ptr %10, align 4 br label %for.cond31.preheader for.cond31.preheader: ; preds = %for.cond31.preheader.unr-lcssa, %for.body14.epil br i1 %cmp69, label %for.body35.preheader, label %for.cond.cleanup34 for.body35.preheader: ; preds = %for.cond31.preheader %wide.trip.count88 = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body35.preheader96, label %vector.ph vector.ph: ; preds = %for.body35.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 500000, i32 500000, i32 500000, i32 500000>, %vector.ph ], [ %17, %vector.body ] %vec.phi92 = phi <4 x i32> [ <i32 500000, i32 500000, i32 500000, i32 500000>, %vector.ph ], [ %18, %vector.body ] %11 = getelementptr inbounds [500000 x i32], ptr %W, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %11, align 16, !tbaa !5 %12 = getelementptr inbounds i32, ptr %11, i64 4 %wide.load93 = load <4 x i32>, ptr %12, align 16, !tbaa !5 %13 = getelementptr inbounds [500000 x i32], ptr %E, i64 0, i64 %index %wide.load94 = load <4 x i32>, ptr %13, align 16, !tbaa !5 %14 = getelementptr inbounds i32, ptr %13, i64 4 %wide.load95 = load <4 x i32>, ptr %14, align 16, !tbaa !5 %15 = add nsw <4 x i32> %wide.load94, %wide.load %16 = add nsw <4 x i32> %wide.load95, %wide.load93 %17 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %15) %18 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi92, <4 x i32> %16) %index.next = add nuw i64 %index, 8 %19 = icmp eq i64 %index.next, %n.vec br i1 %19, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %rdx.minmax = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %17, <4 x i32> %18) %20 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup34, label %for.body35.preheader96 for.body35.preheader96: ; preds = %for.body35.preheader, %middle.block %indvars.iv84.ph = phi i64 [ 0, %for.body35.preheader ], [ %n.vec, %middle.block ] %min.077.ph = phi i32 [ 500000, %for.body35.preheader ], [ %20, %middle.block ] br label %for.body35 for.body14: ; preds = %for.body14, %for.body14.preheader.new %indvars.iv81 = phi i64 [ %4, %for.body14.preheader.new ], [ %indvars.iv.next82.1, %for.body14 ] %e.074 = phi i32 [ 0, %for.body14.preheader.new ], [ %spec.select91.1, %for.body14 ] %niter101 = phi i64 [ 0, %for.body14.preheader.new ], [ %niter101.next.1, %for.body14 ] %indvars.iv.next82 = add i64 %indvars.iv81, 4294967295 %idxprom15 = and i64 %indvars.iv.next82, 4294967295 %arrayidx16 = getelementptr inbounds [500000 x i8], ptr %S, i64 0, i64 %idxprom15 %21 = load i8, ptr %arrayidx16, align 1, !tbaa !9 %cmp18 = icmp eq i8 %21, 69 %inc21 = zext i1 %cmp18 to i32 %spec.select91 = add nuw nsw i32 %e.074, %inc21 %22 = getelementptr inbounds [500000 x i32], ptr %E, i64 0, i64 %idxprom15 store i32 %e.074, ptr %22, align 4 %indvars.iv.next82.1 = add nsw i64 %indvars.iv81, -2 %idxprom15.1 = and i64 %indvars.iv.next82.1, 4294967295 %arrayidx16.1 = getelementptr inbounds [500000 x i8], ptr %S, i64 0, i64 %idxprom15.1 %23 = load i8, ptr %arrayidx16.1, align 1, !tbaa !9 %cmp18.1 = icmp eq i8 %23, 69 %inc21.1 = zext i1 %cmp18.1 to i32 %spec.select91.1 = add nuw nsw i32 %spec.select91, %inc21.1 %24 = getelementptr inbounds [500000 x i32], ptr %E, i64 0, i64 %idxprom15.1 store i32 %spec.select91, ptr %24, align 4 %niter101.next.1 = add i64 %niter101, 2 %niter101.ncmp.1.not = icmp eq i64 %niter101.next.1, %unroll_iter100 br i1 %niter101.ncmp.1.not, label %for.cond31.preheader.unr-lcssa, label %for.body14, !llvm.loop !15 for.cond.cleanup34: ; preds = %for.body35, %middle.block, %entry, %for.cond10.preheader, %for.cond31.preheader %min.0.lcssa = phi i32 [ 500000, %for.cond31.preheader ], [ 500000, %for.cond10.preheader ], [ 500000, %entry ], [ %20, %middle.block ], [ %spec.select, %for.body35 ] %call52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %min.0.lcssa) call void @llvm.lifetime.end.p0(i64 2000000, ptr nonnull %E) #4 call void @llvm.lifetime.end.p0(i64 2000000, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 500000, ptr nonnull %S) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 for.body35: ; preds = %for.body35.preheader96, %for.body35 %indvars.iv84 = phi i64 [ %indvars.iv.next85, %for.body35 ], [ %indvars.iv84.ph, %for.body35.preheader96 ] %min.077 = phi i32 [ %spec.select, %for.body35 ], [ %min.077.ph, %for.body35.preheader96 ] %arrayidx37 = getelementptr inbounds [500000 x i32], ptr %W, i64 0, i64 %indvars.iv84 %25 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %arrayidx39 = getelementptr inbounds [500000 x i32], ptr %E, i64 0, i64 %indvars.iv84 %26 = load i32, ptr %arrayidx39, align 4, !tbaa !5 %add = add nsw i32 %26, %25 %spec.select = call i32 @llvm.smin.i32(i32 %min.077, i32 %add) %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 %exitcond89.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count88 br i1 %exitcond89.not, label %for.cond.cleanup34, label %for.body35, !llvm.loop !16 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11, !13, !14} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11, !14, !13}
#include <stdio.h> #include <stdlib.h> int yakusimaruhiroko(const void* x, const void* y) { int a = *(const int*)x, b = *(const int*)y; return a < b ? -1 : a > b; } int N, M; int X[114514]; int yosinagasayuri[114514]; int main(void) { int i; if (scanf("%d%d", &N, &M) != 2) return 1; for (i = 0; i < M; i++) { if (scanf("%d", &X[i]) != 1) return 1; } if (N >= M) { puts("0"); } else { int horieyui = 0; qsort(X, M, sizeof(*X), yakusimaruhiroko); for (i = 1; i < M; i++) { yosinagasayuri[i - 1] = X[i] - X[i - 1]; } qsort(yosinagasayuri, M - 1, sizeof(*yosinagasayuri), yakusimaruhiroko); for (i = 0; i < M - N; i++) { horieyui += yosinagasayuri[i]; } printf("%d\n", horieyui); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135017/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135017/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @N = dso_local global i32 0, align 4 @M = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @X = dso_local global [114514 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [2 x i8] c"0\00", align 1 @yosinagasayuri = dso_local global [114514 x i32] zeroinitializer, align 16 @.str.3 = 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 @yakusimaruhiroko(ptr nocapture noundef readonly %x, ptr nocapture noundef readonly %y) #0 { entry: %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp sgt i32 %0, %1 %conv = zext i1 %cmp1 to i32 %cond = select i1 %cmp, i32 -1, i32 %conv ret i32 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N, ptr noundef nonnull @M) %cmp.not = icmp eq i32 %call, 2 br i1 %cmp.not, label %for.cond.preheader, label %cleanup for.cond.preheader: ; preds = %entry %0 = load i32, ptr @M, align 4, !tbaa !5 %cmp152 = icmp sgt i32 %0, 0 br i1 %cmp152, label %for.body, label %for.end for.cond: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr @M, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp1 = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp1, label %for.body, label %for.end, !llvm.loop !9 for.body: ; preds = %for.cond.preheader, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [114514 x i32], ptr @X, i64 0, i64 %indvars.iv %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %cmp3.not = icmp eq i32 %call2, 1 br i1 %cmp3.not, label %for.cond, label %cleanup for.end: ; preds = %for.cond, %for.cond.preheader %.lcssa50 = phi i32 [ %0, %for.cond.preheader ], [ %1, %for.cond ] %3 = load i32, ptr @N, align 4, !tbaa !5 %cmp6.not = icmp slt i32 %3, %.lcssa50 br i1 %cmp6.not, label %if.else, label %if.then7 if.then7: ; preds = %for.end %call8 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2) br label %cleanup if.else: ; preds = %for.end %conv = sext i32 %.lcssa50 to i64 tail call void @qsort(ptr noundef nonnull @X, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @yakusimaruhiroko) #5 %4 = load i32, ptr @M, align 4, !tbaa !5 %cmp1054 = icmp sgt i32 %4, 1 br i1 %cmp1054, label %for.body12.preheader, label %for.end23 for.body12.preheader: ; preds = %if.else %wide.trip.count = zext i32 %4 to i64 %.pre = load i32, ptr @X, align 16, !tbaa !5 %5 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %4, 9 br i1 %min.iters.check, label %for.body12.preheader88, label %vector.ph vector.ph: ; preds = %for.body12.preheader %n.vec = and i64 %5, -8 %ind.end = or i64 %n.vec, 1 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load71, %vector.body ] %offset.idx = or i64 %index, 1 %6 = getelementptr inbounds [114514 x i32], ptr @X, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %6, align 4, !tbaa !5 %7 = getelementptr inbounds i32, ptr %6, i64 4 %wide.load71 = load <4 x i32>, ptr %7, align 4, !tbaa !5 %8 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %9 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load71, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %10 = sub nsw <4 x i32> %wide.load, %8 %11 = sub nsw <4 x i32> %wide.load71, %9 %12 = getelementptr inbounds [114514 x i32], ptr @yosinagasayuri, i64 0, i64 %index store <4 x i32> %10, ptr %12, align 16, !tbaa !5 %13 = getelementptr inbounds i32, ptr %12, i64 4 store <4 x i32> %11, ptr %13, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %14 = icmp eq i64 %index.next, %n.vec br i1 %14, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %5, %n.vec %vector.recur.extract = extractelement <4 x i32> %wide.load71, i64 3 br i1 %cmp.n, label %for.end23, label %for.body12.preheader88 for.body12.preheader88: ; preds = %for.body12.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body12.preheader ] %indvars.iv62.ph = phi i64 [ %ind.end, %middle.block ], [ 1, %for.body12.preheader ] br label %for.body12 for.body12: ; preds = %for.body12.preheader88, %for.body12 %scalar.recur = phi i32 [ %15, %for.body12 ], [ %scalar.recur.ph, %for.body12.preheader88 ] %indvars.iv62 = phi i64 [ %indvars.iv.next63, %for.body12 ], [ %indvars.iv62.ph, %for.body12.preheader88 ] %arrayidx14 = getelementptr inbounds [114514 x i32], ptr @X, i64 0, i64 %indvars.iv62 %15 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %16 = add nsw i64 %indvars.iv62, -1 %sub17 = sub nsw i32 %15, %scalar.recur %arrayidx20 = getelementptr inbounds [114514 x i32], ptr @yosinagasayuri, i64 0, i64 %16 store i32 %sub17, ptr %arrayidx20, align 4, !tbaa !5 %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1 %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count br i1 %exitcond.not, label %for.end23, label %for.body12, !llvm.loop !14 for.end23: ; preds = %for.body12, %middle.block, %if.else %sub24 = add nsw i32 %4, -1 %conv25 = sext i32 %sub24 to i64 tail call void @qsort(ptr noundef nonnull @yosinagasayuri, i64 noundef %conv25, i64 noundef 4, ptr noundef nonnull @yakusimaruhiroko) #5 %17 = load i32, ptr @M, align 4, !tbaa !5 %18 = load i32, ptr @N, align 4, !tbaa !5 %sub27 = sub nsw i32 %17, %18 %cmp2857 = icmp sgt i32 %sub27, 0 br i1 %cmp2857, label %for.body30.preheader, label %for.end35 for.body30.preheader: ; preds = %for.end23 %wide.trip.count69 = zext i32 %sub27 to i64 %min.iters.check74 = icmp ult i32 %sub27, 8 br i1 %min.iters.check74, label %for.body30.preheader86, label %vector.ph75 vector.ph75: ; preds = %for.body30.preheader %n.vec77 = and i64 %wide.trip.count69, 4294967288 br label %vector.body80 vector.body80: ; preds = %vector.body80, %vector.ph75 %index81 = phi i64 [ 0, %vector.ph75 ], [ %index.next85, %vector.body80 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph75 ], [ %21, %vector.body80 ] %vec.phi82 = phi <4 x i32> [ zeroinitializer, %vector.ph75 ], [ %22, %vector.body80 ] %19 = getelementptr inbounds [114514 x i32], ptr @yosinagasayuri, i64 0, i64 %index81 %wide.load83 = load <4 x i32>, ptr %19, align 16, !tbaa !5 %20 = getelementptr inbounds i32, ptr %19, i64 4 %wide.load84 = load <4 x i32>, ptr %20, align 16, !tbaa !5 %21 = add <4 x i32> %wide.load83, %vec.phi %22 = add <4 x i32> %wide.load84, %vec.phi82 %index.next85 = add nuw i64 %index81, 8 %23 = icmp eq i64 %index.next85, %n.vec77 br i1 %23, label %middle.block72, label %vector.body80, !llvm.loop !15 middle.block72: ; preds = %vector.body80 %bin.rdx = add <4 x i32> %22, %21 %24 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n79 = icmp eq i64 %n.vec77, %wide.trip.count69 br i1 %cmp.n79, label %for.end35, label %for.body30.preheader86 for.body30.preheader86: ; preds = %for.body30.preheader, %middle.block72 %indvars.iv66.ph = phi i64 [ 0, %for.body30.preheader ], [ %n.vec77, %middle.block72 ] %horieyui.059.ph = phi i32 [ 0, %for.body30.preheader ], [ %24, %middle.block72 ] br label %for.body30 for.body30: ; preds = %for.body30.preheader86, %for.body30 %indvars.iv66 = phi i64 [ %indvars.iv.next67, %for.body30 ], [ %indvars.iv66.ph, %for.body30.preheader86 ] %horieyui.059 = phi i32 [ %add, %for.body30 ], [ %horieyui.059.ph, %for.body30.preheader86 ] %arrayidx32 = getelementptr inbounds [114514 x i32], ptr @yosinagasayuri, i64 0, i64 %indvars.iv66 %25 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %add = add nsw i32 %25, %horieyui.059 %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69 br i1 %exitcond70.not, label %for.end35, label %for.body30, !llvm.loop !16 for.end35: ; preds = %for.body30, %middle.block72, %for.end23 %horieyui.0.lcssa = phi i32 [ 0, %for.end23 ], [ %24, %middle.block72 ], [ %add, %for.body30 ] %call36 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %horieyui.0.lcssa) br label %cleanup cleanup: ; preds = %for.body, %if.then7, %for.end35, %entry %retval.0 = phi i32 [ 1, %entry ], [ 0, %for.end35 ], [ 0, %if.then7 ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind "no-trapping-math"="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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10, !12, !13} !16 = distinct !{!16, !10, !13, !12}
//#include "pch.h" #include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> //#include <set> //#include <map> //#include <iostream> #define ll long long #define fri(n) for(i=0;i<(n);i++) #define frj(n) for(j=0;j<(n);i++) #define min(p,q) ((p)<(q)?(p):(q)) #define max(p,q) ((p)>(q)?(p):(q)) #define INF 1000000000000//10^12 int compare_down(const void *a, const void *b) { return *(int*)b - *(int*)a; } int compare_up(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main(void) { //変数の宣言 int n,m; int x[100010]; int kukan[100010]; //よく使う変数 int i,j,l; int flag=0; int ans=0; int count=0; int temp,temp1,temp2; int max,min; int len; int sum=0; //データの読み込み scanf("%d %d",&n,&m); // scanf_s("%d %d",&n,&m); fri(m){ scanf("%d",&x[i]); // scanf_s("%d",&x[i]); } // printf("nは%dです\n", n); // printf("データの読み込み終了\n"); //実際の処理 qsort(x, m, sizeof(int), compare_up); fri(m-1){ kukan[i]=x[i+1]-x[i]; } qsort(kukan, m-1, sizeof(int), compare_down); fri(m-1){ if(i>=n-1) ans=ans+kukan[i]; } // printf("計算部分終了\n"); //出力 printf("%d",ans); // printf("結果の出力終了\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135060/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135060/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_down(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare_up(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 %m = alloca i32, align 4 %x = alloca [100010 x i32], align 16 %kukan = alloca [100010 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %kukan) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp46 = icmp sgt i32 %0, 0 br i1 %cmp46, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre65 = sext i32 %0 to i64 br label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100010 x i32], ptr %x, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %m, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry.for.end_crit_edge %conv.pre-phi = phi i64 [ %.pre65, %entry.for.end_crit_edge ], [ %2, %for.body ] call void @qsort(ptr noundef nonnull %x, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @compare_up) #5 %3 = load i32, ptr %m, align 4, !tbaa !5 %sub = add i32 %3, -1 %cmp348 = icmp sgt i32 %3, 1 br i1 %cmp348, label %for.body5.preheader, label %for.end15 for.body5.preheader: ; preds = %for.end %wide.trip.count = zext i32 %sub to i64 %.pre = load i32, ptr %x, align 16, !tbaa !5 %min.iters.check = icmp ult i32 %3, 9 br i1 %min.iters.check, label %for.body5.preheader67, label %vector.ph vector.ph: ; preds = %for.body5.preheader %n.vec = and i64 %wide.trip.count, 4294967288 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load66, %vector.body ] %4 = or i64 %index, 1 %5 = getelementptr inbounds [100010 x i32], ptr %x, i64 0, i64 %4 %wide.load = load <4 x i32>, ptr %5, align 4, !tbaa !5 %6 = getelementptr inbounds i32, ptr %5, i64 4 %wide.load66 = load <4 x i32>, ptr %6, align 4, !tbaa !5 %7 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %8 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load66, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %9 = sub nsw <4 x i32> %wide.load, %7 %10 = sub nsw <4 x i32> %wide.load66, %8 %11 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %index store <4 x i32> %9, ptr %11, align 16, !tbaa !5 %12 = getelementptr inbounds i32, ptr %11, i64 4 store <4 x i32> %10, ptr %12, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %13 = icmp eq i64 %index.next, %n.vec br i1 %13, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count %vector.recur.extract = extractelement <4 x i32> %wide.load66, i64 3 br i1 %cmp.n, label %for.end15, label %for.body5.preheader67 for.body5.preheader67: ; preds = %for.body5.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body5.preheader ] %indvars.iv57.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body5.preheader ] br label %for.body5 for.body5: ; preds = %for.body5.preheader67, %for.body5 %scalar.recur = phi i32 [ %14, %for.body5 ], [ %scalar.recur.ph, %for.body5.preheader67 ] %indvars.iv57 = phi i64 [ %indvars.iv.next58, %for.body5 ], [ %indvars.iv57.ph, %for.body5.preheader67 ] %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1 %arrayidx7 = getelementptr inbounds [100010 x i32], ptr %x, i64 0, i64 %indvars.iv.next58 %14 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %sub10 = sub nsw i32 %14, %scalar.recur %arrayidx12 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv57 store i32 %sub10, ptr %arrayidx12, align 4, !tbaa !5 %exitcond.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count br i1 %exitcond.not, label %for.end15, label %for.body5, !llvm.loop !14 for.end15: ; preds = %for.body5, %middle.block, %for.end %conv18 = sext i32 %sub to i64 call void @qsort(ptr noundef nonnull %kukan, i64 noundef %conv18, i64 noundef 4, ptr noundef nonnull @compare_down) #5 %15 = load i32, ptr %m, align 4, !tbaa !5 %cmp2151 = icmp sgt i32 %15, 1 br i1 %cmp2151, label %for.body23.lr.ph, label %for.end32 for.body23.lr.ph: ; preds = %for.end15 %sub20 = add i32 %15, -1 %16 = load i32, ptr %n, align 4, !tbaa !5 %sub24 = add nsw i32 %16, -1 %17 = sext i32 %sub24 to i64 %wide.trip.count63 = zext i32 %sub20 to i64 %18 = add nsw i64 %wide.trip.count63, -1 %xtraiter = and i64 %wide.trip.count63, 3 %19 = icmp ult i64 %18, 3 br i1 %19, label %for.end32.loopexit.unr-lcssa, label %for.body23.lr.ph.new for.body23.lr.ph.new: ; preds = %for.body23.lr.ph %unroll_iter = and i64 %wide.trip.count63, 4294967292 br label %for.body23 for.body23: ; preds = %for.inc30.3, %for.body23.lr.ph.new %indvars.iv60 = phi i64 [ 0, %for.body23.lr.ph.new ], [ %indvars.iv.next61.3, %for.inc30.3 ] %ans.052 = phi i32 [ 0, %for.body23.lr.ph.new ], [ %ans.1.3, %for.inc30.3 ] %niter = phi i64 [ 0, %for.body23.lr.ph.new ], [ %niter.next.3, %for.inc30.3 ] %cmp25.not = icmp slt i64 %indvars.iv60, %17 br i1 %cmp25.not, label %for.inc30, label %if.then if.then: ; preds = %for.body23 %arrayidx28 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv60 %20 = load i32, ptr %arrayidx28, align 16, !tbaa !5 %add29 = add nsw i32 %20, %ans.052 br label %for.inc30 for.inc30: ; preds = %for.body23, %if.then %ans.1 = phi i32 [ %add29, %if.then ], [ %ans.052, %for.body23 ] %indvars.iv.next61 = or i64 %indvars.iv60, 1 %cmp25.not.1 = icmp slt i64 %indvars.iv.next61, %17 br i1 %cmp25.not.1, label %for.inc30.1, label %if.then.1 if.then.1: ; preds = %for.inc30 %arrayidx28.1 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv.next61 %21 = load i32, ptr %arrayidx28.1, align 4, !tbaa !5 %add29.1 = add nsw i32 %21, %ans.1 br label %for.inc30.1 for.inc30.1: ; preds = %if.then.1, %for.inc30 %ans.1.1 = phi i32 [ %add29.1, %if.then.1 ], [ %ans.1, %for.inc30 ] %indvars.iv.next61.1 = or i64 %indvars.iv60, 2 %cmp25.not.2 = icmp slt i64 %indvars.iv.next61.1, %17 br i1 %cmp25.not.2, label %for.inc30.2, label %if.then.2 if.then.2: ; preds = %for.inc30.1 %arrayidx28.2 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv.next61.1 %22 = load i32, ptr %arrayidx28.2, align 8, !tbaa !5 %add29.2 = add nsw i32 %22, %ans.1.1 br label %for.inc30.2 for.inc30.2: ; preds = %if.then.2, %for.inc30.1 %ans.1.2 = phi i32 [ %add29.2, %if.then.2 ], [ %ans.1.1, %for.inc30.1 ] %indvars.iv.next61.2 = or i64 %indvars.iv60, 3 %cmp25.not.3 = icmp slt i64 %indvars.iv.next61.2, %17 br i1 %cmp25.not.3, label %for.inc30.3, label %if.then.3 if.then.3: ; preds = %for.inc30.2 %arrayidx28.3 = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv.next61.2 %23 = load i32, ptr %arrayidx28.3, align 4, !tbaa !5 %add29.3 = add nsw i32 %23, %ans.1.2 br label %for.inc30.3 for.inc30.3: ; preds = %if.then.3, %for.inc30.2 %ans.1.3 = phi i32 [ %add29.3, %if.then.3 ], [ %ans.1.2, %for.inc30.2 ] %indvars.iv.next61.3 = add nuw nsw i64 %indvars.iv60, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.end32.loopexit.unr-lcssa, label %for.body23, !llvm.loop !15 for.end32.loopexit.unr-lcssa: ; preds = %for.inc30.3, %for.body23.lr.ph %ans.1.lcssa.ph = phi i32 [ undef, %for.body23.lr.ph ], [ %ans.1.3, %for.inc30.3 ] %indvars.iv60.unr = phi i64 [ 0, %for.body23.lr.ph ], [ %indvars.iv.next61.3, %for.inc30.3 ] %ans.052.unr = phi i32 [ 0, %for.body23.lr.ph ], [ %ans.1.3, %for.inc30.3 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end32, label %for.body23.epil for.body23.epil: ; preds = %for.end32.loopexit.unr-lcssa, %for.inc30.epil %indvars.iv60.epil = phi i64 [ %indvars.iv.next61.epil, %for.inc30.epil ], [ %indvars.iv60.unr, %for.end32.loopexit.unr-lcssa ] %ans.052.epil = phi i32 [ %ans.1.epil, %for.inc30.epil ], [ %ans.052.unr, %for.end32.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.inc30.epil ], [ 0, %for.end32.loopexit.unr-lcssa ] %cmp25.not.epil = icmp slt i64 %indvars.iv60.epil, %17 br i1 %cmp25.not.epil, label %for.inc30.epil, label %if.then.epil if.then.epil: ; preds = %for.body23.epil %arrayidx28.epil = getelementptr inbounds [100010 x i32], ptr %kukan, i64 0, i64 %indvars.iv60.epil %24 = load i32, ptr %arrayidx28.epil, align 4, !tbaa !5 %add29.epil = add nsw i32 %24, %ans.052.epil br label %for.inc30.epil for.inc30.epil: ; preds = %if.then.epil, %for.body23.epil %ans.1.epil = phi i32 [ %add29.epil, %if.then.epil ], [ %ans.052.epil, %for.body23.epil ] %indvars.iv.next61.epil = add nuw nsw i64 %indvars.iv60.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end32, label %for.body23.epil, !llvm.loop !16 for.end32: ; preds = %for.end32.loopexit.unr-lcssa, %for.inc30.epil, %for.end15 %ans.0.lcssa = phi i32 [ 0, %for.end15 ], [ %ans.1.lcssa.ph, %for.end32.loopexit.unr-lcssa ], [ %ans.1.epil, %for.inc30.epil ] %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %kukan) #5 call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %x) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: 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 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10} !16 = distinct !{!16, !17} !17 = !{!"llvm.loop.unroll.disable"}
#include <stdio.h> #include <stdlib.h> int int_comp(const void *a, const void *b) { return (*(int *)a) - (*(int *)b); } int main() { int N; int M; int X[100000]; int diff[100000]; int i; int sum; int ret; scanf("%d %d", &N, &M); for(i = 0; i < M; i++) { scanf("%d", &X[i]); } if(N >= M) { printf("0\n"); return 0; } qsort(&(X[0]), M, sizeof(X[0]), int_comp); for(i = 0; i < M-1; i++) { diff[i] = X[i+1] - X[i]; } qsort(&(diff[0]), M-1, sizeof(diff[0]), int_comp); sum = 0; for(i = 0; i < M-N; i++) { sum += diff[i]; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135103/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135103/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @int_comp(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 %M = alloca i32, align 4 %X = alloca [100000 x i32], align 16 %diff = alloca [100000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #7 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %X) #7 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %diff) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) %0 = load i32, ptr %M, align 4, !tbaa !5 %cmp51 = icmp sgt i32 %0, 0 br i1 %cmp51, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %X, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %M, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %.lcssa = phi i32 [ %0, %entry ], [ %1, %for.body ] %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp2.not = icmp slt i32 %3, %.lcssa br i1 %cmp2.not, label %if.end, label %if.then if.then: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %cleanup if.end: ; preds = %for.end %conv = sext i32 %.lcssa to i64 call void @qsort(ptr noundef nonnull %X, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @int_comp) #7 %4 = load i32, ptr %M, align 4, !tbaa !5 %sub = add i32 %4, -1 %cmp653 = icmp sgt i32 %4, 1 br i1 %cmp653, label %for.body8.preheader, label %for.end18 for.body8.preheader: ; preds = %if.end %wide.trip.count = zext i32 %sub to i64 %.pre = load i32, ptr %X, align 16, !tbaa !5 %min.iters.check = icmp ult i32 %4, 9 br i1 %min.iters.check, label %for.body8.preheader90, label %vector.ph vector.ph: ; preds = %for.body8.preheader %n.vec = and i64 %wide.trip.count, 4294967288 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load72, %vector.body ] %5 = or i64 %index, 1 %6 = getelementptr inbounds [100000 x i32], ptr %X, i64 0, i64 %5 %wide.load = load <4 x i32>, ptr %6, align 4, !tbaa !5 %7 = getelementptr inbounds i32, ptr %6, i64 4 %wide.load72 = load <4 x i32>, ptr %7, align 4, !tbaa !5 %8 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %9 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load72, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %10 = sub nsw <4 x i32> %wide.load, %8 %11 = sub nsw <4 x i32> %wide.load72, %9 %12 = getelementptr inbounds [100000 x i32], ptr %diff, i64 0, i64 %index store <4 x i32> %10, ptr %12, align 16, !tbaa !5 %13 = getelementptr inbounds i32, ptr %12, i64 4 store <4 x i32> %11, ptr %13, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %14 = icmp eq i64 %index.next, %n.vec br i1 %14, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count %vector.recur.extract = extractelement <4 x i32> %wide.load72, i64 3 br i1 %cmp.n, label %for.end18, label %for.body8.preheader90 for.body8.preheader90: ; preds = %for.body8.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body8.preheader ] %indvars.iv62.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body8.preheader ] br label %for.body8 for.body8: ; preds = %for.body8.preheader90, %for.body8 %scalar.recur = phi i32 [ %15, %for.body8 ], [ %scalar.recur.ph, %for.body8.preheader90 ] %indvars.iv62 = phi i64 [ %indvars.iv.next63, %for.body8 ], [ %indvars.iv62.ph, %for.body8.preheader90 ] %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1 %arrayidx10 = getelementptr inbounds [100000 x i32], ptr %X, i64 0, i64 %indvars.iv.next63 %15 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %sub13 = sub nsw i32 %15, %scalar.recur %arrayidx15 = getelementptr inbounds [100000 x i32], ptr %diff, i64 0, i64 %indvars.iv62 store i32 %sub13, ptr %arrayidx15, align 4, !tbaa !5 %exitcond.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count br i1 %exitcond.not, label %for.end18, label %for.body8, !llvm.loop !14 for.end18: ; preds = %for.body8, %middle.block, %if.end %conv21 = sext i32 %sub to i64 call void @qsort(ptr noundef nonnull %diff, i64 noundef %conv21, i64 noundef 4, ptr noundef nonnull @int_comp) #7 %16 = load i32, ptr %M, align 4, !tbaa !5 %17 = load i32, ptr %N, align 4, !tbaa !5 %sub23 = sub nsw i32 %16, %17 %cmp2456 = icmp sgt i32 %sub23, 0 br i1 %cmp2456, label %for.body26.preheader, label %for.end32 for.body26.preheader: ; preds = %for.end18 %wide.trip.count68 = zext i32 %sub23 to i64 %min.iters.check75 = icmp ult i32 %sub23, 8 br i1 %min.iters.check75, label %for.body26.preheader87, label %vector.ph76 vector.ph76: ; preds = %for.body26.preheader %n.vec78 = and i64 %wide.trip.count68, 4294967288 br label %vector.body81 vector.body81: ; preds = %vector.body81, %vector.ph76 %index82 = phi i64 [ 0, %vector.ph76 ], [ %index.next86, %vector.body81 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph76 ], [ %20, %vector.body81 ] %vec.phi83 = phi <4 x i32> [ zeroinitializer, %vector.ph76 ], [ %21, %vector.body81 ] %18 = getelementptr inbounds [100000 x i32], ptr %diff, i64 0, i64 %index82 %wide.load84 = load <4 x i32>, ptr %18, align 16, !tbaa !5 %19 = getelementptr inbounds i32, ptr %18, i64 4 %wide.load85 = load <4 x i32>, ptr %19, align 16, !tbaa !5 %20 = add <4 x i32> %wide.load84, %vec.phi %21 = add <4 x i32> %wide.load85, %vec.phi83 %index.next86 = add nuw i64 %index82, 8 %22 = icmp eq i64 %index.next86, %n.vec78 br i1 %22, label %middle.block73, label %vector.body81, !llvm.loop !15 middle.block73: ; preds = %vector.body81 %bin.rdx = add <4 x i32> %21, %20 %23 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n80 = icmp eq i64 %n.vec78, %wide.trip.count68 br i1 %cmp.n80, label %for.end32, label %for.body26.preheader87 for.body26.preheader87: ; preds = %for.body26.preheader, %middle.block73 %indvars.iv65.ph = phi i64 [ 0, %for.body26.preheader ], [ %n.vec78, %middle.block73 ] %sum.058.ph = phi i32 [ 0, %for.body26.preheader ], [ %23, %middle.block73 ] br label %for.body26 for.body26: ; preds = %for.body26.preheader87, %for.body26 %indvars.iv65 = phi i64 [ %indvars.iv.next66, %for.body26 ], [ %indvars.iv65.ph, %for.body26.preheader87 ] %sum.058 = phi i32 [ %add29, %for.body26 ], [ %sum.058.ph, %for.body26.preheader87 ] %arrayidx28 = getelementptr inbounds [100000 x i32], ptr %diff, i64 0, i64 %indvars.iv65 %24 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %add29 = add nsw i32 %24, %sum.058 %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1 %exitcond69.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count68 br i1 %exitcond69.not, label %for.end32, label %for.body26, !llvm.loop !16 for.end32: ; preds = %for.body26, %middle.block73, %for.end18 %sum.0.lcssa = phi i32 [ 0, %for.end18 ], [ %23, %middle.block73 ], [ %add29, %for.body26 ] %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %sum.0.lcssa) br label %cleanup cleanup: ; preds = %for.end32, %if.then call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %diff) #7 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %X) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x 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 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { 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} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10, !12, !13} !16 = distinct !{!16, !10, !13, !12}
#include<stdio.h> #include<string.h> enum {WEST=1,NORTH=2,EAST=4,SOUTH=8}; int vx[]={-1,0,1,0}; int vy[]={0,-1,0,1}; int w,h; int map[30][30]; int cost[30][30]; struct Pos{ int y,x; }que[900]; int head,tail; int main(){ int tmp; int i,j; struct Pos a,b; while(scanf("%d%d",&w,&h)==2&&(w|h)){ memset(cost,-1,sizeof(cost)); memset(map,0,sizeof(map)); for(i=0;i<2*h-1;i++){ if(i&1){ for(j=0;j<w;j++){ scanf("%d",&tmp); if(tmp==0){ map[i/2][j] |= SOUTH; map[i/2+1][j] |= NORTH; } } } else{ for(j=0;j<w-1;j++){ scanf("%d",&tmp); if(tmp==0){ map[i/2][j] |= EAST; map[i/2][j+1] |= WEST; } } } } head=0; tail=0; a.y=a.x=0; cost[0][0]=1; que[tail++]=a; while(head < tail){ a= que[head++]; for(i=0;i<4;i++){ b.y = a.y+vy[i]; b.x = a.x+vx[i]; if( (map[a.y][a.x]&1<<i) && cost[b.y][b.x]==-1){ cost[b.y][b.x] = cost[a.y][a.x] + 1; que[tail++] = b; } } } if(cost[h-1][w-1]!=-1)printf("%d\n",cost[h-1][w-1]); else puts("0"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135154/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135154/source.c" target datalayout = "e-m:e-p270: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.Pos = type { i32, i32 } @vx = dso_local local_unnamed_addr global [4 x i32] [i32 -1, i32 0, i32 1, i32 0], align 16 @vy = dso_local local_unnamed_addr global [4 x i32] [i32 0, i32 -1, i32 0, i32 1], align 16 @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @w = dso_local global i32 0, align 4 @h = dso_local global i32 0, align 4 @cost = dso_local local_unnamed_addr global [30 x [30 x i32]] zeroinitializer, align 16 @map = dso_local local_unnamed_addr global [30 x [30 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @head = dso_local local_unnamed_addr global i32 0, align 4 @tail = dso_local local_unnamed_addr global i32 0, align 4 @que = dso_local local_unnamed_addr global [900 x %struct.Pos] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %tmp = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #4 %call175 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w, ptr noundef nonnull @h) %cmp176 = icmp eq i32 %call175, 2 %0 = load i32, ptr @w, align 4 %1 = load i32, ptr @h, align 4 %or177 = or i32 %1, %0 %tobool178 = icmp ne i32 %or177, 0 %2 = select i1 %cmp176, i1 %tobool178, i1 false br i1 %2, label %while.body, label %while.end122 while.body: ; preds = %entry, %if.end121 %3 = phi i32 [ %39, %if.end121 ], [ %0, %entry ] %4 = phi i32 [ %40, %if.end121 ], [ %1, %entry ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3600) @cost, i8 -1, i64 3600, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3600) @map, i8 0, i64 3600, i1 false) %cmp1160 = icmp sgt i32 %4, 0 br i1 %cmp1160, label %for.body, label %while.body51.preheader for.body: ; preds = %while.body, %for.inc43 %5 = phi i32 [ %17, %for.inc43 ], [ %3, %while.body ] %6 = phi i32 [ %18, %for.inc43 ], [ %3, %while.body ] %i.0161 = phi i32 [ %inc44, %for.inc43 ], [ 0, %while.body ] %and = and i32 %i.0161, 1 %tobool2.not = icmp eq i32 %and, 0 br i1 %tobool2.not, label %for.cond18.preheader, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.body %cmp4153 = icmp sgt i32 %6, 0 br i1 %cmp4153, label %for.body5.lr.ph, label %for.inc43 for.body5.lr.ph: ; preds = %for.cond3.preheader %div151 = lshr i32 %i.0161, 1 %idxprom = zext i32 %div151 to i64 %add = add nuw nsw i32 %div151, 1 %idxprom13 = zext i32 %add to i64 br label %for.body5 for.cond18.preheader: ; preds = %for.body %cmp20156 = icmp sgt i32 %5, 1 br i1 %cmp20156, label %for.body21.lr.ph, label %for.inc43 for.body21.lr.ph: ; preds = %for.cond18.preheader %div25150 = lshr i32 %i.0161, 1 %idxprom26 = zext i32 %div25150 to i64 br label %for.body21 for.body5: ; preds = %for.body5.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body5.lr.ph ], [ %indvars.iv.next, %for.inc ] %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %tmp) %7 = load i32, ptr %tmp, align 4, !tbaa !5 %cmp7 = icmp eq i32 %7, 0 br i1 %cmp7, label %if.then8, label %for.inc if.then8: ; preds = %for.body5 %arrayidx10 = getelementptr inbounds [30 x [30 x i32]], ptr @map, i64 0, i64 %idxprom, i64 %indvars.iv %8 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %or11 = or i32 %8, 8 store i32 %or11, ptr %arrayidx10, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [30 x [30 x i32]], ptr @map, i64 0, i64 %idxprom13, i64 %indvars.iv %9 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %or17 = or i32 %9, 2 store i32 %or17, ptr %arrayidx16, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body5, %if.then8 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr @w, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp4 = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp4, label %for.body5, label %for.inc43, !llvm.loop !9 for.body21: ; preds = %for.body21.lr.ph, %for.inc39 %indvars.iv182 = phi i64 [ 0, %for.body21.lr.ph ], [ %indvars.iv.next183.pre-phi, %for.inc39 ] %call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %tmp) %12 = load i32, ptr %tmp, align 4, !tbaa !5 %cmp23 = icmp eq i32 %12, 0 br i1 %cmp23, label %if.then24, label %for.inc39 if.then24: ; preds = %for.body21 %arrayidx29 = getelementptr inbounds [30 x [30 x i32]], ptr @map, i64 0, i64 %idxprom26, i64 %indvars.iv182 %13 = load <2 x i32>, ptr %arrayidx29, align 4, !tbaa !5 %14 = or <2 x i32> %13, <i32 4, i32 1> store <2 x i32> %14, ptr %arrayidx29, align 4, !tbaa !5 br label %for.inc39 for.inc39: ; preds = %for.body21, %if.then24 %indvars.iv.next183.pre-phi = add nuw nsw i64 %indvars.iv182, 1 %15 = load i32, ptr @w, align 4, !tbaa !5 %sub19 = add nsw i32 %15, -1 %16 = sext i32 %sub19 to i64 %cmp20 = icmp slt i64 %indvars.iv.next183.pre-phi, %16 br i1 %cmp20, label %for.body21, label %for.inc43, !llvm.loop !11 for.inc43: ; preds = %for.inc, %for.inc39, %for.cond3.preheader, %for.cond18.preheader %17 = phi i32 [ %5, %for.cond3.preheader ], [ %5, %for.cond18.preheader ], [ %15, %for.inc39 ], [ %10, %for.inc ] %18 = phi i32 [ %6, %for.cond3.preheader ], [ %5, %for.cond18.preheader ], [ %15, %for.inc39 ], [ %10, %for.inc ] %inc44 = add nuw nsw i32 %i.0161, 1 %19 = load i32, ptr @h, align 4, !tbaa !5 %mul = shl nsw i32 %19, 1 %sub = add nsw i32 %mul, -1 %cmp1 = icmp slt i32 %inc44, %sub br i1 %cmp1, label %for.body, label %while.body51.preheader, !llvm.loop !12 while.body51.preheader: ; preds = %for.inc43, %while.body %20 = phi i32 [ %3, %while.body ], [ %17, %for.inc43 ] %.lcssa = phi i32 [ %4, %while.body ], [ %19, %for.inc43 ] store i32 0, ptr @head, align 4, !tbaa !5 store i32 1, ptr @cost, align 16, !tbaa !5 store i32 1, ptr @tail, align 4, !tbaa !5 store i32 0, ptr @que, align 16, !tbaa.struct !13 store i32 0, ptr getelementptr inbounds ([900 x %struct.Pos], ptr @que, i64 0, i64 0, i32 1), align 4, !tbaa.struct !14 %.pre = load i32, ptr @vy, align 16, !tbaa !5 %.pre192 = load i32, ptr @vx, align 16, !tbaa !5 %21 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vy, i64 0, i64 1), align 4, !tbaa !5 %22 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vx, i64 0, i64 1), align 4, !tbaa !5 %23 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vy, i64 0, i64 2), align 8, !tbaa !5 %24 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vx, i64 0, i64 2), align 8, !tbaa !5 %25 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vy, i64 0, i64 3), align 4, !tbaa !5 %26 = load i32, ptr getelementptr inbounds ([4 x i32], ptr @vx, i64 0, i64 3), align 4, !tbaa !5 br label %while.body51 while.body51: ; preds = %while.body51.preheader, %for.inc101.3 %indvars.iv189 = phi i64 [ 0, %while.body51.preheader ], [ %indvars.iv.next190, %for.inc101.3 ] %tail.promoted171173 = phi i32 [ 1, %while.body51.preheader ], [ %tail.promoted169.3, %for.inc101.3 ] %arrayidx54 = getelementptr inbounds [900 x %struct.Pos], ptr @que, i64 0, i64 %indvars.iv189 %a.sroa.0.0.copyload127 = load i32, ptr %arrayidx54, align 8, !tbaa.struct !13 %a.sroa.8.0.arrayidx54.sroa_idx = getelementptr inbounds i8, ptr %arrayidx54, i64 4 %a.sroa.8.0.copyload128 = load i32, ptr %a.sroa.8.0.arrayidx54.sroa_idx, align 4, !tbaa.struct !14 %idxprom69 = sext i32 %a.sroa.0.0.copyload127 to i64 %idxprom72 = sext i32 %a.sroa.8.0.copyload128 to i64 %arrayidx73 = getelementptr inbounds [30 x [30 x i32]], ptr @map, i64 0, i64 %idxprom69, i64 %idxprom72 %27 = load i32, ptr %arrayidx73, align 4, !tbaa !5 %arrayidx89 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom69, i64 %idxprom72 %add61 = add nsw i32 %.pre, %a.sroa.0.0.copyload127 %add66 = add nsw i32 %.pre192, %a.sroa.8.0.copyload128 %and74 = and i32 %27, 1 %tobool75.not = icmp eq i32 %and74, 0 br i1 %tobool75.not, label %for.inc101, label %land.lhs.true land.lhs.true: ; preds = %while.body51 %idxprom77 = sext i32 %add61 to i64 %idxprom80 = sext i32 %add66 to i64 %arrayidx81 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom77, i64 %idxprom80 %28 = load i32, ptr %arrayidx81, align 4, !tbaa !5 %cmp82 = icmp eq i32 %28, -1 br i1 %cmp82, label %if.then83, label %for.inc101 if.then83: ; preds = %land.lhs.true %29 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %add90 = add nsw i32 %29, 1 store i32 %add90, ptr %arrayidx81, align 4, !tbaa !5 %inc97 = add nsw i32 %tail.promoted171173, 1 store i32 %inc97, ptr @tail, align 4, !tbaa !5 %idxprom98 = sext i32 %tail.promoted171173 to i64 %arrayidx99 = getelementptr inbounds [900 x %struct.Pos], ptr @que, i64 0, i64 %idxprom98 store i32 %add61, ptr %arrayidx99, align 8, !tbaa.struct !13 %b.sroa.6.0.arrayidx99.sroa_idx = getelementptr inbounds i8, ptr %arrayidx99, i64 4 store i32 %add66, ptr %b.sroa.6.0.arrayidx99.sroa_idx, align 4, !tbaa.struct !14 br label %for.inc101 for.inc101: ; preds = %while.body51, %land.lhs.true, %if.then83 %tail.promoted169 = phi i32 [ %tail.promoted171173, %while.body51 ], [ %tail.promoted171173, %land.lhs.true ], [ %inc97, %if.then83 ] %add61.1 = add nsw i32 %21, %a.sroa.0.0.copyload127 %add66.1 = add nsw i32 %22, %a.sroa.8.0.copyload128 %and74.1 = and i32 %27, 2 %tobool75.not.1 = icmp eq i32 %and74.1, 0 br i1 %tobool75.not.1, label %for.inc101.1, label %land.lhs.true.1 land.lhs.true.1: ; preds = %for.inc101 %idxprom77.1 = sext i32 %add61.1 to i64 %idxprom80.1 = sext i32 %add66.1 to i64 %arrayidx81.1 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom77.1, i64 %idxprom80.1 %30 = load i32, ptr %arrayidx81.1, align 4, !tbaa !5 %cmp82.1 = icmp eq i32 %30, -1 br i1 %cmp82.1, label %if.then83.1, label %for.inc101.1 if.then83.1: ; preds = %land.lhs.true.1 %31 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %add90.1 = add nsw i32 %31, 1 store i32 %add90.1, ptr %arrayidx81.1, align 4, !tbaa !5 %inc97.1 = add nsw i32 %tail.promoted169, 1 store i32 %inc97.1, ptr @tail, align 4, !tbaa !5 %idxprom98.1 = sext i32 %tail.promoted169 to i64 %arrayidx99.1 = getelementptr inbounds [900 x %struct.Pos], ptr @que, i64 0, i64 %idxprom98.1 store i32 %add61.1, ptr %arrayidx99.1, align 8, !tbaa.struct !13 %b.sroa.6.0.arrayidx99.sroa_idx.1 = getelementptr inbounds i8, ptr %arrayidx99.1, i64 4 store i32 %add66.1, ptr %b.sroa.6.0.arrayidx99.sroa_idx.1, align 4, !tbaa.struct !14 br label %for.inc101.1 for.inc101.1: ; preds = %if.then83.1, %land.lhs.true.1, %for.inc101 %tail.promoted169.1 = phi i32 [ %tail.promoted169, %for.inc101 ], [ %tail.promoted169, %land.lhs.true.1 ], [ %inc97.1, %if.then83.1 ] %add61.2 = add nsw i32 %23, %a.sroa.0.0.copyload127 %add66.2 = add nsw i32 %24, %a.sroa.8.0.copyload128 %and74.2 = and i32 %27, 4 %tobool75.not.2 = icmp eq i32 %and74.2, 0 br i1 %tobool75.not.2, label %for.inc101.2, label %land.lhs.true.2 land.lhs.true.2: ; preds = %for.inc101.1 %idxprom77.2 = sext i32 %add61.2 to i64 %idxprom80.2 = sext i32 %add66.2 to i64 %arrayidx81.2 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom77.2, i64 %idxprom80.2 %32 = load i32, ptr %arrayidx81.2, align 4, !tbaa !5 %cmp82.2 = icmp eq i32 %32, -1 br i1 %cmp82.2, label %if.then83.2, label %for.inc101.2 if.then83.2: ; preds = %land.lhs.true.2 %33 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %add90.2 = add nsw i32 %33, 1 store i32 %add90.2, ptr %arrayidx81.2, align 4, !tbaa !5 %inc97.2 = add nsw i32 %tail.promoted169.1, 1 store i32 %inc97.2, ptr @tail, align 4, !tbaa !5 %idxprom98.2 = sext i32 %tail.promoted169.1 to i64 %arrayidx99.2 = getelementptr inbounds [900 x %struct.Pos], ptr @que, i64 0, i64 %idxprom98.2 store i32 %add61.2, ptr %arrayidx99.2, align 8, !tbaa.struct !13 %b.sroa.6.0.arrayidx99.sroa_idx.2 = getelementptr inbounds i8, ptr %arrayidx99.2, i64 4 store i32 %add66.2, ptr %b.sroa.6.0.arrayidx99.sroa_idx.2, align 4, !tbaa.struct !14 br label %for.inc101.2 for.inc101.2: ; preds = %if.then83.2, %land.lhs.true.2, %for.inc101.1 %tail.promoted169.2 = phi i32 [ %tail.promoted169.1, %for.inc101.1 ], [ %tail.promoted169.1, %land.lhs.true.2 ], [ %inc97.2, %if.then83.2 ] %add61.3 = add nsw i32 %25, %a.sroa.0.0.copyload127 %add66.3 = add nsw i32 %26, %a.sroa.8.0.copyload128 %and74.3 = and i32 %27, 8 %tobool75.not.3 = icmp eq i32 %and74.3, 0 br i1 %tobool75.not.3, label %for.inc101.3, label %land.lhs.true.3 land.lhs.true.3: ; preds = %for.inc101.2 %idxprom77.3 = sext i32 %add61.3 to i64 %idxprom80.3 = sext i32 %add66.3 to i64 %arrayidx81.3 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom77.3, i64 %idxprom80.3 %34 = load i32, ptr %arrayidx81.3, align 4, !tbaa !5 %cmp82.3 = icmp eq i32 %34, -1 br i1 %cmp82.3, label %if.then83.3, label %for.inc101.3 if.then83.3: ; preds = %land.lhs.true.3 %35 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %add90.3 = add nsw i32 %35, 1 store i32 %add90.3, ptr %arrayidx81.3, align 4, !tbaa !5 %inc97.3 = add nsw i32 %tail.promoted169.2, 1 store i32 %inc97.3, ptr @tail, align 4, !tbaa !5 %idxprom98.3 = sext i32 %tail.promoted169.2 to i64 %arrayidx99.3 = getelementptr inbounds [900 x %struct.Pos], ptr @que, i64 0, i64 %idxprom98.3 store i32 %add61.3, ptr %arrayidx99.3, align 8, !tbaa.struct !13 %b.sroa.6.0.arrayidx99.sroa_idx.3 = getelementptr inbounds i8, ptr %arrayidx99.3, i64 4 store i32 %add66.3, ptr %b.sroa.6.0.arrayidx99.sroa_idx.3, align 4, !tbaa.struct !14 br label %for.inc101.3 for.inc101.3: ; preds = %if.then83.3, %land.lhs.true.3, %for.inc101.2 %tail.promoted169.3 = phi i32 [ %tail.promoted169.2, %for.inc101.2 ], [ %tail.promoted169.2, %land.lhs.true.3 ], [ %inc97.3, %if.then83.3 ] %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1 %36 = sext i32 %tail.promoted169.3 to i64 %cmp50 = icmp slt i64 %indvars.iv.next190, %36 br i1 %cmp50, label %while.body51, label %while.end, !llvm.loop !15 while.end: ; preds = %for.inc101.3 %37 = trunc i64 %indvars.iv.next190 to i32 store i32 %37, ptr @head, align 4, !tbaa !5 %sub104 = add nsw i32 %.lcssa, -1 %idxprom105 = sext i32 %sub104 to i64 %sub107 = add nsw i32 %20, -1 %idxprom108 = sext i32 %sub107 to i64 %arrayidx109 = getelementptr inbounds [30 x [30 x i32]], ptr @cost, i64 0, i64 %idxprom105, i64 %idxprom108 %38 = load i32, ptr %arrayidx109, align 4, !tbaa !5 %cmp110.not = icmp eq i32 %38, -1 br i1 %cmp110.not, label %if.else119, label %if.then111 if.then111: ; preds = %while.end %call118 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %38) br label %if.end121 if.else119: ; preds = %while.end %call120 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end121 if.end121: ; preds = %if.else119, %if.then111 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @w, ptr noundef nonnull @h) %cmp = icmp eq i32 %call, 2 %39 = load i32, ptr @w, align 4 %40 = load i32, ptr @h, align 4 %or = or i32 %40, %39 %tobool = icmp ne i32 %or, 0 %41 = select i1 %cmp, i1 %tobool, i1 false br i1 %41, label %while.body, label %while.end122, !llvm.loop !16 while.end122: ; preds = %if.end121, %entry call void @llvm.lifetime.end.p0(i64 4, 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 i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = !{i64 0, i64 4, !5, i64 4, i64 4, !5} !14 = !{i64 0, i64 4, !5} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include<stdio.h> int Det(int S[6],int T[6]) { int i,j,k,d,C[6]; int Dice[6][6]={{1,2,3,5,4,6}, {2,6,3,1,4,5}, {3,6,5,1,2,4}, {4,6,2,1,5,3}, {5,6,4,1,3,2}, {6,5,3,2,4,1}}; for(i=0;i<6;i++) { for(j=0;j<4;j++) { for(k=0;k<4;k++){C[k+1]=T[Dice[i][(j+k)%4+1]-1];} C[0]=T[Dice[i][0]-1];C[5]=T[Dice[i][5]-1]; for(d=0,k=0;k<6;k++) { if(S[Dice[0][k]-1]==C[k])d+=1; } if(d==6)break; } if(d==6)break; } if(d==6){return 1;} else{return 0;} } int main(void) { int n,i,j,k,c=0,D[101][6],s[6],t[6]; scanf("%d",&n); for(i=0;i<6;i++){scanf("%d",&D[0][i]);} for(i=1;i<n;i++){for(j=0;j<6;j++){scanf("%d",&D[i][j]);}} for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { for(k=0;k<6;k++){s[k]=D[i][k];} for(k=0;k<6;k++){t[k]=D[j][k];} c+=Det(s,t); } } if(c==0){printf("Yes\n");} else{printf("No\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135198/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135198/source.c" target datalayout = "e-m:e-p270: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.Det.Dice = private unnamed_addr constant [6 x [6 x i32]] [[6 x i32] [i32 1, i32 2, i32 3, i32 5, i32 4, i32 6], [6 x i32] [i32 2, i32 6, i32 3, i32 1, i32 4, i32 5], [6 x i32] [i32 3, i32 6, i32 5, i32 1, i32 2, i32 4], [6 x i32] [i32 4, i32 6, i32 2, i32 1, i32 5, i32 3], [6 x i32] [i32 5, i32 6, i32 4, i32 1, i32 3, i32 2], [6 x i32] [i32 6, i32 5, i32 3, i32 2, i32 4, i32 1]], align 16 @.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 norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @Det(ptr nocapture noundef readonly %S, ptr nocapture noundef readonly %T) local_unnamed_addr #0 { entry: %.pre = load i32, ptr %S, align 4, !tbaa !5 %arrayidx37.1.phi.trans.insert = getelementptr inbounds i32, ptr %S, i64 1 %.pre139 = load i32, ptr %arrayidx37.1.phi.trans.insert, align 4, !tbaa !5 %arrayidx37.2.phi.trans.insert = getelementptr inbounds i32, ptr %S, i64 2 %.pre140 = load i32, ptr %arrayidx37.2.phi.trans.insert, align 4, !tbaa !5 %arrayidx37.3.phi.trans.insert = getelementptr inbounds i32, ptr %S, i64 4 %.pre141 = load i32, ptr %arrayidx37.3.phi.trans.insert, align 4, !tbaa !5 %arrayidx37.4.phi.trans.insert = getelementptr inbounds i32, ptr %S, i64 3 %.pre142 = load i32, ptr %arrayidx37.4.phi.trans.insert, align 4, !tbaa !5 %arrayidx37.5.phi.trans.insert = getelementptr inbounds i32, ptr %S, i64 5 %.pre143 = load i32, ptr %arrayidx37.5.phi.trans.insert, align 4, !tbaa !5 br label %for.cond1.preheader for.cond1.preheader: ; preds = %entry, %for.cond1.3 %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.cond1.3 ] %arrayidx16 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv %0 = load i32, ptr %arrayidx16, align 8, !tbaa !5 %sub18 = add nsw i32 %0, -1 %idxprom19 = sext i32 %sub18 to i64 %arrayidx20 = getelementptr inbounds i32, ptr %T, i64 %idxprom19 %1 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %arrayidx24 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv, i64 5 %2 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %sub25 = add nsw i32 %2, -1 %idxprom26 = sext i32 %sub25 to i64 %arrayidx27 = getelementptr inbounds i32, ptr %T, i64 %idxprom26 %3 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %arrayidx9 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv, i64 1 %4 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %sub = add nsw i32 %4, -1 %idxprom10 = sext i32 %sub to i64 %arrayidx11 = getelementptr inbounds i32, ptr %T, i64 %idxprom10 %5 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %arrayidx9.1 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv, i64 2 %6 = load i32, ptr %arrayidx9.1, align 8, !tbaa !5 %sub.1 = add nsw i32 %6, -1 %idxprom10.1 = sext i32 %sub.1 to i64 %arrayidx11.1 = getelementptr inbounds i32, ptr %T, i64 %idxprom10.1 %7 = load i32, ptr %arrayidx11.1, align 4, !tbaa !5 %arrayidx9.2 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv, i64 3 %8 = load i32, ptr %arrayidx9.2, align 4, !tbaa !5 %sub.2 = add nsw i32 %8, -1 %idxprom10.2 = sext i32 %sub.2 to i64 %arrayidx11.2 = getelementptr inbounds i32, ptr %T, i64 %idxprom10.2 %9 = load i32, ptr %arrayidx11.2, align 4, !tbaa !5 %arrayidx9.3 = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv, i64 4 %10 = load i32, ptr %arrayidx9.3, align 8, !tbaa !5 %sub.3 = add nsw i32 %10, -1 %idxprom10.3 = sext i32 %sub.3 to i64 %arrayidx11.3 = getelementptr inbounds i32, ptr %T, i64 %idxprom10.3 %11 = load i32, ptr %arrayidx11.3, align 4, !tbaa !5 %cmp40 = icmp eq i32 %.pre, %1 %add41 = zext i1 %cmp40 to i32 %cmp40.1 = icmp eq i32 %.pre139, %5 %add41.1 = zext i1 %cmp40.1 to i32 %spec.select.1 = add nuw nsw i32 %add41, %add41.1 %cmp40.2 = icmp eq i32 %.pre140, %7 %add41.2 = zext i1 %cmp40.2 to i32 %spec.select.2 = add nuw nsw i32 %spec.select.1, %add41.2 %cmp40.3 = icmp eq i32 %.pre141, %9 %add41.3 = zext i1 %cmp40.3 to i32 %spec.select.3 = add nuw nsw i32 %spec.select.2, %add41.3 %cmp40.4 = icmp eq i32 %.pre142, %11 %add41.4 = zext i1 %cmp40.4 to i32 %spec.select.4 = add nuw nsw i32 %spec.select.3, %add41.4 %cmp40.5 = icmp eq i32 %.pre143, %3 %add41.5 = zext i1 %cmp40.5 to i32 %spec.select.5 = add nuw nsw i32 %spec.select.4, %add41.5 %cmp45 = icmp eq i32 %spec.select.5, 6 br i1 %cmp45, label %for.end56, label %for.cond1 for.cond1: ; preds = %for.cond1.preheader %cmp40.1.1 = icmp eq i32 %.pre139, %7 %add41.1.1 = zext i1 %cmp40.1.1 to i32 %spec.select.1.1 = add nuw nsw i32 %add41, %add41.1.1 %cmp40.2.1 = icmp eq i32 %.pre140, %9 %add41.2.1 = zext i1 %cmp40.2.1 to i32 %spec.select.2.1 = add nuw nsw i32 %spec.select.1.1, %add41.2.1 %cmp40.3.1 = icmp eq i32 %.pre141, %11 %add41.3.1 = zext i1 %cmp40.3.1 to i32 %spec.select.3.1 = add nuw nsw i32 %spec.select.2.1, %add41.3.1 %cmp40.4.1 = icmp eq i32 %.pre142, %5 %add41.4.1 = zext i1 %cmp40.4.1 to i32 %spec.select.4.1 = add nuw nsw i32 %spec.select.3.1, %add41.4.1 %spec.select.5.1 = add nuw nsw i32 %spec.select.4.1, %add41.5 %cmp45.1 = icmp eq i32 %spec.select.5.1, 6 br i1 %cmp45.1, label %for.end56, label %for.cond1.1 for.cond1.1: ; preds = %for.cond1 %cmp40.1.2 = icmp eq i32 %.pre139, %9 %add41.1.2 = zext i1 %cmp40.1.2 to i32 %spec.select.1.2 = add nuw nsw i32 %add41, %add41.1.2 %cmp40.2.2 = icmp eq i32 %.pre140, %11 %add41.2.2 = zext i1 %cmp40.2.2 to i32 %spec.select.2.2 = add nuw nsw i32 %spec.select.1.2, %add41.2.2 %cmp40.3.2 = icmp eq i32 %.pre141, %5 %add41.3.2 = zext i1 %cmp40.3.2 to i32 %spec.select.3.2 = add nuw nsw i32 %spec.select.2.2, %add41.3.2 %cmp40.4.2 = icmp eq i32 %.pre142, %7 %add41.4.2 = zext i1 %cmp40.4.2 to i32 %spec.select.4.2 = add nuw nsw i32 %spec.select.3.2, %add41.4.2 %spec.select.5.2 = add nuw nsw i32 %spec.select.4.2, %add41.5 %cmp45.2 = icmp eq i32 %spec.select.5.2, 6 br i1 %cmp45.2, label %for.end56, label %for.cond1.2 for.cond1.2: ; preds = %for.cond1.1 %cmp40.1.3 = icmp eq i32 %.pre139, %11 %add41.1.3 = zext i1 %cmp40.1.3 to i32 %spec.select.1.3 = add nuw nsw i32 %add41, %add41.1.3 %cmp40.2.3 = icmp eq i32 %.pre140, %5 %add41.2.3 = zext i1 %cmp40.2.3 to i32 %spec.select.2.3 = add nuw nsw i32 %spec.select.1.3, %add41.2.3 %cmp40.3.3 = icmp eq i32 %.pre141, %7 %add41.3.3 = zext i1 %cmp40.3.3 to i32 %spec.select.3.3 = add nuw nsw i32 %spec.select.2.3, %add41.3.3 %cmp40.4.3 = icmp eq i32 %.pre142, %9 %add41.4.3 = zext i1 %cmp40.4.3 to i32 %spec.select.4.3 = add nuw nsw i32 %spec.select.3.3, %add41.4.3 %spec.select.5.3 = add nuw nsw i32 %spec.select.4.3, %add41.5 %cmp45.3 = icmp eq i32 %spec.select.5.3, 6 br i1 %cmp45.3, label %for.end56, label %for.cond1.3 for.cond1.3: ; preds = %for.cond1.2 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 6 br i1 %exitcond.not, label %for.end56, label %for.cond1.preheader, !llvm.loop !9 for.end56: ; preds = %for.cond1.3, %for.cond1.preheader, %for.cond1, %for.cond1.1, %for.cond1.2 %12 = phi i32 [ 1, %for.cond1.2 ], [ 1, %for.cond1.1 ], [ 1, %for.cond1 ], [ 1, %for.cond1.preheader ], [ 0, %for.cond1.3 ] ret i32 %12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 %D = alloca [101 x [6 x i32]], align 16 %t = alloca [6 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 2424, ptr nonnull %D) #6 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %t) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %D) %arrayidx1.1 = getelementptr inbounds [6 x i32], ptr %D, i64 0, i64 1 %call2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1.1) %arrayidx1.2 = getelementptr inbounds [6 x i32], ptr %D, i64 0, i64 2 %call2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1.2) %arrayidx1.3 = getelementptr inbounds [6 x i32], ptr %D, i64 0, i64 3 %call2.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1.3) %arrayidx1.4 = getelementptr inbounds [6 x i32], ptr %D, i64 0, i64 4 %call2.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1.4) %arrayidx1.5 = getelementptr inbounds [6 x i32], ptr %D, i64 0, i64 5 %call2.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1.5) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp487 = icmp sgt i32 %0, 1 br i1 %cmp487, label %for.cond6.preheader, label %for.cond20.preheader for.cond6.preheader: ; preds = %entry, %for.cond6.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond6.preheader ], [ 1, %entry ] %arrayidx12 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 0 %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12) %arrayidx12.1 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 1 %call13.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12.1) %arrayidx12.2 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 2 %call13.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12.2) %arrayidx12.3 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 3 %call13.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12.3) %arrayidx12.4 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 4 %call13.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12.4) %arrayidx12.5 = getelementptr inbounds [101 x [6 x i32]], ptr %D, i64 0, i64 %indvars.iv, i64 5 %call13.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx12.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp4 = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp4, label %for.cond6.preheader, label %for.cond20.preheader, !llvm.loop !11 for.cond20.preheader: ; preds = %for.cond6.preheader, %entry %.lcssa = phi i32 [ %0, %entry ], [ %1, %for.cond6.preheader ] %cmp2195 = icmp sgt i32 %.lcssa, 0 br i1 %cmp2195, label %for.body22.lr.ph, label %if.end for.body22.lr.ph: ; preds = %for.cond20.preheader %wide.trip.count = zext i32 %.lcssa to i64 %invariant.gep = getelementptr inbounds i8, ptr %D, i64 24 br label %for.body22 for.cond20.loopexit: ; preds = %Det.exit, %for.body22 %c.1.lcssa = phi i32 [ %c.097, %for.body22 ], [ %add52, %Det.exit ] %exitcond115.not = icmp eq i64 %indvar.next, %wide.trip.count br i1 %exitcond115.not, label %for.end58, label %for.body22, !llvm.loop !12 for.body22: ; preds = %for.body22.lr.ph, %for.cond20.loopexit %indvars.iv112.in = phi i32 [ %.lcssa, %for.body22.lr.ph ], [ %indvars.iv112, %for.cond20.loopexit ] %indvar = phi i64 [ 0, %for.body22.lr.ph ], [ %indvar.next, %for.cond20.loopexit ] %c.097 = phi i32 [ 0, %for.body22.lr.ph ], [ %c.1.lcssa, %for.cond20.loopexit ] %indvars.iv112 = add i32 %indvars.iv112.in, -1 %indvar.next = add nuw nsw i64 %indvar, 1 %indvars = trunc i64 %indvar.next to i32 %cmp2491 = icmp sgt i32 %.lcssa, %indvars br i1 %cmp2491, label %for.cond26.preheader.lr.ph, label %for.cond20.loopexit for.cond26.preheader.lr.ph: ; preds = %for.body22 %3 = mul nuw nsw i64 %indvar, 24 %scevgep = getelementptr i8, ptr %D, i64 %3 %s.sroa.0.0.copyload.pre = load i32, ptr %scevgep, align 8, !tbaa !5 %s.sroa.4.0.scevgep.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %scevgep, i64 4 %s.sroa.4.0.copyload.pre = load i32, ptr %s.sroa.4.0.scevgep.sroa_idx.phi.trans.insert, align 4, !tbaa !5 %s.sroa.5.0.scevgep.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %scevgep, i64 8 %s.sroa.5.0.copyload.pre = load i32, ptr %s.sroa.5.0.scevgep.sroa_idx.phi.trans.insert, align 8, !tbaa !5 %s.sroa.6.0.scevgep.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %scevgep, i64 12 %s.sroa.6.0.copyload.pre = load i32, ptr %s.sroa.6.0.scevgep.sroa_idx.phi.trans.insert, align 4, !tbaa !5 %s.sroa.7.0.scevgep.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %scevgep, i64 16 %s.sroa.7.0.copyload.pre = load i32, ptr %s.sroa.7.0.scevgep.sroa_idx.phi.trans.insert, align 8, !tbaa !5 %s.sroa.8.0.scevgep.sroa_idx.phi.trans.insert = getelementptr inbounds i8, ptr %scevgep, i64 20 %s.sroa.8.0.copyload.pre = load i32, ptr %s.sroa.8.0.scevgep.sroa_idx.phi.trans.insert, align 4, !tbaa !5 %gep = getelementptr i8, ptr %invariant.gep, i64 %3 br label %for.cond26.preheader for.cond26.preheader: ; preds = %for.cond26.preheader.lr.ph, %Det.exit %indvar106 = phi i64 [ 0, %for.cond26.preheader.lr.ph ], [ %indvar.next107, %Det.exit ] %c.193 = phi i32 [ %c.097, %for.cond26.preheader.lr.ph ], [ %add52, %Det.exit ] %4 = mul nuw nsw i64 %indvar106, 24 %scevgep108 = getelementptr i8, ptr %gep, i64 %4 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %t, ptr noundef nonnull align 8 dereferenceable(24) %scevgep108, i64 24, i1 false), !tbaa !5 br label %for.cond1.preheader.i for.cond1.preheader.i: ; preds = %for.cond1.3.i, %for.cond26.preheader %indvars.iv.i = phi i64 [ 0, %for.cond26.preheader ], [ %indvars.iv.next.i, %for.cond1.3.i ] %arrayidx16.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i %5 = load i32, ptr %arrayidx16.i, align 8, !tbaa !5 %sub18.i = add nsw i32 %5, -1 %idxprom19.i = sext i32 %sub18.i to i64 %arrayidx20.i = getelementptr inbounds i32, ptr %t, i64 %idxprom19.i %6 = load i32, ptr %arrayidx20.i, align 4, !tbaa !5 %arrayidx24.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i, i64 5 %7 = load i32, ptr %arrayidx24.i, align 4, !tbaa !5 %sub25.i = add nsw i32 %7, -1 %idxprom26.i = sext i32 %sub25.i to i64 %arrayidx27.i = getelementptr inbounds i32, ptr %t, i64 %idxprom26.i %8 = load i32, ptr %arrayidx27.i, align 4, !tbaa !5 %arrayidx9.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i, i64 1 %9 = load i32, ptr %arrayidx9.i, align 4, !tbaa !5 %sub.i = add nsw i32 %9, -1 %idxprom10.i = sext i32 %sub.i to i64 %arrayidx11.i = getelementptr inbounds i32, ptr %t, i64 %idxprom10.i %10 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 %arrayidx9.1.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i, i64 2 %11 = load i32, ptr %arrayidx9.1.i, align 8, !tbaa !5 %sub.1.i = add nsw i32 %11, -1 %idxprom10.1.i = sext i32 %sub.1.i to i64 %arrayidx11.1.i = getelementptr inbounds i32, ptr %t, i64 %idxprom10.1.i %12 = load i32, ptr %arrayidx11.1.i, align 4, !tbaa !5 %arrayidx9.2.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i, i64 3 %13 = load i32, ptr %arrayidx9.2.i, align 4, !tbaa !5 %sub.2.i = add nsw i32 %13, -1 %idxprom10.2.i = sext i32 %sub.2.i to i64 %arrayidx11.2.i = getelementptr inbounds i32, ptr %t, i64 %idxprom10.2.i %14 = load i32, ptr %arrayidx11.2.i, align 4, !tbaa !5 %arrayidx9.3.i = getelementptr inbounds [6 x [6 x i32]], ptr @__const.Det.Dice, i64 0, i64 %indvars.iv.i, i64 4 %15 = load i32, ptr %arrayidx9.3.i, align 8, !tbaa !5 %sub.3.i = add nsw i32 %15, -1 %idxprom10.3.i = sext i32 %sub.3.i to i64 %arrayidx11.3.i = getelementptr inbounds i32, ptr %t, i64 %idxprom10.3.i %16 = load i32, ptr %arrayidx11.3.i, align 4, !tbaa !5 %cmp40.i = icmp eq i32 %s.sroa.0.0.copyload.pre, %6 %add41.i = zext i1 %cmp40.i to i32 %cmp40.1.i = icmp eq i32 %s.sroa.4.0.copyload.pre, %10 %add41.1.i = zext i1 %cmp40.1.i to i32 %cmp40.2.i = icmp eq i32 %s.sroa.5.0.copyload.pre, %12 %add41.2.i = zext i1 %cmp40.2.i to i32 %cmp40.3.i = icmp eq i32 %s.sroa.7.0.copyload.pre, %14 %add41.3.i = zext i1 %cmp40.3.i to i32 %cmp40.4.i = icmp eq i32 %s.sroa.6.0.copyload.pre, %16 %add41.4.i = zext i1 %cmp40.4.i to i32 %cmp40.5.i = icmp eq i32 %s.sroa.8.0.copyload.pre, %8 %add41.5.i = zext i1 %cmp40.5.i to i32 %spec.select.1.i = add nuw nsw i32 %add41.5.i, %add41.i %spec.select.2.i = add nuw nsw i32 %spec.select.1.i, %add41.1.i %spec.select.3.i = add nuw nsw i32 %spec.select.2.i, %add41.2.i %spec.select.4.i = add nuw nsw i32 %spec.select.3.i, %add41.3.i %spec.select.5.i = add nuw nsw i32 %spec.select.4.i, %add41.4.i %cmp45.i = icmp eq i32 %spec.select.5.i, 6 br i1 %cmp45.i, label %Det.exit, label %for.cond1.i for.cond1.i: ; preds = %for.cond1.preheader.i %cmp40.1.1.i = icmp eq i32 %s.sroa.4.0.copyload.pre, %12 %add41.1.1.i = zext i1 %cmp40.1.1.i to i32 %cmp40.2.1.i = icmp eq i32 %s.sroa.5.0.copyload.pre, %14 %add41.2.1.i = zext i1 %cmp40.2.1.i to i32 %cmp40.3.1.i = icmp eq i32 %s.sroa.7.0.copyload.pre, %16 %add41.3.1.i = zext i1 %cmp40.3.1.i to i32 %cmp40.4.1.i = icmp eq i32 %s.sroa.6.0.copyload.pre, %10 %add41.4.1.i = zext i1 %cmp40.4.1.i to i32 %spec.select.2.1.i = add nuw nsw i32 %spec.select.1.i, %add41.4.1.i %spec.select.3.1.i = add nuw nsw i32 %spec.select.2.1.i, %add41.1.1.i %spec.select.4.1.i = add nuw nsw i32 %spec.select.3.1.i, %add41.2.1.i %spec.select.5.1.i = add nuw nsw i32 %spec.select.4.1.i, %add41.3.1.i %cmp45.1.i = icmp eq i32 %spec.select.5.1.i, 6 br i1 %cmp45.1.i, label %Det.exit, label %for.cond1.1.i for.cond1.1.i: ; preds = %for.cond1.i %cmp40.1.2.i = icmp eq i32 %s.sroa.4.0.copyload.pre, %14 %add41.1.2.i = zext i1 %cmp40.1.2.i to i32 %cmp40.2.2.i = icmp eq i32 %s.sroa.5.0.copyload.pre, %16 %add41.2.2.i = zext i1 %cmp40.2.2.i to i32 %cmp40.3.2.i = icmp eq i32 %s.sroa.7.0.copyload.pre, %10 %add41.3.2.i = zext i1 %cmp40.3.2.i to i32 %cmp40.4.2.i = icmp eq i32 %s.sroa.6.0.copyload.pre, %12 %add41.4.2.i = zext i1 %cmp40.4.2.i to i32 %spec.select.2.2.i = add nuw nsw i32 %spec.select.1.i, %add41.3.2.i %spec.select.3.2.i = add nuw nsw i32 %spec.select.2.2.i, %add41.4.2.i %spec.select.4.2.i = add nuw nsw i32 %spec.select.3.2.i, %add41.1.2.i %spec.select.5.2.i = add nuw nsw i32 %spec.select.4.2.i, %add41.2.2.i %cmp45.2.i = icmp eq i32 %spec.select.5.2.i, 6 br i1 %cmp45.2.i, label %Det.exit, label %for.cond1.2.i for.cond1.2.i: ; preds = %for.cond1.1.i %cmp40.1.3.i = icmp eq i32 %s.sroa.4.0.copyload.pre, %16 %add41.1.3.i = zext i1 %cmp40.1.3.i to i32 %cmp40.2.3.i = icmp eq i32 %s.sroa.5.0.copyload.pre, %10 %add41.2.3.i = zext i1 %cmp40.2.3.i to i32 %cmp40.3.3.i = icmp eq i32 %s.sroa.7.0.copyload.pre, %12 %add41.3.3.i = zext i1 %cmp40.3.3.i to i32 %cmp40.4.3.i = icmp eq i32 %s.sroa.6.0.copyload.pre, %14 %add41.4.3.i = zext i1 %cmp40.4.3.i to i32 %spec.select.2.3.i = add nuw nsw i32 %spec.select.1.i, %add41.2.3.i %spec.select.3.3.i = add nuw nsw i32 %spec.select.2.3.i, %add41.3.3.i %spec.select.4.3.i = add nuw nsw i32 %spec.select.3.3.i, %add41.4.3.i %spec.select.5.3.i = add nuw nsw i32 %spec.select.4.3.i, %add41.1.3.i %cmp45.3.i = icmp eq i32 %spec.select.5.3.i, 6 br i1 %cmp45.3.i, label %Det.exit, label %for.cond1.3.i for.cond1.3.i: ; preds = %for.cond1.2.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, 6 br i1 %exitcond.not.i, label %Det.exit, label %for.cond1.preheader.i, !llvm.loop !9 Det.exit: ; preds = %for.cond1.preheader.i, %for.cond1.i, %for.cond1.1.i, %for.cond1.2.i, %for.cond1.3.i %17 = phi i32 [ 1, %for.cond1.2.i ], [ 1, %for.cond1.1.i ], [ 1, %for.cond1.i ], [ 1, %for.cond1.preheader.i ], [ 0, %for.cond1.3.i ] %add52 = add nsw i32 %17, %c.193 %indvar.next107 = add nuw nsw i64 %indvar106, 1 %lftr.wideiv = trunc i64 %indvar.next107 to i32 %exitcond.not = icmp eq i32 %indvars.iv112, %lftr.wideiv br i1 %exitcond.not, label %for.cond20.loopexit, label %for.cond26.preheader, !llvm.loop !13 for.end58: ; preds = %for.cond20.loopexit %18 = icmp eq i32 %c.1.lcssa, 0 %spec.select = select i1 %18, ptr @str.3, ptr @str br label %if.end if.end: ; preds = %for.end58, %for.cond20.preheader %str.sink = phi ptr [ @str.3, %for.cond20.preheader ], [ %spec.select, %for.end58 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %t) #6 call void @llvm.lifetime.end.p0(i64 2424, ptr nonnull %D) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> //#define DEBUG typedef struct dice{ int TOP ; int FRONT ; int RIGHT ; int LEFT ; int BACK ; int BOTTOM ; }DICE; void dicescan(DICE *); //????????????????????????????????? void rotateN(DICE *); //N?????¢ void rotateS(DICE *); //S?????¢ void rotateE(DICE *); //E?????¢ void rotateW(DICE *); //W?????¢ void rotateCW(DICE *); //TOP-BOTTOM????????¨??????????¨???????????????¢ int compare (DICE * , DICE *); //?????????????????????????????????????????????????????¢??° int main(void){ int n = 0 ; //?????????????????????????????? int i = 0 ; //???????????° int j = 0 ; scanf("%d", &n); DICE DICEcase[n]; //n??????????´??????????DICE?????????????????£?¨? /*n??????????????????????????????*/ for(i = 0 ; i < n ; i++){ dicescan(&DICEcase[i]); /*#ifdef DEBUG printf("%d??????????????????\n",i+1); showdice(&DICEcase[i]); #endif*/ } for( i = 0 ; i < n ; i++){ for( j = i+1 ; j < n ; j++){ if(compare(&DICEcase[i],&DICEcase[j])){ //????????????????????????????????? printf("No\n"); return 0; } } } printf("Yes\n"); return 0; } /*compare??¢??°???????????????????????????????????????????????????????????????????????????????????????????????????*/ /*????????????1??????????????°0?????????*/ int compare (DICE *DICE1 , DICE *DICE2){ int i = 0 ; //???????????° /*DICE1????????¬??¨???????????¢?????????*/ /*??????DICE1.TOP???DICE2????????¢???????????¢?????\??????????????????????????¢??????*/ if(DICE1 -> TOP == DICE2 -> TOP){ /*nop*/ } else if(DICE1->TOP == DICE2->FRONT){ rotateN(DICE2); //?????¢??????N?????¢ } else if(DICE1->TOP == DICE2->RIGHT){ rotateW(DICE2); //?????¢??????W?????¢ } else if(DICE1->TOP == DICE2->LEFT){ rotateE(DICE2); //?????¢??????E?????¢ } else if(DICE1->TOP == DICE2->BACK){ rotateS(DICE2); //?????¢??????S?????¢ } else if(DICE1->TOP == DICE2->BOTTOM ){ rotateN(DICE2); rotateN(DICE2); //?????¢??????N?????¢2??? } else{ return 0 ; //???????????????????????°?????´????????????????????¨???????????? } /*?????¢????????????*/ if( DICE1->BOTTOM != DICE2->BOTTOM ){ return 0 ; //?????¢????????´??????????????°?????????????????¨?¢???? } /*?????¨?????¶??????TOP??¨BOTTOM????????´*/ while(1){ if( DICE1->FRONT == DICE2->FRONT){ //FRONT????????´??????????¬??????????????????? break; } else{ rotateCW(DICE2); //?????´??????????????°CW?????¢????????£???????????? i++; } if( i > 3){ //4????????????????????´??????????????° return 0; //DICE1.FRONT??????????????????????????§?????????????????¨?¢???? } } /*?????¨?????¶??????TOP???FRONT???BOTTOM????????´*/ /*??????????????????????????? Dice I ??¨????????¨?¨????????????????????????¨????????¢?????°????????°??????????????¨????????????(?????????????????¨??????)*/ /*????????\????????????????????¢?????????????????????????????§??????????????¢?????°??????????????????*/ if( (DICE1->RIGHT == DICE2->RIGHT) && (DICE1->LEFT == DICE2->LEFT) && (DICE1->BACK == DICE2->BACK) ){ return 1; } else{ return 0; } /*???????????§??\???????????£????????¨??????*/ printf("error\n"); return 0; }//compare??¢??°???????????? void rotateN(DICE *rotate){ int tmp = 0; tmp = rotate -> BACK ; rotate -> BACK = rotate -> TOP ; rotate -> TOP = rotate -> FRONT ; rotate -> FRONT = rotate -> BOTTOM ; rotate -> BOTTOM = tmp ; } void rotateS(DICE *rotate){ /*N?????¢???3???*/ rotateN(rotate); rotateN(rotate); rotateN(rotate); } void rotateE(DICE *rotate){ int tmp = 0; tmp = rotate -> TOP ; rotate -> TOP = rotate -> LEFT ; rotate -> LEFT = rotate -> BOTTOM ; rotate -> BOTTOM = rotate -> RIGHT ; rotate -> RIGHT = tmp ; } void rotateW(DICE *rotate){ /*E?????¢???3???*/ rotateE(rotate); rotateE(rotate); rotateE(rotate); } void rotateCW(DICE *rotate){ int tmp = 0; tmp = rotate -> BACK ; rotate -> BACK = rotate -> LEFT; rotate -> LEFT = rotate -> FRONT ; rotate -> FRONT = rotate -> RIGHT; rotate -> RIGHT = tmp ; } void dicescan(DICE *scan){ scanf("%d",&scan -> TOP); scanf("%d",&scan -> FRONT); scanf("%d",&scan -> RIGHT); scanf("%d",&scan -> LEFT); scanf("%d",&scan -> BACK); scanf("%d",&scan -> BOTTOM); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135240/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135240/source.c" target datalayout = "e-m:e-p270: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.dice = type { i32, i32, i32, i32, i32, i32 } @.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) #6 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 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca %struct.dice, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp32 = icmp sgt i32 %3, 0 br i1 %cmp32, label %for.body, label %cleanup for.cond1.preheader: ; preds = %for.body %cmp236 = icmp sgt i32 %5, 0 br i1 %cmp236, label %for.body3.preheader, label %cleanup for.body3.preheader: ; preds = %for.cond1.preheader %4 = zext i32 %5 to i64 %wide.trip.count48 = zext i32 %5 to i64 br label %for.body3 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %FRONT.i = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv, i32 1 %call1.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %FRONT.i) %RIGHT.i = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv, i32 2 %call2.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %RIGHT.i) %LEFT.i = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv, i32 3 %call3.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %LEFT.i) %BACK.i = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv, i32 4 %call4.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %BACK.i) %BOTTOM.i = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv, i32 5 %call5.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %BOTTOM.i) %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.cond1.preheader, !llvm.loop !9 for.cond1.loopexit: ; preds = %for.cond4, %for.body3 %indvars.iv.next41 = add nuw nsw i64 %indvars.iv40, 1 %exitcond49.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count48 br i1 %exitcond49.not, label %cleanup, label %for.body3, !llvm.loop !11 for.body3: ; preds = %for.body3.preheader, %for.cond1.loopexit %indvars.iv45 = phi i64 [ 0, %for.body3.preheader ], [ %indvars.iv.next46, %for.cond1.loopexit ] %indvars.iv40 = phi i64 [ 1, %for.body3.preheader ], [ %indvars.iv.next41, %for.cond1.loopexit ] %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1 %cmp534 = icmp ult i64 %indvars.iv.next46, %4 br i1 %cmp534, label %for.body6.lr.ph, label %for.cond1.loopexit for.body6.lr.ph: ; preds = %for.body3 %arrayidx8 = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv45 br label %for.body6 for.cond4: ; preds = %for.body6 %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1 %exitcond.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count48 br i1 %exitcond.not, label %for.cond1.loopexit, label %for.body6, !llvm.loop !12 for.body6: ; preds = %for.body6.lr.ph, %for.cond4 %indvars.iv42 = phi i64 [ %indvars.iv40, %for.body6.lr.ph ], [ %indvars.iv.next43, %for.cond4 ] %arrayidx10 = getelementptr inbounds %struct.dice, ptr %vla, i64 %indvars.iv42 %call11 = call i32 @compare(ptr noundef nonnull %arrayidx8, ptr noundef nonnull %arrayidx10), !range !13 %tobool.not = icmp eq i32 %call11, 0 br i1 %tobool.not, label %for.cond4, label %cleanup cleanup: ; preds = %for.cond1.loopexit, %for.body6, %for.cond1.preheader, %entry %str.sink = phi ptr [ @str, %entry ], [ @str, %for.cond1.preheader ], [ @str.3, %for.body6 ], [ @str, %for.cond1.loopexit ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @dicescan(ptr noundef %scan) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %scan) %FRONT = getelementptr inbounds %struct.dice, ptr %scan, i64 0, i32 1 %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %FRONT) %RIGHT = getelementptr inbounds %struct.dice, ptr %scan, i64 0, i32 2 %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %RIGHT) %LEFT = getelementptr inbounds %struct.dice, ptr %scan, i64 0, i32 3 %call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %LEFT) %BACK = getelementptr inbounds %struct.dice, ptr %scan, i64 0, i32 4 %call4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %BACK) %BOTTOM = getelementptr inbounds %struct.dice, ptr %scan, i64 0, i32 5 %call5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %BOTTOM) ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %DICE1, ptr nocapture noundef %DICE2) local_unnamed_addr #4 { entry: %0 = load i32, ptr %DICE1, align 4, !tbaa !14 %1 = load i32, ptr %DICE2, align 4, !tbaa !14 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %entry.if.end26_crit_edge, label %if.else entry.if.end26_crit_edge: ; preds = %entry %BOTTOM28.phi.trans.insert = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 5 %.pre = load i32, ptr %BOTTOM28.phi.trans.insert, align 4, !tbaa !16 br label %if.end26 if.else: ; preds = %entry %FRONT = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 1 %2 = load i32, ptr %FRONT, align 4, !tbaa !17 %cmp3 = icmp eq i32 %0, %2 br i1 %cmp3, label %if.then4, label %if.else5 if.then4: ; preds = %if.else %BACK.i = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 4 %3 = load i32, ptr %BACK.i, align 4, !tbaa !18 store i32 %1, ptr %BACK.i, align 4, !tbaa !18 store i32 %0, ptr %DICE2, align 4, !tbaa !14 %BOTTOM.i = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 5 %4 = load i32, ptr %BOTTOM.i, align 4, !tbaa !16 store i32 %4, ptr %FRONT, align 4, !tbaa !17 store i32 %3, ptr %BOTTOM.i, align 4, !tbaa !16 br label %if.end26 if.else5: ; preds = %if.else %RIGHT = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 2 %5 = load i32, ptr %RIGHT, align 4, !tbaa !19 %cmp7 = icmp eq i32 %0, %5 %LEFT.i.i = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 3 %6 = load i32, ptr %LEFT.i.i, align 4, !tbaa !20 br i1 %cmp7, label %if.then8, label %if.else9 if.then8: ; preds = %if.else5 %BOTTOM.i.i = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 5 %7 = load i32, ptr %BOTTOM.i.i, align 4, !tbaa !16 store i32 %0, ptr %DICE2, align 4, !tbaa !14 store i32 %1, ptr %LEFT.i.i, align 4, !tbaa !20 store i32 %6, ptr %BOTTOM.i.i, align 4, !tbaa !16 store i32 %7, ptr %RIGHT, align 4, !tbaa !19 br label %if.end26 if.else9: ; preds = %if.else5 %cmp11 = icmp eq i32 %0, %6 br i1 %cmp11, label %if.then12, label %if.else13 if.then12: ; preds = %if.else9 store i32 %0, ptr %DICE2, align 4, !tbaa !14 %BOTTOM.i81 = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 5 %8 = load i32, ptr %BOTTOM.i81, align 4, !tbaa !16 store i32 %8, ptr %LEFT.i.i, align 4, !tbaa !20 store i32 %5, ptr %BOTTOM.i81, align 4, !tbaa !16 store i32 %1, ptr %RIGHT, align 4, !tbaa !19 br label %if.end26 if.else13: ; preds = %if.else9 %BACK = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 4 %9 = load i32, ptr %BACK, align 4, !tbaa !18 %cmp15 = icmp eq i32 %0, %9 %BOTTOM.i.i82 = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 5 %10 = load i32, ptr %BOTTOM.i.i82, align 4, !tbaa !16 br i1 %cmp15, label %if.then16, label %if.else17 if.then16: ; preds = %if.else13 store i32 %10, ptr %BACK, align 4, !tbaa !18 store i32 %0, ptr %DICE2, align 4, !tbaa !14 store i32 %1, ptr %FRONT, align 4, !tbaa !17 store i32 %2, ptr %BOTTOM.i.i82, align 4, !tbaa !16 br label %if.end26 if.else17: ; preds = %if.else13 %cmp19 = icmp eq i32 %0, %10 br i1 %cmp19, label %if.then20, label %cleanup if.then20: ; preds = %if.else17 store i32 %2, ptr %BACK, align 4, !tbaa !18 store i32 %0, ptr %DICE2, align 4, !tbaa !14 store i32 %9, ptr %FRONT, align 4, !tbaa !17 store i32 %1, ptr %BOTTOM.i.i82, align 4, !tbaa !16 br label %if.end26 if.end26: ; preds = %entry.if.end26_crit_edge, %if.then4, %if.then12, %if.then20, %if.then16, %if.then8 %11 = phi i32 [ %.pre, %entry.if.end26_crit_edge ], [ %3, %if.then4 ], [ %5, %if.then12 ], [ %1, %if.then20 ], [ %2, %if.then16 ], [ %6, %if.then8 ] %BOTTOM27 = getelementptr inbounds %struct.dice, ptr %DICE1, i64 0, i32 5 %12 = load i32, ptr %BOTTOM27, align 4, !tbaa !16 %cmp29.not = icmp eq i32 %12, %11 br i1 %cmp29.not, label %while.cond.preheader, label %cleanup while.cond.preheader: ; preds = %if.end26 %FRONT32 = getelementptr inbounds %struct.dice, ptr %DICE1, i64 0, i32 1 %FRONT33 = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 1 %BACK.i89 = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 4 %LEFT.i90 = getelementptr inbounds %struct.dice, ptr %DICE2, i64 0, i32 3 %13 = load i32, ptr %FRONT32, align 4, !tbaa !17 %14 = load <2 x i32>, ptr %FRONT33, align 4, !tbaa !5 %15 = extractelement <2 x i32> %14, i64 0 %cmp34 = icmp eq i32 %13, %15 %16 = extractelement <2 x i32> %14, i64 1 br i1 %cmp34, label %while.end, label %if.else36 if.else36: ; preds = %while.cond.preheader %17 = load <2 x i32>, ptr %LEFT.i90, align 4, !tbaa !5 %18 = extractelement <2 x i32> %17, i64 1 %19 = shufflevector <2 x i32> %14, <2 x i32> %17, <4 x i32> <i32 1, i32 3, i32 0, i32 2> store <4 x i32> %19, ptr %FRONT33, align 4, !tbaa !5 %20 = load i32, ptr %FRONT32, align 4, !tbaa !17 %cmp34.1 = icmp eq i32 %20, %16 br i1 %cmp34.1, label %while.end, label %if.else36.1 if.else36.1: ; preds = %if.else36 %21 = extractelement <2 x i32> %17, i64 0 %22 = shufflevector <2 x i32> %17, <2 x i32> %14, <4 x i32> <i32 1, i32 0, i32 3, i32 2> store <4 x i32> %22, ptr %FRONT33, align 4, !tbaa !5 %23 = load i32, ptr %FRONT32, align 4, !tbaa !17 %cmp34.2 = icmp eq i32 %23, %18 br i1 %cmp34.2, label %while.end, label %if.else36.2 if.else36.2: ; preds = %if.else36.1 %24 = shufflevector <2 x i32> %17, <2 x i32> %14, <4 x i32> <i32 0, i32 2, i32 1, i32 3> store <4 x i32> %24, ptr %FRONT33, align 4, !tbaa !5 %25 = load i32, ptr %FRONT32, align 4, !tbaa !17 %cmp34.3 = icmp eq i32 %25, %21 br i1 %cmp34.3, label %while.end, label %if.else36.3 if.else36.3: ; preds = %if.else36.2 %26 = shufflevector <2 x i32> %14, <2 x i32> %17, <4 x i32> <i32 0, i32 1, i32 2, i32 3> store <4 x i32> %26, ptr %FRONT33, align 4, !tbaa !5 br label %cleanup while.end: ; preds = %if.else36.2, %if.else36.1, %if.else36, %while.cond.preheader %27 = phi i32 [ %15, %if.else36.2 ], [ %21, %if.else36.1 ], [ %18, %if.else36 ], [ %16, %while.cond.preheader ] %RIGHT41 = getelementptr inbounds %struct.dice, ptr %DICE1, i64 0, i32 2 %28 = load i32, ptr %RIGHT41, align 4, !tbaa !19 %cmp43 = icmp eq i32 %28, %27 br i1 %cmp43, label %land.lhs.true, label %if.else52 land.lhs.true: ; preds = %while.end %LEFT44 = getelementptr inbounds %struct.dice, ptr %DICE1, i64 0, i32 3 %29 = load i32, ptr %LEFT44, align 4, !tbaa !20 %30 = load i32, ptr %LEFT.i90, align 4, !tbaa !20 %cmp46 = icmp eq i32 %29, %30 br i1 %cmp46, label %land.lhs.true47, label %if.else52 land.lhs.true47: ; preds = %land.lhs.true %BACK48 = getelementptr inbounds %struct.dice, ptr %DICE1, i64 0, i32 4 %31 = load i32, ptr %BACK48, align 4, !tbaa !18 %32 = load i32, ptr %BACK.i89, align 4, !tbaa !18 %cmp50 = icmp eq i32 %31, %32 br i1 %cmp50, label %cleanup, label %if.else52 if.else52: ; preds = %land.lhs.true47, %land.lhs.true, %while.end br label %cleanup cleanup: ; preds = %if.else36.3, %land.lhs.true47, %if.end26, %if.else17, %if.else52 %retval.0 = phi i32 [ 0, %if.else52 ], [ 0, %if.else17 ], [ 0, %if.end26 ], [ 1, %land.lhs.true47 ], [ 0, %if.else36.3 ] ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotateN(ptr nocapture noundef %rotate) local_unnamed_addr #4 { entry: %BACK = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 4 %0 = load i32, ptr %BACK, align 4, !tbaa !18 %1 = load i32, ptr %rotate, align 4, !tbaa !14 store i32 %1, ptr %BACK, align 4, !tbaa !18 %FRONT = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 1 %2 = load i32, ptr %FRONT, align 4, !tbaa !17 store i32 %2, ptr %rotate, align 4, !tbaa !14 %BOTTOM = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 5 %3 = load i32, ptr %BOTTOM, align 4, !tbaa !16 store i32 %3, ptr %FRONT, align 4, !tbaa !17 store i32 %0, ptr %BOTTOM, align 4, !tbaa !16 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotateW(ptr nocapture noundef %rotate) local_unnamed_addr #4 { entry: %0 = load i32, ptr %rotate, align 4, !tbaa !14 %LEFT.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 3 %1 = load i32, ptr %LEFT.i, align 4, !tbaa !20 %BOTTOM.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 5 %2 = load i32, ptr %BOTTOM.i, align 4, !tbaa !16 %RIGHT.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 2 %3 = load i32, ptr %RIGHT.i, align 4, !tbaa !19 store i32 %3, ptr %rotate, align 4, !tbaa !14 store i32 %0, ptr %LEFT.i, align 4, !tbaa !20 store i32 %1, ptr %BOTTOM.i, align 4, !tbaa !16 store i32 %2, ptr %RIGHT.i, align 4, !tbaa !19 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotateE(ptr nocapture noundef %rotate) local_unnamed_addr #4 { entry: %0 = load i32, ptr %rotate, align 4, !tbaa !14 %LEFT = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 3 %1 = load i32, ptr %LEFT, align 4, !tbaa !20 store i32 %1, ptr %rotate, align 4, !tbaa !14 %BOTTOM = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 5 %2 = load i32, ptr %BOTTOM, align 4, !tbaa !16 store i32 %2, ptr %LEFT, align 4, !tbaa !20 %RIGHT = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 2 %3 = load i32, ptr %RIGHT, align 4, !tbaa !19 store i32 %3, ptr %BOTTOM, align 4, !tbaa !16 store i32 %0, ptr %RIGHT, align 4, !tbaa !19 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotateS(ptr nocapture noundef %rotate) local_unnamed_addr #4 { entry: %BACK.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 4 %0 = load i32, ptr %BACK.i, align 4, !tbaa !18 %1 = load i32, ptr %rotate, align 4, !tbaa !14 %FRONT.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 1 %2 = load i32, ptr %FRONT.i, align 4, !tbaa !17 %BOTTOM.i = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 5 %3 = load i32, ptr %BOTTOM.i, align 4, !tbaa !16 store i32 %3, ptr %BACK.i, align 4, !tbaa !18 store i32 %0, ptr %rotate, align 4, !tbaa !14 store i32 %1, ptr %FRONT.i, align 4, !tbaa !17 store i32 %2, ptr %BOTTOM.i, align 4, !tbaa !16 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotateCW(ptr nocapture noundef %rotate) local_unnamed_addr #4 { entry: %FRONT = getelementptr inbounds %struct.dice, ptr %rotate, i64 0, i32 1 %0 = load <4 x i32>, ptr %FRONT, align 4, !tbaa !5 %1 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 1, i32 3, i32 0, i32 2> store <4 x i32> %1, ptr %FRONT, align 4, !tbaa !5 ret void } ; 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 nocallback nofree nosync nounwind willreturn } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = !{i32 0, i32 2} !14 = !{!15, !6, i64 0} !15 = !{!"dice", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !6, i64 16, !6, i64 20} !16 = !{!15, !6, i64 20} !17 = !{!15, !6, i64 4} !18 = !{!15, !6, i64 16} !19 = !{!15, !6, i64 8} !20 = !{!15, !6, i64 12}
// // main.c // ITP1_11_D // // Created by k16031kk on 2018/06/03. // Copyright © 2018年 AIT. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, const char * argv[]) { // insert code here... int area[100][6]; int n; scanf("%d", &n); for(int i=0; i<n; i++) { for(int j=0; j<6; j++) { scanf("%d", &area[i][j]); } } int a=0; int flag=0; for(int i=0; i<n; i++) { for(int j=n; j>i; j--) { for(int k=0; k<3; k++) { a=area[i][0]; area[i][0]=area[i][3]; area[i][3]=area[i][5]; area[i][5]=area[i][2]; area[i][2]=a; if(memcmp(area[i], area[j], sizeof(int)*6)==0) { //printf("1\n"); flag=1; break; } for(int l=0; l<3; l++) { a=area[i][0]; area[i][0]=area[i][1]; area[i][1]=area[i][5]; area[i][5]=area[i][4]; area[i][4]=a; if(memcmp(area[i], area[j], sizeof(int)*6)==0) { //printf("2\n"); flag=1; break; } for(int m=0; m<3; m++) { a=area[i][0]; area[i][0]=area[i][4]; area[i][4]=area[i][5]; area[i][5]=area[i][1]; area[i][1]=a; if(memcmp(area[i], area[j], sizeof(int)*6)==0) { //printf("3\n"); flag=1; break; } for(int n=0; n<3; n++) { a=area[i][0]; area[i][0]=area[i][2]; area[i][2]=area[i][5]; area[i][5]=area[i][3]; area[i][3]=a; if(memcmp(area[i], area[j], sizeof(int)*6)==0) { //printf("4\n"); flag=1; break; } } } } } } } if(flag==1) printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135291/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135291/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %area = alloca [100 x [6 x i32]], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 2400, ptr nonnull %area) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp261 = icmp sgt i32 %0, 0 br i1 %cmp261, label %for.cond1.preheader, label %if.else for.cond1.preheader: ; preds = %entry, %for.cond1.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1.preheader ], [ 0, %entry ] %arrayidx6 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 0 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %arrayidx6.1 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 1 %call7.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1) %arrayidx6.2 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 2 %call7.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.2) %arrayidx6.3 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 3 %call7.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.3) %arrayidx6.4 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 4 %call7.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.4) %arrayidx6.5 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv, i64 5 %call7.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond1.preheader, label %for.cond12.preheader, !llvm.loop !9 for.cond12.preheader: ; preds = %for.cond1.preheader %cmp13336 = icmp sgt i32 %1, 0 br i1 %cmp13336, label %for.cond17.preheader.preheader, label %if.else for.cond17.preheader.preheader: ; preds = %for.cond12.preheader %3 = zext i32 %1 to i64 %wide.trip.count = zext i32 %1 to i64 br label %for.cond17.preheader for.cond17.preheader: ; preds = %for.cond17.preheader.preheader, %for.cond.cleanup19 %indvars.iv357 = phi i64 [ 0, %for.cond17.preheader.preheader ], [ %indvars.iv.next358, %for.cond.cleanup19 ] %flag.0337 = phi i32 [ 0, %for.cond17.preheader.preheader ], [ %flag.8, %for.cond.cleanup19 ] %arrayidx26 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357 %arrayidx30 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357, i64 3 %arrayidx36 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357, i64 5 %arrayidx42 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357, i64 2 %arrayidx65 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357, i64 1 %arrayidx77 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv357, i64 4 %arrayidx26.promoted = load i32, ptr %arrayidx26, align 8, !tbaa !5 %arrayidx30.promoted = load i32, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx36.promoted = load i32, ptr %arrayidx36, align 4, !tbaa !5 %arrayidx42.promoted = load i32, ptr %arrayidx42, align 8, !tbaa !5 br label %for.cond21.preheader for.cond.cleanup14: ; preds = %for.cond.cleanup19 %4 = icmp eq i32 %flag.8, 1 br i1 %4, label %if.end197, label %if.else for.cond21.preheader: ; preds = %for.cond17.preheader, %cleanup184 %indvars.iv354 = phi i64 [ %3, %for.cond17.preheader ], [ %indvars.iv.next355, %cleanup184 ] %arrayidx42.promoted300326 = phi i32 [ %arrayidx42.promoted, %for.cond17.preheader ], [ %arrayidx42.promoted300331, %cleanup184 ] %arrayidx36.promoted296322 = phi i32 [ %arrayidx36.promoted, %for.cond17.preheader ], [ %arrayidx36.promoted296323, %cleanup184 ] %arrayidx30.promoted290316 = phi i32 [ %arrayidx30.promoted, %for.cond17.preheader ], [ %arrayidx30.promoted290321, %cleanup184 ] %arrayidx26.promoted286312 = phi i32 [ %arrayidx26.promoted, %for.cond17.preheader ], [ %arrayidx26.promoted286313, %cleanup184 ] %flag.1310 = phi i32 [ %flag.0337, %for.cond17.preheader ], [ %flag.8, %cleanup184 ] %arrayidx52 = getelementptr inbounds [100 x [6 x i32]], ptr %area, i64 0, i64 %indvars.iv354 br label %for.body24 for.cond.cleanup19: ; preds = %cleanup184 %indvars.iv.next358 = add nuw nsw i64 %indvars.iv357, 1 %exitcond360.not = icmp eq i64 %indvars.iv.next358, %wide.trip.count br i1 %exitcond360.not, label %for.cond.cleanup14, label %for.cond17.preheader, !llvm.loop !11 for.body24: ; preds = %for.cond21.preheader, %cleanup180 %arrayidx42.promoted305 = phi i32 [ %arrayidx42.promoted300326, %for.cond21.preheader ], [ %arrayidx42.promoted304, %cleanup180 ] %arrayidx36.promoted299 = phi i32 [ %arrayidx36.promoted296322, %for.cond21.preheader ], [ %arrayidx36.promoted296324, %cleanup180 ] %arrayidx30.promoted295 = phi i32 [ %arrayidx30.promoted290316, %for.cond21.preheader ], [ %arrayidx30.promoted294, %cleanup180 ] %arrayidx26.promoted289 = phi i32 [ %arrayidx26.promoted286312, %for.cond21.preheader ], [ %arrayidx26.promoted286314, %cleanup180 ] %k.0285 = phi i32 [ 0, %for.cond21.preheader ], [ %inc183, %cleanup180 ] %flag.2284 = phi i32 [ %flag.1310, %for.cond21.preheader ], [ %flag.7, %cleanup180 ] store i32 %arrayidx30.promoted295, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx36.promoted299, ptr %arrayidx30, align 4, !tbaa !5 store i32 %arrayidx42.promoted305, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx26.promoted289, ptr %arrayidx42, align 8, !tbaa !5 %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp55 = icmp eq i32 %bcmp, 0 br i1 %cmp55, label %cleanup184, label %for.cond56.preheader for.cond56.preheader: ; preds = %for.body24 %arrayidx65.promoted276 = load i32, ptr %arrayidx65, align 4, !tbaa !5 %arrayidx77.promoted280 = load i32, ptr %arrayidx77, align 8, !tbaa !5 br label %for.body59 for.body59: ; preds = %for.cond56.preheader, %cleanup176 %arrayidx42.promoted300330 = phi i32 [ %arrayidx26.promoted289, %for.cond56.preheader ], [ %arrayidx42.promoted300327, %cleanup176 ] %arrayidx30.promoted290320 = phi i32 [ %arrayidx36.promoted299, %for.cond56.preheader ], [ %arrayidx30.promoted290317, %cleanup176 ] %arrayidx42.promoted301 = phi i32 [ %arrayidx26.promoted289, %for.cond56.preheader ], [ %arrayidx42.promoted302, %cleanup176 ] %arrayidx30.promoted291 = phi i32 [ %arrayidx36.promoted299, %for.cond56.preheader ], [ %arrayidx30.promoted292, %cleanup176 ] %arrayidx77.promoted281 = phi i32 [ %arrayidx77.promoted280, %for.cond56.preheader ], [ %arrayidx36.promoted269.lcssa, %cleanup176 ] %arrayidx36.promoted268279 = phi i32 [ %arrayidx42.promoted305, %for.cond56.preheader ], [ %arrayidx36.promoted296325, %cleanup176 ] %arrayidx65.promoted277 = phi i32 [ %arrayidx65.promoted276, %for.cond56.preheader ], [ %arrayidx26.promoted267.lcssa, %cleanup176 ] %arrayidx26.promoted266275 = phi i32 [ %arrayidx30.promoted295, %for.cond56.preheader ], [ %arrayidx26.promoted286315, %cleanup176 ] %l.0273 = phi i32 [ 0, %for.cond56.preheader ], [ %inc179, %cleanup176 ] %flag.3272 = phi i32 [ %flag.2284, %for.cond56.preheader ], [ %flag.6, %cleanup176 ] store i32 %arrayidx65.promoted277, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx36.promoted268279, ptr %arrayidx65, align 4, !tbaa !5 store i32 %arrayidx77.promoted281, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx26.promoted266275, ptr %arrayidx77, align 8, !tbaa !5 %bcmp257 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp91 = icmp eq i32 %bcmp257, 0 br i1 %cmp91, label %cleanup180, label %for.body97.preheader for.body97.preheader: ; preds = %for.body59 store i32 %arrayidx26.promoted266275, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx77.promoted281, ptr %arrayidx77, align 8, !tbaa !5 store i32 %arrayidx36.promoted268279, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx65.promoted277, ptr %arrayidx65, align 4, !tbaa !5 %bcmp258 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp129 = icmp eq i32 %bcmp258, 0 br i1 %cmp129, label %cleanup176, label %for.body136.preheader for.body136.preheader: ; preds = %for.body97.preheader store i32 %arrayidx42.promoted301, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx36.promoted268279, ptr %arrayidx42, align 8, !tbaa !5 store i32 %arrayidx30.promoted291, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx26.promoted266275, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168 = icmp eq i32 %bcmp259, 0 br i1 %cmp168, label %cleanup, label %for.cond133 for.cond133: ; preds = %for.body136.preheader store i32 %arrayidx36.promoted268279, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx30.promoted291, ptr %arrayidx42, align 8, !tbaa !5 store i32 %arrayidx26.promoted266275, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx42.promoted301, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.1 = icmp eq i32 %bcmp259.1, 0 br i1 %cmp168.1, label %cleanup, label %for.cond133.1 for.cond133.1: ; preds = %for.cond133 store i32 %arrayidx30.promoted291, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx26.promoted266275, ptr %arrayidx42, align 8, !tbaa !5 store i32 %arrayidx42.promoted301, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx36.promoted268279, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.2 = icmp eq i32 %bcmp259.2, 0 %spec.select = select i1 %cmp168.2, i32 1, i32 %flag.3272 br label %cleanup cleanup: ; preds = %for.cond133.1, %for.cond133, %for.body136.preheader %.lcssa343 = phi i32 [ %arrayidx30.promoted291, %for.body136.preheader ], [ %arrayidx26.promoted266275, %for.cond133 ], [ %arrayidx42.promoted301, %for.cond133.1 ] %.lcssa342 = phi i32 [ %arrayidx36.promoted268279, %for.body136.preheader ], [ %arrayidx30.promoted291, %for.cond133 ], [ %arrayidx26.promoted266275, %for.cond133.1 ] %.lcssa341 = phi i32 [ %arrayidx42.promoted301, %for.body136.preheader ], [ %arrayidx36.promoted268279, %for.cond133 ], [ %arrayidx30.promoted291, %for.cond133.1 ] %.lcssa340 = phi i32 [ %arrayidx26.promoted266275, %for.body136.preheader ], [ %arrayidx42.promoted301, %for.cond133 ], [ %arrayidx36.promoted268279, %for.cond133.1 ] %flag.5 = phi i32 [ 1, %for.body136.preheader ], [ 1, %for.cond133 ], [ %spec.select, %for.cond133.1 ] store i32 %arrayidx77.promoted281, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa343, ptr %arrayidx77, align 8, !tbaa !5 store i32 %arrayidx65.promoted277, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa341, ptr %arrayidx65, align 4, !tbaa !5 %bcmp258.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp129.1 = icmp eq i32 %bcmp258.1, 0 br i1 %cmp129.1, label %cleanup176, label %for.body136.preheader.1 for.body136.preheader.1: ; preds = %cleanup store i32 %.lcssa342, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx65.promoted277, ptr %arrayidx42, align 8, !tbaa !5 store i32 %.lcssa340, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx77.promoted281, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.1347 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.1348 = icmp eq i32 %bcmp259.1347, 0 br i1 %cmp168.1348, label %cleanup.1, label %for.cond133.1349 for.cond133.1349: ; preds = %for.body136.preheader.1 store i32 %arrayidx65.promoted277, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa340, ptr %arrayidx42, align 8, !tbaa !5 store i32 %arrayidx77.promoted281, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa342, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.1.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.1.1 = icmp eq i32 %bcmp259.1.1, 0 br i1 %cmp168.1.1, label %cleanup.1, label %for.cond133.1.1 for.cond133.1.1: ; preds = %for.cond133.1349 store i32 %.lcssa340, ptr %arrayidx26, align 8, !tbaa !5 store i32 %arrayidx77.promoted281, ptr %arrayidx42, align 8, !tbaa !5 store i32 %.lcssa342, ptr %arrayidx36, align 4, !tbaa !5 store i32 %arrayidx65.promoted277, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.2.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.2.1 = icmp eq i32 %bcmp259.2.1, 0 %spec.select364 = select i1 %cmp168.2.1, i32 1, i32 %flag.5 br label %cleanup.1 cleanup.1: ; preds = %for.cond133.1.1, %for.cond133.1349, %for.body136.preheader.1 %.lcssa343.1 = phi i32 [ %.lcssa340, %for.body136.preheader.1 ], [ %arrayidx77.promoted281, %for.cond133.1349 ], [ %.lcssa342, %for.cond133.1.1 ] %.lcssa342.1 = phi i32 [ %arrayidx65.promoted277, %for.body136.preheader.1 ], [ %.lcssa340, %for.cond133.1349 ], [ %arrayidx77.promoted281, %for.cond133.1.1 ] %.lcssa341.1 = phi i32 [ %.lcssa342, %for.body136.preheader.1 ], [ %arrayidx65.promoted277, %for.cond133.1349 ], [ %.lcssa340, %for.cond133.1.1 ] %.lcssa340.1 = phi i32 [ %arrayidx77.promoted281, %for.body136.preheader.1 ], [ %.lcssa342, %for.cond133.1349 ], [ %arrayidx65.promoted277, %for.cond133.1.1 ] %flag.5.1 = phi i32 [ 1, %for.body136.preheader.1 ], [ 1, %for.cond133.1349 ], [ %spec.select364, %for.cond133.1.1 ] store i32 %.lcssa343, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa343.1, ptr %arrayidx77, align 8, !tbaa !5 store i32 %.lcssa341, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa341.1, ptr %arrayidx65, align 4, !tbaa !5 %bcmp258.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp129.2 = icmp eq i32 %bcmp258.2, 0 br i1 %cmp129.2, label %cleanup176, label %for.body136.preheader.2 for.body136.preheader.2: ; preds = %cleanup.1 store i32 %.lcssa342.1, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa341, ptr %arrayidx42, align 8, !tbaa !5 store i32 %.lcssa340.1, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa343, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.2350 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.2351 = icmp eq i32 %bcmp259.2350, 0 br i1 %cmp168.2351, label %cleanup176, label %for.cond133.2352 for.cond133.2352: ; preds = %for.body136.preheader.2 store i32 %.lcssa341, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa340.1, ptr %arrayidx42, align 8, !tbaa !5 store i32 %.lcssa343, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa342.1, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.1.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.1.2 = icmp eq i32 %bcmp259.1.2, 0 br i1 %cmp168.1.2, label %cleanup176, label %for.cond133.1.2 for.cond133.1.2: ; preds = %for.cond133.2352 store i32 %.lcssa340.1, ptr %arrayidx26, align 8, !tbaa !5 store i32 %.lcssa343, ptr %arrayidx42, align 8, !tbaa !5 store i32 %.lcssa342.1, ptr %arrayidx36, align 4, !tbaa !5 store i32 %.lcssa341, ptr %arrayidx30, align 4, !tbaa !5 %bcmp259.2.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx26, ptr noundef nonnull dereferenceable(24) %arrayidx52, i64 24) %cmp168.2.2 = icmp eq i32 %bcmp259.2.2, 0 %spec.select365 = select i1 %cmp168.2.2, i32 1, i32 %flag.5.1 br label %cleanup176 cleanup176: ; preds = %for.cond133.1.2, %for.body136.preheader.2, %for.cond133.2352, %cleanup.1, %cleanup, %for.body97.preheader %arrayidx36.promoted269.lcssa = phi i32 [ %arrayidx77.promoted281, %for.body97.preheader ], [ %.lcssa343, %cleanup ], [ %.lcssa343.1, %cleanup.1 ], [ %.lcssa343.1, %for.cond133.2352 ], [ %.lcssa343.1, %for.body136.preheader.2 ], [ %.lcssa343.1, %for.cond133.1.2 ] %arrayidx26.promoted267.lcssa = phi i32 [ %arrayidx65.promoted277, %for.body97.preheader ], [ %.lcssa341, %cleanup ], [ %.lcssa341.1, %cleanup.1 ], [ %.lcssa341.1, %for.cond133.2352 ], [ %.lcssa341.1, %for.body136.preheader.2 ], [ %.lcssa341.1, %for.cond133.1.2 ] %arrayidx42.promoted300327 = phi i32 [ %arrayidx42.promoted300330, %for.body97.preheader ], [ %.lcssa342, %cleanup ], [ %.lcssa342.1, %cleanup.1 ], [ %.lcssa340.1, %for.cond133.2352 ], [ %.lcssa341, %for.body136.preheader.2 ], [ %.lcssa343, %for.cond133.1.2 ] %arrayidx36.promoted296325 = phi i32 [ %arrayidx36.promoted268279, %for.body97.preheader ], [ %arrayidx65.promoted277, %cleanup ], [ %.lcssa341, %cleanup.1 ], [ %.lcssa343, %for.cond133.2352 ], [ %.lcssa340.1, %for.body136.preheader.2 ], [ %.lcssa342.1, %for.cond133.1.2 ] %arrayidx30.promoted290317 = phi i32 [ %arrayidx30.promoted290320, %for.body97.preheader ], [ %.lcssa340, %cleanup ], [ %.lcssa340.1, %cleanup.1 ], [ %.lcssa342.1, %for.cond133.2352 ], [ %.lcssa343, %for.body136.preheader.2 ], [ %.lcssa341, %for.cond133.1.2 ] %arrayidx26.promoted286315 = phi i32 [ %arrayidx26.promoted266275, %for.body97.preheader ], [ %arrayidx77.promoted281, %cleanup ], [ %.lcssa343, %cleanup.1 ], [ %.lcssa341, %for.cond133.2352 ], [ %.lcssa342.1, %for.body136.preheader.2 ], [ %.lcssa340.1, %for.cond133.1.2 ] %arrayidx42.promoted302 = phi i32 [ %arrayidx42.promoted301, %for.body97.preheader ], [ %.lcssa342, %cleanup ], [ %.lcssa342.1, %cleanup.1 ], [ %.lcssa340.1, %for.cond133.2352 ], [ %.lcssa341, %for.body136.preheader.2 ], [ %.lcssa343, %for.cond133.1.2 ] %arrayidx30.promoted292 = phi i32 [ %arrayidx30.promoted291, %for.body97.preheader ], [ %.lcssa340, %cleanup ], [ %.lcssa340.1, %cleanup.1 ], [ %.lcssa342.1, %for.cond133.2352 ], [ %.lcssa343, %for.body136.preheader.2 ], [ %.lcssa341, %for.cond133.1.2 ] %flag.6 = phi i32 [ 1, %for.body97.preheader ], [ 1, %cleanup ], [ 1, %cleanup.1 ], [ 1, %for.cond133.2352 ], [ 1, %for.body136.preheader.2 ], [ %spec.select365, %for.cond133.1.2 ] %inc179 = add nuw nsw i32 %l.0273, 1 %exitcond.not = icmp eq i32 %inc179, 3 br i1 %exitcond.not, label %cleanup180, label %for.body59, !llvm.loop !12 cleanup180: ; preds = %for.body59, %cleanup176 %arrayidx42.promoted300329 = phi i32 [ %arrayidx42.promoted300327, %cleanup176 ], [ %arrayidx42.promoted300330, %for.body59 ] %arrayidx36.promoted296324 = phi i32 [ %arrayidx36.promoted296325, %cleanup176 ], [ %arrayidx77.promoted281, %for.body59 ] %arrayidx30.promoted290319 = phi i32 [ %arrayidx30.promoted290317, %cleanup176 ], [ %arrayidx30.promoted290320, %for.body59 ] %arrayidx26.promoted286314 = phi i32 [ %arrayidx26.promoted286315, %cleanup176 ], [ %arrayidx65.promoted277, %for.body59 ] %arrayidx42.promoted304 = phi i32 [ %arrayidx42.promoted302, %cleanup176 ], [ %arrayidx42.promoted301, %for.body59 ] %arrayidx30.promoted294 = phi i32 [ %arrayidx30.promoted292, %cleanup176 ], [ %arrayidx30.promoted291, %for.body59 ] %flag.7 = phi i32 [ %flag.6, %cleanup176 ], [ 1, %for.body59 ] %inc183 = add nuw nsw i32 %k.0285, 1 %exitcond353.not = icmp eq i32 %inc183, 3 br i1 %exitcond353.not, label %cleanup184, label %for.body24, !llvm.loop !13 cleanup184: ; preds = %for.body24, %cleanup180 %arrayidx42.promoted300331 = phi i32 [ %arrayidx42.promoted300329, %cleanup180 ], [ %arrayidx26.promoted289, %for.body24 ] %arrayidx36.promoted296323 = phi i32 [ %arrayidx36.promoted296324, %cleanup180 ], [ %arrayidx42.promoted305, %for.body24 ] %arrayidx30.promoted290321 = phi i32 [ %arrayidx30.promoted290319, %cleanup180 ], [ %arrayidx36.promoted299, %for.body24 ] %arrayidx26.promoted286313 = phi i32 [ %arrayidx26.promoted286314, %cleanup180 ], [ %arrayidx30.promoted295, %for.body24 ] %flag.8 = phi i32 [ %flag.7, %cleanup180 ], [ 1, %for.body24 ] %indvars.iv.next355 = add nsw i64 %indvars.iv354, -1 %cmp18 = icmp sgt i64 %indvars.iv.next355, %indvars.iv357 br i1 %cmp18, label %for.cond21.preheader, label %for.cond.cleanup19, !llvm.loop !14 if.else: ; preds = %entry, %for.cond12.preheader, %for.cond.cleanup14 br label %if.end197 if.end197: ; preds = %for.cond.cleanup14, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %for.cond.cleanup14 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 2400, ptr nonnull %area) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nofree nounwind willreturn memory(argmem: read) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define next(a) ( ((a)+1)%SIZE ) #define ABS(x) ( (x)>0 ? x : -(x) ) #define MIN(x,y) ( (x) < (y) ? (x) : (y) ) #define MAX(x,y) ( (x) > (y) ? (x) : (y) ) #define INF 1000000000 #define SIZE 100000 typedef struct queue { int front; int rear; int data[200]; }queue; void init(queue* p) { p->front = 0; p->rear = 0; } void enqueue(queue *p,int x) { if (next(p->rear) == p->front) printf("OVERFLOW!\n"); p->data[p->rear] = x; p->rear = next(p->rear); } int dequeue(queue *p) { int x; if (p->front == p->rear) printf("NO DADA\n"); x = p->data[p->front]; p->front = next(p->front); return x; } int empty(queue *p) { return p->front == p->rear; } void print(char* str, int a, int b) { int i; for (i = a; i <= b; i++) printf("%c", str[i]); printf("\n"); } void reverse(char* str, int a, int b) { int i,j=0; char t; for (i = a; i <= (a + b) / 2; i++) { t = str[i]; str[i] = str[b - j]; str[b - j] = t; j++; } } void replace(char* str, int a, int b, char* temp) { int i, j=0; for (i = a; i <= b; i++) { str[i] = temp[j]; j++; } } double rad(int C) { return M_PI * C / 180; } double distance(int* a, int* b, int n, int p) { double sum = 0.0; int i, j; int max = 0; for (i = 0; i < n; i++) { sum += pow(ABS(a[i] - b[i]), p); if (ABS(a[i] - b[i]) > max) max = ABS(a[i] - b[i]); } if (p == INF) return max; return pow(sum, (double)1 / p); } typedef struct Dice { int num[6]; }Dice; void ROT(Dice* p,char R) { int num2[6]; int i; for (i = 0; i < 6; i++) num2[i] = p->num[i]; if (R == 'E') { p->num[0] = num2[3]; p->num[1] = num2[1]; p->num[2] = num2[0]; p->num[3] = num2[5]; p->num[4] = num2[4]; p->num[5] = num2[2]; } if (R == 'S') { p->num[0] = num2[4]; p->num[1] = num2[0]; p->num[2] = num2[2]; p->num[3] = num2[3]; p->num[4] = num2[5]; p->num[5] = num2[1]; } if (R == 'W') { p->num[0] = num2[2]; p->num[1] = num2[1]; p->num[2] = num2[5]; p->num[3] = num2[0]; p->num[4] = num2[4]; p->num[5] = num2[3]; } if (R == 'N') { p->num[0] = num2[1]; p->num[1] = num2[5]; p->num[2] = num2[2]; p->num[3] = num2[3]; p->num[4] = num2[0]; p->num[5] = num2[4]; } } int main() { Dice dice[100]; int n; int i, j,k; int u, d; int temp; scanf("%d", &n); for (i = 0; i < n; i++) { for (j = 0; j < 6; j++) scanf("%d", &dice[i].num[j]); } int cnt, ans = 0; int time = 3000; for (i = 0; i < n; i++) { for (j = i+1; j < n; j++) { time = 1000; while (time >= 0) { cnt = 0; temp = rand() % 4; if (temp == 0) ROT(&dice[i], 'E'); if (temp == 1) ROT(&dice[i], 'S'); if (temp == 2) ROT(&dice[i], 'W'); if (temp == 3) ROT(&dice[i], 'N'); for (k = 0; k < 6; k++) { if (dice[i].num[k] == dice[j].num[k]) cnt++; } if (cnt == 6) break; time--; } if (cnt == 6) { printf("No\n"); return 0; } } } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135334/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135334/source.c" target datalayout = "e-m:e-p270: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.queue = type { i32, i32, [200 x i32] } %struct.Dice = type { [6 x i32] } @.str.4 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [10 x i8] c"OVERFLOW!\00", align 1 @str.7 = private unnamed_addr constant [8 x i8] c"NO DADA\00", align 1 @str.8 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.9 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable define dso_local void @init(ptr nocapture noundef writeonly %p) local_unnamed_addr #0 { entry: store i32 0, ptr %p, align 4, !tbaa !5 %rear = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 1 store i32 0, ptr %rear, align 4, !tbaa !10 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @enqueue(ptr nocapture noundef %p, i32 noundef %x) local_unnamed_addr #1 { entry: %rear = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 1 %0 = load i32, ptr %rear, align 4, !tbaa !10 %add = add nsw i32 %0, 1 %rem = srem i32 %add, 100000 %1 = load i32, ptr %p, align 4, !tbaa !5 %cmp = icmp eq i32 %rem, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i32, ptr %rear, align 4, !tbaa !10 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %idxprom = sext i32 %2 to i64 %arrayidx = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 2, i64 %idxprom store i32 %x, ptr %arrayidx, align 4, !tbaa !11 %3 = load i32, ptr %rear, align 4, !tbaa !10 %add3 = add nsw i32 %3, 1 %rem4 = srem i32 %add3, 100000 store i32 %rem4, ptr %rear, align 4, !tbaa !10 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @dequeue(ptr nocapture noundef %p) local_unnamed_addr #1 { entry: %0 = load i32, ptr %p, align 4, !tbaa !5 %rear = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 1 %1 = load i32, ptr %rear, align 4, !tbaa !10 %cmp = icmp eq i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.7) %.pre = load i32, ptr %p, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %idxprom = sext i32 %2 to i64 %arrayidx = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 2, i64 %idxprom %3 = load i32, ptr %arrayidx, align 4, !tbaa !11 %add = add nsw i32 %2, 1 %rem = srem i32 %add, 100000 store i32 %rem, ptr %p, align 4, !tbaa !5 ret i32 %3 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @empty(ptr nocapture noundef readonly %p) local_unnamed_addr #3 { entry: %0 = load i32, ptr %p, align 4, !tbaa !5 %rear = getelementptr inbounds %struct.queue, ptr %p, i64 0, i32 1 %1 = load i32, ptr %rear, align 4, !tbaa !10 %cmp = icmp eq i32 %0, %1 %conv = zext i1 %cmp to i32 ret i32 %conv } ; Function Attrs: nofree nounwind uwtable define dso_local void @print(ptr nocapture noundef readonly %str, i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %cmp.not5 = icmp sgt i32 %a, %b br i1 %cmp.not5, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %a to i64 %1 = add i32 %b, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i8, ptr %str, i64 %indvars.iv %2 = load i8, ptr %arrayidx, align 1, !tbaa !12 %conv = sext i8 %2 to i32 %putchar4 = tail call i32 @putchar(i32 %conv) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %entry %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @reverse(ptr nocapture noundef %str, i32 noundef %a, i32 noundef %b) local_unnamed_addr #4 { entry: %add = add nsw i32 %b, %a %div = sdiv i32 %add, 2 %cmp.not20 = icmp slt i32 %div, %a br i1 %cmp.not20, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %a to i64 %1 = sext i32 %b to i64 %2 = add nsw i32 %div, 1 %3 = sub i32 %2, %a %wide.trip.count = zext i32 %3 to i64 %xtraiter = and i64 %wide.trip.count, 1 %4 = icmp eq i32 %3, 1 br i1 %4, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 %invariant.gep = getelementptr i8, ptr %str, i64 1 %invariant.gep29 = getelementptr i8, ptr %str, i64 %1 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv23 = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next24.1, %for.body ] %indvars.iv = phi i64 [ %0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx = getelementptr inbounds i8, ptr %str, i64 %indvars.iv %5 = load i8, ptr %arrayidx, align 1, !tbaa !12 %6 = sub nsw i64 %1, %indvars.iv23 %arrayidx2 = getelementptr inbounds i8, ptr %str, i64 %6 %7 = load i8, ptr %arrayidx2, align 1, !tbaa !12 store i8 %7, ptr %arrayidx, align 1, !tbaa !12 store i8 %5, ptr %arrayidx2, align 1, !tbaa !12 %indvars.iv.next24.neg = xor i64 %indvars.iv23, -1 %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv %8 = load i8, ptr %gep, align 1, !tbaa !12 %gep30 = getelementptr i8, ptr %invariant.gep29, i64 %indvars.iv.next24.neg %9 = load i8, ptr %gep30, align 1, !tbaa !12 store i8 %9, ptr %gep, align 1, !tbaa !12 store i8 %8, ptr %gep30, align 1, !tbaa !12 %indvars.iv.next24.1 = add nuw nsw i64 %indvars.iv23, 2 %indvars.iv.next.1 = add 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.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !15 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv23.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next24.1, %for.body ] %indvars.iv.unr = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds i8, ptr %str, i64 %indvars.iv.unr %10 = load i8, ptr %arrayidx.epil, align 1, !tbaa !12 %11 = sub nsw i64 %1, %indvars.iv23.unr %arrayidx2.epil = getelementptr inbounds i8, ptr %str, i64 %11 %12 = load i8, ptr %arrayidx2.epil, align 1, !tbaa !12 store i8 %12, ptr %arrayidx.epil, align 1, !tbaa !12 store i8 %10, ptr %arrayidx2.epil, align 1, !tbaa !12 br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @replace(ptr nocapture noundef writeonly %str, i32 noundef %a, i32 noundef %b, ptr nocapture noundef readonly %temp) local_unnamed_addr #4 { entry: %temp16 = ptrtoint ptr %temp to i64 %str15 = ptrtoint ptr %str to i64 %cmp.not7 = icmp sgt i32 %a, %b br i1 %cmp.not7, label %for.end, label %iter.check iter.check: ; preds = %entry %0 = sext i32 %a to i64 %1 = add i32 %b, 1 %2 = sub i32 %1, %a %wide.trip.count = zext i32 %2 to i64 %min.iters.check = icmp ult i32 %2, 8 br i1 %min.iters.check, label %for.body.preheader, label %vector.memcheck vector.memcheck: ; preds = %iter.check %3 = add i64 %str15, %0 %4 = sub i64 %3, %temp16 %diff.check = icmp ult i64 %4, 32 br i1 %diff.check, label %for.body.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck %min.iters.check17 = icmp ult i32 %2, 32 br i1 %min.iters.check17, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %wide.trip.count, 4294967264 %invariant.gep = getelementptr i8, ptr %str, i64 %0 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %5 = getelementptr inbounds i8, ptr %temp, i64 %index %wide.load = load <16 x i8>, ptr %5, align 1, !tbaa !12 %6 = getelementptr inbounds i8, ptr %5, i64 16 %wide.load18 = load <16 x i8>, ptr %6, align 1, !tbaa !12 %gep = getelementptr i8, ptr %invariant.gep, i64 %index store <16 x i8> %wide.load, ptr %gep, align 1, !tbaa !12 %7 = getelementptr inbounds i8, ptr %gep, i64 16 store <16 x i8> %wide.load18, ptr %7, align 1, !tbaa !12 %index.next = add nuw i64 %index, 32 %8 = icmp eq i64 %index.next, %n.vec br i1 %8, label %middle.block, label %vector.body, !llvm.loop !16 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end21 = add nsw i64 %n.vec, %0 %n.vec.remaining = and i64 %wide.trip.count, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %n.vec20 = and i64 %wide.trip.count, 4294967288 %ind.end = add nsw i64 %n.vec20, %0 %invariant.gep28 = getelementptr i8, ptr %str, i64 %0 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index24 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next27, %vec.epilog.vector.body ] %9 = getelementptr inbounds i8, ptr %temp, i64 %index24 %wide.load26 = load <8 x i8>, ptr %9, align 1, !tbaa !12 %gep29 = getelementptr i8, ptr %invariant.gep28, i64 %index24 store <8 x i8> %wide.load26, ptr %gep29, align 1, !tbaa !12 %index.next27 = add nuw i64 %index24, 8 %10 = icmp eq i64 %index.next27, %n.vec20 br i1 %10, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !19 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body %cmp.n23 = icmp eq i64 %n.vec20, %wide.trip.count br i1 %cmp.n23, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv10.ph = phi i64 [ %0, %iter.check ], [ %0, %vector.memcheck ], [ %ind.end21, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ] %indvars.iv.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec20, %vec.epilog.middle.block ] %11 = xor i64 %indvars.iv.ph, -1 %12 = add nsw i64 %11, %wide.trip.count %xtraiter = and i64 %wide.trip.count, 3 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader, %for.body.prol %indvars.iv10.prol = phi i64 [ %indvars.iv.next11.prol, %for.body.prol ], [ %indvars.iv10.ph, %for.body.preheader ] %indvars.iv.prol = phi i64 [ %indvars.iv.next.prol, %for.body.prol ], [ %indvars.iv.ph, %for.body.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %for.body.prol ], [ 0, %for.body.preheader ] %arrayidx.prol = getelementptr inbounds i8, ptr %temp, i64 %indvars.iv.prol %13 = load i8, ptr %arrayidx.prol, align 1, !tbaa !12 %arrayidx2.prol = getelementptr inbounds i8, ptr %str, i64 %indvars.iv10.prol store i8 %13, ptr %arrayidx2.prol, align 1, !tbaa !12 %indvars.iv.next.prol = add nuw nsw i64 %indvars.iv.prol, 1 %indvars.iv.next11.prol = add nsw i64 %indvars.iv10.prol, 1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %for.body.prol.loopexit, label %for.body.prol, !llvm.loop !20 for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader %indvars.iv10.unr = phi i64 [ %indvars.iv10.ph, %for.body.preheader ], [ %indvars.iv.next11.prol, %for.body.prol ] %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader ], [ %indvars.iv.next.prol, %for.body.prol ] %14 = icmp ult i64 %12, 3 br i1 %14, label %for.end, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.prol.loopexit %invariant.gep30 = getelementptr i8, ptr %temp, i64 1 %invariant.gep32 = getelementptr i8, ptr %str, i64 1 %invariant.gep34 = getelementptr i8, ptr %temp, i64 2 %invariant.gep36 = getelementptr i8, ptr %str, i64 2 %invariant.gep38 = getelementptr i8, ptr %temp, i64 3 %invariant.gep40 = getelementptr i8, ptr %str, i64 3 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv10 = phi i64 [ %indvars.iv10.unr, %for.body.preheader.new ], [ %indvars.iv.next11.3, %for.body ] %indvars.iv = phi i64 [ %indvars.iv.unr, %for.body.preheader.new ], [ %indvars.iv.next.3, %for.body ] %arrayidx = getelementptr inbounds i8, ptr %temp, i64 %indvars.iv %15 = load i8, ptr %arrayidx, align 1, !tbaa !12 %arrayidx2 = getelementptr inbounds i8, ptr %str, i64 %indvars.iv10 store i8 %15, ptr %arrayidx2, align 1, !tbaa !12 %gep31 = getelementptr i8, ptr %invariant.gep30, i64 %indvars.iv %16 = load i8, ptr %gep31, align 1, !tbaa !12 %gep33 = getelementptr i8, ptr %invariant.gep32, i64 %indvars.iv10 store i8 %16, ptr %gep33, align 1, !tbaa !12 %gep35 = getelementptr i8, ptr %invariant.gep34, i64 %indvars.iv %17 = load i8, ptr %gep35, align 1, !tbaa !12 %gep37 = getelementptr i8, ptr %invariant.gep36, i64 %indvars.iv10 store i8 %17, ptr %gep37, align 1, !tbaa !12 %gep39 = getelementptr i8, ptr %invariant.gep38, i64 %indvars.iv %18 = load i8, ptr %gep39, align 1, !tbaa !12 %gep41 = getelementptr i8, ptr %invariant.gep40, i64 %indvars.iv10 store i8 %18, ptr %gep41, align 1, !tbaa !12 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %indvars.iv.next11.3 = add nsw i64 %indvars.iv10, 4 %exitcond.not.3 = icmp eq i64 %indvars.iv.next.3, %wide.trip.count br i1 %exitcond.not.3, label %for.end, label %for.body, !llvm.loop !22 for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %vec.epilog.middle.block, %entry ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @rad(i32 noundef %C) local_unnamed_addr #5 { entry: %conv = sitofp i32 %C to double %mul = fmul double %conv, 0x400921FB54442D18 %div = fdiv double %mul, 1.800000e+02 ret double %div } ; Function Attrs: nofree nounwind memory(write, argmem: readwrite) uwtable define dso_local double @distance(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b, i32 noundef %n, i32 noundef %p) local_unnamed_addr #6 { entry: %cmp111 = icmp sgt i32 %n, 0 br i1 %cmp111, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %conv15 = sitofp i32 %p to double %wide.trip.count = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.body ] %max.0114 = phi i32 [ 0, %for.body.lr.ph ], [ %spec.select, %for.body ] %sum.0112 = phi double [ 0.000000e+00, %for.body.lr.ph ], [ %add, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !11 %arrayidx2 = getelementptr inbounds i32, ptr %b, i64 %indvars.iv %1 = load i32, ptr %arrayidx2, align 4, !tbaa !11 %sub = sub nsw i32 %0, %1 %cond = tail call i32 @llvm.abs.i32(i32 %sub, i1 true) %conv = sitofp i32 %cond to double %call = tail call double @pow(double noundef %conv, double noundef %conv15) #14 %add = fadd double %sum.0112, %call %2 = load i32, ptr %arrayidx, align 4, !tbaa !11 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !11 %sub20 = sub nsw i32 %2, %3 %cond37 = tail call i32 @llvm.abs.i32(i32 %sub20, i1 true) %spec.select = tail call i32 @llvm.smax.i32(i32 %cond37, i32 %max.0114) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end.loopexit, label %for.body, !llvm.loop !23 for.end.loopexit: ; preds = %for.body %4 = sitofp i32 %spec.select to double br label %for.end for.end: ; preds = %for.end.loopexit, %entry %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %add, %for.end.loopexit ] %max.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %4, %for.end.loopexit ] %cmp62 = icmp eq i32 %p, 1000000000 br i1 %cmp62, label %cleanup, label %if.end66 if.end66: ; preds = %for.end %conv67 = sitofp i32 %p to double %div = fdiv double 1.000000e+00, %conv67 %call68 = tail call double @pow(double noundef %sum.0.lcssa, double noundef %div) #14 br label %cleanup cleanup: ; preds = %for.end, %if.end66 %retval.0 = phi double [ %call68, %if.end66 ], [ %max.0.lcssa, %for.end ] ret double %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @ROT(ptr nocapture noundef %p, i8 noundef signext %R) local_unnamed_addr #8 { entry: %num2.sroa.0.0.copyload = load i32, ptr %p, align 4, !tbaa !11 %num2.sroa.7.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 4 %num2.sroa.7.0.copyload = load i32, ptr %num2.sroa.7.0.p.sroa_idx, align 4, !tbaa !11 %num2.sroa.11.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 8 %num2.sroa.11.0.copyload = load i32, ptr %num2.sroa.11.0.p.sroa_idx, align 4, !tbaa !11 %num2.sroa.15.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 12 %num2.sroa.15.0.copyload = load i32, ptr %num2.sroa.15.0.p.sroa_idx, align 4, !tbaa !11 %num2.sroa.19.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 16 %num2.sroa.19.0.copyload = load i32, ptr %num2.sroa.19.0.p.sroa_idx, align 4, !tbaa !11 %num2.sroa.23.0.p.sroa_idx = getelementptr inbounds i8, ptr %p, i64 20 %num2.sroa.23.0.copyload = load i32, ptr %num2.sroa.23.0.p.sroa_idx, align 4, !tbaa !11 switch i8 %R, label %if.end91 [ i8 69, label %if.then i8 83, label %if.then26 i8 87, label %if.then49 i8 78, label %if.then72 ] if.then: ; preds = %entry store i32 %num2.sroa.15.0.copyload, ptr %p, align 4, !tbaa !11 store i32 %num2.sroa.0.0.copyload, ptr %num2.sroa.11.0.p.sroa_idx, align 4, !tbaa !11 store i32 %num2.sroa.23.0.copyload, ptr %num2.sroa.15.0.p.sroa_idx, align 4, !tbaa !11 br label %if.end91.sink.split if.then26: ; preds = %entry store i32 %num2.sroa.19.0.copyload, ptr %p, align 4, !tbaa !11 store i32 %num2.sroa.0.0.copyload, ptr %num2.sroa.7.0.p.sroa_idx, align 4, !tbaa !11 store i32 %num2.sroa.23.0.copyload, ptr %num2.sroa.19.0.p.sroa_idx, align 4, !tbaa !11 br label %if.end91.sink.split if.then49: ; preds = %entry store i32 %num2.sroa.11.0.copyload, ptr %p, align 4, !tbaa !11 store i32 %num2.sroa.23.0.copyload, ptr %num2.sroa.11.0.p.sroa_idx, align 4, !tbaa !11 store i32 %num2.sroa.0.0.copyload, ptr %num2.sroa.15.0.p.sroa_idx, align 4, !tbaa !11 br label %if.end91.sink.split if.then72: ; preds = %entry store i32 %num2.sroa.7.0.copyload, ptr %p, align 4, !tbaa !11 store i32 %num2.sroa.23.0.copyload, ptr %num2.sroa.7.0.p.sroa_idx, align 4, !tbaa !11 store i32 %num2.sroa.0.0.copyload, ptr %num2.sroa.19.0.p.sroa_idx, align 4, !tbaa !11 br label %if.end91.sink.split if.end91.sink.split: ; preds = %if.then72, %if.then, %if.then26, %if.then49 %num2.sroa.15.0.copyload.sink = phi i32 [ %num2.sroa.15.0.copyload, %if.then49 ], [ %num2.sroa.7.0.copyload, %if.then26 ], [ %num2.sroa.11.0.copyload, %if.then ], [ %num2.sroa.19.0.copyload, %if.then72 ] store i32 %num2.sroa.15.0.copyload.sink, ptr %num2.sroa.23.0.p.sroa_idx, align 4, !tbaa !11 br label %if.end91 if.end91: ; preds = %if.end91.sink.split, %entry ret void } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #9 { entry: %dice = alloca [100 x %struct.Dice], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 2400, ptr nonnull %dice) #14 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #14 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !11 %cmp145 = icmp sgt i32 %0, 0 br i1 %cmp145, label %for.cond1.preheader, label %cleanup for.cond1.preheader: ; preds = %entry, %for.cond1.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1.preheader ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x %struct.Dice], ptr %dice, i64 0, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx) %arrayidx5.1 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 1 %call6.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx5.1) %arrayidx5.2 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 2 %call6.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx5.2) %arrayidx5.3 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 3 %call6.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx5.3) %arrayidx5.4 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 4 %call6.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx5.4) %arrayidx5.5 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 5 %call6.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %arrayidx5.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !11 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader.split, !llvm.loop !24 for.cond10.preheader.split: ; preds = %for.cond1.preheader %cmp11152 = icmp sgt i32 %1, 0 br i1 %cmp11152, label %for.body12, label %cleanup for.cond10.loopexit.loopexit: ; preds = %while.end %.pre169 = sext i32 %22 to i64 br label %for.cond10.loopexit for.cond10.loopexit: ; preds = %for.cond10.loopexit.loopexit, %for.body12 %.pre-phi = phi i64 [ %.pre169, %for.cond10.loopexit.loopexit ], [ %5, %for.body12 ] %3 = phi i32 [ %22, %for.cond10.loopexit.loopexit ], [ %4, %for.body12 ] %cmp11 = icmp slt i64 %indvars.iv.next166, %.pre-phi %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1 br i1 %cmp11, label %for.body12, label %cleanup, !llvm.loop !25 for.body12: ; preds = %for.cond10.preheader.split, %for.cond10.loopexit %4 = phi i32 [ %3, %for.cond10.loopexit ], [ %1, %for.cond10.preheader.split ] %indvars.iv165 = phi i64 [ %indvars.iv.next166, %for.cond10.loopexit ], [ 0, %for.cond10.preheader.split ] %indvars.iv160 = phi i64 [ %indvars.iv.next161, %for.cond10.loopexit ], [ 1, %for.cond10.preheader.split ] %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1 %5 = sext i32 %4 to i64 %cmp14150 = icmp slt i64 %indvars.iv.next166, %5 br i1 %cmp14150, label %while.cond.preheader.lr.ph, label %for.cond10.loopexit while.cond.preheader.lr.ph: ; preds = %for.body12 %arrayidx34 = getelementptr inbounds [100 x %struct.Dice], ptr %dice, i64 0, i64 %indvars.iv165 %num2.sroa.7.0.p.sroa_idx.i128 = getelementptr inbounds i8, ptr %arrayidx34, i64 4 %num2.sroa.19.0.p.sroa_idx.i134 = getelementptr inbounds i8, ptr %arrayidx34, i64 16 %num2.sroa.23.0.p.sroa_idx.i136 = getelementptr inbounds i8, ptr %arrayidx34, i64 20 %num2.sroa.11.0.p.sroa_idx.i119 = getelementptr inbounds i8, ptr %arrayidx34, i64 8 %num2.sroa.15.0.p.sroa_idx.i121 = getelementptr inbounds i8, ptr %arrayidx34, i64 12 br label %while.cond.preheader while.cond.preheader: ; preds = %while.cond.preheader.lr.ph, %while.end %indvars.iv162 = phi i64 [ %indvars.iv160, %while.cond.preheader.lr.ph ], [ %indvars.iv.next163, %while.end ] %arrayidx45 = getelementptr inbounds [100 x %struct.Dice], ptr %dice, i64 0, i64 %indvars.iv162 %arrayidx48.4 = getelementptr inbounds [6 x i32], ptr %arrayidx45, i64 0, i64 4 %arrayidx48.5 = getelementptr inbounds [6 x i32], ptr %arrayidx45, i64 0, i64 5 br label %while.body while.cond: ; preds = %if.end35 %dec = add nsw i32 %time.0149, -1 %cmp16.not = icmp eq i32 %time.0149, 0 br i1 %cmp16.not, label %while.end, label %while.body, !llvm.loop !26 while.body: ; preds = %while.cond.preheader, %while.cond %time.0149 = phi i32 [ 1000, %while.cond.preheader ], [ %dec, %while.cond ] %call17 = call i32 @rand() #14 %rem = srem i32 %call17, 4 %.pre = load i32, ptr %arrayidx34, align 8, !tbaa !11 switch i32 %rem, label %while.body.if.end35_crit_edge [ i32 0, label %if.then i32 1, label %if.then22 i32 2, label %if.then27 i32 3, label %if.then32 ] while.body.if.end35_crit_edge: ; preds = %while.body %.pre168 = load i32, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 br label %if.end35 if.then: ; preds = %while.body %num2.sroa.11.0.copyload.i = load i32, ptr %num2.sroa.11.0.p.sroa_idx.i119, align 8, !tbaa !11 %num2.sroa.15.0.copyload.i = load i32, ptr %num2.sroa.15.0.p.sroa_idx.i121, align 4, !tbaa !11 %num2.sroa.23.0.copyload.i = load i32, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 store i32 %num2.sroa.15.0.copyload.i, ptr %arrayidx34, align 8, !tbaa !11 store i32 %.pre, ptr %num2.sroa.11.0.p.sroa_idx.i119, align 8, !tbaa !11 store i32 %num2.sroa.23.0.copyload.i, ptr %num2.sroa.15.0.p.sroa_idx.i121, align 4, !tbaa !11 store i32 %num2.sroa.11.0.copyload.i, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 br label %if.end35 if.then22: ; preds = %while.body %num2.sroa.7.0.copyload.i107 = load i32, ptr %num2.sroa.7.0.p.sroa_idx.i128, align 4, !tbaa !11 %num2.sroa.19.0.copyload.i113 = load i32, ptr %num2.sroa.19.0.p.sroa_idx.i134, align 8, !tbaa !11 %num2.sroa.23.0.copyload.i115 = load i32, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 store i32 %num2.sroa.19.0.copyload.i113, ptr %arrayidx34, align 8, !tbaa !11 store i32 %.pre, ptr %num2.sroa.7.0.p.sroa_idx.i128, align 4, !tbaa !11 store i32 %num2.sroa.23.0.copyload.i115, ptr %num2.sroa.19.0.p.sroa_idx.i134, align 8, !tbaa !11 store i32 %num2.sroa.7.0.copyload.i107, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 br label %if.end35 if.then27: ; preds = %while.body %num2.sroa.11.0.copyload.i120 = load i32, ptr %num2.sroa.11.0.p.sroa_idx.i119, align 8, !tbaa !11 %num2.sroa.15.0.copyload.i122 = load i32, ptr %num2.sroa.15.0.p.sroa_idx.i121, align 4, !tbaa !11 %num2.sroa.23.0.copyload.i126 = load i32, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 store i32 %num2.sroa.11.0.copyload.i120, ptr %arrayidx34, align 8, !tbaa !11 store i32 %num2.sroa.23.0.copyload.i126, ptr %num2.sroa.11.0.p.sroa_idx.i119, align 8, !tbaa !11 store i32 %.pre, ptr %num2.sroa.15.0.p.sroa_idx.i121, align 4, !tbaa !11 store i32 %num2.sroa.15.0.copyload.i122, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 br label %if.end35 if.then32: ; preds = %while.body %num2.sroa.7.0.copyload.i129 = load i32, ptr %num2.sroa.7.0.p.sroa_idx.i128, align 4, !tbaa !11 %num2.sroa.19.0.copyload.i135 = load i32, ptr %num2.sroa.19.0.p.sroa_idx.i134, align 8, !tbaa !11 %num2.sroa.23.0.copyload.i137 = load i32, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 store i32 %num2.sroa.7.0.copyload.i129, ptr %arrayidx34, align 8, !tbaa !11 store i32 %num2.sroa.23.0.copyload.i137, ptr %num2.sroa.7.0.p.sroa_idx.i128, align 4, !tbaa !11 store i32 %.pre, ptr %num2.sroa.19.0.p.sroa_idx.i134, align 8, !tbaa !11 store i32 %num2.sroa.19.0.copyload.i135, ptr %num2.sroa.23.0.p.sroa_idx.i136, align 4, !tbaa !11 br label %if.end35 if.end35: ; preds = %while.body.if.end35_crit_edge, %if.then27, %if.then22, %if.then, %if.then32 %6 = phi i32 [ %.pre168, %while.body.if.end35_crit_edge ], [ %num2.sroa.15.0.copyload.i122, %if.then27 ], [ %num2.sroa.7.0.copyload.i107, %if.then22 ], [ %num2.sroa.11.0.copyload.i, %if.then ], [ %num2.sroa.19.0.copyload.i135, %if.then32 ] %7 = phi i32 [ %.pre, %while.body.if.end35_crit_edge ], [ %num2.sroa.11.0.copyload.i120, %if.then27 ], [ %num2.sroa.19.0.copyload.i113, %if.then22 ], [ %num2.sroa.15.0.copyload.i, %if.then ], [ %num2.sroa.7.0.copyload.i129, %if.then32 ] %8 = load i32, ptr %num2.sroa.7.0.p.sroa_idx.i128, align 4, !tbaa !11 %9 = load <2 x i32>, ptr %num2.sroa.11.0.p.sroa_idx.i119, align 8, !tbaa !11 %10 = load <4 x i32>, ptr %arrayidx45, align 8, !tbaa !11 %11 = insertelement <4 x i32> poison, i32 %7, i64 0 %12 = insertelement <4 x i32> %11, i32 %8, i64 1 %13 = shufflevector <2 x i32> %9, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 poison, i32 poison> %14 = shufflevector <4 x i32> %12, <4 x i32> %13, <4 x i32> <i32 0, i32 1, i32 4, i32 5> %15 = icmp eq <4 x i32> %14, %10 %16 = load i32, ptr %num2.sroa.19.0.p.sroa_idx.i134, align 8, !tbaa !11 %17 = load i32, ptr %arrayidx48.4, align 8, !tbaa !11 %cmp49.4 = icmp eq i32 %16, %17 %inc51.4 = zext i1 %cmp49.4 to i32 %18 = load i32, ptr %arrayidx48.5, align 4, !tbaa !11 %cmp49.5 = icmp eq i32 %6, %18 %inc51.5 = zext i1 %cmp49.5 to i32 %19 = bitcast <4 x i1> %15 to i4 %20 = call i4 @llvm.ctpop.i4(i4 %19), !range !27 %21 = zext i4 %20 to i32 %op.rdx = add nuw nsw i32 %21, %inc51.4 %op.rdx174 = add nuw nsw i32 %op.rdx, %inc51.5 %cmp56 = icmp eq i32 %op.rdx174, 6 br i1 %cmp56, label %cleanup, label %while.cond while.end: ; preds = %while.cond %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1 %22 = load i32, ptr %n, align 4, !tbaa !11 %23 = trunc i64 %indvars.iv.next163 to i32 %cmp14 = icmp sgt i32 %22, %23 br i1 %cmp14, label %while.cond.preheader, label %for.cond10.loopexit.loopexit, !llvm.loop !28 cleanup: ; preds = %for.cond10.loopexit, %if.end35, %for.cond10.preheader.split, %entry %str.8.sink = phi ptr [ @str.8, %entry ], [ @str.8, %for.cond10.preheader.split ], [ @str.9, %if.end35 ], [ @str.8, %for.cond10.loopexit ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.8.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #14 call void @llvm.lifetime.end.p0(i64 2400, ptr nonnull %dice) #14 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #11 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #12 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i4 @llvm.ctpop.i4(i4) #13 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nofree 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 #4 = { 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 #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind memory(write, 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 #7 = { 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 #8 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { nofree nounwind } attributes #13 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #14 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"queue", !7, i64 0, !7, i64 4, !8, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!6, !7, i64 4} !11 = !{!7, !7, i64 0} !12 = !{!8, !8, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !14} !16 = distinct !{!16, !14, !17, !18} !17 = !{!"llvm.loop.isvectorized", i32 1} !18 = !{!"llvm.loop.unroll.runtime.disable"} !19 = distinct !{!19, !14, !17, !18} !20 = distinct !{!20, !21} !21 = !{!"llvm.loop.unroll.disable"} !22 = distinct !{!22, !14, !17} !23 = distinct !{!23, !14} !24 = distinct !{!24, !14} !25 = distinct !{!25, !14} !26 = distinct !{!26, !14} !27 = !{i4 0, i4 5} !28 = distinct !{!28, !14}
// AOJ ITP1_11_D Dice IV // 2018.5.2 bal4u #include <stdio.h> #include <string.h> #if 1 #define gc() getchar_unlocked() #else #define gc() getchar() #endif int in() { int n = 0, c = gc(); do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return n; } int rot[24][7] = { { 0,1,2,3,4,5,6 },{ 0,1,3,5,2,4,6 },{ 0,1,4,2,5,3,6 },{ 0,1,5,4,3,2,6 }, { 0,2,6,3,4,1,5 },{ 0,2,3,1,6,4,5 },{ 0,2,1,4,3,6,5 },{ 0,2,4,6,1,3,5 }, { 0,3,1,2,5,6,4 },{ 0,3,2,6,1,5,4 },{ 0,3,5,1,6,2,4 },{ 0,3,6,5,2,1,4 }, { 0,4,1,5,2,6,3 },{ 0,4,2,1,6,5,3 },{ 0,4,5,6,1,2,3 },{ 0,4,6,2,5,1,3 }, { 0,5,1,3,4,6,2 },{ 0,5,3,6,1,4,2 },{ 0,5,4,1,6,3,2 },{ 0,5,6,4,3,1,2 }, { 0,6,2,4,3,5,1 },{ 0,6,3,2,5,4,1 },{ 0,6,5,3,4,2,1 },{ 0,6,4,5,2,3,1 } }; int a[102][7]; char f[102]; int identical(int *a, int *b) { int i, j; memset(f, 0, sizeof(f)); for (i = 1; i <= 6; i++) f[a[i]]++; for (i = 1; i <= 6; i++) f[b[i]]--; for (i = 1; i <= 6; i++) if (f[b[i]]) return 0; for (j = 0; j < 24; j++) { if (b[1] == a[rot[j][1]]) { for (i = 2; ; i++) { if (i > 6) return 1; if (b[i] != a[rot[j][i]]) break; } } } return 0; } int main() { int n, i, j, f; n = in(); for (i = 0; i < n; i++) { for (j = 1; j <= 6; j++) a[i][j] = in(); } f = 1; for (i = 0; i < n; i++) for (j = i+1; j < n; j++) { if (identical(a[i], a[j])) { f = 0; goto done; } } done: puts(f? "Yes": "No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] } @rot = dso_local local_unnamed_addr global [24 x [7 x i32]] [[7 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6], [7 x i32] [i32 0, i32 1, i32 3, i32 5, i32 2, i32 4, i32 6], [7 x i32] [i32 0, i32 1, i32 4, i32 2, i32 5, i32 3, i32 6], [7 x i32] [i32 0, i32 1, i32 5, i32 4, i32 3, i32 2, i32 6], [7 x i32] [i32 0, i32 2, i32 6, i32 3, i32 4, i32 1, i32 5], [7 x i32] [i32 0, i32 2, i32 3, i32 1, i32 6, i32 4, i32 5], [7 x i32] [i32 0, i32 2, i32 1, i32 4, i32 3, i32 6, i32 5], [7 x i32] [i32 0, i32 2, i32 4, i32 6, i32 1, i32 3, i32 5], [7 x i32] [i32 0, i32 3, i32 1, i32 2, i32 5, i32 6, i32 4], [7 x i32] [i32 0, i32 3, i32 2, i32 6, i32 1, i32 5, i32 4], [7 x i32] [i32 0, i32 3, i32 5, i32 1, i32 6, i32 2, i32 4], [7 x i32] [i32 0, i32 3, i32 6, i32 5, i32 2, i32 1, i32 4], [7 x i32] [i32 0, i32 4, i32 1, i32 5, i32 2, i32 6, i32 3], [7 x i32] [i32 0, i32 4, i32 2, i32 1, i32 6, i32 5, i32 3], [7 x i32] [i32 0, i32 4, i32 5, i32 6, i32 1, i32 2, i32 3], [7 x i32] [i32 0, i32 4, i32 6, i32 2, i32 5, i32 1, i32 3], [7 x i32] [i32 0, i32 5, i32 1, i32 3, i32 4, i32 6, i32 2], [7 x i32] [i32 0, i32 5, i32 3, i32 6, i32 1, i32 4, i32 2], [7 x i32] [i32 0, i32 5, i32 4, i32 1, i32 6, i32 3, i32 2], [7 x i32] [i32 0, i32 5, i32 6, i32 4, i32 3, i32 1, i32 2], [7 x i32] [i32 0, i32 6, i32 2, i32 4, i32 3, i32 5, i32 1], [7 x i32] [i32 0, i32 6, i32 3, i32 2, i32 5, i32 4, i32 1], [7 x i32] [i32 0, i32 6, i32 5, i32 3, i32 4, i32 2, i32 1], [7 x i32] [i32 0, i32 6, i32 4, i32 5, i32 2, i32 3, i32 1]], align 16 @f = dso_local local_unnamed_addr global [102 x i8] zeroinitializer, align 16 @a = dso_local global [102 x [7 x i32]] zeroinitializer, align 16 @.str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @in() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %_IO_read_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i, align 8, !tbaa !14 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %entry %call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #5 %.pre14.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.preheader cond.false.i: ; preds = %entry %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i = zext i8 %3 to i32 br label %do.body.preheader do.body.preheader: ; preds = %cond.true.i, %cond.false.i %.ph = phi ptr [ %0, %cond.false.i ], [ %.pre14.pre, %cond.true.i ] %c.0.ph = phi i32 [ %conv3.i, %cond.false.i ], [ %call.i, %cond.true.i ] br label %do.body do.body: ; preds = %do.body.preheader, %getchar_unlocked.exit13 %4 = phi ptr [ %8, %getchar_unlocked.exit13 ], [ %.ph, %do.body.preheader ] %n.0 = phi i32 [ %add, %getchar_unlocked.exit13 ], [ 0, %do.body.preheader ] %c.0 = phi i32 [ %cond.i9, %getchar_unlocked.exit13 ], [ %c.0.ph, %do.body.preheader ] %mul = mul nsw i32 %n.0, 10 %and = and i32 %c.0, 15 %add = add nsw i32 %and, %mul %_IO_read_ptr.i4 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 1 %5 = load ptr, ptr %_IO_read_ptr.i4, align 8, !tbaa !9 %_IO_read_end.i5 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 2 %6 = load ptr, ptr %_IO_read_end.i5, align 8, !tbaa !14 %cmp.not.i6 = icmp ult ptr %5, %6 br i1 %cmp.not.i6, label %cond.false.i10, label %cond.true.i7, !prof !15 cond.true.i7: ; preds = %do.body %call.i8 = tail call i32 @__uflow(ptr noundef nonnull %4) #5 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13 cond.false.i10: ; preds = %do.body %incdec.ptr.i11 = getelementptr inbounds i8, ptr %5, i64 1 store ptr %incdec.ptr.i11, ptr %_IO_read_ptr.i4, align 8, !tbaa !9 %7 = load i8, ptr %5, align 1, !tbaa !16 %conv3.i12 = zext i8 %7 to i32 br label %getchar_unlocked.exit13 getchar_unlocked.exit13: ; preds = %cond.true.i7, %cond.false.i10 %8 = phi ptr [ %.pre, %cond.true.i7 ], [ %4, %cond.false.i10 ] %cond.i9 = phi i32 [ %call.i8, %cond.true.i7 ], [ %conv3.i12, %cond.false.i10 ] %cmp = icmp sgt i32 %cond.i9, 47 br i1 %cmp, label %do.body, label %do.end, !llvm.loop !17 do.end: ; preds = %getchar_unlocked.exit13 ret i32 %add } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable define dso_local i32 @identical(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #1 { entry: tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(102) @f, i8 0, i64 102, i1 false) %arrayidx = getelementptr inbounds i32, ptr %a, i64 1 %0 = load i32, ptr %arrayidx, align 4, !tbaa !19 %idxprom1 = sext i32 %0 to i64 %arrayidx2 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1 %1 = load i8, ptr %arrayidx2, align 1, !tbaa !16 %inc = add i8 %1, 1 store i8 %inc, ptr %arrayidx2, align 1, !tbaa !16 %arrayidx.1 = getelementptr inbounds i32, ptr %a, i64 2 %2 = load i32, ptr %arrayidx.1, align 4, !tbaa !19 %idxprom1.1 = sext i32 %2 to i64 %arrayidx2.1 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1.1 %3 = load i8, ptr %arrayidx2.1, align 1, !tbaa !16 %inc.1 = add i8 %3, 1 store i8 %inc.1, ptr %arrayidx2.1, align 1, !tbaa !16 %arrayidx.2 = getelementptr inbounds i32, ptr %a, i64 3 %4 = load i32, ptr %arrayidx.2, align 4, !tbaa !19 %idxprom1.2 = sext i32 %4 to i64 %arrayidx2.2 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1.2 %5 = load i8, ptr %arrayidx2.2, align 1, !tbaa !16 %inc.2 = add i8 %5, 1 store i8 %inc.2, ptr %arrayidx2.2, align 1, !tbaa !16 %arrayidx.3 = getelementptr inbounds i32, ptr %a, i64 4 %6 = load i32, ptr %arrayidx.3, align 4, !tbaa !19 %idxprom1.3 = sext i32 %6 to i64 %arrayidx2.3 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1.3 %7 = load i8, ptr %arrayidx2.3, align 1, !tbaa !16 %inc.3 = add i8 %7, 1 store i8 %inc.3, ptr %arrayidx2.3, align 1, !tbaa !16 %arrayidx.4 = getelementptr inbounds i32, ptr %a, i64 5 %8 = load i32, ptr %arrayidx.4, align 4, !tbaa !19 %idxprom1.4 = sext i32 %8 to i64 %arrayidx2.4 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1.4 %9 = load i8, ptr %arrayidx2.4, align 1, !tbaa !16 %inc.4 = add i8 %9, 1 store i8 %inc.4, ptr %arrayidx2.4, align 1, !tbaa !16 %arrayidx.5 = getelementptr inbounds i32, ptr %a, i64 6 %10 = load i32, ptr %arrayidx.5, align 4, !tbaa !19 %idxprom1.5 = sext i32 %10 to i64 %arrayidx2.5 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom1.5 %11 = load i8, ptr %arrayidx2.5, align 1, !tbaa !16 %inc.5 = add i8 %11, 1 store i8 %inc.5, ptr %arrayidx2.5, align 1, !tbaa !16 %arrayidx8 = getelementptr inbounds i32, ptr %b, i64 1 %12 = load i32, ptr %arrayidx8, align 4, !tbaa !19 %idxprom9 = sext i32 %12 to i64 %arrayidx10 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9 %13 = load i8, ptr %arrayidx10, align 1, !tbaa !16 %dec = add i8 %13, -1 store i8 %dec, ptr %arrayidx10, align 1, !tbaa !16 %arrayidx8.1 = getelementptr inbounds i32, ptr %b, i64 2 %14 = load i32, ptr %arrayidx8.1, align 4, !tbaa !19 %idxprom9.1 = sext i32 %14 to i64 %arrayidx10.1 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9.1 %15 = load i8, ptr %arrayidx10.1, align 1, !tbaa !16 %dec.1 = add i8 %15, -1 store i8 %dec.1, ptr %arrayidx10.1, align 1, !tbaa !16 %arrayidx8.2 = getelementptr inbounds i32, ptr %b, i64 3 %16 = load i32, ptr %arrayidx8.2, align 4, !tbaa !19 %idxprom9.2 = sext i32 %16 to i64 %arrayidx10.2 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9.2 %17 = load i8, ptr %arrayidx10.2, align 1, !tbaa !16 %dec.2 = add i8 %17, -1 store i8 %dec.2, ptr %arrayidx10.2, align 1, !tbaa !16 %arrayidx8.3 = getelementptr inbounds i32, ptr %b, i64 4 %18 = load i32, ptr %arrayidx8.3, align 4, !tbaa !19 %idxprom9.3 = sext i32 %18 to i64 %arrayidx10.3 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9.3 %19 = load i8, ptr %arrayidx10.3, align 1, !tbaa !16 %dec.3 = add i8 %19, -1 store i8 %dec.3, ptr %arrayidx10.3, align 1, !tbaa !16 %arrayidx8.4 = getelementptr inbounds i32, ptr %b, i64 5 %20 = load i32, ptr %arrayidx8.4, align 4, !tbaa !19 %idxprom9.4 = sext i32 %20 to i64 %arrayidx10.4 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9.4 %21 = load i8, ptr %arrayidx10.4, align 1, !tbaa !16 %dec.4 = add i8 %21, -1 store i8 %dec.4, ptr %arrayidx10.4, align 1, !tbaa !16 %arrayidx8.5 = getelementptr inbounds i32, ptr %b, i64 6 %22 = load i32, ptr %arrayidx8.5, align 4, !tbaa !19 %idxprom9.5 = sext i32 %22 to i64 %arrayidx10.5 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom9.5 %23 = load i8, ptr %arrayidx10.5, align 1, !tbaa !16 %dec.5 = add i8 %23, -1 store i8 %dec.5, ptr %arrayidx10.5, align 1, !tbaa !16 %24 = load i32, ptr %arrayidx8, align 4, !tbaa !19 %idxprom19 = sext i32 %24 to i64 %arrayidx20 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19 %25 = load i8, ptr %arrayidx20, align 1, !tbaa !16 %tobool.not = icmp eq i8 %25, 0 br i1 %tobool.not, label %for.cond14, label %cleanup for.cond14: ; preds = %entry %26 = load i32, ptr %arrayidx8.1, align 4, !tbaa !19 %idxprom19.1 = sext i32 %26 to i64 %arrayidx20.1 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19.1 %27 = load i8, ptr %arrayidx20.1, align 1, !tbaa !16 %tobool.not.1 = icmp eq i8 %27, 0 br i1 %tobool.not.1, label %for.cond14.1, label %cleanup for.cond14.1: ; preds = %for.cond14 %28 = load i32, ptr %arrayidx8.2, align 4, !tbaa !19 %idxprom19.2 = sext i32 %28 to i64 %arrayidx20.2 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19.2 %29 = load i8, ptr %arrayidx20.2, align 1, !tbaa !16 %tobool.not.2 = icmp eq i8 %29, 0 br i1 %tobool.not.2, label %for.cond14.2, label %cleanup for.cond14.2: ; preds = %for.cond14.1 %30 = load i32, ptr %arrayidx8.3, align 4, !tbaa !19 %idxprom19.3 = sext i32 %30 to i64 %arrayidx20.3 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19.3 %31 = load i8, ptr %arrayidx20.3, align 1, !tbaa !16 %tobool.not.3 = icmp eq i8 %31, 0 br i1 %tobool.not.3, label %for.cond14.3, label %cleanup for.cond14.3: ; preds = %for.cond14.2 %32 = load i32, ptr %arrayidx8.4, align 4, !tbaa !19 %idxprom19.4 = sext i32 %32 to i64 %arrayidx20.4 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19.4 %33 = load i8, ptr %arrayidx20.4, align 1, !tbaa !16 %tobool.not.4 = icmp eq i8 %33, 0 br i1 %tobool.not.4, label %for.cond14.4, label %cleanup for.cond14.4: ; preds = %for.cond14.3 %34 = load i32, ptr %arrayidx8.5, align 4, !tbaa !19 %idxprom19.5 = sext i32 %34 to i64 %arrayidx20.5 = getelementptr inbounds [102 x i8], ptr @f, i64 0, i64 %idxprom19.5 %35 = load i8, ptr %arrayidx20.5, align 1, !tbaa !16 %tobool.not.5 = icmp eq i8 %35, 0 br i1 %tobool.not.5, label %for.body26, label %cleanup for.body26: ; preds = %for.cond14.4, %for.inc54 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc54 ], [ 0, %for.cond14.4 ] %arrayidx30 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 1 %36 = load i32, ptr %arrayidx30, align 4, !tbaa !19 %idxprom31 = sext i32 %36 to i64 %arrayidx32 = getelementptr inbounds i32, ptr %a, i64 %idxprom31 %37 = load i32, ptr %arrayidx32, align 4, !tbaa !19 %cmp33 = icmp eq i32 %24, %37 br i1 %cmp33, label %if.end38.preheader, label %for.inc54 if.end38.preheader: ; preds = %for.body26 %arrayidx44 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 2 %38 = load i32, ptr %arrayidx44, align 4, !tbaa !19 %idxprom45 = sext i32 %38 to i64 %arrayidx46 = getelementptr inbounds i32, ptr %a, i64 %idxprom45 %39 = load i32, ptr %arrayidx46, align 4, !tbaa !19 %cmp47.not = icmp eq i32 %26, %39 br i1 %cmp47.not, label %for.cond35, label %for.inc54 for.cond35: ; preds = %if.end38.preheader %arrayidx44.1 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 3 %40 = load i32, ptr %arrayidx44.1, align 4, !tbaa !19 %idxprom45.1 = sext i32 %40 to i64 %arrayidx46.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom45.1 %41 = load i32, ptr %arrayidx46.1, align 4, !tbaa !19 %cmp47.not.1 = icmp eq i32 %28, %41 br i1 %cmp47.not.1, label %for.cond35.1, label %for.inc54 for.cond35.1: ; preds = %for.cond35 %arrayidx44.2 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 4 %42 = load i32, ptr %arrayidx44.2, align 4, !tbaa !19 %idxprom45.2 = sext i32 %42 to i64 %arrayidx46.2 = getelementptr inbounds i32, ptr %a, i64 %idxprom45.2 %43 = load i32, ptr %arrayidx46.2, align 4, !tbaa !19 %cmp47.not.2 = icmp eq i32 %30, %43 br i1 %cmp47.not.2, label %for.cond35.2, label %for.inc54 for.cond35.2: ; preds = %for.cond35.1 %arrayidx44.3 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 5 %44 = load i32, ptr %arrayidx44.3, align 4, !tbaa !19 %idxprom45.3 = sext i32 %44 to i64 %arrayidx46.3 = getelementptr inbounds i32, ptr %a, i64 %idxprom45.3 %45 = load i32, ptr %arrayidx46.3, align 4, !tbaa !19 %cmp47.not.3 = icmp eq i32 %32, %45 br i1 %cmp47.not.3, label %for.cond35.3, label %for.inc54 for.cond35.3: ; preds = %for.cond35.2 %arrayidx44.4 = getelementptr inbounds [24 x [7 x i32]], ptr @rot, i64 0, i64 %indvars.iv, i64 6 %46 = load i32, ptr %arrayidx44.4, align 4, !tbaa !19 %idxprom45.4 = sext i32 %46 to i64 %arrayidx46.4 = getelementptr inbounds i32, ptr %a, i64 %idxprom45.4 %47 = load i32, ptr %arrayidx46.4, align 4, !tbaa !19 %cmp47.not.4 = icmp eq i32 %34, %47 br i1 %cmp47.not.4, label %cleanup, label %for.inc54 for.inc54: ; preds = %if.end38.preheader, %for.cond35, %for.cond35.1, %for.cond35.2, %for.cond35.3, %for.body26 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 24 br i1 %exitcond.not, label %cleanup, label %for.body26, !llvm.loop !20 cleanup: ; preds = %for.inc54, %for.cond35.3, %entry, %for.cond14, %for.cond14.1, %for.cond14.2, %for.cond14.3, %for.cond14.4 %retval.0 = phi i32 [ 0, %for.cond14.4 ], [ 0, %for.cond14.3 ], [ 0, %for.cond14.2 ], [ 0, %for.cond14.1 ], [ 0, %for.cond14 ], [ 0, %entry ], [ 0, %for.inc54 ], [ 1, %for.cond35.3 ] ret i32 %retval.0 } ; 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: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %_IO_read_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i.i, align 8, !tbaa !14 %cmp.not.i.i = icmp ult ptr %1, %2 br i1 %cmp.not.i.i, label %cond.false.i.i, label %cond.true.i.i, !prof !15 cond.true.i.i: ; preds = %entry %call.i.i = tail call i32 @__uflow(ptr noundef nonnull %0) #5 %.pre14.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i.preheader cond.false.i.i: ; preds = %entry %incdec.ptr.i.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i.i, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i.i = zext i8 %3 to i32 br label %do.body.i.preheader do.body.i.preheader: ; preds = %cond.false.i.i, %cond.true.i.i %.ph141 = phi ptr [ %0, %cond.false.i.i ], [ %.pre14.pre.i, %cond.true.i.i ] %c.0.i.ph = phi i32 [ %conv3.i.i, %cond.false.i.i ], [ %call.i.i, %cond.true.i.i ] br label %do.body.i do.body.i: ; preds = %do.body.i.preheader, %getchar_unlocked.exit13.i %4 = phi ptr [ %8, %getchar_unlocked.exit13.i ], [ %.ph141, %do.body.i.preheader ] %n.0.i = phi i32 [ %add.i, %getchar_unlocked.exit13.i ], [ 0, %do.body.i.preheader ] %c.0.i = phi i32 [ %cond.i9.i, %getchar_unlocked.exit13.i ], [ %c.0.i.ph, %do.body.i.preheader ] %mul.i = mul nsw i32 %n.0.i, 10 %and.i = and i32 %c.0.i, 15 %add.i = add nsw i32 %and.i, %mul.i %_IO_read_ptr.i4.i = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 1 %5 = load ptr, ptr %_IO_read_ptr.i4.i, align 8, !tbaa !9 %_IO_read_end.i5.i = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 2 %6 = load ptr, ptr %_IO_read_end.i5.i, align 8, !tbaa !14 %cmp.not.i6.i = icmp ult ptr %5, %6 br i1 %cmp.not.i6.i, label %cond.false.i10.i, label %cond.true.i7.i, !prof !15 cond.true.i7.i: ; preds = %do.body.i %call.i8.i = tail call i32 @__uflow(ptr noundef nonnull %4) #5 %.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i cond.false.i10.i: ; preds = %do.body.i %incdec.ptr.i11.i = getelementptr inbounds i8, ptr %5, i64 1 store ptr %incdec.ptr.i11.i, ptr %_IO_read_ptr.i4.i, align 8, !tbaa !9 %7 = load i8, ptr %5, align 1, !tbaa !16 %conv3.i12.i = zext i8 %7 to i32 br label %getchar_unlocked.exit13.i getchar_unlocked.exit13.i: ; preds = %cond.false.i10.i, %cond.true.i7.i %8 = phi ptr [ %.pre.i, %cond.true.i7.i ], [ %4, %cond.false.i10.i ] %cond.i9.i = phi i32 [ %call.i8.i, %cond.true.i7.i ], [ %conv3.i12.i, %cond.false.i10.i ] %cmp.i = icmp sgt i32 %cond.i9.i, 47 br i1 %cmp.i, label %do.body.i, label %for.cond.preheader, !llvm.loop !17 for.cond.preheader: ; preds = %getchar_unlocked.exit13.i %cmp76 = icmp sgt i32 %add.i, 0 br i1 %cmp76, label %for.cond1.preheader.preheader, label %done for.cond1.preheader.preheader: ; preds = %for.cond.preheader %wide.trip.count = zext i32 %add.i to i64 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %in.exit73.5 %9 = phi ptr [ %8, %for.cond1.preheader.preheader ], [ %70, %in.exit73.5 ] %10 = phi ptr [ %8, %for.cond1.preheader.preheader ], [ %71, %in.exit73.5 ] %indvars.iv = phi i64 [ 0, %for.cond1.preheader.preheader ], [ %indvars.iv.next, %in.exit73.5 ] %_IO_read_ptr.i.i43 = getelementptr inbounds %struct._IO_FILE, ptr %10, i64 0, i32 1 %11 = load ptr, ptr %_IO_read_ptr.i.i43, align 8, !tbaa !9 %_IO_read_end.i.i44 = getelementptr inbounds %struct._IO_FILE, ptr %10, i64 0, i32 2 %12 = load ptr, ptr %_IO_read_end.i.i44, align 8, !tbaa !14 %cmp.not.i.i45 = icmp ult ptr %11, %12 br i1 %cmp.not.i.i45, label %cond.false.i.i70, label %cond.true.i.i46, !prof !15 for.cond10.preheader: ; preds = %in.exit73.5 br i1 %cmp76, label %for.body12.preheader, label %done for.body12.preheader: ; preds = %for.cond10.preheader %13 = zext i32 %add.i to i64 %wide.trip.count93 = zext i32 %add.i to i64 br label %for.body12 cond.true.i.i46: ; preds = %for.cond1.preheader %call.i.i47 = tail call i32 @__uflow(ptr noundef nonnull %10) #5 %.pre14.pre.i48 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.preheader cond.false.i.i70: ; preds = %for.cond1.preheader %incdec.ptr.i.i71 = getelementptr inbounds i8, ptr %11, i64 1 store ptr %incdec.ptr.i.i71, ptr %_IO_read_ptr.i.i43, align 8, !tbaa !9 %14 = load i8, ptr %11, align 1, !tbaa !16 %conv3.i.i72 = zext i8 %14 to i32 br label %do.body.i52.preheader do.body.i52.preheader: ; preds = %cond.false.i.i70, %cond.true.i.i46 %.ph129 = phi ptr [ %9, %cond.false.i.i70 ], [ %.pre14.pre.i48, %cond.true.i.i46 ] %.ph130 = phi ptr [ %10, %cond.false.i.i70 ], [ %.pre14.pre.i48, %cond.true.i.i46 ] %c.0.i54.ph = phi i32 [ %conv3.i.i72, %cond.false.i.i70 ], [ %call.i.i47, %cond.true.i.i46 ] br label %do.body.i52 do.body.i52: ; preds = %do.body.i52.preheader, %getchar_unlocked.exit13.i64 %15 = phi ptr [ %20, %getchar_unlocked.exit13.i64 ], [ %.ph129, %do.body.i52.preheader ] %16 = phi ptr [ %21, %getchar_unlocked.exit13.i64 ], [ %.ph130, %do.body.i52.preheader ] %n.0.i53 = phi i32 [ %add.i57, %getchar_unlocked.exit13.i64 ], [ 0, %do.body.i52.preheader ] %c.0.i54 = phi i32 [ %cond.i9.i65, %getchar_unlocked.exit13.i64 ], [ %c.0.i54.ph, %do.body.i52.preheader ] %mul.i55 = mul nsw i32 %n.0.i53, 10 %and.i56 = and i32 %c.0.i54, 15 %add.i57 = add nsw i32 %and.i56, %mul.i55 %_IO_read_ptr.i4.i58 = getelementptr inbounds %struct._IO_FILE, ptr %16, i64 0, i32 1 %17 = load ptr, ptr %_IO_read_ptr.i4.i58, align 8, !tbaa !9 %_IO_read_end.i5.i59 = getelementptr inbounds %struct._IO_FILE, ptr %16, i64 0, i32 2 %18 = load ptr, ptr %_IO_read_end.i5.i59, align 8, !tbaa !14 %cmp.not.i6.i60 = icmp ult ptr %17, %18 br i1 %cmp.not.i6.i60, label %cond.false.i10.i67, label %cond.true.i7.i61, !prof !15 cond.true.i7.i61: ; preds = %do.body.i52 %call.i8.i62 = tail call i32 @__uflow(ptr noundef nonnull %16) #5 %.pre.i63 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64 cond.false.i10.i67: ; preds = %do.body.i52 %incdec.ptr.i11.i68 = getelementptr inbounds i8, ptr %17, i64 1 store ptr %incdec.ptr.i11.i68, ptr %_IO_read_ptr.i4.i58, align 8, !tbaa !9 %19 = load i8, ptr %17, align 1, !tbaa !16 %conv3.i12.i69 = zext i8 %19 to i32 br label %getchar_unlocked.exit13.i64 getchar_unlocked.exit13.i64: ; preds = %cond.false.i10.i67, %cond.true.i7.i61 %20 = phi ptr [ %.pre.i63, %cond.true.i7.i61 ], [ %15, %cond.false.i10.i67 ] %21 = phi ptr [ %.pre.i63, %cond.true.i7.i61 ], [ %16, %cond.false.i10.i67 ] %cond.i9.i65 = phi i32 [ %call.i8.i62, %cond.true.i7.i61 ], [ %conv3.i12.i69, %cond.false.i10.i67 ] %cmp.i66 = icmp sgt i32 %cond.i9.i65, 47 br i1 %cmp.i66, label %do.body.i52, label %in.exit73, !llvm.loop !17 in.exit73: ; preds = %getchar_unlocked.exit13.i64 %arrayidx6 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 1 store i32 %add.i57, ptr %arrayidx6, align 4, !tbaa !19 %_IO_read_ptr.i.i43.1 = getelementptr inbounds %struct._IO_FILE, ptr %21, i64 0, i32 1 %22 = load ptr, ptr %_IO_read_ptr.i.i43.1, align 8, !tbaa !9 %_IO_read_end.i.i44.1 = getelementptr inbounds %struct._IO_FILE, ptr %21, i64 0, i32 2 %23 = load ptr, ptr %_IO_read_end.i.i44.1, align 8, !tbaa !14 %cmp.not.i.i45.1 = icmp ult ptr %22, %23 br i1 %cmp.not.i.i45.1, label %cond.false.i.i70.1, label %cond.true.i.i46.1, !prof !15 cond.true.i.i46.1: ; preds = %in.exit73 %call.i.i47.1 = tail call i32 @__uflow(ptr noundef nonnull %21) #5 %.pre14.pre.i48.1 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.1.preheader cond.false.i.i70.1: ; preds = %in.exit73 %incdec.ptr.i.i71.1 = getelementptr inbounds i8, ptr %22, i64 1 store ptr %incdec.ptr.i.i71.1, ptr %_IO_read_ptr.i.i43.1, align 8, !tbaa !9 %24 = load i8, ptr %22, align 1, !tbaa !16 %conv3.i.i72.1 = zext i8 %24 to i32 br label %do.body.i52.1.preheader do.body.i52.1.preheader: ; preds = %cond.false.i.i70.1, %cond.true.i.i46.1 %.ph127 = phi ptr [ %20, %cond.false.i.i70.1 ], [ %.pre14.pre.i48.1, %cond.true.i.i46.1 ] %.ph128 = phi ptr [ %21, %cond.false.i.i70.1 ], [ %.pre14.pre.i48.1, %cond.true.i.i46.1 ] %c.0.i54.1.ph = phi i32 [ %conv3.i.i72.1, %cond.false.i.i70.1 ], [ %call.i.i47.1, %cond.true.i.i46.1 ] br label %do.body.i52.1 do.body.i52.1: ; preds = %do.body.i52.1.preheader, %getchar_unlocked.exit13.i64.1 %25 = phi ptr [ %30, %getchar_unlocked.exit13.i64.1 ], [ %.ph127, %do.body.i52.1.preheader ] %26 = phi ptr [ %31, %getchar_unlocked.exit13.i64.1 ], [ %.ph128, %do.body.i52.1.preheader ] %n.0.i53.1 = phi i32 [ %add.i57.1, %getchar_unlocked.exit13.i64.1 ], [ 0, %do.body.i52.1.preheader ] %c.0.i54.1 = phi i32 [ %cond.i9.i65.1, %getchar_unlocked.exit13.i64.1 ], [ %c.0.i54.1.ph, %do.body.i52.1.preheader ] %mul.i55.1 = mul nsw i32 %n.0.i53.1, 10 %and.i56.1 = and i32 %c.0.i54.1, 15 %add.i57.1 = add nsw i32 %and.i56.1, %mul.i55.1 %_IO_read_ptr.i4.i58.1 = getelementptr inbounds %struct._IO_FILE, ptr %26, i64 0, i32 1 %27 = load ptr, ptr %_IO_read_ptr.i4.i58.1, align 8, !tbaa !9 %_IO_read_end.i5.i59.1 = getelementptr inbounds %struct._IO_FILE, ptr %26, i64 0, i32 2 %28 = load ptr, ptr %_IO_read_end.i5.i59.1, align 8, !tbaa !14 %cmp.not.i6.i60.1 = icmp ult ptr %27, %28 br i1 %cmp.not.i6.i60.1, label %cond.false.i10.i67.1, label %cond.true.i7.i61.1, !prof !15 cond.true.i7.i61.1: ; preds = %do.body.i52.1 %call.i8.i62.1 = tail call i32 @__uflow(ptr noundef nonnull %26) #5 %.pre.i63.1 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64.1 cond.false.i10.i67.1: ; preds = %do.body.i52.1 %incdec.ptr.i11.i68.1 = getelementptr inbounds i8, ptr %27, i64 1 store ptr %incdec.ptr.i11.i68.1, ptr %_IO_read_ptr.i4.i58.1, align 8, !tbaa !9 %29 = load i8, ptr %27, align 1, !tbaa !16 %conv3.i12.i69.1 = zext i8 %29 to i32 br label %getchar_unlocked.exit13.i64.1 getchar_unlocked.exit13.i64.1: ; preds = %cond.false.i10.i67.1, %cond.true.i7.i61.1 %30 = phi ptr [ %.pre.i63.1, %cond.true.i7.i61.1 ], [ %25, %cond.false.i10.i67.1 ] %31 = phi ptr [ %.pre.i63.1, %cond.true.i7.i61.1 ], [ %26, %cond.false.i10.i67.1 ] %cond.i9.i65.1 = phi i32 [ %call.i8.i62.1, %cond.true.i7.i61.1 ], [ %conv3.i12.i69.1, %cond.false.i10.i67.1 ] %cmp.i66.1 = icmp sgt i32 %cond.i9.i65.1, 47 br i1 %cmp.i66.1, label %do.body.i52.1, label %in.exit73.1, !llvm.loop !17 in.exit73.1: ; preds = %getchar_unlocked.exit13.i64.1 %arrayidx6.1 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 2 store i32 %add.i57.1, ptr %arrayidx6.1, align 4, !tbaa !19 %_IO_read_ptr.i.i43.2 = getelementptr inbounds %struct._IO_FILE, ptr %31, i64 0, i32 1 %32 = load ptr, ptr %_IO_read_ptr.i.i43.2, align 8, !tbaa !9 %_IO_read_end.i.i44.2 = getelementptr inbounds %struct._IO_FILE, ptr %31, i64 0, i32 2 %33 = load ptr, ptr %_IO_read_end.i.i44.2, align 8, !tbaa !14 %cmp.not.i.i45.2 = icmp ult ptr %32, %33 br i1 %cmp.not.i.i45.2, label %cond.false.i.i70.2, label %cond.true.i.i46.2, !prof !15 cond.true.i.i46.2: ; preds = %in.exit73.1 %call.i.i47.2 = tail call i32 @__uflow(ptr noundef nonnull %31) #5 %.pre14.pre.i48.2 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.2.preheader cond.false.i.i70.2: ; preds = %in.exit73.1 %incdec.ptr.i.i71.2 = getelementptr inbounds i8, ptr %32, i64 1 store ptr %incdec.ptr.i.i71.2, ptr %_IO_read_ptr.i.i43.2, align 8, !tbaa !9 %34 = load i8, ptr %32, align 1, !tbaa !16 %conv3.i.i72.2 = zext i8 %34 to i32 br label %do.body.i52.2.preheader do.body.i52.2.preheader: ; preds = %cond.false.i.i70.2, %cond.true.i.i46.2 %.ph125 = phi ptr [ %30, %cond.false.i.i70.2 ], [ %.pre14.pre.i48.2, %cond.true.i.i46.2 ] %.ph126 = phi ptr [ %31, %cond.false.i.i70.2 ], [ %.pre14.pre.i48.2, %cond.true.i.i46.2 ] %c.0.i54.2.ph = phi i32 [ %conv3.i.i72.2, %cond.false.i.i70.2 ], [ %call.i.i47.2, %cond.true.i.i46.2 ] br label %do.body.i52.2 do.body.i52.2: ; preds = %do.body.i52.2.preheader, %getchar_unlocked.exit13.i64.2 %35 = phi ptr [ %40, %getchar_unlocked.exit13.i64.2 ], [ %.ph125, %do.body.i52.2.preheader ] %36 = phi ptr [ %41, %getchar_unlocked.exit13.i64.2 ], [ %.ph126, %do.body.i52.2.preheader ] %n.0.i53.2 = phi i32 [ %add.i57.2, %getchar_unlocked.exit13.i64.2 ], [ 0, %do.body.i52.2.preheader ] %c.0.i54.2 = phi i32 [ %cond.i9.i65.2, %getchar_unlocked.exit13.i64.2 ], [ %c.0.i54.2.ph, %do.body.i52.2.preheader ] %mul.i55.2 = mul nsw i32 %n.0.i53.2, 10 %and.i56.2 = and i32 %c.0.i54.2, 15 %add.i57.2 = add nsw i32 %and.i56.2, %mul.i55.2 %_IO_read_ptr.i4.i58.2 = getelementptr inbounds %struct._IO_FILE, ptr %36, i64 0, i32 1 %37 = load ptr, ptr %_IO_read_ptr.i4.i58.2, align 8, !tbaa !9 %_IO_read_end.i5.i59.2 = getelementptr inbounds %struct._IO_FILE, ptr %36, i64 0, i32 2 %38 = load ptr, ptr %_IO_read_end.i5.i59.2, align 8, !tbaa !14 %cmp.not.i6.i60.2 = icmp ult ptr %37, %38 br i1 %cmp.not.i6.i60.2, label %cond.false.i10.i67.2, label %cond.true.i7.i61.2, !prof !15 cond.true.i7.i61.2: ; preds = %do.body.i52.2 %call.i8.i62.2 = tail call i32 @__uflow(ptr noundef nonnull %36) #5 %.pre.i63.2 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64.2 cond.false.i10.i67.2: ; preds = %do.body.i52.2 %incdec.ptr.i11.i68.2 = getelementptr inbounds i8, ptr %37, i64 1 store ptr %incdec.ptr.i11.i68.2, ptr %_IO_read_ptr.i4.i58.2, align 8, !tbaa !9 %39 = load i8, ptr %37, align 1, !tbaa !16 %conv3.i12.i69.2 = zext i8 %39 to i32 br label %getchar_unlocked.exit13.i64.2 getchar_unlocked.exit13.i64.2: ; preds = %cond.false.i10.i67.2, %cond.true.i7.i61.2 %40 = phi ptr [ %.pre.i63.2, %cond.true.i7.i61.2 ], [ %35, %cond.false.i10.i67.2 ] %41 = phi ptr [ %.pre.i63.2, %cond.true.i7.i61.2 ], [ %36, %cond.false.i10.i67.2 ] %cond.i9.i65.2 = phi i32 [ %call.i8.i62.2, %cond.true.i7.i61.2 ], [ %conv3.i12.i69.2, %cond.false.i10.i67.2 ] %cmp.i66.2 = icmp sgt i32 %cond.i9.i65.2, 47 br i1 %cmp.i66.2, label %do.body.i52.2, label %in.exit73.2, !llvm.loop !17 in.exit73.2: ; preds = %getchar_unlocked.exit13.i64.2 %arrayidx6.2 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 3 store i32 %add.i57.2, ptr %arrayidx6.2, align 4, !tbaa !19 %_IO_read_ptr.i.i43.3 = getelementptr inbounds %struct._IO_FILE, ptr %41, i64 0, i32 1 %42 = load ptr, ptr %_IO_read_ptr.i.i43.3, align 8, !tbaa !9 %_IO_read_end.i.i44.3 = getelementptr inbounds %struct._IO_FILE, ptr %41, i64 0, i32 2 %43 = load ptr, ptr %_IO_read_end.i.i44.3, align 8, !tbaa !14 %cmp.not.i.i45.3 = icmp ult ptr %42, %43 br i1 %cmp.not.i.i45.3, label %cond.false.i.i70.3, label %cond.true.i.i46.3, !prof !15 cond.true.i.i46.3: ; preds = %in.exit73.2 %call.i.i47.3 = tail call i32 @__uflow(ptr noundef nonnull %41) #5 %.pre14.pre.i48.3 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.3.preheader cond.false.i.i70.3: ; preds = %in.exit73.2 %incdec.ptr.i.i71.3 = getelementptr inbounds i8, ptr %42, i64 1 store ptr %incdec.ptr.i.i71.3, ptr %_IO_read_ptr.i.i43.3, align 8, !tbaa !9 %44 = load i8, ptr %42, align 1, !tbaa !16 %conv3.i.i72.3 = zext i8 %44 to i32 br label %do.body.i52.3.preheader do.body.i52.3.preheader: ; preds = %cond.false.i.i70.3, %cond.true.i.i46.3 %.ph123 = phi ptr [ %40, %cond.false.i.i70.3 ], [ %.pre14.pre.i48.3, %cond.true.i.i46.3 ] %.ph124 = phi ptr [ %41, %cond.false.i.i70.3 ], [ %.pre14.pre.i48.3, %cond.true.i.i46.3 ] %c.0.i54.3.ph = phi i32 [ %conv3.i.i72.3, %cond.false.i.i70.3 ], [ %call.i.i47.3, %cond.true.i.i46.3 ] br label %do.body.i52.3 do.body.i52.3: ; preds = %do.body.i52.3.preheader, %getchar_unlocked.exit13.i64.3 %45 = phi ptr [ %50, %getchar_unlocked.exit13.i64.3 ], [ %.ph123, %do.body.i52.3.preheader ] %46 = phi ptr [ %51, %getchar_unlocked.exit13.i64.3 ], [ %.ph124, %do.body.i52.3.preheader ] %n.0.i53.3 = phi i32 [ %add.i57.3, %getchar_unlocked.exit13.i64.3 ], [ 0, %do.body.i52.3.preheader ] %c.0.i54.3 = phi i32 [ %cond.i9.i65.3, %getchar_unlocked.exit13.i64.3 ], [ %c.0.i54.3.ph, %do.body.i52.3.preheader ] %mul.i55.3 = mul nsw i32 %n.0.i53.3, 10 %and.i56.3 = and i32 %c.0.i54.3, 15 %add.i57.3 = add nsw i32 %and.i56.3, %mul.i55.3 %_IO_read_ptr.i4.i58.3 = getelementptr inbounds %struct._IO_FILE, ptr %46, i64 0, i32 1 %47 = load ptr, ptr %_IO_read_ptr.i4.i58.3, align 8, !tbaa !9 %_IO_read_end.i5.i59.3 = getelementptr inbounds %struct._IO_FILE, ptr %46, i64 0, i32 2 %48 = load ptr, ptr %_IO_read_end.i5.i59.3, align 8, !tbaa !14 %cmp.not.i6.i60.3 = icmp ult ptr %47, %48 br i1 %cmp.not.i6.i60.3, label %cond.false.i10.i67.3, label %cond.true.i7.i61.3, !prof !15 cond.true.i7.i61.3: ; preds = %do.body.i52.3 %call.i8.i62.3 = tail call i32 @__uflow(ptr noundef nonnull %46) #5 %.pre.i63.3 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64.3 cond.false.i10.i67.3: ; preds = %do.body.i52.3 %incdec.ptr.i11.i68.3 = getelementptr inbounds i8, ptr %47, i64 1 store ptr %incdec.ptr.i11.i68.3, ptr %_IO_read_ptr.i4.i58.3, align 8, !tbaa !9 %49 = load i8, ptr %47, align 1, !tbaa !16 %conv3.i12.i69.3 = zext i8 %49 to i32 br label %getchar_unlocked.exit13.i64.3 getchar_unlocked.exit13.i64.3: ; preds = %cond.false.i10.i67.3, %cond.true.i7.i61.3 %50 = phi ptr [ %.pre.i63.3, %cond.true.i7.i61.3 ], [ %45, %cond.false.i10.i67.3 ] %51 = phi ptr [ %.pre.i63.3, %cond.true.i7.i61.3 ], [ %46, %cond.false.i10.i67.3 ] %cond.i9.i65.3 = phi i32 [ %call.i8.i62.3, %cond.true.i7.i61.3 ], [ %conv3.i12.i69.3, %cond.false.i10.i67.3 ] %cmp.i66.3 = icmp sgt i32 %cond.i9.i65.3, 47 br i1 %cmp.i66.3, label %do.body.i52.3, label %in.exit73.3, !llvm.loop !17 in.exit73.3: ; preds = %getchar_unlocked.exit13.i64.3 %arrayidx6.3 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 4 store i32 %add.i57.3, ptr %arrayidx6.3, align 4, !tbaa !19 %_IO_read_ptr.i.i43.4 = getelementptr inbounds %struct._IO_FILE, ptr %51, i64 0, i32 1 %52 = load ptr, ptr %_IO_read_ptr.i.i43.4, align 8, !tbaa !9 %_IO_read_end.i.i44.4 = getelementptr inbounds %struct._IO_FILE, ptr %51, i64 0, i32 2 %53 = load ptr, ptr %_IO_read_end.i.i44.4, align 8, !tbaa !14 %cmp.not.i.i45.4 = icmp ult ptr %52, %53 br i1 %cmp.not.i.i45.4, label %cond.false.i.i70.4, label %cond.true.i.i46.4, !prof !15 cond.true.i.i46.4: ; preds = %in.exit73.3 %call.i.i47.4 = tail call i32 @__uflow(ptr noundef nonnull %51) #5 %.pre14.pre.i48.4 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.4.preheader cond.false.i.i70.4: ; preds = %in.exit73.3 %incdec.ptr.i.i71.4 = getelementptr inbounds i8, ptr %52, i64 1 store ptr %incdec.ptr.i.i71.4, ptr %_IO_read_ptr.i.i43.4, align 8, !tbaa !9 %54 = load i8, ptr %52, align 1, !tbaa !16 %conv3.i.i72.4 = zext i8 %54 to i32 br label %do.body.i52.4.preheader do.body.i52.4.preheader: ; preds = %cond.false.i.i70.4, %cond.true.i.i46.4 %.ph121 = phi ptr [ %50, %cond.false.i.i70.4 ], [ %.pre14.pre.i48.4, %cond.true.i.i46.4 ] %.ph122 = phi ptr [ %51, %cond.false.i.i70.4 ], [ %.pre14.pre.i48.4, %cond.true.i.i46.4 ] %c.0.i54.4.ph = phi i32 [ %conv3.i.i72.4, %cond.false.i.i70.4 ], [ %call.i.i47.4, %cond.true.i.i46.4 ] br label %do.body.i52.4 do.body.i52.4: ; preds = %do.body.i52.4.preheader, %getchar_unlocked.exit13.i64.4 %55 = phi ptr [ %60, %getchar_unlocked.exit13.i64.4 ], [ %.ph121, %do.body.i52.4.preheader ] %56 = phi ptr [ %61, %getchar_unlocked.exit13.i64.4 ], [ %.ph122, %do.body.i52.4.preheader ] %n.0.i53.4 = phi i32 [ %add.i57.4, %getchar_unlocked.exit13.i64.4 ], [ 0, %do.body.i52.4.preheader ] %c.0.i54.4 = phi i32 [ %cond.i9.i65.4, %getchar_unlocked.exit13.i64.4 ], [ %c.0.i54.4.ph, %do.body.i52.4.preheader ] %mul.i55.4 = mul nsw i32 %n.0.i53.4, 10 %and.i56.4 = and i32 %c.0.i54.4, 15 %add.i57.4 = add nsw i32 %and.i56.4, %mul.i55.4 %_IO_read_ptr.i4.i58.4 = getelementptr inbounds %struct._IO_FILE, ptr %56, i64 0, i32 1 %57 = load ptr, ptr %_IO_read_ptr.i4.i58.4, align 8, !tbaa !9 %_IO_read_end.i5.i59.4 = getelementptr inbounds %struct._IO_FILE, ptr %56, i64 0, i32 2 %58 = load ptr, ptr %_IO_read_end.i5.i59.4, align 8, !tbaa !14 %cmp.not.i6.i60.4 = icmp ult ptr %57, %58 br i1 %cmp.not.i6.i60.4, label %cond.false.i10.i67.4, label %cond.true.i7.i61.4, !prof !15 cond.true.i7.i61.4: ; preds = %do.body.i52.4 %call.i8.i62.4 = tail call i32 @__uflow(ptr noundef nonnull %56) #5 %.pre.i63.4 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64.4 cond.false.i10.i67.4: ; preds = %do.body.i52.4 %incdec.ptr.i11.i68.4 = getelementptr inbounds i8, ptr %57, i64 1 store ptr %incdec.ptr.i11.i68.4, ptr %_IO_read_ptr.i4.i58.4, align 8, !tbaa !9 %59 = load i8, ptr %57, align 1, !tbaa !16 %conv3.i12.i69.4 = zext i8 %59 to i32 br label %getchar_unlocked.exit13.i64.4 getchar_unlocked.exit13.i64.4: ; preds = %cond.false.i10.i67.4, %cond.true.i7.i61.4 %60 = phi ptr [ %.pre.i63.4, %cond.true.i7.i61.4 ], [ %55, %cond.false.i10.i67.4 ] %61 = phi ptr [ %.pre.i63.4, %cond.true.i7.i61.4 ], [ %56, %cond.false.i10.i67.4 ] %cond.i9.i65.4 = phi i32 [ %call.i8.i62.4, %cond.true.i7.i61.4 ], [ %conv3.i12.i69.4, %cond.false.i10.i67.4 ] %cmp.i66.4 = icmp sgt i32 %cond.i9.i65.4, 47 br i1 %cmp.i66.4, label %do.body.i52.4, label %in.exit73.4, !llvm.loop !17 in.exit73.4: ; preds = %getchar_unlocked.exit13.i64.4 %arrayidx6.4 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 5 store i32 %add.i57.4, ptr %arrayidx6.4, align 4, !tbaa !19 %_IO_read_ptr.i.i43.5 = getelementptr inbounds %struct._IO_FILE, ptr %60, i64 0, i32 1 %62 = load ptr, ptr %_IO_read_ptr.i.i43.5, align 8, !tbaa !9 %_IO_read_end.i.i44.5 = getelementptr inbounds %struct._IO_FILE, ptr %60, i64 0, i32 2 %63 = load ptr, ptr %_IO_read_end.i.i44.5, align 8, !tbaa !14 %cmp.not.i.i45.5 = icmp ult ptr %62, %63 br i1 %cmp.not.i.i45.5, label %cond.false.i.i70.5, label %cond.true.i.i46.5, !prof !15 cond.true.i.i46.5: ; preds = %in.exit73.4 %call.i.i47.5 = tail call i32 @__uflow(ptr noundef nonnull %60) #5 %.pre14.pre.i48.5 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %do.body.i52.5.preheader cond.false.i.i70.5: ; preds = %in.exit73.4 %incdec.ptr.i.i71.5 = getelementptr inbounds i8, ptr %62, i64 1 store ptr %incdec.ptr.i.i71.5, ptr %_IO_read_ptr.i.i43.5, align 8, !tbaa !9 %64 = load i8, ptr %62, align 1, !tbaa !16 %conv3.i.i72.5 = zext i8 %64 to i32 br label %do.body.i52.5.preheader do.body.i52.5.preheader: ; preds = %cond.false.i.i70.5, %cond.true.i.i46.5 %.ph120 = phi ptr [ %60, %cond.false.i.i70.5 ], [ %.pre14.pre.i48.5, %cond.true.i.i46.5 ] %c.0.i54.5.ph = phi i32 [ %conv3.i.i72.5, %cond.false.i.i70.5 ], [ %call.i.i47.5, %cond.true.i.i46.5 ] br label %do.body.i52.5 do.body.i52.5: ; preds = %do.body.i52.5.preheader, %getchar_unlocked.exit13.i64.5 %65 = phi ptr [ %70, %getchar_unlocked.exit13.i64.5 ], [ %.ph120, %do.body.i52.5.preheader ] %66 = phi ptr [ %71, %getchar_unlocked.exit13.i64.5 ], [ %.ph120, %do.body.i52.5.preheader ] %n.0.i53.5 = phi i32 [ %add.i57.5, %getchar_unlocked.exit13.i64.5 ], [ 0, %do.body.i52.5.preheader ] %c.0.i54.5 = phi i32 [ %cond.i9.i65.5, %getchar_unlocked.exit13.i64.5 ], [ %c.0.i54.5.ph, %do.body.i52.5.preheader ] %mul.i55.5 = mul nsw i32 %n.0.i53.5, 10 %and.i56.5 = and i32 %c.0.i54.5, 15 %add.i57.5 = add nsw i32 %and.i56.5, %mul.i55.5 %_IO_read_ptr.i4.i58.5 = getelementptr inbounds %struct._IO_FILE, ptr %66, i64 0, i32 1 %67 = load ptr, ptr %_IO_read_ptr.i4.i58.5, align 8, !tbaa !9 %_IO_read_end.i5.i59.5 = getelementptr inbounds %struct._IO_FILE, ptr %66, i64 0, i32 2 %68 = load ptr, ptr %_IO_read_end.i5.i59.5, align 8, !tbaa !14 %cmp.not.i6.i60.5 = icmp ult ptr %67, %68 br i1 %cmp.not.i6.i60.5, label %cond.false.i10.i67.5, label %cond.true.i7.i61.5, !prof !15 cond.true.i7.i61.5: ; preds = %do.body.i52.5 %call.i8.i62.5 = tail call i32 @__uflow(ptr noundef nonnull %66) #5 %.pre.i63.5 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit13.i64.5 cond.false.i10.i67.5: ; preds = %do.body.i52.5 %incdec.ptr.i11.i68.5 = getelementptr inbounds i8, ptr %67, i64 1 store ptr %incdec.ptr.i11.i68.5, ptr %_IO_read_ptr.i4.i58.5, align 8, !tbaa !9 %69 = load i8, ptr %67, align 1, !tbaa !16 %conv3.i12.i69.5 = zext i8 %69 to i32 br label %getchar_unlocked.exit13.i64.5 getchar_unlocked.exit13.i64.5: ; preds = %cond.false.i10.i67.5, %cond.true.i7.i61.5 %70 = phi ptr [ %.pre.i63.5, %cond.true.i7.i61.5 ], [ %65, %cond.false.i10.i67.5 ] %71 = phi ptr [ %.pre.i63.5, %cond.true.i7.i61.5 ], [ %66, %cond.false.i10.i67.5 ] %cond.i9.i65.5 = phi i32 [ %call.i8.i62.5, %cond.true.i7.i61.5 ], [ %conv3.i12.i69.5, %cond.false.i10.i67.5 ] %cmp.i66.5 = icmp sgt i32 %cond.i9.i65.5, 47 br i1 %cmp.i66.5, label %do.body.i52.5, label %in.exit73.5, !llvm.loop !17 in.exit73.5: ; preds = %getchar_unlocked.exit13.i64.5 %arrayidx6.5 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv, i64 6 store i32 %add.i57.5, ptr %arrayidx6.5, align 4, !tbaa !19 %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.cond10.preheader, label %for.cond1.preheader, !llvm.loop !21 for.cond10.loopexit: ; preds = %for.cond13, %for.body12 %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %exitcond94.not = icmp eq i64 %indvars.iv.next91, %wide.trip.count93 br i1 %exitcond94.not, label %done, label %for.body12, !llvm.loop !22 for.body12: ; preds = %for.body12.preheader, %for.cond10.loopexit %indvars.iv90 = phi i64 [ 0, %for.body12.preheader ], [ %indvars.iv.next91, %for.cond10.loopexit ] %indvars.iv85 = phi i64 [ 1, %for.body12.preheader ], [ %indvars.iv.next86, %for.cond10.loopexit ] %indvars.iv.next91 = add nuw nsw i64 %indvars.iv90, 1 %cmp1478 = icmp ult i64 %indvars.iv.next91, %13 br i1 %cmp1478, label %for.body15.lr.ph, label %for.cond10.loopexit for.body15.lr.ph: ; preds = %for.body12 %arrayidx17 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv90 br label %for.body15 for.cond13: ; preds = %for.body15 %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1 %72 = trunc i64 %indvars.iv.next88 to i32 %cmp14 = icmp sgt i32 %add.i, %72 br i1 %cmp14, label %for.body15, label %for.cond10.loopexit, !llvm.loop !23 for.body15: ; preds = %for.body15.lr.ph, %for.cond13 %indvars.iv87 = phi i64 [ %indvars.iv85, %for.body15.lr.ph ], [ %indvars.iv.next88, %for.cond13 ] %arrayidx19 = getelementptr inbounds [102 x [7 x i32]], ptr @a, i64 0, i64 %indvars.iv87 %call21 = tail call i32 @identical(ptr noundef nonnull %arrayidx17, ptr noundef nonnull %arrayidx19), !range !24 %tobool.not = icmp eq i32 %call21, 0 br i1 %tobool.not, label %for.cond13, label %done done: ; preds = %for.cond10.loopexit, %for.body15, %for.cond.preheader, %for.cond10.preheader %cond = phi ptr [ @.str, %for.cond10.preheader ], [ @.str, %for.cond.preheader ], [ @.str.1, %for.body15 ], [ @.str, %for.cond10.loopexit ] %call29 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) %cond) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 declare i32 @__uflow(ptr noundef) local_unnamed_addr #4 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 = { nofree nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 8} !10 = !{!"_IO_FILE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !12, i64 120, !13, i64 128, !7, i64 130, !7, i64 131, !6, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !11, i64 192, !7, i64 196} !11 = !{!"int", !7, i64 0} !12 = !{!"long", !7, i64 0} !13 = !{!"short", !7, i64 0} !14 = !{!10, !6, i64 16} !15 = !{!"branch_weights", i32 2000, i32 1} !16 = !{!7, !7, i64 0} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.mustprogress"} !19 = !{!11, !11, i64 0} !20 = distinct !{!20, !18} !21 = distinct !{!21, !18} !22 = distinct !{!22, !18} !23 = distinct !{!23, !18} !24 = !{i32 0, i32 2}
#include<stdio.h> void spin_w(int x[]){ int sai1[6],i; for(i=0;i<6;i++){ sai1[i]=x[i]; } sai1[0]=x[2]; sai1[2]=x[5]; sai1[3]=x[0]; sai1[5]=x[3]; for(i=0;i<6;i++){ x[i]=sai1[i]; } } void spin_side(int x[]){ int sai1[6],i; for(i=0;i<6;i++){ sai1[i]=x[i]; } sai1[1]=x[2]; sai1[2]=x[4]; sai1[3]=x[1]; sai1[4]=x[3]; for(i=0;i<6;i++){ x[i]=sai1[i]; } } void spin_s(int x[]){ int sai1[6],i; for(i=0;i<6;i++){ sai1[i]=x[i]; } sai1[0]=x[4]; sai1[1]=x[0]; sai1[4]=x[5]; sai1[5]=x[1]; for(i=0;i<6;i++){ x[i]=sai1[i]; } } int conf(int x[],int y[]){ int i,count=0,count2=0,a=0,sai1[6],sai2[6]; for(i=0;i<6;i++){ sai1[i]=x[i]; sai2[i]=y[i]; } for(i=0;i<6;i++){ if(sai1[i]==sai2[i]){ count++; } } if(count!=6){ for(i=0;i<=3;i++){ spin_w(sai1); count2++; if(sai1[0]==sai2[0])break; } if(count2==4){ for(i=0;i<=3;i++){ spin_s(sai1); if(sai1[0]==sai2[0])break; } } for(i=0;i<=3;i++){ spin_side(sai1); if(sai1[1]==sai2[1] && sai1[2]==sai2[2] && sai1[3]==sai2[3] && sai1[4]==sai2[4])break; } } count=0; for(i=0;i<6;i++){ if(sai1[i]==sai2[i]){ count++; } } if(count==6){ return 1; }else{ return 0; } } int main(){ int i,j,k,l,sai1[6],sai2[6],sai_c[105][6],n,a=0; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<6;j++){ scanf("%d",&sai_c[i][j]); } } for(i=0;i<n;i++){ for(j=0;j<6;j++){ sai1[j]=sai_c[i][j]; } for(k=i+1;k<n;k++){ for(l=0;l<6;l++){ sai2[l]=sai_c[k][l]; } if(conf(sai1,sai2)==1){ a++; } } } if(a==0){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135420/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135420/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @spin_w(ptr nocapture noundef %x) local_unnamed_addr #0 { entry: %sai1.sroa.540.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 8 %sai1.sroa.6.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 12 %sai1.sroa.747.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 20 %0 = load i32, ptr %sai1.sroa.540.0.x.sroa_idx, align 4, !tbaa !5 %1 = load i32, ptr %sai1.sroa.747.0.x.sroa_idx, align 4, !tbaa !5 %2 = load i32, ptr %x, align 4, !tbaa !5 %3 = load i32, ptr %sai1.sroa.6.0.x.sroa_idx, align 4, !tbaa !5 store i32 %0, ptr %x, align 4, !tbaa !5 store i32 %1, ptr %sai1.sroa.540.0.x.sroa_idx, align 4, !tbaa !5 store i32 %2, ptr %sai1.sroa.6.0.x.sroa_idx, align 4, !tbaa !5 store i32 %3, ptr %sai1.sroa.747.0.x.sroa_idx, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @spin_side(ptr nocapture noundef %x) local_unnamed_addr #0 { entry: %sai1.sroa.4.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 4 %0 = load <4 x i32>, ptr %sai1.sroa.4.0.x.sroa_idx, align 4, !tbaa !5 %1 = shufflevector <4 x i32> %0, <4 x i32> poison, <4 x i32> <i32 1, i32 3, i32 0, i32 2> store <4 x i32> %1, ptr %sai1.sroa.4.0.x.sroa_idx, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @spin_s(ptr nocapture noundef %x) local_unnamed_addr #0 { entry: %sai1.sroa.5.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 4 %sai1.sroa.642.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 16 %sai1.sroa.7.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 20 %0 = load i32, ptr %sai1.sroa.642.0.x.sroa_idx, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %2 = load i32, ptr %sai1.sroa.7.0.x.sroa_idx, align 4, !tbaa !5 %3 = load i32, ptr %sai1.sroa.5.0.x.sroa_idx, align 4, !tbaa !5 store i32 %0, ptr %x, align 4, !tbaa !5 store i32 %1, ptr %sai1.sroa.5.0.x.sroa_idx, align 4, !tbaa !5 store i32 %2, ptr %sai1.sroa.642.0.x.sroa_idx, align 4, !tbaa !5 store i32 %3, ptr %sai1.sroa.7.0.x.sroa_idx, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @conf(ptr nocapture noundef readonly %x, ptr nocapture noundef readonly %y) local_unnamed_addr #2 { entry: %sai1.sroa.0.0.copyload = load i32, ptr %x, align 4, !tbaa !5 %sai1.sroa.9.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 4 %sai1.sroa.9.0.copyload = load i32, ptr %sai1.sroa.9.0.x.sroa_idx, align 4, !tbaa !5 %sai1.sroa.15.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 8 %sai1.sroa.15.0.copyload = load i32, ptr %sai1.sroa.15.0.x.sroa_idx, align 4, !tbaa !5 %sai1.sroa.21.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 12 %sai1.sroa.21.0.copyload = load i32, ptr %sai1.sroa.21.0.x.sroa_idx, align 4, !tbaa !5 %sai1.sroa.27.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 16 %sai1.sroa.27.0.copyload = load i32, ptr %sai1.sroa.27.0.x.sroa_idx, align 4, !tbaa !5 %sai1.sroa.33.0.x.sroa_idx = getelementptr inbounds i8, ptr %x, i64 20 %sai1.sroa.33.0.copyload = load i32, ptr %sai1.sroa.33.0.x.sroa_idx, align 4, !tbaa !5 %sai2.sroa.0.0.copyload = load i32, ptr %y, align 4, !tbaa !5 %sai2.sroa.7.0.y.sroa_idx = getelementptr inbounds i8, ptr %y, i64 4 %sai2.sroa.7.0.copyload = load i32, ptr %sai2.sroa.7.0.y.sroa_idx, align 4, !tbaa !5 %sai2.sroa.10.0.y.sroa_idx = getelementptr inbounds i8, ptr %y, i64 8 %sai2.sroa.10.0.copyload = load i32, ptr %sai2.sroa.10.0.y.sroa_idx, align 4, !tbaa !5 %sai2.sroa.13.0.y.sroa_idx = getelementptr inbounds i8, ptr %y, i64 12 %sai2.sroa.13.0.copyload = load i32, ptr %sai2.sroa.13.0.y.sroa_idx, align 4, !tbaa !5 %sai2.sroa.16.0.y.sroa_idx = getelementptr inbounds i8, ptr %y, i64 16 %sai2.sroa.16.0.copyload = load i32, ptr %sai2.sroa.16.0.y.sroa_idx, align 4, !tbaa !5 %sai2.sroa.19.0.y.sroa_idx = getelementptr inbounds i8, ptr %y, i64 20 %sai2.sroa.19.0.copyload = load i32, ptr %sai2.sroa.19.0.y.sroa_idx, align 4, !tbaa !5 %cmp14 = icmp eq i32 %sai1.sroa.0.0.copyload, %sai2.sroa.0.0.copyload %inc15 = zext i1 %cmp14 to i32 %cmp14.1 = icmp eq i32 %sai1.sroa.9.0.copyload, %sai2.sroa.7.0.copyload %inc15.1 = zext i1 %cmp14.1 to i32 %spec.select.1 = add nuw nsw i32 %inc15, %inc15.1 %cmp14.2 = icmp eq i32 %sai1.sroa.15.0.copyload, %sai2.sroa.10.0.copyload %inc15.2 = zext i1 %cmp14.2 to i32 %spec.select.2 = add nuw nsw i32 %spec.select.1, %inc15.2 %cmp14.3 = icmp eq i32 %sai1.sroa.21.0.copyload, %sai2.sroa.13.0.copyload %inc15.3 = zext i1 %cmp14.3 to i32 %spec.select.3 = add nuw nsw i32 %spec.select.2, %inc15.3 %cmp14.4 = icmp eq i32 %sai1.sroa.27.0.copyload, %sai2.sroa.16.0.copyload %inc15.4 = zext i1 %cmp14.4 to i32 %spec.select.4 = add nuw nsw i32 %spec.select.3, %inc15.4 %cmp14.5 = icmp eq i32 %sai1.sroa.33.0.copyload, %sai2.sroa.19.0.copyload %inc15.5 = zext i1 %cmp14.5 to i32 %spec.select.5 = add nuw nsw i32 %spec.select.4, %inc15.5 %cmp19.not = icmp eq i32 %spec.select.5, 6 br i1 %cmp19.not, label %if.end71, label %for.cond21.preheader for.cond21.preheader: ; preds = %entry %cmp27 = icmp eq i32 %sai1.sroa.15.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27, label %if.end47, label %for.cond21 for.cond21: ; preds = %for.cond21.preheader %cmp27.1 = icmp eq i32 %sai1.sroa.33.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27.1, label %if.end47, label %for.cond21.1 for.cond21.1: ; preds = %for.cond21 %cmp27.2 = icmp eq i32 %sai1.sroa.21.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27.2, label %if.end47, label %for.cond35.preheader for.cond35.preheader: ; preds = %for.cond21.1 %cmp41 = icmp eq i32 %sai1.sroa.27.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp41, label %if.end47, label %for.cond35 for.cond35: ; preds = %for.cond35.preheader %cmp41.1 = icmp eq i32 %sai1.sroa.33.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp41.1, label %if.end47, label %for.cond35.1 for.cond35.1: ; preds = %for.cond35 %cmp41.2 = icmp eq i32 %sai1.sroa.9.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp41.2, label %if.end47, label %for.cond35.2 for.cond35.2: ; preds = %for.cond35.1 br label %if.end47 if.end47: ; preds = %for.cond35.2, %for.cond21.1, %for.cond21, %for.cond21.preheader, %for.cond35.preheader, %for.cond35, %for.cond35.1 %.lcssa143175 = phi i32 [ %sai1.sroa.21.0.copyload, %for.cond35.1 ], [ %sai1.sroa.21.0.copyload, %for.cond35 ], [ %sai1.sroa.21.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.33.0.copyload, %for.cond21.1 ], [ %sai1.sroa.15.0.copyload, %for.cond21 ], [ %sai1.sroa.0.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.21.0.copyload, %for.cond35.2 ] %.lcssa144174 = phi i32 [ %sai1.sroa.15.0.copyload, %for.cond35.1 ], [ %sai1.sroa.15.0.copyload, %for.cond35 ], [ %sai1.sroa.15.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.0.0.copyload, %for.cond21.1 ], [ %sai1.sroa.21.0.copyload, %for.cond21 ], [ %sai1.sroa.33.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.15.0.copyload, %for.cond35.2 ] %sai1.sroa.0.0 = phi i32 [ %sai1.sroa.9.0.copyload, %for.cond35.1 ], [ %sai2.sroa.0.0.copyload, %for.cond35 ], [ %sai1.sroa.27.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.21.0.copyload, %for.cond21.1 ], [ %sai1.sroa.33.0.copyload, %for.cond21 ], [ %sai1.sroa.15.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.0.0.copyload, %for.cond35.2 ] %sai1.sroa.9.0 = phi i32 [ %sai1.sroa.33.0.copyload, %for.cond35.1 ], [ %sai1.sroa.27.0.copyload, %for.cond35 ], [ %sai1.sroa.0.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.9.0.copyload, %for.cond21.1 ], [ %sai1.sroa.9.0.copyload, %for.cond21 ], [ %sai1.sroa.9.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.9.0.copyload, %for.cond35.2 ] %sai1.sroa.27.0 = phi i32 [ %sai1.sroa.0.0.copyload, %for.cond35.1 ], [ %sai1.sroa.9.0.copyload, %for.cond35 ], [ %sai1.sroa.33.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.27.0.copyload, %for.cond21.1 ], [ %sai1.sroa.27.0.copyload, %for.cond21 ], [ %sai1.sroa.27.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.27.0.copyload, %for.cond35.2 ] %sai1.sroa.33.0 = phi i32 [ %sai1.sroa.27.0.copyload, %for.cond35.1 ], [ %sai1.sroa.0.0.copyload, %for.cond35 ], [ %sai1.sroa.9.0.copyload, %for.cond35.preheader ], [ %sai1.sroa.15.0.copyload, %for.cond21.1 ], [ %sai1.sroa.0.0.copyload, %for.cond21 ], [ %sai1.sroa.21.0.copyload, %for.cond21.preheader ], [ %sai1.sroa.33.0.copyload, %for.cond35.2 ] %cmp54 = icmp eq i32 %.lcssa144174, %sai2.sroa.7.0.copyload %cmp57 = icmp eq i32 %sai1.sroa.27.0, %sai2.sroa.10.0.copyload %or.cond = select i1 %cmp54, i1 %cmp57, i1 false %cmp61 = icmp eq i32 %sai1.sroa.9.0, %sai2.sroa.13.0.copyload %or.cond120 = select i1 %or.cond, i1 %cmp61, i1 false %cmp65 = icmp eq i32 %.lcssa143175, %sai2.sroa.16.0.copyload %or.cond121 = select i1 %or.cond120, i1 %cmp65, i1 false br i1 %or.cond121, label %if.end71, label %for.cond48 for.cond48: ; preds = %if.end47 %cmp54.1 = icmp eq i32 %sai1.sroa.27.0, %sai2.sroa.7.0.copyload %cmp57.1 = icmp eq i32 %.lcssa143175, %sai2.sroa.10.0.copyload %or.cond.1 = select i1 %cmp54.1, i1 %cmp57.1, i1 false %cmp61.1 = icmp eq i32 %.lcssa144174, %sai2.sroa.13.0.copyload %or.cond120.1 = and i1 %or.cond.1, %cmp61.1 %cmp65.1 = icmp eq i32 %sai1.sroa.9.0, %sai2.sroa.16.0.copyload %or.cond121.1 = select i1 %or.cond120.1, i1 %cmp65.1, i1 false br i1 %or.cond121.1, label %if.end71, label %for.cond48.1 for.cond48.1: ; preds = %for.cond48 %cmp54.2 = icmp eq i32 %.lcssa143175, %sai2.sroa.7.0.copyload %cmp57.2 = icmp eq i32 %sai1.sroa.9.0, %sai2.sroa.10.0.copyload %or.cond.2 = select i1 %cmp54.2, i1 %cmp57.2, i1 false %cmp61.2 = icmp eq i32 %sai1.sroa.27.0, %sai2.sroa.13.0.copyload %or.cond120.2 = select i1 %or.cond.2, i1 %cmp61.2, i1 false %cmp65.2 = icmp eq i32 %.lcssa144174, %sai2.sroa.16.0.copyload %or.cond121.2 = and i1 %or.cond120.2, %cmp65.2 br i1 %or.cond121.2, label %if.end71, label %for.cond48.2 for.cond48.2: ; preds = %for.cond48.1 %cmp54.3 = icmp eq i32 %sai1.sroa.9.0, %sai2.sroa.7.0.copyload %cmp57.3 = icmp eq i32 %.lcssa144174, %sai2.sroa.10.0.copyload %or.cond.3 = and i1 %cmp54.3, %cmp57.3 %cmp61.3 = icmp eq i32 %.lcssa143175, %sai2.sroa.13.0.copyload %or.cond120.3 = select i1 %or.cond.3, i1 %cmp61.3, i1 false %cmp65.3 = icmp eq i32 %sai1.sroa.27.0, %sai2.sroa.16.0.copyload %or.cond121.3 = select i1 %or.cond120.3, i1 %cmp65.3, i1 false br i1 %or.cond121.3, label %if.end71, label %for.cond48.3 for.cond48.3: ; preds = %for.cond48.2 br label %if.end71 if.end71: ; preds = %if.end47, %for.cond48, %for.cond48.1, %for.cond48.2, %for.cond48.3, %entry %sai1.sroa.0.1 = phi i32 [ %sai1.sroa.0.0.copyload, %entry ], [ %sai1.sroa.0.0, %for.cond48.3 ], [ %sai1.sroa.0.0, %for.cond48.2 ], [ %sai1.sroa.0.0, %for.cond48.1 ], [ %sai1.sroa.0.0, %for.cond48 ], [ %sai1.sroa.0.0, %if.end47 ] %sai1.sroa.9.1 = phi i32 [ %sai1.sroa.9.0.copyload, %entry ], [ %sai1.sroa.9.0, %for.cond48.3 ], [ %sai2.sroa.7.0.copyload, %for.cond48.2 ], [ %sai2.sroa.7.0.copyload, %for.cond48.1 ], [ %sai2.sroa.7.0.copyload, %for.cond48 ], [ %sai2.sroa.7.0.copyload, %if.end47 ] %sai1.sroa.15.0 = phi i32 [ %sai1.sroa.15.0.copyload, %entry ], [ %.lcssa144174, %for.cond48.3 ], [ %sai2.sroa.10.0.copyload, %for.cond48.2 ], [ %sai2.sroa.10.0.copyload, %for.cond48.1 ], [ %sai2.sroa.10.0.copyload, %for.cond48 ], [ %sai2.sroa.10.0.copyload, %if.end47 ] %sai1.sroa.21.0 = phi i32 [ %sai1.sroa.21.0.copyload, %entry ], [ %.lcssa143175, %for.cond48.3 ], [ %sai2.sroa.13.0.copyload, %for.cond48.2 ], [ %sai2.sroa.13.0.copyload, %for.cond48.1 ], [ %sai2.sroa.13.0.copyload, %for.cond48 ], [ %sai2.sroa.13.0.copyload, %if.end47 ] %sai1.sroa.27.1 = phi i32 [ %sai1.sroa.27.0.copyload, %entry ], [ %sai1.sroa.27.0, %for.cond48.3 ], [ %sai2.sroa.16.0.copyload, %for.cond48.2 ], [ %sai2.sroa.16.0.copyload, %for.cond48.1 ], [ %sai2.sroa.16.0.copyload, %for.cond48 ], [ %sai2.sroa.16.0.copyload, %if.end47 ] %sai1.sroa.33.1 = phi i32 [ %sai1.sroa.33.0.copyload, %entry ], [ %sai1.sroa.33.0, %for.cond48.3 ], [ %sai1.sroa.33.0, %for.cond48.2 ], [ %sai1.sroa.33.0, %for.cond48.1 ], [ %sai1.sroa.33.0, %for.cond48 ], [ %sai1.sroa.33.0, %if.end47 ] %cmp79 = icmp eq i32 %sai1.sroa.0.1, %sai2.sroa.0.0.copyload %inc81 = zext i1 %cmp79 to i32 %cmp79.1 = icmp eq i32 %sai1.sroa.9.1, %sai2.sroa.7.0.copyload %inc81.1 = zext i1 %cmp79.1 to i32 %spec.select116.1 = add nuw nsw i32 %inc81, %inc81.1 %cmp79.2 = icmp eq i32 %sai1.sroa.15.0, %sai2.sroa.10.0.copyload %inc81.2 = zext i1 %cmp79.2 to i32 %spec.select116.2 = add nuw nsw i32 %spec.select116.1, %inc81.2 %cmp79.3 = icmp eq i32 %sai1.sroa.21.0, %sai2.sroa.13.0.copyload %inc81.3 = zext i1 %cmp79.3 to i32 %spec.select116.3 = add nuw nsw i32 %spec.select116.2, %inc81.3 %cmp79.4 = icmp eq i32 %sai1.sroa.27.1, %sai2.sroa.16.0.copyload %inc81.4 = zext i1 %cmp79.4 to i32 %spec.select116.4 = add nuw nsw i32 %spec.select116.3, %inc81.4 %cmp79.5 = icmp eq i32 %sai1.sroa.33.1, %sai2.sroa.19.0.copyload %inc81.5 = zext i1 %cmp79.5 to i32 %spec.select116.5 = add nuw nsw i32 %spec.select116.4, %inc81.5 %cmp86 = icmp eq i32 %spec.select116.5, 6 %. = zext i1 %cmp86 to i32 ret i32 %. } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %sai_c = alloca [105 x [6 x i32]], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 2520, ptr nonnull %sai_c) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp75 = icmp sgt i32 %0, 0 br i1 %cmp75, label %for.cond1.preheader, label %if.end54 for.cond1.preheader: ; preds = %entry, %for.cond1.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1.preheader ], [ 0, %entry ] %arrayidx5 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 0 %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %arrayidx5.1 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 1 %call6.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1) %arrayidx5.2 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 2 %call6.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2) %arrayidx5.3 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 3 %call6.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.3) %arrayidx5.4 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 4 %call6.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.4) %arrayidx5.5 = getelementptr inbounds [105 x [6 x i32]], ptr %sai_c, i64 0, i64 %indvars.iv, i64 5 %call6.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !9 for.cond10.preheader: ; preds = %for.cond1.preheader %cmp1183 = icmp sgt i32 %1, 0 br i1 %cmp1183, label %for.cond13.preheader.lr.ph, label %if.end54 for.cond13.preheader.lr.ph: ; preds = %for.cond10.preheader %wide.trip.count = zext i32 %1 to i64 %invariant.gep = getelementptr inbounds i8, ptr %sai_c, i64 24 br label %for.cond13.preheader for.cond10.loopexit: ; preds = %conf.exit, %for.cond13.preheader %a.1.lcssa = phi i32 [ %a.085, %for.cond13.preheader ], [ %spec.select, %conf.exit ] %exitcond102.not = icmp eq i64 %indvar.next, %wide.trip.count br i1 %exitcond102.not, label %for.end49, label %for.cond13.preheader, !llvm.loop !11 for.cond13.preheader: ; preds = %for.cond13.preheader.lr.ph, %for.cond10.loopexit %indvars.iv99.in = phi i32 [ %1, %for.cond13.preheader.lr.ph ], [ %indvars.iv99, %for.cond10.loopexit ] %indvar = phi i64 [ 0, %for.cond13.preheader.lr.ph ], [ %indvar.next, %for.cond10.loopexit ] %a.085 = phi i32 [ 0, %for.cond13.preheader.lr.ph ], [ %a.1.lcssa, %for.cond10.loopexit ] %indvars.iv99 = add i32 %indvars.iv99.in, -1 %3 = mul nuw nsw i64 %indvar, 24 %scevgep = getelementptr i8, ptr %sai_c, i64 %3 %sai1.sroa.0.0.copyload = load i32, ptr %scevgep, align 8, !tbaa !5 %sai1.sroa.4.0.scevgep.sroa_idx = getelementptr inbounds i8, ptr %scevgep, i64 4 %sai1.sroa.4.0.copyload = load i32, ptr %sai1.sroa.4.0.scevgep.sroa_idx, align 4, !tbaa !5 %sai1.sroa.5.0.scevgep.sroa_idx = getelementptr inbounds i8, ptr %scevgep, i64 8 %sai1.sroa.5.0.copyload = load i32, ptr %sai1.sroa.5.0.scevgep.sroa_idx, align 8, !tbaa !5 %sai1.sroa.6.0.scevgep.sroa_idx = getelementptr inbounds i8, ptr %scevgep, i64 12 %sai1.sroa.6.0.copyload = load i32, ptr %sai1.sroa.6.0.scevgep.sroa_idx, align 4, !tbaa !5 %sai1.sroa.7.0.scevgep.sroa_idx = getelementptr inbounds i8, ptr %scevgep, i64 16 %sai1.sroa.7.0.copyload = load i32, ptr %sai1.sroa.7.0.scevgep.sroa_idx, align 8, !tbaa !5 %sai1.sroa.8.0.scevgep.sroa_idx = getelementptr inbounds i8, ptr %scevgep, i64 20 %sai1.sroa.8.0.copyload = load i32, ptr %sai1.sroa.8.0.scevgep.sroa_idx, align 4, !tbaa !5 %indvar.next = add nuw nsw i64 %indvar, 1 %indvars = trunc i64 %indvar.next to i32 %cmp2679 = icmp sgt i32 %1, %indvars br i1 %cmp2679, label %for.cond28.preheader.lr.ph, label %for.cond10.loopexit for.cond28.preheader.lr.ph: ; preds = %for.cond13.preheader %gep = getelementptr i8, ptr %invariant.gep, i64 %3 br label %for.cond28.preheader for.cond28.preheader: ; preds = %for.cond28.preheader.lr.ph, %conf.exit %indvar93 = phi i64 [ 0, %for.cond28.preheader.lr.ph ], [ %indvar.next94, %conf.exit ] %a.181 = phi i32 [ %a.085, %for.cond28.preheader.lr.ph ], [ %spec.select, %conf.exit ] %4 = mul nuw nsw i64 %indvar93, 24 %scevgep95 = getelementptr i8, ptr %gep, i64 %4 %sai2.sroa.0.0.copyload = load i32, ptr %scevgep95, align 8, !tbaa !5 %sai2.sroa.4.0.scevgep95.sroa_idx = getelementptr inbounds i8, ptr %scevgep95, i64 4 %sai2.sroa.4.0.copyload = load i32, ptr %sai2.sroa.4.0.scevgep95.sroa_idx, align 4, !tbaa !5 %sai2.sroa.5.0.scevgep95.sroa_idx = getelementptr inbounds i8, ptr %scevgep95, i64 8 %sai2.sroa.5.0.copyload = load i32, ptr %sai2.sroa.5.0.scevgep95.sroa_idx, align 8, !tbaa !5 %sai2.sroa.6.0.scevgep95.sroa_idx = getelementptr inbounds i8, ptr %scevgep95, i64 12 %sai2.sroa.6.0.copyload = load i32, ptr %sai2.sroa.6.0.scevgep95.sroa_idx, align 4, !tbaa !5 %sai2.sroa.7.0.scevgep95.sroa_idx = getelementptr inbounds i8, ptr %scevgep95, i64 16 %sai2.sroa.7.0.copyload = load i32, ptr %sai2.sroa.7.0.scevgep95.sroa_idx, align 8, !tbaa !5 %sai2.sroa.8.0.scevgep95.sroa_idx = getelementptr inbounds i8, ptr %scevgep95, i64 20 %sai2.sroa.8.0.copyload = load i32, ptr %sai2.sroa.8.0.scevgep95.sroa_idx, align 4, !tbaa !5 %cmp14.i = icmp eq i32 %sai1.sroa.0.0.copyload, %sai2.sroa.0.0.copyload %inc15.i = zext i1 %cmp14.i to i32 %cmp14.1.i = icmp eq i32 %sai1.sroa.4.0.copyload, %sai2.sroa.4.0.copyload %inc15.1.i = zext i1 %cmp14.1.i to i32 %spec.select.1.i = add nuw nsw i32 %inc15.1.i, %inc15.i %cmp14.2.i = icmp eq i32 %sai1.sroa.5.0.copyload, %sai2.sroa.5.0.copyload %inc15.2.i = zext i1 %cmp14.2.i to i32 %spec.select.2.i = add nuw nsw i32 %spec.select.1.i, %inc15.2.i %cmp14.3.i = icmp eq i32 %sai1.sroa.6.0.copyload, %sai2.sroa.6.0.copyload %inc15.3.i = zext i1 %cmp14.3.i to i32 %spec.select.3.i = add nuw nsw i32 %spec.select.2.i, %inc15.3.i %cmp14.4.i = icmp eq i32 %sai1.sroa.7.0.copyload, %sai2.sroa.7.0.copyload %inc15.4.i = zext i1 %cmp14.4.i to i32 %spec.select.4.i = add nuw nsw i32 %spec.select.3.i, %inc15.4.i %cmp14.5.i = icmp eq i32 %sai1.sroa.8.0.copyload, %sai2.sroa.8.0.copyload %inc15.5.i = zext i1 %cmp14.5.i to i32 %spec.select.5.i = add nuw nsw i32 %spec.select.4.i, %inc15.5.i %cmp19.not.i = icmp eq i32 %spec.select.5.i, 6 br i1 %cmp19.not.i, label %conf.exit, label %for.cond21.preheader.i for.cond21.preheader.i: ; preds = %for.cond28.preheader %cmp27.i = icmp eq i32 %sai1.sroa.5.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27.i, label %if.end47.i, label %for.cond21.i for.cond21.i: ; preds = %for.cond21.preheader.i %cmp27.1.i = icmp eq i32 %sai1.sroa.8.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27.1.i, label %if.end47.i, label %for.cond21.1.i for.cond21.1.i: ; preds = %for.cond21.i %cmp27.2.i = icmp eq i32 %sai1.sroa.6.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp27.2.i, label %if.end47.i, label %for.cond35.preheader.i for.cond35.preheader.i: ; preds = %for.cond21.1.i %cmp41.i = icmp eq i32 %sai1.sroa.7.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp41.i, label %if.end47.i, label %for.cond35.1.i for.cond35.1.i: ; preds = %for.cond35.preheader.i %cmp41.2.i = icmp eq i32 %sai1.sroa.4.0.copyload, %sai2.sroa.0.0.copyload br i1 %cmp41.2.i, label %if.end47.i, label %for.cond35.2.i for.cond35.2.i: ; preds = %for.cond35.1.i br label %if.end47.i if.end47.i: ; preds = %for.cond35.2.i, %for.cond35.1.i, %for.cond35.preheader.i, %for.cond21.1.i, %for.cond21.i, %for.cond21.preheader.i %.lcssa143175.i = phi i32 [ %sai1.sroa.6.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.6.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.8.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.5.0.copyload, %for.cond21.i ], [ %sai1.sroa.0.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.6.0.copyload, %for.cond35.2.i ] %.lcssa144174.i = phi i32 [ %sai1.sroa.5.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.5.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.0.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.6.0.copyload, %for.cond21.i ], [ %sai1.sroa.8.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.5.0.copyload, %for.cond35.2.i ] %sai1.sroa.0.0.i = phi i32 [ %sai1.sroa.4.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.7.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.6.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.8.0.copyload, %for.cond21.i ], [ %sai1.sroa.5.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.0.0.copyload, %for.cond35.2.i ] %sai1.sroa.9.0.i = phi i32 [ %sai1.sroa.8.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.0.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.4.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.4.0.copyload, %for.cond21.i ], [ %sai1.sroa.4.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.4.0.copyload, %for.cond35.2.i ] %sai1.sroa.27.0.i = phi i32 [ %sai1.sroa.0.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.8.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.7.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.7.0.copyload, %for.cond21.i ], [ %sai1.sroa.7.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.7.0.copyload, %for.cond35.2.i ] %sai1.sroa.33.0.i = phi i32 [ %sai1.sroa.7.0.copyload, %for.cond35.1.i ], [ %sai1.sroa.4.0.copyload, %for.cond35.preheader.i ], [ %sai1.sroa.5.0.copyload, %for.cond21.1.i ], [ %sai1.sroa.0.0.copyload, %for.cond21.i ], [ %sai1.sroa.6.0.copyload, %for.cond21.preheader.i ], [ %sai1.sroa.8.0.copyload, %for.cond35.2.i ] %cmp54.i = icmp eq i32 %.lcssa144174.i, %sai2.sroa.4.0.copyload %cmp57.i = icmp eq i32 %sai1.sroa.27.0.i, %sai2.sroa.5.0.copyload %or.cond.i = select i1 %cmp54.i, i1 %cmp57.i, i1 false %cmp61.i = icmp eq i32 %sai1.sroa.9.0.i, %sai2.sroa.6.0.copyload %or.cond120.i = select i1 %or.cond.i, i1 %cmp61.i, i1 false %cmp65.i = icmp eq i32 %.lcssa143175.i, %sai2.sroa.7.0.copyload %or.cond121.i = select i1 %or.cond120.i, i1 %cmp65.i, i1 false br i1 %or.cond121.i, label %conf.exit, label %for.cond48.i for.cond48.i: ; preds = %if.end47.i %cmp54.1.i = icmp eq i32 %sai1.sroa.27.0.i, %sai2.sroa.4.0.copyload %cmp57.1.i = icmp eq i32 %.lcssa143175.i, %sai2.sroa.5.0.copyload %or.cond.1.i = select i1 %cmp54.1.i, i1 %cmp57.1.i, i1 false %cmp61.1.i = icmp eq i32 %.lcssa144174.i, %sai2.sroa.6.0.copyload %or.cond120.1.i = and i1 %cmp61.1.i, %or.cond.1.i %cmp65.1.i = icmp eq i32 %sai1.sroa.9.0.i, %sai2.sroa.7.0.copyload %or.cond121.1.i = select i1 %or.cond120.1.i, i1 %cmp65.1.i, i1 false br i1 %or.cond121.1.i, label %conf.exit, label %for.cond48.1.i for.cond48.1.i: ; preds = %for.cond48.i %cmp54.2.i = icmp eq i32 %.lcssa143175.i, %sai2.sroa.4.0.copyload %cmp57.2.i = icmp eq i32 %sai1.sroa.9.0.i, %sai2.sroa.5.0.copyload %or.cond.2.i = select i1 %cmp54.2.i, i1 %cmp57.2.i, i1 false %cmp61.2.i = icmp eq i32 %sai1.sroa.27.0.i, %sai2.sroa.6.0.copyload %or.cond120.2.i = select i1 %or.cond.2.i, i1 %cmp61.2.i, i1 false %cmp65.2.i = icmp eq i32 %.lcssa144174.i, %sai2.sroa.7.0.copyload %or.cond121.2.i = and i1 %cmp65.2.i, %or.cond120.2.i br i1 %or.cond121.2.i, label %conf.exit, label %for.cond48.2.i for.cond48.2.i: ; preds = %for.cond48.1.i %cmp54.3.i = icmp eq i32 %sai1.sroa.9.0.i, %sai2.sroa.4.0.copyload %cmp57.3.i = icmp eq i32 %.lcssa144174.i, %sai2.sroa.5.0.copyload %or.cond.3.i = and i1 %cmp57.3.i, %cmp54.3.i %cmp61.3.i = icmp eq i32 %.lcssa143175.i, %sai2.sroa.6.0.copyload %or.cond120.3.i = select i1 %or.cond.3.i, i1 %cmp61.3.i, i1 false %cmp65.3.i = icmp eq i32 %sai1.sroa.27.0.i, %sai2.sroa.7.0.copyload %or.cond121.3.i = select i1 %or.cond120.3.i, i1 %cmp65.3.i, i1 false br i1 %or.cond121.3.i, label %conf.exit, label %for.cond48.3.i for.cond48.3.i: ; preds = %for.cond48.2.i br label %conf.exit conf.exit: ; preds = %for.cond28.preheader, %if.end47.i, %for.cond48.i, %for.cond48.1.i, %for.cond48.2.i, %for.cond48.3.i %sai1.sroa.0.1.i = phi i32 [ %sai1.sroa.0.0.copyload, %for.cond28.preheader ], [ %sai1.sroa.0.0.i, %for.cond48.3.i ], [ %sai1.sroa.0.0.i, %for.cond48.2.i ], [ %sai1.sroa.0.0.i, %for.cond48.1.i ], [ %sai1.sroa.0.0.i, %for.cond48.i ], [ %sai1.sroa.0.0.i, %if.end47.i ] %sai1.sroa.9.1.i = phi i32 [ %sai1.sroa.4.0.copyload, %for.cond28.preheader ], [ %sai1.sroa.9.0.i, %for.cond48.3.i ], [ %sai2.sroa.4.0.copyload, %for.cond48.2.i ], [ %sai2.sroa.4.0.copyload, %for.cond48.1.i ], [ %sai2.sroa.4.0.copyload, %for.cond48.i ], [ %sai2.sroa.4.0.copyload, %if.end47.i ] %sai1.sroa.15.0.i = phi i32 [ %sai1.sroa.5.0.copyload, %for.cond28.preheader ], [ %.lcssa144174.i, %for.cond48.3.i ], [ %sai2.sroa.5.0.copyload, %for.cond48.2.i ], [ %sai2.sroa.5.0.copyload, %for.cond48.1.i ], [ %sai2.sroa.5.0.copyload, %for.cond48.i ], [ %sai2.sroa.5.0.copyload, %if.end47.i ] %sai1.sroa.21.0.i = phi i32 [ %sai1.sroa.6.0.copyload, %for.cond28.preheader ], [ %.lcssa143175.i, %for.cond48.3.i ], [ %sai2.sroa.6.0.copyload, %for.cond48.2.i ], [ %sai2.sroa.6.0.copyload, %for.cond48.1.i ], [ %sai2.sroa.6.0.copyload, %for.cond48.i ], [ %sai2.sroa.6.0.copyload, %if.end47.i ] %sai1.sroa.27.1.i = phi i32 [ %sai1.sroa.7.0.copyload, %for.cond28.preheader ], [ %sai1.sroa.27.0.i, %for.cond48.3.i ], [ %sai2.sroa.7.0.copyload, %for.cond48.2.i ], [ %sai2.sroa.7.0.copyload, %for.cond48.1.i ], [ %sai2.sroa.7.0.copyload, %for.cond48.i ], [ %sai2.sroa.7.0.copyload, %if.end47.i ] %sai1.sroa.33.1.i = phi i32 [ %sai1.sroa.8.0.copyload, %for.cond28.preheader ], [ %sai1.sroa.33.0.i, %for.cond48.3.i ], [ %sai1.sroa.33.0.i, %for.cond48.2.i ], [ %sai1.sroa.33.0.i, %for.cond48.1.i ], [ %sai1.sroa.33.0.i, %for.cond48.i ], [ %sai1.sroa.33.0.i, %if.end47.i ] %cmp79.i = icmp eq i32 %sai1.sroa.0.1.i, %sai2.sroa.0.0.copyload %inc81.i = zext i1 %cmp79.i to i32 %cmp79.1.i = icmp eq i32 %sai1.sroa.9.1.i, %sai2.sroa.4.0.copyload %inc81.1.i = zext i1 %cmp79.1.i to i32 %spec.select116.1.i = add nuw nsw i32 %inc81.1.i, %inc81.i %cmp79.2.i = icmp eq i32 %sai1.sroa.15.0.i, %sai2.sroa.5.0.copyload %inc81.2.i = zext i1 %cmp79.2.i to i32 %spec.select116.2.i = add nuw nsw i32 %spec.select116.1.i, %inc81.2.i %cmp79.3.i = icmp eq i32 %sai1.sroa.21.0.i, %sai2.sroa.6.0.copyload %inc81.3.i = zext i1 %cmp79.3.i to i32 %spec.select116.3.i = add nuw nsw i32 %spec.select116.2.i, %inc81.3.i %cmp79.4.i = icmp eq i32 %sai1.sroa.27.1.i, %sai2.sroa.7.0.copyload %inc81.4.i = zext i1 %cmp79.4.i to i32 %spec.select116.4.i = add nuw nsw i32 %spec.select116.3.i, %inc81.4.i %cmp79.5.i = icmp eq i32 %sai1.sroa.33.1.i, %sai2.sroa.8.0.copyload %inc81.5.i = zext i1 %cmp79.5.i to i32 %spec.select116.5.i = add nuw nsw i32 %spec.select116.4.i, %inc81.5.i %cmp86.i.not = icmp eq i32 %spec.select116.5.i, 6 %inc43 = zext i1 %cmp86.i.not to i32 %spec.select = add nsw i32 %a.181, %inc43 %indvar.next94 = add nuw nsw i64 %indvar93, 1 %lftr.wideiv = trunc i64 %indvar.next94 to i32 %exitcond.not = icmp eq i32 %indvars.iv99, %lftr.wideiv br i1 %exitcond.not, label %for.cond10.loopexit, label %for.cond28.preheader, !llvm.loop !12 for.end49: ; preds = %for.cond10.loopexit %5 = icmp eq i32 %a.1.lcssa, 0 %spec.select106 = select i1 %5, ptr @str.3, ptr @str br label %if.end54 if.end54: ; preds = %for.end49, %for.cond10.preheader, %entry %str.sink = phi ptr [ @str.3, %entry ], [ @str.3, %for.cond10.preheader ], [ %spec.select106, %for.end49 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.end.p0(i64 2520, ptr nonnull %sai_c) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree 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 #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <string.h> int main() { int num=0,i,x,n,k; scanf("%d %d",&n,&k); for (i=1;i<=n;i++) { scanf("%d",&x); if (5-x>=k) num++; } printf("%d",num/3); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13550/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13550/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %n = alloca i32, align 4 %k = 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 %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not7 = icmp slt i32 %0, 1 br i1 %cmp.not7, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %i.09 = phi i32 [ %inc3, %for.body ], [ 1, %entry ] %num.08 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %1 = load i32, ptr %x, align 4, !tbaa !5 %sub = sub nsw i32 5, %1 %2 = load i32, ptr %k, align 4, !tbaa !5 %cmp2.not = icmp sge i32 %sub, %2 %inc = zext i1 %cmp2.not to i32 %spec.select = add nuw nsw i32 %num.08, %inc %inc3 = add nuw nsw i32 %i.09, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %i.09, %3 br i1 %cmp.not.not, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %4 = udiv i32 %spec.select, 3 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %num.0.lcssa = phi i32 [ 0, %entry ], [ %4, %for.end.loopexit ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %num.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> int main() { int N,X,T,z; scanf("%d%d%d",&N,&X,&T); z=(N+X-1)/X*T; printf("%d",z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %X = alloca i32, align 4 %T = 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 %X) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %X, ptr noundef nonnull %T) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %X, align 4, !tbaa !5 %add = add i32 %0, -1 %sub = add i32 %add, %1 %div = sdiv i32 %sub, %1 %2 = load i32, ptr %T, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #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"}
#include<stdio.h> int main(void) { int n,x,y,t,s; scanf("%d %d %d",&n,&x,&t); y=n/x; s=n%x; if(s!=0){ y++; } printf("%d\n",y*t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = 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 %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %cmp.not = icmp ne i32 %rem, 0 %inc = zext i1 %cmp.not to i32 %spec.select = add nsw i32 %div, %inc %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %spec.select, %2 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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"}
#include <stdio.h> int main(void){ int N,X,T; scanf("%d %d %d",&N,&X,&T); if (N <= X){ printf("%d",T); }else if(N%X == 0){ printf("%d",N/X*T); }else{ printf("%d",(N/X+1)*T); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %X = alloca i32, align 4 %T = 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 %X) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %X, ptr noundef nonnull %T) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %X, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %if.else, label %if.then if.then: ; preds = %entry %2 = load i32, ptr %T, align 4, !tbaa !5 br label %if.end9 if.else: ; preds = %entry %rem = srem i32 %0, %1 %cmp2 = icmp eq i32 %rem, 0 %div = sdiv i32 %0, %1 br i1 %cmp2, label %if.then3, label %if.else5 if.then3: ; preds = %if.else %3 = load i32, ptr %T, align 4, !tbaa !5 %mul = mul nsw i32 %3, %div br label %if.end9 if.else5: ; preds = %if.else %add = add nsw i32 %div, 1 %4 = load i32, ptr %T, align 4, !tbaa !5 %mul7 = mul nsw i32 %add, %4 br label %if.end9 if.end9: ; preds = %if.then3, %if.else5, %if.then %mul.sink = phi i32 [ %mul, %if.then3 ], [ %mul7, %if.else5 ], [ %2, %if.then ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #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"}
#include <stdio.h> #include <math.h> int main(void) { int n,x,t,count,time; scanf("%d %d %d",&n,&x,&t); if(n%x==0) { count = n/x; time = count*t; } else { count = n/x + 1; time = count*t; } printf("%d",time); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135680/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135680/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = 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 %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %rem = srem i32 %0, %1 %cmp = icmp eq i32 %rem, 0 %div = sdiv i32 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div br label %if.end if.else: ; preds = %entry %add = add nsw i32 %div, 1 %3 = load i32, ptr %t, align 4, !tbaa !5 %mul2 = mul nsw i32 %add, %3 br label %if.end if.end: ; preds = %if.else, %if.then %time.0 = phi i32 [ %mul, %if.then ], [ %mul2, %if.else ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %time.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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"}
#include<stdio.h> int main(void) { int N,X,T,ans=0; //input scanf("%d %d %d",&N,&X,&T); //control if(N%X==0){ ans = (N/X)*T; }else{ ans = (N/X+1)*T; } //output printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135730/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135730/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %X = alloca i32, align 4 %T = 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 %X) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %X, ptr noundef nonnull %T) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %X, align 4, !tbaa !5 %rem = srem i32 %0, %1 %cmp = icmp eq i32 %rem, 0 %div = sdiv i32 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %2 = load i32, ptr %T, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div br label %if.end if.else: ; preds = %entry %add = add nsw i32 %div, 1 %3 = load i32, ptr %T, align 4, !tbaa !5 %mul2 = mul nsw i32 %add, %3 br label %if.end if.end: ; preds = %if.else, %if.then %ans.0 = phi i32 [ %mul, %if.then ], [ %mul2, %if.else ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #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"}
#include <stdio.h> #include <math.h> int main(void) { int n,x,t,i; scanf("%d %d %d", &n,&x,&t); for(i=0;n>0;i++){ n-=x; } printf("%d",i*t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135774/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135774/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = 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 %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp3 = icmp sgt i32 %.pr, 0 br i1 %cmp3, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %0 = load i32, ptr %x, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %i.04 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ] %1 = phi i32 [ %.pr, %for.body.lr.ph ], [ %sub, %for.body ] %sub = sub nsw i32 %1, %0 %inc = add nuw nsw i32 %i.04, 1 %cmp = icmp sgt i32 %sub, 0 br i1 %cmp, label %for.body, label %for.cond.for.end_crit_edge, !llvm.loop !9 for.cond.for.end_crit_edge: ; preds = %for.body store i32 %sub, ptr %n, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %entry %i.0.lcssa = phi i32 [ %inc, %for.cond.for.end_crit_edge ], [ 0, %entry ] %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %2, %i.0.lcssa %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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> #include <stdlib.h> #include <math.h> #include <string.h> int main() { int n, x, t; scanf("%d %d %d", &n, &x, &t); if (n%x==0) { printf("%d\n", (n/x)*t); } else { printf("%d\n", ((n/x)+1)*t); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135824/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135824/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = 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 %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %rem = srem i32 %0, %1 %cmp = icmp eq i32 %rem, 0 %div = sdiv i32 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div br label %if.end if.else: ; preds = %entry %add = add nsw i32 %div, 1 %3 = load i32, ptr %t, align 4, !tbaa !5 %mul3 = mul nsw i32 %add, %3 br label %if.end if.end: ; preds = %if.else, %if.then %mul3.sink = phi i32 [ %mul3, %if.else ], [ %mul, %if.then ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul3.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #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"}
#include<stdio.h> int main(){ int x,t,n; int ans; scanf("%d %d %d",&n,&x,&t); if(n % x != 0){ ans = n/x; ans++; }else{ ans = n/x; } ans *= t; printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135868/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135868/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %t = alloca i32, align 4 %n = 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 %t) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %rem = srem i32 %0, %1 %cmp.not = icmp ne i32 %rem, 0 %div1 = sdiv i32 %0, %1 %inc = zext i1 %cmp.not to i32 %ans.0 = add nsw i32 %div1, %inc %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %2, %ans.0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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(){ int m,f,b; scanf("%d%d%d",&m,&f,&b); if(m<b){ m = b-m; //printf("%d\n",m); if(m<=f){ printf("%d\n",m); } else printf("NA\n"); } else printf("0\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135910/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135910/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"0\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"NA\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %f = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #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 %m, ptr noundef nonnull %f, ptr noundef nonnull %b) %0 = load i32, ptr %m, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.else5 if.then: ; preds = %entry %sub = sub nsw i32 %1, %0 store i32 %sub, ptr %m, align 4, !tbaa !5 %2 = load i32, ptr %f, align 4, !tbaa !5 %cmp1.not = icmp sgt i32 %sub, %2 br i1 %cmp1.not, label %if.else, label %if.then2 if.then2: ; preds = %if.then %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) br label %if.end7 if.else: ; preds = %if.then %puts9 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) br label %if.end7 if.else5: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end7 if.end7: ; preds = %if.then2, %if.else, %if.else5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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 m,f,b; scanf("%d %d %d",&m,&f,&b); if(b<=m) printf("0\n"); else if(b<=m+f) printf("%d\n",b-m); else printf("NA\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135954/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135954/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NA\00", align 1 @str.4 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %f = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #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 %m, ptr noundef nonnull %f, ptr noundef nonnull %b) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %m, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %if.else, label %if.then if.then: ; preds = %entry %puts9 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) br label %if.end7 if.else: ; preds = %entry %2 = load i32, ptr %f, align 4, !tbaa !5 %add = add nsw i32 %2, %1 %cmp2.not = icmp sgt i32 %0, %add br i1 %cmp2.not, label %if.else5, label %if.then3 if.then3: ; preds = %if.else %sub = sub nsw i32 %0, %1 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) br label %if.end7 if.else5: ; preds = %if.else %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end7 if.end7: ; preds = %if.then3, %if.else5, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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 n; scanf("%d", &n); for(int i=1; i<=9; i++){ for(int j=1; j<=9; j++){ if(i*j==n){ printf("Yes"); return 0; } } } printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136003/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136003/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) %0 = load i32, ptr %n, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %cleanup9, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp5.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond22 = icmp eq i32 %7, 1 %cmp5.5 = icmp eq i32 %0, 6 %exitcond23 = icmp eq i32 %2, 1 %cmp5.7 = icmp eq i32 %0, 8 %exitcond24 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond22.1 = icmp eq i32 %7, 2 %cmp5.5.1 = icmp eq i32 %0, 12 %exitcond23.1 = icmp eq i32 %2, 2 %cmp5.7.1 = icmp eq i32 %0, 16 %exitcond24.1 = icmp eq i32 %1, 2 %cmp5.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond22.2 = icmp eq i32 %7, 3 %cmp5.5.2 = icmp eq i32 %0, 18 %exitcond23.2 = icmp eq i32 %2, 3 %cmp5.7.2 = icmp eq i32 %0, 24 %exitcond24.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond22.3 = icmp eq i32 %7, 4 %exitcond23.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond23.4 = icmp eq i32 %2, 5 %cmp5.7.4 = icmp eq i32 %0, 40 %exitcond24.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp5.5.6 = icmp eq i32 %0, 42 %exitcond23.6 = icmp eq i32 %2, 7 %cmp5.7.6 = icmp eq i32 %0, 56 %exitcond24.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond23.7 = icmp eq i32 %2, 8 %cmp5.7.7 = icmp eq i32 %0, 64 %exitcond24.7 = icmp eq i32 %1, 8 %cmp5.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond22.8 = icmp eq i32 %7, 9 %cmp5.5.8 = icmp eq i32 %0, 54 %exitcond23.8 = icmp eq i32 %2, 9 %cmp5.7.8 = icmp eq i32 %0, 72 %exitcond24.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx97 = or i1 %op.rdx, %cmp5.3 %op.rdx98 = or i1 %exitcond, %exitcond22 %op.rdx99 = or i1 %cmp5.5, %exitcond23 %op.rdx100 = or i1 %cmp5.7, %exitcond24 %op.rdx101 = or i1 %exitcond.1, %exitcond22.1 %op.rdx102 = or i1 %cmp5.5.1, %exitcond23.1 %op.rdx103 = or i1 %cmp5.7.1, %exitcond24.1 %op.rdx104 = or i1 %cmp5.2, %exitcond.2 %op.rdx105 = or i1 %exitcond22.2, %cmp5.5.2 %op.rdx106 = or i1 %exitcond23.2, %cmp5.7.2 %op.rdx107 = or i1 %exitcond24.2, %exitcond.3 %op.rdx108 = or i1 %exitcond22.3, %exitcond23.3 %op.rdx109 = or i1 %exitcond23.4, %cmp5.7.4 %op.rdx110 = or i1 %exitcond24.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx111 = icmp eq i32 %22, 6 %op.rdx112 = or i1 %cmp5.5.6, %exitcond23.6 %op.rdx113 = or i1 %cmp5.7.6, %exitcond24.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx114 = extractelement <2 x i1> %23, i64 0 %op.rdx115 = or i1 %exitcond23.7, %cmp5.7.7 %op.rdx116 = or i1 %exitcond24.7, %cmp5.8 %op.rdx117 = or i1 %exitcond.8, %exitcond22.8 %op.rdx118 = or i1 %cmp5.5.8, %exitcond23.8 %op.rdx119 = or i1 %cmp5.7.8, %exitcond24.8 %op.rdx120 = or i1 %op.rdx97, %op.rdx98 %op.rdx121 = or i1 %op.rdx99, %op.rdx100 %op.rdx122 = or i1 %op.rdx101, %op.rdx102 %op.rdx123 = or i1 %op.rdx103, %op.rdx104 %op.rdx124 = or i1 %op.rdx105, %op.rdx106 %op.rdx125 = or i1 %op.rdx107, %op.rdx108 %op.rdx126 = or i1 %op.rdx109, %op.rdx110 %op.rdx127 = or i1 %op.rdx111, %op.rdx112 %op.rdx128 = or i1 %op.rdx113, %op.rdx114 %op.rdx129 = or i1 %op.rdx115, %op.rdx116 %op.rdx130 = or i1 %op.rdx117, %op.rdx118 %op.rdx131 = or i1 %op.rdx120, %op.rdx121 %op.rdx132 = or i1 %op.rdx122, %op.rdx123 %op.rdx133 = or i1 %op.rdx124, %op.rdx125 %op.rdx134 = or i1 %op.rdx126, %op.rdx127 %op.rdx135 = or i1 %op.rdx128, %op.rdx129 %op.rdx136 = or i1 %op.rdx130, %op.rdx119 %op.rdx137 = or i1 %op.rdx131, %op.rdx132 %op.rdx138 = or i1 %op.rdx133, %op.rdx134 %op.rdx139 = or i1 %op.rdx135, %op.rdx136 %op.rdx140 = or i1 %op.rdx137, %op.rdx138 %op.rdx141 = or i1 %op.rdx140, %op.rdx139 br i1 %op.rdx141, label %cleanup9, label %cleanup13 cleanup9: ; preds = %entry, %for.cond1.1 br label %cleanup13 cleanup13: ; preds = %for.cond1.1, %cleanup9 %.str.1.sink = phi ptr [ @.str.1, %cleanup9 ], [ @.str.2, %for.cond1.1 ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.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"}
/*ex3_4 takafumi_ueki*/ #include <stdio.h> int main(void){ int x,i; int flag = 0; scanf("%d",&x); /*例えば,xを2で割った余りが0(2で割り切れる)かつ 2で割った商が10未満だったら一桁の整数同士の掛け算で表せるということなので、それを3,4,5,,,,と調べる。*/ for(i = 1; i <= 9; i++){ if((x%i == 0)&&(x/i)<10){ printf("Yes\n"); flag = 1; break; } } if(flag == 0){ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136047/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136047/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { land.lhs.true: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp2 = icmp slt i32 %0, 10 br i1 %cmp2, label %if.end7, label %for.inc for.inc: ; preds = %land.lhs.true %1 = and i32 %0, 1 %cmp1.1 = icmp eq i32 %1, 0 %cmp2.1 = icmp ult i32 %0, 20 %or.cond = and i1 %cmp1.1, %cmp2.1 br i1 %or.cond, label %if.end7, label %for.inc.1 for.inc.1: ; preds = %for.inc %rem.213 = urem i32 %0, 3 %cmp1.2 = icmp eq i32 %rem.213, 0 %cmp2.2 = icmp ult i32 %0, 30 %or.cond18 = and i1 %cmp1.2, %cmp2.2 br i1 %or.cond18, label %if.end7, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %2 = and i32 %0, 3 %cmp1.3 = icmp eq i32 %2, 0 %cmp2.3 = icmp ult i32 %0, 40 %or.cond19 = and i1 %cmp1.3, %cmp2.3 br i1 %or.cond19, label %if.end7, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %rem.414 = urem i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.414, 0 %cmp2.4 = icmp ult i32 %0, 50 %or.cond20 = and i1 %cmp1.4, %cmp2.4 br i1 %or.cond20, label %if.end7, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %rem.515 = urem i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.515, 0 %cmp2.5 = icmp ult i32 %0, 60 %or.cond21 = and i1 %cmp1.5, %cmp2.5 br i1 %or.cond21, label %if.end7, label %for.inc.5 for.inc.5: ; preds = %for.inc.4 %rem.616 = urem i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.616, 0 %cmp2.6 = icmp ult i32 %0, 70 %or.cond22 = and i1 %cmp1.6, %cmp2.6 br i1 %or.cond22, label %if.end7, label %for.inc.6 for.inc.6: ; preds = %for.inc.5 %3 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %3, 0 %cmp2.7 = icmp ult i32 %0, 80 %or.cond23 = and i1 %cmp1.7, %cmp2.7 br i1 %or.cond23, label %if.end7, label %for.inc.7 for.inc.7: ; preds = %for.inc.6 %rem.817 = urem i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.817, 0 %cmp2.8 = icmp ult i32 %0, 90 %or.cond24 = and i1 %cmp1.8, %cmp2.8 %spec.select = select i1 %or.cond24, ptr @str, ptr @str.3 br label %if.end7 if.end7: ; preds = %for.inc.7, %land.lhs.true, %for.inc, %for.inc.1, %for.inc.2, %for.inc.3, %for.inc.4, %for.inc.5, %for.inc.6 %str.sink = phi ptr [ @str, %for.inc.6 ], [ @str, %for.inc.5 ], [ @str, %for.inc.4 ], [ @str, %for.inc.3 ], [ @str, %for.inc.2 ], [ @str, %for.inc.1 ], [ @str, %for.inc ], [ @str, %land.lhs.true ], [ %spec.select, %for.inc.7 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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"}
/* ex3-4 kas056 */ #include <stdio.h> int main(void){ //積cross,フラグflagの設定 int N,cross,flag; scanf("%d",&N); //flagの初期値設定 flag = 0; /*1<=i<=9の範囲内のiと、1<=j<=9の範囲内のjで 九九を全て表すことが出来る。ループを用いて積を出す。*/ for(int i = 1; i < 10 ; i ++){ for (int j = 1; j<10; j++){ cross = i * j; if (N == cross){//Nとcrossが一致したら flag = 1;//フラグを立てる } } } if (flag == 1){//フラグがたっていたら printf("%s\n","Yes");//Yesを出力 } else{//立ってなかったら printf("%s\n","No");//Noを出力 } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136090/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136090/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @reltable.main = private unnamed_addr constant [79 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %.fr110 = freeze i32 %0 %1 = add i32 %.fr110, -1 %narrow = icmp ult i32 %1, 10 br i1 %narrow, label %if.end13, label %switch.early.test switch.early.test: ; preds = %entry %switch.tableidx = add i32 %.fr110, -3 %2 = icmp ult i32 %switch.tableidx, 79 br i1 %2, label %switch.lookup, label %if.end13 switch.lookup: ; preds = %switch.early.test %3 = sext i32 %switch.tableidx to i64 %reltable.shift = shl i64 %3, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end13 if.end13: ; preds = %switch.early.test, %switch.lookup, %entry %.str.3.sink = phi ptr [ @.str.2, %entry ], [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %switch.early.test ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %.str.3.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn 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 willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, i64) #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 willreturn memory(argmem: read) } 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"}
/*Kadai3_4 saitomo*/ #include<stdio.h> int main(void){ int num,judge=0;//judgeを使って判定をする scanf("%d",&num); for(int i=1;i<10;i++){//1から9まででnumを割っていきあまりが0かつ商が10未満ならばjudgeに1を足す if(num%i==0 && num/i<10){ judge+=1; } } if (judge!=0){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136133/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136133/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { for.inc: %num = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %0 = load i32, ptr %num, align 4, !tbaa !5 %cmp2 = icmp slt i32 %0, 10 %add = zext i1 %cmp2 to i32 %1 = and i32 %0, 1 %rem.2 = srem i32 %0, 3 %2 = and i32 %0, 3 %rem.4 = srem i32 %0, 5 %3 = insertelement <4 x i32> poison, i32 %1, i64 0 %4 = insertelement <4 x i32> %3, i32 %rem.2, i64 1 %5 = insertelement <4 x i32> %4, i32 %2, i64 2 %6 = insertelement <4 x i32> %5, i32 %rem.4, i64 3 %7 = icmp eq <4 x i32> %6, zeroinitializer %8 = insertelement <4 x i32> poison, i32 %0, i64 0 %9 = shufflevector <4 x i32> %8, <4 x i32> poison, <4 x i32> zeroinitializer %10 = icmp slt <4 x i32> %9, <i32 20, i32 30, i32 40, i32 50> %11 = and <4 x i1> %7, %10 %rem.5 = srem i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.5, 0 %cmp2.5 = icmp slt i32 %0, 60 %narrow18 = and i1 %cmp1.5, %cmp2.5 %spec.select.5 = zext i1 %narrow18 to i32 %rem.6 = srem i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.6, 0 %cmp2.6 = icmp slt i32 %0, 70 %narrow19 = and i1 %cmp1.6, %cmp2.6 %spec.select.6 = zext i1 %narrow19 to i32 %12 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %12, 0 %cmp2.7 = icmp slt i32 %0, 80 %narrow20 = and i1 %cmp1.7, %cmp2.7 %spec.select.7 = zext i1 %narrow20 to i32 %13 = bitcast <4 x i1> %11 to i4 %14 = call i4 @llvm.ctpop.i4(i4 %13), !range !9 %15 = zext i4 %14 to i32 %op.rdx = add nuw nsw i32 %15, %spec.select.5 %op.rdx22 = add nuw nsw i32 %spec.select.6, %spec.select.7 %op.rdx23 = add nuw nsw i32 %op.rdx, %op.rdx22 %op.rdx24 = add nuw nsw i32 %op.rdx23, %add %rem.8 = srem i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.8, 0 %cmp2.8 = icmp slt i32 %0, 90 %narrow21 = and i1 %cmp1.8, %cmp2.8 %spec.select.8.neg = sext i1 %narrow21 to i32 %cmp3.not = icmp eq i32 %op.rdx24, %spec.select.8.neg %str.sink = select i1 %cmp3.not, ptr @str, ptr @str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn 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 i4 @llvm.ctpop.i4(i4) #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 = !{i4 0, i4 5}
#include <stdio.h> int main(){ int n,i; scanf("%d",&n); for(i=1;i<=9;i++){ if((n%i==0)&(n/i<=9)) break; } if(i==10){ printf("No"); }else{ printf("Yes"); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136177/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136177/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @.str.2 = 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) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp2 = icmp slt i32 %0, 10 br i1 %cmp2, label %if.else, label %for.inc for.inc: ; preds = %entry %1 = and i32 %0, 1 %cmp1.1 = icmp eq i32 %1, 0 %cmp2.1 = icmp ult i32 %0, 20 %and14.1 = and i1 %cmp1.1, %cmp2.1 br i1 %and14.1, label %if.else, label %for.inc.1 for.inc.1: ; preds = %for.inc %rem.218 = urem i32 %0, 3 %cmp1.2 = icmp eq i32 %rem.218, 0 %cmp2.2 = icmp ult i32 %0, 30 %and14.2 = and i1 %cmp1.2, %cmp2.2 br i1 %and14.2, label %if.else, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %2 = and i32 %0, 3 %cmp1.3 = icmp eq i32 %2, 0 %cmp2.3 = icmp ult i32 %0, 40 %and14.3 = and i1 %cmp1.3, %cmp2.3 br i1 %and14.3, label %if.else, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %rem.419 = urem i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.419, 0 %cmp2.4 = icmp ult i32 %0, 50 %and14.4 = and i1 %cmp1.4, %cmp2.4 br i1 %and14.4, label %if.else, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %rem.520 = urem i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.520, 0 %cmp2.5 = icmp ult i32 %0, 60 %and14.5 = and i1 %cmp1.5, %cmp2.5 br i1 %and14.5, label %if.else, label %for.inc.5 for.inc.5: ; preds = %for.inc.4 %rem.621 = urem i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.621, 0 %cmp2.6 = icmp ult i32 %0, 70 %and14.6 = and i1 %cmp1.6, %cmp2.6 br i1 %and14.6, label %if.else, label %for.inc.6 for.inc.6: ; preds = %for.inc.5 %3 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %3, 0 %cmp2.7 = icmp ult i32 %0, 80 %and14.7 = and i1 %cmp1.7, %cmp2.7 br i1 %and14.7, label %if.else, label %for.inc.7 for.inc.7: ; preds = %for.inc.6 %rem.822 = urem i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.822, 0 %cmp2.8 = icmp ult i32 %0, 90 %and14.8 = and i1 %cmp1.8, %cmp2.8 br i1 %and14.8, label %if.else, label %if.end9 if.else: ; preds = %entry, %for.inc, %for.inc.1, %for.inc.2, %for.inc.3, %for.inc.4, %for.inc.5, %for.inc.6, %for.inc.7 br label %if.end9 if.end9: ; preds = %for.inc.7, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %for.inc.7 ] %call8 = 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"}
#include<stdio.h> int main() { int n,k,i,count=0; scanf("%d",&n); scanf("%d",&k); int a[n]; for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++) { if(5-a[i]>=k) count++; } count = count/3; printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13622/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp21 = icmp sgt i32 %3, 0 br i1 %cmp21, label %for.body, label %for.end12 for.cond3.preheader: ; preds = %for.body %cmp423 = icmp sgt i32 %17, 0 br i1 %cmp423, label %for.body5.lr.ph, label %for.end12 for.body5.lr.ph: ; preds = %for.cond3.preheader %4 = load i32, ptr %k, align 4, !tbaa !5 %wide.trip.count = zext i32 %17 to i64 %min.iters.check = icmp ult i32 %17, 8 br i1 %min.iters.check, label %for.body5.preheader, label %vector.ph vector.ph: ; preds = %for.body5.lr.ph %n.vec = and i64 %wide.trip.count, 4294967288 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %4, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ] %vec.phi34 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %5 = getelementptr inbounds i32, ptr %vla, i64 %index %wide.load = load <4 x i32>, ptr %5, align 16, !tbaa !5 %6 = getelementptr inbounds i32, ptr %5, i64 4 %wide.load35 = load <4 x i32>, ptr %6, align 16, !tbaa !5 %7 = sub nsw <4 x i32> <i32 5, i32 5, i32 5, i32 5>, %wide.load %8 = sub nsw <4 x i32> <i32 5, i32 5, i32 5, i32 5>, %wide.load35 %9 = icmp sge <4 x i32> %7, %broadcast.splat %10 = icmp sge <4 x i32> %8, %broadcast.splat %11 = zext <4 x i1> %9 to <4 x i32> %12 = zext <4 x i1> %10 to <4 x i32> %13 = add <4 x i32> %vec.phi, %11 %14 = add <4 x i32> %vec.phi34, %12 %index.next = add nuw i64 %index, 8 %15 = icmp eq i64 %index.next, %n.vec br i1 %15, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %14, %13 %16 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end12.loopexit, label %for.body5.preheader for.body5.preheader: ; preds = %for.body5.lr.ph, %middle.block %indvars.iv29.ph = phi i64 [ 0, %for.body5.lr.ph ], [ %n.vec, %middle.block ] %count.024.ph = phi i32 [ 0, %for.body5.lr.ph ], [ %16, %middle.block ] br label %for.body5 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %17 = load i32, ptr %n, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp = icmp slt i64 %indvars.iv.next, %18 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !13 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv29 = phi i64 [ %indvars.iv.next30, %for.body5 ], [ %indvars.iv29.ph, %for.body5.preheader ] %count.024 = phi i32 [ %spec.select, %for.body5 ], [ %count.024.ph, %for.body5.preheader ] %arrayidx7 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv29 %19 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %sub = sub nsw i32 5, %19 %cmp8.not = icmp sge i32 %sub, %4 %inc9 = zext i1 %cmp8.not to i32 %spec.select = add nuw nsw i32 %count.024, %inc9 %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1 %exitcond.not = icmp eq i64 %indvars.iv.next30, %wide.trip.count br i1 %exitcond.not, label %for.end12.loopexit, label %for.body5, !llvm.loop !14 for.end12.loopexit: ; preds = %for.body5, %middle.block %spec.select.lcssa = phi i32 [ %16, %middle.block ], [ %spec.select, %for.body5 ] %20 = udiv i32 %spec.select.lcssa, 3 br label %for.end12 for.end12: ; preds = %entry, %for.end12.loopexit, %for.cond3.preheader %count.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ %20, %for.end12.loopexit ], [ 0, %entry ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %count.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
#include <stdio.h> #include <string.h> int main(){ int n,cnt; cnt=0; scanf("%d",&n); for(int i=1;i<10;i++){ if(n%i==0&&0<n/i&&n/i<10){ cnt=1; } } if(cnt==1){ printf("Yes"); }else{ printf("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136263/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136263/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { for.inc: %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 %1 = add i32 %0, -1 %or.cond = icmp ult i32 %1, 9 %spec.select = zext i1 %or.cond to i32 %2 = and i32 %0, 1 %cmp1.1 = icmp eq i32 %2, 0 br i1 %cmp1.1, label %land.lhs.true.1, label %for.inc.1 land.lhs.true.1: ; preds = %for.inc %div.1 = sdiv i32 %0, 2 %3 = add nsw i32 %div.1, -1 %or.cond.1 = icmp ult i32 %3, 9 %spec.select.1 = select i1 %or.cond.1, i32 1, i32 %spec.select br label %for.inc.1 for.inc.1: ; preds = %land.lhs.true.1, %for.inc %cnt.1.1 = phi i32 [ %spec.select, %for.inc ], [ %spec.select.1, %land.lhs.true.1 ] %rem.2 = srem i32 %0, 3 %div.2 = sdiv i32 %0, 3 %cmp1.2 = icmp eq i32 %rem.2, 0 %4 = add nsw i32 %div.2, -1 %or.cond.2 = icmp ult i32 %4, 9 %spec.select.2 = select i1 %or.cond.2, i32 1, i32 %cnt.1.1 %cnt.1.2 = select i1 %cmp1.2, i32 %spec.select.2, i32 %cnt.1.1 %5 = and i32 %0, 3 %cmp1.3 = icmp eq i32 %5, 0 br i1 %cmp1.3, label %land.lhs.true.3, label %for.inc.3 land.lhs.true.3: ; preds = %for.inc.1 %div.3 = sdiv i32 %0, 4 %6 = add nsw i32 %div.3, -1 %or.cond.3 = icmp ult i32 %6, 9 %spec.select.3 = select i1 %or.cond.3, i32 1, i32 %cnt.1.2 br label %for.inc.3 for.inc.3: ; preds = %land.lhs.true.3, %for.inc.1 %cnt.1.3 = phi i32 [ %cnt.1.2, %for.inc.1 ], [ %spec.select.3, %land.lhs.true.3 ] %rem.4 = srem i32 %0, 5 %div.4 = sdiv i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.4, 0 %7 = add nsw i32 %div.4, -1 %or.cond.4 = icmp ult i32 %7, 9 %spec.select.4 = select i1 %or.cond.4, i32 1, i32 %cnt.1.3 %cnt.1.4 = select i1 %cmp1.4, i32 %spec.select.4, i32 %cnt.1.3 %rem.5 = srem i32 %0, 6 %div.5 = sdiv i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.5, 0 %8 = add nsw i32 %div.5, -1 %or.cond.5 = icmp ult i32 %8, 9 %spec.select.5 = select i1 %or.cond.5, i32 1, i32 %cnt.1.4 %cnt.1.5 = select i1 %cmp1.5, i32 %spec.select.5, i32 %cnt.1.4 %rem.6 = srem i32 %0, 7 %div.6 = sdiv i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.6, 0 %9 = add nsw i32 %div.6, -1 %or.cond.6 = icmp ult i32 %9, 9 %spec.select.6 = select i1 %or.cond.6, i32 1, i32 %cnt.1.5 %cnt.1.6 = select i1 %cmp1.6, i32 %spec.select.6, i32 %cnt.1.5 %10 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %10, 0 br i1 %cmp1.7, label %land.lhs.true.7, label %for.inc.7 land.lhs.true.7: ; preds = %for.inc.3 %div.7 = sdiv i32 %0, 8 %11 = add nsw i32 %div.7, -1 %or.cond.7 = icmp ult i32 %11, 9 %spec.select.7 = select i1 %or.cond.7, i32 1, i32 %cnt.1.6 br label %for.inc.7 for.inc.7: ; preds = %land.lhs.true.7, %for.inc.3 %cnt.1.7 = phi i32 [ %cnt.1.6, %for.inc.3 ], [ %spec.select.7, %land.lhs.true.7 ] %rem.8 = srem i32 %0, 9 %div.8 = sdiv i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.8, 0 br i1 %cmp1.8, label %land.lhs.true.8, label %for.inc.8 land.lhs.true.8: ; preds = %for.inc.7 %12 = add nsw i32 %div.8, -1 %or.cond.8 = icmp ult i32 %12, 9 %cmp6 = icmp eq i32 %cnt.1.7, 1 %or.cond19 = select i1 %or.cond.8, i1 true, i1 %cmp6 br i1 %or.cond19, label %if.end10, label %if.else for.inc.8: ; preds = %for.inc.7 %cmp6.old = icmp eq i32 %cnt.1.7, 1 br i1 %cmp6.old, label %if.end10, label %if.else if.else: ; preds = %land.lhs.true.8, %for.inc.8 br label %if.end10 if.end10: ; preds = %for.inc.8, %land.lhs.true.8, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true.8 ], [ @.str.1, %for.inc.8 ] %call9 = 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int n; scanf("%d",&n); for(int a=1;a<=9;a++)for(int b=1;b<=9;b++){ if(a*b==n){ puts("Yes"); return 0; } } puts("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136306/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136306/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) %0 = load i32, ptr %n, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %cleanup9, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp5.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond23 = icmp eq i32 %7, 1 %cmp5.5 = icmp eq i32 %0, 6 %exitcond24 = icmp eq i32 %2, 1 %cmp5.7 = icmp eq i32 %0, 8 %exitcond25 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond23.1 = icmp eq i32 %7, 2 %cmp5.5.1 = icmp eq i32 %0, 12 %exitcond24.1 = icmp eq i32 %2, 2 %cmp5.7.1 = icmp eq i32 %0, 16 %exitcond25.1 = icmp eq i32 %1, 2 %cmp5.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond23.2 = icmp eq i32 %7, 3 %cmp5.5.2 = icmp eq i32 %0, 18 %exitcond24.2 = icmp eq i32 %2, 3 %cmp5.7.2 = icmp eq i32 %0, 24 %exitcond25.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond23.3 = icmp eq i32 %7, 4 %exitcond24.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond24.4 = icmp eq i32 %2, 5 %cmp5.7.4 = icmp eq i32 %0, 40 %exitcond25.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp5.5.6 = icmp eq i32 %0, 42 %exitcond24.6 = icmp eq i32 %2, 7 %cmp5.7.6 = icmp eq i32 %0, 56 %exitcond25.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond24.7 = icmp eq i32 %2, 8 %cmp5.7.7 = icmp eq i32 %0, 64 %exitcond25.7 = icmp eq i32 %1, 8 %cmp5.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond23.8 = icmp eq i32 %7, 9 %cmp5.5.8 = icmp eq i32 %0, 54 %exitcond24.8 = icmp eq i32 %2, 9 %cmp5.7.8 = icmp eq i32 %0, 72 %exitcond25.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx98 = or i1 %op.rdx, %cmp5.3 %op.rdx99 = or i1 %exitcond, %exitcond23 %op.rdx100 = or i1 %cmp5.5, %exitcond24 %op.rdx101 = or i1 %cmp5.7, %exitcond25 %op.rdx102 = or i1 %exitcond.1, %exitcond23.1 %op.rdx103 = or i1 %cmp5.5.1, %exitcond24.1 %op.rdx104 = or i1 %cmp5.7.1, %exitcond25.1 %op.rdx105 = or i1 %cmp5.2, %exitcond.2 %op.rdx106 = or i1 %exitcond23.2, %cmp5.5.2 %op.rdx107 = or i1 %exitcond24.2, %cmp5.7.2 %op.rdx108 = or i1 %exitcond25.2, %exitcond.3 %op.rdx109 = or i1 %exitcond23.3, %exitcond24.3 %op.rdx110 = or i1 %exitcond24.4, %cmp5.7.4 %op.rdx111 = or i1 %exitcond25.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx112 = icmp eq i32 %22, 6 %op.rdx113 = or i1 %cmp5.5.6, %exitcond24.6 %op.rdx114 = or i1 %cmp5.7.6, %exitcond25.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx115 = extractelement <2 x i1> %23, i64 0 %op.rdx116 = or i1 %exitcond24.7, %cmp5.7.7 %op.rdx117 = or i1 %exitcond25.7, %cmp5.8 %op.rdx118 = or i1 %exitcond.8, %exitcond23.8 %op.rdx119 = or i1 %cmp5.5.8, %exitcond24.8 %op.rdx120 = or i1 %cmp5.7.8, %exitcond25.8 %op.rdx121 = or i1 %op.rdx98, %op.rdx99 %op.rdx122 = or i1 %op.rdx100, %op.rdx101 %op.rdx123 = or i1 %op.rdx102, %op.rdx103 %op.rdx124 = or i1 %op.rdx104, %op.rdx105 %op.rdx125 = or i1 %op.rdx106, %op.rdx107 %op.rdx126 = or i1 %op.rdx108, %op.rdx109 %op.rdx127 = or i1 %op.rdx110, %op.rdx111 %op.rdx128 = or i1 %op.rdx112, %op.rdx113 %op.rdx129 = or i1 %op.rdx114, %op.rdx115 %op.rdx130 = or i1 %op.rdx116, %op.rdx117 %op.rdx131 = or i1 %op.rdx118, %op.rdx119 %op.rdx132 = or i1 %op.rdx121, %op.rdx122 %op.rdx133 = or i1 %op.rdx123, %op.rdx124 %op.rdx134 = or i1 %op.rdx125, %op.rdx126 %op.rdx135 = or i1 %op.rdx127, %op.rdx128 %op.rdx136 = or i1 %op.rdx129, %op.rdx130 %op.rdx137 = or i1 %op.rdx131, %op.rdx120 %op.rdx138 = or i1 %op.rdx132, %op.rdx133 %op.rdx139 = or i1 %op.rdx134, %op.rdx135 %op.rdx140 = or i1 %op.rdx136, %op.rdx137 %op.rdx141 = or i1 %op.rdx138, %op.rdx139 %op.rdx142 = or i1 %op.rdx141, %op.rdx140 br i1 %op.rdx142, label %cleanup9, label %cleanup13 cleanup9: ; preds = %entry, %for.cond1.1 br label %cleanup13 cleanup13: ; preds = %for.cond1.1, %cleanup9 %.str.1.sink = phi ptr [ @.str.1, %cleanup9 ], [ @.str.2, %for.cond1.1 ] %call6 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1.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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> /*inline void Scan_f(int a) { char c = 0; while(c<33) //c = fgetc_unlocked(stdin); c = getc(stdin); a = 0; while(c>33) { a = a*10 + c - '0'; //c = fgetc_unlocked(stdin); c = getc(stdin); } } */ int main() { int n,i; int k; int y[2000]; int count =0,ans =0; //scanf("%d",&n); //scanf("%d",&k); scanf("%d",&n); scanf("%d",&k); //y=(int *)malloc(sizeof(int)*n); for(i=0;i<n;i++) //Scan_f(y[i]); scanf("%d",&y[i]); // for(i=0;i<n;i++) // printf("%d",y[i]); for(i=0;i<n;i++) { if(5-y[i]>=k) count++; } ans = count/3; printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %y = alloca [2000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.start.p0(i64 8000, ptr nonnull %y) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp20 = icmp sgt i32 %0, 0 br i1 %cmp20, label %for.body, label %for.end12 for.cond3.preheader: ; preds = %for.body %cmp422 = icmp sgt i32 %14, 0 br i1 %cmp422, label %for.body5.lr.ph, label %for.end12 for.body5.lr.ph: ; preds = %for.cond3.preheader %1 = load i32, ptr %k, align 4, !tbaa !5 %wide.trip.count = zext i32 %14 to i64 %min.iters.check = icmp ult i32 %14, 8 br i1 %min.iters.check, label %for.body5.preheader, label %vector.ph vector.ph: ; preds = %for.body5.lr.ph %n.vec = and i64 %wide.trip.count, 4294967288 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %1, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ] %vec.phi33 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ] %2 = getelementptr inbounds [2000 x i32], ptr %y, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 %wide.load34 = load <4 x i32>, ptr %3, align 16, !tbaa !5 %4 = sub nsw <4 x i32> <i32 5, i32 5, i32 5, i32 5>, %wide.load %5 = sub nsw <4 x i32> <i32 5, i32 5, i32 5, i32 5>, %wide.load34 %6 = icmp sge <4 x i32> %4, %broadcast.splat %7 = icmp sge <4 x i32> %5, %broadcast.splat %8 = zext <4 x i1> %6 to <4 x i32> %9 = zext <4 x i1> %7 to <4 x i32> %10 = add <4 x i32> %vec.phi, %8 %11 = add <4 x i32> %vec.phi33, %9 %index.next = add nuw i64 %index, 8 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %11, %10 %13 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end12.loopexit, label %for.body5.preheader for.body5.preheader: ; preds = %for.body5.lr.ph, %middle.block %indvars.iv28.ph = phi i64 [ 0, %for.body5.lr.ph ], [ %n.vec, %middle.block ] %count.024.ph = phi i32 [ 0, %for.body5.lr.ph ], [ %13, %middle.block ] br label %for.body5 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [2000 x i32], ptr %y, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %14 = load i32, ptr %n, align 4, !tbaa !5 %15 = sext i32 %14 to i64 %cmp = icmp slt i64 %indvars.iv.next, %15 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !13 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv28 = phi i64 [ %indvars.iv.next29, %for.body5 ], [ %indvars.iv28.ph, %for.body5.preheader ] %count.024 = phi i32 [ %spec.select, %for.body5 ], [ %count.024.ph, %for.body5.preheader ] %arrayidx7 = getelementptr inbounds [2000 x i32], ptr %y, i64 0, i64 %indvars.iv28 %16 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %sub = sub nsw i32 5, %16 %cmp8.not = icmp sge i32 %sub, %1 %inc9 = zext i1 %cmp8.not to i32 %spec.select = add nuw nsw i32 %count.024, %inc9 %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1 %exitcond.not = icmp eq i64 %indvars.iv.next29, %wide.trip.count br i1 %exitcond.not, label %for.end12.loopexit, label %for.body5, !llvm.loop !14 for.end12.loopexit: ; preds = %for.body5, %middle.block %spec.select.lcssa = phi i32 [ %13, %middle.block ], [ %spec.select, %for.body5 ] %17 = udiv i32 %spec.select.lcssa, 3 br label %for.end12 for.end12: ; preds = %entry, %for.end12.loopexit, %for.cond3.preheader %count.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ %17, %for.end12.loopexit ], [ 0, %entry ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %count.0.lcssa) call void @llvm.lifetime.end.p0(i64 8000, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
#include<stdio.h> int main() { int a; scanf("%d",&a); if(a==1||a==2||a==3||a==4||a==5||a==6||a==7||a==8||a==9||a==10||a==12||a==14||a==16||a==18||a==15||a==21||a==24||a==27||a==20||a==28||a==32||a==36||a==25||a==30||a==35||a==40||a==45||a==42||a==48||a==54||a==56||a==63||a==49||a==64||a==72||a==81) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %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 %.fr106 = freeze i32 %0 %1 = add i32 %.fr106, -1 %or.cond79 = icmp ult i32 %1, 10 br i1 %or.cond79, label %if.end, label %switch.early.test switch.early.test: ; preds = %entry switch i32 %.fr106, label %if.else [ i32 81, label %if.end i32 72, label %if.end i32 64, label %if.end i32 63, label %if.end i32 56, label %if.end i32 54, label %if.end i32 49, label %if.end i32 48, label %if.end i32 45, label %if.end i32 42, label %if.end i32 40, label %if.end i32 36, label %if.end i32 35, label %if.end i32 32, label %if.end i32 30, label %if.end i32 28, label %if.end i32 27, label %if.end i32 25, label %if.end i32 24, label %if.end i32 21, label %if.end i32 20, label %if.end i32 18, label %if.end i32 16, label %if.end i32 15, label %if.end i32 14, label %if.end i32 12, label %if.end ] if.else: ; preds = %switch.early.test br label %if.end if.end: ; preds = %entry, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %switch.early.test, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %switch.early.test ], [ @.str.1, %entry ] %call71 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) 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)"}
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <stddef.h> #include <ctype.h> int main(int argc, char *argv[]) { int a1, a2, k1, k2, n, ans1, ans2; scanf("%d%d%d%d%d", &a1, &a2, &k1, &k2, &n); int d = (k1 - 1) * a1 + (k2 - 1) * a2; if (d >= n) { ans1 = 0; } else { ans1 = n - d; } if (k1 > k2) { int t = k1; k1 = k2; k2 = t; t = a1; a1 = a2; a2 = t; } int d2 = a1 * k1; if (d2 >= n) { ans2 = n / k1; } else { ans2 = a1 + (n - d2) / k2; } printf("%d %d", ans1, ans2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13648/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13648/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %a1 = alloca i32, align 4 %a2 = alloca i32, align 4 %k1 = alloca i32, align 4 %k2 = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a1) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a2) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k1) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k2) #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 %a1, ptr noundef nonnull %a2, ptr noundef nonnull %k1, ptr noundef nonnull %k2, ptr noundef nonnull %n) %0 = load i32, ptr %k1, align 4, !tbaa !5 %1 = load i32, ptr %a1, align 4, !tbaa !5 %2 = load i32, ptr %k2, align 4, !tbaa !5 %3 = load i32, ptr %a2, align 4, !tbaa !5 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp4 = icmp sgt i32 %0, %2 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %entry store i32 %2, ptr %k1, align 4, !tbaa !5 store i32 %0, ptr %k2, align 4, !tbaa !5 store i32 %3, ptr %a1, align 4, !tbaa !5 store i32 %1, ptr %a2, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %entry %5 = phi i32 [ %0, %if.then5 ], [ %2, %entry ] %6 = phi i32 [ %2, %if.then5 ], [ %0, %entry ] %7 = phi i32 [ %3, %if.then5 ], [ %1, %entry ] %mul7 = mul nsw i32 %6, %7 %cmp8.not = icmp slt i32 %mul7, %4 br i1 %cmp8.not, label %if.else10, label %if.then9 if.then9: ; preds = %if.end6 %div = sdiv i32 %4, %6 br label %if.end14 if.else10: ; preds = %if.end6 %sub11 = sub nsw i32 %4, %mul7 %div12 = sdiv i32 %sub11, %5 %add13 = add nsw i32 %div12, %7 br label %if.end14 if.end14: ; preds = %if.else10, %if.then9 %ans2.0 = phi i32 [ %div, %if.then9 ], [ %add13, %if.else10 ] %sub = add nsw i32 %0, -1 %mul = mul nsw i32 %sub, %1 %sub1 = add nsw i32 %2, -1 %mul2 = mul nsw i32 %sub1, %3 %add = add nsw i32 %mul2, %mul %cmp.not = icmp slt i32 %add, %4 %sub3 = sub nsw i32 %4, %add %ans1.0 = select i1 %cmp.not, i32 %sub3, i32 0 %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans1.0, i32 noundef %ans2.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k2) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k1) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a2) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a1) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int n; scanf("%d",&n); for (int i = 1;i<10;i++) { for (int j = 1; j< 10; j++) { if (i*j==n) { printf("Yes\n"); return 0; } } } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136522/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136522/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %cleanup9, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp5.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond23 = icmp eq i32 %7, 1 %cmp5.5 = icmp eq i32 %0, 6 %exitcond24 = icmp eq i32 %2, 1 %cmp5.7 = icmp eq i32 %0, 8 %exitcond25 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond23.1 = icmp eq i32 %7, 2 %cmp5.5.1 = icmp eq i32 %0, 12 %exitcond24.1 = icmp eq i32 %2, 2 %cmp5.7.1 = icmp eq i32 %0, 16 %exitcond25.1 = icmp eq i32 %1, 2 %cmp5.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond23.2 = icmp eq i32 %7, 3 %cmp5.5.2 = icmp eq i32 %0, 18 %exitcond24.2 = icmp eq i32 %2, 3 %cmp5.7.2 = icmp eq i32 %0, 24 %exitcond25.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond23.3 = icmp eq i32 %7, 4 %exitcond24.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond24.4 = icmp eq i32 %2, 5 %cmp5.7.4 = icmp eq i32 %0, 40 %exitcond25.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp5.5.6 = icmp eq i32 %0, 42 %exitcond24.6 = icmp eq i32 %2, 7 %cmp5.7.6 = icmp eq i32 %0, 56 %exitcond25.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond24.7 = icmp eq i32 %2, 8 %cmp5.7.7 = icmp eq i32 %0, 64 %exitcond25.7 = icmp eq i32 %1, 8 %cmp5.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond23.8 = icmp eq i32 %7, 9 %cmp5.5.8 = icmp eq i32 %0, 54 %exitcond24.8 = icmp eq i32 %2, 9 %cmp5.7.8 = icmp eq i32 %0, 72 %exitcond25.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx98 = or i1 %op.rdx, %cmp5.3 %op.rdx99 = or i1 %exitcond, %exitcond23 %op.rdx100 = or i1 %cmp5.5, %exitcond24 %op.rdx101 = or i1 %cmp5.7, %exitcond25 %op.rdx102 = or i1 %exitcond.1, %exitcond23.1 %op.rdx103 = or i1 %cmp5.5.1, %exitcond24.1 %op.rdx104 = or i1 %cmp5.7.1, %exitcond25.1 %op.rdx105 = or i1 %cmp5.2, %exitcond.2 %op.rdx106 = or i1 %exitcond23.2, %cmp5.5.2 %op.rdx107 = or i1 %exitcond24.2, %cmp5.7.2 %op.rdx108 = or i1 %exitcond25.2, %exitcond.3 %op.rdx109 = or i1 %exitcond23.3, %exitcond24.3 %op.rdx110 = or i1 %exitcond24.4, %cmp5.7.4 %op.rdx111 = or i1 %exitcond25.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx112 = icmp eq i32 %22, 6 %op.rdx113 = or i1 %cmp5.5.6, %exitcond24.6 %op.rdx114 = or i1 %cmp5.7.6, %exitcond25.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx115 = extractelement <2 x i1> %23, i64 0 %op.rdx116 = or i1 %exitcond24.7, %cmp5.7.7 %op.rdx117 = or i1 %exitcond25.7, %cmp5.8 %op.rdx118 = or i1 %exitcond.8, %exitcond23.8 %op.rdx119 = or i1 %cmp5.5.8, %exitcond24.8 %op.rdx120 = or i1 %cmp5.7.8, %exitcond25.8 %op.rdx121 = or i1 %op.rdx98, %op.rdx99 %op.rdx122 = or i1 %op.rdx100, %op.rdx101 %op.rdx123 = or i1 %op.rdx102, %op.rdx103 %op.rdx124 = or i1 %op.rdx104, %op.rdx105 %op.rdx125 = or i1 %op.rdx106, %op.rdx107 %op.rdx126 = or i1 %op.rdx108, %op.rdx109 %op.rdx127 = or i1 %op.rdx110, %op.rdx111 %op.rdx128 = or i1 %op.rdx112, %op.rdx113 %op.rdx129 = or i1 %op.rdx114, %op.rdx115 %op.rdx130 = or i1 %op.rdx116, %op.rdx117 %op.rdx131 = or i1 %op.rdx118, %op.rdx119 %op.rdx132 = or i1 %op.rdx121, %op.rdx122 %op.rdx133 = or i1 %op.rdx123, %op.rdx124 %op.rdx134 = or i1 %op.rdx125, %op.rdx126 %op.rdx135 = or i1 %op.rdx127, %op.rdx128 %op.rdx136 = or i1 %op.rdx129, %op.rdx130 %op.rdx137 = or i1 %op.rdx131, %op.rdx120 %op.rdx138 = or i1 %op.rdx132, %op.rdx133 %op.rdx139 = or i1 %op.rdx134, %op.rdx135 %op.rdx140 = or i1 %op.rdx136, %op.rdx137 %op.rdx141 = or i1 %op.rdx138, %op.rdx139 %op.rdx142 = or i1 %op.rdx141, %op.rdx140 br i1 %op.rdx142, label %cleanup9, label %cleanup13 cleanup9: ; preds = %entry, %for.cond1.1 br label %cleanup13 cleanup13: ; preds = %for.cond1.1, %cleanup9 %str.sink = phi ptr [ @str, %cleanup9 ], [ @str.3, %for.cond1.1 ] %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"}
#include <stdio.h> int main(void){ int n; scanf("%d\n", &n); for (int i = 9; i > 0; i--) { if ( (n % i == 0) && (n / i <= 9) ) { printf("Yes\n"); return(0); } } printf("No\n"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136573/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d\0A\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 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %rem = srem i32 %0, 9 %cmp1 = icmp eq i32 %rem, 0 %cmp2 = icmp slt i32 %0, 90 %or.cond = and i1 %cmp1, %cmp2 br i1 %or.cond, label %cleanup5, label %for.inc for.inc: ; preds = %entry %1 = and i32 %0, 7 %cmp1.1 = icmp eq i32 %1, 0 %cmp2.1 = icmp slt i32 %0, 80 %or.cond12 = and i1 %cmp1.1, %cmp2.1 br i1 %or.cond12, label %cleanup5, label %for.inc.1 for.inc.1: ; preds = %for.inc %rem.2 = srem i32 %0, 7 %cmp1.2 = icmp eq i32 %rem.2, 0 %cmp2.2 = icmp slt i32 %0, 70 %or.cond13 = and i1 %cmp1.2, %cmp2.2 br i1 %or.cond13, label %cleanup5, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %rem.3 = srem i32 %0, 6 %cmp1.3 = icmp eq i32 %rem.3, 0 %cmp2.3 = icmp slt i32 %0, 60 %or.cond14 = and i1 %cmp1.3, %cmp2.3 br i1 %or.cond14, label %cleanup5, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %rem.4 = srem i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.4, 0 %cmp2.4 = icmp slt i32 %0, 50 %or.cond15 = and i1 %cmp1.4, %cmp2.4 br i1 %or.cond15, label %cleanup5, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %2 = and i32 %0, 3 %cmp1.5 = icmp eq i32 %2, 0 %cmp2.5 = icmp slt i32 %0, 40 %or.cond16 = and i1 %cmp1.5, %cmp2.5 br i1 %or.cond16, label %cleanup5, label %for.inc.5 for.inc.5: ; preds = %for.inc.4 %rem.6 = srem i32 %0, 3 %cmp1.6 = icmp eq i32 %rem.6, 0 %cmp2.6 = icmp slt i32 %0, 30 %or.cond17 = and i1 %cmp1.6, %cmp2.6 br i1 %or.cond17, label %cleanup5, label %for.inc.6 for.inc.6: ; preds = %for.inc.5 %3 = and i32 %0, 1 %cmp1.7 = icmp eq i32 %3, 0 br i1 %cmp1.7, label %land.lhs.true.7, label %land.lhs.true.8 land.lhs.true.7: ; preds = %for.inc.6 %cmp2.7 = icmp slt i32 %0, 20 br i1 %cmp2.7, label %cleanup5, label %for.inc.8 land.lhs.true.8: ; preds = %for.inc.6 %cmp2.8 = icmp slt i32 %0, 10 br i1 %cmp2.8, label %cleanup5, label %for.inc.8 for.inc.8: ; preds = %land.lhs.true.7, %land.lhs.true.8 br label %cleanup5 cleanup5: ; preds = %land.lhs.true.7, %land.lhs.true.8, %entry, %for.inc, %for.inc.1, %for.inc.2, %for.inc.3, %for.inc.4, %for.inc.5, %for.inc.8 %str.sink = phi ptr [ @str.3, %for.inc.8 ], [ @str, %for.inc.5 ], [ @str, %for.inc.4 ], [ @str, %for.inc.3 ], [ @str, %for.inc.2 ], [ @str, %for.inc.1 ], [ @str, %for.inc ], [ @str, %entry ], [ @str, %land.lhs.true.8 ], [ @str, %land.lhs.true.7 ] %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"}
#include<stdio.h> #define MIN(a,b) a<b?a:b #define MAX(a,b) a>b?a:b int main() { int t1,t2,c1,c2,tc,r1,r2,ans1,ans2,c; scanf("%d%d%d%d%d",&t1,&t2,&c1,&c2,&tc); r1=(t1*c1)-t1; r2=(t2*c2)-t2; ans1=MIN(r1+r2,tc); printf("%d",MIN(tc-ans1,t1+t2)); ans1=MIN(tc/c1,t1); c=tc-(ans1*c1); ans2=MIN(c/c2,t2); r1=ans1+ans2; ans1=MIN(tc/c2,t2); c=tc-(ans1*c2); ans2=MIN(c/c1,t1); r2=ans1+ans2; printf(" %d\n",MAX(r1,r2)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c" %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t1 = alloca i32, align 4 %t2 = alloca i32, align 4 %c1 = alloca i32, align 4 %c2 = alloca i32, align 4 %tc = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t2) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c1) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c2) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tc) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t1, ptr noundef nonnull %t2, ptr noundef nonnull %c1, ptr noundef nonnull %c2, ptr noundef nonnull %tc) %0 = load i32, ptr %t1, align 4, !tbaa !5 %1 = load i32, ptr %c1, align 4, !tbaa !5 %2 = add i32 %1, -1 %sub = mul i32 %2, %0 %3 = load i32, ptr %t2, align 4, !tbaa !5 %4 = load i32, ptr %c2, align 4, !tbaa !5 %5 = add i32 %4, -1 %sub2 = mul i32 %5, %3 %add = add nsw i32 %sub2, %sub %6 = load i32, ptr %tc, align 4 %cond = call i32 @llvm.smin.i32(i32 %add, i32 %6) %sub4 = sub nsw i32 %6, %cond %add5 = add nsw i32 %3, %0 %sub4.add5 = call i32 @llvm.smin.i32(i32 %sub4, i32 %add5) %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub4.add5) %7 = load i32, ptr %tc, align 4, !tbaa !5 %8 = load i32, ptr %c1, align 4, !tbaa !5 %div = sdiv i32 %7, %8 %9 = load i32, ptr %t1, align 4, !tbaa !5 %cond19 = call i32 @llvm.smin.i32(i32 %div, i32 %9) %mul20 = mul nsw i32 %cond19, %8 %sub21 = sub nsw i32 %7, %mul20 %10 = load i32, ptr %c2, align 4, !tbaa !5 %div22 = sdiv i32 %sub21, %10 %11 = load i32, ptr %t2, align 4, !tbaa !5 %cond28 = call i32 @llvm.smin.i32(i32 %div22, i32 %11) %div30 = sdiv i32 %7, %10 %cond36 = call i32 @llvm.smin.i32(i32 %div30, i32 %11) %mul37 = mul nsw i32 %cond36, %10 %sub38 = sub nsw i32 %7, %mul37 %div39 = sdiv i32 %sub38, %8 %cond45 = call i32 @llvm.smin.i32(i32 %div39, i32 %9) %add29 = add nsw i32 %cond28, %cond19 %add46 = add nsw i32 %cond45, %cond36 %cond51 = call i32 @llvm.smax.i32(i32 %add29, i32 %add46) %call52 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %cond51) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tc) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c1) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t2) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t1) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> int main(){ int* s; int n,i,sum=0,min=100; scanf("%d",&n); s=(int *)malloc(sizeof(int)*n); for(i=0;i<n;i++){ scanf("%d",&s[i]); } for(i=0;i<n;i++){ sum+=s[i]; if(s[i]%10!=0&&min>s[i]){ min=s[i]; } } if(sum%10==0){ if(min!=100) sum-=min; else sum=0; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %mul = shl nsw i64 %conv, 2 %call1 = call noalias ptr @malloc(i64 noundef %mul) #5 %cmp50 = icmp sgt i32 %0, 0 br i1 %cmp50, label %for.body, label %for.end22.thread for.cond4.preheader: ; preds = %for.body %cmp552 = icmp sgt i32 %2, 0 br i1 %cmp552, label %for.body7.preheader, label %for.end22.thread for.body7.preheader: ; preds = %for.cond4.preheader %wide.trip.count = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count, 1 %1 = icmp eq i32 %2, 1 br i1 %1, label %for.end22.unr-lcssa, label %for.body7.preheader.new for.body7.preheader.new: ; preds = %for.body7.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body7 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !9 for.body7: ; preds = %for.body7, %for.body7.preheader.new %indvars.iv60 = phi i64 [ 0, %for.body7.preheader.new ], [ %indvars.iv.next61.1, %for.body7 ] %min.055 = phi i32 [ 100, %for.body7.preheader.new ], [ %min.1.fr.1, %for.body7 ] %sum.054 = phi i32 [ 0, %for.body7.preheader.new ], [ %add.1, %for.body7 ] %niter = phi i64 [ 0, %for.body7.preheader.new ], [ %niter.next.1, %for.body7 ] %arrayidx9 = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv60 %4 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %add = add nsw i32 %4, %sum.054 %rem = srem i32 %4, 10 %cmp12.not = icmp ne i32 %rem, 0 %cmp16 = icmp sgt i32 %min.055, %4 %or.cond = and i1 %cmp12.not, %cmp16 %min.1 = select i1 %or.cond, i32 %4, i32 %min.055 %min.1.fr = freeze i32 %min.1 %indvars.iv.next61 = or i64 %indvars.iv60, 1 %arrayidx9.1 = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv.next61 %5 = load i32, ptr %arrayidx9.1, align 4, !tbaa !5 %add.1 = add nsw i32 %5, %add %rem.1 = srem i32 %5, 10 %cmp12.not.1 = icmp ne i32 %rem.1, 0 %cmp16.1 = icmp sgt i32 %min.1.fr, %5 %or.cond.1 = and i1 %cmp12.not.1, %cmp16.1 %min.1.1 = select i1 %or.cond.1, i32 %5, i32 %min.1.fr %min.1.fr.1 = freeze i32 %min.1.1 %indvars.iv.next61.1 = add nuw nsw i64 %indvars.iv60, 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.end22.unr-lcssa, label %for.body7, !llvm.loop !11 for.end22.unr-lcssa: ; preds = %for.body7, %for.body7.preheader %add.lcssa.ph = phi i32 [ undef, %for.body7.preheader ], [ %add.1, %for.body7 ] %min.1.fr.lcssa.ph = phi i32 [ undef, %for.body7.preheader ], [ %min.1.fr.1, %for.body7 ] %indvars.iv60.unr = phi i64 [ 0, %for.body7.preheader ], [ %indvars.iv.next61.1, %for.body7 ] %min.055.unr = phi i32 [ 100, %for.body7.preheader ], [ %min.1.fr.1, %for.body7 ] %sum.054.unr = phi i32 [ 0, %for.body7.preheader ], [ %add.1, %for.body7 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end22, label %for.body7.epil for.body7.epil: ; preds = %for.end22.unr-lcssa %arrayidx9.epil = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv60.unr %6 = load i32, ptr %arrayidx9.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %6, %sum.054.unr %rem.epil = srem i32 %6, 10 %cmp12.not.epil = icmp ne i32 %rem.epil, 0 %cmp16.epil = icmp sgt i32 %min.055.unr, %6 %or.cond.epil = and i1 %cmp12.not.epil, %cmp16.epil %min.1.epil = select i1 %or.cond.epil, i32 %6, i32 %min.055.unr %min.1.fr.epil = freeze i32 %min.1.epil br label %for.end22 for.end22: ; preds = %for.end22.unr-lcssa, %for.body7.epil %add.lcssa = phi i32 [ %add.lcssa.ph, %for.end22.unr-lcssa ], [ %add.epil, %for.body7.epil ] %min.1.fr.lcssa = phi i32 [ %min.1.fr.lcssa.ph, %for.end22.unr-lcssa ], [ %min.1.fr.epil, %for.body7.epil ] %rem23 = srem i32 %add.lcssa, 10 %cmp24 = icmp eq i32 %rem23, 0 %cmp27.not = icmp eq i32 %min.1.fr.lcssa, 100 %sub = sub nsw i32 %add.lcssa, %min.1.fr.lcssa br i1 %cmp27.not, label %for.end22.thread, label %7 for.end22.thread: ; preds = %entry, %for.cond4.preheader, %for.end22 %cmp2475 = phi i1 [ %cmp24, %for.end22 ], [ true, %for.cond4.preheader ], [ true, %entry ] %sum.0.lcssa73 = phi i32 [ %add.lcssa, %for.end22 ], [ 0, %for.cond4.preheader ], [ 0, %entry ] br label %7 7: ; preds = %for.end22, %for.end22.thread %cmp2474 = phi i1 [ %cmp2475, %for.end22.thread ], [ %cmp24, %for.end22 ] %sum.0.lcssa72 = phi i32 [ %sum.0.lcssa73, %for.end22.thread ], [ %add.lcssa, %for.end22 ] %8 = phi i32 [ 0, %for.end22.thread ], [ %sub, %for.end22 ] %sum.1 = select i1 %cmp2474, i32 %8, i32 %sum.0.lcssa72 %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
//set many funcs template #include<stdio.h> #include<string.h> #include<stdlib.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int main(void){ long long n,a,b,i,v[131072],r2=0,x=0,y=0; double r1=0; scanf("%lld%lld%lld",&n,&a,&b); for(i=0;i<n;i++){scanf("%lld",&v[i]);} qsort(v,n,sizeof(long long),llsortfnckj); for(i=0;i<a;i++){r1+=v[i];} r1/=a; printf("%.12lf\n",r1); for(i=0;i<n;i++){if(v[i]==v[a-1]){x++;}else if(v[i]>v[a-1]){y++;}} for(i=1;i<=x;i++){ if(((y+i)<a) || (b<(y+i))){continue;} r2+=llnCr(x,i); if(v[0]!=v[y+i-1]){break;} } printf("%lld\n",r2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136768/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136768/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [13 x i8] c"%lld%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [8 x i8] c"%.12lf\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @zt(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i32 %a, %b %sub = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true) ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @round(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %mul = shl nsw i32 %rem, 1 %cmp.not = icmp sge i32 %mul, %b %div1 = sdiv i32 %a, %b %add = zext i1 %cmp.not to i32 %retval.0 = add nsw i32 %div1, %add ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @ceil(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %cmp = icmp ne i32 %rem, 0 %div = sdiv i32 %a, %b %add = zext i1 %cmp to i32 %retval.0 = add nsw i32 %div, %add ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i32 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i32 %b, 0 br i1 %cmp.not4.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i32 %a, %a.addr.0.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nCr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i32 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i32 %a, 1 %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i32 %add, %i.07 %mul = mul nsw i32 %r.08, %sub %div = sdiv i32 %mul, %i.07 %inc = add nuw i32 %i.07, 1 %sub.1 = sub i32 %add, %inc %mul.1 = mul nsw i32 %div, %sub.1 %div.1 = sdiv i32 %mul.1, %inc %inc.1 = add nuw i32 %i.07, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i32 %add, %i.07.unr %mul.epil = mul nsw i32 %r.08.unr, %sub.epil %div.epil = sdiv i32 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @fact(i32 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i32 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %a, 8 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %a, -8 %ind.end = or i32 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi7 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = mul <4 x i32> %vec.phi, %vec.ind %1 = mul <4 x i32> %vec.phi7, %step.add %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !8 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %a br i1 %cmp.n, label %for.end, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %r.06.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.05.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader9, %for.body %r.06 = phi i32 [ %mul, %for.body ], [ %r.06.ph, %for.body.preheader9 ] %i.05 = phi i32 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader9 ] %mul = mul nsw i32 %r.06, %i.05 %inc = add nuw i32 %i.05, 1 %exitcond.not = icmp eq i32 %i.05, %a br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @pow(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i32 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %b, 8 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %b, -8 %ind.end = or i32 %n.vec, 1 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %a, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi6 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %0 = mul <4 x i32> %vec.phi, %broadcast.splat %1 = mul <4 x i32> %vec.phi6, %broadcast.splat %index.next = add nuw i32 %index, 8 %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %b br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %r.05.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.04.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %r.05 = phi i32 [ %mul, %for.body ], [ %r.05.ph, %for.body.preheader7 ] %i.04 = phi i32 [ %inc, %for.body ], [ %i.04.ph, %for.body.preheader7 ] %mul = mul nsw i32 %r.05, %a %inc = add nuw i32 %i.04, 1 %exitcond.not = icmp eq i32 %i.04, %b br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llzt(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i64 %a, %b %sub = tail call i64 @llvm.abs.i64(i64 %sub5, i1 true) ret i64 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llround(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %mul = shl nsw i64 %rem, 1 %cmp.not = icmp sge i64 %mul, %b %div1 = sdiv i64 %a, %b %add = zext i1 %cmp.not to i64 %retval.0 = add nsw i64 %div1, %add ret i64 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llceil(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %cmp = icmp ne i64 %rem, 0 %div = sdiv i64 %a, %b %add = zext i1 %cmp to i64 %retval.0 = add nsw i64 %div, %add ret i64 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llgcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i64 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i64 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i64 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i64 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i64 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i64 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i64 %a.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lllcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i64 %b, 0 br i1 %cmp.not4.i, label %llgcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i64 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i64 %rem.i, 0 br i1 %cmp.not.i, label %llgcd.exit, label %while.body.i, !llvm.loop !14 llgcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i64 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i64 %a, %a.addr.0.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnCr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i64 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i64 %a, 1 %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i64 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i64 %add, %i.07 %mul = mul nsw i64 %r.08, %sub %div = sdiv i64 %mul, %i.07 %inc = add nuw i64 %i.07, 1 %sub.1 = sub i64 %add, %inc %mul.1 = mul nsw i64 %div, %sub.1 %div.1 = sdiv i64 %mul.1, %inc %inc.1 = add nuw i64 %i.07, 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.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !15 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i64 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i64 %add, %i.07.unr %mul.epil = mul nsw i64 %r.08.unr, %sub.epil %div.epil = sdiv i64 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llfact(i64 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i64 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %a, 7 %0 = icmp ult i64 %a, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %a, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %i.05 = phi i64 [ 1, %for.body.preheader.new ], [ %inc.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.06, %i.05 %inc = add nuw nsw i64 %i.05, 1 %mul.1 = mul nsw i64 %mul, %inc %inc.1 = add nuw nsw i64 %i.05, 2 %mul.2 = mul nsw i64 %mul.1, %inc.1 %inc.2 = add nuw nsw i64 %i.05, 3 %mul.3 = mul nsw i64 %mul.2, %inc.2 %inc.3 = add nuw nsw i64 %i.05, 4 %mul.4 = mul nsw i64 %mul.3, %inc.3 %inc.4 = add nuw nsw i64 %i.05, 5 %mul.5 = mul nsw i64 %mul.4, %inc.4 %inc.5 = add nuw nsw i64 %i.05, 6 %mul.6 = mul nsw i64 %mul.5, %inc.5 %inc.6 = add nuw i64 %i.05, 7 %mul.7 = mul nsw i64 %mul.6, %inc.6 %inc.7 = add nuw i64 %i.05, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !16 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %i.05.unr = phi i64 [ 1, %for.body.preheader ], [ %inc.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.06.unr, %for.end.loopexit.unr-lcssa ] %i.05.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.06.epil, %i.05.epil %inc.epil = add nuw i64 %i.05.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !17 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llpow(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i64 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.05 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.05, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !19 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.05.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.05.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.05.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !20 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmax(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp ogt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmin(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp olt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbzt(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp.i = fcmp ogt double %a, %b %a.b.i = select i1 %cmp.i, double %a, double %b %cmp.i4 = fcmp olt double %a, %b %a.b.i5 = select i1 %cmp.i4, double %a, double %b %sub = fsub double %a.b.i, %a.b.i5 ret double %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !21 %1 = load i32, ptr %b, align 4, !tbaa !21 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !21 %1 = load i32, ptr %b, align 4, !tbaa !21 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !25 %1 = load i64, ptr %b, align 8, !tbaa !25 %cmp = icmp sgt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !25 %1 = load i64, ptr %b, align 8, !tbaa !25 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !27 %1 = load double, ptr %b, align 8, !tbaa !27 %cmp = fcmp ogt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !27 %1 = load double, ptr %b, align 8, !tbaa !27 %cmp = fcmp olt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: %n = alloca i64, align 8 %a = alloca i64, align 8 %b = alloca i64, align 8 %v = alloca [131072 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #9 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #9 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #9 call void @llvm.lifetime.start.p0(i64 1048576, ptr nonnull %v) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i64, ptr %n, align 8, !tbaa !25 %cmp84 = icmp sgt i64 %0, 0 br i1 %cmp84, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.085 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %i.085 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.085, 1 %1 = load i64, ptr %n, align 8, !tbaa !25 %cmp = icmp slt i64 %inc, %1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !29 for.end: ; preds = %for.body, %entry %.lcssa83 = phi i64 [ %0, %entry ], [ %1, %for.body ] call void @qsort(ptr noundef nonnull %v, i64 noundef %.lcssa83, i64 noundef 8, ptr noundef nonnull @llsortfnckj) #9 %2 = load i64, ptr %a, align 8, !tbaa !25 %cmp386 = icmp sgt i64 %2, 0 br i1 %cmp386, label %for.body4.preheader, label %for.end8 for.body4.preheader: ; preds = %for.end %xtraiter = and i64 %2, 3 %3 = icmp ult i64 %2, 4 br i1 %3, label %for.end8.loopexit.unr-lcssa, label %for.body4.preheader.new for.body4.preheader.new: ; preds = %for.body4.preheader %unroll_iter = and i64 %2, -4 br label %for.body4 for.body4: ; preds = %for.body4, %for.body4.preheader.new %r1.088 = phi double [ 0.000000e+00, %for.body4.preheader.new ], [ %add.3, %for.body4 ] %i.187 = phi i64 [ 0, %for.body4.preheader.new ], [ %inc7.3, %for.body4 ] %niter = phi i64 [ 0, %for.body4.preheader.new ], [ %niter.next.3, %for.body4 ] %arrayidx5 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %i.187 %4 = load i64, ptr %arrayidx5, align 16, !tbaa !25 %conv = sitofp i64 %4 to double %add = fadd double %r1.088, %conv %inc7 = or i64 %i.187, 1 %arrayidx5.1 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %inc7 %5 = load i64, ptr %arrayidx5.1, align 8, !tbaa !25 %conv.1 = sitofp i64 %5 to double %add.1 = fadd double %add, %conv.1 %inc7.1 = or i64 %i.187, 2 %arrayidx5.2 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %inc7.1 %6 = load i64, ptr %arrayidx5.2, align 16, !tbaa !25 %conv.2 = sitofp i64 %6 to double %add.2 = fadd double %add.1, %conv.2 %inc7.2 = or i64 %i.187, 3 %arrayidx5.3 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %inc7.2 %7 = load i64, ptr %arrayidx5.3, align 8, !tbaa !25 %conv.3 = sitofp i64 %7 to double %add.3 = fadd double %add.2, %conv.3 %inc7.3 = add nuw nsw i64 %i.187, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.end8.loopexit.unr-lcssa, label %for.body4, !llvm.loop !30 for.end8.loopexit.unr-lcssa: ; preds = %for.body4, %for.body4.preheader %add.lcssa.ph = phi double [ undef, %for.body4.preheader ], [ %add.3, %for.body4 ] %r1.088.unr = phi double [ 0.000000e+00, %for.body4.preheader ], [ %add.3, %for.body4 ] %i.187.unr = phi i64 [ 0, %for.body4.preheader ], [ %inc7.3, %for.body4 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end8, label %for.body4.epil for.body4.epil: ; preds = %for.end8.loopexit.unr-lcssa, %for.body4.epil %r1.088.epil = phi double [ %add.epil, %for.body4.epil ], [ %r1.088.unr, %for.end8.loopexit.unr-lcssa ] %i.187.epil = phi i64 [ %inc7.epil, %for.body4.epil ], [ %i.187.unr, %for.end8.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body4.epil ], [ 0, %for.end8.loopexit.unr-lcssa ] %arrayidx5.epil = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %i.187.epil %8 = load i64, ptr %arrayidx5.epil, align 8, !tbaa !25 %conv.epil = sitofp i64 %8 to double %add.epil = fadd double %r1.088.epil, %conv.epil %inc7.epil = add nuw nsw i64 %i.187.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end8, label %for.body4.epil, !llvm.loop !31 for.end8: ; preds = %for.end8.loopexit.unr-lcssa, %for.body4.epil, %for.end %r1.0.lcssa = phi double [ 0.000000e+00, %for.end ], [ %add.lcssa.ph, %for.end8.loopexit.unr-lcssa ], [ %add.epil, %for.body4.epil ] %conv9 = sitofp i64 %2 to double %div = fdiv double %r1.0.lcssa, %conv9 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div) %9 = load i64, ptr %n, align 8, !tbaa !25 %cmp1291 = icmp sgt i64 %9, 0 br i1 %cmp1291, label %for.body14.lr.ph, label %for.end55 for.body14.lr.ph: ; preds = %for.end8 %10 = load i64, ptr %a, align 8, !tbaa !25 %sub = add nsw i64 %10, -1 %arrayidx16 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %sub %11 = load i64, ptr %arrayidx16, align 8, !tbaa !25 %min.iters.check = icmp ult i64 %9, 4 br i1 %min.iters.check, label %for.body14.preheader, label %vector.ph vector.ph: ; preds = %for.body14.lr.ph %n.vec = and i64 %9, -4 %broadcast.splatinsert = insertelement <2 x i64> poison, i64 %11, i64 0 %broadcast.splat = shufflevector <2 x i64> %broadcast.splatinsert, <2 x i64> poison, <2 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %24, %vector.body ] %vec.phi107 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ] %vec.phi108 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ] %vec.phi109 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %21, %vector.body ] %12 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %index %wide.load = load <2 x i64>, ptr %12, align 16, !tbaa !25 %13 = getelementptr inbounds i64, ptr %12, i64 2 %wide.load110 = load <2 x i64>, ptr %13, align 16, !tbaa !25 %14 = icmp eq <2 x i64> %wide.load, %broadcast.splat %15 = icmp eq <2 x i64> %wide.load110, %broadcast.splat %16 = icmp sgt <2 x i64> %wide.load, %broadcast.splat %17 = icmp sgt <2 x i64> %wide.load110, %broadcast.splat %18 = zext <2 x i1> %14 to <2 x i64> %19 = zext <2 x i1> %15 to <2 x i64> %20 = add <2 x i64> %vec.phi108, %18 %21 = add <2 x i64> %vec.phi109, %19 %22 = zext <2 x i1> %16 to <2 x i64> %23 = zext <2 x i1> %17 to <2 x i64> %24 = add <2 x i64> %vec.phi, %22 %25 = add <2 x i64> %vec.phi107, %23 %index.next = add nuw i64 %index, 4 %26 = icmp eq i64 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !32 middle.block: ; preds = %vector.body %bin.rdx111 = add <2 x i64> %21, %20 %27 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx111) %bin.rdx = add <2 x i64> %25, %24 %28 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %9, %n.vec br i1 %cmp.n, label %for.cond31.preheader, label %for.body14.preheader for.body14.preheader: ; preds = %for.body14.lr.ph, %middle.block %y.094.ph = phi i64 [ 0, %for.body14.lr.ph ], [ %28, %middle.block ] %x.093.ph = phi i64 [ 0, %for.body14.lr.ph ], [ %27, %middle.block ] %i.292.ph = phi i64 [ 0, %for.body14.lr.ph ], [ %n.vec, %middle.block ] br label %for.body14 for.cond31.preheader: ; preds = %for.body14, %middle.block %x.1.lcssa = phi i64 [ %27, %middle.block ], [ %x.1, %for.body14 ] %y.1.lcssa = phi i64 [ %28, %middle.block ], [ %y.1, %for.body14 ] %cmp32.not97 = icmp eq i64 %x.1.lcssa, 0 br i1 %cmp32.not97, label %for.end55, label %for.body34.lr.ph for.body34.lr.ph: ; preds = %for.cond31.preheader %29 = load i64, ptr %a, align 8, !tbaa !25 %30 = load i64, ptr %b, align 8 %add.i = add nuw i64 %x.1.lcssa, 1 %31 = load i64, ptr %v, align 16 br label %for.body34 for.body14: ; preds = %for.body14.preheader, %for.body14 %y.094 = phi i64 [ %y.1, %for.body14 ], [ %y.094.ph, %for.body14.preheader ] %x.093 = phi i64 [ %x.1, %for.body14 ], [ %x.093.ph, %for.body14.preheader ] %i.292 = phi i64 [ %inc29, %for.body14 ], [ %i.292.ph, %for.body14.preheader ] %arrayidx15 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %i.292 %32 = load i64, ptr %arrayidx15, align 8, !tbaa !25 %cmp17 = icmp eq i64 %32, %11 %cmp23 = icmp sgt i64 %32, %11 %inc19 = zext i1 %cmp17 to i64 %x.1 = add nuw nsw i64 %x.093, %inc19 %spec.select = zext i1 %cmp23 to i64 %y.1 = add nuw nsw i64 %y.094, %spec.select %inc29 = add nuw nsw i64 %i.292, 1 %exitcond102.not = icmp eq i64 %inc29, %9 br i1 %exitcond102.not, label %for.cond31.preheader, label %for.body14, !llvm.loop !33 for.body34: ; preds = %for.body34.lr.ph, %for.inc53 %indvar = phi i64 [ 0, %for.body34.lr.ph ], [ %indvar.next, %for.inc53 ] %r2.099 = phi i64 [ 0, %for.body34.lr.ph ], [ %r2.1, %for.inc53 ] %i.398 = phi i64 [ 1, %for.body34.lr.ph ], [ %inc54, %for.inc53 ] %add35 = add nuw nsw i64 %i.398, %y.1.lcssa %cmp36 = icmp slt i64 %add35, %29 %cmp39 = icmp slt i64 %30, %add35 %or.cond = select i1 %cmp36, i1 true, i1 %cmp39 br i1 %or.cond, label %for.inc53, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body34 %xtraiter120 = and i64 %i.398, 1 %33 = icmp eq i64 %indvar, 0 br i1 %33, label %llnCr.exit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter124 = and i64 %i.398, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter125 = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter125.next.1, %for.body.i ] %sub.i = sub i64 %add.i, %i.07.i %mul.i = mul nsw i64 %sub.i, %r.08.i %div.i = sdiv i64 %mul.i, %i.07.i %inc.i = add nuw i64 %i.07.i, 1 %sub.i.1 = sub i64 %add.i, %inc.i %mul.i.1 = mul nsw i64 %sub.i.1, %div.i %div.i.1 = sdiv i64 %mul.i.1, %inc.i %inc.i.1 = add nuw i64 %i.07.i, 2 %niter125.next.1 = add i64 %niter125, 2 %niter125.ncmp.1 = icmp eq i64 %niter125.next.1, %unroll_iter124 br i1 %niter125.ncmp.1, label %llnCr.exit.unr-lcssa, label %for.body.i, !llvm.loop !15 llnCr.exit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i64 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod122.not = icmp eq i64 %xtraiter120, 0 br i1 %lcmp.mod122.not, label %llnCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %llnCr.exit.unr-lcssa %sub.i.epil = sub i64 %add.i, %i.07.i.unr %mul.i.epil = mul nsw i64 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i64 %mul.i.epil, %i.07.i.unr br label %llnCr.exit llnCr.exit: ; preds = %llnCr.exit.unr-lcssa, %for.body.i.epil %div.i.lcssa = phi i64 [ %div.i.lcssa.ph, %llnCr.exit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] %add44 = add nsw i64 %div.i.lcssa, %r2.099 %sub47 = add nsw i64 %add35, -1 %arrayidx48 = getelementptr inbounds [131072 x i64], ptr %v, i64 0, i64 %sub47 %34 = load i64, ptr %arrayidx48, align 8, !tbaa !25 %cmp49.not = icmp eq i64 %31, %34 br i1 %cmp49.not, label %for.inc53, label %for.end55 for.inc53: ; preds = %llnCr.exit, %for.body34 %r2.1 = phi i64 [ %r2.099, %for.body34 ], [ %add44, %llnCr.exit ] %inc54 = add nuw i64 %i.398, 1 %exitcond103.not = icmp eq i64 %i.398, %x.1.lcssa %indvar.next = add i64 %indvar, 1 br i1 %exitcond103.not, label %for.end55, label %for.body34, !llvm.loop !34 for.end55: ; preds = %for.inc53, %llnCr.exit, %for.end8, %for.cond31.preheader %r2.2 = phi i64 [ 0, %for.cond31.preheader ], [ 0, %for.end8 ], [ %add44, %llnCr.exit ], [ %r2.1, %for.inc53 ] %call56 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %r2.2) call void @llvm.lifetime.end.p0(i64 1048576, ptr nonnull %v) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #7 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #8 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { 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 #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = distinct !{!8, !6, !9, !10} !9 = !{!"llvm.loop.isvectorized", i32 1} !10 = !{!"llvm.loop.unroll.runtime.disable"} !11 = distinct !{!11, !6, !10, !9} !12 = distinct !{!12, !6, !9, !10} !13 = distinct !{!13, !6, !10, !9} !14 = distinct !{!14, !6} !15 = distinct !{!15, !6} !16 = distinct !{!16, !6} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.unroll.disable"} !19 = distinct !{!19, !6} !20 = distinct !{!20, !18} !21 = !{!22, !22, i64 0} !22 = !{!"int", !23, i64 0} !23 = !{!"omnipotent char", !24, i64 0} !24 = !{!"Simple C/C++ TBAA"} !25 = !{!26, !26, i64 0} !26 = !{!"long long", !23, i64 0} !27 = !{!28, !28, i64 0} !28 = !{!"double", !23, i64 0} !29 = distinct !{!29, !6} !30 = distinct !{!30, !6} !31 = distinct !{!31, !18} !32 = distinct !{!32, !6, !9, !10} !33 = distinct !{!33, !6, !10, !9} !34 = distinct !{!34, !6}
#include<stdio.h> #include<string.h> int main() { char a[11],b[11],c[11]; scanf("%s",a); getchar(); scanf("%s",b); getchar(); scanf("%s",c); getchar(); if((a[strlen(a)-1]==b[0])&&(b[strlen(b)-1]==c[0])) { printf("YES\n"); return 0; } else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136810/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136810/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @stdin = external local_unnamed_addr global ptr, align 8 @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: %a = alloca [11 x i8], align 1 %b = alloca [11 x i8], align 1 %c = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %b) #5 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %c) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = call i32 @getc(ptr noundef %0) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i27 = call i32 @getc(ptr noundef %1) %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %2 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i28 = call i32 @getc(ptr noundef %2) %call9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %a) #6 %sub = add i64 %call9, -1 %arrayidx = getelementptr inbounds [11 x i8], ptr %a, i64 0, i64 %sub %3 = load i8, ptr %arrayidx, align 1, !tbaa !9 %4 = load i8, ptr %b, align 1, !tbaa !9 %cmp = icmp eq i8 %3, %4 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call14 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %b) #6 %sub15 = add i64 %call14, -1 %arrayidx16 = getelementptr inbounds [11 x i8], ptr %b, i64 0, i64 %sub15 %5 = load i8, ptr %arrayidx16, align 1, !tbaa !9 %6 = load i8, ptr %c, align 1, !tbaa !9 %cmp20 = icmp eq i8 %5, %6 br i1 %cmp20, label %cleanup, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %cleanup cleanup: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0}
#include<stdio.h> #include<string.h> int main(void) { char A[11],B[11],C[11]; scanf("%s%s%s",A,B,C); if((A[strlen(A)-1]==B[0])&&(B[strlen(B)-1]==C[0])) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136854/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136854/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s%s%s\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: %A = alloca [11 x i8], align 1 %B = alloca [11 x i8], align 1 %C = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %A) #5 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %B) #5 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %C) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %A) #6 %sub = add i64 %call4, -1 %arrayidx = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 %sub %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr %B, align 1, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %B) #6 %sub10 = add i64 %call9, -1 %arrayidx11 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 %sub10 %2 = load i8, ptr %arrayidx11, align 1, !tbaa !5 %3 = load i8, ptr %C, align 1, !tbaa !5 %cmp15 = icmp eq i8 %2, %3 br i1 %cmp15, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %C) #5 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %B) #5 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %A) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { 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"}
#include <stdio.h> int main(){ char a[101], b[101], c[101]; int na,nb; for(int i = 0;i<101;++i){ scanf("%c", &a[i]); if(a[i] == *" "){ na = i-1; break; } } for(int i = 0;i<101;++i){ scanf("%c", &b[i]); if(b[i] == *" "){ nb = i-1; break; } } scanf("%s", c); if((a[na] == b[0]) && (b[nb] == c[0])) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136898/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136898/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [101 x i8], align 16 %b = alloca [101 x i8], align 16 %c = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %c) #4 br label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] %arrayidx = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp4 = icmp eq i8 %0, 32 br i1 %cmp4, label %if.then, label %for.inc if.then: ; preds = %for.body %sub = shl i64 %indvars.iv, 32 %sext = add i64 %sub, -4294967296 %1 = ashr exact i64 %sext, 32 br label %cleanup for.inc: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 101 br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !8 cleanup: ; preds = %for.inc, %if.then %na.0 = phi i64 [ %1, %if.then ], [ 0, %for.inc ] br label %for.body11 for.body11: ; preds = %cleanup, %for.inc24 %indvars.iv68 = phi i64 [ 0, %cleanup ], [ %indvars.iv.next69, %for.inc24 ] %arrayidx13 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %indvars.iv68 %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx13) %2 = load i8, ptr %arrayidx13, align 1, !tbaa !5 %cmp19 = icmp eq i8 %2, 32 br i1 %cmp19, label %if.then21, label %for.inc24 if.then21: ; preds = %for.body11 %sub22 = shl i64 %indvars.iv68, 32 %sext72 = add i64 %sub22, -4294967296 %3 = ashr exact i64 %sext72, 32 br label %cleanup26 for.inc24: ; preds = %for.body11 %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %exitcond71.not = icmp eq i64 %indvars.iv.next69, 101 br i1 %exitcond71.not, label %cleanup26, label %for.body11, !llvm.loop !10 cleanup26: ; preds = %for.inc24, %if.then21 %nb.0 = phi i64 [ %3, %if.then21 ], [ 0, %for.inc24 ] %call28 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %c) %arrayidx30 = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %na.0 %4 = load i8, ptr %arrayidx30, align 1, !tbaa !5 %5 = load i8, ptr %b, align 16, !tbaa !5 %cmp34 = icmp eq i8 %4, %5 br i1 %cmp34, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %cleanup26 %arrayidx37 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %nb.0 %6 = load i8, ptr %arrayidx37, align 1, !tbaa !5 %7 = load i8, ptr %c, align 16, !tbaa !5 %cmp41 = icmp eq i8 %6, %7 br i1 %cmp41, label %if.end46, label %if.else if.else: ; preds = %land.lhs.true, %cleanup26 br label %if.end46 if.end46: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.5, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include<stdio.h> int main() { char A[11],B[11],C[11]; int a,b,i; scanf("%s%s%s",A,B,C); for(i=1;i<11;i++){ if(A[i]=='\0'){ a=i-1; break; } } for(i=1;i<11;i++){ if(B[i]=='\0'){ b=i-1; break; } } /*printf("%d\n%d\n",a,b);*/ if(A[a]==B[0]&&B[b]==C[0]){ printf("YES"); }else{ printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136940/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136940/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s%s%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca [11 x i8], align 1 %B = alloca [11 x i8], align 1 %C = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %C) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C) %arrayidx = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 1 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp3 = icmp eq i8 %0, 0 br i1 %cmp3, label %for.end, label %for.inc for.inc: ; preds = %entry %arrayidx.1 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 2 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp3.1 = icmp eq i8 %1, 0 br i1 %cmp3.1, label %for.end, label %for.inc.1 for.inc.1: ; preds = %for.inc %arrayidx.2 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 3 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp3.2 = icmp eq i8 %2, 0 br i1 %cmp3.2, label %for.end, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %arrayidx.3 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 4 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %cmp3.3 = icmp eq i8 %3, 0 br i1 %cmp3.3, label %for.end, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %arrayidx.4 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 5 %4 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 %cmp3.4 = icmp eq i8 %4, 0 br i1 %cmp3.4, label %for.end, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %arrayidx.5 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 6 %5 = load i8, ptr %arrayidx.5, align 1, !tbaa !5 %cmp3.5 = icmp eq i8 %5, 0 br i1 %cmp3.5, label %for.end, label %for.inc.5 for.inc.5: ; preds = %for.inc.4 %arrayidx.6 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 7 %6 = load i8, ptr %arrayidx.6, align 1, !tbaa !5 %cmp3.6 = icmp eq i8 %6, 0 br i1 %cmp3.6, label %for.end, label %for.inc.6 for.inc.6: ; preds = %for.inc.5 %arrayidx.7 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 8 %7 = load i8, ptr %arrayidx.7, align 1, !tbaa !5 %cmp3.7 = icmp eq i8 %7, 0 br i1 %cmp3.7, label %for.end, label %for.inc.7 for.inc.7: ; preds = %for.inc.6 %arrayidx.8 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 9 %8 = load i8, ptr %arrayidx.8, align 1, !tbaa !5 %cmp3.8 = icmp eq i8 %8, 0 br i1 %cmp3.8, label %for.end, label %for.inc.8 for.inc.8: ; preds = %for.inc.7 %arrayidx.9 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 10 %9 = load i8, ptr %arrayidx.9, align 1, !tbaa !5 %cmp3.9 = icmp eq i8 %9, 0 %spec.select = select i1 %cmp3.9, i64 9, i64 0 br label %for.end for.end: ; preds = %for.inc.8, %entry, %for.inc, %for.inc.1, %for.inc.2, %for.inc.3, %for.inc.4, %for.inc.5, %for.inc.6, %for.inc.7 %a.0 = phi i64 [ 0, %entry ], [ 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 ], [ %spec.select, %for.inc.8 ] %arrayidx10 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 1 %10 = load i8, ptr %arrayidx10, align 1, !tbaa !5 %cmp12 = icmp eq i8 %10, 0 br i1 %cmp12, label %for.end19, label %for.inc17 for.inc17: ; preds = %for.end %arrayidx10.1 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 2 %11 = load i8, ptr %arrayidx10.1, align 1, !tbaa !5 %cmp12.1 = icmp eq i8 %11, 0 br i1 %cmp12.1, label %for.end19, label %for.inc17.1 for.inc17.1: ; preds = %for.inc17 %arrayidx10.2 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 3 %12 = load i8, ptr %arrayidx10.2, align 1, !tbaa !5 %cmp12.2 = icmp eq i8 %12, 0 br i1 %cmp12.2, label %for.end19, label %for.inc17.2 for.inc17.2: ; preds = %for.inc17.1 %arrayidx10.3 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 4 %13 = load i8, ptr %arrayidx10.3, align 1, !tbaa !5 %cmp12.3 = icmp eq i8 %13, 0 br i1 %cmp12.3, label %for.end19, label %for.inc17.3 for.inc17.3: ; preds = %for.inc17.2 %arrayidx10.4 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 5 %14 = load i8, ptr %arrayidx10.4, align 1, !tbaa !5 %cmp12.4 = icmp eq i8 %14, 0 br i1 %cmp12.4, label %for.end19, label %for.inc17.4 for.inc17.4: ; preds = %for.inc17.3 %arrayidx10.5 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 6 %15 = load i8, ptr %arrayidx10.5, align 1, !tbaa !5 %cmp12.5 = icmp eq i8 %15, 0 br i1 %cmp12.5, label %for.end19, label %for.inc17.5 for.inc17.5: ; preds = %for.inc17.4 %arrayidx10.6 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 7 %16 = load i8, ptr %arrayidx10.6, align 1, !tbaa !5 %cmp12.6 = icmp eq i8 %16, 0 br i1 %cmp12.6, label %for.end19, label %for.inc17.6 for.inc17.6: ; preds = %for.inc17.5 %arrayidx10.7 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 8 %17 = load i8, ptr %arrayidx10.7, align 1, !tbaa !5 %cmp12.7 = icmp eq i8 %17, 0 br i1 %cmp12.7, label %for.end19, label %for.inc17.7 for.inc17.7: ; preds = %for.inc17.6 %arrayidx10.8 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 9 %18 = load i8, ptr %arrayidx10.8, align 1, !tbaa !5 %cmp12.8 = icmp eq i8 %18, 0 br i1 %cmp12.8, label %for.end19, label %for.inc17.8 for.inc17.8: ; preds = %for.inc17.7 %arrayidx10.9 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 10 %19 = load i8, ptr %arrayidx10.9, align 1, !tbaa !5 %cmp12.9 = icmp eq i8 %19, 0 %spec.select53 = select i1 %cmp12.9, i64 9, i64 0 br label %for.end19 for.end19: ; preds = %for.inc17.8, %for.end, %for.inc17, %for.inc17.1, %for.inc17.2, %for.inc17.3, %for.inc17.4, %for.inc17.5, %for.inc17.6, %for.inc17.7 %b.0 = phi i64 [ 0, %for.end ], [ 1, %for.inc17 ], [ 2, %for.inc17.1 ], [ 3, %for.inc17.2 ], [ 4, %for.inc17.3 ], [ 5, %for.inc17.4 ], [ 6, %for.inc17.5 ], [ 7, %for.inc17.6 ], [ 8, %for.inc17.7 ], [ %spec.select53, %for.inc17.8 ] %arrayidx21 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 %a.0 %20 = load i8, ptr %arrayidx21, align 1, !tbaa !5 %21 = load i8, ptr %B, align 1, !tbaa !5 %cmp25 = icmp eq i8 %20, %21 br i1 %cmp25, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %for.end19 %arrayidx28 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 %b.0 %22 = load i8, ptr %arrayidx28, align 1, !tbaa !5 %23 = load i8, ptr %C, align 1, !tbaa !5 %cmp32 = icmp eq i8 %22, %23 br i1 %cmp32, label %if.end37, label %if.else if.else: ; preds = %land.lhs.true, %for.end19 br label %if.end37 if.end37: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %C) #3 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %A) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> char a[20], b[20], c[20]; int main(void) { int lena, lenb, lenc; scanf("%s", a); scanf("%s", b); scanf("%s", c); lena = strlen(a); lenb = strlen(b); lenc = strlen(c); if (a[lena - 1] == b[0] && b[lenb - 1] == c[0]) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136984/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @a = dso_local global [20 x i8] zeroinitializer, align 16 @b = dso_local global [20 x i8] zeroinitializer, align 16 @c = dso_local global [20 x i8] zeroinitializer, align 16 @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: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @a) %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @b) %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @c) %call3 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @a) #4 %sub = shl i64 %call3, 32 %sext = add i64 %sub, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx = getelementptr inbounds [20 x i8], ptr @a, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr @b, align 16, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @b) #4 %sub11 = shl i64 %call4, 32 %sext20 = add i64 %sub11, -4294967296 %idxprom12 = ashr exact i64 %sext20, 32 %arrayidx13 = getelementptr inbounds [20 x i8], ptr @b, i64 0, i64 %idxprom12 %2 = load i8, ptr %arrayidx13, align 1, !tbaa !5 %3 = load i8, ptr @c, align 16, !tbaa !5 %cmp16 = icmp eq i8 %2, %3 br i1 %cmp16, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) 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(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2 ; 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { 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"}
#include <stdio.h> int main(void) { int s1lenth, s2lenth; char s1[10], s2[10], s3[10]; scanf("%s%s%s", s1, s2, s3); for (s1lenth = 0; s1[s1lenth] != '\0'; s1lenth++); for (s2lenth = 0; s2[s2lenth] != '\0'; s2lenth++); if (s1[s1lenth - 1] == s2[0] && s2[s2lenth - 1] == s3[0]) printf("YES"); else printf ("NO"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137026/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s%s%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s1 = alloca [10 x i8], align 1 %s2 = alloca [10 x i8], align 1 %s3 = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s1) #3 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s2) #3 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s3) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s1, ptr noundef nonnull %s2, ptr noundef nonnull %s3) br label %for.cond for.cond: ; preds = %for.cond, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %entry ] %arrayidx = getelementptr inbounds [10 x i8], ptr %s1, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i8 %0, 0 %indvars.iv.next = add nuw i64 %indvars.iv, 1 br i1 %cmp.not, label %for.cond4, label %for.cond, !llvm.loop !8 for.cond4: ; preds = %for.cond, %for.cond4 %indvars.iv36 = phi i64 [ %indvars.iv.next37, %for.cond4 ], [ 0, %for.cond ] %arrayidx6 = getelementptr inbounds [10 x i8], ptr %s2, i64 0, i64 %indvars.iv36 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !5 %cmp8.not = icmp eq i8 %1, 0 %indvars.iv.next37 = add nuw i64 %indvars.iv36, 1 br i1 %cmp8.not, label %for.end13, label %for.cond4, !llvm.loop !10 for.end13: ; preds = %for.cond4 %sub = shl i64 %indvars.iv, 32 %sext = add i64 %sub, -4294967296 %idxprom14 = ashr exact i64 %sext, 32 %arrayidx15 = getelementptr inbounds [10 x i8], ptr %s1, i64 0, i64 %idxprom14 %2 = load i8, ptr %arrayidx15, align 1, !tbaa !5 %3 = load i8, ptr %s2, align 1, !tbaa !5 %cmp19 = icmp eq i8 %2, %3 br i1 %cmp19, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %for.end13 %sub21 = shl i64 %indvars.iv36, 32 %sext39 = add i64 %sub21, -4294967296 %idxprom22 = ashr exact i64 %sext39, 32 %arrayidx23 = getelementptr inbounds [10 x i8], ptr %s2, i64 0, i64 %idxprom22 %4 = load i8, ptr %arrayidx23, align 1, !tbaa !5 %5 = load i8, ptr %s3, align 1, !tbaa !5 %cmp27 = icmp eq i8 %4, %5 br i1 %cmp27, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %for.end13 br label %if.end if.end: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s3) #3 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s2) #3 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s1) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include <stdio.h> int array[51][51]; int check(int x, int y, int n) { int k; for (int i = 0; i < n; i++) if (i != x) { k = array[x][y] - array[i][y]; for (int j = 0; j < n; j++) if (j != y && array[x][j] == k) return 1; } return 0; } int main(void) { int n, g = 1; scanf("%d", &n); for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) scanf("%d", &array[i][j]); for (int i = 0; i < n && g; i++) for (int j = 0; j < n && g; j++) if (array[i][j] != 1 && check(i, j, n) == 0) { printf("No\n"); g = 0; } if (g) printf("Yes\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13707/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13707/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @array = dso_local global [51 x [51 x i32]] zeroinitializer, align 16 @.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 norecurse nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @check(i32 noundef %x, i32 noundef %y, i32 noundef %n) local_unnamed_addr #0 { entry: %cmp.not44 = icmp sgt i32 %n, 0 br i1 %cmp.not44, label %for.body.lr.ph, label %cleanup22 for.body.lr.ph: ; preds = %entry %idxprom = sext i32 %x to i64 %idxprom2 = sext i32 %y to i64 %arrayidx3 = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %idxprom, i64 %idxprom2 %0 = zext i32 %y to i64 %1 = zext i32 %x to i64 %2 = zext i32 %n to i64 %wide.trip.count53 = zext i32 %n to i64 br label %for.body.us for.body.us: ; preds = %for.inc20.us, %for.body.lr.ph %indvars.iv51 = phi i64 [ %indvars.iv.next52, %for.inc20.us ], [ 0, %for.body.lr.ph ] %cmp.not46.us = phi i1 [ %cmp.not.us, %for.inc20.us ], [ true, %for.body.lr.ph ] %cmp1.not.us = icmp eq i64 %indvars.iv51, %1 br i1 %cmp1.not.us, label %for.inc20.us, label %if.then.us if.then.us: ; preds = %for.body.us %3 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %arrayidx7.us = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %indvars.iv51, i64 %idxprom2 %4 = load i32, ptr %arrayidx7.us, align 4, !tbaa !5 %sub.us = sub nsw i32 %3, %4 br label %for.body11.us for.body11.us: ; preds = %if.then.us, %for.inc.us %indvars.iv = phi i64 [ 0, %if.then.us ], [ %indvars.iv.next, %for.inc.us ] %cmp12.not.us = icmp eq i64 %indvars.iv, %0 br i1 %cmp12.not.us, label %for.inc.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body11.us %arrayidx16.us = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %idxprom, i64 %indvars.iv %5 = load i32, ptr %arrayidx16.us, align 4, !tbaa !5 %cmp17.us = icmp eq i32 %5, %sub.us br i1 %cmp17.us, label %cleanup22, label %for.inc.us for.inc.us: ; preds = %land.lhs.true.us, %for.body11.us %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count53 br i1 %exitcond.not, label %for.inc20.us, label %for.body11.us, !llvm.loop !9 for.inc20.us: ; preds = %for.inc.us, %for.body.us %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1 %cmp.not.us = icmp ult i64 %indvars.iv.next52, %2 %exitcond54.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count53 br i1 %exitcond54.not, label %cleanup22, label %for.body.us, !llvm.loop !11 cleanup22: ; preds = %for.inc20.us, %land.lhs.true.us, %entry %cmp.not41 = phi i1 [ false, %entry ], [ %cmp.not46.us, %land.lhs.true.us ], [ %cmp.not.us, %for.inc20.us ] %spec.select = zext i1 %cmp.not41 to i32 ret i32 %spec.select } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp62 = icmp sgt i32 %0, 0 br i1 %cmp62, label %for.cond1.preheader, label %if.end41 for.cond1.preheader: ; preds = %entry, %for.cond.cleanup3 %1 = phi i32 [ %5, %for.cond.cleanup3 ], [ %0, %entry ] %indvars.iv74 = phi i64 [ %indvars.iv.next75, %for.cond.cleanup3 ], [ 0, %entry ] %cmp260 = icmp sgt i32 %1, 0 br i1 %cmp260, label %for.body4, label %for.cond1.preheader.for.cond.cleanup3_crit_edge for.cond1.preheader.for.cond.cleanup3_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.cond.cleanup3 for.cond12.preheader: ; preds = %for.cond.cleanup3 %cmp1367 = icmp sgt i32 %5, 0 br i1 %cmp1367, label %for.cond17.preheader.preheader, label %if.end41 for.cond17.preheader.preheader: ; preds = %for.cond12.preheader %2 = zext i32 %5 to i64 %3 = sext i32 %5 to i64 %4 = sext i32 %5 to i64 br label %for.cond17.preheader for.cond.cleanup3: ; preds = %for.body4, %for.cond1.preheader.for.cond.cleanup3_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.cond.cleanup3_crit_edge ], [ %7, %for.body4 ] %5 = phi i32 [ %1, %for.cond1.preheader.for.cond.cleanup3_crit_edge ], [ %6, %for.body4 ] %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1 %cmp = icmp slt i64 %indvars.iv.next75, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.cond12.preheader, !llvm.loop !12 for.body4: ; preds = %for.cond1.preheader, %for.body4 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ 0, %for.cond1.preheader ] %arrayidx6 = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %indvars.iv74, i64 %indvars.iv %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp2, label %for.body4, label %for.cond.cleanup3, !llvm.loop !14 for.cond17.preheader: ; preds = %for.cond17.preheader.preheader, %for.cond.cleanup22 %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.cond.cleanup22 ], [ 0, %for.cond17.preheader.preheader ] br label %for.body23 for.cond.cleanup22: ; preds = %for.inc32 %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %cmp13 = icmp slt i64 %indvars.iv.next81, %4 br i1 %cmp13, label %for.cond17.preheader, label %if.end41, !llvm.loop !15 for.body23: ; preds = %for.cond17.preheader, %for.inc32 %indvars.iv77 = phi i64 [ 0, %for.cond17.preheader ], [ %indvars.iv.next78, %for.inc32 ] %arrayidx27 = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %indvars.iv80, i64 %indvars.iv77 %8 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %cmp28.not = icmp eq i32 %8, 1 br i1 %cmp28.not, label %for.inc32, label %for.body.us.i for.body.us.i: ; preds = %for.body23, %for.inc20.us.i %indvars.iv51.i = phi i64 [ %indvars.iv.next52.i, %for.inc20.us.i ], [ 0, %for.body23 ] %cmp.not46.us.i = phi i1 [ %cmp.not.us.i, %for.inc20.us.i ], [ true, %for.body23 ] %cmp1.not.us.i = icmp eq i64 %indvars.iv51.i, %indvars.iv80 br i1 %cmp1.not.us.i, label %for.inc20.us.i, label %if.then.us.i if.then.us.i: ; preds = %for.body.us.i %arrayidx7.us.i = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %indvars.iv51.i, i64 %indvars.iv77 %9 = load i32, ptr %arrayidx7.us.i, align 4, !tbaa !5 %sub.us.i = sub nsw i32 %8, %9 br label %for.body11.us.i for.body11.us.i: ; preds = %for.inc.us.i, %if.then.us.i %indvars.iv.i = phi i64 [ 0, %if.then.us.i ], [ %indvars.iv.next.i, %for.inc.us.i ] %cmp12.not.us.i = icmp eq i64 %indvars.iv.i, %indvars.iv77 br i1 %cmp12.not.us.i, label %for.inc.us.i, label %land.lhs.true.us.i land.lhs.true.us.i: ; preds = %for.body11.us.i %arrayidx16.us.i = getelementptr inbounds [51 x [51 x i32]], ptr @array, i64 0, i64 %indvars.iv80, i64 %indvars.iv.i %10 = load i32, ptr %arrayidx16.us.i, align 4, !tbaa !5 %cmp17.us.i = icmp eq i32 %10, %sub.us.i br i1 %cmp17.us.i, label %check.exit, label %for.inc.us.i for.inc.us.i: ; preds = %land.lhs.true.us.i, %for.body11.us.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %2 br i1 %exitcond.not.i, label %for.inc20.us.i, label %for.body11.us.i, !llvm.loop !9 for.inc20.us.i: ; preds = %for.inc.us.i, %for.body.us.i %indvars.iv.next52.i = add nuw nsw i64 %indvars.iv51.i, 1 %cmp.not.us.i = icmp ult i64 %indvars.iv.next52.i, %2 %exitcond54.not.i = icmp eq i64 %indvars.iv.next52.i, %2 br i1 %exitcond54.not.i, label %check.exit, label %for.body.us.i, !llvm.loop !11 check.exit: ; preds = %for.inc20.us.i, %land.lhs.true.us.i %cmp.not41.i = phi i1 [ %cmp.not46.us.i, %land.lhs.true.us.i ], [ %cmp.not.us.i, %for.inc20.us.i ] br i1 %cmp.not41.i, label %for.inc32, label %if.end41 for.inc32: ; preds = %for.body23, %check.exit %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %cmp18 = icmp slt i64 %indvars.iv.next78, %3 br i1 %cmp18, label %for.body23, label %for.cond.cleanup22, !llvm.loop !16 if.end41: ; preds = %for.cond.cleanup22, %check.exit, %for.cond12.preheader, %entry %str.3.sink = phi ptr [ @str, %entry ], [ @str, %for.cond12.preheader ], [ @str.3, %check.exit ], [ @str, %for.cond.cleanup22 ] %puts54 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree norecurse nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10, !13} !13 = !{!"llvm.loop.unswitch.partial.disable"} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include<stdio.h> #define MAXN 300010 struct data { int l,r; }a[MAXN]; char s[10]; int main() { int n,i,top,ans,max,now,x; top = ans = max = 0; now = 1; scanf("%d",&n); for(i=0;i<2*n;i++) { scanf("%s",s); if(s[0]=='a') { scanf("%d",&x); a[top].l = a[top].r = x; top++; if(x>max)max = x; } else if(s[0]=='r') { if(a[top-1].l<=now&&a[top-1].r>=now) { if(a[top-1].l == a[top-1].r)top--; else a[top-1].l++; now++; } else { ans++; if(now == max)top = 0; else { top = 1; a[0].l = now+1; a[0].r = max; } now++; } } } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13712/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13712/source.c" target datalayout = "e-m:e-p270: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 [3 x i8] c"%s\00", align 1 @s = dso_local global [10 x i8] zeroinitializer, align 1 @a = dso_local local_unnamed_addr global [300010 x %struct.data] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp78 = icmp sgt i32 %0, 0 br i1 %cmp78, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %now.083 = phi i32 [ %now.1, %for.inc ], [ 1, %entry ] %max.082 = phi i32 [ %max.1, %for.inc ], [ 0, %entry ] %ans.081 = phi i32 [ %ans.1, %for.inc ], [ 0, %entry ] %top.080 = phi i32 [ %top.3, %for.inc ], [ 0, %entry ] %i.079 = phi i32 [ %inc56, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @s) %1 = load i8, ptr @s, align 1, !tbaa !9 switch i8 %1, label %for.inc [ i8 97, label %if.then i8 114, label %if.then13 ] if.then: ; preds = %for.body %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !5 %idxprom = sext i32 %top.080 to i64 %arrayidx = getelementptr inbounds [300010 x %struct.data], ptr @a, i64 0, i64 %idxprom %r = getelementptr inbounds [300010 x %struct.data], ptr @a, i64 0, i64 %idxprom, i32 1 store i32 %2, ptr %r, align 4, !tbaa !10 store i32 %2, ptr %arrayidx, align 8, !tbaa !12 %inc = add nsw i32 %top.080, 1 %spec.select = call i32 @llvm.smax.i32(i32 %2, i32 %max.082) br label %for.inc if.then13: ; preds = %for.body %sub = add nsw i32 %top.080, -1 %idxprom14 = sext i32 %sub to i64 %arrayidx15 = getelementptr inbounds [300010 x %struct.data], ptr @a, i64 0, i64 %idxprom14 %3 = load i32, ptr %arrayidx15, align 8, !tbaa !12 %cmp17.not = icmp sgt i32 %3, %now.083 br i1 %cmp17.not, label %if.else45, label %land.lhs.true land.lhs.true: ; preds = %if.then13 %r22 = getelementptr inbounds [300010 x %struct.data], ptr @a, i64 0, i64 %idxprom14, i32 1 %4 = load i32, ptr %r22, align 4, !tbaa !10 %cmp23.not = icmp slt i32 %4, %now.083 br i1 %cmp23.not, label %if.else45, label %if.then25 if.then25: ; preds = %land.lhs.true %cmp34 = icmp eq i32 %3, %4 br i1 %cmp34, label %if.end43, label %if.else37 if.else37: ; preds = %if.then25 %inc42 = add nsw i32 %3, 1 store i32 %inc42, ptr %arrayidx15, align 8, !tbaa !12 br label %if.end43 if.end43: ; preds = %if.then25, %if.else37 %top.1 = phi i32 [ %top.080, %if.else37 ], [ %sub, %if.then25 ] %inc44 = add nsw i32 %now.083, 1 br label %for.inc if.else45: ; preds = %land.lhs.true, %if.then13 %inc46 = add nsw i32 %ans.081, 1 %cmp47 = icmp eq i32 %now.083, %max.082 %.pre = add nsw i32 %now.083, 1 br i1 %cmp47, label %for.inc, label %if.else50 if.else50: ; preds = %if.else45 store i32 %.pre, ptr @a, align 16, !tbaa !12 store i32 %max.082, ptr getelementptr inbounds ([300010 x %struct.data], ptr @a, i64 0, i64 0, i32 1), align 4, !tbaa !10 br label %for.inc for.inc: ; preds = %if.else45, %if.else50, %if.then, %for.body, %if.end43 %top.3 = phi i32 [ %top.1, %if.end43 ], [ %inc, %if.then ], [ %top.080, %for.body ], [ 1, %if.else50 ], [ 0, %if.else45 ] %ans.1 = phi i32 [ %ans.081, %if.end43 ], [ %ans.081, %if.then ], [ %ans.081, %for.body ], [ %inc46, %if.else50 ], [ %inc46, %if.else45 ] %max.1 = phi i32 [ %max.082, %if.end43 ], [ %spec.select, %if.then ], [ %max.082, %for.body ], [ %max.082, %if.else50 ], [ %max.082, %if.else45 ] %now.1 = phi i32 [ %inc44, %if.end43 ], [ %now.083, %if.then ], [ %now.083, %for.body ], [ %.pre, %if.else50 ], [ %.pre, %if.else45 ] %inc56 = add nuw nsw i32 %i.079, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %mul = shl nsw i32 %5, 1 %cmp = icmp slt i32 %inc56, %mul br i1 %cmp, label %for.body, label %for.end, !llvm.loop !13 for.end: ; preds = %for.inc, %entry %ans.0.lcssa = phi i32 [ 0, %entry ], [ %ans.1, %for.inc ] %call57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !6, i64 4} !11 = !{!"data", !6, i64 0, !6, i64 4} !12 = !{!11, !6, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> typedef long long int int64; void run(void){ int n,q; scanf("%d%d",&n,&q); int *a=(int *)calloc(n,sizeof(int)); int i; for(i=0;i<n;i++) scanf("%d",a+i); if(n==2){ while(q--) printf("%d\n",a[1]); return; } int *y=(int *)calloc(n,sizeof(int)); int64 *ans=(int64 *)calloc(n,sizeof(int64)); int64 sum=0; for(i=n-1;i>=0;i-=2) sum+=a[i]; y[0]=(a[n-2]+a[n-3])/2+1; ans[0]=sum; for(i=1;n-1-2*(i+1)>=0;i++){ y[i]=(a[n-1-(i+1)]+a[n-1-2*(i+1)])/2+1; sum+=a[n-1-i]-a[n-1-2*i]; ans[i]=sum; } int len=i+1; sum=0; for(i=0;n-1-i>=i;i++) sum+=a[n-1-i]; y[len-1]=-1; ans[len-1]=sum; while(q--){ int x; scanf("%d",&x); int l=-1; int r=len-1; while(r-l>1){ int m=(l+r)/2; if(x>=y[m]){ r=m; } else { l=m; } } printf("%lld\n",ans[r]); } } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @run() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %q = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %q) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %call1 = call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #5 %cmp165 = icmp sgt i32 %0, 0 br i1 %cmp165, label %for.body, label %if.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i32, ptr %call1, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.pr = load i32, ptr %n, align 4, !tbaa !5 %1 = sext i32 %.pr to i64 %cmp = icmp slt i64 %indvars.iv.next, %1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body %cmp4 = icmp eq i32 %.pr, 2 br i1 %cmp4, label %while.cond.preheader, label %if.end while.cond.preheader: ; preds = %for.end %2 = load i32, ptr %q, align 4, !tbaa !5 %dec191 = add nsw i32 %2, -1 store i32 %dec191, ptr %q, align 4, !tbaa !5 %tobool.not192 = icmp eq i32 %2, 0 br i1 %tobool.not192, label %cleanup, label %while.body.lr.ph while.body.lr.ph: ; preds = %while.cond.preheader %arrayidx = getelementptr inbounds i32, ptr %call1, i64 1 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %3 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %3) %4 = load i32, ptr %q, align 4, !tbaa !5 %dec = add nsw i32 %4, -1 store i32 %dec, ptr %q, align 4, !tbaa !5 %tobool.not = icmp eq i32 %4, 0 br i1 %tobool.not, label %cleanup, label %while.body, !llvm.loop !11 if.end: ; preds = %entry, %for.end %.lcssa213 = phi i32 [ %.pr, %for.end ], [ %0, %entry ] %conv7 = sext i32 %.lcssa213 to i64 %call8 = call noalias ptr @calloc(i64 noundef %conv7, i64 noundef 4) #5 %call10 = call noalias ptr @calloc(i64 noundef %conv7, i64 noundef 8) #5 %sub = add i32 %.lcssa213, -1 %cmp12167 = icmp sgt i32 %.lcssa213, 0 br i1 %cmp12167, label %for.body14, label %for.end19 for.body14: ; preds = %if.end, %for.body14 %i.1169 = phi i32 [ %sub18, %for.body14 ], [ %sub, %if.end ] %sum.0168 = phi i64 [ %add, %for.body14 ], [ 0, %if.end ] %idxprom = zext i32 %i.1169 to i64 %arrayidx15 = getelementptr inbounds i32, ptr %call1, i64 %idxprom %5 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %conv16 = sext i32 %5 to i64 %add = add nsw i64 %sum.0168, %conv16 %sub18 = add nsw i32 %i.1169, -2 %cmp12 = icmp ugt i32 %i.1169, 1 br i1 %cmp12, label %for.body14, label %for.end19, !llvm.loop !12 for.end19: ; preds = %for.body14, %if.end %sum.0.lcssa = phi i64 [ 0, %if.end ], [ %add, %for.body14 ] %sub20 = add nsw i32 %.lcssa213, -2 %idxprom21 = sext i32 %sub20 to i64 %arrayidx22 = getelementptr inbounds i32, ptr %call1, i64 %idxprom21 %6 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %sub23 = add nsw i32 %.lcssa213, -3 %idxprom24 = sext i32 %sub23 to i64 %arrayidx25 = getelementptr inbounds i32, ptr %call1, i64 %idxprom24 %7 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %add26 = add nsw i32 %7, %6 %div = sdiv i32 %add26, 2 %add27 = add nsw i32 %div, 1 store i32 %add27, ptr %call8, align 4, !tbaa !5 store i64 %sum.0.lcssa, ptr %call10, align 8, !tbaa !13 %cmp34172 = icmp sgt i32 %.lcssa213, 4 br i1 %cmp34172, label %for.body36.preheader, label %for.cond71.preheader for.body36.preheader: ; preds = %for.end19 %sub33171 = add nsw i32 %.lcssa213, -5 %8 = zext i32 %sub to i64 %9 = lshr i32 %sub33171, 1 %10 = add nuw nsw i32 %9, 2 %wide.trip.count = zext i32 %10 to i64 br label %for.body36 for.cond71.preheader.loopexit: ; preds = %for.body36 %11 = trunc i64 %indvars.iv196 to i32 br label %for.cond71.preheader for.cond71.preheader: ; preds = %for.cond71.preheader.loopexit, %for.end19 %i.2.lcssa = phi i32 [ 1, %for.end19 ], [ %11, %for.cond71.preheader.loopexit ] %cmp74.not179 = icmp slt i32 %sub, 0 br i1 %cmp74.not179, label %for.end85, label %for.body76 for.body36: ; preds = %for.body36.preheader, %for.body36 %indvars.iv200 = phi i64 [ 1, %for.body36.preheader ], [ %indvars.iv.next201, %for.body36 ] %indvars.iv196 = phi i64 [ 2, %for.body36.preheader ], [ %indvars.iv.next197, %for.body36 ] %sub33176 = phi i32 [ %sub33171, %for.body36.preheader ], [ %sub33, %for.body36 ] %sum.1173 = phi i64 [ %sum.0.lcssa, %for.body36.preheader ], [ %add64, %for.body36 ] %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1 %12 = sub nsw i64 %8, %indvars.iv196 %arrayidx41 = getelementptr inbounds i32, ptr %call1, i64 %12 %13 = load i32, ptr %arrayidx41, align 4, !tbaa !5 %idxprom46 = zext i32 %sub33176 to i64 %arrayidx47 = getelementptr inbounds i32, ptr %call1, i64 %idxprom46 %14 = load i32, ptr %arrayidx47, align 4, !tbaa !5 %add48 = add nsw i32 %14, %13 %div49 = sdiv i32 %add48, 2 %add50 = add nsw i32 %div49, 1 %arrayidx52 = getelementptr inbounds i32, ptr %call8, i64 %indvars.iv200 store i32 %add50, ptr %arrayidx52, align 4, !tbaa !5 %15 = sub nsw i64 %8, %indvars.iv200 %arrayidx56 = getelementptr inbounds i32, ptr %call1, i64 %15 %16 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %17 = shl nuw nsw i64 %indvars.iv200, 1 %18 = sub nsw i64 %8, %17 %arrayidx61 = getelementptr inbounds i32, ptr %call1, i64 %18 %19 = load i32, ptr %arrayidx61, align 4, !tbaa !5 %sub62 = sub nsw i32 %16, %19 %conv63 = sext i32 %sub62 to i64 %add64 = add nsw i64 %sum.1173, %conv63 %arrayidx66 = getelementptr inbounds i64, ptr %call10, i64 %indvars.iv200 store i64 %add64, ptr %arrayidx66, align 8, !tbaa !13 %indvars.iv.next197 = add nuw nsw i64 %indvars.iv196, 1 %indvars.iv.next197.tr = trunc i64 %indvars.iv.next197 to i32 %20 = shl i32 %indvars.iv.next197.tr, 1 %sub33 = sub nsw i32 %sub, %20 %exitcond.not = icmp eq i64 %indvars.iv.next201, %wide.trip.count br i1 %exitcond.not, label %for.cond71.preheader.loopexit, label %for.body36, !llvm.loop !15 for.body76: ; preds = %for.cond71.preheader, %for.body76 %indvars.iv208 = phi i64 [ %indvars.iv.next209, %for.body76 ], [ 0, %for.cond71.preheader ] %sub73182 = phi i32 [ %sub73, %for.body76 ], [ %sub, %for.cond71.preheader ] %sum.2180 = phi i64 [ %add82, %for.body76 ], [ 0, %for.cond71.preheader ] %idxprom79 = sext i32 %sub73182 to i64 %arrayidx80 = getelementptr inbounds i32, ptr %call1, i64 %idxprom79 %21 = load i32, ptr %arrayidx80, align 4, !tbaa !5 %conv81 = sext i32 %21 to i64 %add82 = add nsw i64 %sum.2180, %conv81 %indvars.iv.next209 = add nuw i64 %indvars.iv208, 1 %22 = trunc i64 %indvars.iv208 to i32 %reass.sub = sub i32 %.lcssa213, %22 %sub73 = add i32 %reass.sub, -2 %23 = sext i32 %sub73 to i64 %cmp74.not.not = icmp slt i64 %indvars.iv208, %23 br i1 %cmp74.not.not, label %for.body76, label %for.end85, !llvm.loop !16 for.end85: ; preds = %for.body76, %for.cond71.preheader %sum.2.lcssa = phi i64 [ 0, %for.cond71.preheader ], [ %add82, %for.body76 ] %idxprom87 = zext i32 %i.2.lcssa to i64 %arrayidx88 = getelementptr inbounds i32, ptr %call8, i64 %idxprom87 store i32 -1, ptr %arrayidx88, align 4, !tbaa !5 %arrayidx91 = getelementptr inbounds i64, ptr %call10, i64 %idxprom87 store i64 %sum.2.lcssa, ptr %arrayidx91, align 8, !tbaa !13 %24 = load i32, ptr %q, align 4, !tbaa !5 %dec93189 = add nsw i32 %24, -1 store i32 %dec93189, ptr %q, align 4, !tbaa !5 %tobool94.not190 = icmp eq i32 %24, 0 br i1 %tobool94.not190, label %cleanup, label %while.body95.us while.body95.us: ; preds = %for.end85, %while.cond98.while.end111_crit_edge.us call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call96.us = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %25 = load i32, ptr %x, align 4, !tbaa !5 br label %while.body102.us while.body102.us: ; preds = %while.body95.us, %while.body102.us %r.0187.us = phi i32 [ %i.2.lcssa, %while.body95.us ], [ %r.0.div104.us, %while.body102.us ] %l.0186.us = phi i32 [ -1, %while.body95.us ], [ %div104.l.0.us, %while.body102.us ] %add103.us = add nsw i32 %r.0187.us, %l.0186.us %div104.us = sdiv i32 %add103.us, 2 %idxprom105.us = sext i32 %div104.us to i64 %arrayidx106.us = getelementptr inbounds i32, ptr %call8, i64 %idxprom105.us %26 = load i32, ptr %arrayidx106.us, align 4, !tbaa !5 %cmp107.not.us = icmp slt i32 %25, %26 %div104.l.0.us = select i1 %cmp107.not.us, i32 %div104.us, i32 %l.0186.us %r.0.div104.us = select i1 %cmp107.not.us, i32 %r.0187.us, i32 %div104.us %sub99.us = sub nsw i32 %r.0.div104.us, %div104.l.0.us %cmp100.us = icmp sgt i32 %sub99.us, 1 br i1 %cmp100.us, label %while.body102.us, label %while.cond98.while.end111_crit_edge.us, !llvm.loop !17 while.cond98.while.end111_crit_edge.us: ; preds = %while.body102.us %idxprom112.us = sext i32 %r.0.div104.us to i64 %arrayidx113.us = getelementptr inbounds i64, ptr %call10, i64 %idxprom112.us %27 = load i64, ptr %arrayidx113.us, align 8, !tbaa !13 %call114.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %27) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 %28 = load i32, ptr %q, align 4, !tbaa !5 %dec93.us = add nsw i32 %28, -1 store i32 %dec93.us, ptr %q, align 4, !tbaa !5 %tobool94.not.us = icmp eq i32 %28, 0 br i1 %tobool94.not.us, label %cleanup, label %while.body95.us, !llvm.loop !18 cleanup: ; preds = %while.cond98.while.end111_crit_edge.us, %while.body, %for.end85, %while.cond.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: tail call void @run() ret i32 0 } attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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 = { nounwind } attributes #5 = { nounwind allocsize(0,1) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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 = !{!14, !14, i64 0} !14 = !{!"long long", !7, i64 0} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
//question name-bananas #include<stdio.h> #include<stdlib.h> int main() { long long int m,b,x,y; scanf("%I64d %I64d",&m,&b); long long int ans=0,max=0; for(y=0;y<=b;y++) { x=m*b-m*y; ans=((x+1)*(y+1)*(x+y))/2; if(ans>max) max=ans; } printf("%I64d",max); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13725/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13725/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%I64d %I64d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%I64d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i64, align 8 %b = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m, ptr noundef nonnull %b) %0 = load i64, ptr %b, align 8, !tbaa !5 %cmp.not16 = icmp slt i64 %0, 0 br i1 %cmp.not16, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i64, ptr %m, align 8, !tbaa !5 %2 = add i64 %0, 1 %xtraiter = and i64 %2, 1 %3 = icmp eq i64 %0, 0 br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %2, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %max.018 = phi i64 [ 0, %for.body.lr.ph.new ], [ %spec.select.1, %for.body ] %y.017 = phi i64 [ 0, %for.body.lr.ph.new ], [ %add2.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %mul115 = sub i64 %0, %y.017 %sub = mul i64 %1, %mul115 %add = add nsw i64 %sub, 1 %add2 = or i64 %y.017, 1 %mul3 = mul nsw i64 %add, %add2 %add4 = add nsw i64 %sub, %y.017 %mul5 = mul nsw i64 %mul3, %add4 %div = sdiv i64 %mul5, 2 %spec.select = call i64 @llvm.smax.i64(i64 %div, i64 %max.018) %mul115.1 = sub i64 %0, %add2 %sub.1 = mul i64 %1, %mul115.1 %add.1 = add nsw i64 %sub.1, 1 %add2.1 = add nuw i64 %y.017, 2 %mul3.1 = mul nsw i64 %add.1, %add2.1 %add4.1 = add nsw i64 %sub.1, %add2 %mul5.1 = mul nsw i64 %mul3.1, %add4.1 %div.1 = ashr exact i64 %mul5.1, 1 %spec.select.1 = call i64 @llvm.smax.i64(i64 %div.1, i64 %spec.select) %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.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %spec.select.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %spec.select.1, %for.body ] %max.018.unr = phi i64 [ 0, %for.body.lr.ph ], [ %spec.select.1, %for.body ] %y.017.unr = phi i64 [ 0, %for.body.lr.ph ], [ %add2.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %mul115.epil = sub i64 %0, %y.017.unr %sub.epil = mul i64 %1, %mul115.epil %add.epil = add nsw i64 %sub.epil, 1 %add2.epil = add nuw i64 %y.017.unr, 1 %mul3.epil = mul nsw i64 %add.epil, %add2.epil %add4.epil = add nsw i64 %sub.epil, %y.017.unr %mul5.epil = mul nsw i64 %mul3.epil, %add4.epil %div.epil = sdiv i64 %mul5.epil, 2 %spec.select.epil = call i64 @llvm.smax.i64(i64 %div.epil, i64 %max.018.unr) br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %max.0.lcssa = phi i64 [ 0, %entry ], [ %spec.select.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %spec.select.epil, %for.body.epil ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> int main(){ long long int m,b; scanf("%lld %lld",&m,&b); long long int x_int = m*b; long long int y_int = b; long long int fin_tot=0; long long int i; for(i=y_int-1;i>=0;i--){ long long int cor = m*(b-i); long long int tot = 0; long long int plus = i + cor; long long int red = 0; long long int j; for(j=i;j>=0;j--){ long long int a,b; // if(plus-red==1){ // a = 1; // } a = (((plus-red)*((plus-red)+1))/2); if(j<2){ b=0; } else{ b = (((j-1)*(j))/2); } tot+= a-b; red+=1; } if (tot>fin_tot){ fin_tot=tot; } } printf("%lld",fin_tot ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13730/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13730/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [10 x i8] c"%lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i64, align 8 %b = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m, ptr noundef nonnull %b) %0 = load i64, ptr %b, align 8, !tbaa !5 %cmp43 = icmp sgt i64 %0, 0 br i1 %cmp43, label %for.body.lr.ph, label %for.end23 for.body.lr.ph: ; preds = %entry %1 = load i64, ptr %m, align 8, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.end %i.045.in = phi i64 [ %0, %for.body.lr.ph ], [ %i.045, %for.end ] %fin_tot.044 = phi i64 [ 0, %for.body.lr.ph ], [ %spec.select, %for.end ] %i.045 = add nsw i64 %i.045.in, -1 %sub1 = sub nsw i64 %0, %i.045 %mul2 = mul nsw i64 %1, %sub1 %add = add nsw i64 %mul2, %i.045 br label %for.body5 for.body5: ; preds = %for.body, %if.end %j.041 = phi i64 [ %i.045, %for.body ], [ %.pre, %if.end ] %red.040 = phi i64 [ 0, %for.body ], [ %add17, %if.end ] %tot.039 = phi i64 [ 0, %for.body ], [ %add16, %if.end ] %sub7 = sub i64 %add, %red.040 %add9 = add nsw i64 %sub7, 1 %mul10 = mul nsw i64 %add9, %sub7 %div = sdiv i64 %mul10, 2 %cmp11 = icmp ult i64 %j.041, 2 %.pre = add nsw i64 %j.041, -1 br i1 %cmp11, label %if.end, label %if.else if.else: ; preds = %for.body5 %mul13 = mul nsw i64 %.pre, %j.041 %div14.neg = sdiv i64 %mul13, -2 br label %if.end if.end: ; preds = %for.body5, %if.else %b6.0.neg = phi i64 [ %div14.neg, %if.else ], [ 0, %for.body5 ] %sub15 = add i64 %div, %tot.039 %add16 = add i64 %sub15, %b6.0.neg %add17 = add nuw nsw i64 %red.040, 1 %cmp4 = icmp sgt i64 %j.041, 0 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %if.end %spec.select = call i64 @llvm.smax.i64(i64 %add16, i64 %fin_tot.044) %cmp = icmp sgt i64 %i.045.in, 1 br i1 %cmp, label %for.body, label %for.end23, !llvm.loop !11 for.end23: ; preds = %for.end, %entry %fin_tot.0.lcssa = phi i64 [ 0, %entry ], [ %spec.select, %for.end ] %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %fin_tot.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int a[50][50]; int main() { int x, y, s, t, n, ok = 1; scanf("%d", &n); for (x = 0; x < n; x++) for (y = 0; y < n; y++) scanf("%d", &a[x][y]); for (x = 0; x < n; x++) for (y = 0; y < n; y++) if (a[x][y] != 1) { int flag = 0; for (s = 0; s < n; s++) for (t = 0; t < n; t++) if (a[x][s] + a[t][y] == a[x][y]) flag = 1; if (!flag) ok = 0; } if (ok) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13743/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13743/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @a = dso_local global [50 x [50 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %cmp82 = icmp sgt i32 %0, 0 br i1 %cmp82, label %for.cond1.preheader, label %if.end60 for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %46, %for.inc7 ], [ %0, %entry ] %indvars.iv106 = phi i64 [ %indvars.iv.next107, %for.inc7 ], [ 0, %entry ] %cmp280 = icmp sgt i32 %1, 0 br i1 %cmp280, label %for.body3, label %for.cond1.preheader.for.inc7_crit_edge for.cond1.preheader.for.inc7_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc7 for.cond10.preheader: ; preds = %for.inc7 %cmp1198 = icmp sgt i32 %46, 0 br i1 %cmp1198, label %for.cond13.preheader.us.preheader, label %if.end60 for.cond13.preheader.us.preheader: ; preds = %for.cond10.preheader %wide.trip.count125 = zext i32 %46 to i64 %min.iters.check = icmp ult i32 %46, 8 %n.vec = and i64 %wide.trip.count125, 4294967288 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count125 br label %for.cond13.preheader.us for.cond13.preheader.us: ; preds = %for.cond13.preheader.us.preheader, %for.cond13.for.inc53_crit_edge.split.us.us %indvars.iv122 = phi i64 [ 0, %for.cond13.preheader.us.preheader ], [ %indvars.iv.next123, %for.cond13.for.inc53_crit_edge.split.us.us ] %ok.0100.us = phi i32 [ 1, %for.cond13.preheader.us.preheader ], [ %ok.3.us.us, %for.cond13.for.inc53_crit_edge.split.us.us ] br label %for.body15.us.us for.body15.us.us: ; preds = %for.inc50.us.us, %for.cond13.preheader.us %indvars.iv117 = phi i64 [ %indvars.iv.next118, %for.inc50.us.us ], [ 0, %for.cond13.preheader.us ] %ok.195.us.us = phi i32 [ %ok.3.us.us, %for.inc50.us.us ], [ %ok.0100.us, %for.cond13.preheader.us ] %arrayidx19.us.us = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %indvars.iv122, i64 %indvars.iv117 %2 = load i32, ptr %arrayidx19.us.us, align 4, !tbaa !5 %cmp20.not.us.us = icmp eq i32 %2, 1 br i1 %cmp20.not.us.us, label %for.inc50.us.us, label %for.cond24.preheader.us.us.us.preheader for.cond24.preheader.us.us.us.preheader: ; preds = %for.body15.us.us %broadcast.splatinsert135 = insertelement <4 x i32> poison, i32 %2, i64 0 %broadcast.splat136 = shufflevector <4 x i32> %broadcast.splatinsert135, <4 x i32> poison, <4 x i32> zeroinitializer br label %for.cond24.preheader.us.us.us for.inc50.us.us: ; preds = %for.cond21.for.end46_crit_edge.split.us.us.us, %for.body15.us.us %ok.3.us.us = phi i32 [ %spec.select79.us.us, %for.cond21.for.end46_crit_edge.split.us.us.us ], [ %ok.195.us.us, %for.body15.us.us ] %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1 %exitcond121.not = icmp eq i64 %indvars.iv.next118, %wide.trip.count125 br i1 %exitcond121.not, label %for.cond13.for.inc53_crit_edge.split.us.us, label %for.body15.us.us, !llvm.loop !9 for.cond24.preheader.us.us.us: ; preds = %for.cond24.preheader.us.us.us.preheader, %for.cond24.for.inc44_crit_edge.us.us.us %indvars.iv112 = phi i64 [ %indvars.iv.next113, %for.cond24.for.inc44_crit_edge.us.us.us ], [ 0, %for.cond24.preheader.us.us.us.preheader ] %flag.090.us.us.us = phi i32 [ %spec.select.us.us.us.lcssa, %for.cond24.for.inc44_crit_edge.us.us.us ], [ 0, %for.cond24.preheader.us.us.us.preheader ] %arrayidx30.us.us.us = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %indvars.iv122, i64 %indvars.iv112 %3 = load i32, ptr %arrayidx30.us.us.us, align 4, !tbaa !5 br i1 %min.iters.check, label %for.body26.us.us.us.preheader, label %vector.ph vector.ph: ; preds = %for.cond24.preheader.us.us.us %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %flag.090.us.us.us, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %3, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %39, %vector.body ] %vec.phi134 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %40, %vector.body ] %4 = or i64 %index, 1 %5 = or i64 %index, 2 %6 = or i64 %index, 3 %7 = or i64 %index, 4 %8 = or i64 %index, 5 %9 = or i64 %index, 6 %10 = or i64 %index, 7 %11 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %index, i64 %indvars.iv117 %12 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %4, i64 %indvars.iv117 %13 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %5, i64 %indvars.iv117 %14 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %6, i64 %indvars.iv117 %15 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %7, i64 %indvars.iv117 %16 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %8, i64 %indvars.iv117 %17 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %9, i64 %indvars.iv117 %18 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %10, i64 %indvars.iv117 %19 = load i32, ptr %11, align 4, !tbaa !5 %20 = load i32, ptr %12, align 4, !tbaa !5 %21 = load i32, ptr %13, align 4, !tbaa !5 %22 = load i32, ptr %14, align 4, !tbaa !5 %23 = insertelement <4 x i32> poison, i32 %19, i64 0 %24 = insertelement <4 x i32> %23, i32 %20, i64 1 %25 = insertelement <4 x i32> %24, i32 %21, i64 2 %26 = insertelement <4 x i32> %25, i32 %22, i64 3 %27 = load i32, ptr %15, align 4, !tbaa !5 %28 = load i32, ptr %16, align 4, !tbaa !5 %29 = load i32, ptr %17, align 4, !tbaa !5 %30 = load i32, ptr %18, align 4, !tbaa !5 %31 = insertelement <4 x i32> poison, i32 %27, i64 0 %32 = insertelement <4 x i32> %31, i32 %28, i64 1 %33 = insertelement <4 x i32> %32, i32 %29, i64 2 %34 = insertelement <4 x i32> %33, i32 %30, i64 3 %35 = add nsw <4 x i32> %26, %broadcast.splat %36 = add nsw <4 x i32> %34, %broadcast.splat %37 = icmp eq <4 x i32> %35, %broadcast.splat136 %38 = icmp eq <4 x i32> %36, %broadcast.splat136 %39 = select <4 x i1> %37, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi %40 = select <4 x i1> %38, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi134 %index.next = add nuw i64 %index, 8 %41 = icmp eq i64 %index.next, %n.vec br i1 %41, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %.splatinsert = insertelement <4 x i32> poison, i32 %flag.090.us.us.us, i64 0 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %rdx.select.cmp.not = icmp eq <4 x i32> %39, %.splat %rdx.select = select <4 x i1> %rdx.select.cmp.not, <4 x i32> %40, <4 x i32> %39 %.splatinsert137 = insertelement <4 x i32> poison, i32 %flag.090.us.us.us, i64 0 %.splat138 = shufflevector <4 x i32> %.splatinsert137, <4 x i32> poison, <4 x i32> zeroinitializer %rdx.select.cmp139 = icmp ne <4 x i32> %rdx.select, %.splat138 %42 = bitcast <4 x i1> %rdx.select.cmp139 to i4 %.not = icmp eq i4 %42, 0 %rdx.select140 = select i1 %.not, i32 %flag.090.us.us.us, i32 1 br i1 %cmp.n, label %for.cond24.for.inc44_crit_edge.us.us.us, label %for.body26.us.us.us.preheader for.body26.us.us.us.preheader: ; preds = %for.cond24.preheader.us.us.us, %middle.block %indvars.iv109.ph = phi i64 [ 0, %for.cond24.preheader.us.us.us ], [ %n.vec, %middle.block ] %flag.186.us.us.us.ph = phi i32 [ %flag.090.us.us.us, %for.cond24.preheader.us.us.us ], [ %rdx.select140, %middle.block ] br label %for.body26.us.us.us for.body26.us.us.us: ; preds = %for.body26.us.us.us.preheader, %for.body26.us.us.us %indvars.iv109 = phi i64 [ %indvars.iv.next110, %for.body26.us.us.us ], [ %indvars.iv109.ph, %for.body26.us.us.us.preheader ] %flag.186.us.us.us = phi i32 [ %spec.select.us.us.us, %for.body26.us.us.us ], [ %flag.186.us.us.us.ph, %for.body26.us.us.us.preheader ] %arrayidx34.us.us.us = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %indvars.iv109, i64 %indvars.iv117 %43 = load i32, ptr %arrayidx34.us.us.us, align 4, !tbaa !5 %add.us.us.us = add nsw i32 %43, %3 %cmp39.us.us.us = icmp eq i32 %add.us.us.us, %2 %spec.select.us.us.us = select i1 %cmp39.us.us.us, i32 1, i32 %flag.186.us.us.us %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1 %exitcond.not = icmp eq i64 %indvars.iv.next110, %wide.trip.count125 br i1 %exitcond.not, label %for.cond24.for.inc44_crit_edge.us.us.us, label %for.body26.us.us.us, !llvm.loop !14 for.cond24.for.inc44_crit_edge.us.us.us: ; preds = %for.body26.us.us.us, %middle.block %spec.select.us.us.us.lcssa = phi i32 [ %rdx.select140, %middle.block ], [ %spec.select.us.us.us, %for.body26.us.us.us ] %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1 %exitcond116.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count125 br i1 %exitcond116.not, label %for.cond21.for.end46_crit_edge.split.us.us.us, label %for.cond24.preheader.us.us.us, !llvm.loop !15 for.cond21.for.end46_crit_edge.split.us.us.us: ; preds = %for.cond24.for.inc44_crit_edge.us.us.us %tobool.not.us.us = icmp eq i32 %spec.select.us.us.us.lcssa, 0 %spec.select79.us.us = select i1 %tobool.not.us.us, i32 0, i32 %ok.195.us.us br label %for.inc50.us.us for.cond13.for.inc53_crit_edge.split.us.us: ; preds = %for.inc50.us.us %indvars.iv.next123 = add nuw nsw i64 %indvars.iv122, 1 %exitcond126.not = icmp eq i64 %indvars.iv.next123, %wide.trip.count125 br i1 %exitcond126.not, label %for.end55, label %for.cond13.preheader.us, !llvm.loop !16 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [50 x [50 x i32]], ptr @a, i64 0, i64 %indvars.iv106, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %44 = load i32, ptr %n, align 4, !tbaa !5 %45 = sext i32 %44 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %45 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !17 for.inc7: ; preds = %for.body3, %for.cond1.preheader.for.inc7_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc7_crit_edge ], [ %45, %for.body3 ] %46 = phi i32 [ %1, %for.cond1.preheader.for.inc7_crit_edge ], [ %44, %for.body3 ] %indvars.iv.next107 = add nuw nsw i64 %indvars.iv106, 1 %cmp = icmp slt i64 %indvars.iv.next107, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !18 for.end55: ; preds = %for.cond13.for.inc53_crit_edge.split.us.us %47 = icmp eq i32 %ok.3.us.us, 0 %spec.select = select i1 %47, ptr @.str.2, ptr @.str.1 br label %if.end60 if.end60: ; preds = %for.end55, %for.cond10.preheader, %entry %.str.2.sink = phi ptr [ @.str.1, %entry ], [ @.str.1, %for.cond10.preheader ], [ %spec.select, %for.end55 ] %call59 = call i32 @puts(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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !19} !19 = !{!"llvm.loop.unswitch.partial.disable"}
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #include <limits.h> #include <stdbool.h> #define rep(i, n) for(int i=0; i<(n); ++i) #define max 200001 //qsort(str, n, sizeof(int), up_comp); int up_comp(const void *a, const void *b){return *(int*)a - *(int*)b;} int down_comp(const void *a, const void *b){return *(int*)b - *(int*)a;} int int_sort( const void * a , const void * b ) {return strcmp(( char * )a , ( char * )b );} int count_digit(int a){int i=0;while(a!=0){a=a/10;i++;}return i;} int euclid( int a, int b ){int temp;if(a<b){temp=a;a=b;b=temp;}if(b<1)return -1;if(a%b==0) return b;return euclid(b,a%b);} int main(void){ int n, i; scanf("%d%d", &n, &i); printf("%d", n-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137480/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137480/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @up_comp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @down_comp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @int_sort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #1 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #9 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @count_digit(i32 noundef %a) local_unnamed_addr #3 { entry: %cmp.not3 = icmp eq i32 %a, 0 br i1 %cmp.not3, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %i.05 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %a.addr.04 = phi i32 [ %div, %while.body ], [ %a, %entry ] %div = sdiv i32 %a.addr.04, 10 %inc = add nuw nsw i32 %i.05, 1 %a.addr.04.off = add i32 %a.addr.04, 9 %cmp.not = icmp ult i32 %a.addr.04.off, 19 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %i.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] ret i32 %i.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @euclid(i32 noundef %a, i32 noundef %b) local_unnamed_addr #5 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end3, %entry %a.tr = phi i32 [ %a, %entry ], [ %spec.select17, %if.end3 ] %b.tr = phi i32 [ %b, %entry ], [ %rem, %if.end3 ] %spec.select17 = tail call i32 @llvm.smin.i32(i32 %a.tr, i32 %b.tr) %cmp1 = icmp slt i32 %spec.select17, 1 br i1 %cmp1, label %cleanup, label %if.end3 if.end3: ; preds = %tailrecurse %spec.select = tail call i32 @llvm.smax.i32(i32 %a.tr, i32 %b.tr) %rem = srem i32 %spec.select, %spec.select17 %cmp4 = icmp eq i32 %rem, 0 br i1 %cmp4, label %cleanup, label %tailrecurse cleanup: ; preds = %if.end3, %tailrecurse %retval.0 = phi i32 [ -1, %tailrecurse ], [ %spec.select17, %if.end3 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #6 { entry: %n = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #10 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #10 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #10 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #8 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree 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 #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #5 = { 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 #6 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #9 = { nounwind willreturn memory(read) } attributes #10 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int N, i; scanf("%d%d", &N, &i); printf("%d", N - i + 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137530/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137530/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %i = 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 %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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"}
#include <stdio.h> int main(void) { int N, i; scanf("%d%d", &N, &i); printf("%d", N - i + 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137574/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137574/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %i = 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 %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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"}
#include <stdio.h> #include <stdlib.h> int main() { int n,i; scanf("%d%d",&n,&i); printf("%d\n",n-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137617/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137617/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%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 %i = 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 %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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"}
#include <stdio.h> int main() { int total, front; scanf("%d%d", &total, &front); printf("%d", total - front + 1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137660/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137660/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %total = alloca i32, align 4 %front = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %total) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %front) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %total, ptr noundef nonnull %front) %0 = load i32, ptr %total, align 4, !tbaa !5 %1 = load i32, ptr %front, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %front) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %total) #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 max; int cur; int res; scanf("%d", &max); scanf("%d", &cur); res = max - cur + 1; printf("%d", res); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137710/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137710/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %max = alloca i32, align 4 %cur = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %max) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %cur) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %max) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %cur) %0 = load i32, ptr %max, align 4, !tbaa !5 %1 = load i32, ptr %cur, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %cur) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %max) #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 N,i,t; scanf("%d",&N); scanf("%d",&i); t=N-i+1; printf("%d",t); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137754/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137754/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %i = 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 %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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"}
#include<stdio.h> int main(void) { int N,i; scanf("%d %d",&N,&i); printf("%d\n",N-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137798/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137798/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %i = 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 %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #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"}
#include <stdio.h> int main() { int n,i,j; char abc[3][101]; scanf("%d",&n); for (i = 0; i < 3; i++) { scanf("%s",abc[i]); } int buf = 0,ans = 0; for (i = 0; i < n; i++) { if(abc[0][i] != abc[1][i] && abc[1][i] != abc[2][i] && abc[2][i] != abc[0][i]) { ans += 2; } else if(abc[0][i] == abc[1][i] && abc[1][i] == abc[2][i] && abc[2][i] == abc[0][i]) { ans += 0; } else { ans += 1; } } printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137840/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137840/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %abc = alloca [3 x [101 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 303, ptr nonnull %abc) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %abc) %arrayidx.1 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 1 %call1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 2 %call1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.2) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp397 = icmp sgt i32 %0, 0 br i1 %cmp397, label %for.body4.preheader, label %for.end74 for.body4.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body4.preheader111, label %vector.ph vector.ph: ; preds = %for.body4.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %predphi109, %vector.body ] %vec.phi102 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %predphi110, %vector.body ] %1 = getelementptr inbounds [101 x i8], ptr %abc, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %1, align 8, !tbaa !9 %2 = getelementptr inbounds i8, ptr %1, i64 4 %wide.load103 = load <4 x i8>, ptr %2, align 4, !tbaa !9 %3 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 1, i64 %index %wide.load104 = load <4 x i8>, ptr %3, align 1, !tbaa !9 %4 = getelementptr inbounds i8, ptr %3, i64 4 %wide.load105 = load <4 x i8>, ptr %4, align 1, !tbaa !9 %5 = icmp eq <4 x i8> %wide.load, %wide.load104 %6 = icmp eq <4 x i8> %wide.load103, %wide.load105 %7 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 2, i64 %index %wide.load106 = load <4 x i8>, ptr %7, align 2, !tbaa !9 %8 = getelementptr inbounds i8, ptr %7, i64 4 %wide.load107 = load <4 x i8>, ptr %8, align 2, !tbaa !9 %9 = icmp eq <4 x i8> %wide.load104, %wide.load106 %10 = icmp eq <4 x i8> %wide.load105, %wide.load107 %11 = icmp eq <4 x i8> %wide.load106, %wide.load %12 = icmp eq <4 x i8> %wide.load107, %wide.load103 %13 = or <4 x i1> %9, %11 %14 = or <4 x i1> %10, %12 %15 = icmp eq <4 x i8> %wide.load, %wide.load106 %16 = icmp eq <4 x i8> %wide.load103, %wide.load107 %17 = xor <4 x i1> %5, <i1 true, i1 true, i1 true, i1 true> %18 = xor <4 x i1> %6, <i1 true, i1 true, i1 true, i1 true> %19 = select <4 x i1> %17, <4 x i1> %13, <4 x i1> zeroinitializer %20 = select <4 x i1> %18, <4 x i1> %14, <4 x i1> zeroinitializer %21 = xor <4 x i1> %15, <i1 true, i1 true, i1 true, i1 true> %22 = xor <4 x i1> %16, <i1 true, i1 true, i1 true, i1 true> %23 = select <4 x i1> %5, <4 x i1> %21, <4 x i1> zeroinitializer %24 = select <4 x i1> %6, <4 x i1> %22, <4 x i1> zeroinitializer %25 = or <4 x i1> %19, %23 %26 = or <4 x i1> %20, %24 %27 = select <4 x i1> %5, <4 x i1> %15, <4 x i1> zeroinitializer %28 = select <4 x i1> %6, <4 x i1> %16, <4 x i1> zeroinitializer %predphi.v = select <4 x i1> %25, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %predphi108.v = select <4 x i1> %26, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %predphi = select <4 x i1> %27, <4 x i32> zeroinitializer, <4 x i32> %predphi.v %predphi109 = add <4 x i32> %vec.phi, %predphi %predphi108 = select <4 x i1> %28, <4 x i32> zeroinitializer, <4 x i32> %predphi108.v %predphi110 = add <4 x i32> %vec.phi102, %predphi108 %index.next = add nuw i64 %index, 8 %29 = icmp eq i64 %index.next, %n.vec br i1 %29, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %predphi110, %predphi109 %30 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end74, label %for.body4.preheader111 for.body4.preheader111: ; preds = %for.body4.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body4.preheader ], [ %n.vec, %middle.block ] %ans.099.ph = phi i32 [ 0, %for.body4.preheader ], [ %30, %middle.block ] br label %for.body4 for.body4: ; preds = %for.body4.preheader111, %for.inc72 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc72 ], [ %indvars.iv.ph, %for.body4.preheader111 ] %ans.099 = phi i32 [ %ans.1, %for.inc72 ], [ %ans.099.ph, %for.body4.preheader111 ] %arrayidx7 = getelementptr inbounds [101 x i8], ptr %abc, i64 0, i64 %indvars.iv %31 = load i8, ptr %arrayidx7, align 1, !tbaa !9 %arrayidx10 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 1, i64 %indvars.iv %32 = load i8, ptr %arrayidx10, align 1, !tbaa !9 %cmp12.not = icmp eq i8 %31, %32 %arrayidx52 = getelementptr inbounds [3 x [101 x i8]], ptr %abc, i64 0, i64 2, i64 %indvars.iv %33 = load i8, ptr %arrayidx52, align 1, !tbaa !9 br i1 %cmp12.not, label %land.lhs.true45, label %land.lhs.true land.lhs.true: ; preds = %for.body4 %cmp22.not = icmp eq i8 %32, %33 %cmp33.not = icmp eq i8 %33, %31 %or.cond = or i1 %cmp22.not, %cmp33.not br i1 %or.cond, label %if.else69, label %if.then if.then: ; preds = %land.lhs.true %add = add nsw i32 %ans.099, 2 br label %for.inc72 land.lhs.true45: ; preds = %for.body4 %cmp54 = icmp eq i8 %31, %33 br i1 %cmp54, label %for.inc72, label %if.else69 if.else69: ; preds = %land.lhs.true, %land.lhs.true45 %add70 = add nsw i32 %ans.099, 1 br label %for.inc72 for.inc72: ; preds = %land.lhs.true45, %if.then, %if.else69 %ans.1 = phi i32 [ %add, %if.then ], [ %add70, %if.else69 ], [ %ans.099, %land.lhs.true45 ] %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.end74, label %for.body4, !llvm.loop !14 for.end74: ; preds = %for.inc72, %middle.block, %entry %ans.0.lcssa = phi i32 [ 0, %entry ], [ %30, %middle.block ], [ %ans.1, %for.inc72 ] %call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 303, ptr nonnull %abc) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12}
#include <stdio.h> int main(){ int n,count=0; char a[101],b[101],c[101]; scanf("%d",&n); scanf("%s",a); scanf("%s",b); scanf("%s",c); for(int i=0;i<n;i++){ if((a[i]-b[i])*(b[i]-c[i])*(c[i]-a[i])!=0){ count+=2; }else if(a[i]-b[i]==0 && b[i]-c[i]==0){ }else{ count++; } } printf("%d",count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [101 x i8], align 16 %b = alloca [101 x i8], align 16 %c = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp62 = icmp sgt i32 %0, 0 br i1 %cmp62, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body.preheader72, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %35, %vector.body ] %vec.phi66 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %36, %vector.body ] %1 = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %1, align 8, !tbaa !9 %2 = getelementptr inbounds i8, ptr %1, i64 4 %wide.load67 = load <4 x i8>, ptr %2, align 4, !tbaa !9 %3 = sext <4 x i8> %wide.load to <4 x i32> %4 = sext <4 x i8> %wide.load67 to <4 x i32> %5 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %index %wide.load68 = load <4 x i8>, ptr %5, align 8, !tbaa !9 %6 = getelementptr inbounds i8, ptr %5, i64 4 %wide.load69 = load <4 x i8>, ptr %6, align 4, !tbaa !9 %7 = sext <4 x i8> %wide.load68 to <4 x i32> %8 = sext <4 x i8> %wide.load69 to <4 x i32> %9 = sub nsw <4 x i32> %3, %7 %10 = sub nsw <4 x i32> %4, %8 %11 = getelementptr inbounds [101 x i8], ptr %c, i64 0, i64 %index %wide.load70 = load <4 x i8>, ptr %11, align 8, !tbaa !9 %12 = getelementptr inbounds i8, ptr %11, i64 4 %wide.load71 = load <4 x i8>, ptr %12, align 4, !tbaa !9 %13 = sext <4 x i8> %wide.load70 to <4 x i32> %14 = sext <4 x i8> %wide.load71 to <4 x i32> %15 = sub nsw <4 x i32> %7, %13 %16 = sub nsw <4 x i32> %8, %14 %17 = mul nsw <4 x i32> %15, %9 %18 = mul nsw <4 x i32> %16, %10 %19 = sub nsw <4 x i32> %13, %3 %20 = sub nsw <4 x i32> %14, %4 %21 = mul nsw <4 x i32> %17, %19 %22 = mul nsw <4 x i32> %18, %20 %23 = icmp eq <4 x i32> %21, zeroinitializer %24 = icmp eq <4 x i32> %22, zeroinitializer %25 = icmp ne <4 x i8> %wide.load, %wide.load68 %26 = icmp ne <4 x i8> %wide.load67, %wide.load69 %27 = icmp ne <4 x i8> %wide.load68, %wide.load70 %28 = icmp ne <4 x i8> %wide.load69, %wide.load71 %29 = or <4 x i1> %25, %27 %30 = or <4 x i1> %26, %28 %31 = zext <4 x i1> %29 to <4 x i32> %32 = zext <4 x i1> %30 to <4 x i32> %33 = select <4 x i1> %23, <4 x i32> %31, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %34 = select <4 x i1> %24, <4 x i32> %32, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %35 = add <4 x i32> %vec.phi, %33 %36 = add <4 x i32> %vec.phi66, %34 %index.next = add nuw i64 %index, 8 %37 = icmp eq i64 %index.next, %n.vec br i1 %37, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %36, %35 %38 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader72 for.body.preheader72: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %count.063.ph = phi i32 [ 0, %for.body.preheader ], [ %38, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %count.0.lcssa = phi i32 [ 0, %entry ], [ %38, %middle.block ], [ %spec.select, %for.body ] %call48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %count.0.lcssa) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body: ; preds = %for.body.preheader72, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader72 ] %count.063 = phi i32 [ %spec.select, %for.body ], [ %count.063.ph, %for.body.preheader72 ] %arrayidx = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %indvars.iv %39 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv = sext i8 %39 to i32 %arrayidx7 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %indvars.iv %40 = load i8, ptr %arrayidx7, align 1, !tbaa !9 %conv8 = sext i8 %40 to i32 %sub = sub nsw i32 %conv, %conv8 %arrayidx13 = getelementptr inbounds [101 x i8], ptr %c, i64 0, i64 %indvars.iv %41 = load i8, ptr %arrayidx13, align 1, !tbaa !9 %conv14 = sext i8 %41 to i32 %sub15 = sub nsw i32 %conv8, %conv14 %mul = mul nsw i32 %sub15, %sub %sub22 = sub nsw i32 %conv14, %conv %mul23 = mul nsw i32 %mul, %sub22 %cmp24.not = icmp eq i32 %mul23, 0 %cmp33 = icmp ne i8 %39, %40 %cmp42 = icmp ne i8 %40, %41 %or.cond.not = or i1 %cmp33, %cmp42 %inc = zext i1 %or.cond.not to i32 %inc.sink = select i1 %cmp24.not, i32 %inc, i32 2 %spec.select = add nuw nsw i32 %count.063, %inc.sink %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 !14 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12}
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int n; scanf("%d",&n); char a[101],b[101],c[101]; scanf("%s",a); scanf("%s",b); scanf("%s",c); int cnt=0; for(int i=0;i<n;i++){ if(a[i]==b[i]){ cnt+=c[i]==a[i]?0:1; } else if(a[i]==c[i]){ cnt++; } else if(b[i]==c[i]){ cnt++; } else { cnt+=2; } } printf("%d\n",cnt); } int main(void){ run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @run() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [101 x i8], align 16 %b = alloca [101 x i8], align 16 %c = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %c) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp58 = icmp sgt i32 %0, 0 br i1 %cmp58, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body.preheader72, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ] %vec.phi62 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ] %1 = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %1, align 8, !tbaa !9 %2 = getelementptr inbounds i8, ptr %1, i64 4 %wide.load63 = load <4 x i8>, ptr %2, align 4, !tbaa !9 %3 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %index %wide.load64 = load <4 x i8>, ptr %3, align 8, !tbaa !9 %4 = getelementptr inbounds i8, ptr %3, i64 4 %wide.load65 = load <4 x i8>, ptr %4, align 4, !tbaa !9 %5 = icmp ne <4 x i8> %wide.load, %wide.load64 %6 = icmp ne <4 x i8> %wide.load63, %wide.load65 %7 = getelementptr inbounds [101 x i8], ptr %c, i64 0, i64 %index %wide.load66 = load <4 x i8>, ptr %7, align 8, !tbaa !9 %8 = getelementptr inbounds i8, ptr %7, i64 4 %wide.load67 = load <4 x i8>, ptr %8, align 4, !tbaa !9 %9 = icmp ne <4 x i8> %wide.load, %wide.load66 %10 = icmp ne <4 x i8> %wide.load63, %wide.load67 %11 = icmp eq <4 x i8> %wide.load64, %wide.load66 %12 = icmp eq <4 x i8> %wide.load65, %wide.load67 %13 = select <4 x i1> %11, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %14 = select <4 x i1> %12, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %15 = icmp ne <4 x i8> %wide.load66, %wide.load %16 = icmp ne <4 x i8> %wide.load67, %wide.load63 %17 = select <4 x i1> %5, <4 x i1> %9, <4 x i1> zeroinitializer %18 = select <4 x i1> %6, <4 x i1> %10, <4 x i1> zeroinitializer %narrow = select <4 x i1> %5, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %15 %predphi = zext <4 x i1> %narrow to <4 x i32> %narrow71 = select <4 x i1> %6, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %16 %predphi68 = zext <4 x i1> %narrow71 to <4 x i32> %predphi69 = select <4 x i1> %17, <4 x i32> %13, <4 x i32> %predphi %predphi70 = select <4 x i1> %18, <4 x i32> %14, <4 x i32> %predphi68 %19 = add <4 x i32> %predphi69, %vec.phi %20 = add <4 x i32> %predphi70, %vec.phi62 %index.next = add nuw i64 %index, 8 %21 = icmp eq i64 %index.next, %n.vec br i1 %21, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %20, %19 %22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader72 for.body.preheader72: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %cnt.059.ph = phi i32 [ 0, %for.body.preheader ], [ %22, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.inc, %middle.block, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %22, %middle.block ], [ %cnt.1, %for.inc ] %call44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %cnt.0.lcssa) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret void for.body: ; preds = %for.body.preheader72, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ %indvars.iv.ph, %for.body.preheader72 ] %cnt.059 = phi i32 [ %cnt.1, %for.inc ], [ %cnt.059.ph, %for.body.preheader72 ] %arrayidx = getelementptr inbounds [101 x i8], ptr %a, i64 0, i64 %indvars.iv %23 = load i8, ptr %arrayidx, align 1, !tbaa !9 %arrayidx7 = getelementptr inbounds [101 x i8], ptr %b, i64 0, i64 %indvars.iv %24 = load i8, ptr %arrayidx7, align 1, !tbaa !9 %cmp9 = icmp eq i8 %23, %24 %arrayidx12 = getelementptr inbounds [101 x i8], ptr %c, i64 0, i64 %indvars.iv %25 = load i8, ptr %arrayidx12, align 1, !tbaa !9 br i1 %cmp9, label %if.then, label %if.else if.then: ; preds = %for.body %cmp17 = icmp ne i8 %25, %23 %cond = zext i1 %cmp17 to i32 br label %for.inc if.else: ; preds = %for.body %cmp25 = icmp eq i8 %23, %25 br i1 %cmp25, label %for.inc, label %if.else28 if.else28: ; preds = %if.else %cmp35 = icmp eq i8 %24, %25 %. = select i1 %cmp35, i32 1, i32 2 br label %for.inc for.inc: ; preds = %if.else28, %if.else, %if.then %cond.pn = phi i32 [ %cond, %if.then ], [ 1, %if.else ], [ %., %if.else28 ] %cnt.1 = add nuw nsw i32 %cond.pn, %cnt.059 %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 !14 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: tail call void @run() ret i32 0 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12}
#include <stdio.h> void ft_swap(int *a, int *b) { int tmp; tmp = *a; *a = *b; *b = tmp; } void ft_qsort(int *tab, int left, int right) { int Left = left; int Right = right; int pivot = tab[(left + right) / 2]; while (1) { while (tab[Left] < pivot) Left++; while (tab[Right] > pivot) Right--; if (Left >= Right) break ; ft_swap(&tab[Left], &tab[Right]); Left++; Right--; } if (Left - 1 > left) ft_qsort(tab, left, Left - 1); if (Right + 1 < right) ft_qsort(tab, Right + 1, right); } int main(void) { int N; scanf("%d", &N); int tab[N]; int i = 0; while (i < N) scanf("%d", &tab[i++]); ft_qsort(tab, 0, N - 1); double max = tab[0]; i = 1; while (i < N) { max += tab[i]; max /= 2; i++; } printf("%f", max); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @ft_swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 ret void } ; Function Attrs: 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 @ft_qsort(ptr nocapture noundef %tab, i32 noundef %left, i32 noundef %right) local_unnamed_addr #2 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end22, %entry %left.tr = phi i32 [ %left, %entry ], [ %add23, %if.end22 ] %add = add nsw i32 %left.tr, %right %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i32, ptr %tab, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %if.end, %tailrecurse %Right.0 = phi i32 [ %right, %tailrecurse ], [ %dec17, %if.end ] %Left.0 = phi i32 [ %left.tr, %tailrecurse ], [ %inc16, %if.end ] %1 = sext i32 %Left.0 to i64 br label %while.cond1 while.cond1: ; preds = %while.cond1, %while.cond %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond1 ], [ %1, %while.cond ] %arrayidx3 = getelementptr inbounds i32, ptr %tab, i64 %indvars.iv %2 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %cmp = icmp slt i32 %2, %0 %indvars.iv.next = add i64 %indvars.iv, 1 br i1 %cmp, label %while.cond1, label %while.cond5.preheader, !llvm.loop !9 while.cond5.preheader: ; preds = %while.cond1 %arrayidx3.le = getelementptr inbounds i32, ptr %tab, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 %4 = sext i32 %Right.0 to i64 br label %while.cond5 while.cond5: ; preds = %while.cond5, %while.cond5.preheader %indvars.iv56 = phi i64 [ %indvars.iv.next57, %while.cond5 ], [ %4, %while.cond5.preheader ] %arrayidx7 = getelementptr inbounds i32, ptr %tab, i64 %indvars.iv56 %5 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %5, %0 %indvars.iv.next57 = add i64 %indvars.iv56, -1 br i1 %cmp8, label %while.cond5, label %while.end10, !llvm.loop !11 while.end10: ; preds = %while.cond5 %6 = trunc i64 %indvars.iv56 to i32 %cmp11.not = icmp slt i32 %3, %6 br i1 %cmp11.not, label %if.end, label %while.end18 if.end: ; preds = %while.end10 %arrayidx7.le = getelementptr inbounds i32, ptr %tab, i64 %indvars.iv56 store i32 %5, ptr %arrayidx3.le, align 4, !tbaa !5 store i32 %2, ptr %arrayidx7.le, align 4, !tbaa !5 %inc16 = add nsw i32 %3, 1 %dec17 = add nsw i32 %6, -1 br label %while.cond while.end18: ; preds = %while.end10 %sub = add nsw i32 %3, -1 %cmp19 = icmp sgt i32 %sub, %left.tr br i1 %cmp19, label %if.then20, label %if.end22 if.then20: ; preds = %while.end18 tail call void @ft_qsort(ptr noundef nonnull %tab, i32 noundef %left.tr, i32 noundef %sub) br label %if.end22 if.end22: ; preds = %if.then20, %while.end18 %add23 = add nsw i32 %6, 1 %cmp24 = icmp slt i32 %add23, %right br i1 %cmp24, label %tailrecurse, label %if.end27 if.end27: ; preds = %if.end22 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %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 %cmp19 = icmp sgt i32 %3, 0 br i1 %cmp19, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %N, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !12 while.end: ; preds = %while.body, %entry %.lcssa = phi i32 [ %3, %entry ], [ %4, %while.body ] %sub = add nsw i32 %.lcssa, -1 call void @ft_qsort(ptr noundef nonnull %vla, i32 noundef 0, i32 noundef %sub) %6 = load i32, ptr %vla, align 16, !tbaa !5 %conv = sitofp i32 %6 to double %cmp421 = icmp sgt i32 %.lcssa, 1 br i1 %cmp421, label %while.body6.preheader, label %while.end11 while.body6.preheader: ; preds = %while.end %wide.trip.count = zext i32 %.lcssa to i64 %7 = add nsw i64 %wide.trip.count, -1 %8 = add nsw i64 %wide.trip.count, -2 %xtraiter = and i64 %7, 3 %9 = icmp ult i64 %8, 3 br i1 %9, label %while.end11.loopexit.unr-lcssa, label %while.body6.preheader.new while.body6.preheader.new: ; preds = %while.body6.preheader %unroll_iter = and i64 %7, -4 %invariant.gep = getelementptr i32, ptr %vla, i64 1 %invariant.gep35 = getelementptr i32, ptr %vla, i64 2 %invariant.gep37 = getelementptr i32, ptr %vla, i64 3 br label %while.body6 while.body6: ; preds = %while.body6, %while.body6.preheader.new %indvars.iv27 = phi i64 [ 1, %while.body6.preheader.new ], [ %indvars.iv.next28.3, %while.body6 ] %max.023 = phi double [ %conv, %while.body6.preheader.new ], [ %div.3, %while.body6 ] %niter = phi i64 [ 0, %while.body6.preheader.new ], [ %niter.next.3, %while.body6 ] %arrayidx8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv27 %10 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %conv9 = sitofp i32 %10 to double %add = fadd double %max.023, %conv9 %div = fmul double %add, 5.000000e-01 %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv27 %11 = load i32, ptr %gep, align 4, !tbaa !5 %conv9.1 = sitofp i32 %11 to double %add.1 = fadd double %div, %conv9.1 %div.1 = fmul double %add.1, 5.000000e-01 %gep36 = getelementptr i32, ptr %invariant.gep35, i64 %indvars.iv27 %12 = load i32, ptr %gep36, align 4, !tbaa !5 %conv9.2 = sitofp i32 %12 to double %add.2 = fadd double %div.1, %conv9.2 %div.2 = fmul double %add.2, 5.000000e-01 %gep38 = getelementptr i32, ptr %invariant.gep37, i64 %indvars.iv27 %13 = load i32, ptr %gep38, align 4, !tbaa !5 %conv9.3 = sitofp i32 %13 to double %add.3 = fadd double %div.2, %conv9.3 %div.3 = fmul double %add.3, 5.000000e-01 %indvars.iv.next28.3 = add nuw nsw i64 %indvars.iv27, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %while.end11.loopexit.unr-lcssa, label %while.body6, !llvm.loop !13 while.end11.loopexit.unr-lcssa: ; preds = %while.body6, %while.body6.preheader %div.lcssa.ph = phi double [ undef, %while.body6.preheader ], [ %div.3, %while.body6 ] %indvars.iv27.unr = phi i64 [ 1, %while.body6.preheader ], [ %indvars.iv.next28.3, %while.body6 ] %max.023.unr = phi double [ %conv, %while.body6.preheader ], [ %div.3, %while.body6 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %while.end11, label %while.body6.epil while.body6.epil: ; preds = %while.end11.loopexit.unr-lcssa, %while.body6.epil %indvars.iv27.epil = phi i64 [ %indvars.iv.next28.epil, %while.body6.epil ], [ %indvars.iv27.unr, %while.end11.loopexit.unr-lcssa ] %max.023.epil = phi double [ %div.epil, %while.body6.epil ], [ %max.023.unr, %while.end11.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %while.body6.epil ], [ 0, %while.end11.loopexit.unr-lcssa ] %arrayidx8.epil = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv27.epil %14 = load i32, ptr %arrayidx8.epil, align 4, !tbaa !5 %conv9.epil = sitofp i32 %14 to double %add.epil = fadd double %max.023.epil, %conv9.epil %div.epil = fmul double %add.epil, 5.000000e-01 %indvars.iv.next28.epil = add nuw nsw i64 %indvars.iv27.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %while.end11, label %while.body6.epil, !llvm.loop !14 while.end11: ; preds = %while.end11.loopexit.unr-lcssa, %while.body6.epil, %while.end %max.0.lcssa = phi double [ %conv, %while.end ], [ %div.lcssa.ph, %while.end11.loopexit.unr-lcssa ], [ %div.epil, %while.body6.epil ] %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %max.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn } 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} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.unroll.disable"}
#include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #define FOR(i,a,b) for(i=(a);i<(b);i++) #define MIN(x,y) y ^ ((x^y) & -(x<y)) #define MAX(x,y) x ^ ((x^y) & -(x<y)) #define MOD 1000000007 typedef long long ll; typedef unsigned long long ull; int main(){ ll k,m,x,y,z,n,ans; scanf("%I64d%I64d%I64d",&x,&y,&n); ans=0; z=y-x; k=n%3; if(k==0){ m=n/3; if(!(m&1)){ ans-=z; while(ans<0){ ans=ans+MOD; } printf("%I64d\n",ans%MOD); } else{ ans=z; while(ans<0){ ans=ans+MOD; } printf("%I64d\n",ans%MOD); } } else{ m=n/3; if(m&1){ if(k==1) ans-=x; else ans-=y; while(ans<0){ ans=ans+MOD; } printf("%I64d\n",ans%MOD); } else{ if(k==1) ans=x; else ans=y; while(ans<0){ ans=ans+MOD; } printf("%I64d\n",ans%MOD); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13802/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [16 x i8] c"%I64d%I64d%I64d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%I64d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 %y = alloca i64, align 8 %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %n) %0 = load i64, ptr %y, align 8, !tbaa !5 %1 = load i64, ptr %x, align 8, !tbaa !5 %sub = sub i64 %0, %1 %2 = load i64, ptr %n, align 8, !tbaa !5 %rem = srem i64 %2, 3 %cmp = icmp eq i64 %rem, 0 %div = sdiv i64 %2, 3 %and = and i64 %div, 1 %tobool.not = icmp eq i64 %and, 0 br i1 %cmp, label %if.then, label %if.else13 if.then: ; preds = %entry br i1 %tobool.not, label %if.then1, label %while.cond6.preheader while.cond6.preheader: ; preds = %if.then %smax66 = call i64 @llvm.smax.i64(i64 %sub, i64 0) %3 = add i64 %1, %smax66 %4 = icmp ne i64 %3, %0 %umin67 = zext i1 %4 to i64 %5 = add i64 %0, %umin67 %6 = sub i64 %3, %5 %7 = udiv i64 %6, 1000000007 %8 = add nuw nsw i64 %7, %umin67 %9 = mul i64 %8, 1000000007 %10 = add i64 %0, %9 %11 = sub i64 %10, %1 br label %if.end44 if.then1: ; preds = %if.then %sub2 = sub i64 0, %sub %smax68 = call i64 @llvm.smax.i64(i64 %sub2, i64 0) %12 = add i64 %0, %smax68 %13 = icmp ne i64 %12, %1 %umin69 = zext i1 %13 to i64 %14 = add i64 %1, %umin69 %15 = sub i64 %12, %14 %16 = udiv i64 %15, 1000000007 %17 = add nuw nsw i64 %16, %umin69 %18 = mul i64 %17, 1000000007 %19 = add i64 %1, %18 %20 = sub i64 %19, %0 br label %if.end44 if.else13: ; preds = %entry %cmp32 = icmp eq i64 %rem, 1 %.63 = select i1 %cmp32, i64 %1, i64 %0 br i1 %tobool.not, label %if.else31, label %if.then17 if.then17: ; preds = %if.else13 %ans.2 = sub i64 0, %.63 %smax = call i64 @llvm.smax.i64(i64 %ans.2, i64 0) %21 = add i64 %.63, %smax %22 = icmp ne i64 %21, 0 %umin = zext i1 %22 to i64 %23 = sub i64 %21, %umin %24 = udiv i64 %23, 1000000007 %25 = add nuw nsw i64 %24, %umin %26 = mul i64 %25, 1000000007 %27 = sub i64 %26, %.63 br label %if.end44 if.else31: ; preds = %if.else13 %smax64 = call i64 @llvm.smax.i64(i64 %.63, i64 0) %.63.lobit = lshr i64 %.63, 63 %28 = add i64 %.63, %.63.lobit %29 = sub i64 %smax64, %28 %30 = udiv i64 %29, 1000000007 %31 = add nuw nsw i64 %.63.lobit, %30 %32 = mul i64 %31, 1000000007 %33 = add i64 %.63, %32 br label %if.end44 if.end44: ; preds = %if.then17, %if.else31, %if.then1, %while.cond6.preheader %.sink = phi i64 [ %27, %if.then17 ], [ %33, %if.else31 ], [ %20, %if.then1 ], [ %11, %while.cond6.preheader ] %rem29 = urem i64 %.sink, 1000000007 %call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %rem29) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #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 i64 @llvm.smax.i64(i64, i64) #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"}
#include<stdio.h> void swap (int *x, int *y) { int temp; temp = *x; *x = *y; *y = temp; } int partition (int array[], int left, int right) { int i, j, pivot; i = left; j = right + 1; pivot = left; do { do { i++; } while (array[i] < array[pivot]); do { j--; } while (array[pivot] < array[j]); if (i < j) { swap(&array[i], &array[j]); } } while (i < j); swap(&array[pivot], &array[j]); return j; } /* クイックソート */ void quick_sort (int array[], int left, int right) { int pivot; if (left < right) { pivot = partition(array, left, right); quick_sort(array, left, pivot-1); quick_sort(array, pivot+1, right); } } int main(){ int n; scanf("%d ", &n); float in[n],d[n+1]; d[0] = 1; for(int i=0;i<n;i++){ scanf("%f ", &in[i]); d[i+1] = 2*d[i]; } quick_sort(in,0,n-1); float sum = 0; for(int i=0;i<n;i++){ if(i==0||i==1){ sum += in[i]; } else { sum = (in[i])*(d[i-1]) + sum ; } } printf("%f", sum/d[n-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138063/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138063/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d \00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%f \00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #0 { entry: %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @partition(ptr nocapture noundef %array, i32 noundef %left, i32 noundef %right) local_unnamed_addr #2 { entry: %add = add nsw i32 %right, 1 %idxprom2 = sext i32 %left to i64 %arrayidx3 = getelementptr inbounds i32, ptr %array, i64 %idxprom2 br label %do.body do.body: ; preds = %if.then, %entry %j.0 = phi i32 [ %add, %entry ], [ %6, %if.then ] %i.0 = phi i32 [ %left, %entry ], [ %3, %if.then ] %0 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %1 = sext i32 %i.0 to i64 br label %do.body1 do.body1: ; preds = %do.body1, %do.body %indvars.iv = phi i64 [ %indvars.iv.next, %do.body1 ], [ %1, %do.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp = icmp slt i32 %2, %0 br i1 %cmp, label %do.body1, label %do.body4.preheader, !llvm.loop !9 do.body4.preheader: ; preds = %do.body1 %arrayidx.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %3 = trunc i64 %indvars.iv.next to i32 %4 = sext i32 %j.0 to i64 br label %do.body4 do.body4: ; preds = %do.body4.preheader, %do.body4 %indvars.iv49 = phi i64 [ %4, %do.body4.preheader ], [ %indvars.iv.next50, %do.body4 ] %indvars.iv.next50 = add i64 %indvars.iv49, -1 %arrayidx9 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50 %5 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %cmp10 = icmp slt i32 %0, %5 br i1 %cmp10, label %do.body4, label %do.end11, !llvm.loop !11 do.end11: ; preds = %do.body4 %arrayidx9.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50 %6 = trunc i64 %indvars.iv.next50 to i32 %cmp12 = icmp slt i32 %3, %6 br i1 %cmp12, label %if.then, label %do.end19 if.then: ; preds = %do.end11 store i32 %5, ptr %arrayidx.le, align 4, !tbaa !5 store i32 %2, ptr %arrayidx9.le, align 4, !tbaa !5 br label %do.body, !llvm.loop !12 do.end19: ; preds = %do.end11 store i32 %5, ptr %arrayidx3, align 4, !tbaa !5 store i32 %0, ptr %arrayidx9.le, align 4, !tbaa !5 ret i32 %6 } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quick_sort(ptr nocapture noundef %array, i32 noundef %left, i32 noundef %right) local_unnamed_addr #3 { entry: %cmp13 = icmp slt i32 %left, %right br i1 %cmp13, label %if.then.lr.ph, label %if.end if.then.lr.ph: ; preds = %entry %add.i = add nsw i32 %right, 1 br label %if.then if.then: ; preds = %if.then.lr.ph, %partition.exit %left.tr14 = phi i32 [ %left, %if.then.lr.ph ], [ %add, %partition.exit ] %idxprom2.i = sext i32 %left.tr14 to i64 %arrayidx3.i = getelementptr inbounds i32, ptr %array, i64 %idxprom2.i br label %do.body.i do.body.i: ; preds = %if.then.i, %if.then %j.0.i = phi i32 [ %add.i, %if.then ], [ %6, %if.then.i ] %i.0.i = phi i32 [ %left.tr14, %if.then ], [ %5, %if.then.i ] %0 = load i32, ptr %arrayidx3.i, align 4, !tbaa !5 %1 = sext i32 %i.0.i to i64 br label %do.body1.i do.body1.i: ; preds = %do.body1.i, %do.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %do.body1.i ], [ %1, %do.body.i ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %2 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %cmp.i = icmp slt i32 %2, %0 br i1 %cmp.i, label %do.body1.i, label %do.body4.preheader.i, !llvm.loop !9 do.body4.preheader.i: ; preds = %do.body1.i %arrayidx.i.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %3 = sext i32 %j.0.i to i64 br label %do.body4.i do.body4.i: ; preds = %do.body4.i, %do.body4.preheader.i %indvars.iv49.i = phi i64 [ %3, %do.body4.preheader.i ], [ %indvars.iv.next50.i, %do.body4.i ] %indvars.iv.next50.i = add i64 %indvars.iv49.i, -1 %arrayidx9.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50.i %4 = load i32, ptr %arrayidx9.i, align 4, !tbaa !5 %cmp10.i = icmp slt i32 %0, %4 br i1 %cmp10.i, label %do.body4.i, label %do.end11.i, !llvm.loop !11 do.end11.i: ; preds = %do.body4.i %arrayidx9.i.le = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next50.i %5 = trunc i64 %indvars.iv.next.i to i32 %6 = trunc i64 %indvars.iv.next50.i to i32 %cmp12.i = icmp slt i32 %5, %6 br i1 %cmp12.i, label %if.then.i, label %partition.exit if.then.i: ; preds = %do.end11.i store i32 %4, ptr %arrayidx.i.le, align 4, !tbaa !5 store i32 %2, ptr %arrayidx9.i.le, align 4, !tbaa !5 br label %do.body.i, !llvm.loop !12 partition.exit: ; preds = %do.end11.i store i32 %4, ptr %arrayidx3.i, align 4, !tbaa !5 store i32 %0, ptr %arrayidx9.i.le, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 tail call void @quick_sort(ptr noundef nonnull %array, i32 noundef %left.tr14, i32 noundef %sub) %add = add nsw i32 %6, 1 %cmp = icmp slt i32 %add, %right br i1 %cmp, label %if.then, label %if.end if.end: ; preds = %partition.exit, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 %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 float, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %3, 1 %4 = zext i32 %add to i64 %vla1 = alloca float, i64 %4, align 16 store float 1.000000e+00, ptr %vla1, align 16, !tbaa !13 %cmp45 = icmp sgt i32 %3, 0 br i1 %cmp45, label %for.body, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %entry %sub72 = add nsw i32 %3, -1 call void @quick_sort(ptr noundef nonnull %vla, i32 noundef 0, i32 noundef %sub72) br label %for.cond.cleanup12 for.cond.cleanup: ; preds = %for.body %sub = add nsw i32 %11, -1 call void @quick_sort(ptr noundef nonnull %vla, i32 noundef 0, i32 noundef %sub) %cmp1147 = icmp sgt i32 %11, 0 br i1 %cmp1147, label %for.inc25.peel, label %for.cond.cleanup12 for.inc25.peel: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %11 to i64 %5 = load float, ptr %vla, align 16, !tbaa !13 %add18.peel = fadd float %5, 0.000000e+00 %exitcond.peel.not = icmp eq i32 %11, 1 br i1 %exitcond.peel.not, label %for.cond.cleanup12, label %for.inc25.peel66 for.inc25.peel66: ; preds = %for.inc25.peel %arrayidx17.peel64 = getelementptr inbounds float, ptr %vla, i64 1 %6 = load float, ptr %arrayidx17.peel64, align 4, !tbaa !13 %add18.peel65 = fadd float %add18.peel, %6 %exitcond.peel69.not = icmp eq i32 %11, 2 br i1 %exitcond.peel69.not, label %for.cond.cleanup12, label %for.body13.peel.next57 for.body13.peel.next57: ; preds = %for.inc25.peel66 %invariant.gep = getelementptr float, ptr %vla1, i64 -1 %7 = add nsw i64 %wide.trip.count, -2 %8 = add nsw i64 %wide.trip.count, -3 %xtraiter = and i64 %7, 3 %9 = icmp ult i64 %8, 3 br i1 %9, label %for.cond.cleanup12.loopexit.unr-lcssa, label %for.body13.peel.next57.new for.body13.peel.next57.new: ; preds = %for.body13.peel.next57 %unroll_iter = and i64 %7, -4 br label %for.inc25 for.body: ; preds = %entry, %for.body %10 = phi float [ %mul, %for.body ], [ 1.000000e+00, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx2 = getelementptr inbounds float, ptr %vla, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx2) %mul = fmul float %10, 2.000000e+00 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx8 = getelementptr inbounds float, ptr %vla1, i64 %indvars.iv.next store float %mul, ptr %arrayidx8, align 4, !tbaa !13 %11 = load i32, ptr %n, align 4, !tbaa !5 %12 = sext i32 %11 to i64 %cmp = icmp slt i64 %indvars.iv.next, %12 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !15 for.cond.cleanup12.loopexit.unr-lcssa: ; preds = %for.inc25, %for.body13.peel.next57 %.lcssa.ph = phi float [ undef, %for.body13.peel.next57 ], [ %28, %for.inc25 ] %indvars.iv53.unr = phi i64 [ 2, %for.body13.peel.next57 ], [ %indvars.iv.next54.3, %for.inc25 ] %sum.048.unr = phi float [ %add18.peel65, %for.body13.peel.next57 ], [ %28, %for.inc25 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup12, label %for.inc25.epil for.inc25.epil: ; preds = %for.cond.cleanup12.loopexit.unr-lcssa, %for.inc25.epil %indvars.iv53.epil = phi i64 [ %indvars.iv.next54.epil, %for.inc25.epil ], [ %indvars.iv53.unr, %for.cond.cleanup12.loopexit.unr-lcssa ] %sum.048.epil = phi float [ %15, %for.inc25.epil ], [ %sum.048.unr, %for.cond.cleanup12.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.inc25.epil ], [ 0, %for.cond.cleanup12.loopexit.unr-lcssa ] %arrayidx20.epil = getelementptr inbounds float, ptr %vla, i64 %indvars.iv53.epil %13 = load float, ptr %arrayidx20.epil, align 4, !tbaa !13 %gep.epil = getelementptr float, ptr %invariant.gep, i64 %indvars.iv53.epil %14 = load float, ptr %gep.epil, align 4, !tbaa !13 %15 = call float @llvm.fmuladd.f32(float %13, float %14, float %sum.048.epil) %indvars.iv.next54.epil = add nuw nsw i64 %indvars.iv53.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup12, label %for.inc25.epil, !llvm.loop !16 for.cond.cleanup12: ; preds = %for.cond.cleanup12.loopexit.unr-lcssa, %for.inc25.epil, %for.inc25.peel, %for.inc25.peel66, %for.cond.cleanup.thread, %for.cond.cleanup %sub74 = phi i32 [ %sub, %for.cond.cleanup ], [ %sub72, %for.cond.cleanup.thread ], [ 1, %for.inc25.peel66 ], [ 0, %for.inc25.peel ], [ %sub, %for.inc25.epil ], [ %sub, %for.cond.cleanup12.loopexit.unr-lcssa ] %sum.0.lcssa = phi float [ 0.000000e+00, %for.cond.cleanup ], [ 0.000000e+00, %for.cond.cleanup.thread ], [ %add18.peel65, %for.inc25.peel66 ], [ %add18.peel, %for.inc25.peel ], [ %.lcssa.ph, %for.cond.cleanup12.loopexit.unr-lcssa ], [ %15, %for.inc25.epil ] %idxprom29 = sext i32 %sub74 to i64 %arrayidx30 = getelementptr inbounds float, ptr %vla1, i64 %idxprom29 %16 = load float, ptr %arrayidx30, align 4, !tbaa !13 %div = fdiv float %sum.0.lcssa, %16 %conv = fpext float %div to double %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %conv) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 for.inc25: ; preds = %for.inc25, %for.body13.peel.next57.new %indvars.iv53 = phi i64 [ 2, %for.body13.peel.next57.new ], [ %indvars.iv.next54.3, %for.inc25 ] %sum.048 = phi float [ %add18.peel65, %for.body13.peel.next57.new ], [ %28, %for.inc25 ] %niter = phi i64 [ 0, %for.body13.peel.next57.new ], [ %niter.next.3, %for.inc25 ] %arrayidx20 = getelementptr inbounds float, ptr %vla, i64 %indvars.iv53 %17 = load float, ptr %arrayidx20, align 8, !tbaa !13 %gep = getelementptr float, ptr %invariant.gep, i64 %indvars.iv53 %18 = load float, ptr %gep, align 4, !tbaa !13 %19 = call float @llvm.fmuladd.f32(float %17, float %18, float %sum.048) %indvars.iv.next54 = or i64 %indvars.iv53, 1 %arrayidx20.1 = getelementptr inbounds float, ptr %vla, i64 %indvars.iv.next54 %20 = load float, ptr %arrayidx20.1, align 4, !tbaa !13 %gep.1 = getelementptr float, ptr %invariant.gep, i64 %indvars.iv.next54 %21 = load float, ptr %gep.1, align 8, !tbaa !13 %22 = call float @llvm.fmuladd.f32(float %20, float %21, float %19) %indvars.iv.next54.1 = add nuw nsw i64 %indvars.iv53, 2 %arrayidx20.2 = getelementptr inbounds float, ptr %vla, i64 %indvars.iv.next54.1 %23 = load float, ptr %arrayidx20.2, align 8, !tbaa !13 %gep.2 = getelementptr float, ptr %invariant.gep, i64 %indvars.iv.next54.1 %24 = load float, ptr %gep.2, align 4, !tbaa !13 %25 = call float @llvm.fmuladd.f32(float %23, float %24, float %22) %indvars.iv.next54.2 = add nuw nsw i64 %indvars.iv53, 3 %arrayidx20.3 = getelementptr inbounds float, ptr %vla, i64 %indvars.iv.next54.2 %26 = load float, ptr %arrayidx20.3, align 4, !tbaa !13 %gep.3 = getelementptr float, ptr %invariant.gep, i64 %indvars.iv.next54.2 %27 = load float, ptr %gep.3, align 8, !tbaa !13 %28 = call float @llvm.fmuladd.f32(float %26, float %27, float %25) %indvars.iv.next54.3 = add nuw nsw i64 %indvars.iv53, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup12.loopexit.unr-lcssa, label %for.inc25, !llvm.loop !18 } ; 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: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare float @llvm.fmuladd.f32(float, float, float) #7 ; 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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 #3 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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 = !{!14, !14, i64 0} !14 = !{!"float", !7, i64 0} !15 = distinct !{!15, !10} !16 = distinct !{!16, !17} !17 = !{!"llvm.loop.unroll.disable"} !18 = distinct !{!18, !10, !19} !19 = !{!"llvm.loop.peeled.count", i32 2}
#include <stdio.h> int main() { int a,i,b,k,d; float sum=0.0; int c[100]; scanf("%d",&a); for(i=0;i<a;i++) { scanf("%d",&c[i]); } for(i=0;i<a-1;i++) { for(b=i+1;b<a;b++) { if(c[i]>c[b]) { k=c[i]; c[i]=c[b]; c[b]=k; } } } if(a==2) sum=(c[0]+c[1])/2.0; else { sum=(c[0]+c[1])/2.0; for(i=2;i<a;i++) sum=(sum+c[i])/2.0; } printf("%f",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138106/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138106/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %c = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp73 = icmp sgt i32 %0, 0 br i1 %cmp73, label %for.body, label %if.else for.cond2.preheader: ; preds = %for.body %cmp377 = icmp sgt i32 %2, 1 br i1 %cmp377, label %for.body4.preheader, label %if.else for.body4.preheader: ; preds = %for.cond2.preheader %sub = add nsw i32 %2, -1 %1 = zext i32 %2 to i64 %wide.trip.count95 = zext i32 %sub to i64 %wide.trip.count = zext i32 %2 to i64 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %a, 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.cond2.preheader, !llvm.loop !9 for.cond2.loopexit: ; preds = %for.inc21, %for.body4 %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1 %exitcond96.not = icmp eq i64 %indvars.iv.next93, %wide.trip.count95 br i1 %exitcond96.not, label %for.end26, label %for.body4, !llvm.loop !11 for.body4: ; preds = %for.body4.preheader, %for.cond2.loopexit %indvars.iv92 = phi i64 [ 0, %for.body4.preheader ], [ %indvars.iv.next93, %for.cond2.loopexit ] %indvars.iv87 = phi i64 [ 1, %for.body4.preheader ], [ %indvars.iv.next88, %for.cond2.loopexit ] %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1 %cmp675 = icmp ult i64 %indvars.iv.next93, %1 br i1 %cmp675, label %for.body7.lr.ph, label %for.cond2.loopexit for.body7.lr.ph: ; preds = %for.body4 %arrayidx9 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv92 br label %for.body7 for.body7: ; preds = %for.body7.lr.ph, %for.inc21 %indvars.iv89 = phi i64 [ %indvars.iv87, %for.body7.lr.ph ], [ %indvars.iv.next90, %for.inc21 ] %4 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %arrayidx11 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv89 %5 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %4, %5 br i1 %cmp12, label %if.then, label %for.inc21 if.then: ; preds = %for.body7 store i32 %5, ptr %arrayidx9, align 4, !tbaa !5 store i32 %4, ptr %arrayidx11, align 4, !tbaa !5 br label %for.inc21 for.inc21: ; preds = %for.body7, %if.then %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.cond2.loopexit, label %for.body7, !llvm.loop !12 for.end26: ; preds = %for.cond2.loopexit %cmp27 = icmp eq i32 %2, 2 br i1 %cmp27, label %if.then28, label %if.else if.then28: ; preds = %for.end26 %6 = load i32, ptr %c, align 16, !tbaa !5 %arrayidx30 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 1 %7 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %add31 = add nsw i32 %7, %6 %conv = sitofp i32 %add31 to double %div = fmul double %conv, 5.000000e-01 %conv32 = fptrunc double %div to float br label %if.end53 if.else: ; preds = %entry, %for.cond2.preheader, %for.end26 %.lcssa104107 = phi i32 [ %2, %for.end26 ], [ %2, %for.cond2.preheader ], [ %0, %entry ] %8 = load i32, ptr %c, align 16, !tbaa !5 %arrayidx34 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 1 %9 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %add35 = add nsw i32 %9, %8 %conv36 = sitofp i32 %add35 to double %sum.0.in79 = fmul double %conv36, 5.000000e-01 %sum.080 = fptrunc double %sum.0.in79 to float %cmp4081 = icmp sgt i32 %.lcssa104107, 2 br i1 %cmp4081, label %for.body42.preheader, label %if.end53 for.body42.preheader: ; preds = %if.else %wide.trip.count100 = zext i32 %.lcssa104107 to i64 %10 = add nsw i64 %wide.trip.count100, -2 %11 = add nsw i64 %wide.trip.count100, -3 %xtraiter = and i64 %10, 3 %12 = icmp ult i64 %11, 3 br i1 %12, label %if.end53.loopexit.unr-lcssa, label %for.body42.preheader.new for.body42.preheader.new: ; preds = %for.body42.preheader %unroll_iter = and i64 %10, -4 br label %for.body42 for.body42: ; preds = %for.body42, %for.body42.preheader.new %indvars.iv97 = phi i64 [ 2, %for.body42.preheader.new ], [ %indvars.iv.next98.3, %for.body42 ] %sum.083 = phi float [ %sum.080, %for.body42.preheader.new ], [ %sum.0.3, %for.body42 ] %niter = phi i64 [ 0, %for.body42.preheader.new ], [ %niter.next.3, %for.body42 ] %arrayidx44 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv97 %13 = load i32, ptr %arrayidx44, align 8, !tbaa !5 %conv45 = sitofp i32 %13 to float %add46 = fadd float %sum.083, %conv45 %indvars.iv.next98 = or i64 %indvars.iv97, 1 %sum.0 = fmul float %add46, 5.000000e-01 %arrayidx44.1 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv.next98 %14 = load i32, ptr %arrayidx44.1, align 4, !tbaa !5 %conv45.1 = sitofp i32 %14 to float %add46.1 = fadd float %sum.0, %conv45.1 %indvars.iv.next98.1 = add nuw nsw i64 %indvars.iv97, 2 %sum.0.1 = fmul float %add46.1, 5.000000e-01 %arrayidx44.2 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv.next98.1 %15 = load i32, ptr %arrayidx44.2, align 8, !tbaa !5 %conv45.2 = sitofp i32 %15 to float %add46.2 = fadd float %sum.0.1, %conv45.2 %indvars.iv.next98.2 = add nuw nsw i64 %indvars.iv97, 3 %sum.0.2 = fmul float %add46.2, 5.000000e-01 %arrayidx44.3 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv.next98.2 %16 = load i32, ptr %arrayidx44.3, align 4, !tbaa !5 %conv45.3 = sitofp i32 %16 to float %add46.3 = fadd float %sum.0.2, %conv45.3 %indvars.iv.next98.3 = add nuw nsw i64 %indvars.iv97, 4 %sum.0.3 = fmul float %add46.3, 5.000000e-01 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %if.end53.loopexit.unr-lcssa, label %for.body42, !llvm.loop !13 if.end53.loopexit.unr-lcssa: ; preds = %for.body42, %for.body42.preheader %sum.0.lcssa.ph = phi float [ undef, %for.body42.preheader ], [ %sum.0.3, %for.body42 ] %indvars.iv97.unr = phi i64 [ 2, %for.body42.preheader ], [ %indvars.iv.next98.3, %for.body42 ] %sum.083.unr = phi float [ %sum.080, %for.body42.preheader ], [ %sum.0.3, %for.body42 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %if.end53, label %for.body42.epil for.body42.epil: ; preds = %if.end53.loopexit.unr-lcssa, %for.body42.epil %indvars.iv97.epil = phi i64 [ %indvars.iv.next98.epil, %for.body42.epil ], [ %indvars.iv97.unr, %if.end53.loopexit.unr-lcssa ] %sum.083.epil = phi float [ %sum.0.epil, %for.body42.epil ], [ %sum.083.unr, %if.end53.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body42.epil ], [ 0, %if.end53.loopexit.unr-lcssa ] %arrayidx44.epil = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv97.epil %17 = load i32, ptr %arrayidx44.epil, align 4, !tbaa !5 %conv45.epil = sitofp i32 %17 to float %add46.epil = fadd float %sum.083.epil, %conv45.epil %indvars.iv.next98.epil = add nuw nsw i64 %indvars.iv97.epil, 1 %sum.0.epil = fmul float %add46.epil, 5.000000e-01 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %if.end53, label %for.body42.epil, !llvm.loop !14 if.end53: ; preds = %if.end53.loopexit.unr-lcssa, %for.body42.epil, %if.else, %if.then28 %sum.1 = phi float [ %conv32, %if.then28 ], [ %sum.080, %if.else ], [ %sum.0.lcssa.ph, %if.end53.loopexit.unr-lcssa ], [ %sum.0.epil, %for.body42.epil ] %conv54 = fpext float %sum.1 to double %call55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %conv54) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.unroll.disable"}
#include<stdio.h> int main() { long long int x,y,n,i,j,k,div3,div2,ans,answer,dove; scanf("%I64d%I64d",&x,&y); scanf("%I64d",&n); if(n%3==0) div3=n/3; else div3=n/3 + 1; div2 = div3%2; dove = n%3; if(div2==1) { if(dove==1) { ans=x; } else if(dove==2) { ans=y; } else if(dove==0) { ans=y-x; } } else { if(dove==1) { ans=-x; } else if(dove==2) { ans=-y; } else if(dove==0) { ans=x-y; } } answer = ans%1000000007; if(answer<0)answer+=1000000007; printf("%I64d\n",answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13815/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13815/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%I64d%I64d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%I64d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%I64d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 %y = alloca i64, align 8 %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %rem = srem i64 %0, 3 %cmp = icmp ne i64 %rem, 0 %div = sdiv i64 %0, 3 %add = zext i1 %cmp to i64 %div3.0 = add nsw i64 %div, %add %1 = and i64 %div3.0, -9223372036854775807 %cmp7 = icmp eq i64 %1, 1 br i1 %cmp7, label %if.then8, label %if.else20 if.then8: ; preds = %entry switch i64 %rem, label %if.end35 [ i64 1, label %if.then10 i64 2, label %if.then13 i64 0, label %if.then16 ] if.then10: ; preds = %if.then8 %2 = load i64, ptr %x, align 8, !tbaa !5 br label %if.end35 if.then13: ; preds = %if.then8 %3 = load i64, ptr %y, align 8, !tbaa !5 br label %if.end35 if.then16: ; preds = %if.then8 %4 = load i64, ptr %y, align 8, !tbaa !5 %5 = load i64, ptr %x, align 8, !tbaa !5 %sub = sub nsw i64 %4, %5 br label %if.end35 if.else20: ; preds = %entry switch i64 %rem, label %if.end35 [ i64 1, label %if.then22 i64 2, label %if.then26 i64 0, label %if.then30 ] if.then22: ; preds = %if.else20 %6 = load i64, ptr %x, align 8, !tbaa !5 %sub23 = sub nsw i64 0, %6 br label %if.end35 if.then26: ; preds = %if.else20 %7 = load i64, ptr %y, align 8, !tbaa !5 %sub27 = sub nsw i64 0, %7 br label %if.end35 if.then30: ; preds = %if.else20 %8 = load i64, ptr %x, align 8, !tbaa !5 %9 = load i64, ptr %y, align 8, !tbaa !5 %sub31 = sub nsw i64 %8, %9 br label %if.end35 if.end35: ; preds = %if.else20, %if.then8, %if.then22, %if.then30, %if.then26, %if.then10, %if.then16, %if.then13 %ans.0 = phi i64 [ %2, %if.then10 ], [ %3, %if.then13 ], [ %sub, %if.then16 ], [ %sub23, %if.then22 ], [ %sub27, %if.then26 ], [ %sub31, %if.then30 ], [ undef, %if.then8 ], [ undef, %if.else20 ] %rem36 = srem i64 %ans.0, 1000000007 %cmp37 = icmp slt i64 %rem36, 0 %add39 = add nsw i64 %rem36, 1000000007 %spec.select = select i1 %cmp37, i64 %add39, i64 %rem36 %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %spec.select) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) #define repp(i,l,r,k)for(ll i=(l);i<(r);i+=(k)) #define INF ((1LL<<62)-(1LL<<31)) #define max(p,q)((p)>(q)?(p):(q)) #define min(p,q)((p)<(q)?(p):(q)) #define bit(n,m)(((n)>>(m))&1) int upll(const void*a, const void*b){return*(ll*)a<*(ll*)b?-1:*(ll*)a>*(ll*)b?1:0;} int downll(const void*a, const void*b){return*(ll*)a<*(ll*)b?1:*(ll*)a>*(ll*)b?-1:0;} void sortup(ll*a,int n){qsort(a,n,sizeof(ll),upll);} void sortdown(ll*a,int n){qsort(a,n,sizeof(ll),downll);} ll pom(ll a,ll n,int m){ll x=1;for(a%=m;n;n/=2)n&1?x=x*a%m:0,a=a*a%m;return x;} //#define MOD 998244353 #define MOD 1000000007 #define invp(a,p)pom(a,p-2,p) ll a[99]; int main(){ int n; scanf("%d",&n); rep(i,0,n)scanf("%lld",a+i); sortdown(a,n); double s=0; rep(i,0,n)s+=a[i]*pow(2,-i-1); s+=a[n-1]*pow(2,-n); printf("%.9f",s); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138193/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138193/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @a = dso_local global [99 x i64] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [5 x i8] c"%.9f\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @upll(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp sgt i64 %0, %1 %cond = zext i1 %cmp1 to i32 %cond2 = select i1 %cmp, i32 -1, i32 %cond ret i32 %cond2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @downll(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp sgt i64 %0, %1 %cond = sext i1 %cmp1 to i32 %cond2 = select i1 %cmp, i32 1, i32 %cond ret i32 %cond2 } ; Function Attrs: nofree nounwind uwtable define dso_local void @sortup(ptr noundef %a, i32 noundef %n) local_unnamed_addr #1 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @upll) #9 ret void } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @sortdown(ptr noundef %a, i32 noundef %n) local_unnamed_addr #1 { entry: %conv = sext i32 %n to i64 tail call void @qsort(ptr noundef %a, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @downll) #9 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @pom(i64 noundef %a, i64 noundef %n, i32 noundef %m) local_unnamed_addr #3 { entry: %conv = sext i32 %m to i64 %tobool.not16 = icmp eq i64 %n, 0 br i1 %tobool.not16, label %for.end, label %for.body for.body: ; preds = %entry, %cond.end %mul4.pn = phi i64 [ %mul4, %cond.end ], [ %a, %entry ] %x.018 = phi i64 [ %x.1, %cond.end ], [ 1, %entry ] %n.addr.017 = phi i64 [ %div, %cond.end ], [ %n, %entry ] %a.addr.019 = srem i64 %mul4.pn, %conv %and = and i64 %n.addr.017, 1 %tobool1.not = icmp eq i64 %and, 0 br i1 %tobool1.not, label %cond.end, label %cond.true cond.true: ; preds = %for.body %mul = mul nsw i64 %a.addr.019, %x.018 %rem3 = srem i64 %mul, %conv br label %cond.end cond.end: ; preds = %for.body, %cond.true %x.1 = phi i64 [ %rem3, %cond.true ], [ %x.018, %for.body ] %mul4 = mul nsw i64 %a.addr.019, %a.addr.019 %div = sdiv i64 %n.addr.017, 2 %n.addr.017.off = add i64 %n.addr.017, 1 %tobool.not = icmp ult i64 %n.addr.017.off, 3 br i1 %tobool.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %cond.end, %entry %x.0.lcssa = phi i64 [ 1, %entry ], [ %x.1, %cond.end ] ret i64 %x.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !11 %conv31 = sext i32 %0 to i64 %cmp32 = icmp sgt i32 %0, 0 br i1 %cmp32, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %conv.lcssa = phi i64 [ %conv31, %entry ], [ %conv, %for.body ] call void @qsort(ptr noundef nonnull @a, i64 noundef %conv.lcssa, i64 noundef 8, ptr noundef nonnull @downll) #9 %1 = load i32, ptr %n, align 4, !tbaa !11 %cmp635 = icmp sgt i32 %1, 0 br i1 %cmp635, label %for.body9, label %for.cond.cleanup8 for.body: ; preds = %entry, %for.body %i.033 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i64, ptr @a, i64 %i.033 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr) %inc = add nuw nsw i64 %i.033, 1 %2 = load i32, ptr %n, align 4, !tbaa !11 %conv = sext i32 %2 to i64 %cmp = icmp slt i64 %inc, %conv br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13 for.cond.cleanup8: ; preds = %for.body9, %for.cond.cleanup %s.0.lcssa = phi double [ 0.000000e+00, %for.cond.cleanup ], [ %6, %for.body9 ] %.lcssa = phi i32 [ %1, %for.cond.cleanup ], [ %7, %for.body9 ] %sub17 = add nsw i32 %.lcssa, -1 %idxprom = sext i32 %sub17 to i64 %arrayidx18 = getelementptr inbounds [99 x i64], ptr @a, i64 0, i64 %idxprom %3 = load i64, ptr %arrayidx18, align 8, !tbaa !5 %conv19 = sitofp i64 %3 to double %sub20 = sub nsw i32 0, %.lcssa %ldexp = call double @ldexp(double 1.000000e+00, i32 %sub20) #9 %4 = call double @llvm.fmuladd.f64(double %conv19, double %ldexp, double %s.0.lcssa) %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #9 ret i32 0 for.body9: ; preds = %for.cond.cleanup, %for.body9 %i3.037 = phi i64 [ %inc15, %for.body9 ], [ 0, %for.cond.cleanup ] %s.036 = phi double [ %6, %for.body9 ], [ 0.000000e+00, %for.cond.cleanup ] %arrayidx = getelementptr inbounds [99 x i64], ptr @a, i64 0, i64 %i3.037 %5 = load i64, ptr %arrayidx, align 8, !tbaa !5 %conv10 = sitofp i64 %5 to double %sub11 = xor i64 %i3.037, -1 %conv12 = sitofp i64 %sub11 to double %exp2 = call double @exp2(double %conv12) #9 %6 = call double @llvm.fmuladd.f64(double %conv10, double %exp2, double %s.036) %inc15 = add nuw nsw i64 %i3.037, 1 %7 = load i32, ptr %n, align 4, !tbaa !11 %conv5 = sext i32 %7 to i64 %cmp6 = icmp slt i64 %inc15, %conv5 br i1 %cmp6, label %for.body9, label %for.cond.cleanup8, !llvm.loop !14 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #7 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree willreturn declare double @ldexp(double, i32) local_unnamed_addr #8 declare double @exp2(double) local_unnamed_addr attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #5 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nofree willreturn } attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!12, !12, i64 0} !12 = !{!"int", !7, i64 0} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#include<stdio.h> #include<string.h> #include<math.h> #include<stdlib.h> #include<limits.h> #define rep(i,begin,end) for(int i=begin; i<end; i++) int main(){ int n, m; scanf("%d %d", &n, &m); int a[n], b[n], c[m+1], d[m+1]; int ans[n]; rep(i, 0, n){ scanf("%d %d", &a[i], &b[i]); } rep(i, 1, m+1){ scanf("%d %d", &c[i], &d[i]); } rep(i, 0, n){ int x = 500000000; rep(j, 1, m+1){ int len = abs(c[j] - a[i]) + abs(d[j] - b[i]); if(len < x){ x = len; ans[i] = j; } } } rep(i, 0, n){ printf("%d\n", ans[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138236/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138236/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 %5 = load i32, ptr %m, align 4, !tbaa !5 %add = add nsw i32 %5, 1 %6 = zext i32 %add to i64 %vla2 = alloca i32, i64 %6, align 16 %vla4 = alloca i32, i64 %6, align 16 %vla5 = alloca i32, i64 %4, align 16 %cmp80 = icmp sgt i32 %3, 0 br i1 %cmp80, label %for.body, label %for.cond10.preheader for.cond10.preheader.loopexit: ; preds = %for.body %.pre = load i32, ptr %m, align 4, !tbaa !5 br label %for.cond10.preheader for.cond10.preheader: ; preds = %for.cond10.preheader.loopexit, %entry %7 = phi i32 [ %9, %for.cond10.preheader.loopexit ], [ %3, %entry ] %8 = phi i32 [ %.pre, %for.cond10.preheader.loopexit ], [ %5, %entry ] %cmp12.not82 = icmp slt i32 %8, 1 br i1 %cmp12.not82, label %for.cond24.preheader, label %for.body14 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 %arrayidx7 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx7) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %9 = load i32, ptr %n, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp = icmp slt i64 %indvars.iv.next, %10 br i1 %cmp, label %for.body, label %for.cond10.preheader.loopexit, !llvm.loop !9 for.cond24.preheader.loopexit: ; preds = %for.body14 %.pre108 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond24.preheader for.cond24.preheader: ; preds = %for.cond24.preheader.loopexit, %for.cond10.preheader %11 = phi i32 [ %7, %for.cond10.preheader ], [ %.pre108, %for.cond24.preheader.loopexit ] %.lcssa = phi i32 [ %8, %for.cond10.preheader ], [ %13, %for.cond24.preheader.loopexit ] %cmp2587 = icmp sgt i32 %11, 0 br i1 %cmp2587, label %for.cond28.preheader.lr.ph, label %for.cond.cleanup55 for.cond28.preheader.lr.ph: ; preds = %for.cond24.preheader %cmp30.not84 = icmp slt i32 %.lcssa, 1 br i1 %cmp30.not84, label %for.body56.preheader, label %for.cond28.preheader.preheader for.cond28.preheader.preheader: ; preds = %for.cond28.preheader.lr.ph %12 = add nuw i32 %.lcssa, 1 %wide.trip.count103 = zext i32 %11 to i64 %wide.trip.count = zext i32 %12 to i64 br label %for.cond28.preheader for.body14: ; preds = %for.cond10.preheader, %for.body14 %indvars.iv94 = phi i64 [ %indvars.iv.next95, %for.body14 ], [ 1, %for.cond10.preheader ] %arrayidx16 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv94 %arrayidx18 = getelementptr inbounds i32, ptr %vla4, i64 %indvars.iv94 %call19 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx16, ptr noundef nonnull %arrayidx18) %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 %13 = load i32, ptr %m, align 4, !tbaa !5 %14 = sext i32 %13 to i64 %cmp12.not.not = icmp slt i64 %indvars.iv94, %14 br i1 %cmp12.not.not, label %for.body14, label %for.cond24.preheader.loopexit, !llvm.loop !11 for.cond28.preheader: ; preds = %for.cond28.preheader.preheader, %for.cond28.for.cond.cleanup31_crit_edge %indvars.iv100 = phi i64 [ 0, %for.cond28.preheader.preheader ], [ %indvars.iv.next101, %for.cond28.for.cond.cleanup31_crit_edge ] %arrayidx36 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv100 %15 = load i32, ptr %arrayidx36, align 4, !tbaa !5 %arrayidx40 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv100 %16 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %arrayidx45 = getelementptr inbounds i32, ptr %vla5, i64 %indvars.iv100 br label %for.body32 for.cond53.preheader: ; preds = %for.cond28.for.cond.cleanup31_crit_edge br i1 %cmp2587, label %for.body56.preheader, label %for.cond.cleanup55 for.body56.preheader: ; preds = %for.cond28.preheader.lr.ph, %for.cond53.preheader br label %for.body56 for.cond28.for.cond.cleanup31_crit_edge: ; preds = %if.end %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1 %exitcond104.not = icmp eq i64 %indvars.iv.next101, %wide.trip.count103 br i1 %exitcond104.not, label %for.cond53.preheader, label %for.cond28.preheader, !llvm.loop !12 for.body32: ; preds = %for.cond28.preheader, %if.end %indvars.iv97 = phi i64 [ 1, %for.cond28.preheader ], [ %indvars.iv.next98, %if.end ] %x.085 = phi i32 [ 500000000, %for.cond28.preheader ], [ %x.1, %if.end ] %arrayidx34 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv97 %17 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %sub = sub nsw i32 %17, %15 %18 = call i32 @llvm.abs.i32(i32 %sub, i1 true) %arrayidx38 = getelementptr inbounds i32, ptr %vla4, i64 %indvars.iv97 %19 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %sub41 = sub nsw i32 %19, %16 %20 = call i32 @llvm.abs.i32(i32 %sub41, i1 true) %add42 = add nuw nsw i32 %20, %18 %cmp43 = icmp slt i32 %add42, %x.085 br i1 %cmp43, label %if.then, label %if.end if.then: ; preds = %for.body32 %21 = trunc i64 %indvars.iv97 to i32 store i32 %21, ptr %arrayidx45, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %for.body32 %x.1 = phi i32 [ %add42, %if.then ], [ %x.085, %for.body32 ] %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1 %exitcond.not = icmp eq i64 %indvars.iv.next98, %wide.trip.count br i1 %exitcond.not, label %for.cond28.for.cond.cleanup31_crit_edge, label %for.body32, !llvm.loop !13 for.cond.cleanup55: ; preds = %for.body56, %for.cond24.preheader, %for.cond53.preheader call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 for.body56: ; preds = %for.body56.preheader, %for.body56 %indvars.iv105 = phi i64 [ %indvars.iv.next106, %for.body56 ], [ 0, %for.body56.preheader ] %arrayidx58 = getelementptr inbounds i32, ptr %vla5, i64 %indvars.iv105 %22 = load i32, ptr %arrayidx58, align 4, !tbaa !5 %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %22) %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1 %23 = load i32, ptr %n, align 4, !tbaa !5 %24 = sext i32 %23 to i64 %cmp54 = icmp slt i64 %indvars.iv.next106, %24 br i1 %cmp54, label %for.body56, label %for.cond.cleanup55, !llvm.loop !14 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { mustprogress nocallback nofree 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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#define _USE_MATH_DEFINES #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <limits.h> #include <stdbool.h> #define inf (INT_MAX-1) #define INF 9223372036854775807 #define PI 3.14159265358979323846; #define EPS 1e-10 #define sq(n) ((n)*(n)) #define rep(i,n) for(i=0;i<n;i++) #define rev(i,n) for(i=n-1;i>=0;i--) /* #define sort(a,n) qsort(a,n,sizeof(TYPE),cmp) #define sort_r(a,n) qsort(a,n,sizeof(TYPE),cmp_r) */ #define chsort(s,n) qsort(s,n,sizeof(char),cmp) #define chsort_r(s,n) qsort(s,n,sizeof(char),char_cmp_r) #define TYPE long long #define ll long long #define MEMSET(a) memset(a,0,sizeof(a)) #define MEMSET_U(a) memset(a,-1,sizeof(a)) #define bool _Bool const int mod = (int)1e09 + 7; //#define DEBUG1 //#define DEBUG2 //#define DEBUGF #define DUMMY int in(void) { int i; scanf("%d", &i); return i; } long long llin(void) { long long i; scanf("%lld", &i); return i; } double din(void) { double i; scanf("%lf", &i); return i; } void chin(char s[]) { scanf("%s", s); } void print(int a) { printf("%d\n", a); } void llprint(long long a) { printf("%lld\n", a); } void dprint(double a) { printf("%.10f\n", a); } void print2(int a, int b) { printf("%d %d\n", a, b); } int Max(int a, int b) { if (a > b) { return a; }return b; } int Min(int a, int b) { if (a < b) { return a; }return b; } long long llmax(long long a, long long b) { return a > b ? a : b; } long long llmin(long long a, long long b) { return a < b ? a : b; } double dmax(double a, double b) { return a > b ? a : b; } double dmin(double a, double b) { return a < b ? a : b; } //long long llmax(long long a, long long b) { return a > b ? a : b; } //long long llmin(long long a, long long b) { return a < b ? a : b; } //double dmax(double a, double b) { return a > b ? a : b; } int cmp(const void *a, const void *b) { return *(TYPE *)a - *(TYPE *)b; } int cmp_r(const void *a, const void *b) { return *(TYPE *)b - *(TYPE *)a; } int char_cmp(const void *a, const void *b) { return strcmp((char *)a, (char *)b); } int char_cmp_r(const void *a, const void *b) { return strcmp((char *)b, (char *)a); } void swap(int *a, int *b) { int t = *a; *a = *b; *b = t; } int main() { int N, M; int A[50], B[50], C[50], D[50]; int i, j; int dis = 1000000000; int ner, num[50] = {0}; scanf("%d%d", &N, &M); for (i = 0; i < N; i++) { scanf("%d%d", &A[i], &B[i]); } for (j = 0; j < M; j++) { scanf("%d%d", &C[j], &D[j]); } int f[50][50]; for (i = 0; i < N; i++) { ner = dis; for (j = 0; j < M; j++) { f[i][j] = abs(A[i] - C[j]) + abs(B[i] - D[j]); if (ner > f[i][j]) { ner = f[i][j]; num[i] = j + 1; } } } for (i = 0; i < N; i++) { printf("%d\n", num[i]); } #ifdef DEBUGF getch(); #endif return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @mod = dso_local local_unnamed_addr constant i32 1000000007, align 4 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%lf\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @.str.6 = private unnamed_addr constant [7 x i8] c"%.10f\0A\00", align 1 @.str.7 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.8 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @in() local_unnamed_addr #0 { entry: %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %i, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #12 ret i32 %0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i64 @llin() local_unnamed_addr #0 { entry: %i = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %i) %0 = load i64, ptr %i, align 8, !tbaa !9 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #12 ret i64 %0 } ; Function Attrs: nofree nounwind uwtable define dso_local double @din() local_unnamed_addr #0 { entry: %i = alloca double, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %i) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %i) %0 = load double, ptr %i, align 8, !tbaa !11 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %i) #12 ret double %0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @chin(ptr noundef %s) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %s) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print(i32 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %a) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @llprint(i64 noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %a) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @dprint(double noundef %a) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, double noundef %a) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @print2(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %a, i32 noundef %b) ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @Max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @Min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dmax(double noundef %a, double noundef %b) local_unnamed_addr #4 { entry: %cmp = fcmp ogt double %a, %b %cond = select i1 %cmp, double %a, double %b ret double %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dmin(double noundef %a, double noundef %b) local_unnamed_addr #4 { entry: %cmp = fcmp olt double %a, %b %cond = select i1 %cmp, double %a, double %b ret double %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i64, ptr %a, align 8, !tbaa !9 %1 = load i64, ptr %b, align 8, !tbaa !9 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp_r(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i64, ptr %b, align 8, !tbaa !9 %1 = load i64, ptr %a, align 8, !tbaa !9 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @char_cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #13 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @char_cmp_r(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #13 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #8 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 %A = alloca [50 x i32], align 16 %B = alloca [50 x i32], align 16 %C = alloca [50 x i32], align 16 %D = alloca [50 x i32], align 16 %num = alloca [50 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #12 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #12 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %A) #12 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %B) #12 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %C) #12 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %D) #12 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %num) #12 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(200) %num, i8 0, i64 200, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull %N, ptr noundef nonnull %M) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp86 = icmp sgt i32 %0, 0 br i1 %cmp86, label %for.body, label %for.cond4.preheader for.cond4.preheader: ; preds = %for.body, %entry %1 = phi i32 [ %0, %entry ], [ %3, %for.body ] %2 = load i32, ptr %M, align 4, !tbaa !5 %cmp588 = icmp sgt i32 %2, 0 br i1 %cmp588, label %for.body6, label %for.cond15.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [50 x i32], ptr %A, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [50 x i32], ptr %B, i64 0, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %N, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !13 for.cond15.preheader.loopexit: ; preds = %for.body6 %.pre = load i32, ptr %N, align 4, !tbaa !5 br label %for.cond15.preheader for.cond15.preheader: ; preds = %for.cond15.preheader.loopexit, %for.cond4.preheader %5 = phi i32 [ %1, %for.cond4.preheader ], [ %.pre, %for.cond15.preheader.loopexit ] %.lcssa = phi i32 [ %2, %for.cond4.preheader ], [ %14, %for.cond15.preheader.loopexit ] %cmp1693 = icmp sgt i32 %5, 0 br i1 %cmp1693, label %for.cond18.preheader.lr.ph, label %for.end60 for.cond18.preheader.lr.ph: ; preds = %for.cond15.preheader %cmp1990 = icmp sgt i32 %.lcssa, 0 br i1 %cmp1990, label %for.cond18.preheader.us.preheader, label %for.body54.preheader for.cond18.preheader.us.preheader: ; preds = %for.cond18.preheader.lr.ph %wide.trip.count110 = zext i32 %5 to i64 %wide.trip.count = zext i32 %.lcssa to i64 br label %for.cond18.preheader.us for.cond18.preheader.us: ; preds = %for.cond18.preheader.us.preheader, %for.cond18.for.inc49_crit_edge.us %indvars.iv107 = phi i64 [ 0, %for.cond18.preheader.us.preheader ], [ %indvars.iv.next108, %for.cond18.for.inc49_crit_edge.us ] %arrayidx22.us = getelementptr inbounds [50 x i32], ptr %A, i64 0, i64 %indvars.iv107 %6 = load i32, ptr %arrayidx22.us, align 4, !tbaa !5 %arrayidx26.us = getelementptr inbounds [50 x i32], ptr %B, i64 0, i64 %indvars.iv107 %7 = load i32, ptr %arrayidx26.us, align 4, !tbaa !5 %arrayidx45.us = getelementptr inbounds [50 x i32], ptr %num, i64 0, i64 %indvars.iv107 br label %for.body20.us for.body20.us: ; preds = %for.cond18.preheader.us, %for.inc46.us %indvars.iv103 = phi i64 [ 0, %for.cond18.preheader.us ], [ %12, %for.inc46.us ] %ner.092.us = phi i32 [ 1000000000, %for.cond18.preheader.us ], [ %ner.1.us, %for.inc46.us ] %arrayidx24.us = getelementptr inbounds [50 x i32], ptr %C, i64 0, i64 %indvars.iv103 %8 = load i32, ptr %arrayidx24.us, align 4, !tbaa !5 %sub.us = sub nsw i32 %6, %8 %9 = call i32 @llvm.abs.i32(i32 %sub.us, i1 true) %arrayidx28.us = getelementptr inbounds [50 x i32], ptr %D, i64 0, i64 %indvars.iv103 %10 = load i32, ptr %arrayidx28.us, align 4, !tbaa !5 %sub29.us = sub nsw i32 %7, %10 %11 = call i32 @llvm.abs.i32(i32 %sub29.us, i1 true) %add.us = add nuw nsw i32 %11, %9 %cmp38.us = icmp sgt i32 %ner.092.us, %add.us %12 = add nuw nsw i64 %indvars.iv103, 1 br i1 %cmp38.us, label %if.then.us, label %for.inc46.us if.then.us: ; preds = %for.body20.us %13 = trunc i64 %12 to i32 store i32 %13, ptr %arrayidx45.us, align 4, !tbaa !5 br label %for.inc46.us for.inc46.us: ; preds = %for.body20.us, %if.then.us %ner.1.us = phi i32 [ %add.us, %if.then.us ], [ %ner.092.us, %for.body20.us ] %exitcond.not = icmp eq i64 %12, %wide.trip.count br i1 %exitcond.not, label %for.cond18.for.inc49_crit_edge.us, label %for.body20.us, !llvm.loop !15 for.cond18.for.inc49_crit_edge.us: ; preds = %for.inc46.us %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1 %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110 br i1 %exitcond111.not, label %for.cond52.preheader, label %for.cond18.preheader.us, !llvm.loop !16 for.body6: ; preds = %for.cond4.preheader, %for.body6 %indvars.iv100 = phi i64 [ %indvars.iv.next101, %for.body6 ], [ 0, %for.cond4.preheader ] %arrayidx8 = getelementptr inbounds [50 x i32], ptr %C, i64 0, i64 %indvars.iv100 %arrayidx10 = getelementptr inbounds [50 x i32], ptr %D, i64 0, i64 %indvars.iv100 %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.8, ptr noundef nonnull %arrayidx8, ptr noundef nonnull %arrayidx10) %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1 %14 = load i32, ptr %M, align 4, !tbaa !5 %15 = sext i32 %14 to i64 %cmp5 = icmp slt i64 %indvars.iv.next101, %15 br i1 %cmp5, label %for.body6, label %for.cond15.preheader.loopexit, !llvm.loop !17 for.cond52.preheader: ; preds = %for.cond18.for.inc49_crit_edge.us br i1 %cmp1693, label %for.body54.preheader, label %for.end60 for.body54.preheader: ; preds = %for.cond18.preheader.lr.ph, %for.cond52.preheader br label %for.body54 for.body54: ; preds = %for.body54.preheader, %for.body54 %indvars.iv112 = phi i64 [ %indvars.iv.next113, %for.body54 ], [ 0, %for.body54.preheader ] %arrayidx56 = getelementptr inbounds [50 x i32], ptr %num, i64 0, i64 %indvars.iv112 %16 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %call57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %16) %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1 %17 = load i32, ptr %N, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp53 = icmp slt i64 %indvars.iv.next113, %18 br i1 %cmp53, label %for.body54, label %for.end60, !llvm.loop !18 for.end60: ; preds = %for.body54, %for.cond15.preheader, %for.cond52.preheader call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %num) #12 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %D) #12 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %C) #12 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %B) #12 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %A) #12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #12 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #9 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #11 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #12 = { nounwind } attributes #13 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = !{!12, !12, i64 0} !12 = !{!"double", !7, i64 0} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"} !15 = distinct !{!15, !14} !16 = distinct !{!16, !14} !17 = distinct !{!17, !14} !18 = distinct !{!18, !14}
#include <stdio.h> int main(void) { // your code goes here int n,i,k,j,m; int array[100]; scanf("%d%d",&n,&m); for(i=0;i<n;i++)scanf("%d",&array[i]); k=n; while(k) { for(i=0;i<n;i++) { if(array[i]>0) { array[i]=array[i]-m; if(array[i]<=0) { k--; } j=i; } } } printf("%d",j+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13833/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %array = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %array) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp32 = icmp sgt i32 %0, 0 br i1 %cmp32, label %for.body, label %while.cond.preheader while.cond.preheader: ; preds = %for.body, %entry %.lcssa = phi i32 [ %0, %entry ], [ %4, %for.body ] %tobool.not40 = icmp ne i32 %.lcssa, 0 call void @llvm.assume(i1 %tobool.not40) %cmp334 = icmp sgt i32 %.lcssa, 0 %1 = load i32, ptr %m, align 4 br i1 %cmp334, label %for.cond2.preheader.us.preheader, label %for.cond2.preheader for.cond2.preheader.us.preheader: ; preds = %while.cond.preheader %wide.trip.count = zext i32 %.lcssa to i64 br label %for.body4.us for.body4.us: ; preds = %for.body4.us.backedge, %for.cond2.preheader.us.preheader %indvars.iv46 = phi i64 [ 0, %for.cond2.preheader.us.preheader ], [ %indvars.iv46.be, %for.body4.us.backedge ] %j.137.us = phi i32 [ undef, %for.cond2.preheader.us.preheader ], [ %j.2.us, %for.body4.us.backedge ] %k.136.us = phi i32 [ %.lcssa, %for.cond2.preheader.us.preheader ], [ %k.3.us, %for.body4.us.backedge ] %arrayidx6.us = getelementptr inbounds [100 x i32], ptr %array, i64 0, i64 %indvars.iv46 %2 = load i32, ptr %arrayidx6.us, align 4, !tbaa !5 %cmp7.us = icmp sgt i32 %2, 0 br i1 %cmp7.us, label %if.then.us, label %for.inc17.us if.then.us: ; preds = %for.body4.us %sub.us = sub nsw i32 %2, %1 store i32 %sub.us, ptr %arrayidx6.us, align 4, !tbaa !5 %cmp14.us = icmp slt i32 %sub.us, 1 %dec.us = sext i1 %cmp14.us to i32 %spec.select.us = add nsw i32 %k.136.us, %dec.us %3 = trunc i64 %indvars.iv46 to i32 br label %for.inc17.us for.inc17.us: ; preds = %if.then.us, %for.body4.us %k.3.us = phi i32 [ %spec.select.us, %if.then.us ], [ %k.136.us, %for.body4.us ] %j.2.us = phi i32 [ %3, %if.then.us ], [ %j.137.us, %for.body4.us ] %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1 %exitcond.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count br i1 %exitcond.not, label %for.cond2.while.cond.loopexit_crit_edge.us, label %for.body4.us.backedge for.body4.us.backedge: ; preds = %for.inc17.us, %for.cond2.while.cond.loopexit_crit_edge.us %indvars.iv46.be = phi i64 [ %indvars.iv.next47, %for.inc17.us ], [ 0, %for.cond2.while.cond.loopexit_crit_edge.us ] br label %for.body4.us, !llvm.loop !9 for.cond2.while.cond.loopexit_crit_edge.us: ; preds = %for.inc17.us %tobool.not.us = icmp eq i32 %k.3.us, 0 br i1 %tobool.not.us, label %while.end.loopexit, label %for.body4.us.backedge for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %array, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %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 %while.cond.preheader, !llvm.loop !11 for.cond2.preheader: ; preds = %while.cond.preheader, %for.cond2.preheader br label %for.cond2.preheader while.end.loopexit: ; preds = %for.cond2.while.cond.loopexit_crit_edge.us %6 = add nsw i32 %j.2.us, 1 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %array) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #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 willreturn memory(inaccessiblemem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <string.h> #include <ctype.h> #include <math.h> #include <stdlib.h> #define INF 1000000000; int main(void){ int n,m; scanf("%d %d",&n,&m); int a[n],b[n],c[m],d[m]; int i,j; for(i=0;i<n;i++){ scanf("%d %d",&a[i],&b[i]); } for(i=0;i<m;i++){ scanf("%d %d",&c[i],&d[i]); } int l; int p; for(i=0;i<n;i++){ int min=INF; for(j=0;j<m;j++){ l=abs(a[i]-c[j])+abs(b[i]-d[j]); if(min>l){ min=l; p=j+1; } } printf("%d\n",p); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138373/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138373/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 %5 = load i32, ptr %m, align 4, !tbaa !5 %6 = zext i32 %5 to i64 %vla2 = alloca i32, i64 %6, align 16 %vla3 = alloca i32, i64 %6, align 16 %cmp59 = icmp sgt i32 %3, 0 br i1 %cmp59, label %for.body, label %for.cond7.preheader for.cond7.preheader.loopexit: ; preds = %for.body %.pre = load i32, ptr %m, align 4, !tbaa !5 br label %for.cond7.preheader for.cond7.preheader: ; preds = %for.cond7.preheader.loopexit, %entry %7 = phi i32 [ %9, %for.cond7.preheader.loopexit ], [ %3, %entry ] %8 = phi i32 [ %.pre, %for.cond7.preheader.loopexit ], [ %5, %entry ] %cmp861 = icmp sgt i32 %8, 0 br i1 %cmp861, label %for.body9, label %for.cond18.preheader 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 %arrayidx5 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %9 = load i32, ptr %n, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp = icmp slt i64 %indvars.iv.next, %10 br i1 %cmp, label %for.body, label %for.cond7.preheader.loopexit, !llvm.loop !9 for.cond18.preheader.loopexit: ; preds = %for.body9 %.pre80 = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond18.preheader for.cond18.preheader: ; preds = %for.cond18.preheader.loopexit, %for.cond7.preheader %11 = phi i32 [ %.pre80, %for.cond18.preheader.loopexit ], [ %7, %for.cond7.preheader ] %cmp1967 = icmp sgt i32 %11, 0 br i1 %cmp1967, label %for.cond21.preheader, label %for.end41 for.body9: ; preds = %for.cond7.preheader, %for.body9 %indvars.iv71 = phi i64 [ %indvars.iv.next72, %for.body9 ], [ 0, %for.cond7.preheader ] %arrayidx11 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv71 %arrayidx13 = getelementptr inbounds i32, ptr %vla3, i64 %indvars.iv71 %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx11, ptr noundef nonnull %arrayidx13) %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1 %12 = load i32, ptr %m, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp8 = icmp slt i64 %indvars.iv.next72, %13 br i1 %cmp8, label %for.body9, label %for.cond18.preheader.loopexit, !llvm.loop !11 for.cond21.preheader: ; preds = %for.cond18.preheader, %for.end37 %indvars.iv77 = phi i64 [ %indvars.iv.next78, %for.end37 ], [ 0, %for.cond18.preheader ] %p.069 = phi i32 [ %p.1.lcssa, %for.end37 ], [ undef, %for.cond18.preheader ] %14 = load i32, ptr %m, align 4, !tbaa !5 %cmp2263 = icmp sgt i32 %14, 0 br i1 %cmp2263, label %for.body23.lr.ph, label %for.end37 for.body23.lr.ph: ; preds = %for.cond21.preheader %arrayidx25 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv77 %15 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %arrayidx29 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv77 %16 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %wide.trip.count = zext i32 %14 to i64 br label %for.body23 for.body23: ; preds = %for.body23.lr.ph, %for.body23 %indvars.iv74 = phi i64 [ 0, %for.body23.lr.ph ], [ %indvars.iv.next75, %for.body23 ] %min.066 = phi i32 [ 1000000000, %for.body23.lr.ph ], [ %spec.select58, %for.body23 ] %p.165 = phi i32 [ %p.069, %for.body23.lr.ph ], [ %spec.select, %for.body23 ] %arrayidx27 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv74 %17 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %sub = sub nsw i32 %15, %17 %18 = call i32 @llvm.abs.i32(i32 %sub, i1 true) %arrayidx31 = getelementptr inbounds i32, ptr %vla3, i64 %indvars.iv74 %19 = load i32, ptr %arrayidx31, align 4, !tbaa !5 %sub32 = sub nsw i32 %16, %19 %20 = call i32 @llvm.abs.i32(i32 %sub32, i1 true) %add = add nuw nsw i32 %20, %18 %cmp33 = icmp sgt i32 %min.066, %add %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1 %21 = trunc i64 %indvars.iv.next75 to i32 %spec.select = select i1 %cmp33, i32 %21, i32 %p.165 %spec.select58 = call i32 @llvm.smin.i32(i32 %min.066, i32 %add) %exitcond.not = icmp eq i64 %indvars.iv.next75, %wide.trip.count br i1 %exitcond.not, label %for.end37, label %for.body23, !llvm.loop !12 for.end37: ; preds = %for.body23, %for.cond21.preheader %p.1.lcssa = phi i32 [ %p.069, %for.cond21.preheader ], [ %spec.select, %for.body23 ] %call38 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %p.1.lcssa) %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %22 = load i32, ptr %n, align 4, !tbaa !5 %23 = sext i32 %22 to i64 %cmp19 = icmp slt i64 %indvars.iv.next78, %23 br i1 %cmp19, label %for.cond21.preheader, label %for.end41, !llvm.loop !13 for.end41: ; preds = %for.end37, %for.cond18.preheader call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = 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,b; /*���؁ia�F�̗� b�F�U���́j*/ int c,d; /*�–؁ic�F�̗� d�F�U���́j*/ int i=0; do{ scanf("%d%d%d%d",&a,&b,&c,&d); }while(a<1||a>100||b<1||b>100||c<1||c>100||d<1||d>100); while(a>0&&c>0){ if(i%2==1) a=a-d; if(i%2==0) c=c-b; i++; } if(c<=0) printf("Yes"); if(a<=0) printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138416/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138416/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 br label %do.body do.body: ; preds = %do.body, %entry %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %a, align 4 %1 = add i32 %0, -101 %or.cond = icmp ult i32 %1, -100 %2 = load i32, ptr %b, align 4 %cmp3 = icmp slt i32 %2, 1 %or.cond29 = select i1 %or.cond, i1 true, i1 %cmp3 %cmp5 = icmp sgt i32 %2, 100 %or.cond30 = select i1 %or.cond29, i1 true, i1 %cmp5 %3 = load i32, ptr %c, align 4 %cmp7 = icmp slt i32 %3, 1 %or.cond31 = select i1 %or.cond30, i1 true, i1 %cmp7 %cmp9 = icmp sgt i32 %3, 100 %or.cond32 = select i1 %or.cond31, i1 true, i1 %cmp9 %4 = load i32, ptr %d, align 4 %cmp11 = icmp slt i32 %4, 1 %or.cond33 = select i1 %or.cond32, i1 true, i1 %cmp11 %cmp12 = icmp sgt i32 %4, 100 %or.cond34 = select i1 %or.cond33, i1 true, i1 %cmp12 br i1 %or.cond34, label %do.body, label %while.body, !llvm.loop !5 while.body: ; preds = %do.body, %if.end20 %i.047 = phi i32 [ %inc, %if.end20 ], [ 0, %do.body ] %sub4046 = phi i32 [ %sub39, %if.end20 ], [ %0, %do.body ] %sub194245 = phi i32 [ %sub1941, %if.end20 ], [ %3, %do.body ] %rem = and i32 %i.047, 1 %cond = icmp eq i32 %rem, 0 br i1 %cond, label %if.then18, label %if.then if.then: ; preds = %while.body %sub = sub nsw i32 %sub4046, %4 store i32 %sub, ptr %a, align 4, !tbaa !7 br label %if.end20 if.then18: ; preds = %while.body %sub19 = sub nsw i32 %sub194245, %2 store i32 %sub19, ptr %c, align 4, !tbaa !7 br label %if.end20 if.end20: ; preds = %if.then, %if.then18 %sub1941 = phi i32 [ %sub194245, %if.then ], [ %sub19, %if.then18 ] %sub39 = phi i32 [ %sub, %if.then ], [ %sub4046, %if.then18 ] %inc = add nuw nsw i32 %i.047, 1 %cmp13 = icmp sgt i32 %sub39, 0 %cmp14 = icmp sgt i32 %sub1941, 0 %5 = select i1 %cmp13, i1 %cmp14, i1 false br i1 %5, label %while.body, label %while.end, !llvm.loop !11 while.end: ; preds = %if.end20 %6 = icmp slt i32 %sub1941, 1 br i1 %6, label %if.then22, label %if.end24 if.then22: ; preds = %while.end %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) %.pre = load i32, ptr %a, align 4, !tbaa !7 br label %if.end24 if.end24: ; preds = %if.then22, %while.end %7 = phi i32 [ %.pre, %if.then22 ], [ %sub39, %while.end ] %cmp25 = icmp slt i32 %7, 1 br i1 %cmp25, label %if.then26, label %if.end28 if.then26: ; preds = %if.end24 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end28 if.end28: ; preds = %if.then26, %if.end24 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"} !11 = distinct !{!11, !6}
# include <stdio.h> int main () { int n,m; scanf("%d %d",&n,&m); int n1=n+1; int a[n1]; int p[n1]; int i,j; for(i=1;i<=n;i++) {p[i]=0; scanf("%d",&a[i]); } for(i=1;i<=n;i++) { while(a[i]>0) { a[i]=a[i]-m; p[i]=p[i]+1; } //printf("%d ",p[i]); } int max=0;int me; for(i=1;i<=n;i++) { if(p[i]>=max) { max=p[i]; me=i; } } printf("%d",me); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13846/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %0, 1 %1 = zext i32 %add to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %vla1 = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not53 = icmp slt i32 %3, 1 br i1 %cmp.not53, label %for.cond5.preheader.for.cond23.preheader_crit_edge, label %for.body for.cond5.preheader: ; preds = %for.body %cmp6.not59 = icmp slt i32 %6, 1 br i1 %cmp6.not59, label %for.cond5.preheader.for.cond23.preheader_crit_edge, label %while.cond.preheader.lr.ph for.cond5.preheader.for.cond23.preheader_crit_edge: ; preds = %entry, %for.cond5.preheader %.lcssa80 = phi i32 [ %6, %for.cond5.preheader ], [ %3, %entry ] %.pre = add nsw i32 %.lcssa80, 1 %.pre76 = zext i32 %.pre to i64 br label %for.cond23.preheader while.cond.preheader.lr.ph: ; preds = %for.cond5.preheader %4 = load i32, ptr %m, align 4 %5 = add nuw i32 %6, 1 %wide.trip.count = zext i32 %5 to i64 br label %while.cond.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv store i32 0, ptr %arrayidx, align 4, !tbaa !5 %arrayidx3 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx3) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %7 br i1 %cmp.not.not, label %for.body, label %for.cond5.preheader, !llvm.loop !9 while.cond.preheader: ; preds = %while.cond.preheader.lr.ph, %for.inc20 %indvars.iv68 = phi i64 [ 1, %while.cond.preheader.lr.ph ], [ %indvars.iv.next69, %for.inc20 ] %arrayidx9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv68 %arrayidx9.promoted = load i32, ptr %arrayidx9, align 4, !tbaa !5 %cmp1056 = icmp sgt i32 %arrayidx9.promoted, 0 br i1 %cmp1056, label %while.body.lr.ph, label %for.inc20 while.body.lr.ph: ; preds = %while.cond.preheader %arrayidx16 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv68 %arrayidx16.promoted = load i32, ptr %arrayidx16, align 4, !tbaa !5 br label %while.body for.cond23.preheader: ; preds = %for.inc20, %for.cond5.preheader.for.cond23.preheader_crit_edge %.lcssa79 = phi i32 [ %.lcssa80, %for.cond5.preheader.for.cond23.preheader_crit_edge ], [ %6, %for.inc20 ] %wide.trip.count74.pre-phi = phi i64 [ %.pre76, %for.cond5.preheader.for.cond23.preheader_crit_edge ], [ %wide.trip.count, %for.inc20 ] %cmp24.not61 = icmp sgt i32 %.lcssa79, 0 call void @llvm.assume(i1 %cmp24.not61) %8 = add nsw i64 %wide.trip.count74.pre-phi, -1 %9 = add nsw i64 %wide.trip.count74.pre-phi, -2 %xtraiter = and i64 %8, 3 %10 = icmp ult i64 %9, 3 br i1 %10, label %for.end33.unr-lcssa, label %for.cond23.preheader.new for.cond23.preheader.new: ; preds = %for.cond23.preheader %unroll_iter = and i64 %8, -4 br label %for.body25 while.body: ; preds = %while.body.lr.ph, %while.body %add1758 = phi i32 [ %arrayidx16.promoted, %while.body.lr.ph ], [ %add17, %while.body ] %sub5557 = phi i32 [ %arrayidx9.promoted, %while.body.lr.ph ], [ %sub, %while.body ] %sub = sub nsw i32 %sub5557, %4 %add17 = add nsw i32 %add1758, 1 %cmp10 = icmp sgt i32 %sub, 0 br i1 %cmp10, label %while.body, label %while.cond.for.inc20_crit_edge, !llvm.loop !11 while.cond.for.inc20_crit_edge: ; preds = %while.body store i32 %sub, ptr %arrayidx9, align 4, !tbaa !5 store i32 %add17, ptr %arrayidx16, align 4, !tbaa !5 br label %for.inc20 for.inc20: ; preds = %while.cond.for.inc20_crit_edge, %while.cond.preheader %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %exitcond.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count br i1 %exitcond.not, label %for.cond23.preheader, label %while.cond.preheader, !llvm.loop !12 for.body25: ; preds = %for.body25, %for.cond23.preheader.new %indvars.iv71 = phi i64 [ 1, %for.cond23.preheader.new ], [ %indvars.iv.next72.3, %for.body25 ] %me.064 = phi i32 [ undef, %for.cond23.preheader.new ], [ %spec.select52.3, %for.body25 ] %max.063 = phi i32 [ 0, %for.cond23.preheader.new ], [ %spec.select.3, %for.body25 ] %niter = phi i64 [ 0, %for.cond23.preheader.new ], [ %niter.next.3, %for.body25 ] %arrayidx27 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv71 %11 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %cmp28.not = icmp slt i32 %11, %max.063 %spec.select = call i32 @llvm.smax.i32(i32 %11, i32 %max.063) %12 = trunc i64 %indvars.iv71 to i32 %spec.select52 = select i1 %cmp28.not, i32 %me.064, i32 %12 %indvars.iv.next72 = add nuw nsw i64 %indvars.iv71, 1 %arrayidx27.1 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv.next72 %13 = load i32, ptr %arrayidx27.1, align 4, !tbaa !5 %cmp28.not.1 = icmp slt i32 %13, %spec.select %spec.select.1 = call i32 @llvm.smax.i32(i32 %13, i32 %spec.select) %14 = trunc i64 %indvars.iv.next72 to i32 %spec.select52.1 = select i1 %cmp28.not.1, i32 %spec.select52, i32 %14 %indvars.iv.next72.1 = add nuw nsw i64 %indvars.iv71, 2 %arrayidx27.2 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv.next72.1 %15 = load i32, ptr %arrayidx27.2, align 4, !tbaa !5 %cmp28.not.2 = icmp slt i32 %15, %spec.select.1 %spec.select.2 = call i32 @llvm.smax.i32(i32 %15, i32 %spec.select.1) %16 = trunc i64 %indvars.iv.next72.1 to i32 %spec.select52.2 = select i1 %cmp28.not.2, i32 %spec.select52.1, i32 %16 %indvars.iv.next72.2 = add nuw nsw i64 %indvars.iv71, 3 %arrayidx27.3 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv.next72.2 %17 = load i32, ptr %arrayidx27.3, align 4, !tbaa !5 %cmp28.not.3 = icmp slt i32 %17, %spec.select.2 %spec.select.3 = call i32 @llvm.smax.i32(i32 %17, i32 %spec.select.2) %18 = trunc i64 %indvars.iv.next72.2 to i32 %spec.select52.3 = select i1 %cmp28.not.3, i32 %spec.select52.2, i32 %18 %indvars.iv.next72.3 = add nuw nsw i64 %indvars.iv71, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.end33.unr-lcssa, label %for.body25, !llvm.loop !13 for.end33.unr-lcssa: ; preds = %for.body25, %for.cond23.preheader %indvars.iv71.unr = phi i64 [ 1, %for.cond23.preheader ], [ %indvars.iv.next72.3, %for.body25 ] %me.064.unr = phi i32 [ undef, %for.cond23.preheader ], [ %spec.select52.3, %for.body25 ] %max.063.unr = phi i32 [ 0, %for.cond23.preheader ], [ %spec.select.3, %for.body25 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end33, label %for.body25.epil for.body25.epil: ; preds = %for.end33.unr-lcssa, %for.body25.epil %indvars.iv71.epil = phi i64 [ %indvars.iv.next72.epil, %for.body25.epil ], [ %indvars.iv71.unr, %for.end33.unr-lcssa ] %me.064.epil = phi i32 [ %spec.select52.epil, %for.body25.epil ], [ %me.064.unr, %for.end33.unr-lcssa ] %max.063.epil = phi i32 [ %spec.select.epil, %for.body25.epil ], [ %max.063.unr, %for.end33.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body25.epil ], [ 0, %for.end33.unr-lcssa ] %arrayidx27.epil = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv71.epil %19 = load i32, ptr %arrayidx27.epil, align 4, !tbaa !5 %cmp28.not.epil = icmp slt i32 %19, %max.063.epil %spec.select.epil = call i32 @llvm.smax.i32(i32 %19, i32 %max.063.epil) %20 = trunc i64 %indvars.iv71.epil to i32 %spec.select52.epil = select i1 %cmp28.not.epil, i32 %me.064.epil, i32 %20 %indvars.iv.next72.epil = add nuw nsw i64 %indvars.iv71.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end33, label %for.body25.epil, !llvm.loop !14 for.end33: ; preds = %for.body25.epil, %for.end33.unr-lcssa %spec.select52.lcssa = phi i32 [ %me.064.unr, %for.end33.unr-lcssa ], [ %spec.select52.epil, %for.body25.epil ] %call34 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select52.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.unroll.disable"}
#include<stdio.h> int main(void){ int A,B,C,D; scanf("%d %d %d %d",&A,&B,&C,&D); do{ C=C-B; A=A-D;}while(C>0&&A>0); if(C<=0&&A>0) puts("Yes"); if(A<=0&&C>0) puts("No"); if(A<=0&&C<=0) puts("Yes"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138502/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138502/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.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: %A = alloca i32, align 4 %B = alloca i32, align 4 %C = alloca i32, align 4 %D = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %C) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C, ptr noundef nonnull %D) %0 = load i32, ptr %B, align 4, !tbaa !5 %1 = load i32, ptr %D, align 4, !tbaa !5 %C.promoted = load i32, ptr %C, align 4, !tbaa !5 %A.promoted = load i32, ptr %A, align 4, !tbaa !5 br label %do.body do.body: ; preds = %do.body, %entry %sub122 = phi i32 [ %sub1, %do.body ], [ %A.promoted, %entry ] %sub20 = phi i32 [ %sub, %do.body ], [ %C.promoted, %entry ] %sub = sub nsw i32 %sub20, %0 %sub1 = sub nsw i32 %sub122, %1 %cmp = icmp sgt i32 %sub, 0 %cmp2 = icmp sgt i32 %sub1, 0 %2 = select i1 %cmp, i1 %cmp2, i1 false br i1 %2, label %do.body, label %do.end, !llvm.loop !9 do.end: ; preds = %do.body store i32 %sub, ptr %C, align 4, !tbaa !5 store i32 %sub1, ptr %A, align 4, !tbaa !5 %cmp3 = icmp slt i32 %sub, 1 %or.cond = select i1 %cmp3, i1 %cmp2, i1 false br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %do.end %call5 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) %.pre = load i32, ptr %A, align 4, !tbaa !5 %.pre23 = load i32, ptr %C, align 4 br label %if.end if.end: ; preds = %if.then, %do.end %3 = phi i32 [ %.pre23, %if.then ], [ %sub, %do.end ] %4 = phi i32 [ %.pre, %if.then ], [ %sub1, %do.end ] %cmp6 = icmp slt i32 %4, 1 %cmp8 = icmp sgt i32 %3, 0 %or.cond18 = select i1 %cmp6, i1 %cmp8, i1 false br i1 %or.cond18, label %if.then9, label %if.end11 if.then9: ; preds = %if.end %call10 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.2) %.pre24 = load i32, ptr %A, align 4, !tbaa !5 %.pre25 = load i32, ptr %C, align 4 br label %if.end11 if.end11: ; preds = %if.then9, %if.end %5 = phi i32 [ %.pre25, %if.then9 ], [ %3, %if.end ] %6 = phi i32 [ %.pre24, %if.then9 ], [ %4, %if.end ] %cmp12 = icmp slt i32 %6, 1 %cmp14 = icmp slt i32 %5, 1 %or.cond19 = select i1 %cmp12, i1 %cmp14, i1 false br i1 %or.cond19, label %if.then15, label %if.end17 if.then15: ; preds = %if.end11 %call16 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %if.end17 if.end17: ; preds = %if.then15, %if.end11 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %C) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @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"}
#include <stdio.h> int main(void) { int a, b, c, d, i; scanf("%d %d %d %d", &a, &b, &c, &d); while(1){ c = c - b; if(c <= 0){ printf("Yes"); break; } a = a - d; if(a <= 0){ printf("No"); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %c.promoted = load i32, ptr %c, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %d, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry %sub29 = phi i32 [ %sub2, %if.end ], [ %a.promoted, %entry ] %sub7 = phi i32 [ %sub, %if.end ], [ %c.promoted, %entry ] %sub = sub nsw i32 %sub7, %0 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %while.end, label %if.end if.end: ; preds = %while.cond %sub2 = sub nsw i32 %sub29, %1 store i32 %sub2, ptr %a, align 4, !tbaa !5 %cmp3 = icmp slt i32 %sub2, 1 br i1 %cmp3, label %while.end, label %while.cond while.end: ; preds = %if.end, %while.cond %.str.2.sink = phi ptr [ @.str.1, %while.cond ], [ @.str.2, %if.end ] store i32 %sub, ptr %c, align 4, !tbaa !5 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> void main() { int a, b, c, d; int t_hp, a_hp; scanf("%d %d %d %d", &a, &b, &c, &d); a_hp = c; t_hp = a; while(1){ //Takahashi attack a_hp -= b; if(a_hp <= 0){ printf("Yes\n");break; } //Aoki attack t_hp -= d; if(t_hp <= 0){ printf("No\n");break; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138597/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138597/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @str = 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 void @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %c, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %2 = load i32, ptr %b, align 4, !tbaa !5 %3 = load i32, ptr %d, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry %t_hp.0 = phi i32 [ %1, %entry ], [ %sub2, %if.end ] %a_hp.0 = phi i32 [ %0, %entry ], [ %sub, %if.end ] %sub = sub nsw i32 %a_hp.0, %2 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %while.end, label %if.end if.end: ; preds = %while.cond %sub2 = sub nsw i32 %t_hp.0, %3 %cmp3 = icmp slt i32 %sub2, 1 br i1 %cmp3, label %while.end, label %while.cond while.end: ; preds = %if.end, %while.cond %str.sink = phi ptr [ @str.3, %while.cond ], [ @str, %if.end ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__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,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); //c-b,a-d while(a>0 && c>0){ c = c-b; a = a-d; } if((c<=0 && a<=0)||(c<=0 && a>0)){ printf("Yes\n"); return 0; } else if(c>0 && a<=0){ printf("No\n"); return 0; } else{ printf("違うで"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138647/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138647/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.3 = private unnamed_addr constant [10 x i8] c"\E9\81\95\E3\81\86\E3\81\A7\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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %a.promoted = load i32, ptr %a, align 4 %c.promoted = load i32, ptr %c, align 4 %cmp27 = icmp sgt i32 %a.promoted, 0 %cmp128 = icmp sgt i32 %c.promoted, 0 %0 = select i1 %cmp27, i1 %cmp128, i1 false br i1 %0, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %1 = load i32, ptr %b, align 4, !tbaa !5 %2 = load i32, ptr %d, align 4, !tbaa !5 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %sub22530 = phi i32 [ %a.promoted, %while.body.lr.ph ], [ %sub2, %while.body ] %sub2629 = phi i32 [ %c.promoted, %while.body.lr.ph ], [ %sub, %while.body ] %sub = sub nsw i32 %sub2629, %1 %sub2 = sub nsw i32 %sub22530, %2 %cmp = icmp sgt i32 %sub2, 0 %cmp1 = icmp sgt i32 %sub, 0 %3 = select i1 %cmp, i1 %cmp1, i1 false br i1 %3, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %sub, ptr %c, align 4, !tbaa !5 store i32 %sub2, ptr %a, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %.lcssa24 = phi i32 [ %sub2, %while.cond.while.end_crit_edge ], [ %a.promoted, %entry ] %.lcssa = phi i32 [ %sub, %while.cond.while.end_crit_edge ], [ %c.promoted, %entry ] %cmp3 = icmp slt i32 %.lcssa, 1 br i1 %cmp3, label %if.then, label %if.else if.then: ; preds = %while.end %puts22 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) br label %cleanup if.else: ; preds = %while.end %cmp4 = icmp slt i32 %.lcssa24, 1 br i1 %cmp4, label %if.then12, label %if.else14 if.then12: ; preds = %if.else %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %cleanup if.else14: ; preds = %if.else %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %cleanup cleanup: ; preds = %if.else14, %if.then12, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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() { int a,b,c,d; scanf("%d%d%d%d",&a,&b,&c,&d); int i=1; while(1) { c=c-b; a=a-d; if(c<=0){printf("Yes"); break;} else if(a<=0){printf("No"); break;} i++; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138690/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138690/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %d, align 4, !tbaa !5 %c.promoted = load i32, ptr %c, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %if.else, %entry %sub19 = phi i32 [ %sub1, %if.else ], [ %a.promoted, %entry ] %sub7 = phi i32 [ %sub, %if.else ], [ %c.promoted, %entry ] %sub = sub nsw i32 %sub7, %0 %sub1 = sub nsw i32 %sub19, %1 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %while.end, label %if.else if.else: ; preds = %while.cond %cmp3 = icmp slt i32 %sub1, 1 br i1 %cmp3, label %while.end, label %while.cond while.end: ; preds = %if.else, %while.cond %.str.2.sink = phi ptr [ @.str.1, %while.cond ], [ @.str.2, %if.else ] store i32 %sub, ptr %c, align 4, !tbaa !5 store i32 %sub1, ptr %a, align 4, !tbaa !5 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int main(){ int A,B,C,D; scanf("%d %d %d %d",&A,&B,&C,&D); while(1){ C-=B; if(C<1){ printf("Yes\n"); break; } A-=D; if(A<1){ printf("No\n"); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138733/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138733/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @str = 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: %A = alloca i32, align 4 %B = alloca i32, align 4 %C = alloca i32, align 4 %D = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %C) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C, ptr noundef nonnull %D) %0 = load i32, ptr %B, align 4, !tbaa !5 %C.promoted = load i32, ptr %C, align 4, !tbaa !5 %A.promoted = load i32, ptr %A, align 4, !tbaa !5 %1 = load i32, ptr %D, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry %sub210 = phi i32 [ %sub2, %if.end ], [ %A.promoted, %entry ] %sub8 = phi i32 [ %sub, %if.end ], [ %C.promoted, %entry ] %sub = sub nsw i32 %sub8, %0 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %while.end, label %if.end if.end: ; preds = %while.cond %sub2 = sub nsw i32 %sub210, %1 store i32 %sub2, ptr %A, align 4, !tbaa !5 %cmp3 = icmp slt i32 %sub2, 1 br i1 %cmp3, label %while.end, label %while.cond while.end: ; preds = %if.end, %while.cond %str.sink = phi ptr [ @str.3, %while.cond ], [ @str, %if.end ] store i32 %sub, ptr %C, align 4, !tbaa !5 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %C) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> int main(void) { int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d); while (1) { c = c - b; if (c <= 0) { printf("Yes\n"); return 0; } a = a - d; if (a <= 0) { printf("No\n"); return 0; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138777/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138777/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @str = 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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %c.promoted = load i32, ptr %c, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %d, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry %sub213 = phi i32 [ %sub2, %if.end ], [ %a.promoted, %entry ] %sub11 = phi i32 [ %sub, %if.end ], [ %c.promoted, %entry ] %sub = sub nsw i32 %sub11, %0 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %cleanup, label %if.end if.end: ; preds = %while.cond %sub2 = sub nsw i32 %sub213, %1 store i32 %sub2, ptr %a, align 4, !tbaa !5 %cmp3 = icmp slt i32 %sub2, 1 br i1 %cmp3, label %cleanup, label %while.cond cleanup: ; preds = %if.end, %while.cond %str.sink = phi ptr [ @str.3, %while.cond ], [ @str, %if.end ] store i32 %sub, ptr %c, align 4, !tbaa !5 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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 n,i,j; scanf("%d", &n); char w ='W'; char b = 'B'; char temp; for(i=0;i<n;i++) { for(j=0;j<n;j++) { printf("%c", w); j++; if(j<n) printf("%c", b); } temp = b; b = w; w = temp; printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13882/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13882/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp24 = icmp sgt i32 %0, 0 br i1 %cmp24, label %for.cond1.preheader, label %for.end13 for.cond1.preheader: ; preds = %entry, %for.end %1 = phi i32 [ %4, %for.end ], [ %0, %entry ] %i.027 = phi i32 [ %inc12, %for.end ], [ 0, %entry ] %b.026 = phi i8 [ %w.025, %for.end ], [ 66, %entry ] %w.025 = phi i8 [ %b.026, %for.end ], [ 87, %entry ] %cmp222 = icmp sgt i32 %1, 0 br i1 %cmp222, label %for.body3.lr.ph, label %for.end for.body3.lr.ph: ; preds = %for.cond1.preheader %conv = zext i8 %w.025 to i32 %conv7 = zext i8 %b.026 to i32 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %j.023 = phi i32 [ 0, %for.body3.lr.ph ], [ %inc9, %for.inc ] %putchar20 = call i32 @putchar(i32 %conv) %inc = or i32 %j.023, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %2 br i1 %cmp5, label %if.then, label %for.inc if.then: ; preds = %for.body3 %putchar21 = call i32 @putchar(i32 %conv7) %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %3 = phi i32 [ %2, %for.body3 ], [ %.pre, %if.then ] %inc9 = add nuw nsw i32 %j.023, 2 %cmp2 = icmp slt i32 %inc9, %3 br i1 %cmp2, label %for.body3, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc, %for.cond1.preheader %putchar = call i32 @putchar(i32 10) %inc12 = add nuw nsw i32 %i.027, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc12, %4 br i1 %cmp, label %for.cond1.preheader, label %for.end13, !llvm.loop !11 for.end13: ; preds = %for.end, %entry 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 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int a, b, c, d; scanf("%d %d %d %d", &a, &b, &c, &d); for(int i=0;i<100;++i){ c=c-b; if(c<1){ printf("Yes"); break; } a=a-d; if(a<1){ printf("No"); break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138863/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138863/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %c.promoted = load i32, ptr %c, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %d, align 4 br label %for.body for.cond: ; preds = %if.end %sub.1 = sub nsw i32 %sub, %0 %cmp1.1 = icmp slt i32 %sub.1, 1 br i1 %cmp1.1, label %cleanup.sink.split, label %if.end.1 if.end.1: ; preds = %for.cond %sub3.1 = sub nsw i32 %sub3, %1 store i32 %sub3.1, ptr %a, align 4, !tbaa !5 %cmp4.1 = icmp slt i32 %sub3.1, 1 br i1 %cmp4.1, label %cleanup.sink.split, label %for.cond.1 for.cond.1: ; preds = %if.end.1 %inc.1 = add nuw nsw i32 %i.018, 2 %exitcond.not.1 = icmp eq i32 %inc.1, 100 br i1 %exitcond.not.1, label %cleanup, label %for.body, !llvm.loop !9 for.body: ; preds = %for.cond.1, %entry %i.018 = phi i32 [ 0, %entry ], [ %inc.1, %for.cond.1 ] %sub1317 = phi i32 [ %c.promoted, %entry ], [ %sub.1, %for.cond.1 ] %sub31516 = phi i32 [ %a.promoted, %entry ], [ %sub3.1, %for.cond.1 ] %sub = sub nsw i32 %sub1317, %0 %cmp1 = icmp slt i32 %sub, 1 br i1 %cmp1, label %cleanup.sink.split, label %if.end if.end: ; preds = %for.body %sub3 = sub nsw i32 %sub31516, %1 store i32 %sub3, ptr %a, align 4, !tbaa !5 %cmp4 = icmp slt i32 %sub3, 1 br i1 %cmp4, label %cleanup.sink.split, label %for.cond cleanup.sink.split: ; preds = %if.end.1, %for.cond, %if.end, %for.body %sub.lcssa = phi i32 [ %sub, %if.end ], [ %sub, %for.body ], [ %sub.1, %for.cond ], [ %sub.1, %if.end.1 ] %.str.2.sink = phi ptr [ @.str.2, %if.end ], [ @.str.1, %for.body ], [ @.str.1, %for.cond ], [ @.str.2, %if.end.1 ] store i32 %sub.lcssa, ptr %c, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) br label %cleanup cleanup: ; preds = %for.cond.1, %cleanup.sink.split call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int A,B,C,D; scanf("%d %d %d %d",&A,&B,&C,&D); while(A > 0 && C > 0) { C = C-B; if(C <= 0) { printf("Yes\n"); break; } A = A-D; if(A <= 0) { printf("No\n"); break; } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @str = 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: %A = alloca i32, align 4 %B = alloca i32, align 4 %C = alloca i32, align 4 %D = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %C) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C, ptr noundef nonnull %D) %A.promoted = load i32, ptr %A, align 4, !tbaa !5 %C.promoted = load i32, ptr %C, align 4 %0 = load i32, ptr %B, align 4 %1 = load i32, ptr %D, align 4 br label %while.cond while.cond: ; preds = %if.end, %entry %sub11 = phi i32 [ %sub, %if.end ], [ %C.promoted, %entry ] %sub410 = phi i32 [ %sub4, %if.end ], [ %A.promoted, %entry ] %cmp = icmp sgt i32 %sub410, 0 %cmp1 = icmp sgt i32 %sub11, 0 %2 = select i1 %cmp, i1 %cmp1, i1 false br i1 %2, label %while.body, label %while.end while.body: ; preds = %while.cond %sub = sub nsw i32 %sub11, %0 store i32 %sub, ptr %C, align 4, !tbaa !5 %cmp2 = icmp slt i32 %sub, 1 br i1 %cmp2, label %while.end.sink.split, label %if.end if.end: ; preds = %while.body %sub4 = sub nsw i32 %sub410, %1 store i32 %sub4, ptr %A, align 4, !tbaa !5 %cmp5 = icmp slt i32 %sub4, 1 br i1 %cmp5, label %while.end.sink.split, label %while.cond, !llvm.loop !9 while.end.sink.split: ; preds = %if.end, %while.body %str.sink = phi ptr [ @str.3, %while.body ], [ @str, %if.end ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) br label %while.end while.end: ; preds = %while.cond, %while.end.sink.split call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %C) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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(){ int a,b,c,d; scanf("%d %d %d %d",&a,&b,&c,&d); for(int i=0;; i++){ c = c-b; if( c <= 0){ printf("Yes"); return 0; } a = a-d; if( a <= 0){ printf("No"); return 0; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138957/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138957/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @.str.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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %c.promoted = load i32, ptr %c, align 4, !tbaa !5 %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %d, align 4 br label %for.cond for.cond: ; preds = %if.end, %entry %sub213 = phi i32 [ %sub2, %if.end ], [ %a.promoted, %entry ] %sub11 = phi i32 [ %sub, %if.end ], [ %c.promoted, %entry ] %sub = sub nsw i32 %sub11, %0 %cmp = icmp slt i32 %sub, 1 br i1 %cmp, label %cleanup, label %if.end if.end: ; preds = %for.cond %sub2 = sub nsw i32 %sub213, %1 store i32 %sub2, ptr %a, align 4, !tbaa !5 %cmp3 = icmp slt i32 %sub2, 1 br i1 %cmp3, label %cleanup, label %for.cond cleanup: ; preds = %if.end, %for.cond %.str.2.sink = phi ptr [ @.str.1, %for.cond ], [ @.str.2, %if.end ] store i32 %sub, ptr %c, align 4, !tbaa !5 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}