Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> #include <stdbool.h> int main(){ int i, j, n; char mark; char marks[4]={'S', 'H', 'C', 'D'}; int num; bool cards[4][13]={false}; scanf("%d ", &n); for(i=0;i<n;i++){ scanf("%c %d ", &mark, &num); for(j=0;j<4;j++){ if(mark==marks[j]){ cards[j][num-1]=true; break; } } } for(i=0;i<4;i++){ for(j=0;j<13;j++){ if(!cards[i][j]){ printf("%c %d\n", marks[i], j+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215001/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215001/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.marks = private unnamed_addr constant [4 x i8] c"SHCD", align 1 @.str = private unnamed_addr constant [4 x i8] c"%d \00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%c %d \00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %mark = alloca i8, align 1 %num = alloca i32, align 4 %cards = alloca [4 x [13 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %mark) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.start.p0(i64 52, ptr nonnull %cards) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(52) %cards, i8 0, i64 52, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp52 = icmp sgt i32 %0, 0 br i1 %cmp52, label %for.body, label %for.cond19.preheader.preheader for.body: ; preds = %entry, %for.inc12 %i.053 = phi i32 [ %inc13, %for.inc12 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %mark, ptr noundef nonnull %num) %1 = load i8, ptr %mark, align 1, !tbaa !9 switch i8 %1, label %for.inc12 [ i8 83, label %if.then i8 72, label %if.then.fold.split i8 67, label %if.then.fold.split61 i8 68, label %if.then.fold.split62 ] if.then.fold.split: ; preds = %for.body br label %if.then if.then.fold.split61: ; preds = %for.body br label %if.then if.then.fold.split62: ; preds = %for.body br label %if.then if.then: ; preds = %for.body, %if.then.fold.split62, %if.then.fold.split61, %if.then.fold.split %idxprom.lcssa = phi i64 [ 0, %for.body ], [ 1, %if.then.fold.split ], [ 2, %if.then.fold.split61 ], [ 3, %if.then.fold.split62 ] %2 = load i32, ptr %num, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom10 = sext i32 %sub to i64 %arrayidx11 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %idxprom.lcssa, i64 %idxprom10 store i8 1, ptr %arrayidx11, align 1, !tbaa !10 br label %for.inc12 for.inc12: ; preds = %for.body, %if.then %inc13 = add nuw nsw i32 %i.053, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc13, %3 br i1 %cmp, label %for.body, label %for.cond19.preheader.preheader, !llvm.loop !12 for.cond19.preheader.preheader: ; preds = %for.inc12, %entry br label %for.cond19.preheader for.cond19.preheader: ; preds = %for.cond19.preheader.preheader, %for.inc33.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc33.12 ], [ 0, %for.cond19.preheader.preheader ] %arrayidx29 = getelementptr inbounds [4 x i8], ptr @__const.main.marks, i64 0, i64 %indvars.iv %arrayidx26 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %4 = load i8, ptr %arrayidx26, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not = icmp eq i8 %4, 0 br i1 %tobool.not, label %if.then27, label %for.inc33 if.then27: ; preds = %for.cond19.preheader %5 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30 = sext i8 %5 to i32 %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30, i32 noundef 1) br label %for.inc33 for.inc33: ; preds = %for.cond19.preheader, %if.then27 %arrayidx26.1 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %6 = load i8, ptr %arrayidx26.1, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.1 = icmp eq i8 %6, 0 br i1 %tobool.not.1, label %if.then27.1, label %for.inc33.1 if.then27.1: ; preds = %for.inc33 %7 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.1 = sext i8 %7 to i32 %call31.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.1, i32 noundef 2) br label %for.inc33.1 for.inc33.1: ; preds = %if.then27.1, %for.inc33 %arrayidx26.2 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %8 = load i8, ptr %arrayidx26.2, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.2 = icmp eq i8 %8, 0 br i1 %tobool.not.2, label %if.then27.2, label %for.inc33.2 if.then27.2: ; preds = %for.inc33.1 %9 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.2 = sext i8 %9 to i32 %call31.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.2, i32 noundef 3) br label %for.inc33.2 for.inc33.2: ; preds = %if.then27.2, %for.inc33.1 %arrayidx26.3 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %10 = load i8, ptr %arrayidx26.3, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.3 = icmp eq i8 %10, 0 br i1 %tobool.not.3, label %if.then27.3, label %for.inc33.3 if.then27.3: ; preds = %for.inc33.2 %11 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.3 = sext i8 %11 to i32 %call31.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.3, i32 noundef 4) br label %for.inc33.3 for.inc33.3: ; preds = %if.then27.3, %for.inc33.2 %arrayidx26.4 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %12 = load i8, ptr %arrayidx26.4, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.4 = icmp eq i8 %12, 0 br i1 %tobool.not.4, label %if.then27.4, label %for.inc33.4 if.then27.4: ; preds = %for.inc33.3 %13 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.4 = sext i8 %13 to i32 %call31.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.4, i32 noundef 5) br label %for.inc33.4 for.inc33.4: ; preds = %if.then27.4, %for.inc33.3 %arrayidx26.5 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %14 = load i8, ptr %arrayidx26.5, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.5 = icmp eq i8 %14, 0 br i1 %tobool.not.5, label %if.then27.5, label %for.inc33.5 if.then27.5: ; preds = %for.inc33.4 %15 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.5 = sext i8 %15 to i32 %call31.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.5, i32 noundef 6) br label %for.inc33.5 for.inc33.5: ; preds = %if.then27.5, %for.inc33.4 %arrayidx26.6 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %16 = load i8, ptr %arrayidx26.6, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.6 = icmp eq i8 %16, 0 br i1 %tobool.not.6, label %if.then27.6, label %for.inc33.6 if.then27.6: ; preds = %for.inc33.5 %17 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.6 = sext i8 %17 to i32 %call31.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.6, i32 noundef 7) br label %for.inc33.6 for.inc33.6: ; preds = %if.then27.6, %for.inc33.5 %arrayidx26.7 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %18 = load i8, ptr %arrayidx26.7, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.7 = icmp eq i8 %18, 0 br i1 %tobool.not.7, label %if.then27.7, label %for.inc33.7 if.then27.7: ; preds = %for.inc33.6 %19 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.7 = sext i8 %19 to i32 %call31.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.7, i32 noundef 8) br label %for.inc33.7 for.inc33.7: ; preds = %if.then27.7, %for.inc33.6 %arrayidx26.8 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %20 = load i8, ptr %arrayidx26.8, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.8 = icmp eq i8 %20, 0 br i1 %tobool.not.8, label %if.then27.8, label %for.inc33.8 if.then27.8: ; preds = %for.inc33.7 %21 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.8 = sext i8 %21 to i32 %call31.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.8, i32 noundef 9) br label %for.inc33.8 for.inc33.8: ; preds = %if.then27.8, %for.inc33.7 %arrayidx26.9 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %22 = load i8, ptr %arrayidx26.9, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.9 = icmp eq i8 %22, 0 br i1 %tobool.not.9, label %if.then27.9, label %for.inc33.9 if.then27.9: ; preds = %for.inc33.8 %23 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.9 = sext i8 %23 to i32 %call31.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.9, i32 noundef 10) br label %for.inc33.9 for.inc33.9: ; preds = %if.then27.9, %for.inc33.8 %arrayidx26.10 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %24 = load i8, ptr %arrayidx26.10, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.10 = icmp eq i8 %24, 0 br i1 %tobool.not.10, label %if.then27.10, label %for.inc33.10 if.then27.10: ; preds = %for.inc33.9 %25 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.10 = sext i8 %25 to i32 %call31.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.10, i32 noundef 11) br label %for.inc33.10 for.inc33.10: ; preds = %if.then27.10, %for.inc33.9 %arrayidx26.11 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %26 = load i8, ptr %arrayidx26.11, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.11 = icmp eq i8 %26, 0 br i1 %tobool.not.11, label %if.then27.11, label %for.inc33.11 if.then27.11: ; preds = %for.inc33.10 %27 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.11 = sext i8 %27 to i32 %call31.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.11, i32 noundef 12) br label %for.inc33.11 for.inc33.11: ; preds = %if.then27.11, %for.inc33.10 %arrayidx26.12 = getelementptr inbounds [4 x [13 x i8]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %28 = load i8, ptr %arrayidx26.12, align 1, !tbaa !10, !range !14, !noundef !15 %tobool.not.12 = icmp eq i8 %28, 0 br i1 %tobool.not.12, label %if.then27.12, label %for.inc33.12 if.then27.12: ; preds = %for.inc33.11 %29 = load i8, ptr %arrayidx29, align 1, !tbaa !9 %conv30.12 = sext i8 %29 to i32 %call31.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv30.12, i32 noundef 13) br label %for.inc33.12 for.inc33.12: ; preds = %if.then27.12, %for.inc33.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end38, label %for.cond19.preheader, !llvm.loop !16 for.end38: ; preds = %for.inc33.12 call void @llvm.lifetime.end.p0(i64 52, ptr nonnull %cards) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %mark) #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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"_Bool", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = !{i8 0, i8 2} !15 = !{} !16 = distinct !{!16, !13}
#include <stdio.h> int main() { int n,i,j,t; int data[4][13]; char c; char gara[4]={'S','H','C','D'}; scanf("%d",&n); for (i=0;i<4;i++){ for (j=0;j<13;j++){ data[i][j]=0; } } scanf("%d",&n); for (i=0;i<n;i++){ scanf(" %c",&c); scanf("%d",&t); if (c=='S'){ data[0][t-1]=1; }else if (c=='H'){ data[1][t-1]=1; }else if (c=='C'){ data[2][t-1]=1; }else if (c=='D'){ data[3][t-1]=1; } } for (i=0;i<4;i++){ for (j=0;j<13;j++){ if (data[i][j]==0){ printf("%c %d\n",gara[i],j+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215045/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215045/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.gara = private unnamed_addr constant [4 x i8] c"SHCD", align 1 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %t = alloca i32, align 4 %data = alloca [4 x [13 x i32]], align 16 %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %data) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %data, i8 0, i64 208, i1 false), !tbaa !5 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1194 = icmp sgt i32 %0, 0 br i1 %cmp1194, label %for.body12, label %for.cond56.preheader.preheader for.body12: ; preds = %entry, %for.inc49 %i.195 = phi i32 [ %inc50, %for.inc49 ], [ 0, %entry ] %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c) %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %1 = load i8, ptr %c, align 1, !tbaa !9 switch i8 %1, label %for.inc49 [ i8 83, label %if.then i8 72, label %if.then23 i8 67, label %if.then32 i8 68, label %if.then41 ] if.then: ; preds = %for.body12 %2 = load i32, ptr %t, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom18 = sext i32 %sub to i64 %arrayidx19 = getelementptr inbounds [13 x i32], ptr %data, i64 0, i64 %idxprom18 br label %for.inc49.sink.split if.then23: ; preds = %for.body12 %3 = load i32, ptr %t, align 4, !tbaa !5 %sub25 = add nsw i32 %3, -1 %idxprom26 = sext i32 %sub25 to i64 %arrayidx27 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 1, i64 %idxprom26 br label %for.inc49.sink.split if.then32: ; preds = %for.body12 %4 = load i32, ptr %t, align 4, !tbaa !5 %sub34 = add nsw i32 %4, -1 %idxprom35 = sext i32 %sub34 to i64 %arrayidx36 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 2, i64 %idxprom35 br label %for.inc49.sink.split if.then41: ; preds = %for.body12 %5 = load i32, ptr %t, align 4, !tbaa !5 %sub43 = add nsw i32 %5, -1 %idxprom44 = sext i32 %sub43 to i64 %arrayidx45 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 3, i64 %idxprom44 br label %for.inc49.sink.split for.inc49.sink.split: ; preds = %if.then23, %if.then41, %if.then32, %if.then %arrayidx19.sink = phi ptr [ %arrayidx19, %if.then ], [ %arrayidx36, %if.then32 ], [ %arrayidx45, %if.then41 ], [ %arrayidx27, %if.then23 ] store i32 1, ptr %arrayidx19.sink, align 4, !tbaa !5 br label %for.inc49 for.inc49: ; preds = %for.inc49.sink.split, %for.body12 %inc50 = add nuw nsw i32 %i.195, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp11 = icmp slt i32 %inc50, %6 br i1 %cmp11, label %for.body12, label %for.cond56.preheader.preheader, !llvm.loop !10 for.cond56.preheader.preheader: ; preds = %for.inc49, %entry br label %for.cond56.preheader for.cond56.preheader: ; preds = %for.cond56.preheader.preheader, %for.inc72.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc72.12 ], [ 0, %for.cond56.preheader.preheader ] %arrayidx68 = getelementptr inbounds [4 x i8], ptr @__const.main.gara, i64 0, i64 %indvars.iv %arrayidx63 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 0 %7 = load i32, ptr %arrayidx63, align 4, !tbaa !5 %cmp64 = icmp eq i32 %7, 0 br i1 %cmp64, label %if.then66, label %for.inc72 if.then66: ; preds = %for.cond56.preheader %8 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69 = sext i8 %8 to i32 %call70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69, i32 noundef 1) br label %for.inc72 for.inc72: ; preds = %for.cond56.preheader, %if.then66 %arrayidx63.1 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 1 %9 = load i32, ptr %arrayidx63.1, align 4, !tbaa !5 %cmp64.1 = icmp eq i32 %9, 0 br i1 %cmp64.1, label %if.then66.1, label %for.inc72.1 if.then66.1: ; preds = %for.inc72 %10 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.1 = sext i8 %10 to i32 %call70.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.1, i32 noundef 2) br label %for.inc72.1 for.inc72.1: ; preds = %if.then66.1, %for.inc72 %arrayidx63.2 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 2 %11 = load i32, ptr %arrayidx63.2, align 4, !tbaa !5 %cmp64.2 = icmp eq i32 %11, 0 br i1 %cmp64.2, label %if.then66.2, label %for.inc72.2 if.then66.2: ; preds = %for.inc72.1 %12 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.2 = sext i8 %12 to i32 %call70.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.2, i32 noundef 3) br label %for.inc72.2 for.inc72.2: ; preds = %if.then66.2, %for.inc72.1 %arrayidx63.3 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 3 %13 = load i32, ptr %arrayidx63.3, align 4, !tbaa !5 %cmp64.3 = icmp eq i32 %13, 0 br i1 %cmp64.3, label %if.then66.3, label %for.inc72.3 if.then66.3: ; preds = %for.inc72.2 %14 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.3 = sext i8 %14 to i32 %call70.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.3, i32 noundef 4) br label %for.inc72.3 for.inc72.3: ; preds = %if.then66.3, %for.inc72.2 %arrayidx63.4 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 4 %15 = load i32, ptr %arrayidx63.4, align 4, !tbaa !5 %cmp64.4 = icmp eq i32 %15, 0 br i1 %cmp64.4, label %if.then66.4, label %for.inc72.4 if.then66.4: ; preds = %for.inc72.3 %16 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.4 = sext i8 %16 to i32 %call70.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.4, i32 noundef 5) br label %for.inc72.4 for.inc72.4: ; preds = %if.then66.4, %for.inc72.3 %arrayidx63.5 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 5 %17 = load i32, ptr %arrayidx63.5, align 4, !tbaa !5 %cmp64.5 = icmp eq i32 %17, 0 br i1 %cmp64.5, label %if.then66.5, label %for.inc72.5 if.then66.5: ; preds = %for.inc72.4 %18 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.5 = sext i8 %18 to i32 %call70.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.5, i32 noundef 6) br label %for.inc72.5 for.inc72.5: ; preds = %if.then66.5, %for.inc72.4 %arrayidx63.6 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 6 %19 = load i32, ptr %arrayidx63.6, align 4, !tbaa !5 %cmp64.6 = icmp eq i32 %19, 0 br i1 %cmp64.6, label %if.then66.6, label %for.inc72.6 if.then66.6: ; preds = %for.inc72.5 %20 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.6 = sext i8 %20 to i32 %call70.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.6, i32 noundef 7) br label %for.inc72.6 for.inc72.6: ; preds = %if.then66.6, %for.inc72.5 %arrayidx63.7 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 7 %21 = load i32, ptr %arrayidx63.7, align 4, !tbaa !5 %cmp64.7 = icmp eq i32 %21, 0 br i1 %cmp64.7, label %if.then66.7, label %for.inc72.7 if.then66.7: ; preds = %for.inc72.6 %22 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.7 = sext i8 %22 to i32 %call70.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.7, i32 noundef 8) br label %for.inc72.7 for.inc72.7: ; preds = %if.then66.7, %for.inc72.6 %arrayidx63.8 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 8 %23 = load i32, ptr %arrayidx63.8, align 4, !tbaa !5 %cmp64.8 = icmp eq i32 %23, 0 br i1 %cmp64.8, label %if.then66.8, label %for.inc72.8 if.then66.8: ; preds = %for.inc72.7 %24 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.8 = sext i8 %24 to i32 %call70.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.8, i32 noundef 9) br label %for.inc72.8 for.inc72.8: ; preds = %if.then66.8, %for.inc72.7 %arrayidx63.9 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 9 %25 = load i32, ptr %arrayidx63.9, align 4, !tbaa !5 %cmp64.9 = icmp eq i32 %25, 0 br i1 %cmp64.9, label %if.then66.9, label %for.inc72.9 if.then66.9: ; preds = %for.inc72.8 %26 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.9 = sext i8 %26 to i32 %call70.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.9, i32 noundef 10) br label %for.inc72.9 for.inc72.9: ; preds = %if.then66.9, %for.inc72.8 %arrayidx63.10 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 10 %27 = load i32, ptr %arrayidx63.10, align 4, !tbaa !5 %cmp64.10 = icmp eq i32 %27, 0 br i1 %cmp64.10, label %if.then66.10, label %for.inc72.10 if.then66.10: ; preds = %for.inc72.9 %28 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.10 = sext i8 %28 to i32 %call70.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.10, i32 noundef 11) br label %for.inc72.10 for.inc72.10: ; preds = %if.then66.10, %for.inc72.9 %arrayidx63.11 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 11 %29 = load i32, ptr %arrayidx63.11, align 4, !tbaa !5 %cmp64.11 = icmp eq i32 %29, 0 br i1 %cmp64.11, label %if.then66.11, label %for.inc72.11 if.then66.11: ; preds = %for.inc72.10 %30 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.11 = sext i8 %30 to i32 %call70.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.11, i32 noundef 12) br label %for.inc72.11 for.inc72.11: ; preds = %if.then66.11, %for.inc72.10 %arrayidx63.12 = getelementptr inbounds [4 x [13 x i32]], ptr %data, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx63.12, align 4, !tbaa !5 %cmp64.12 = icmp eq i32 %31, 0 br i1 %cmp64.12, label %if.then66.12, label %for.inc72.12 if.then66.12: ; preds = %for.inc72.11 %32 = load i8, ptr %arrayidx68, align 1, !tbaa !9 %conv69.12 = sext i8 %32 to i32 %call70.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv69.12, i32 noundef 13) br label %for.inc72.12 for.inc72.12: ; preds = %if.then66.12, %for.inc72.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end77, label %for.cond56.preheader, !llvm.loop !12 for.end77: ; preds = %for.inc72.12 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %data) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int a[4][13]; int cnt=0; int i,j; int main(){ for(i=0; i<4;i++){ for(j=0; j<13;j++){ a[i][j]=0; } } scanf("%d" ,&cnt); for(i=0; i<cnt; i++){ char c; int k; scanf(" %c %d" ,&c,&k); switch(c){ case 'S': a[0][k-1]=1; break; case 'H': a[1][k-1]=1; break; case 'C': a[2][k-1]=1; break; case'D': a[3][k-1]=1; break; } } for(i=0;i<4;i++){ for(j=0;j<13;j++){ if(a[i][j]==0){ int jj=j+1; switch(i){ case 0: printf("S %d" ,jj); break; case 1: printf("H %d",jj); break; case 2: printf("C %d" ,jj); break; case 3: printf ("D %d" ,jj); break; } printf("\n"); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215089/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215089/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @cnt = dso_local global i32 0, align 4 @i = dso_local local_unnamed_addr global i32 0, align 4 @j = dso_local local_unnamed_addr global i32 0, align 4 @a = dso_local local_unnamed_addr global [4 x [13 x i32]] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"S %d\00", align 1 @.str.3 = private unnamed_addr constant [5 x i8] c"H %d\00", align 1 @.str.4 = private unnamed_addr constant [5 x i8] c"C %d\00", align 1 @.str.5 = private unnamed_addr constant [5 x i8] c"D %d\00", align 1 @reltable.main = private unnamed_addr constant [4 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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 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: %c = alloca i8, align 1 %k = alloca i32, align 4 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) @a, i8 0, i64 208, i1 false), !tbaa !5 store i32 4, ptr @i, align 4, !tbaa !5 store i32 13, ptr @j, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @cnt) store i32 0, ptr @i, align 4, !tbaa !5 %0 = load i32, ptr @cnt, align 4, !tbaa !5 %cmp1071 = icmp sgt i32 %0, 0 br i1 %cmp1071, label %for.body11, label %for.cond30.preheader for.cond30.preheader: ; preds = %sw.epilog, %entry store i32 0, ptr @i, align 4, !tbaa !5 br label %for.cond34.preheader for.body11: ; preds = %entry, %sw.epilog call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #6 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %k) %1 = load i8, ptr %c, align 1, !tbaa !9 %conv = sext i8 %1 to i32 switch i32 %conv, label %sw.epilog [ i32 83, label %sw.bb i32 72, label %sw.bb15 i32 67, label %sw.bb19 i32 68, label %sw.bb23 ] sw.bb: ; preds = %for.body11 %2 = load i32, ptr %k, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom13 = sext i32 %sub to i64 %arrayidx14 = getelementptr inbounds [13 x i32], ptr @a, i64 0, i64 %idxprom13 br label %sw.epilog.sink.split sw.bb15: ; preds = %for.body11 %3 = load i32, ptr %k, align 4, !tbaa !5 %sub16 = add nsw i32 %3, -1 %idxprom17 = sext i32 %sub16 to i64 %arrayidx18 = getelementptr inbounds [4 x [13 x i32]], ptr @a, i64 0, i64 1, i64 %idxprom17 br label %sw.epilog.sink.split sw.bb19: ; preds = %for.body11 %4 = load i32, ptr %k, align 4, !tbaa !5 %sub20 = add nsw i32 %4, -1 %idxprom21 = sext i32 %sub20 to i64 %arrayidx22 = getelementptr inbounds [4 x [13 x i32]], ptr @a, i64 0, i64 2, i64 %idxprom21 br label %sw.epilog.sink.split sw.bb23: ; preds = %for.body11 %5 = load i32, ptr %k, align 4, !tbaa !5 %sub24 = add nsw i32 %5, -1 %idxprom25 = sext i32 %sub24 to i64 %arrayidx26 = getelementptr inbounds [4 x [13 x i32]], ptr @a, i64 0, i64 3, i64 %idxprom25 br label %sw.epilog.sink.split sw.epilog.sink.split: ; preds = %sw.bb, %sw.bb15, %sw.bb19, %sw.bb23 %arrayidx26.sink = phi ptr [ %arrayidx26, %sw.bb23 ], [ %arrayidx22, %sw.bb19 ], [ %arrayidx18, %sw.bb15 ], [ %arrayidx14, %sw.bb ] store i32 1, ptr %arrayidx26.sink, align 4, !tbaa !5 br label %sw.epilog sw.epilog: ; preds = %sw.epilog.sink.split, %for.body11 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #6 %6 = load i32, ptr @i, align 4, !tbaa !5 %inc28 = add nsw i32 %6, 1 store i32 %inc28, ptr @i, align 4, !tbaa !5 %7 = load i32, ptr @cnt, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc28, %7 br i1 %cmp10, label %for.body11, label %for.cond30.preheader, !llvm.loop !10 for.cond34.preheader: ; preds = %for.cond30.preheader, %for.inc57 %.pre75 = phi i32 [ 0, %for.cond30.preheader ], [ %inc58, %for.inc57 ] store i32 0, ptr @j, align 4, !tbaa !5 br label %for.body37 for.body37: ; preds = %for.cond34.preheader, %for.inc54 %8 = phi i32 [ %.pre75, %for.cond34.preheader ], [ %13, %for.inc54 ] %storemerge6672 = phi i32 [ 0, %for.cond34.preheader ], [ %inc55, %for.inc54 ] %idxprom38 = sext i32 %8 to i64 %idxprom40 = sext i32 %storemerge6672 to i64 %arrayidx41 = getelementptr inbounds [4 x [13 x i32]], ptr @a, i64 0, i64 %idxprom38, i64 %idxprom40 %9 = load i32, ptr %arrayidx41, align 4, !tbaa !5 %cmp42 = icmp eq i32 %9, 0 br i1 %cmp42, label %if.then, label %for.inc54 if.then: ; preds = %for.body37 %10 = icmp ult i32 %8, 4 br i1 %10, label %switch.lookup, label %sw.epilog52 switch.lookup: ; preds = %if.then %add = add nsw i32 %storemerge6672, 1 %11 = sext i32 %8 to i64 %reltable.shift = shl i64 %11, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %call51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic, i32 noundef %add) br label %sw.epilog52 sw.epilog52: ; preds = %if.then, %switch.lookup %putchar = call i32 @putchar(i32 10) %.pre = load i32, ptr @i, align 4, !tbaa !5 %.pre76 = load i32, ptr @j, align 4, !tbaa !5 br label %for.inc54 for.inc54: ; preds = %for.body37, %sw.epilog52 %12 = phi i32 [ %storemerge6672, %for.body37 ], [ %.pre76, %sw.epilog52 ] %13 = phi i32 [ %8, %for.body37 ], [ %.pre, %sw.epilog52 ] %inc55 = add nsw i32 %12, 1 store i32 %inc55, ptr @j, align 4, !tbaa !5 %cmp35 = icmp slt i32 %12, 12 br i1 %cmp35, label %for.body37, label %for.inc57, !llvm.loop !12 for.inc57: ; preds = %for.inc54 %inc58 = add nsw i32 %13, 1 store i32 %inc58, ptr @i, align 4, !tbaa !5 %cmp31 = icmp slt i32 %13, 3 br i1 %cmp31, label %for.cond34.preheader, label %for.end59, !llvm.loop !13 for.end59: ; preds = %for.inc57 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, i64) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } 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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11}
#include <stdio.h> int s2i(int s) { switch (s) { case 'S': return 0; case 'H': return 1; case 'C': return 2; case 'D': return 3; default: return 4; } } int i2s(int i) { if (i < 0 || 3 < i) return '?'; return "SHCD"[i]; } int main(void) { char aru[5][14] = {{0}}; int asumi_kana, kitamura_eri; if (scanf("%d", &asumi_kana) != 1) return 1; for (kitamura_eri = 0; kitamura_eri < asumi_kana; kitamura_eri++) { char hayami_saori[4]; int hanazawa_kana; if (scanf("%1s%d", hayami_saori, &hanazawa_kana) != 2) return 1; if (hanazawa_kana < 1 || 13 < hanazawa_kana) return 1; aru[s2i(hayami_saori[0])][hanazawa_kana] = 1; } for (asumi_kana = 0; asumi_kana < 4; asumi_kana++) { for (kitamura_eri = 1; kitamura_eri <= 13; kitamura_eri++) { if (!aru[asumi_kana][kitamura_eri]) { printf("%c %d\n", i2s(asumi_kana), kitamura_eri); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215182/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215182/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"SHCD\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%1s%d\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @s2i(i32 noundef %s) local_unnamed_addr #0 { entry: switch i32 %s, label %sw.default [ i32 83, label %return i32 72, label %sw.bb1 i32 67, label %sw.bb2 i32 68, label %sw.bb3 ] sw.bb1: ; preds = %entry br label %return sw.bb2: ; preds = %entry br label %return sw.bb3: ; preds = %entry br label %return sw.default: ; preds = %entry br label %return return: ; preds = %entry, %sw.default, %sw.bb3, %sw.bb2, %sw.bb1 %retval.0 = phi i32 [ 4, %sw.default ], [ 3, %sw.bb3 ], [ 2, %sw.bb2 ], [ 1, %sw.bb1 ], [ 0, %entry ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @i2s(i32 noundef %i) local_unnamed_addr #0 { entry: %or.cond = icmp ugt i32 %i, 3 br i1 %or.cond, label %return, label %if.end if.end: ; preds = %entry %idxprom = zext i32 %i to i64 %arrayidx = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %conv = sext i8 %0 to i32 br label %return return: ; preds = %entry, %if.end %retval.0 = phi i32 [ %conv, %if.end ], [ 63, %entry ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %aru = alloca [5 x [14 x i8]], align 16 %asumi_kana = alloca i32, align 4 %hayami_saori = alloca [4 x i8], align 1 %hanazawa_kana = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 70, ptr nonnull %aru) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(70) %aru, i8 0, i64 70, i1 false) call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %asumi_kana) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %asumi_kana) %cmp.not = icmp eq i32 %call, 1 br i1 %cmp.not, label %for.cond.preheader, label %cleanup37 for.cond.preheader: ; preds = %entry %0 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %cmp148 = icmp sgt i32 %0, 0 br i1 %cmp148, label %for.body, label %for.cond15.preheader for.cond15.preheader: ; preds = %for.inc, %for.cond.preheader store i32 0, ptr %asumi_kana, align 4, !tbaa !8 br label %for.cond19.preheader for.body: ; preds = %for.cond.preheader, %for.inc %kitamura_eri.049 = phi i32 [ %inc, %for.inc ], [ 0, %for.cond.preheader ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hayami_saori) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hanazawa_kana) #5 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %hayami_saori, ptr noundef nonnull %hanazawa_kana) %cmp3.not = icmp eq i32 %call2, 2 br i1 %cmp3.not, label %if.end5, label %cleanup.thread if.end5: ; preds = %for.body %1 = load i32, ptr %hanazawa_kana, align 4 %2 = add i32 %1, -14 %or.cond = icmp ult i32 %2, -13 br i1 %or.cond, label %cleanup.thread, label %if.end9 if.end9: ; preds = %if.end5 %3 = load i8, ptr %hayami_saori, align 1, !tbaa !5 %conv = sext i8 %3 to i32 switch i32 %conv, label %sw.default.i [ i32 83, label %for.inc i32 72, label %sw.bb1.i i32 67, label %sw.bb2.i i32 68, label %sw.bb3.i ] sw.bb1.i: ; preds = %if.end9 br label %for.inc sw.bb2.i: ; preds = %if.end9 br label %for.inc sw.bb3.i: ; preds = %if.end9 br label %for.inc sw.default.i: ; preds = %if.end9 br label %for.inc cleanup.thread: ; preds = %for.body, %if.end5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hanazawa_kana) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hayami_saori) #5 br label %cleanup37 for.inc: ; preds = %if.end9, %sw.bb1.i, %sw.bb2.i, %sw.bb3.i, %sw.default.i %retval.0.i = phi i64 [ 4, %sw.default.i ], [ 3, %sw.bb3.i ], [ 2, %sw.bb2.i ], [ 1, %sw.bb1.i ], [ 0, %if.end9 ] %idxprom12 = zext i32 %1 to i64 %arrayidx13 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %retval.0.i, i64 %idxprom12 store i8 1, ptr %arrayidx13, align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hanazawa_kana) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hayami_saori) #5 %inc = add nuw nsw i32 %kitamura_eri.049, 1 %4 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %cmp1 = icmp slt i32 %inc, %4 br i1 %cmp1, label %for.body, label %for.cond15.preheader, !llvm.loop !10 for.cond19.preheader: ; preds = %for.cond15.preheader, %for.inc31.12 %5 = phi i32 [ 0, %for.cond15.preheader ], [ %inc35, %for.inc31.12 ] %idxprom23 = sext i32 %5 to i64 %arrayidx26 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23, i64 1 %6 = load i8, ptr %arrayidx26, align 1, !tbaa !5 %tobool.not = icmp eq i8 %6, 0 br i1 %tobool.not, label %if.then27, label %for.inc31 if.then27: ; preds = %for.cond19.preheader %or.cond.i = icmp ugt i32 %5, 3 br i1 %or.cond.i, label %i2s.exit, label %if.end.i if.end.i: ; preds = %if.then27 %idxprom.i = zext i32 %5 to i64 %arrayidx.i = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i %7 = load i8, ptr %arrayidx.i, align 1, !tbaa !5 %conv.i = sext i8 %7 to i32 br label %i2s.exit i2s.exit: ; preds = %if.then27, %if.end.i %retval.0.i45 = phi i32 [ %conv.i, %if.end.i ], [ 63, %if.then27 ] %call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45, i32 noundef 1) %.pre = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre64 = sext i32 %.pre to i64 br label %for.inc31 for.inc31: ; preds = %for.cond19.preheader, %i2s.exit %idxprom23.1.pre-phi = phi i64 [ %idxprom23, %for.cond19.preheader ], [ %.pre64, %i2s.exit ] %8 = phi i32 [ %5, %for.cond19.preheader ], [ %.pre, %i2s.exit ] %arrayidx26.1 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.1.pre-phi, i64 2 %9 = load i8, ptr %arrayidx26.1, align 2, !tbaa !5 %tobool.not.1 = icmp eq i8 %9, 0 br i1 %tobool.not.1, label %if.then27.1, label %for.inc31.1 if.then27.1: ; preds = %for.inc31 %or.cond.i.1 = icmp ugt i32 %8, 3 br i1 %or.cond.i.1, label %i2s.exit.1, label %if.end.i.1 if.end.i.1: ; preds = %if.then27.1 %idxprom.i.1 = zext i32 %8 to i64 %arrayidx.i.1 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.1 %10 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !5 %conv.i.1 = sext i8 %10 to i32 br label %i2s.exit.1 i2s.exit.1: ; preds = %if.end.i.1, %if.then27.1 %retval.0.i45.1 = phi i32 [ %conv.i.1, %if.end.i.1 ], [ 63, %if.then27.1 ] %call29.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.1, i32 noundef 2) %.pre52 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre65 = sext i32 %.pre52 to i64 br label %for.inc31.1 for.inc31.1: ; preds = %i2s.exit.1, %for.inc31 %idxprom23.2.pre-phi = phi i64 [ %.pre65, %i2s.exit.1 ], [ %idxprom23.1.pre-phi, %for.inc31 ] %11 = phi i32 [ %.pre52, %i2s.exit.1 ], [ %8, %for.inc31 ] %arrayidx26.2 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.2.pre-phi, i64 3 %12 = load i8, ptr %arrayidx26.2, align 1, !tbaa !5 %tobool.not.2 = icmp eq i8 %12, 0 br i1 %tobool.not.2, label %if.then27.2, label %for.inc31.2 if.then27.2: ; preds = %for.inc31.1 %or.cond.i.2 = icmp ugt i32 %11, 3 br i1 %or.cond.i.2, label %i2s.exit.2, label %if.end.i.2 if.end.i.2: ; preds = %if.then27.2 %idxprom.i.2 = zext i32 %11 to i64 %arrayidx.i.2 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.2 %13 = load i8, ptr %arrayidx.i.2, align 1, !tbaa !5 %conv.i.2 = sext i8 %13 to i32 br label %i2s.exit.2 i2s.exit.2: ; preds = %if.end.i.2, %if.then27.2 %retval.0.i45.2 = phi i32 [ %conv.i.2, %if.end.i.2 ], [ 63, %if.then27.2 ] %call29.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.2, i32 noundef 3) %.pre53 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre66 = sext i32 %.pre53 to i64 br label %for.inc31.2 for.inc31.2: ; preds = %i2s.exit.2, %for.inc31.1 %idxprom23.3.pre-phi = phi i64 [ %.pre66, %i2s.exit.2 ], [ %idxprom23.2.pre-phi, %for.inc31.1 ] %14 = phi i32 [ %.pre53, %i2s.exit.2 ], [ %11, %for.inc31.1 ] %arrayidx26.3 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.3.pre-phi, i64 4 %15 = load i8, ptr %arrayidx26.3, align 2, !tbaa !5 %tobool.not.3 = icmp eq i8 %15, 0 br i1 %tobool.not.3, label %if.then27.3, label %for.inc31.3 if.then27.3: ; preds = %for.inc31.2 %or.cond.i.3 = icmp ugt i32 %14, 3 br i1 %or.cond.i.3, label %i2s.exit.3, label %if.end.i.3 if.end.i.3: ; preds = %if.then27.3 %idxprom.i.3 = zext i32 %14 to i64 %arrayidx.i.3 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.3 %16 = load i8, ptr %arrayidx.i.3, align 1, !tbaa !5 %conv.i.3 = sext i8 %16 to i32 br label %i2s.exit.3 i2s.exit.3: ; preds = %if.end.i.3, %if.then27.3 %retval.0.i45.3 = phi i32 [ %conv.i.3, %if.end.i.3 ], [ 63, %if.then27.3 ] %call29.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.3, i32 noundef 4) %.pre54 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre67 = sext i32 %.pre54 to i64 br label %for.inc31.3 for.inc31.3: ; preds = %i2s.exit.3, %for.inc31.2 %idxprom23.4.pre-phi = phi i64 [ %.pre67, %i2s.exit.3 ], [ %idxprom23.3.pre-phi, %for.inc31.2 ] %17 = phi i32 [ %.pre54, %i2s.exit.3 ], [ %14, %for.inc31.2 ] %arrayidx26.4 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.4.pre-phi, i64 5 %18 = load i8, ptr %arrayidx26.4, align 1, !tbaa !5 %tobool.not.4 = icmp eq i8 %18, 0 br i1 %tobool.not.4, label %if.then27.4, label %for.inc31.4 if.then27.4: ; preds = %for.inc31.3 %or.cond.i.4 = icmp ugt i32 %17, 3 br i1 %or.cond.i.4, label %i2s.exit.4, label %if.end.i.4 if.end.i.4: ; preds = %if.then27.4 %idxprom.i.4 = zext i32 %17 to i64 %arrayidx.i.4 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.4 %19 = load i8, ptr %arrayidx.i.4, align 1, !tbaa !5 %conv.i.4 = sext i8 %19 to i32 br label %i2s.exit.4 i2s.exit.4: ; preds = %if.end.i.4, %if.then27.4 %retval.0.i45.4 = phi i32 [ %conv.i.4, %if.end.i.4 ], [ 63, %if.then27.4 ] %call29.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.4, i32 noundef 5) %.pre55 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre68 = sext i32 %.pre55 to i64 br label %for.inc31.4 for.inc31.4: ; preds = %i2s.exit.4, %for.inc31.3 %idxprom23.5.pre-phi = phi i64 [ %.pre68, %i2s.exit.4 ], [ %idxprom23.4.pre-phi, %for.inc31.3 ] %20 = phi i32 [ %.pre55, %i2s.exit.4 ], [ %17, %for.inc31.3 ] %arrayidx26.5 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.5.pre-phi, i64 6 %21 = load i8, ptr %arrayidx26.5, align 2, !tbaa !5 %tobool.not.5 = icmp eq i8 %21, 0 br i1 %tobool.not.5, label %if.then27.5, label %for.inc31.5 if.then27.5: ; preds = %for.inc31.4 %or.cond.i.5 = icmp ugt i32 %20, 3 br i1 %or.cond.i.5, label %i2s.exit.5, label %if.end.i.5 if.end.i.5: ; preds = %if.then27.5 %idxprom.i.5 = zext i32 %20 to i64 %arrayidx.i.5 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.5 %22 = load i8, ptr %arrayidx.i.5, align 1, !tbaa !5 %conv.i.5 = sext i8 %22 to i32 br label %i2s.exit.5 i2s.exit.5: ; preds = %if.end.i.5, %if.then27.5 %retval.0.i45.5 = phi i32 [ %conv.i.5, %if.end.i.5 ], [ 63, %if.then27.5 ] %call29.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.5, i32 noundef 6) %.pre56 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre69 = sext i32 %.pre56 to i64 br label %for.inc31.5 for.inc31.5: ; preds = %i2s.exit.5, %for.inc31.4 %idxprom23.6.pre-phi = phi i64 [ %.pre69, %i2s.exit.5 ], [ %idxprom23.5.pre-phi, %for.inc31.4 ] %23 = phi i32 [ %.pre56, %i2s.exit.5 ], [ %20, %for.inc31.4 ] %arrayidx26.6 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.6.pre-phi, i64 7 %24 = load i8, ptr %arrayidx26.6, align 1, !tbaa !5 %tobool.not.6 = icmp eq i8 %24, 0 br i1 %tobool.not.6, label %if.then27.6, label %for.inc31.6 if.then27.6: ; preds = %for.inc31.5 %or.cond.i.6 = icmp ugt i32 %23, 3 br i1 %or.cond.i.6, label %i2s.exit.6, label %if.end.i.6 if.end.i.6: ; preds = %if.then27.6 %idxprom.i.6 = zext i32 %23 to i64 %arrayidx.i.6 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.6 %25 = load i8, ptr %arrayidx.i.6, align 1, !tbaa !5 %conv.i.6 = sext i8 %25 to i32 br label %i2s.exit.6 i2s.exit.6: ; preds = %if.end.i.6, %if.then27.6 %retval.0.i45.6 = phi i32 [ %conv.i.6, %if.end.i.6 ], [ 63, %if.then27.6 ] %call29.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.6, i32 noundef 7) %.pre57 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre70 = sext i32 %.pre57 to i64 br label %for.inc31.6 for.inc31.6: ; preds = %i2s.exit.6, %for.inc31.5 %idxprom23.7.pre-phi = phi i64 [ %.pre70, %i2s.exit.6 ], [ %idxprom23.6.pre-phi, %for.inc31.5 ] %26 = phi i32 [ %.pre57, %i2s.exit.6 ], [ %23, %for.inc31.5 ] %arrayidx26.7 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.7.pre-phi, i64 8 %27 = load i8, ptr %arrayidx26.7, align 2, !tbaa !5 %tobool.not.7 = icmp eq i8 %27, 0 br i1 %tobool.not.7, label %if.then27.7, label %for.inc31.7 if.then27.7: ; preds = %for.inc31.6 %or.cond.i.7 = icmp ugt i32 %26, 3 br i1 %or.cond.i.7, label %i2s.exit.7, label %if.end.i.7 if.end.i.7: ; preds = %if.then27.7 %idxprom.i.7 = zext i32 %26 to i64 %arrayidx.i.7 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.7 %28 = load i8, ptr %arrayidx.i.7, align 1, !tbaa !5 %conv.i.7 = sext i8 %28 to i32 br label %i2s.exit.7 i2s.exit.7: ; preds = %if.end.i.7, %if.then27.7 %retval.0.i45.7 = phi i32 [ %conv.i.7, %if.end.i.7 ], [ 63, %if.then27.7 ] %call29.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.7, i32 noundef 8) %.pre58 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre71 = sext i32 %.pre58 to i64 br label %for.inc31.7 for.inc31.7: ; preds = %i2s.exit.7, %for.inc31.6 %idxprom23.8.pre-phi = phi i64 [ %.pre71, %i2s.exit.7 ], [ %idxprom23.7.pre-phi, %for.inc31.6 ] %29 = phi i32 [ %.pre58, %i2s.exit.7 ], [ %26, %for.inc31.6 ] %arrayidx26.8 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.8.pre-phi, i64 9 %30 = load i8, ptr %arrayidx26.8, align 1, !tbaa !5 %tobool.not.8 = icmp eq i8 %30, 0 br i1 %tobool.not.8, label %if.then27.8, label %for.inc31.8 if.then27.8: ; preds = %for.inc31.7 %or.cond.i.8 = icmp ugt i32 %29, 3 br i1 %or.cond.i.8, label %i2s.exit.8, label %if.end.i.8 if.end.i.8: ; preds = %if.then27.8 %idxprom.i.8 = zext i32 %29 to i64 %arrayidx.i.8 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.8 %31 = load i8, ptr %arrayidx.i.8, align 1, !tbaa !5 %conv.i.8 = sext i8 %31 to i32 br label %i2s.exit.8 i2s.exit.8: ; preds = %if.end.i.8, %if.then27.8 %retval.0.i45.8 = phi i32 [ %conv.i.8, %if.end.i.8 ], [ 63, %if.then27.8 ] %call29.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.8, i32 noundef 9) %.pre59 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre72 = sext i32 %.pre59 to i64 br label %for.inc31.8 for.inc31.8: ; preds = %i2s.exit.8, %for.inc31.7 %idxprom23.9.pre-phi = phi i64 [ %.pre72, %i2s.exit.8 ], [ %idxprom23.8.pre-phi, %for.inc31.7 ] %32 = phi i32 [ %.pre59, %i2s.exit.8 ], [ %29, %for.inc31.7 ] %arrayidx26.9 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.9.pre-phi, i64 10 %33 = load i8, ptr %arrayidx26.9, align 2, !tbaa !5 %tobool.not.9 = icmp eq i8 %33, 0 br i1 %tobool.not.9, label %if.then27.9, label %for.inc31.9 if.then27.9: ; preds = %for.inc31.8 %or.cond.i.9 = icmp ugt i32 %32, 3 br i1 %or.cond.i.9, label %i2s.exit.9, label %if.end.i.9 if.end.i.9: ; preds = %if.then27.9 %idxprom.i.9 = zext i32 %32 to i64 %arrayidx.i.9 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.9 %34 = load i8, ptr %arrayidx.i.9, align 1, !tbaa !5 %conv.i.9 = sext i8 %34 to i32 br label %i2s.exit.9 i2s.exit.9: ; preds = %if.end.i.9, %if.then27.9 %retval.0.i45.9 = phi i32 [ %conv.i.9, %if.end.i.9 ], [ 63, %if.then27.9 ] %call29.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.9, i32 noundef 10) %.pre60 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre73 = sext i32 %.pre60 to i64 br label %for.inc31.9 for.inc31.9: ; preds = %i2s.exit.9, %for.inc31.8 %idxprom23.10.pre-phi = phi i64 [ %.pre73, %i2s.exit.9 ], [ %idxprom23.9.pre-phi, %for.inc31.8 ] %35 = phi i32 [ %.pre60, %i2s.exit.9 ], [ %32, %for.inc31.8 ] %arrayidx26.10 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.10.pre-phi, i64 11 %36 = load i8, ptr %arrayidx26.10, align 1, !tbaa !5 %tobool.not.10 = icmp eq i8 %36, 0 br i1 %tobool.not.10, label %if.then27.10, label %for.inc31.10 if.then27.10: ; preds = %for.inc31.9 %or.cond.i.10 = icmp ugt i32 %35, 3 br i1 %or.cond.i.10, label %i2s.exit.10, label %if.end.i.10 if.end.i.10: ; preds = %if.then27.10 %idxprom.i.10 = zext i32 %35 to i64 %arrayidx.i.10 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.10 %37 = load i8, ptr %arrayidx.i.10, align 1, !tbaa !5 %conv.i.10 = sext i8 %37 to i32 br label %i2s.exit.10 i2s.exit.10: ; preds = %if.end.i.10, %if.then27.10 %retval.0.i45.10 = phi i32 [ %conv.i.10, %if.end.i.10 ], [ 63, %if.then27.10 ] %call29.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.10, i32 noundef 11) %.pre61 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre74 = sext i32 %.pre61 to i64 br label %for.inc31.10 for.inc31.10: ; preds = %i2s.exit.10, %for.inc31.9 %idxprom23.11.pre-phi = phi i64 [ %.pre74, %i2s.exit.10 ], [ %idxprom23.10.pre-phi, %for.inc31.9 ] %38 = phi i32 [ %.pre61, %i2s.exit.10 ], [ %35, %for.inc31.9 ] %arrayidx26.11 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.11.pre-phi, i64 12 %39 = load i8, ptr %arrayidx26.11, align 2, !tbaa !5 %tobool.not.11 = icmp eq i8 %39, 0 br i1 %tobool.not.11, label %if.then27.11, label %for.inc31.11 if.then27.11: ; preds = %for.inc31.10 %or.cond.i.11 = icmp ugt i32 %38, 3 br i1 %or.cond.i.11, label %i2s.exit.11, label %if.end.i.11 if.end.i.11: ; preds = %if.then27.11 %idxprom.i.11 = zext i32 %38 to i64 %arrayidx.i.11 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.11 %40 = load i8, ptr %arrayidx.i.11, align 1, !tbaa !5 %conv.i.11 = sext i8 %40 to i32 br label %i2s.exit.11 i2s.exit.11: ; preds = %if.end.i.11, %if.then27.11 %retval.0.i45.11 = phi i32 [ %conv.i.11, %if.end.i.11 ], [ 63, %if.then27.11 ] %call29.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.11, i32 noundef 12) %.pre62 = load i32, ptr %asumi_kana, align 4, !tbaa !8 %.pre75 = sext i32 %.pre62 to i64 br label %for.inc31.11 for.inc31.11: ; preds = %i2s.exit.11, %for.inc31.10 %idxprom23.12.pre-phi = phi i64 [ %.pre75, %i2s.exit.11 ], [ %idxprom23.11.pre-phi, %for.inc31.10 ] %41 = phi i32 [ %.pre62, %i2s.exit.11 ], [ %38, %for.inc31.10 ] %arrayidx26.12 = getelementptr inbounds [5 x [14 x i8]], ptr %aru, i64 0, i64 %idxprom23.12.pre-phi, i64 13 %42 = load i8, ptr %arrayidx26.12, align 1, !tbaa !5 %tobool.not.12 = icmp eq i8 %42, 0 br i1 %tobool.not.12, label %if.then27.12, label %for.inc31.12 if.then27.12: ; preds = %for.inc31.11 %or.cond.i.12 = icmp ugt i32 %41, 3 br i1 %or.cond.i.12, label %i2s.exit.12, label %if.end.i.12 if.end.i.12: ; preds = %if.then27.12 %idxprom.i.12 = zext i32 %41 to i64 %arrayidx.i.12 = getelementptr inbounds [5 x i8], ptr @.str, i64 0, i64 %idxprom.i.12 %43 = load i8, ptr %arrayidx.i.12, align 1, !tbaa !5 %conv.i.12 = sext i8 %43 to i32 br label %i2s.exit.12 i2s.exit.12: ; preds = %if.end.i.12, %if.then27.12 %retval.0.i45.12 = phi i32 [ %conv.i.12, %if.end.i.12 ], [ 63, %if.then27.12 ] %call29.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %retval.0.i45.12, i32 noundef 13) %.pre63 = load i32, ptr %asumi_kana, align 4, !tbaa !8 br label %for.inc31.12 for.inc31.12: ; preds = %i2s.exit.12, %for.inc31.11 %44 = phi i32 [ %.pre63, %i2s.exit.12 ], [ %41, %for.inc31.11 ] %inc35 = add nsw i32 %44, 1 store i32 %inc35, ptr %asumi_kana, align 4, !tbaa !8 %cmp16 = icmp slt i32 %44, 3 br i1 %cmp16, label %for.cond19.preheader, label %cleanup37, !llvm.loop !12 cleanup37: ; preds = %for.inc31.12, %cleanup.thread, %entry %retval.2 = phi i32 [ 1, %entry ], [ 1, %cleanup.thread ], [ 0, %for.inc31.12 ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %asumi_kana) #5 call void @llvm.lifetime.end.p0(i64 70, ptr nonnull %aru) #5 ret i32 %retval.2 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(void){ int s,rank,n; char c,suit[4]={'S','H','C','D'}; int card[4][14]; scanf("%d\n",&n); for(s=0;s<4;s++){ for(rank=1; rank<14; rank++){ card[s][rank] = 0; } } for(int i=0;i<n;i++){ scanf("%c %d\n",&c,&rank); for(s=0;s<4;s++){ if(suit[s]==c) card[s][rank]=1; } } for(s=0;s<4;s++){ for(rank=1; rank<14; rank++){ if(card[s][rank] == 0) printf("%c %d\n",suit[s],rank); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215232/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215232/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %rank = alloca i32, align 4 %n = alloca i32, align 4 %c = alloca i8, align 1 %card = alloca [4 x [14 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %rank) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %card) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %scevgep = getelementptr inbounds i8, ptr %card, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.1 = getelementptr inbounds i8, ptr %card, i64 60 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.1, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.2 = getelementptr inbounds i8, ptr %card, i64 116 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.2, i8 0, i64 52, i1 false), !tbaa !5 %scevgep.3 = getelementptr inbounds i8, ptr %card, i64 172 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(52) %scevgep.3, i8 0, i64 52, i1 false), !tbaa !5 store i32 14, ptr %rank, align 4, !tbaa !5 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1074 = icmp sgt i32 %0, 0 br i1 %cmp1074, label %for.body11, label %for.cond31.preheader for.cond31.preheader: ; preds = %for.inc25.3, %entry store i32 1, ptr %rank, align 4, !tbaa !5 br label %for.body38 for.body11: ; preds = %entry, %for.inc25.3 %i.075 = phi i32 [ %inc29, %for.inc25.3 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %rank) %1 = load i8, ptr %c, align 1, !tbaa !9 %2 = load i32, ptr %rank, align 4 %idxprom23 = sext i32 %2 to i64 switch i8 %1, label %for.inc25.3 [ i8 83, label %for.inc25.3.sink.split i8 72, label %if.then.1 i8 67, label %if.then.2 i8 68, label %if.then.3 ] if.then.1: ; preds = %for.body11 br label %for.inc25.3.sink.split if.then.2: ; preds = %for.body11 br label %for.inc25.3.sink.split if.then.3: ; preds = %for.body11 br label %for.inc25.3.sink.split for.inc25.3.sink.split: ; preds = %for.body11, %if.then.3, %if.then.2, %if.then.1 %.sink = phi i64 [ 1, %if.then.1 ], [ 2, %if.then.2 ], [ 3, %if.then.3 ], [ 0, %for.body11 ] %arrayidx24.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 %.sink, i64 %idxprom23 store i32 1, ptr %arrayidx24.1, align 4, !tbaa !5 br label %for.inc25.3 for.inc25.3: ; preds = %for.inc25.3.sink.split, %for.body11 %inc29 = add nuw nsw i32 %i.075, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc29, %3 br i1 %cmp10, label %for.body11, label %for.cond31.preheader, !llvm.loop !10 for.body38: ; preds = %for.cond31.preheader, %for.inc51 %storemerge76 = phi i32 [ 1, %for.cond31.preheader ], [ %inc52, %for.inc51 ] %idxprom41 = sext i32 %storemerge76 to i64 %arrayidx42 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 0, i64 %idxprom41 %4 = load i32, ptr %arrayidx42, align 4, !tbaa !5 %cmp43 = icmp eq i32 %4, 0 br i1 %cmp43, label %if.then45, label %for.inc51 if.then45: ; preds = %for.body38 %call49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 83, i32 noundef %storemerge76) %.pre = load i32, ptr %rank, align 4, !tbaa !5 br label %for.inc51 for.inc51: ; preds = %for.body38, %if.then45 %5 = phi i32 [ %storemerge76, %for.body38 ], [ %.pre, %if.then45 ] %inc52 = add nsw i32 %5, 1 store i32 %inc52, ptr %rank, align 4, !tbaa !5 %cmp36 = icmp slt i32 %5, 13 br i1 %cmp36, label %for.body38, label %for.inc54, !llvm.loop !12 for.inc54: ; preds = %for.inc51 store i32 1, ptr %rank, align 4, !tbaa !5 br label %for.body38.1 for.body38.1: ; preds = %for.inc51.1, %for.inc54 %storemerge76.1 = phi i32 [ 1, %for.inc54 ], [ %inc52.1, %for.inc51.1 ] %idxprom41.1 = sext i32 %storemerge76.1 to i64 %arrayidx42.1 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom41.1 %6 = load i32, ptr %arrayidx42.1, align 4, !tbaa !5 %cmp43.1 = icmp eq i32 %6, 0 br i1 %cmp43.1, label %if.then45.1, label %for.inc51.1 if.then45.1: ; preds = %for.body38.1 %call49.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 72, i32 noundef %storemerge76.1) %.pre82 = load i32, ptr %rank, align 4, !tbaa !5 br label %for.inc51.1 for.inc51.1: ; preds = %if.then45.1, %for.body38.1 %7 = phi i32 [ %.pre82, %if.then45.1 ], [ %storemerge76.1, %for.body38.1 ] %inc52.1 = add nsw i32 %7, 1 store i32 %inc52.1, ptr %rank, align 4, !tbaa !5 %cmp36.1 = icmp slt i32 %7, 13 br i1 %cmp36.1, label %for.body38.1, label %for.inc54.1, !llvm.loop !12 for.inc54.1: ; preds = %for.inc51.1 store i32 1, ptr %rank, align 4, !tbaa !5 br label %for.body38.2 for.body38.2: ; preds = %for.inc51.2, %for.inc54.1 %storemerge76.2 = phi i32 [ 1, %for.inc54.1 ], [ %inc52.2, %for.inc51.2 ] %idxprom41.2 = sext i32 %storemerge76.2 to i64 %arrayidx42.2 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom41.2 %8 = load i32, ptr %arrayidx42.2, align 4, !tbaa !5 %cmp43.2 = icmp eq i32 %8, 0 br i1 %cmp43.2, label %if.then45.2, label %for.inc51.2 if.then45.2: ; preds = %for.body38.2 %call49.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 67, i32 noundef %storemerge76.2) %.pre83 = load i32, ptr %rank, align 4, !tbaa !5 br label %for.inc51.2 for.inc51.2: ; preds = %if.then45.2, %for.body38.2 %9 = phi i32 [ %.pre83, %if.then45.2 ], [ %storemerge76.2, %for.body38.2 ] %inc52.2 = add nsw i32 %9, 1 store i32 %inc52.2, ptr %rank, align 4, !tbaa !5 %cmp36.2 = icmp slt i32 %9, 13 br i1 %cmp36.2, label %for.body38.2, label %for.inc54.2, !llvm.loop !12 for.inc54.2: ; preds = %for.inc51.2 store i32 1, ptr %rank, align 4, !tbaa !5 br label %for.body38.3 for.body38.3: ; preds = %for.inc51.3, %for.inc54.2 %storemerge76.3 = phi i32 [ 1, %for.inc54.2 ], [ %inc52.3, %for.inc51.3 ] %idxprom41.3 = sext i32 %storemerge76.3 to i64 %arrayidx42.3 = getelementptr inbounds [4 x [14 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom41.3 %10 = load i32, ptr %arrayidx42.3, align 4, !tbaa !5 %cmp43.3 = icmp eq i32 %10, 0 br i1 %cmp43.3, label %if.then45.3, label %for.inc51.3 if.then45.3: ; preds = %for.body38.3 %call49.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 68, i32 noundef %storemerge76.3) %.pre84 = load i32, ptr %rank, align 4, !tbaa !5 br label %for.inc51.3 for.inc51.3: ; preds = %if.then45.3, %for.body38.3 %11 = phi i32 [ %.pre84, %if.then45.3 ], [ %storemerge76.3, %for.body38.3 ] %inc52.3 = add nsw i32 %11, 1 store i32 %inc52.3, ptr %rank, align 4, !tbaa !5 %cmp36.3 = icmp slt i32 %11, 13 br i1 %cmp36.3, label %for.body38.3, label %for.inc54.3, !llvm.loop !12 for.inc54.3: ; preds = %for.inc51.3 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %card) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %rank) #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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(void){ int t[4][14]; int n, i,j,c; char m, d; for(i=0; i < 4; i++){ for(j=0; j < 14; j++){ t[i][j]=0; } } scanf("%d", &c); for(i = 0; i < c; i++){ scanf("%c", &d); scanf("%c %d", &m, &n); if(m == 'S'){ t[0][n] = 1; } else if(m == 'H'){ t[1][n] = 1; } else if(m == 'C'){ t[2][n] = 1; } else if(m == 'D'){ t[3][n] = 1; } } for(j=1; j < 14; j++){ if(t[0][j] != 1){ printf("S %d\n", j); } } for(j=1; j < 14; j++){ if(t[1][j] != 1){ printf("H %d\n", j); } } for(j=1; j < 14; j++){ if(t[2][j] != 1){ printf("C %d\n", j); } } for(j=1; j < 14; j++){ if(t[3][j] != 1){ printf("D %d\n", j); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215283/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215283/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%c\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.6 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca [4 x [14 x i32]], align 16 %n = alloca i32, align 4 %c = alloca i32, align 4 %m = alloca i8, align 1 %d = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 224, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %d) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(224) %t, i8 0, i64 224, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %c, align 4, !tbaa !5 %cmp10132 = icmp sgt i32 %0, 0 br i1 %cmp10132, label %for.body11, label %for.cond48.preheader for.cond48.preheader: ; preds = %for.inc45, %entry %arrayidx54 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 1 %1 = load i32, ptr %arrayidx54, align 4, !tbaa !5 %cmp55.not = icmp eq i32 %1, 1 br i1 %cmp55.not, label %for.inc60, label %if.then57 for.body11: ; preds = %entry, %for.inc45 %i.1133 = phi i32 [ %inc46, %for.inc45 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %d) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %m, ptr noundef nonnull %n) %2 = load i8, ptr %m, align 1, !tbaa !9 switch i8 %2, label %for.inc45 [ i8 83, label %if.then i8 72, label %if.then22 i8 67, label %if.then30 i8 68, label %if.then38 ] if.then: ; preds = %for.body11 %3 = load i32, ptr %n, align 4, !tbaa !5 %idxprom17 = sext i32 %3 to i64 %arrayidx18 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 %idxprom17 br label %for.inc45.sink.split if.then22: ; preds = %for.body11 %4 = load i32, ptr %n, align 4, !tbaa !5 %idxprom24 = sext i32 %4 to i64 %arrayidx25 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %5 = load i32, ptr %n, align 4, !tbaa !5 %idxprom32 = sext i32 %5 to i64 %arrayidx33 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 %idxprom32 br label %for.inc45.sink.split if.then38: ; preds = %for.body11 %6 = load i32, ptr %n, align 4, !tbaa !5 %idxprom40 = sext i32 %6 to i64 %arrayidx41 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 %idxprom40 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then22, %if.then38, %if.then30, %if.then %arrayidx18.sink = phi ptr [ %arrayidx18, %if.then ], [ %arrayidx33, %if.then30 ], [ %arrayidx41, %if.then38 ], [ %arrayidx25, %if.then22 ] store i32 1, ptr %arrayidx18.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %i.1133, 1 %7 = load i32, ptr %c, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc46, %7 br i1 %cmp10, label %for.body11, label %for.cond48.preheader, !llvm.loop !10 if.then57: ; preds = %for.cond48.preheader %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc60 for.inc60: ; preds = %for.cond48.preheader, %if.then57 %arrayidx54.1 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 2 %8 = load i32, ptr %arrayidx54.1, align 8, !tbaa !5 %cmp55.not.1 = icmp eq i32 %8, 1 br i1 %cmp55.not.1, label %for.inc60.1, label %if.then57.1 if.then57.1: ; preds = %for.inc60 %call58.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc60.1 for.inc60.1: ; preds = %if.then57.1, %for.inc60 %arrayidx54.2 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 3 %9 = load i32, ptr %arrayidx54.2, align 4, !tbaa !5 %cmp55.not.2 = icmp eq i32 %9, 1 br i1 %cmp55.not.2, label %for.inc60.2, label %if.then57.2 if.then57.2: ; preds = %for.inc60.1 %call58.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc60.2 for.inc60.2: ; preds = %if.then57.2, %for.inc60.1 %arrayidx54.3 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 4 %10 = load i32, ptr %arrayidx54.3, align 16, !tbaa !5 %cmp55.not.3 = icmp eq i32 %10, 1 br i1 %cmp55.not.3, label %for.inc60.3, label %if.then57.3 if.then57.3: ; preds = %for.inc60.2 %call58.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc60.3 for.inc60.3: ; preds = %if.then57.3, %for.inc60.2 %arrayidx54.4 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 5 %11 = load i32, ptr %arrayidx54.4, align 4, !tbaa !5 %cmp55.not.4 = icmp eq i32 %11, 1 br i1 %cmp55.not.4, label %for.inc60.4, label %if.then57.4 if.then57.4: ; preds = %for.inc60.3 %call58.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc60.4 for.inc60.4: ; preds = %if.then57.4, %for.inc60.3 %arrayidx54.5 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 6 %12 = load i32, ptr %arrayidx54.5, align 8, !tbaa !5 %cmp55.not.5 = icmp eq i32 %12, 1 br i1 %cmp55.not.5, label %for.inc60.5, label %if.then57.5 if.then57.5: ; preds = %for.inc60.4 %call58.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc60.5 for.inc60.5: ; preds = %if.then57.5, %for.inc60.4 %arrayidx54.6 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 7 %13 = load i32, ptr %arrayidx54.6, align 4, !tbaa !5 %cmp55.not.6 = icmp eq i32 %13, 1 br i1 %cmp55.not.6, label %for.inc60.6, label %if.then57.6 if.then57.6: ; preds = %for.inc60.5 %call58.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc60.6 for.inc60.6: ; preds = %if.then57.6, %for.inc60.5 %arrayidx54.7 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 8 %14 = load i32, ptr %arrayidx54.7, align 16, !tbaa !5 %cmp55.not.7 = icmp eq i32 %14, 1 br i1 %cmp55.not.7, label %for.inc60.7, label %if.then57.7 if.then57.7: ; preds = %for.inc60.6 %call58.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc60.7 for.inc60.7: ; preds = %if.then57.7, %for.inc60.6 %arrayidx54.8 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 9 %15 = load i32, ptr %arrayidx54.8, align 4, !tbaa !5 %cmp55.not.8 = icmp eq i32 %15, 1 br i1 %cmp55.not.8, label %for.inc60.8, label %if.then57.8 if.then57.8: ; preds = %for.inc60.7 %call58.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc60.8 for.inc60.8: ; preds = %if.then57.8, %for.inc60.7 %arrayidx54.9 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 10 %16 = load i32, ptr %arrayidx54.9, align 8, !tbaa !5 %cmp55.not.9 = icmp eq i32 %16, 1 br i1 %cmp55.not.9, label %for.inc60.9, label %if.then57.9 if.then57.9: ; preds = %for.inc60.8 %call58.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc60.9 for.inc60.9: ; preds = %if.then57.9, %for.inc60.8 %arrayidx54.10 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 11 %17 = load i32, ptr %arrayidx54.10, align 4, !tbaa !5 %cmp55.not.10 = icmp eq i32 %17, 1 br i1 %cmp55.not.10, label %for.inc60.10, label %if.then57.10 if.then57.10: ; preds = %for.inc60.9 %call58.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc60.10 for.inc60.10: ; preds = %if.then57.10, %for.inc60.9 %arrayidx54.11 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 12 %18 = load i32, ptr %arrayidx54.11, align 16, !tbaa !5 %cmp55.not.11 = icmp eq i32 %18, 1 br i1 %cmp55.not.11, label %for.inc60.11, label %if.then57.11 if.then57.11: ; preds = %for.inc60.10 %call58.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc60.11 for.inc60.11: ; preds = %if.then57.11, %for.inc60.10 %arrayidx54.12 = getelementptr inbounds [14 x i32], ptr %t, i64 0, i64 13 %19 = load i32, ptr %arrayidx54.12, align 4, !tbaa !5 %cmp55.not.12 = icmp eq i32 %19, 1 br i1 %cmp55.not.12, label %for.inc60.12, label %if.then57.12 if.then57.12: ; preds = %for.inc60.11 %call58.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc60.12 for.inc60.12: ; preds = %if.then57.12, %for.inc60.11 %arrayidx69 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 1 %20 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %cmp70.not = icmp eq i32 %20, 1 br i1 %cmp70.not, label %for.inc75, label %if.then72 if.then72: ; preds = %for.inc60.12 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc75 for.inc75: ; preds = %for.inc60.12, %if.then72 %arrayidx69.1 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 2 %21 = load i32, ptr %arrayidx69.1, align 16, !tbaa !5 %cmp70.not.1 = icmp eq i32 %21, 1 br i1 %cmp70.not.1, label %for.inc75.1, label %if.then72.1 if.then72.1: ; preds = %for.inc75 %call73.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc75.1 for.inc75.1: ; preds = %if.then72.1, %for.inc75 %arrayidx69.2 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 3 %22 = load i32, ptr %arrayidx69.2, align 4, !tbaa !5 %cmp70.not.2 = icmp eq i32 %22, 1 br i1 %cmp70.not.2, label %for.inc75.2, label %if.then72.2 if.then72.2: ; preds = %for.inc75.1 %call73.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc75.2 for.inc75.2: ; preds = %if.then72.2, %for.inc75.1 %arrayidx69.3 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 4 %23 = load i32, ptr %arrayidx69.3, align 8, !tbaa !5 %cmp70.not.3 = icmp eq i32 %23, 1 br i1 %cmp70.not.3, label %for.inc75.3, label %if.then72.3 if.then72.3: ; preds = %for.inc75.2 %call73.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc75.3 for.inc75.3: ; preds = %if.then72.3, %for.inc75.2 %arrayidx69.4 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 5 %24 = load i32, ptr %arrayidx69.4, align 4, !tbaa !5 %cmp70.not.4 = icmp eq i32 %24, 1 br i1 %cmp70.not.4, label %for.inc75.4, label %if.then72.4 if.then72.4: ; preds = %for.inc75.3 %call73.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc75.4 for.inc75.4: ; preds = %if.then72.4, %for.inc75.3 %arrayidx69.5 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 6 %25 = load i32, ptr %arrayidx69.5, align 16, !tbaa !5 %cmp70.not.5 = icmp eq i32 %25, 1 br i1 %cmp70.not.5, label %for.inc75.5, label %if.then72.5 if.then72.5: ; preds = %for.inc75.4 %call73.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc75.5 for.inc75.5: ; preds = %if.then72.5, %for.inc75.4 %arrayidx69.6 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 7 %26 = load i32, ptr %arrayidx69.6, align 4, !tbaa !5 %cmp70.not.6 = icmp eq i32 %26, 1 br i1 %cmp70.not.6, label %for.inc75.6, label %if.then72.6 if.then72.6: ; preds = %for.inc75.5 %call73.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc75.6 for.inc75.6: ; preds = %if.then72.6, %for.inc75.5 %arrayidx69.7 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 8 %27 = load i32, ptr %arrayidx69.7, align 8, !tbaa !5 %cmp70.not.7 = icmp eq i32 %27, 1 br i1 %cmp70.not.7, label %for.inc75.7, label %if.then72.7 if.then72.7: ; preds = %for.inc75.6 %call73.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc75.7 for.inc75.7: ; preds = %if.then72.7, %for.inc75.6 %arrayidx69.8 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 9 %28 = load i32, ptr %arrayidx69.8, align 4, !tbaa !5 %cmp70.not.8 = icmp eq i32 %28, 1 br i1 %cmp70.not.8, label %for.inc75.8, label %if.then72.8 if.then72.8: ; preds = %for.inc75.7 %call73.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc75.8 for.inc75.8: ; preds = %if.then72.8, %for.inc75.7 %arrayidx69.9 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 10 %29 = load i32, ptr %arrayidx69.9, align 16, !tbaa !5 %cmp70.not.9 = icmp eq i32 %29, 1 br i1 %cmp70.not.9, label %for.inc75.9, label %if.then72.9 if.then72.9: ; preds = %for.inc75.8 %call73.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc75.9 for.inc75.9: ; preds = %if.then72.9, %for.inc75.8 %arrayidx69.10 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 11 %30 = load i32, ptr %arrayidx69.10, align 4, !tbaa !5 %cmp70.not.10 = icmp eq i32 %30, 1 br i1 %cmp70.not.10, label %for.inc75.10, label %if.then72.10 if.then72.10: ; preds = %for.inc75.9 %call73.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc75.10 for.inc75.10: ; preds = %if.then72.10, %for.inc75.9 %arrayidx69.11 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 12 %31 = load i32, ptr %arrayidx69.11, align 8, !tbaa !5 %cmp70.not.11 = icmp eq i32 %31, 1 br i1 %cmp70.not.11, label %for.inc75.11, label %if.then72.11 if.then72.11: ; preds = %for.inc75.10 %call73.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc75.11 for.inc75.11: ; preds = %if.then72.11, %for.inc75.10 %arrayidx69.12 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 1, i64 13 %32 = load i32, ptr %arrayidx69.12, align 4, !tbaa !5 %cmp70.not.12 = icmp eq i32 %32, 1 br i1 %cmp70.not.12, label %for.inc75.12, label %if.then72.12 if.then72.12: ; preds = %for.inc75.11 %call73.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc75.12 for.inc75.12: ; preds = %if.then72.12, %for.inc75.11 %arrayidx84 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 1 %33 = load i32, ptr %arrayidx84, align 4, !tbaa !5 %cmp85.not = icmp eq i32 %33, 1 br i1 %cmp85.not, label %for.inc90, label %if.then87 if.then87: ; preds = %for.inc75.12 %call88 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc90 for.inc90: ; preds = %for.inc75.12, %if.then87 %arrayidx84.1 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 2 %34 = load i32, ptr %arrayidx84.1, align 8, !tbaa !5 %cmp85.not.1 = icmp eq i32 %34, 1 br i1 %cmp85.not.1, label %for.inc90.1, label %if.then87.1 if.then87.1: ; preds = %for.inc90 %call88.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc90.1 for.inc90.1: ; preds = %if.then87.1, %for.inc90 %arrayidx84.2 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 3 %35 = load i32, ptr %arrayidx84.2, align 4, !tbaa !5 %cmp85.not.2 = icmp eq i32 %35, 1 br i1 %cmp85.not.2, label %for.inc90.2, label %if.then87.2 if.then87.2: ; preds = %for.inc90.1 %call88.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc90.2 for.inc90.2: ; preds = %if.then87.2, %for.inc90.1 %arrayidx84.3 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 4 %36 = load i32, ptr %arrayidx84.3, align 16, !tbaa !5 %cmp85.not.3 = icmp eq i32 %36, 1 br i1 %cmp85.not.3, label %for.inc90.3, label %if.then87.3 if.then87.3: ; preds = %for.inc90.2 %call88.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc90.3 for.inc90.3: ; preds = %if.then87.3, %for.inc90.2 %arrayidx84.4 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 5 %37 = load i32, ptr %arrayidx84.4, align 4, !tbaa !5 %cmp85.not.4 = icmp eq i32 %37, 1 br i1 %cmp85.not.4, label %for.inc90.4, label %if.then87.4 if.then87.4: ; preds = %for.inc90.3 %call88.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc90.4 for.inc90.4: ; preds = %if.then87.4, %for.inc90.3 %arrayidx84.5 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 6 %38 = load i32, ptr %arrayidx84.5, align 8, !tbaa !5 %cmp85.not.5 = icmp eq i32 %38, 1 br i1 %cmp85.not.5, label %for.inc90.5, label %if.then87.5 if.then87.5: ; preds = %for.inc90.4 %call88.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc90.5 for.inc90.5: ; preds = %if.then87.5, %for.inc90.4 %arrayidx84.6 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 7 %39 = load i32, ptr %arrayidx84.6, align 4, !tbaa !5 %cmp85.not.6 = icmp eq i32 %39, 1 br i1 %cmp85.not.6, label %for.inc90.6, label %if.then87.6 if.then87.6: ; preds = %for.inc90.5 %call88.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc90.6 for.inc90.6: ; preds = %if.then87.6, %for.inc90.5 %arrayidx84.7 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 8 %40 = load i32, ptr %arrayidx84.7, align 16, !tbaa !5 %cmp85.not.7 = icmp eq i32 %40, 1 br i1 %cmp85.not.7, label %for.inc90.7, label %if.then87.7 if.then87.7: ; preds = %for.inc90.6 %call88.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc90.7 for.inc90.7: ; preds = %if.then87.7, %for.inc90.6 %arrayidx84.8 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 9 %41 = load i32, ptr %arrayidx84.8, align 4, !tbaa !5 %cmp85.not.8 = icmp eq i32 %41, 1 br i1 %cmp85.not.8, label %for.inc90.8, label %if.then87.8 if.then87.8: ; preds = %for.inc90.7 %call88.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc90.8 for.inc90.8: ; preds = %if.then87.8, %for.inc90.7 %arrayidx84.9 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 10 %42 = load i32, ptr %arrayidx84.9, align 8, !tbaa !5 %cmp85.not.9 = icmp eq i32 %42, 1 br i1 %cmp85.not.9, label %for.inc90.9, label %if.then87.9 if.then87.9: ; preds = %for.inc90.8 %call88.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc90.9 for.inc90.9: ; preds = %if.then87.9, %for.inc90.8 %arrayidx84.10 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 11 %43 = load i32, ptr %arrayidx84.10, align 4, !tbaa !5 %cmp85.not.10 = icmp eq i32 %43, 1 br i1 %cmp85.not.10, label %for.inc90.10, label %if.then87.10 if.then87.10: ; preds = %for.inc90.9 %call88.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc90.10 for.inc90.10: ; preds = %if.then87.10, %for.inc90.9 %arrayidx84.11 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 12 %44 = load i32, ptr %arrayidx84.11, align 16, !tbaa !5 %cmp85.not.11 = icmp eq i32 %44, 1 br i1 %cmp85.not.11, label %for.inc90.11, label %if.then87.11 if.then87.11: ; preds = %for.inc90.10 %call88.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc90.11 for.inc90.11: ; preds = %if.then87.11, %for.inc90.10 %arrayidx84.12 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 2, i64 13 %45 = load i32, ptr %arrayidx84.12, align 4, !tbaa !5 %cmp85.not.12 = icmp eq i32 %45, 1 br i1 %cmp85.not.12, label %for.inc90.12, label %if.then87.12 if.then87.12: ; preds = %for.inc90.11 %call88.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc90.12 for.inc90.12: ; preds = %if.then87.12, %for.inc90.11 %arrayidx99 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 1 %46 = load i32, ptr %arrayidx99, align 4, !tbaa !5 %cmp100.not = icmp eq i32 %46, 1 br i1 %cmp100.not, label %for.inc105, label %if.then102 if.then102: ; preds = %for.inc90.12 %call103 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 1) br label %for.inc105 for.inc105: ; preds = %for.inc90.12, %if.then102 %arrayidx99.1 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 2 %47 = load i32, ptr %arrayidx99.1, align 16, !tbaa !5 %cmp100.not.1 = icmp eq i32 %47, 1 br i1 %cmp100.not.1, label %for.inc105.1, label %if.then102.1 if.then102.1: ; preds = %for.inc105 %call103.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 2) br label %for.inc105.1 for.inc105.1: ; preds = %if.then102.1, %for.inc105 %arrayidx99.2 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 3 %48 = load i32, ptr %arrayidx99.2, align 4, !tbaa !5 %cmp100.not.2 = icmp eq i32 %48, 1 br i1 %cmp100.not.2, label %for.inc105.2, label %if.then102.2 if.then102.2: ; preds = %for.inc105.1 %call103.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 3) br label %for.inc105.2 for.inc105.2: ; preds = %if.then102.2, %for.inc105.1 %arrayidx99.3 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 4 %49 = load i32, ptr %arrayidx99.3, align 8, !tbaa !5 %cmp100.not.3 = icmp eq i32 %49, 1 br i1 %cmp100.not.3, label %for.inc105.3, label %if.then102.3 if.then102.3: ; preds = %for.inc105.2 %call103.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 4) br label %for.inc105.3 for.inc105.3: ; preds = %if.then102.3, %for.inc105.2 %arrayidx99.4 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 5 %50 = load i32, ptr %arrayidx99.4, align 4, !tbaa !5 %cmp100.not.4 = icmp eq i32 %50, 1 br i1 %cmp100.not.4, label %for.inc105.4, label %if.then102.4 if.then102.4: ; preds = %for.inc105.3 %call103.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 5) br label %for.inc105.4 for.inc105.4: ; preds = %if.then102.4, %for.inc105.3 %arrayidx99.5 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 6 %51 = load i32, ptr %arrayidx99.5, align 16, !tbaa !5 %cmp100.not.5 = icmp eq i32 %51, 1 br i1 %cmp100.not.5, label %for.inc105.5, label %if.then102.5 if.then102.5: ; preds = %for.inc105.4 %call103.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 6) br label %for.inc105.5 for.inc105.5: ; preds = %if.then102.5, %for.inc105.4 %arrayidx99.6 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 7 %52 = load i32, ptr %arrayidx99.6, align 4, !tbaa !5 %cmp100.not.6 = icmp eq i32 %52, 1 br i1 %cmp100.not.6, label %for.inc105.6, label %if.then102.6 if.then102.6: ; preds = %for.inc105.5 %call103.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 7) br label %for.inc105.6 for.inc105.6: ; preds = %if.then102.6, %for.inc105.5 %arrayidx99.7 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 8 %53 = load i32, ptr %arrayidx99.7, align 8, !tbaa !5 %cmp100.not.7 = icmp eq i32 %53, 1 br i1 %cmp100.not.7, label %for.inc105.7, label %if.then102.7 if.then102.7: ; preds = %for.inc105.6 %call103.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 8) br label %for.inc105.7 for.inc105.7: ; preds = %if.then102.7, %for.inc105.6 %arrayidx99.8 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 9 %54 = load i32, ptr %arrayidx99.8, align 4, !tbaa !5 %cmp100.not.8 = icmp eq i32 %54, 1 br i1 %cmp100.not.8, label %for.inc105.8, label %if.then102.8 if.then102.8: ; preds = %for.inc105.7 %call103.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 9) br label %for.inc105.8 for.inc105.8: ; preds = %if.then102.8, %for.inc105.7 %arrayidx99.9 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 10 %55 = load i32, ptr %arrayidx99.9, align 16, !tbaa !5 %cmp100.not.9 = icmp eq i32 %55, 1 br i1 %cmp100.not.9, label %for.inc105.9, label %if.then102.9 if.then102.9: ; preds = %for.inc105.8 %call103.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 10) br label %for.inc105.9 for.inc105.9: ; preds = %if.then102.9, %for.inc105.8 %arrayidx99.10 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 11 %56 = load i32, ptr %arrayidx99.10, align 4, !tbaa !5 %cmp100.not.10 = icmp eq i32 %56, 1 br i1 %cmp100.not.10, label %for.inc105.10, label %if.then102.10 if.then102.10: ; preds = %for.inc105.9 %call103.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 11) br label %for.inc105.10 for.inc105.10: ; preds = %if.then102.10, %for.inc105.9 %arrayidx99.11 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 12 %57 = load i32, ptr %arrayidx99.11, align 8, !tbaa !5 %cmp100.not.11 = icmp eq i32 %57, 1 br i1 %cmp100.not.11, label %for.inc105.11, label %if.then102.11 if.then102.11: ; preds = %for.inc105.10 %call103.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 12) br label %for.inc105.11 for.inc105.11: ; preds = %if.then102.11, %for.inc105.10 %arrayidx99.12 = getelementptr inbounds [4 x [14 x i32]], ptr %t, i64 0, i64 3, i64 13 %58 = load i32, ptr %arrayidx99.12, align 4, !tbaa !5 %cmp100.not.12 = icmp eq i32 %58, 1 br i1 %cmp100.not.12, label %for.inc105.12, label %if.then102.12 if.then102.12: ; preds = %for.inc105.11 %call103.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef 13) br label %for.inc105.12 for.inc105.12: ; preds = %if.then102.12, %for.inc105.11 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 224, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int total,a; char ch, r; int j,i; int cards[4][13]; for(i=0;i<4;i++){ for(j=1;j<14;j++){ cards[i][j]=0; } } scanf("%d",&total); for(a=0;a<total;a++){ scanf("%c%c %d",&r,&ch,&j); if(ch=='S') i=0; if(ch=='H') i=1; if(ch=='C') i=2; if(ch=='D') i=3; cards[i][j]=1; } for(i=0;i<4;i++){ for(j=1;j<14;j++){ if(cards[i][j]!=1){ if(i==0) ch='S'; if(i==1) ch='H'; if(i==2) ch='C'; if(i==3) ch='D'; printf("%c %d\n",ch,j); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215326/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215326/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [8 x i8] c"%c%c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %total = alloca i32, align 4 %ch = alloca i8, align 1 %r = alloca i8, align 1 %j = alloca i32, align 4 %cards = alloca [4 x [13 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %total) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %ch) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #4 %scevgep99 = getelementptr inbounds i8, ptr %cards, i64 4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(208) %scevgep99, i8 0, i64 208, i1 false), !tbaa !5 store i32 14, ptr %j, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %total) %0 = load i32, ptr %total, align 4, !tbaa !5 %cmp1093 = icmp sgt i32 %0, 0 br i1 %cmp1093, label %for.body11, label %for.cond37.preheader for.cond37.preheader: ; preds = %for.body11, %entry store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body44 for.body11: ; preds = %entry, %for.body11 %i.195 = phi i32 [ %i.5, %for.body11 ], [ 4, %entry ] %a.094 = phi i32 [ %inc35, %for.body11 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %r, ptr noundef nonnull %ch, ptr noundef nonnull %j) %1 = load i8, ptr %ch, align 1, !tbaa !9 %cmp13 = icmp eq i8 %1, 83 %spec.select = select i1 %cmp13, i32 0, i32 %i.195 %cmp16 = icmp eq i8 %1, 72 %i.3 = select i1 %cmp16, i32 1, i32 %spec.select %cmp21 = icmp eq i8 %1, 67 %i.4 = select i1 %cmp21, i32 2, i32 %i.3 %cmp26 = icmp eq i8 %1, 68 %i.5 = select i1 %cmp26, i32 3, i32 %i.4 %idxprom30 = zext i32 %i.5 to i64 %2 = load i32, ptr %j, align 4, !tbaa !5 %idxprom32 = sext i32 %2 to i64 %arrayidx33 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %idxprom30, i64 %idxprom32 store i32 1, ptr %arrayidx33, align 4, !tbaa !5 %inc35 = add nuw nsw i32 %a.094, 1 %3 = load i32, ptr %total, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc35, %3 br i1 %cmp10, label %for.body11, label %for.cond37.preheader, !llvm.loop !10 for.body44: ; preds = %for.cond37.preheader, %for.inc71 %storemerge96 = phi i32 [ 1, %for.cond37.preheader ], [ %inc72, %for.inc71 ] %idxprom47 = sext i32 %storemerge96 to i64 %arrayidx48 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 0, i64 %idxprom47 %4 = load i32, ptr %arrayidx48, align 4, !tbaa !5 %cmp49.not = icmp eq i32 %4, 1 br i1 %cmp49.not, label %for.inc71, label %if.end67 if.end67: ; preds = %for.body44 store i8 83, ptr %ch, align 1, !tbaa !9 %call69 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef %storemerge96) %.pre102 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc71 for.inc71: ; preds = %for.body44, %if.end67 %5 = phi i32 [ %storemerge96, %for.body44 ], [ %.pre102, %if.end67 ] %inc72 = add nsw i32 %5, 1 store i32 %inc72, ptr %j, align 4, !tbaa !5 %cmp42 = icmp slt i32 %5, 13 br i1 %cmp42, label %for.body44, label %for.inc74, !llvm.loop !12 for.inc74: ; preds = %for.inc71 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body44.1 for.body44.1: ; preds = %for.inc71.1, %for.inc74 %storemerge96.1 = phi i32 [ 1, %for.inc74 ], [ %inc72.1, %for.inc71.1 ] %idxprom47.1 = sext i32 %storemerge96.1 to i64 %arrayidx48.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom47.1 %6 = load i32, ptr %arrayidx48.1, align 4, !tbaa !5 %cmp49.not.1 = icmp eq i32 %6, 1 br i1 %cmp49.not.1, label %for.inc71.1, label %if.end67.1 if.end67.1: ; preds = %for.body44.1 store i8 72, ptr %ch, align 1, !tbaa !9 %call69.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef %storemerge96.1) %.pre104 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc71.1 for.inc71.1: ; preds = %if.end67.1, %for.body44.1 %7 = phi i32 [ %.pre104, %if.end67.1 ], [ %storemerge96.1, %for.body44.1 ] %inc72.1 = add nsw i32 %7, 1 store i32 %inc72.1, ptr %j, align 4, !tbaa !5 %cmp42.1 = icmp slt i32 %7, 13 br i1 %cmp42.1, label %for.body44.1, label %for.inc74.1, !llvm.loop !12 for.inc74.1: ; preds = %for.inc71.1 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body44.2 for.body44.2: ; preds = %for.inc71.2, %for.inc74.1 %storemerge96.2 = phi i32 [ 1, %for.inc74.1 ], [ %inc72.2, %for.inc71.2 ] %idxprom47.2 = sext i32 %storemerge96.2 to i64 %arrayidx48.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom47.2 %8 = load i32, ptr %arrayidx48.2, align 4, !tbaa !5 %cmp49.not.2 = icmp eq i32 %8, 1 br i1 %cmp49.not.2, label %for.inc71.2, label %if.end67.2 if.end67.2: ; preds = %for.body44.2 store i8 67, ptr %ch, align 1, !tbaa !9 %call69.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef %storemerge96.2) %.pre106 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc71.2 for.inc71.2: ; preds = %if.end67.2, %for.body44.2 %9 = phi i32 [ %.pre106, %if.end67.2 ], [ %storemerge96.2, %for.body44.2 ] %inc72.2 = add nsw i32 %9, 1 store i32 %inc72.2, ptr %j, align 4, !tbaa !5 %cmp42.2 = icmp slt i32 %9, 13 br i1 %cmp42.2, label %for.body44.2, label %for.inc74.2, !llvm.loop !12 for.inc74.2: ; preds = %for.inc71.2 store i32 1, ptr %j, align 4, !tbaa !5 br label %for.body44.3 for.body44.3: ; preds = %for.inc71.3, %for.inc74.2 %storemerge96.3 = phi i32 [ 1, %for.inc74.2 ], [ %inc72.3, %for.inc71.3 ] %idxprom47.3 = sext i32 %storemerge96.3 to i64 %arrayidx48.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom47.3 %10 = load i32, ptr %arrayidx48.3, align 4, !tbaa !5 %cmp49.not.3 = icmp eq i32 %10, 1 br i1 %cmp49.not.3, label %for.inc71.3, label %if.end67.3 if.end67.3: ; preds = %for.body44.3 store i8 68, ptr %ch, align 1, !tbaa !9 %call69.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef %storemerge96.3) %.pre108 = load i32, ptr %j, align 4, !tbaa !5 br label %for.inc71.3 for.inc71.3: ; preds = %if.end67.3, %for.body44.3 %11 = phi i32 [ %.pre108, %if.end67.3 ], [ %storemerge96.3, %for.body44.3 ] %inc72.3 = add nsw i32 %11, 1 store i32 %inc72.3, ptr %j, align 4, !tbaa !5 %cmp42.3 = icmp slt i32 %11, 13 br i1 %cmp42.3, label %for.body44.3, label %for.inc74.3, !llvm.loop !12 for.inc74.3: ; preds = %for.inc71.3 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %r) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %ch) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %total) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main() { int n,a[200001],i,j,k; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&a[i]); } printf("%d %d\n",a[1]-a[0],a[n-1]-a[0]); for(i=1;i<n-1;i++) { j=a[i+1]-a[i]; if(a[i]-a[i-1] < a[i+1]-a[i]) j=a[i]-a[i-1]; k=a[n-1]-a[i]; if(a[i]-a[0] > a[n-1]-a[i]) k=a[i]-a[0]; printf("%d %d\n",j,k); } printf("%d %d\n",a[n-1]-a[n-2],a[n-1]-a[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21537/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21537/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [200001 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 800004, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp95 = icmp sgt i32 %0, 0 br i1 %cmp95, 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 [200001 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %arrayidx2.phi.trans.insert = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 1 %.pre = load i32, ptr %arrayidx2.phi.trans.insert, align 4, !tbaa !5 %.pre111 = load i32, ptr %a, align 16, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %3 = phi i32 [ undef, %entry ], [ %.pre111, %for.end.loopexit ] %4 = phi i32 [ undef, %entry ], [ %.pre, %for.end.loopexit ] %.lcssa94 = phi i32 [ %0, %entry ], [ %1, %for.end.loopexit ] %sub = sub nsw i32 %4, %3 %sub4 = add nsw i32 %.lcssa94, -1 %idxprom5 = sext i32 %sub4 to i64 %arrayidx6 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %idxprom5 %5 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %sub8 = sub nsw i32 %5, %3 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub, i32 noundef %sub8) %6 = load i32, ptr %n, align 4, !tbaa !5 %sub1197 = add nsw i32 %6, -1 %cmp1298 = icmp sgt i32 %6, 2 br i1 %cmp1298, label %for.body13, label %for.end.for.end64_crit_edge for.end.for.end64_crit_edge: ; preds = %for.end %.pre112 = sext i32 %sub1197 to i64 br label %for.end64 for.body13: ; preds = %for.end, %for.body13 %indvars.iv107 = phi i64 [ %indvars.iv.next108, %for.body13 ], [ 1, %for.end ] %sub11100 = phi i32 [ %sub11, %for.body13 ], [ %sub1197, %for.end ] %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1 %arrayidx15 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %indvars.iv.next108 %7 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %arrayidx17 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %indvars.iv107 %8 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %sub18 = sub nsw i32 %7, %8 %9 = add nsw i64 %indvars.iv107, -1 %arrayidx23 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %9 %10 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %sub24 = sub nsw i32 %8, %10 %spec.select = call i32 @llvm.smin.i32(i32 %sub24, i32 %sub18) %idxprom39 = sext i32 %sub11100 to i64 %arrayidx40 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %idxprom39 %11 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %sub43 = sub nsw i32 %11, %8 %12 = load i32, ptr %a, align 16, !tbaa !5 %sub47 = sub nsw i32 %8, %12 %k.0 = call i32 @llvm.smax.i32(i32 %sub47, i32 %sub43) %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select, i32 noundef %k.0) %13 = load i32, ptr %n, align 4, !tbaa !5 %sub11 = add nsw i32 %13, -1 %14 = sext i32 %sub11 to i64 %cmp12 = icmp slt i64 %indvars.iv.next108, %14 br i1 %cmp12, label %for.body13, label %for.end64, !llvm.loop !11 for.end64: ; preds = %for.body13, %for.end.for.end64_crit_edge %idxprom66.pre-phi = phi i64 [ %.pre112, %for.end.for.end64_crit_edge ], [ %14, %for.body13 ] %.lcssa = phi i32 [ %6, %for.end.for.end64_crit_edge ], [ %13, %for.body13 ] %arrayidx67 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %idxprom66.pre-phi %15 = load i32, ptr %arrayidx67, align 4, !tbaa !5 %sub68 = add nsw i32 %.lcssa, -2 %idxprom69 = sext i32 %sub68 to i64 %arrayidx70 = getelementptr inbounds [200001 x i32], ptr %a, i64 0, i64 %idxprom69 %16 = load i32, ptr %arrayidx70, align 4, !tbaa !5 %sub71 = sub nsw i32 %15, %16 %17 = load i32, ptr %a, align 16, !tbaa !5 %sub76 = sub nsw i32 %15, %17 %call77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub71, i32 noundef %sub76) call void @llvm.lifetime.end.p0(i64 800004, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #define min(a,b) (((a)>=(b))?(b):(a)) #define max(a,b) (((a)>=(b))?(a):(b)) int ar[150000],hs[4],a; void hes(int s){ hs[0]=-2100000000; hs[1]=2100000000; hs[2]=2100000000; hs[3]=-2100000000; if(s>0){ hs[1]=ar[s]-ar[s-1]; hs[0]=ar[s]-ar[0]; } if(s<a-1){ hs[2]=ar[s+1]-ar[s]; hs[3]=ar[a-1]-ar[s]; } printf("%d %d\n",min(hs[1],hs[2]),max(hs[0],hs[3])); } int main () { int i,c=0,x; scanf("%d",&a); for(i=0;i<a;i++){ scanf("%d",&ar[i]); if(i==0&&ar[i]<0){ c++; x=ar[0]; } if(c){ ar[i]-=x; ar[i]++; } } for(i=0;i<a;i++) hes(i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21542/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21542/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @hs = dso_local local_unnamed_addr global [4 x i32] zeroinitializer, align 16 @ar = dso_local global [150000 x i32] zeroinitializer, align 16 @a = dso_local global i32 0, align 4 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @hes(i32 noundef %s) local_unnamed_addr #0 { entry: store <4 x i32> <i32 -2100000000, i32 2100000000, i32 2100000000, i32 -2100000000>, ptr @hs, align 16, !tbaa !5 %cmp = icmp sgt i32 %s, 0 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %idxprom = zext i32 %s to i64 %arrayidx = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %sub = add nsw i32 %s, -1 %idxprom1 = zext i32 %sub to i64 %arrayidx2 = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom1 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %sub3 = sub nsw i32 %0, %1 store i32 %sub3, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 1), align 4, !tbaa !5 %2 = load i32, ptr @ar, align 16, !tbaa !5 %sub6 = sub nsw i32 %0, %2 store i32 %sub6, ptr @hs, align 16, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %3 = phi i32 [ %sub6, %if.then ], [ -2100000000, %entry ] %4 = phi i32 [ %sub3, %if.then ], [ 2100000000, %entry ] %5 = load i32, ptr @a, align 4, !tbaa !5 %sub7 = add nsw i32 %5, -1 %cmp8 = icmp sgt i32 %sub7, %s br i1 %cmp8, label %if.then9, label %if.end21 if.then9: ; preds = %if.end %add = add nsw i32 %s, 1 %idxprom10 = sext i32 %add to i64 %arrayidx11 = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom10 %6 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %idxprom12 = sext i32 %s to i64 %arrayidx13 = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom12 %7 = load i32, ptr %arrayidx13, align 4, !tbaa !5 %sub14 = sub nsw i32 %6, %7 store i32 %sub14, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 2), align 8, !tbaa !5 %idxprom16 = sext i32 %sub7 to i64 %arrayidx17 = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom16 %8 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %sub20 = sub nsw i32 %8, %7 store i32 %sub20, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 3), align 4, !tbaa !5 br label %if.end21 if.end21: ; preds = %if.then9, %if.end %9 = phi i32 [ %sub20, %if.then9 ], [ -2100000000, %if.end ] %10 = phi i32 [ %sub14, %if.then9 ], [ 2100000000, %if.end ] %cond = tail call i32 @llvm.smin.i32(i32 %4, i32 %10) %cond27 = tail call i32 @llvm.smax.i32(i32 %3, i32 %9) %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %cond, i32 noundef %cond27) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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.1, ptr noundef nonnull @a) %0 = load i32, ptr @a, align 4, !tbaa !5 %cmp30 = icmp sgt i32 %0, 0 br i1 %cmp30, label %land.lhs.true.peel, label %for.end19 land.lhs.true.peel: ; preds = %entry %call1.peel = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @ar) %1 = load i32, ptr @ar, align 16, !tbaa !5 %cmp5.peel = icmp sgt i32 %1, -1 br i1 %cmp5.peel, label %for.inc.peel, label %if.then6.peel if.then6.peel: ; preds = %land.lhs.true.peel %2 = load i32, ptr @ar, align 16, !tbaa !5 %reass.sub.peel = sub i32 %2, %1 %inc11.peel = add i32 %reass.sub.peel, 1 store i32 %inc11.peel, ptr @ar, align 16, !tbaa !5 br label %for.inc.peel for.inc.peel: ; preds = %if.then6.peel, %land.lhs.true.peel %3 = load i32, ptr @a, align 4, !tbaa !5 %cmp.peel = icmp sgt i32 %3, 1 br i1 %cmp.peel, label %if.end, label %for.cond14.preheader for.cond14.preheader: ; preds = %for.inc, %for.inc.peel %4 = phi i32 [ %3, %for.inc.peel ], [ %13, %for.inc ] %cmp1534 = icmp sgt i32 %4, 0 br i1 %cmp1534, label %if.end.i.peel, label %for.end19 if.end.i.peel: ; preds = %for.cond14.preheader store <4 x i32> <i32 -2100000000, i32 2100000000, i32 2100000000, i32 -2100000000>, ptr @hs, align 16, !tbaa !5 %cmp8.i.peel.not = icmp eq i32 %4, 1 br i1 %cmp8.i.peel.not, label %hes.exit.peel, label %if.then9.i.peel if.then9.i.peel: ; preds = %if.end.i.peel %sub7.i.peel = add nsw i32 %4, -1 %5 = zext i32 %sub7.i.peel to i64 %6 = load i32, ptr getelementptr inbounds ([150000 x i32], ptr @ar, i64 0, i64 1), align 4, !tbaa !5 %7 = load i32, ptr @ar, align 16, !tbaa !5 %sub14.i.peel = sub nsw i32 %6, %7 store i32 %sub14.i.peel, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 2), align 8, !tbaa !5 %arrayidx17.i.peel = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %5 %8 = load i32, ptr %arrayidx17.i.peel, align 4, !tbaa !5 %sub20.i.peel = sub nsw i32 %8, %7 store i32 %sub20.i.peel, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 3), align 4, !tbaa !5 br label %hes.exit.peel hes.exit.peel: ; preds = %if.then9.i.peel, %if.end.i.peel %9 = phi i32 [ %sub20.i.peel, %if.then9.i.peel ], [ -2100000000, %if.end.i.peel ] %10 = phi i32 [ %sub14.i.peel, %if.then9.i.peel ], [ 2100000000, %if.end.i.peel ] %cond.i.peel = tail call i32 @llvm.smin.i32(i32 %10, i32 2100000000) %cond27.i.peel = tail call i32 @llvm.smax.i32(i32 %9, i32 -2100000000) %call.i.peel = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %cond.i.peel, i32 noundef %cond27.i.peel) %11 = load i32, ptr @a, align 4, !tbaa !5 %cmp15.peel = icmp sgt i32 %11, 1 br i1 %cmp15.peel, label %if.end.i, label %for.end19 if.end: ; preds = %for.inc.peel, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 1, %for.inc.peel ] %arrayidx = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %indvars.iv %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) br i1 %cmp5.peel, label %for.inc, label %if.then6 if.then6: ; preds = %if.end %12 = load i32, ptr %arrayidx, align 4, !tbaa !5 %reass.sub = sub i32 %12, %1 %inc11 = add i32 %reass.sub, 1 store i32 %inc11, ptr %arrayidx, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %if.end, %if.then6 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %13 = load i32, ptr @a, align 4, !tbaa !5 %14 = sext i32 %13 to i64 %cmp = icmp slt i64 %indvars.iv.next, %14 br i1 %cmp, label %if.end, label %for.cond14.preheader, !llvm.loop !9 if.end.i: ; preds = %hes.exit.peel, %hes.exit %indvars.iv38 = phi i64 [ %21, %hes.exit ], [ 1, %hes.exit.peel ] %15 = phi i32 [ %27, %hes.exit ], [ %11, %hes.exit.peel ] store i32 2100000000, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 2), align 8, !tbaa !5 store i32 -2100000000, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 3), align 4, !tbaa !5 %arrayidx.i = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %indvars.iv38 %16 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %17 = add nuw i64 %indvars.iv38, 4294967295 %idxprom1.i = and i64 %17, 4294967295 %arrayidx2.i = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %idxprom1.i %18 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %sub3.i = sub nsw i32 %16, %18 store i32 %sub3.i, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 1), align 4, !tbaa !5 %19 = load i32, ptr @ar, align 16, !tbaa !5 %sub6.i = sub nsw i32 %16, %19 store i32 %sub6.i, ptr @hs, align 16, !tbaa !5 %sub7.i = add nsw i32 %15, -1 %20 = sext i32 %sub7.i to i64 %cmp8.i = icmp slt i64 %indvars.iv38, %20 %21 = add nuw nsw i64 %indvars.iv38, 1 br i1 %cmp8.i, label %if.then9.i, label %hes.exit if.then9.i: ; preds = %if.end.i %arrayidx11.i = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %21 %22 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 %arrayidx13.i = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %indvars.iv38 %23 = load i32, ptr %arrayidx13.i, align 4, !tbaa !5 %sub14.i = sub nsw i32 %22, %23 store i32 %sub14.i, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 2), align 8, !tbaa !5 %arrayidx17.i = getelementptr inbounds [150000 x i32], ptr @ar, i64 0, i64 %20 %24 = load i32, ptr %arrayidx17.i, align 4, !tbaa !5 %sub20.i = sub nsw i32 %24, %23 store i32 %sub20.i, ptr getelementptr inbounds ([4 x i32], ptr @hs, i64 0, i64 3), align 4, !tbaa !5 br label %hes.exit hes.exit: ; preds = %if.end.i, %if.then9.i %25 = phi i32 [ %sub20.i, %if.then9.i ], [ -2100000000, %if.end.i ] %26 = phi i32 [ %sub14.i, %if.then9.i ], [ 2100000000, %if.end.i ] %cond.i = tail call i32 @llvm.smin.i32(i32 %sub3.i, i32 %26) %cond27.i = tail call i32 @llvm.smax.i32(i32 %sub6.i, i32 %25) %call.i = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %cond.i, i32 noundef %cond27.i) %27 = load i32, ptr @a, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp15 = icmp slt i64 %21, %28 br i1 %cmp15, label %if.end.i, label %for.end19, !llvm.loop !12 for.end19: ; preds = %hes.exit, %entry, %hes.exit.peel, %for.cond14.preheader ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.peeled.count", i32 1} !12 = distinct !{!12, !10, !11}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ long i,A,B,K; char str[100],*p; fgets(str,sizeof(str),stdin); p=strtok(str," \n"); A=atol(p); p=strtok(NULL," \n"); B=atol(p); p=strtok(NULL," \n"); K=atol(p); if(A+K-1>=B-K+1){ for(i=A;i<=B;i++){ printf("%ld\n",i); } return 0; } for(i=A;i<A+K;i++){ printf("%ld\n",i); } for(i=B-K+1;i<=B;i++){ printf("%ld\n",i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215463/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215463/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c" \0A\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %str) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %str, i32 noundef 100, ptr noundef %0) %call2 = call ptr @strtok(ptr noundef nonnull %str, ptr noundef nonnull @.str) #4 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %call2, ptr noundef null, i32 noundef 10) #4 %call4 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #4 %call.i53 = call i64 @strtol(ptr nocapture noundef nonnull %call4, ptr noundef null, i32 noundef 10) #4 %call6 = call ptr @strtok(ptr noundef null, ptr noundef nonnull @.str) #4 %call.i54 = call i64 @strtol(ptr nocapture noundef nonnull %call6, ptr noundef null, i32 noundef 10) #4 %add = add nsw i64 %call.i54, %call.i %sub8 = sub nsw i64 %call.i53, %call.i54 %add9 = add nsw i64 %sub8, 1 %cmp.not.not = icmp sgt i64 %add, %add9 br i1 %cmp.not.not, label %for.cond.preheader, label %for.cond12.preheader for.cond12.preheader: ; preds = %entry %cmp1456 = icmp sgt i64 %call.i54, 0 br i1 %cmp1456, label %for.body15, label %cleanup for.cond.preheader: ; preds = %entry %cmp10.not60 = icmp sgt i64 %call.i, %call.i53 br i1 %cmp10.not60, label %cleanup, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %i.061 = phi i64 [ %inc, %for.body ], [ %call.i, %for.cond.preheader ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i.061) %inc = add i64 %i.061, 1 %exitcond.not = icmp eq i64 %i.061, %call.i53 br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !9 for.cond22.preheader: ; preds = %for.body15 br i1 %cmp1456, label %for.body24, label %cleanup for.body15: ; preds = %for.cond12.preheader, %for.body15 %i.157 = phi i64 [ %inc18, %for.body15 ], [ %call.i, %for.cond12.preheader ] %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i.157) %inc18 = add nsw i64 %i.157, 1 %cmp14 = icmp slt i64 %inc18, %add br i1 %cmp14, label %for.body15, label %for.cond22.preheader, !llvm.loop !11 for.body24: ; preds = %for.cond22.preheader, %for.body24 %i.259 = phi i64 [ %inc27, %for.body24 ], [ %add9, %for.cond22.preheader ] %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %i.259) %inc27 = add nsw i64 %i.259, 1 %cmp23.not.not = icmp slt i64 %i.259, %call.i53 br i1 %cmp23.not.not, label %for.body24, label %cleanup, !llvm.loop !12 cleanup: ; preds = %for.body24, %for.body, %for.cond12.preheader, %for.cond22.preheader, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %str) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn declare ptr @strtok(ptr noundef, ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main(){ int a, b, k, i; scanf("%d %d %d", &a, &b, &k); if((b-a+1)/2 < k){ for(i=a;i<=b;i++){ printf("%d\n", i); } } else { for(i=a;i<=a+k-1;i++){ printf("%d\n", i); } for(i=b-k+1;i<=b;i++){ printf("%d\n", i); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215506/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215506/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %k = 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 %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %k) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %div = sdiv i32 %add, 2 %2 = load i32, ptr %k, align 4, !tbaa !5 %cmp = icmp slt i32 %div, %2 br i1 %cmp, label %for.cond.preheader, label %for.cond3.preheader for.cond3.preheader: ; preds = %entry %cmp6.not.not31 = icmp sgt i32 %2, 0 br i1 %cmp6.not.not31, label %for.body7, label %if.end for.cond.preheader: ; preds = %entry %cmp1.not35 = icmp sgt i32 %1, %0 br i1 %cmp1.not35, label %if.end, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %i.036 = phi i32 [ %inc, %for.body ], [ %1, %for.cond.preheader ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.036) %inc = add nsw i32 %i.036, 1 %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp1.not.not = icmp slt i32 %i.036, %3 br i1 %cmp1.not.not, label %for.body, label %if.end, !llvm.loop !9 for.body7: ; preds = %for.cond3.preheader, %for.body7 %i.132 = phi i32 [ %inc10, %for.body7 ], [ %1, %for.cond3.preheader ] %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.132) %inc10 = add nsw i32 %i.132, 1 %4 = load i32, ptr %a, align 4, !tbaa !5 %5 = load i32, ptr %k, align 4, !tbaa !5 %add4 = add nsw i32 %5, %4 %cmp6.not.not = icmp slt i32 %inc10, %add4 br i1 %cmp6.not.not, label %for.body7, label %for.end11, !llvm.loop !11 for.end11: ; preds = %for.body7 %cmp15.not.not33 = icmp sgt i32 %5, 0 br i1 %cmp15.not.not33, label %for.body16.preheader, label %if.end for.body16.preheader: ; preds = %for.end11 %.pre = load i32, ptr %b, align 4, !tbaa !5 %sub12 = sub nsw i32 %.pre, %5 br label %for.body16 for.body16: ; preds = %for.body16.preheader, %for.body16 %i.2.in34 = phi i32 [ %i.2, %for.body16 ], [ %sub12, %for.body16.preheader ] %i.2 = add nsw i32 %i.2.in34, 1 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.2) %6 = load i32, ptr %b, align 4, !tbaa !5 %cmp15.not.not = icmp slt i32 %i.2, %6 br i1 %cmp15.not.not, label %for.body16, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body16, %for.body, %for.cond3.preheader, %for.end11, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> #include<stdlib.h> #include<string.h> int main() { int n; scanf("%d",&n); int a[n]; int i; for(i=0;i<n;i++) scanf("%d",&a[i]); printf("%d ",a[1]-a[0]); printf("%d\n",a[n-1]-a[0]); for(i=1;i<n-1;i++) { if(a[i]-a[i-1]>a[i+1]-a[i]) printf("%d ",a[i+1]-a[i]); else printf("%d ",a[i]-a[i-1]); if(a[n-1]-a[i]>a[i]-a[0]) printf("%d\n",a[n-1]-a[i]); else printf("%d\n",a[i]-a[0]); } printf("%d ",a[n-1]-a[n-2]); printf("%d\n",a[n-1]-a[0]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21555/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21555/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 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 %cmp100 = icmp sgt i32 %3, 0 call void @llvm.assume(i1 %cmp100) br label %for.body for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %arrayidx2.phi.trans.insert = getelementptr inbounds i32, ptr %vla, i64 1 %.pre = load i32, ptr %arrayidx2.phi.trans.insert, align 4, !tbaa !5 %.pre113 = load i32, ptr %vla, align 16, !tbaa !5 %6 = sub nsw i32 %.pre, %.pre113 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6) %7 = load i32, ptr %n, align 4, !tbaa !5 %sub5 = add nsw i32 %7, -1 %idxprom6 = sext i32 %sub5 to i64 %arrayidx7 = getelementptr inbounds i32, ptr %vla, i64 %idxprom6 %8 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %9 = load i32, ptr %vla, align 16, !tbaa !5 %sub9 = sub nsw i32 %8, %9 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub9) %10 = load i32, ptr %n, align 4, !tbaa !5 %cmp13103 = icmp sgt i32 %10, 2 br i1 %cmp13103, label %for.body14.preheader, label %for.end.for.end69_crit_edge for.end.for.end69_crit_edge: ; preds = %for.end.loopexit %sub12102 = add nsw i32 %10, -1 %.pre114 = sext i32 %sub12102 to i64 br label %for.end69 for.body14.preheader: ; preds = %for.end.loopexit %invariant.gep = getelementptr i32, ptr %vla, i64 -1 br label %for.body14 for.body14: ; preds = %for.body14.preheader, %for.body14 %indvars.iv109 = phi i64 [ 1, %for.body14.preheader ], [ %indvars.iv.next110, %for.body14 ] %arrayidx16 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv109 %11 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv109 %12 = load i32, ptr %gep, align 4, !tbaa !5 %sub20 = sub nsw i32 %11, %12 %indvars.iv.next110 = add nuw nsw i64 %indvars.iv109, 1 %arrayidx22 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next110 %13 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %sub25 = sub nsw i32 %13, %11 %sub25.sub20 = call i32 @llvm.smin.i32(i32 %sub20, i32 %sub25) %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub25.sub20) %14 = load i32, ptr %n, align 4, !tbaa !5 %sub41 = add nsw i32 %14, -1 %idxprom42 = sext i32 %sub41 to i64 %arrayidx43 = getelementptr inbounds i32, ptr %vla, i64 %idxprom42 %15 = load i32, ptr %arrayidx43, align 4, !tbaa !5 %16 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %sub46 = sub nsw i32 %15, %16 %17 = load i32, ptr %vla, align 16, !tbaa !5 %sub50 = sub nsw i32 %16, %17 %sub46.sink = call i32 @llvm.smax.i32(i32 %sub46, i32 %sub50) %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub46.sink) %18 = load i32, ptr %n, align 4, !tbaa !5 %sub12 = add nsw i32 %18, -1 %19 = sext i32 %sub12 to i64 %cmp13 = icmp slt i64 %indvars.iv.next110, %19 br i1 %cmp13, label %for.body14, label %for.end69, !llvm.loop !11 for.end69: ; preds = %for.body14, %for.end.for.end69_crit_edge %idxprom71.pre-phi = phi i64 [ %.pre114, %for.end.for.end69_crit_edge ], [ %19, %for.body14 ] %.lcssa = phi i32 [ %10, %for.end.for.end69_crit_edge ], [ %18, %for.body14 ] %arrayidx72 = getelementptr inbounds i32, ptr %vla, i64 %idxprom71.pre-phi %20 = load i32, ptr %arrayidx72, align 4, !tbaa !5 %sub73 = add nsw i32 %.lcssa, -2 %idxprom74 = sext i32 %sub73 to i64 %arrayidx75 = getelementptr inbounds i32, ptr %vla, i64 %idxprom74 %21 = load i32, ptr %arrayidx75, align 4, !tbaa !5 %sub76 = sub nsw i32 %20, %21 %call77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub76) %22 = load i32, ptr %n, align 4, !tbaa !5 %sub78 = add nsw i32 %22, -1 %idxprom79 = sext i32 %sub78 to i64 %arrayidx80 = getelementptr inbounds i32, ptr %vla, i64 %idxprom79 %23 = load i32, ptr %arrayidx80, align 4, !tbaa !5 %24 = load i32, ptr %vla, align 16, !tbaa !5 %sub82 = sub nsw i32 %23, %24 %call83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub82) 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 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 willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.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 = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) } 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}
/* ============================================================================ Name : AtCoder_B.c Author : Version : Copyright : Your copyright notice Description : Hello World in C, Ansi-style ============================================================================ */ #include <stdio.h> #include <stdlib.h> int main(void) { int A=0,B=0,K=0; int i; scanf("%d",&A); scanf("%d",&B); scanf("%d",&K); if( (A+K-1)>= (B-K+1)){ for(; A<=B; A++){ printf("%d\n",A); } }else{ for(i=A;i<A+K;i++ ){ printf("%d\n",i); } for(i= B-K+1; i<=B; i++){ printf("%d\n",i); } } return EXIT_SUCCESS; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215593/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215593/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i32, align 4 %B = alloca i32, align 4 %K = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #3 store i32 0, ptr %A, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #3 store i32 0, ptr %B, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %K) #3 store i32 0, ptr %K, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %B) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %K) %0 = load i32, ptr %A, align 4, !tbaa !5 %1 = load i32, ptr %K, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %2 = load i32, ptr %B, align 4, !tbaa !5 %reass.sub = sub i32 %2, %1 %add4 = add i32 %reass.sub, 1 %cmp.not.not = icmp sgt i32 %add, %add4 br i1 %cmp.not.not, label %for.cond.preheader, label %for.cond7.preheader for.cond7.preheader: ; preds = %entry %cmp931 = icmp sgt i32 %1, 0 br i1 %cmp931, label %for.body10, label %if.end for.cond.preheader: ; preds = %entry %cmp5.not35 = icmp sgt i32 %0, %2 br i1 %cmp5.not35, label %if.end, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %3 = phi i32 [ %inc, %for.body ], [ %0, %for.cond.preheader ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %3) %4 = load i32, ptr %A, align 4, !tbaa !5 %inc = add nsw i32 %4, 1 store i32 %inc, ptr %A, align 4, !tbaa !5 %5 = load i32, ptr %B, align 4, !tbaa !5 %cmp5.not.not = icmp slt i32 %4, %5 br i1 %cmp5.not.not, label %for.body, label %if.end, !llvm.loop !9 for.body10: ; preds = %for.cond7.preheader, %for.body10 %i.032 = phi i32 [ %inc13, %for.body10 ], [ %0, %for.cond7.preheader ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.032) %inc13 = add nsw i32 %i.032, 1 %6 = load i32, ptr %A, align 4, !tbaa !5 %7 = load i32, ptr %K, align 4, !tbaa !5 %add8 = add nsw i32 %7, %6 %cmp9 = icmp slt i32 %inc13, %add8 br i1 %cmp9, label %for.body10, label %for.end14, !llvm.loop !11 for.end14: ; preds = %for.body10 %8 = icmp sgt i32 %7, 0 br i1 %8, label %for.body19.preheader, label %if.end for.body19.preheader: ; preds = %for.end14 %.pre = load i32, ptr %B, align 4, !tbaa !5 %.pre38 = sub nsw i32 %.pre, %7 br label %for.body19 for.body19: ; preds = %for.body19.preheader, %for.body19 %i.1.in34 = phi i32 [ %i.1, %for.body19 ], [ %.pre38, %for.body19.preheader ] %i.1 = add nsw i32 %i.1.in34, 1 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.1) %9 = load i32, ptr %B, align 4, !tbaa !5 %cmp18.not.not = icmp slt i32 %i.1, %9 br i1 %cmp18.not.not, label %for.body19, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body19, %for.body, %for.cond7.preheader, %for.end14, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #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"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> #include<string.h> int b,i,j,r,k,t,q; int g[6]={2,3,5,10,12,15},p[6]={380,550,850,1520,1870,2244},dp[52]; void f(int n) { int i; for(i=g[n],dp[g[n]]=p[n];i<52;i++) dp[i]=i-g[n]>=2&&dp[i]>dp[i-g[n]]+p[n]?dp[i-g[n]]+p[n]:dp[i]; } int main() { memset(dp,0xf,52*4); for(i=0;i<6;i++) f(i); for(;scanf("%d",&b),b;printf("%d\n",dp[b/100])); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @g = dso_local local_unnamed_addr global [6 x i32] [i32 2, i32 3, i32 5, i32 10, i32 12, i32 15], align 16 @p = dso_local local_unnamed_addr global [6 x i32] [i32 380, i32 550, i32 850, i32 1520, i32 1870, i32 2244], align 16 @dp = dso_local local_unnamed_addr global [52 x i32] zeroinitializer, align 16 @i = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @b = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @j = dso_local local_unnamed_addr global i32 0, align 4 @r = dso_local local_unnamed_addr global i32 0, align 4 @k = dso_local local_unnamed_addr global i32 0, align 4 @t = dso_local local_unnamed_addr global i32 0, align 4 @q = dso_local local_unnamed_addr global i32 0, align 4 ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @f(i32 noundef %n) local_unnamed_addr #0 { entry: %idxprom = sext i32 %n to i64 %arrayidx = getelementptr inbounds [6 x i32], ptr @g, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx2 = getelementptr inbounds [6 x i32], ptr @p, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %idxprom5 = sext i32 %0 to i64 %arrayidx6 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5 store i32 %1, ptr %arrayidx6, align 4, !tbaa !5 %cmp46 = icmp slt i32 %0, 52 br i1 %cmp46, label %cond.end.peel, label %for.end cond.end.peel: ; preds = %entry %indvars.iv.next.peel = add nsw i64 %idxprom5, 1 %2 = and i64 %indvars.iv.next.peel, 4294967295 %exitcond.peel.not = icmp eq i64 %2, 52 br i1 %exitcond.peel.not, label %for.end, label %cond.end.peel61 cond.end.peel61: ; preds = %cond.end.peel %indvars.iv.next.peel64 = add nsw i64 %idxprom5, 2 %3 = and i64 %indvars.iv.next.peel64, 4294967295 %exitcond.peel66.not = icmp eq i64 %3, 52 br i1 %exitcond.peel66.not, label %for.end, label %land.lhs.true land.lhs.true: ; preds = %cond.end.peel61, %land.lhs.true %indvars.iv = phi i64 [ %indvars.iv.next, %land.lhs.true ], [ %indvars.iv.next.peel64, %cond.end.peel61 ] %arrayidx11 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv %4 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %5 = trunc i64 %indvars.iv to i32 %6 = sub i32 %5, %0 %idxprom15 = zext i32 %6 to i64 %arrayidx16 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15 %7 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %add = add nsw i32 %7, %1 %spec.select = tail call i32 @llvm.smin.i32(i32 %4, i32 %add) %arrayidx31 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv store i32 %spec.select, ptr %arrayidx31, align 4, !tbaa !5 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %8 = and i64 %indvars.iv.next, 4294967295 %exitcond.not = icmp eq i64 %8, 52 br i1 %exitcond.not, label %for.end, label %land.lhs.true, !llvm.loop !9 for.end: ; preds = %land.lhs.true, %cond.end.peel, %cond.end.peel61, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) @dp, i8 15, i64 208, i1 false) %0 = load i32, ptr @g, align 16, !tbaa !5 %1 = load i32, ptr @p, align 16, !tbaa !5 %idxprom5.i = sext i32 %0 to i64 %arrayidx6.i = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i store i32 %1, ptr %arrayidx6.i, align 4, !tbaa !5 %cmp46.i = icmp slt i32 %0, 52 br i1 %cmp46.i, label %cond.end.peel.i, label %f.exit cond.end.peel.i: ; preds = %entry %indvars.iv.next.peel.i = add nsw i64 %idxprom5.i, 1 %2 = and i64 %indvars.iv.next.peel.i, 4294967295 %exitcond.peel.not.i = icmp eq i64 %2, 52 br i1 %exitcond.peel.not.i, label %f.exit, label %cond.end.peel61.i cond.end.peel61.i: ; preds = %cond.end.peel.i %indvars.iv.next.peel64.i = add nsw i64 %idxprom5.i, 2 %3 = and i64 %indvars.iv.next.peel64.i, 4294967295 %exitcond.peel66.not.i = icmp eq i64 %3, 52 br i1 %exitcond.peel66.not.i, label %f.exit, label %land.lhs.true.i.preheader land.lhs.true.i.preheader: ; preds = %cond.end.peel61.i %4 = add i32 %0, 3 %5 = zext i32 %4 to i64 %6 = sub nsw i64 53, %5 %min.iters.check = icmp ult i64 %6, 24 br i1 %min.iters.check, label %land.lhs.true.i.preheader162, label %vector.scevcheck vector.scevcheck: ; preds = %land.lhs.true.i.preheader %7 = add i32 %0, 3 %8 = zext i32 %7 to i64 %9 = sub nsw i64 52, %8 %10 = trunc i64 %9 to i32 %11 = sub i32 -4, %0 %12 = icmp ult i32 %11, %10 %13 = and i64 %9, 4294967294 %14 = icmp eq i64 %13, 4294967294 %15 = icmp ugt i64 %9, 4294967295 %16 = or i1 %14, %15 %17 = or i1 %12, %16 br i1 %17, label %land.lhs.true.i.preheader162, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %18 = shl nsw i64 %idxprom5.i, 2 %19 = getelementptr i8, ptr @dp, i64 %18 %scevgep = getelementptr i8, ptr %19, i64 8 %20 = add nsw i64 %18, 220 %21 = add i32 %0, 3 %22 = zext i32 %21 to i64 %23 = shl nuw nsw i64 %22, 2 %24 = sub nsw i64 %20, %23 %scevgep11 = getelementptr i8, ptr @dp, i64 %24 %25 = sub nsw i64 220, %23 %scevgep12 = getelementptr i8, ptr @dp, i64 %25 %bound0 = icmp ult ptr %scevgep, %scevgep12 %bound1 = icmp ugt ptr %scevgep11, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %land.lhs.true.i.preheader162, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %6, -8 %ind.end = add nsw i64 %indvars.iv.next.peel64.i, %n.vec %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 ] %offset.idx = add i64 %indvars.iv.next.peel64.i, %index %26 = trunc i64 %offset.idx to i32 %offset.idx13 = add i64 %indvars.iv.next.peel64.i, %index %27 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx13 %wide.load = load <4 x i32>, ptr %27, align 4, !tbaa !5, !alias.scope !13, !noalias !16 %28 = getelementptr inbounds i32, ptr %27, i64 4 %wide.load14 = load <4 x i32>, ptr %28, align 4, !tbaa !5, !alias.scope !13, !noalias !16 %29 = sub i32 %26, %0 %30 = zext i32 %29 to i64 %31 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %30 %wide.load15 = load <4 x i32>, ptr %31, align 4, !tbaa !5, !alias.scope !16 %32 = getelementptr inbounds i32, ptr %31, i64 4 %wide.load16 = load <4 x i32>, ptr %32, align 4, !tbaa !5, !alias.scope !16 %33 = add nsw <4 x i32> %wide.load15, %broadcast.splat %34 = add nsw <4 x i32> %wide.load16, %broadcast.splat %35 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load, <4 x i32> %33) %36 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load14, <4 x i32> %34) store <4 x i32> %35, ptr %27, align 4, !tbaa !5, !alias.scope !13, !noalias !16 store <4 x i32> %36, ptr %28, align 4, !tbaa !5, !alias.scope !13, !noalias !16 %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 !18 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %6, %n.vec br i1 %cmp.n, label %f.exit, label %land.lhs.true.i.preheader162 land.lhs.true.i.preheader162: ; preds = %vector.memcheck, %vector.scevcheck, %land.lhs.true.i.preheader, %middle.block %indvars.iv.i.ph = phi i64 [ %indvars.iv.next.peel64.i, %vector.memcheck ], [ %indvars.iv.next.peel64.i, %vector.scevcheck ], [ %indvars.iv.next.peel64.i, %land.lhs.true.i.preheader ], [ %ind.end, %middle.block ] br label %land.lhs.true.i land.lhs.true.i: ; preds = %land.lhs.true.i.preheader162, %land.lhs.true.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %land.lhs.true.i ], [ %indvars.iv.i.ph, %land.lhs.true.i.preheader162 ] %arrayidx11.i = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i %38 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 %39 = trunc i64 %indvars.iv.i to i32 %40 = sub i32 %39, %0 %idxprom15.i = zext i32 %40 to i64 %arrayidx16.i = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i %41 = load i32, ptr %arrayidx16.i, align 4, !tbaa !5 %add.i = add nsw i32 %41, %1 %spec.select.i = tail call i32 @llvm.smin.i32(i32 %38, i32 %add.i) store i32 %spec.select.i, ptr %arrayidx11.i, align 4, !tbaa !5 %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %42 = and i64 %indvars.iv.next.i, 4294967295 %exitcond.not.i = icmp eq i64 %42, 52 br i1 %exitcond.not.i, label %f.exit, label %land.lhs.true.i, !llvm.loop !20 f.exit: ; preds = %land.lhs.true.i, %middle.block, %entry, %cond.end.peel.i, %cond.end.peel61.i %43 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @g, i64 0, i64 1), align 4, !tbaa !5 %44 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @p, i64 0, i64 1), align 4, !tbaa !5 %idxprom5.i.1 = sext i32 %43 to i64 %arrayidx6.i.1 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i.1 store i32 %44, ptr %arrayidx6.i.1, align 4, !tbaa !5 %cmp46.i.1 = icmp slt i32 %43, 52 br i1 %cmp46.i.1, label %cond.end.peel.i.1, label %f.exit.1 cond.end.peel.i.1: ; preds = %f.exit %indvars.iv.next.peel.i.1 = add nsw i64 %idxprom5.i.1, 1 %45 = and i64 %indvars.iv.next.peel.i.1, 4294967295 %exitcond.peel.not.i.1 = icmp eq i64 %45, 52 br i1 %exitcond.peel.not.i.1, label %f.exit.1, label %cond.end.peel61.i.1 cond.end.peel61.i.1: ; preds = %cond.end.peel.i.1 %indvars.iv.next.peel64.i.1 = add nsw i64 %idxprom5.i.1, 2 %46 = and i64 %indvars.iv.next.peel64.i.1, 4294967295 %exitcond.peel66.not.i.1 = icmp eq i64 %46, 52 br i1 %exitcond.peel66.not.i.1, label %f.exit.1, label %land.lhs.true.i.1.preheader land.lhs.true.i.1.preheader: ; preds = %cond.end.peel61.i.1 %47 = add i32 %43, 3 %48 = zext i32 %47 to i64 %49 = sub nsw i64 53, %48 %min.iters.check27 = icmp ult i64 %49, 24 br i1 %min.iters.check27, label %land.lhs.true.i.1.preheader161, label %vector.scevcheck17 vector.scevcheck17: ; preds = %land.lhs.true.i.1.preheader %50 = add i32 %43, 3 %51 = zext i32 %50 to i64 %52 = sub nsw i64 52, %51 %53 = trunc i64 %52 to i32 %54 = sub i32 -4, %43 %55 = icmp ult i32 %54, %53 %56 = and i64 %52, 4294967294 %57 = icmp eq i64 %56, 4294967294 %58 = icmp ugt i64 %52, 4294967295 %59 = or i1 %57, %58 %60 = or i1 %55, %59 br i1 %60, label %land.lhs.true.i.1.preheader161, label %vector.memcheck18 vector.memcheck18: ; preds = %vector.scevcheck17 %61 = shl nsw i64 %idxprom5.i.1, 2 %62 = getelementptr i8, ptr @dp, i64 %61 %scevgep19 = getelementptr i8, ptr %62, i64 8 %63 = add nsw i64 %61, 220 %64 = add i32 %43, 3 %65 = zext i32 %64 to i64 %66 = shl nuw nsw i64 %65, 2 %67 = sub nsw i64 %63, %66 %scevgep20 = getelementptr i8, ptr @dp, i64 %67 %68 = sub nsw i64 220, %66 %scevgep21 = getelementptr i8, ptr @dp, i64 %68 %bound022 = icmp ult ptr %scevgep19, %scevgep21 %bound123 = icmp ugt ptr %scevgep20, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict24 = and i1 %bound022, %bound123 br i1 %found.conflict24, label %land.lhs.true.i.1.preheader161, label %vector.ph28 vector.ph28: ; preds = %vector.memcheck18 %n.vec30 = and i64 %49, -8 %ind.end31 = add nsw i64 %indvars.iv.next.peel64.i.1, %n.vec30 %broadcast.splatinsert42 = insertelement <4 x i32> poison, i32 %44, i64 0 %broadcast.splat43 = shufflevector <4 x i32> %broadcast.splatinsert42, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body34 vector.body34: ; preds = %vector.body34, %vector.ph28 %index35 = phi i64 [ 0, %vector.ph28 ], [ %index.next44, %vector.body34 ] %offset.idx36 = add i64 %indvars.iv.next.peel64.i.1, %index35 %69 = trunc i64 %offset.idx36 to i32 %offset.idx37 = add i64 %indvars.iv.next.peel64.i.1, %index35 %70 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx37 %wide.load38 = load <4 x i32>, ptr %70, align 4, !tbaa !5, !alias.scope !21, !noalias !24 %71 = getelementptr inbounds i32, ptr %70, i64 4 %wide.load39 = load <4 x i32>, ptr %71, align 4, !tbaa !5, !alias.scope !21, !noalias !24 %72 = sub i32 %69, %43 %73 = zext i32 %72 to i64 %74 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %73 %wide.load40 = load <4 x i32>, ptr %74, align 4, !tbaa !5, !alias.scope !24 %75 = getelementptr inbounds i32, ptr %74, i64 4 %wide.load41 = load <4 x i32>, ptr %75, align 4, !tbaa !5, !alias.scope !24 %76 = add nsw <4 x i32> %wide.load40, %broadcast.splat43 %77 = add nsw <4 x i32> %wide.load41, %broadcast.splat43 %78 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load38, <4 x i32> %76) %79 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load39, <4 x i32> %77) store <4 x i32> %78, ptr %70, align 4, !tbaa !5, !alias.scope !21, !noalias !24 store <4 x i32> %79, ptr %71, align 4, !tbaa !5, !alias.scope !21, !noalias !24 %index.next44 = add nuw i64 %index35, 8 %80 = icmp eq i64 %index.next44, %n.vec30 br i1 %80, label %middle.block25, label %vector.body34, !llvm.loop !26 middle.block25: ; preds = %vector.body34 %cmp.n33 = icmp eq i64 %49, %n.vec30 br i1 %cmp.n33, label %f.exit.1, label %land.lhs.true.i.1.preheader161 land.lhs.true.i.1.preheader161: ; preds = %vector.memcheck18, %vector.scevcheck17, %land.lhs.true.i.1.preheader, %middle.block25 %indvars.iv.i.1.ph = phi i64 [ %indvars.iv.next.peel64.i.1, %vector.memcheck18 ], [ %indvars.iv.next.peel64.i.1, %vector.scevcheck17 ], [ %indvars.iv.next.peel64.i.1, %land.lhs.true.i.1.preheader ], [ %ind.end31, %middle.block25 ] br label %land.lhs.true.i.1 land.lhs.true.i.1: ; preds = %land.lhs.true.i.1.preheader161, %land.lhs.true.i.1 %indvars.iv.i.1 = phi i64 [ %indvars.iv.next.i.1, %land.lhs.true.i.1 ], [ %indvars.iv.i.1.ph, %land.lhs.true.i.1.preheader161 ] %arrayidx11.i.1 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i.1 %81 = load i32, ptr %arrayidx11.i.1, align 4, !tbaa !5 %82 = trunc i64 %indvars.iv.i.1 to i32 %83 = sub i32 %82, %43 %idxprom15.i.1 = zext i32 %83 to i64 %arrayidx16.i.1 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i.1 %84 = load i32, ptr %arrayidx16.i.1, align 4, !tbaa !5 %add.i.1 = add nsw i32 %84, %44 %spec.select.i.1 = tail call i32 @llvm.smin.i32(i32 %81, i32 %add.i.1) store i32 %spec.select.i.1, ptr %arrayidx11.i.1, align 4, !tbaa !5 %indvars.iv.next.i.1 = add nsw i64 %indvars.iv.i.1, 1 %85 = and i64 %indvars.iv.next.i.1, 4294967295 %exitcond.not.i.1 = icmp eq i64 %85, 52 br i1 %exitcond.not.i.1, label %f.exit.1, label %land.lhs.true.i.1, !llvm.loop !27 f.exit.1: ; preds = %land.lhs.true.i.1, %middle.block25, %cond.end.peel61.i.1, %cond.end.peel.i.1, %f.exit %86 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @g, i64 0, i64 2), align 8, !tbaa !5 %87 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @p, i64 0, i64 2), align 8, !tbaa !5 %idxprom5.i.2 = sext i32 %86 to i64 %arrayidx6.i.2 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i.2 store i32 %87, ptr %arrayidx6.i.2, align 4, !tbaa !5 %cmp46.i.2 = icmp slt i32 %86, 52 br i1 %cmp46.i.2, label %cond.end.peel.i.2, label %f.exit.2 cond.end.peel.i.2: ; preds = %f.exit.1 %indvars.iv.next.peel.i.2 = add nsw i64 %idxprom5.i.2, 1 %88 = and i64 %indvars.iv.next.peel.i.2, 4294967295 %exitcond.peel.not.i.2 = icmp eq i64 %88, 52 br i1 %exitcond.peel.not.i.2, label %f.exit.2, label %cond.end.peel61.i.2 cond.end.peel61.i.2: ; preds = %cond.end.peel.i.2 %indvars.iv.next.peel64.i.2 = add nsw i64 %idxprom5.i.2, 2 %89 = and i64 %indvars.iv.next.peel64.i.2, 4294967295 %exitcond.peel66.not.i.2 = icmp eq i64 %89, 52 br i1 %exitcond.peel66.not.i.2, label %f.exit.2, label %land.lhs.true.i.2.preheader land.lhs.true.i.2.preheader: ; preds = %cond.end.peel61.i.2 %90 = add i32 %86, 3 %91 = zext i32 %90 to i64 %92 = sub nsw i64 53, %91 %min.iters.check55 = icmp ult i64 %92, 24 br i1 %min.iters.check55, label %land.lhs.true.i.2.preheader160, label %vector.scevcheck45 vector.scevcheck45: ; preds = %land.lhs.true.i.2.preheader %93 = add i32 %86, 3 %94 = zext i32 %93 to i64 %95 = sub nsw i64 52, %94 %96 = trunc i64 %95 to i32 %97 = sub i32 -4, %86 %98 = icmp ult i32 %97, %96 %99 = and i64 %95, 4294967294 %100 = icmp eq i64 %99, 4294967294 %101 = icmp ugt i64 %95, 4294967295 %102 = or i1 %100, %101 %103 = or i1 %98, %102 br i1 %103, label %land.lhs.true.i.2.preheader160, label %vector.memcheck46 vector.memcheck46: ; preds = %vector.scevcheck45 %104 = shl nsw i64 %idxprom5.i.2, 2 %105 = getelementptr i8, ptr @dp, i64 %104 %scevgep47 = getelementptr i8, ptr %105, i64 8 %106 = add nsw i64 %104, 220 %107 = add i32 %86, 3 %108 = zext i32 %107 to i64 %109 = shl nuw nsw i64 %108, 2 %110 = sub nsw i64 %106, %109 %scevgep48 = getelementptr i8, ptr @dp, i64 %110 %111 = sub nsw i64 220, %109 %scevgep49 = getelementptr i8, ptr @dp, i64 %111 %bound050 = icmp ult ptr %scevgep47, %scevgep49 %bound151 = icmp ugt ptr %scevgep48, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict52 = and i1 %bound050, %bound151 br i1 %found.conflict52, label %land.lhs.true.i.2.preheader160, label %vector.ph56 vector.ph56: ; preds = %vector.memcheck46 %n.vec58 = and i64 %92, -8 %ind.end59 = add nsw i64 %indvars.iv.next.peel64.i.2, %n.vec58 %broadcast.splatinsert70 = insertelement <4 x i32> poison, i32 %87, i64 0 %broadcast.splat71 = shufflevector <4 x i32> %broadcast.splatinsert70, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body62 vector.body62: ; preds = %vector.body62, %vector.ph56 %index63 = phi i64 [ 0, %vector.ph56 ], [ %index.next72, %vector.body62 ] %offset.idx64 = add i64 %indvars.iv.next.peel64.i.2, %index63 %112 = trunc i64 %offset.idx64 to i32 %offset.idx65 = add i64 %indvars.iv.next.peel64.i.2, %index63 %113 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx65 %wide.load66 = load <4 x i32>, ptr %113, align 4, !tbaa !5, !alias.scope !28, !noalias !31 %114 = getelementptr inbounds i32, ptr %113, i64 4 %wide.load67 = load <4 x i32>, ptr %114, align 4, !tbaa !5, !alias.scope !28, !noalias !31 %115 = sub i32 %112, %86 %116 = zext i32 %115 to i64 %117 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %116 %wide.load68 = load <4 x i32>, ptr %117, align 4, !tbaa !5, !alias.scope !31 %118 = getelementptr inbounds i32, ptr %117, i64 4 %wide.load69 = load <4 x i32>, ptr %118, align 4, !tbaa !5, !alias.scope !31 %119 = add nsw <4 x i32> %wide.load68, %broadcast.splat71 %120 = add nsw <4 x i32> %wide.load69, %broadcast.splat71 %121 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load66, <4 x i32> %119) %122 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load67, <4 x i32> %120) store <4 x i32> %121, ptr %113, align 4, !tbaa !5, !alias.scope !28, !noalias !31 store <4 x i32> %122, ptr %114, align 4, !tbaa !5, !alias.scope !28, !noalias !31 %index.next72 = add nuw i64 %index63, 8 %123 = icmp eq i64 %index.next72, %n.vec58 br i1 %123, label %middle.block53, label %vector.body62, !llvm.loop !33 middle.block53: ; preds = %vector.body62 %cmp.n61 = icmp eq i64 %92, %n.vec58 br i1 %cmp.n61, label %f.exit.2, label %land.lhs.true.i.2.preheader160 land.lhs.true.i.2.preheader160: ; preds = %vector.memcheck46, %vector.scevcheck45, %land.lhs.true.i.2.preheader, %middle.block53 %indvars.iv.i.2.ph = phi i64 [ %indvars.iv.next.peel64.i.2, %vector.memcheck46 ], [ %indvars.iv.next.peel64.i.2, %vector.scevcheck45 ], [ %indvars.iv.next.peel64.i.2, %land.lhs.true.i.2.preheader ], [ %ind.end59, %middle.block53 ] br label %land.lhs.true.i.2 land.lhs.true.i.2: ; preds = %land.lhs.true.i.2.preheader160, %land.lhs.true.i.2 %indvars.iv.i.2 = phi i64 [ %indvars.iv.next.i.2, %land.lhs.true.i.2 ], [ %indvars.iv.i.2.ph, %land.lhs.true.i.2.preheader160 ] %arrayidx11.i.2 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i.2 %124 = load i32, ptr %arrayidx11.i.2, align 4, !tbaa !5 %125 = trunc i64 %indvars.iv.i.2 to i32 %126 = sub i32 %125, %86 %idxprom15.i.2 = zext i32 %126 to i64 %arrayidx16.i.2 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i.2 %127 = load i32, ptr %arrayidx16.i.2, align 4, !tbaa !5 %add.i.2 = add nsw i32 %127, %87 %spec.select.i.2 = tail call i32 @llvm.smin.i32(i32 %124, i32 %add.i.2) store i32 %spec.select.i.2, ptr %arrayidx11.i.2, align 4, !tbaa !5 %indvars.iv.next.i.2 = add nsw i64 %indvars.iv.i.2, 1 %128 = and i64 %indvars.iv.next.i.2, 4294967295 %exitcond.not.i.2 = icmp eq i64 %128, 52 br i1 %exitcond.not.i.2, label %f.exit.2, label %land.lhs.true.i.2, !llvm.loop !34 f.exit.2: ; preds = %land.lhs.true.i.2, %middle.block53, %cond.end.peel61.i.2, %cond.end.peel.i.2, %f.exit.1 %129 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @g, i64 0, i64 3), align 4, !tbaa !5 %130 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @p, i64 0, i64 3), align 4, !tbaa !5 %idxprom5.i.3 = sext i32 %129 to i64 %arrayidx6.i.3 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i.3 store i32 %130, ptr %arrayidx6.i.3, align 4, !tbaa !5 %cmp46.i.3 = icmp slt i32 %129, 52 br i1 %cmp46.i.3, label %cond.end.peel.i.3, label %f.exit.3 cond.end.peel.i.3: ; preds = %f.exit.2 %indvars.iv.next.peel.i.3 = add nsw i64 %idxprom5.i.3, 1 %131 = and i64 %indvars.iv.next.peel.i.3, 4294967295 %exitcond.peel.not.i.3 = icmp eq i64 %131, 52 br i1 %exitcond.peel.not.i.3, label %f.exit.3, label %cond.end.peel61.i.3 cond.end.peel61.i.3: ; preds = %cond.end.peel.i.3 %indvars.iv.next.peel64.i.3 = add nsw i64 %idxprom5.i.3, 2 %132 = and i64 %indvars.iv.next.peel64.i.3, 4294967295 %exitcond.peel66.not.i.3 = icmp eq i64 %132, 52 br i1 %exitcond.peel66.not.i.3, label %f.exit.3, label %land.lhs.true.i.3.preheader land.lhs.true.i.3.preheader: ; preds = %cond.end.peel61.i.3 %133 = add i32 %129, 3 %134 = zext i32 %133 to i64 %135 = sub nsw i64 53, %134 %min.iters.check83 = icmp ult i64 %135, 24 br i1 %min.iters.check83, label %land.lhs.true.i.3.preheader159, label %vector.scevcheck73 vector.scevcheck73: ; preds = %land.lhs.true.i.3.preheader %136 = add i32 %129, 3 %137 = zext i32 %136 to i64 %138 = sub nsw i64 52, %137 %139 = trunc i64 %138 to i32 %140 = sub i32 -4, %129 %141 = icmp ult i32 %140, %139 %142 = and i64 %138, 4294967294 %143 = icmp eq i64 %142, 4294967294 %144 = icmp ugt i64 %138, 4294967295 %145 = or i1 %143, %144 %146 = or i1 %141, %145 br i1 %146, label %land.lhs.true.i.3.preheader159, label %vector.memcheck74 vector.memcheck74: ; preds = %vector.scevcheck73 %147 = shl nsw i64 %idxprom5.i.3, 2 %148 = getelementptr i8, ptr @dp, i64 %147 %scevgep75 = getelementptr i8, ptr %148, i64 8 %149 = add nsw i64 %147, 220 %150 = add i32 %129, 3 %151 = zext i32 %150 to i64 %152 = shl nuw nsw i64 %151, 2 %153 = sub nsw i64 %149, %152 %scevgep76 = getelementptr i8, ptr @dp, i64 %153 %154 = sub nsw i64 220, %152 %scevgep77 = getelementptr i8, ptr @dp, i64 %154 %bound078 = icmp ult ptr %scevgep75, %scevgep77 %bound179 = icmp ugt ptr %scevgep76, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict80 = and i1 %bound078, %bound179 br i1 %found.conflict80, label %land.lhs.true.i.3.preheader159, label %vector.ph84 vector.ph84: ; preds = %vector.memcheck74 %n.vec86 = and i64 %135, -8 %ind.end87 = add nsw i64 %indvars.iv.next.peel64.i.3, %n.vec86 %broadcast.splatinsert98 = insertelement <4 x i32> poison, i32 %130, i64 0 %broadcast.splat99 = shufflevector <4 x i32> %broadcast.splatinsert98, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body90 vector.body90: ; preds = %vector.body90, %vector.ph84 %index91 = phi i64 [ 0, %vector.ph84 ], [ %index.next100, %vector.body90 ] %offset.idx92 = add i64 %indvars.iv.next.peel64.i.3, %index91 %155 = trunc i64 %offset.idx92 to i32 %offset.idx93 = add i64 %indvars.iv.next.peel64.i.3, %index91 %156 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx93 %wide.load94 = load <4 x i32>, ptr %156, align 4, !tbaa !5, !alias.scope !35, !noalias !38 %157 = getelementptr inbounds i32, ptr %156, i64 4 %wide.load95 = load <4 x i32>, ptr %157, align 4, !tbaa !5, !alias.scope !35, !noalias !38 %158 = sub i32 %155, %129 %159 = zext i32 %158 to i64 %160 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %159 %wide.load96 = load <4 x i32>, ptr %160, align 4, !tbaa !5, !alias.scope !38 %161 = getelementptr inbounds i32, ptr %160, i64 4 %wide.load97 = load <4 x i32>, ptr %161, align 4, !tbaa !5, !alias.scope !38 %162 = add nsw <4 x i32> %wide.load96, %broadcast.splat99 %163 = add nsw <4 x i32> %wide.load97, %broadcast.splat99 %164 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load94, <4 x i32> %162) %165 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load95, <4 x i32> %163) store <4 x i32> %164, ptr %156, align 4, !tbaa !5, !alias.scope !35, !noalias !38 store <4 x i32> %165, ptr %157, align 4, !tbaa !5, !alias.scope !35, !noalias !38 %index.next100 = add nuw i64 %index91, 8 %166 = icmp eq i64 %index.next100, %n.vec86 br i1 %166, label %middle.block81, label %vector.body90, !llvm.loop !40 middle.block81: ; preds = %vector.body90 %cmp.n89 = icmp eq i64 %135, %n.vec86 br i1 %cmp.n89, label %f.exit.3, label %land.lhs.true.i.3.preheader159 land.lhs.true.i.3.preheader159: ; preds = %vector.memcheck74, %vector.scevcheck73, %land.lhs.true.i.3.preheader, %middle.block81 %indvars.iv.i.3.ph = phi i64 [ %indvars.iv.next.peel64.i.3, %vector.memcheck74 ], [ %indvars.iv.next.peel64.i.3, %vector.scevcheck73 ], [ %indvars.iv.next.peel64.i.3, %land.lhs.true.i.3.preheader ], [ %ind.end87, %middle.block81 ] br label %land.lhs.true.i.3 land.lhs.true.i.3: ; preds = %land.lhs.true.i.3.preheader159, %land.lhs.true.i.3 %indvars.iv.i.3 = phi i64 [ %indvars.iv.next.i.3, %land.lhs.true.i.3 ], [ %indvars.iv.i.3.ph, %land.lhs.true.i.3.preheader159 ] %arrayidx11.i.3 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i.3 %167 = load i32, ptr %arrayidx11.i.3, align 4, !tbaa !5 %168 = trunc i64 %indvars.iv.i.3 to i32 %169 = sub i32 %168, %129 %idxprom15.i.3 = zext i32 %169 to i64 %arrayidx16.i.3 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i.3 %170 = load i32, ptr %arrayidx16.i.3, align 4, !tbaa !5 %add.i.3 = add nsw i32 %170, %130 %spec.select.i.3 = tail call i32 @llvm.smin.i32(i32 %167, i32 %add.i.3) store i32 %spec.select.i.3, ptr %arrayidx11.i.3, align 4, !tbaa !5 %indvars.iv.next.i.3 = add nsw i64 %indvars.iv.i.3, 1 %171 = and i64 %indvars.iv.next.i.3, 4294967295 %exitcond.not.i.3 = icmp eq i64 %171, 52 br i1 %exitcond.not.i.3, label %f.exit.3, label %land.lhs.true.i.3, !llvm.loop !41 f.exit.3: ; preds = %land.lhs.true.i.3, %middle.block81, %cond.end.peel61.i.3, %cond.end.peel.i.3, %f.exit.2 %172 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @g, i64 0, i64 4), align 16, !tbaa !5 %173 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @p, i64 0, i64 4), align 16, !tbaa !5 %idxprom5.i.4 = sext i32 %172 to i64 %arrayidx6.i.4 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i.4 store i32 %173, ptr %arrayidx6.i.4, align 4, !tbaa !5 %cmp46.i.4 = icmp slt i32 %172, 52 br i1 %cmp46.i.4, label %cond.end.peel.i.4, label %f.exit.4 cond.end.peel.i.4: ; preds = %f.exit.3 %indvars.iv.next.peel.i.4 = add nsw i64 %idxprom5.i.4, 1 %174 = and i64 %indvars.iv.next.peel.i.4, 4294967295 %exitcond.peel.not.i.4 = icmp eq i64 %174, 52 br i1 %exitcond.peel.not.i.4, label %f.exit.4, label %cond.end.peel61.i.4 cond.end.peel61.i.4: ; preds = %cond.end.peel.i.4 %indvars.iv.next.peel64.i.4 = add nsw i64 %idxprom5.i.4, 2 %175 = and i64 %indvars.iv.next.peel64.i.4, 4294967295 %exitcond.peel66.not.i.4 = icmp eq i64 %175, 52 br i1 %exitcond.peel66.not.i.4, label %f.exit.4, label %land.lhs.true.i.4.preheader land.lhs.true.i.4.preheader: ; preds = %cond.end.peel61.i.4 %176 = add i32 %172, 3 %177 = zext i32 %176 to i64 %178 = sub nsw i64 53, %177 %min.iters.check111 = icmp ult i64 %178, 24 br i1 %min.iters.check111, label %land.lhs.true.i.4.preheader158, label %vector.scevcheck101 vector.scevcheck101: ; preds = %land.lhs.true.i.4.preheader %179 = add i32 %172, 3 %180 = zext i32 %179 to i64 %181 = sub nsw i64 52, %180 %182 = trunc i64 %181 to i32 %183 = sub i32 -4, %172 %184 = icmp ult i32 %183, %182 %185 = and i64 %181, 4294967294 %186 = icmp eq i64 %185, 4294967294 %187 = icmp ugt i64 %181, 4294967295 %188 = or i1 %186, %187 %189 = or i1 %184, %188 br i1 %189, label %land.lhs.true.i.4.preheader158, label %vector.memcheck102 vector.memcheck102: ; preds = %vector.scevcheck101 %190 = shl nsw i64 %idxprom5.i.4, 2 %191 = getelementptr i8, ptr @dp, i64 %190 %scevgep103 = getelementptr i8, ptr %191, i64 8 %192 = add nsw i64 %190, 220 %193 = add i32 %172, 3 %194 = zext i32 %193 to i64 %195 = shl nuw nsw i64 %194, 2 %196 = sub nsw i64 %192, %195 %scevgep104 = getelementptr i8, ptr @dp, i64 %196 %197 = sub nsw i64 220, %195 %scevgep105 = getelementptr i8, ptr @dp, i64 %197 %bound0106 = icmp ult ptr %scevgep103, %scevgep105 %bound1107 = icmp ugt ptr %scevgep104, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict108 = and i1 %bound0106, %bound1107 br i1 %found.conflict108, label %land.lhs.true.i.4.preheader158, label %vector.ph112 vector.ph112: ; preds = %vector.memcheck102 %n.vec114 = and i64 %178, -8 %ind.end115 = add nsw i64 %indvars.iv.next.peel64.i.4, %n.vec114 %broadcast.splatinsert126 = insertelement <4 x i32> poison, i32 %173, i64 0 %broadcast.splat127 = shufflevector <4 x i32> %broadcast.splatinsert126, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body118 vector.body118: ; preds = %vector.body118, %vector.ph112 %index119 = phi i64 [ 0, %vector.ph112 ], [ %index.next128, %vector.body118 ] %offset.idx120 = add i64 %indvars.iv.next.peel64.i.4, %index119 %198 = trunc i64 %offset.idx120 to i32 %offset.idx121 = add i64 %indvars.iv.next.peel64.i.4, %index119 %199 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx121 %wide.load122 = load <4 x i32>, ptr %199, align 4, !tbaa !5, !alias.scope !42, !noalias !45 %200 = getelementptr inbounds i32, ptr %199, i64 4 %wide.load123 = load <4 x i32>, ptr %200, align 4, !tbaa !5, !alias.scope !42, !noalias !45 %201 = sub i32 %198, %172 %202 = zext i32 %201 to i64 %203 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %202 %wide.load124 = load <4 x i32>, ptr %203, align 4, !tbaa !5, !alias.scope !45 %204 = getelementptr inbounds i32, ptr %203, i64 4 %wide.load125 = load <4 x i32>, ptr %204, align 4, !tbaa !5, !alias.scope !45 %205 = add nsw <4 x i32> %wide.load124, %broadcast.splat127 %206 = add nsw <4 x i32> %wide.load125, %broadcast.splat127 %207 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load122, <4 x i32> %205) %208 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load123, <4 x i32> %206) store <4 x i32> %207, ptr %199, align 4, !tbaa !5, !alias.scope !42, !noalias !45 store <4 x i32> %208, ptr %200, align 4, !tbaa !5, !alias.scope !42, !noalias !45 %index.next128 = add nuw i64 %index119, 8 %209 = icmp eq i64 %index.next128, %n.vec114 br i1 %209, label %middle.block109, label %vector.body118, !llvm.loop !47 middle.block109: ; preds = %vector.body118 %cmp.n117 = icmp eq i64 %178, %n.vec114 br i1 %cmp.n117, label %f.exit.4, label %land.lhs.true.i.4.preheader158 land.lhs.true.i.4.preheader158: ; preds = %vector.memcheck102, %vector.scevcheck101, %land.lhs.true.i.4.preheader, %middle.block109 %indvars.iv.i.4.ph = phi i64 [ %indvars.iv.next.peel64.i.4, %vector.memcheck102 ], [ %indvars.iv.next.peel64.i.4, %vector.scevcheck101 ], [ %indvars.iv.next.peel64.i.4, %land.lhs.true.i.4.preheader ], [ %ind.end115, %middle.block109 ] br label %land.lhs.true.i.4 land.lhs.true.i.4: ; preds = %land.lhs.true.i.4.preheader158, %land.lhs.true.i.4 %indvars.iv.i.4 = phi i64 [ %indvars.iv.next.i.4, %land.lhs.true.i.4 ], [ %indvars.iv.i.4.ph, %land.lhs.true.i.4.preheader158 ] %arrayidx11.i.4 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i.4 %210 = load i32, ptr %arrayidx11.i.4, align 4, !tbaa !5 %211 = trunc i64 %indvars.iv.i.4 to i32 %212 = sub i32 %211, %172 %idxprom15.i.4 = zext i32 %212 to i64 %arrayidx16.i.4 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i.4 %213 = load i32, ptr %arrayidx16.i.4, align 4, !tbaa !5 %add.i.4 = add nsw i32 %213, %173 %spec.select.i.4 = tail call i32 @llvm.smin.i32(i32 %210, i32 %add.i.4) store i32 %spec.select.i.4, ptr %arrayidx11.i.4, align 4, !tbaa !5 %indvars.iv.next.i.4 = add nsw i64 %indvars.iv.i.4, 1 %214 = and i64 %indvars.iv.next.i.4, 4294967295 %exitcond.not.i.4 = icmp eq i64 %214, 52 br i1 %exitcond.not.i.4, label %f.exit.4, label %land.lhs.true.i.4, !llvm.loop !48 f.exit.4: ; preds = %land.lhs.true.i.4, %middle.block109, %cond.end.peel61.i.4, %cond.end.peel.i.4, %f.exit.3 %215 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @g, i64 0, i64 5), align 4, !tbaa !5 %216 = load i32, ptr getelementptr inbounds ([6 x i32], ptr @p, i64 0, i64 5), align 4, !tbaa !5 %idxprom5.i.5 = sext i32 %215 to i64 %arrayidx6.i.5 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom5.i.5 store i32 %216, ptr %arrayidx6.i.5, align 4, !tbaa !5 %cmp46.i.5 = icmp slt i32 %215, 52 br i1 %cmp46.i.5, label %cond.end.peel.i.5, label %f.exit.5 cond.end.peel.i.5: ; preds = %f.exit.4 %indvars.iv.next.peel.i.5 = add nsw i64 %idxprom5.i.5, 1 %217 = and i64 %indvars.iv.next.peel.i.5, 4294967295 %exitcond.peel.not.i.5 = icmp eq i64 %217, 52 br i1 %exitcond.peel.not.i.5, label %f.exit.5, label %cond.end.peel61.i.5 cond.end.peel61.i.5: ; preds = %cond.end.peel.i.5 %indvars.iv.next.peel64.i.5 = add nsw i64 %idxprom5.i.5, 2 %218 = and i64 %indvars.iv.next.peel64.i.5, 4294967295 %exitcond.peel66.not.i.5 = icmp eq i64 %218, 52 br i1 %exitcond.peel66.not.i.5, label %f.exit.5, label %land.lhs.true.i.5.preheader land.lhs.true.i.5.preheader: ; preds = %cond.end.peel61.i.5 %219 = add i32 %215, 3 %220 = zext i32 %219 to i64 %221 = sub nsw i64 53, %220 %min.iters.check139 = icmp ult i64 %221, 24 br i1 %min.iters.check139, label %land.lhs.true.i.5.preheader157, label %vector.scevcheck129 vector.scevcheck129: ; preds = %land.lhs.true.i.5.preheader %222 = add i32 %215, 3 %223 = zext i32 %222 to i64 %224 = sub nsw i64 52, %223 %225 = trunc i64 %224 to i32 %226 = sub i32 -4, %215 %227 = icmp ult i32 %226, %225 %228 = and i64 %224, 4294967294 %229 = icmp eq i64 %228, 4294967294 %230 = icmp ugt i64 %224, 4294967295 %231 = or i1 %229, %230 %232 = or i1 %227, %231 br i1 %232, label %land.lhs.true.i.5.preheader157, label %vector.memcheck130 vector.memcheck130: ; preds = %vector.scevcheck129 %233 = shl nsw i64 %idxprom5.i.5, 2 %234 = getelementptr i8, ptr @dp, i64 %233 %scevgep131 = getelementptr i8, ptr %234, i64 8 %235 = add nsw i64 %233, 220 %236 = add i32 %215, 3 %237 = zext i32 %236 to i64 %238 = shl nuw nsw i64 %237, 2 %239 = sub nsw i64 %235, %238 %scevgep132 = getelementptr i8, ptr @dp, i64 %239 %240 = sub nsw i64 220, %238 %scevgep133 = getelementptr i8, ptr @dp, i64 %240 %bound0134 = icmp ult ptr %scevgep131, %scevgep133 %bound1135 = icmp ugt ptr %scevgep132, getelementptr inbounds ([52 x i32], ptr @dp, i64 0, i64 2) %found.conflict136 = and i1 %bound0134, %bound1135 br i1 %found.conflict136, label %land.lhs.true.i.5.preheader157, label %vector.ph140 vector.ph140: ; preds = %vector.memcheck130 %n.vec142 = and i64 %221, -8 %ind.end143 = add nsw i64 %indvars.iv.next.peel64.i.5, %n.vec142 %broadcast.splatinsert154 = insertelement <4 x i32> poison, i32 %216, i64 0 %broadcast.splat155 = shufflevector <4 x i32> %broadcast.splatinsert154, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body146 vector.body146: ; preds = %vector.body146, %vector.ph140 %index147 = phi i64 [ 0, %vector.ph140 ], [ %index.next156, %vector.body146 ] %offset.idx148 = add i64 %indvars.iv.next.peel64.i.5, %index147 %241 = trunc i64 %offset.idx148 to i32 %offset.idx149 = add i64 %indvars.iv.next.peel64.i.5, %index147 %242 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %offset.idx149 %wide.load150 = load <4 x i32>, ptr %242, align 4, !tbaa !5, !alias.scope !49, !noalias !52 %243 = getelementptr inbounds i32, ptr %242, i64 4 %wide.load151 = load <4 x i32>, ptr %243, align 4, !tbaa !5, !alias.scope !49, !noalias !52 %244 = sub i32 %241, %215 %245 = zext i32 %244 to i64 %246 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %245 %wide.load152 = load <4 x i32>, ptr %246, align 4, !tbaa !5, !alias.scope !52 %247 = getelementptr inbounds i32, ptr %246, i64 4 %wide.load153 = load <4 x i32>, ptr %247, align 4, !tbaa !5, !alias.scope !52 %248 = add nsw <4 x i32> %wide.load152, %broadcast.splat155 %249 = add nsw <4 x i32> %wide.load153, %broadcast.splat155 %250 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load150, <4 x i32> %248) %251 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load151, <4 x i32> %249) store <4 x i32> %250, ptr %242, align 4, !tbaa !5, !alias.scope !49, !noalias !52 store <4 x i32> %251, ptr %243, align 4, !tbaa !5, !alias.scope !49, !noalias !52 %index.next156 = add nuw i64 %index147, 8 %252 = icmp eq i64 %index.next156, %n.vec142 br i1 %252, label %middle.block137, label %vector.body146, !llvm.loop !54 middle.block137: ; preds = %vector.body146 %cmp.n145 = icmp eq i64 %221, %n.vec142 br i1 %cmp.n145, label %f.exit.5, label %land.lhs.true.i.5.preheader157 land.lhs.true.i.5.preheader157: ; preds = %vector.memcheck130, %vector.scevcheck129, %land.lhs.true.i.5.preheader, %middle.block137 %indvars.iv.i.5.ph = phi i64 [ %indvars.iv.next.peel64.i.5, %vector.memcheck130 ], [ %indvars.iv.next.peel64.i.5, %vector.scevcheck129 ], [ %indvars.iv.next.peel64.i.5, %land.lhs.true.i.5.preheader ], [ %ind.end143, %middle.block137 ] br label %land.lhs.true.i.5 land.lhs.true.i.5: ; preds = %land.lhs.true.i.5.preheader157, %land.lhs.true.i.5 %indvars.iv.i.5 = phi i64 [ %indvars.iv.next.i.5, %land.lhs.true.i.5 ], [ %indvars.iv.i.5.ph, %land.lhs.true.i.5.preheader157 ] %arrayidx11.i.5 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %indvars.iv.i.5 %253 = load i32, ptr %arrayidx11.i.5, align 4, !tbaa !5 %254 = trunc i64 %indvars.iv.i.5 to i32 %255 = sub i32 %254, %215 %idxprom15.i.5 = zext i32 %255 to i64 %arrayidx16.i.5 = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom15.i.5 %256 = load i32, ptr %arrayidx16.i.5, align 4, !tbaa !5 %add.i.5 = add nsw i32 %256, %216 %spec.select.i.5 = tail call i32 @llvm.smin.i32(i32 %253, i32 %add.i.5) store i32 %spec.select.i.5, ptr %arrayidx11.i.5, align 4, !tbaa !5 %indvars.iv.next.i.5 = add nsw i64 %indvars.iv.i.5, 1 %257 = and i64 %indvars.iv.next.i.5, 4294967295 %exitcond.not.i.5 = icmp eq i64 %257, 52 br i1 %exitcond.not.i.5, label %f.exit.5, label %land.lhs.true.i.5, !llvm.loop !55 f.exit.5: ; preds = %land.lhs.true.i.5, %middle.block137, %cond.end.peel61.i.5, %cond.end.peel.i.5, %f.exit.4 store i32 6, ptr @i, align 4, !tbaa !5 %call8 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @b) %258 = load i32, ptr @b, align 4, !tbaa !5 %tobool.not9 = icmp eq i32 %258, 0 br i1 %tobool.not9, label %for.end5, label %for.inc3 for.inc3: ; preds = %f.exit.5, %for.inc3 %259 = phi i32 [ %261, %for.inc3 ], [ %258, %f.exit.5 ] %div = sdiv i32 %259, 100 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds [52 x i32], ptr @dp, i64 0, i64 %idxprom %260 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %260) %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @b) %261 = load i32, ptr @b, align 4, !tbaa !5 %tobool.not = icmp eq i32 %261, 0 br i1 %tobool.not, label %for.end5, label %for.inc3, !llvm.loop !56 for.end5: ; preds = %for.inc3, %f.exit.5 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) #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: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #4 attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.peeled.count", i32 2} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!14} !14 = distinct !{!14, !15} !15 = distinct !{!15, !"LVerDomain"} !16 = !{!17} !17 = distinct !{!17, !15} !18 = distinct !{!18, !10, !11, !12, !19} !19 = !{!"llvm.loop.unroll.runtime.disable"} !20 = distinct !{!20, !10, !11, !12} !21 = !{!22} !22 = distinct !{!22, !23} !23 = distinct !{!23, !"LVerDomain"} !24 = !{!25} !25 = distinct !{!25, !23} !26 = distinct !{!26, !10, !11, !12, !19} !27 = distinct !{!27, !10, !11, !12} !28 = !{!29} !29 = distinct !{!29, !30} !30 = distinct !{!30, !"LVerDomain"} !31 = !{!32} !32 = distinct !{!32, !30} !33 = distinct !{!33, !10, !11, !12, !19} !34 = distinct !{!34, !10, !11, !12} !35 = !{!36} !36 = distinct !{!36, !37} !37 = distinct !{!37, !"LVerDomain"} !38 = !{!39} !39 = distinct !{!39, !37} !40 = distinct !{!40, !10, !11, !12, !19} !41 = distinct !{!41, !10, !11, !12} !42 = !{!43} !43 = distinct !{!43, !44} !44 = distinct !{!44, !"LVerDomain"} !45 = !{!46} !46 = distinct !{!46, !44} !47 = distinct !{!47, !10, !11, !12, !19} !48 = distinct !{!48, !10, !11, !12} !49 = !{!50} !50 = distinct !{!50, !51} !51 = distinct !{!51, !"LVerDomain"} !52 = !{!53} !53 = distinct !{!53, !51} !54 = distinct !{!54, !10, !11, !12, !19} !55 = distinct !{!55, !10, !11, !12} !56 = distinct !{!56, !10}
#include <stdio.h> int main(void){ int i; char s[3]; scanf("%s",s); if(s[2]==NULL) printf("%s",s); else{ for(i=0;i<3;i++) printf("%c",s[2-i]); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215700/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %arrayidx = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 2 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp = icmp eq i8 %0, 0 br i1 %cmp, label %if.then, label %for.body.preheader for.body.preheader: ; preds = %entry %conv7 = sext i8 %0 to i32 %putchar = call i32 @putchar(i32 %conv7) %arrayidx6.1 = getelementptr inbounds [3 x i8], ptr %s, i64 0, i64 1 %1 = load i8, ptr %arrayidx6.1, align 1, !tbaa !5 %conv7.1 = sext i8 %1 to i32 %putchar.1 = call i32 @putchar(i32 %conv7.1) %2 = load i8, ptr %s, align 1, !tbaa !5 %conv7.2 = sext i8 %2 to i32 %putchar.2 = call i32 @putchar(i32 %conv7.2) br label %if.end if.then: ; preds = %entry %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %s) br label %if.end if.end: ; preds = %for.body.preheader, %if.then call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { char moji[100]; int i; scanf("%s",moji); for(i=0; moji[i]!='\0'; ++i); if(i==2){ printf("%c",moji[0]); printf("%c",moji[1]); } if(i==3){ printf("%c",moji[2]); printf("%c",moji[1]); printf("%c",moji[0]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215744/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %moji = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %moji) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %moji) br label %for.cond for.cond: ; preds = %for.cond, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i8], ptr %moji, 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.end, label %for.cond, !llvm.loop !8 for.end: ; preds = %for.cond %1 = trunc i64 %indvars.iv to i32 switch i32 %1, label %if.end22 [ i32 2, label %if.then i32 3, label %if.then12 ] if.then: ; preds = %for.end %2 = load i8, ptr %moji, align 16, !tbaa !5 %conv5 = sext i8 %2 to i32 %putchar = call i32 @putchar(i32 %conv5) %arrayidx7 = getelementptr inbounds [100 x i8], ptr %moji, i64 0, i64 1 %3 = load i8, ptr %arrayidx7, align 1, !tbaa !5 br label %if.end22.sink.split if.then12: ; preds = %for.end %arrayidx13 = getelementptr inbounds [100 x i8], ptr %moji, i64 0, i64 2 %4 = load i8, ptr %arrayidx13, align 2, !tbaa !5 %conv14 = sext i8 %4 to i32 %putchar27 = call i32 @putchar(i32 %conv14) %arrayidx16 = getelementptr inbounds [100 x i8], ptr %moji, i64 0, i64 1 %5 = load i8, ptr %arrayidx16, align 1, !tbaa !5 %conv17 = sext i8 %5 to i32 %putchar28 = call i32 @putchar(i32 %conv17) %6 = load i8, ptr %moji, align 16, !tbaa !5 br label %if.end22.sink.split if.end22.sink.split: ; preds = %if.then12, %if.then %.sink = phi i8 [ %3, %if.then ], [ %6, %if.then12 ] %conv8 = sext i8 %.sink to i32 %putchar26 = call i32 @putchar(i32 %conv8) br label %if.end22 if.end22: ; preds = %if.end22.sink.split, %for.end call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %moji) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
// AOJ 2097: Triangles // 2017.11.7 bal4u@uu #include <stdio.h> #include <math.h> #define PI 3.1415926535897932384626433832795 #define ROOT3 1.7320508075688772935274463415059 int main() { int n; while (scanf("%d", &n) && n > 0) { if (n % 3 == 0) n /= 3; printf("%lf\n", n/(1/tan(PI/(3*n))+ROOT3)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215801/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215801/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf\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 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool9 = icmp ne i32 %call8, 0 %0 = load i32, ptr %n, align 4 %cmp10 = icmp sgt i32 %0, 0 %1 = select i1 %tobool9, i1 %cmp10, i1 false br i1 %1, label %while.body, label %while.end while.body: ; preds = %entry, %if.end %2 = phi i32 [ %4, %if.end ], [ %0, %entry ] %rem = urem i32 %2, 3 %div = udiv i32 %2, 3 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %while.body store i32 %div, ptr %n, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %while.body %3 = phi i32 [ %div, %if.then ], [ %2, %while.body ] %conv = sitofp i32 %3 to double %mul = mul nsw i32 %3, 3 %conv2 = sitofp i32 %mul to double %div3 = fdiv double 0x400921FB54442D18, %conv2 %call4 = call double @tan(double noundef %div3) #4 %div5 = fdiv double 1.000000e+00, %call4 %add = fadd double %div5, 0x3FFBB67AE8584CAA %div6 = fdiv double %conv, %add %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %div6) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool = icmp ne i32 %call, 0 %4 = load i32, ptr %n, align 4 %cmp = icmp sgt i32 %4, 0 %5 = select i1 %tobool, i1 %cmp, i1 false br i1 %5, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %if.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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @tan(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int r,n; scanf("%d",&n); r=n%10; if(r==3){printf("bon\n");} else if(r==0||r==1||r==6||r==8){ printf("pon\n"); } else if(r==2||r==4||r==5||r==7||r==9){ printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 %rem = srem i32 %0, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %if.end23 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %puts39 = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic) br label %if.end23 if.end23: ; preds = %entry, %switch.lookup 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"}
#include<stdio.h> int main() { int n,r,temp; scanf("%d",&n); temp=n; r=temp%10; if(r==3) printf("bon"); else if(r==0||r==1||r==6||r==8) printf("pon"); else printf("hon"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215902/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215902/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [9 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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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)], 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) #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, 10 %1 = icmp ult i32 %rem, 9 br i1 %1, label %switch.lookup, label %if.end12 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end12 if.end12: ; preds = %entry, %switch.lookup %.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.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: 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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 argc, char const *argv[]) { char s[4]; scanf("%s",s); int i; for(i=0;i<4;i++) { if (s[i+1]=='\0') { break; } } if (s[i]=='2' || s[i]=='4' ||s[i]=='5' ||s[i]=='7' ||s[i]=='9') { printf("hon\n"); }else if(s[i]=='0' ||s[i]=='1' ||s[i]=='6' ||s[i]=='8') { printf("pon\n"); }else{ printf("bon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_215946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_215946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %s = alloca [4 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %arrayidx = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 1 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 0 br i1 %cmp1, label %for.end, label %for.cond.1, !llvm.loop !8 for.cond.1: ; preds = %entry %arrayidx.1 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 2 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 0 br i1 %cmp1.1, label %for.end, label %for.cond.2, !llvm.loop !8 for.cond.2: ; preds = %for.cond.1 %arrayidx.2 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 3 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 0 br i1 %cmp1.2, label %for.end, label %for.cond.3, !llvm.loop !8 for.cond.3: ; preds = %for.cond.2 %arrayidx.3 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 4 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %cmp1.3 = icmp eq i8 %3, 0 %spec.select = select i1 %cmp1.3, i64 3, i64 4 br label %for.end, !llvm.loop !8 for.end: ; preds = %for.cond.3, %for.cond.2, %for.cond.1, %entry %i.0.lcssa = phi i64 [ 0, %entry ], [ 1, %for.cond.1 ], [ 2, %for.cond.2 ], [ %spec.select, %for.cond.3 ] %arrayidx4 = getelementptr inbounds [4 x i8], ptr %s, i64 0, i64 %i.0.lcssa %4 = load i8, ptr %arrayidx4, align 1, !tbaa !5 %switch.tableidx = add i8 %4, -48 %5 = icmp ult i8 %switch.tableidx, 10 br i1 %5, label %switch.lookup, label %if.end61 switch.lookup: ; preds = %for.end %6 = sext i8 %switch.tableidx to i64 %reltable.shift = shl i64 %6, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end61 if.end61: ; preds = %for.end, %switch.lookup %str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %for.end ] %puts73 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { long long int n,l=0,m=0,o=0,p=0,c,d,e=0,f=0,i; long long int a[100000]; scanf("%lld\n",&n); for(i=0;i<n;i++) { scanf("%lld",&a[i]); } c=a[0]; d=a[n-1]; e=a[1]-a[0]; f=a[n-1]-a[0]; printf("%lld %lld\n",e,f); for(i=1;i<n-1;i++) { m=a[i]-a[0]; l=a[n-1]-a[i]; o=a[i+1]-a[i]; p=a[i]-a[i-1]; if(o>=p) printf("%lld ",p); else printf("%lld ",o); if(m>=l) printf("%lld\n",m); else printf("%lld\n",l); } e=a[n-1]-a[n-2]; f=a[n-1]-a[0]; printf("%lld %lld",e,f); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21599/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21599/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lld\0A\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [11 x i8] c"%lld %lld\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld \00", align 1 @.str.4 = private unnamed_addr constant [10 x i8] c"%lld %lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %a = alloca [100000 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %cmp69 = icmp sgt i64 %0, 0 br i1 %cmp69, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.070 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %i.070 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.070, 1 %1 = load i64, ptr %n, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %1 br i1 %cmp, label %for.body, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.body %arrayidx4.phi.trans.insert = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 1 %.pre = load i64, ptr %arrayidx4.phi.trans.insert, align 8, !tbaa !5 %.pre80 = load i64, ptr %a, align 16, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %2 = phi i64 [ undef, %entry ], [ %.pre80, %for.end.loopexit ] %3 = phi i64 [ undef, %entry ], [ %.pre, %for.end.loopexit ] %.lcssa68 = phi i64 [ %0, %entry ], [ %1, %for.end.loopexit ] %sub = add nsw i64 %.lcssa68, -1 %arrayidx3 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %sub %sub6 = sub nsw i64 %3, %2 %4 = load i64, ptr %arrayidx3, align 8, !tbaa !5 %sub10 = sub nsw i64 %4, %2 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %sub6, i64 noundef %sub10) %5 = load i64, ptr %n, align 8, !tbaa !5 %sub1371 = add nsw i64 %5, -1 %cmp1472 = icmp sgt i64 %5, 2 br i1 %cmp1472, label %for.body15, label %for.end41 for.body15: ; preds = %for.end, %for.body15 %sub1374 = phi i64 [ %sub13, %for.body15 ], [ %sub1371, %for.end ] %i.173 = phi i64 [ %add, %for.body15 ], [ 1, %for.end ] %arrayidx16 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %i.173 %6 = load i64, ptr %arrayidx16, align 8, !tbaa !5 %7 = load i64, ptr %a, align 16, !tbaa !5 %sub18 = sub nsw i64 %6, %7 %arrayidx20 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %sub1374 %8 = load i64, ptr %arrayidx20, align 8, !tbaa !5 %sub22 = sub nsw i64 %8, %6 %add = add nuw nsw i64 %i.173, 1 %arrayidx23 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %add %9 = load i64, ptr %arrayidx23, align 8, !tbaa !5 %sub25 = sub nsw i64 %9, %6 %sub27 = add nsw i64 %i.173, -1 %arrayidx28 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %sub27 %10 = load i64, ptr %arrayidx28, align 8, !tbaa !5 %sub29 = sub nsw i64 %6, %10 %sub25.sub29 = call i64 @llvm.smin.i64(i64 %sub25, i64 %sub29) %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %sub25.sub29) %sub18.sink = call i64 @llvm.smax.i64(i64 %sub18, i64 %sub22) %call35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %sub18.sink) %11 = load i64, ptr %n, align 8, !tbaa !5 %sub13 = add nsw i64 %11, -1 %cmp14 = icmp slt i64 %add, %sub13 br i1 %cmp14, label %for.body15, label %for.end41, !llvm.loop !11 for.end41: ; preds = %for.body15, %for.end %.lcssa = phi i64 [ %5, %for.end ], [ %11, %for.body15 ] %sub13.lcssa = phi i64 [ %sub1371, %for.end ], [ %sub13, %for.body15 ] %arrayidx43 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %sub13.lcssa %12 = load i64, ptr %arrayidx43, align 8, !tbaa !5 %sub44 = add nsw i64 %.lcssa, -2 %arrayidx45 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %sub44 %13 = load i64, ptr %arrayidx45, align 8, !tbaa !5 %sub46 = sub nsw i64 %12, %13 %14 = load i64, ptr %a, align 16, !tbaa !5 %sub50 = sub nsw i64 %12, %14 %call51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i64 noundef %sub46, i64 noundef %sub50) call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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.smin.i64(i64, i64) #3 ; 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 main(){ int n,p; scanf("%d",&n); switch(n%10){ case 0: case 1: case 6: case 8: printf("pon\n"); break; case 3: printf("bon\n"); break; default: printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216031/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216031/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 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 %rem = srem i32 %0, 10 %1 = icmp ult i32 %rem, 9 br i1 %1, label %switch.lookup, label %sw.epilog switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %sw.epilog sw.epilog: ; preds = %entry, %switch.lookup %str.5.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str.5, %entry ] %puts6 = call i32 @puts(ptr nonnull dereferenceable(1) %str.5.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"}
/* kadai 3_2 nabe9393 */ #include<stdio.h> int main(void){ int number_pen; scanf("%d", &number_pen); //入力 if (number_pen % 10 == 3){ //1のくらいが3の時はBON printf("bon\n"); } else if (number_pen % 10 == 0 || number_pen % 10 == 1 || number_pen % 10 == 6 || number_pen % 10 == 8){ //1のくらいが0,1,6,8の時はPON printf("pon\n"); } else{ //それ以外はHON printf("hon\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216075/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216075/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 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: %number_pen = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number_pen) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %number_pen) %0 = load i32, ptr %number_pen, align 4, !tbaa !5 %rem = srem i32 %0, 10 %1 = icmp ult i32 %rem, 9 br i1 %1, label %switch.lookup, label %if.end16 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end16 if.end16: ; preds = %entry, %switch.lookup %str.4.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @str, %entry ] %puts17 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number_pen) #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"}
/*3.2 hightierra*/ #include <stdio.h> int main(void){ //変数の定義 int N,amari; scanf("%d",&N); //iにNの1の位を代入 amari = N % 10; //iの値で場合わけ switch(amari){ case 2: case 4: case 5: case 7: case 9: printf("hon"); break; case 0: case 1: case 6: case 8: printf("pon"); break; case 3: printf("bon"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216118/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216118/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 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.1 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.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.1 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.1 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) #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, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %sw.epilog switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic) br label %sw.epilog sw.epilog: ; preds = %entry, %switch.lookup 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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_2 moka223711 */ #include <stdio.h> int main(void){ int N; // 入力Nを受け取る scanf("%d", &N); // N % 10で1の位を取得する // switch文で各値に対してN本の本の読み方を出力する switch(N % 10){ case 2: case 4: case 5: case 7: case 9: printf("hon"); break; case 0: case 1: case 6: case 8: printf("pon"); break; default: printf("bon"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216169/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216169/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 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.1 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.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.1 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.1 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) #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, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %sw.epilog switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %sw.epilog sw.epilog: ; preds = %entry, %switch.lookup %.str.3.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.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: 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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_2 pptenshi */ #include<stdio.h> int main(void) { int n; int n_1; // nの1の位 // input scanf("%d", &n); n_1 = n % 10; //output switch (n_1) { case 2: case 4: case 5: case 7: case 9: printf("hon\n"); break; case 0: case 1: case 6: case 8: printf("pon\n"); break; case 3: printf("bon\n"); break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216211/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216211/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [10 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.5 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 %rem = srem i32 %0, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %sw.epilog switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %puts = call i32 @puts(ptr nonnull dereferenceable(1) %reltable.intrinsic) br label %sw.epilog sw.epilog: ; preds = %entry, %switch.lookup 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"}
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <float.h> #pragma region 定義 #define i_cin(X) scanf("%d", &X) #define i_cin2(X,Y) scanf("%d %d",&X,&Y) #define i_cin4(X,Y,Z,W) scanf("%d %d %d %d",&X,&Y,&Z,&W) #define i_cin3(X,Y,Z) scanf("%d %d %d",&X,&Y,&Z) #define l_cin(X) scanf("%ld",&X) #define f_cin(X) scanf("%f",&X) #define l_cin2(X,Y) scanf("%ld %ld",&X,&Y) #define s_cin(X) scanf("%s",&X) #define c_cin(X) scanf("%c",&X); #define ll_cin(X) scanf("%lld", &X) #define ull_cin(X) scanf("%llu", &X) #define lf_cin(X) scanf("%lf", &X) #define i_cout(X) printf("%d\n",X) #define f_cout(X) printf("%g\n",X) #define i_cout2(X,Y) printf("%d %d\n",X,Y) #define l_cout(X) printf("%ld\n",X) #define s_cout(X) printf("%s\n",X) #define s_coutc(X) printf("%s",X) #define c_cout(X) printf("%c",X) #define ll_cout(X) printf("%lld\n",X) #define ull_cout(X) printf("%llu\n",X) typedef long long ll; typedef unsigned long long ull; #define rept(x, s, n) for (int x = s; x < n; x++) #define S_RTN(S) s_cout(S);return 0 #define _itoa(A,N) sprintf(A, "%d", N); int i_cins(int n, int* A); int l_cins2(int n, long* A, long* B); int s_dsort(const void* a, const void* b); int s_asort(const void* a, const void* b); int _gcd(int a, int b); int _swp(int* a, int* b); int _cknum(char* a, int n); int _atoi(char* s, int len); int s_asorts(const void* a, const void* b); //昇順 int s_asorts(const void* a, const void* b) { return(strcmp((char*)a, (char*)b)); } int s_dsort(const void* a, const void* b) { return(*(int*)b - *(int*)a); } int s_asort(const void* a, const void* b) { return(*(int*)a - *(int*)b); } int l_cins2(int n, long* a, long* b) { int i; rept(i, 0, n) { l_cin2(*(a + i), *(b + i)); } return 0; } int i_cins(int n, int* a) { int i; for (i = 0; i < n; i++) { i_cin(*(a + i)); } return 0; } int _gcd(int a, int b) { int r, tmp; if (a < b) { tmp = a; a = b; b = tmp; } r = a % b; while (r) { if (!r) break; a = b; b = r; r = a % b; } return(b); } long _max(long a, long b) { return a > b ? a : b; } long _min(long a, long b) { return a < b ? a : b; } int _swp(int* a, int* b) { int tmp; tmp = *b; *b = *a; *a = tmp; return 0; } int _cknum(char* a, int n) { int i; char t = '0'; for (i = 0; i < n; i++) { if (a[i] < '0' || a[i]>'9') return 1; } return 0; } int _atoi(char* s, int len) { char tmp[20]; memcpy(tmp, s, len); tmp[len] = 0x00; return (atoi(tmp)); } #pragma endregion int main(void) { char n[4]; int l; s_cin(n); l = strlen(n); if (n[l - 1] == '3') { S_RTN("bon\n"); } if (n[l - 1] == '0' || n[l - 1] == '1' || n[l - 1] == '6' || n[l - 1] == '8' ) { S_RTN("pon\n"); } S_RTN("hon\n"); } // ARC-80 C A-adjacent //int main(void) //{ // int n, i, cnt4 = 0, cnt2 = 0, cnt = 0; // int a; // // i_cin(n); // // for (i = 0; i < n; i++) { // i_cin(a); // if (a % 2) { // cnt++; continue; // } // if (!(a % 4)) { // cnt4++; continue; // } // cnt2++; cnt++; // } //// printf("cnt:%d cnt2:%d\n",cnt,cnt2+1); // if (cnt2 == cnt) { S_RTN("Yes\n"); } // // if (cnt > cnt4 + 1) { S_RTN("No\n"); } // //if (cnt2<=1) { S_RTN("Yes"); } // //if (cnt4 <= cnt2) { S_RTN("No\n"); } // S_RTN("Yes\n"); //} //167-D //static int a[200001]; //static int c[200001]; //int main(void) { // ll k,ps,pe,i,j=0,n,r; // // ll_cin(n); // ll_cin(k); // // for (i = 0; i < n; i++) { // i_cin(a[i]); // if ((ll)(i + 1) == k) { // ll_cout(c[i]); return 0; // } // if (c[i] == 1) { // ps = i; // pe = i - 1; break; // } // c[i]++; // } // k -= i; // r = (int)(k % (pe-ps))+ps; // i_cout(a[r]); // return 0; //} // //167-C //int main(void) { // int n,m,x,i,j; // int c[13][2], a[13][12]; // // i_cin3(n, m, x); // for (i = 0; i < n; i++) { // i_cin(c[i][0]); c[i][1] = i; // i_cins(m, a[i]); // } // // qsort(c[0],n, 8, s_asort); // for (i = 0; i < n; i++) { // // } // return 0; // //} //#define _N 1000000000 //int main(void) //{ // // int n,i; // ull tmp=1; // // i_cin(n); // // for (i = 1; i <= n; i++) { // if (!(tmp % ((ull)_N + 7))) // tmp = 1; // tmp *= (ull)i; // } // tmp %= ((ull)_N + 7); // // ull_cout(tmp); // return 0; //}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216255/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216255/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [8 x i8] c"%ld %ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.4 = private unnamed_addr constant [5 x i8] c"bon\0A\00", align 1 @.str.5 = private unnamed_addr constant [5 x i8] c"pon\0A\00", align 1 @.str.6 = private unnamed_addr constant [5 x i8] c"hon\0A\00", align 1 @reltable.main = private unnamed_addr constant [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.4 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.6 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.5 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_asorts(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #16 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_dsort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { 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 @s_asort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { 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 @l_cins2(i32 noundef %n, ptr noundef %a, ptr noundef %b) local_unnamed_addr #3 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.cond.cleanup: ; preds = %for.body, %entry ret i32 0 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %add.ptr = getelementptr inbounds i64, ptr %a, i64 %indvars.iv %add.ptr3 = getelementptr inbounds i64, ptr %b, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %add.ptr, ptr noundef %add.ptr3) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; 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 memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @i_cins(i32 noundef %n, ptr noundef %a) local_unnamed_addr #3 { entry: %cmp3 = icmp sgt i32 %n, 0 br i1 %cmp3, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 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 ] %add.ptr = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %entry ret i32 0 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @_gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #6 { entry: %spec.select = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) %spec.select15 = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %rem = srem i32 %spec.select15, %spec.select %tobool.not16 = icmp eq i32 %rem, 0 br i1 %tobool.not16, label %while.end, label %if.end3 if.end3: ; preds = %entry, %if.end3 %r.018 = phi i32 [ %rem4, %if.end3 ], [ %rem, %entry ] %b.addr.117 = phi i32 [ %r.018, %if.end3 ], [ %spec.select, %entry ] %rem4 = srem i32 %b.addr.117, %r.018 %tobool.not = icmp eq i32 %rem4, 0 br i1 %tobool.not, label %while.end, label %if.end3, !llvm.loop !12 while.end: ; preds = %if.end3, %entry %b.addr.1.lcssa = phi i32 [ %spec.select, %entry ], [ %r.018, %if.end3 ] ret i32 %b.addr.1.lcssa } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @_max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #7 { 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 @_min(i64 noundef %a, i64 noundef %b) local_unnamed_addr #7 { entry: %cond = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @_swp(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #8 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 store i32 %1, ptr %b, align 4, !tbaa !5 store i32 %0, ptr %a, align 4, !tbaa !5 ret i32 0 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @_cknum(ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #9 { entry: %cmp13 = icmp sgt i32 %n, 0 br i1 %cmp13, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.cond: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !13 for.body: ; preds = %for.body.preheader, %for.cond %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.cond ] %arrayidx = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !14 %1 = add i8 %0, -58 %or.cond = icmp ult i8 %1, -10 br i1 %or.cond, label %cleanup, label %for.cond cleanup: ; preds = %for.body, %for.cond, %entry %retval.0 = phi i32 [ 0, %entry ], [ 0, %for.cond ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn uwtable define dso_local i32 @_atoi(ptr nocapture noundef readonly %s, i32 noundef %len) local_unnamed_addr #10 { entry: %tmp = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %tmp) #17 %conv = sext i32 %len to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %tmp, ptr align 1 %s, i64 %conv, i1 false) %arrayidx = getelementptr inbounds [20 x i8], ptr %tmp, i64 0, i64 %conv store i8 0, ptr %arrayidx, align 1, !tbaa !14 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %tmp, ptr noundef null, i32 noundef 10) #17 %conv.i = trunc i64 %call.i to i32 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %tmp) #17 ret i32 %conv.i } ; 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) #11 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca [4 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #17 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %n) %call1 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %n) #16 %sub = shl i64 %call1, 32 %sext = add i64 %sub, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx = getelementptr inbounds [4 x i8], ptr %n, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !14 %switch.tableidx = add i8 %0, -48 %1 = icmp ult i8 %switch.tableidx, 9 br i1 %1, label %switch.lookup, label %cleanup switch.lookup: ; preds = %entry %2 = sext i8 %switch.tableidx to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %cleanup cleanup: ; preds = %entry, %switch.lookup %.str.6.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.6, %entry ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %.str.6.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #17 ret i32 0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #13 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #13 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #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 willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, i64) #15 attributes #0 = { 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 #1 = { 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 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 = { 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 #7 = { 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 #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 = { 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 #10 = { mustprogress nofree nounwind willreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #12 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #14 = { nofree nounwind } attributes #15 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } attributes #16 = { nounwind willreturn memory(read) } attributes #17 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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 = !{!7, !7, i64 0}
#include <stdio.h> #include <string.h> int main(void){ char hon[10]; scanf("%s",&hon); for(int i=0;i<=3;i++){ if(hon[i+1]=='\0'){ if(strncmp("3",&hon[i],1)==0){ printf("bon"); return 0; }else if(strncmp("0",&hon[i],1)==0||strncmp("1",&hon[i],1)==0||strncmp("6",&hon[i],1)==0||strncmp("8",&hon[i],1)==0){ printf("pon"); return 0; }else{ printf("hon"); return 0; } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216305/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216305/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @.str.7 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.8 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.8 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.8 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.8 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.7 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.8 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.7 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: %hon = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %hon) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %hon) %arrayidx = getelementptr inbounds [10 x i8], ptr %hon, i64 0, i64 1 %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp1 = icmp eq i8 %0, 0 br i1 %cmp1, label %if.then, label %for.cond.1, !llvm.loop !8 for.cond.1: ; preds = %entry %arrayidx.1 = getelementptr inbounds [10 x i8], ptr %hon, i64 0, i64 2 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp1.1 = icmp eq i8 %1, 0 br i1 %cmp1.1, label %if.then, label %for.cond.2, !llvm.loop !8 for.cond.2: ; preds = %for.cond.1 %arrayidx.2 = getelementptr inbounds [10 x i8], ptr %hon, i64 0, i64 3 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp1.2 = icmp eq i8 %2, 0 br i1 %cmp1.2, label %if.then, label %for.cond.3, !llvm.loop !8 for.cond.3: ; preds = %for.cond.2 %arrayidx.3 = getelementptr inbounds [10 x i8], ptr %hon, i64 0, i64 4 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %cmp1.3 = icmp eq i8 %3, 0 br i1 %cmp1.3, label %if.then, label %cleanup, !llvm.loop !8 if.then: ; preds = %for.cond.3, %for.cond.2, %for.cond.1, %entry %i.0.lcssa50.wide = phi i64 [ 0, %entry ], [ 1, %for.cond.1 ], [ 2, %for.cond.2 ], [ 3, %for.cond.3 ] %arrayidx4 = getelementptr inbounds [10 x i8], ptr %hon, i64 0, i64 %i.0.lcssa50.wide %rhsc = load i8, ptr %arrayidx4, align 1 %switch.tableidx = add i8 %rhsc, -48 %4 = icmp ult i8 %switch.tableidx, 9 br i1 %4, label %switch.lookup, label %cleanup.sink.split switch.lookup: ; preds = %if.then %5 = sext i8 %switch.tableidx to i64 %reltable.shift = shl i64 %5, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %cleanup.sink.split cleanup.sink.split: ; preds = %if.then, %switch.lookup %.str.8.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.8, %if.then ] %call35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.8.sink) br label %cleanup cleanup: ; preds = %cleanup.sink.split, %for.cond.3 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %hon) #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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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"}
#include <stdio.h> int main(void){ int N; scanf("%d",&N); if(N%10==3) printf("bon"); else if(N%10==0||N%10==1||N%10==6||N%10==8) printf("pon"); else printf("hon"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216363/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216363/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"bon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"hon\00", align 1 @reltable.main = private unnamed_addr constant [9 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.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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)], 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) #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, 10 %1 = icmp ult i32 %rem, 9 br i1 %1, label %switch.lookup, label %if.end16 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end16 if.end16: ; preds = %entry, %switch.lookup %.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.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: 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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); //結果 if(N%10==2||N%10==4||N%10==5||N%10==7||N%10==9) { printf("hon"); }else if(N%10==0||N%10==1||N%10==6||N%10==8){ printf("pon"); }else{ printf("bon"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216406/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 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.1 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.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.1 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.1 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) #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, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %if.end28 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end28 if.end28: ; preds = %entry, %switch.lookup %.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ] %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.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: 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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"}
//░░░ // ░ anzim bin nasir // ░ #include<stdio.h> int main() { long long int a,b,x,y,ans; int t; scanf("%d",&t); while(t--) { scanf("%lld%lld%lld%lld",&x,&y,&a,&b); if(2*a>b) { if(x>y) { ans=(x-y)*a+y*b; printf("%lld\n",ans); } else { ans=(y-x)*a+x*b; printf("%lld\n",ans); } } else { ans=(x+y)*a; printf("%lld\n",ans); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21645/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21645/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [17 x i8] c"%lld%lld%lld%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 %x = alloca i64, align 8 %y = alloca i64, align 8 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #3 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 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec22 = add nsw i32 %0, -1 store i32 %dec22, ptr %t, align 4, !tbaa !5 %tobool.not23 = icmp eq i32 %0, 0 br i1 %tobool.not23, label %while.end, label %while.body while.body: ; preds = %entry, %if.end16 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %a, ptr noundef nonnull %b) %1 = load i64, ptr %a, align 8, !tbaa !9 %mul = shl nsw i64 %1, 1 %2 = load i64, ptr %b, align 8, !tbaa !9 %cmp = icmp sgt i64 %mul, %2 %3 = load i64, ptr %x, align 8, !tbaa !9 %4 = load i64, ptr %y, align 8, !tbaa !9 br i1 %cmp, label %if.then, label %if.else12 if.then: ; preds = %while.body %cmp2 = icmp sgt i64 %3, %4 br i1 %cmp2, label %if.then3, label %if.else if.then3: ; preds = %if.then %sub = sub nsw i64 %3, %4 %mul4 = mul nsw i64 %sub, %1 %mul5 = mul nsw i64 %4, %2 %add = add nsw i64 %mul4, %mul5 br label %if.end16 if.else: ; preds = %if.then %sub7 = sub nsw i64 %4, %3 %mul8 = mul nsw i64 %sub7, %1 %mul9 = mul nsw i64 %3, %2 %add10 = add nsw i64 %mul8, %mul9 br label %if.end16 if.else12: ; preds = %while.body %add13 = add nsw i64 %4, %3 %mul14 = mul nsw i64 %add13, %1 br label %if.end16 if.end16: ; preds = %if.then3, %if.else, %if.else12 %add.sink = phi i64 [ %add, %if.then3 ], [ %add10, %if.else ], [ %mul14, %if.else12 ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %add.sink) %5 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %5, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %5, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %if.end16, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> #include <stdlib.h> // long long int a[1000000], b[1000000]; // long long int cmpfunc (const void * a, const void * b) { // return ( *(long long int*)a - *(long long int*)b ); // } // long long int square(long long int x, long long int y){ // long long subs = x - y; // } int main(){ long long int a,b,c; long long int d,n,m,p,q,r,k,i,x,y,j,distinct,max,temp,num; char str[10000],str1[10000]; scanf("%lld",&k); for(m=0;m<k;m++){ scanf("%s",str); x = strlen(str); temp = 0; for(i=2;i<x;i=i+2){ if(str[i] != str[i-2]){ temp = 1; } } for(i=3;i<x;i=i+2){ if(str[i] != str[i-2]){ temp = 1; } } if(temp == 0){ printf("%s\n",str); } else{ y = 1; str1[0] = str[0]; for(i=1;i<x;i++){ if(str[i] == '0'){ if(str1[y-1] == '1'){ str1[y] = '0'; y++; } else{ str1[y] = '1'; str1[y+1] = '0'; y = y+2; } } else{ if(str1[y-1] == '0'){ str1[y] = '1'; y++; } else{ str1[y] = '0'; str1[y+1] = '1'; y = y+2; } } } str1[y] = '\0'; printf("%s\n",str1); } } } // qsort(values, 5, sizeof(int), cmpfunc);
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21650/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21650/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i64, align 8 %str = alloca [10000 x i8], align 16 %str1 = alloca [10000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %str) #5 call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %str1) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %0 = load i64, ptr %k, align 8, !tbaa !5 %cmp120 = icmp sgt i64 %0, 0 br i1 %cmp120, label %for.body.preheader, label %for.end81 for.body.preheader: ; preds = %entry %arrayidx18.phi.trans.insert = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc79 %m.0121 = phi i64 [ %inc80, %for.inc79 ], [ 0, %for.body.preheader ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #6 %cmp5109 = icmp sgt i64 %call3, 2 br i1 %cmp5109, label %for.body6.preheader, label %for.inc79 for.body6.preheader: ; preds = %for.body %.pre = load i8, ptr %str, align 16, !tbaa !9 %1 = add i64 %call3, -3 %2 = lshr i64 %1, 1 %3 = add nuw i64 %2, 1 %xtraiter = and i64 %3, 3 %4 = icmp ult i64 %1, 6 br i1 %4, label %for.cond11.preheader.unr-lcssa, label %for.body6.preheader.new for.body6.preheader.new: ; preds = %for.body6.preheader %unroll_iter = and i64 %3, -4 br label %for.body6 for.cond11.preheader.unr-lcssa: ; preds = %for.body6, %for.body6.preheader %spec.select.lcssa.ph = phi i64 [ undef, %for.body6.preheader ], [ %spec.select.3, %for.body6 ] %.unr = phi i8 [ %.pre, %for.body6.preheader ], [ %15, %for.body6 ] %temp.0111.unr = phi i64 [ 0, %for.body6.preheader ], [ %spec.select.3, %for.body6 ] %i.0110.unr = phi i64 [ 2, %for.body6.preheader ], [ %add.3, %for.body6 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond11.preheader, label %for.body6.epil for.body6.epil: ; preds = %for.cond11.preheader.unr-lcssa, %for.body6.epil %5 = phi i8 [ %6, %for.body6.epil ], [ %.unr, %for.cond11.preheader.unr-lcssa ] %temp.0111.epil = phi i64 [ %spec.select.epil, %for.body6.epil ], [ %temp.0111.unr, %for.cond11.preheader.unr-lcssa ] %i.0110.epil = phi i64 [ %add.epil, %for.body6.epil ], [ %i.0110.unr, %for.cond11.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body6.epil ], [ 0, %for.cond11.preheader.unr-lcssa ] %arrayidx.epil = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %i.0110.epil %6 = load i8, ptr %arrayidx.epil, align 2, !tbaa !9 %cmp9.not.epil = icmp eq i8 %6, %5 %spec.select.epil = select i1 %cmp9.not.epil, i64 %temp.0111.epil, i64 1 %add.epil = add nuw nsw i64 %i.0110.epil, 2 %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.cond11.preheader, label %for.body6.epil, !llvm.loop !10 for.cond11.preheader: ; preds = %for.body6.epil, %for.cond11.preheader.unr-lcssa %spec.select.lcssa = phi i64 [ %spec.select.lcssa.ph, %for.cond11.preheader.unr-lcssa ], [ %spec.select.epil, %for.body6.epil ] %cmp12112 = icmp sgt i64 %call3, 3 br i1 %cmp12112, label %for.body14.preheader, label %for.end26 for.body14.preheader: ; preds = %for.cond11.preheader %.pre122 = load i8, ptr %arrayidx18.phi.trans.insert, align 1, !tbaa !9 %7 = add i64 %call3, -4 %8 = lshr i64 %7, 1 %9 = add nuw i64 %8, 1 %xtraiter128 = and i64 %9, 3 %10 = icmp ult i64 %7, 6 br i1 %10, label %for.end26.loopexit.unr-lcssa, label %for.body14.preheader.new for.body14.preheader.new: ; preds = %for.body14.preheader %unroll_iter133 = and i64 %9, -4 br label %for.body14 for.body6: ; preds = %for.body6, %for.body6.preheader.new %11 = phi i8 [ %.pre, %for.body6.preheader.new ], [ %15, %for.body6 ] %temp.0111 = phi i64 [ 0, %for.body6.preheader.new ], [ %spec.select.3, %for.body6 ] %i.0110 = phi i64 [ 2, %for.body6.preheader.new ], [ %add.3, %for.body6 ] %niter = phi i64 [ 0, %for.body6.preheader.new ], [ %niter.next.3, %for.body6 ] %arrayidx = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %i.0110 %12 = load i8, ptr %arrayidx, align 2, !tbaa !9 %cmp9.not = icmp eq i8 %12, %11 %add = add nuw nsw i64 %i.0110, 2 %arrayidx.1 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add %13 = load i8, ptr %arrayidx.1, align 2, !tbaa !9 %cmp9.not.1 = icmp eq i8 %13, %12 %add.1 = add nuw nsw i64 %i.0110, 4 %arrayidx.2 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add.1 %14 = load i8, ptr %arrayidx.2, align 2, !tbaa !9 %cmp9.not.2 = icmp eq i8 %14, %13 %add.2 = add nuw nsw i64 %i.0110, 6 %arrayidx.3 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add.2 %15 = load i8, ptr %arrayidx.3, align 2, !tbaa !9 %cmp9.not.3 = icmp eq i8 %15, %14 %16 = select i1 %cmp9.not.3, i1 %cmp9.not.2, i1 false %17 = select i1 %16, i1 %cmp9.not.1, i1 false %18 = select i1 %17, i1 %cmp9.not, i1 false %spec.select.3 = select i1 %18, i64 %temp.0111, i64 1 %add.3 = add nuw nsw i64 %i.0110, 8 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3.not = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3.not, label %for.cond11.preheader.unr-lcssa, label %for.body6, !llvm.loop !12 for.body14: ; preds = %for.body14, %for.body14.preheader.new %19 = phi i8 [ %.pre122, %for.body14.preheader.new ], [ %23, %for.body14 ] %temp.2114 = phi i64 [ %spec.select.lcssa, %for.body14.preheader.new ], [ %spec.select108.3, %for.body14 ] %i.1113 = phi i64 [ 3, %for.body14.preheader.new ], [ %add25.3, %for.body14 ] %niter134 = phi i64 [ 0, %for.body14.preheader.new ], [ %niter134.next.3, %for.body14 ] %arrayidx15 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %i.1113 %20 = load i8, ptr %arrayidx15, align 1, !tbaa !9 %cmp20.not = icmp eq i8 %20, %19 %add25 = add nuw nsw i64 %i.1113, 2 %arrayidx15.1 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add25 %21 = load i8, ptr %arrayidx15.1, align 1, !tbaa !9 %cmp20.not.1 = icmp eq i8 %21, %20 %add25.1 = add nuw nsw i64 %i.1113, 4 %arrayidx15.2 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add25.1 %22 = load i8, ptr %arrayidx15.2, align 1, !tbaa !9 %cmp20.not.2 = icmp eq i8 %22, %21 %add25.2 = add nuw nsw i64 %i.1113, 6 %arrayidx15.3 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %add25.2 %23 = load i8, ptr %arrayidx15.3, align 1, !tbaa !9 %cmp20.not.3 = icmp eq i8 %23, %22 %24 = select i1 %cmp20.not.3, i1 %cmp20.not.2, i1 false %25 = select i1 %24, i1 %cmp20.not.1, i1 false %26 = select i1 %25, i1 %cmp20.not, i1 false %spec.select108.3 = select i1 %26, i64 %temp.2114, i64 1 %add25.3 = add nuw nsw i64 %i.1113, 8 %niter134.next.3 = add i64 %niter134, 4 %niter134.ncmp.3.not = icmp eq i64 %niter134.next.3, %unroll_iter133 br i1 %niter134.ncmp.3.not, label %for.end26.loopexit.unr-lcssa, label %for.body14, !llvm.loop !14 for.end26.loopexit.unr-lcssa: ; preds = %for.body14, %for.body14.preheader %spec.select108.lcssa.ph = phi i64 [ undef, %for.body14.preheader ], [ %spec.select108.3, %for.body14 ] %.unr130 = phi i8 [ %.pre122, %for.body14.preheader ], [ %23, %for.body14 ] %temp.2114.unr = phi i64 [ %spec.select.lcssa, %for.body14.preheader ], [ %spec.select108.3, %for.body14 ] %i.1113.unr = phi i64 [ 3, %for.body14.preheader ], [ %add25.3, %for.body14 ] %lcmp.mod131.not = icmp eq i64 %xtraiter128, 0 br i1 %lcmp.mod131.not, label %for.end26, label %for.body14.epil for.body14.epil: ; preds = %for.end26.loopexit.unr-lcssa, %for.body14.epil %27 = phi i8 [ %28, %for.body14.epil ], [ %.unr130, %for.end26.loopexit.unr-lcssa ] %temp.2114.epil = phi i64 [ %spec.select108.epil, %for.body14.epil ], [ %temp.2114.unr, %for.end26.loopexit.unr-lcssa ] %i.1113.epil = phi i64 [ %add25.epil, %for.body14.epil ], [ %i.1113.unr, %for.end26.loopexit.unr-lcssa ] %epil.iter129 = phi i64 [ %epil.iter129.next, %for.body14.epil ], [ 0, %for.end26.loopexit.unr-lcssa ] %arrayidx15.epil = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %i.1113.epil %28 = load i8, ptr %arrayidx15.epil, align 1, !tbaa !9 %cmp20.not.epil = icmp eq i8 %28, %27 %spec.select108.epil = select i1 %cmp20.not.epil, i64 %temp.2114.epil, i64 1 %add25.epil = add nuw nsw i64 %i.1113.epil, 2 %epil.iter129.next = add i64 %epil.iter129, 1 %epil.iter129.cmp.not = icmp eq i64 %epil.iter129.next, %xtraiter128 br i1 %epil.iter129.cmp.not, label %for.end26, label %for.body14.epil, !llvm.loop !15 for.end26: ; preds = %for.end26.loopexit.unr-lcssa, %for.body14.epil, %for.cond11.preheader %temp.2.lcssa = phi i64 [ %spec.select.lcssa, %for.cond11.preheader ], [ %spec.select108.lcssa.ph, %for.end26.loopexit.unr-lcssa ], [ %spec.select108.epil, %for.body14.epil ] %cmp27 = icmp eq i64 %temp.2.lcssa, 0 br i1 %cmp27, label %for.inc79, label %if.else if.else: ; preds = %for.end26 %29 = load i8, ptr %str, align 16, !tbaa !9 store i8 %29, ptr %str1, align 16, !tbaa !9 %cmp35116 = icmp sgt i64 %call3, 1 br i1 %cmp35116, label %for.body37, label %for.end74 for.body37: ; preds = %if.else, %for.inc72 %i.2118 = phi i64 [ %inc73, %for.inc72 ], [ 1, %if.else ] %y.0117 = phi i64 [ %y.1, %for.inc72 ], [ 1, %if.else ] %arrayidx38 = getelementptr inbounds [10000 x i8], ptr %str, i64 0, i64 %i.2118 %30 = load i8, ptr %arrayidx38, align 1, !tbaa !9 %cmp40 = icmp eq i8 %30, 48 %sub43 = add nsw i64 %y.0117, -1 %arrayidx44 = getelementptr inbounds [10000 x i8], ptr %str1, i64 0, i64 %sub43 %31 = load i8, ptr %arrayidx44, align 1, !tbaa !9 %arrayidx49 = getelementptr inbounds [10000 x i8], ptr %str1, i64 0, i64 %y.0117 %inc = add nsw i64 %y.0117, 1 br i1 %cmp40, label %if.then42, label %if.else56 if.then42: ; preds = %for.body37 %cmp46 = icmp eq i8 %31, 49 br i1 %cmp46, label %if.then48, label %if.else50 if.then48: ; preds = %if.then42 store i8 48, ptr %arrayidx49, align 1, !tbaa !9 br label %for.inc72 if.else50: ; preds = %if.then42 store i8 49, ptr %arrayidx49, align 1, !tbaa !9 %arrayidx53 = getelementptr inbounds [10000 x i8], ptr %str1, i64 0, i64 %inc store i8 48, ptr %arrayidx53, align 1, !tbaa !9 %add54 = add nsw i64 %y.0117, 2 br label %for.inc72 if.else56: ; preds = %for.body37 %cmp60 = icmp eq i8 %31, 48 br i1 %cmp60, label %if.then62, label %if.else65 if.then62: ; preds = %if.else56 store i8 49, ptr %arrayidx49, align 1, !tbaa !9 br label %for.inc72 if.else65: ; preds = %if.else56 store i8 48, ptr %arrayidx49, align 1, !tbaa !9 %arrayidx68 = getelementptr inbounds [10000 x i8], ptr %str1, i64 0, i64 %inc store i8 49, ptr %arrayidx68, align 1, !tbaa !9 %add69 = add nsw i64 %y.0117, 2 br label %for.inc72 for.inc72: ; preds = %if.else50, %if.then48, %if.else65, %if.then62 %y.1 = phi i64 [ %inc, %if.then48 ], [ %add54, %if.else50 ], [ %inc, %if.then62 ], [ %add69, %if.else65 ] %inc73 = add nuw nsw i64 %i.2118, 1 %exitcond.not = icmp eq i64 %inc73, %call3 br i1 %exitcond.not, label %for.end74, label %for.body37, !llvm.loop !16 for.end74: ; preds = %for.inc72, %if.else %y.0.lcssa = phi i64 [ 1, %if.else ], [ %y.1, %for.inc72 ] %arrayidx75 = getelementptr inbounds [10000 x i8], ptr %str1, i64 0, i64 %y.0.lcssa store i8 0, ptr %arrayidx75, align 1, !tbaa !9 br label %for.inc79 for.inc79: ; preds = %for.end26, %for.body, %for.end74 %str.sink = phi ptr [ %str1, %for.end74 ], [ %str, %for.body ], [ %str, %for.end26 ] %puts107 = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) %inc80 = add nuw nsw i64 %m.0121, 1 %32 = load i64, ptr %k, align 8, !tbaa !5 %cmp = icmp slt i64 %inc80, %32 br i1 %cmp, label %for.body, label %for.end81, !llvm.loop !17 for.end81: ; preds = %for.inc79, %entry call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %str1) #5 call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %str) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #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 = !{!"long long", !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.unroll.disable"} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !11} !16 = distinct !{!16, !13} !17 = distinct !{!17, !13}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main (void) { int n; scanf("%d", &n); switch (n % 10) { case 2: case 4: case 5: case 7: case 9: puts("hon"); break; case 0: case 1: case 6: case 8: puts("pon"); break; case 3: puts("bon"); break; default: break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216543/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216543/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 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.1 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.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.1 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.1 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) #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, 10 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %sw.epilog switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %call5 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic) br label %sw.epilog sw.epilog: ; preds = %entry, %switch.lookup 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> #include<math.h> #include <stdlib.h> #include<ctype.h> //main関数 int main() { int N; scanf("%d",&N); N = N % 10; if(N == 2 || N==4 || N == 5 || N==7 || N==9 ){ printf("hon"); } else if ( N==0 || N==1 || N==6 || N==8){ printf("pon"); }else{ printf("bon"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"hon\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"pon\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"bon\00", align 1 @reltable.main = private unnamed_addr constant [10 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.1 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.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 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.1 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.1 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) #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, 10 store i32 %rem, ptr %N, align 4, !tbaa !5 %1 = icmp ult i32 %rem, 10 br i1 %1, label %switch.lookup, label %if.end20 switch.lookup: ; preds = %entry %2 = sext i32 %rem to i64 %reltable.shift = shl i64 %2, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end20 if.end20: ; preds = %entry, %switch.lookup %.str.2.sink = phi ptr [ %reltable.intrinsic, %switch.lookup ], [ @.str.3, %entry ] %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.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: 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(argmem: read) declare ptr @llvm.load.relative.i64(ptr, 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 willreturn memory(argmem: read) } 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<ctype.h> #include<limits.h> #include<float.h> #include<math.h> #include<stdbool.h> #include<stdio.h> #include<stdlib.h> #include<string.h> #define min(x, y) ((x<y) ? x : y) #define max(x, y) ((x<y) ? y : x) #define loop(a, b, c) for(long long int a = b; a < c; a++) #define loop_(a, b, c) for(long long int a = b; a >= c; a--) void solve(); int main(void){ #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t; scanf(" %d", &t); while(t--){ solve(); } return 0; } void solve(){ char str[101], ans[201], b = 1; scanf("%s", &str); int len = strlen(str); loop(i, 0, (len-1)){ if(str[i] != str[i+1]){ b = 0; break; } } if(b){ printf("%s\n", str); } else{ loop(i, 0, (len)){ printf("%c%c", '0', '1'); } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21663/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"input.txt\00", align 1 @.str.1 = private unnamed_addr constant [2 x i8] c"r\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 @.str.2 = private unnamed_addr constant [11 x i8] c"output.txt\00", align 1 @.str.3 = private unnamed_addr constant [2 x i8] c"w\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 @.str.4 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.5 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.7 = private unnamed_addr constant [5 x i8] c"%c%c\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = tail call ptr @freopen(ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, ptr noundef %0) #8 %1 = load ptr, ptr @stdout, align 8, !tbaa !5 %call1 = tail call ptr @freopen(ptr noundef nonnull @.str.2, ptr noundef nonnull @.str.3, ptr noundef %1) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #8 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %t) %2 = load i32, ptr %t, align 4, !tbaa !9 %dec3 = add nsw i32 %2, -1 store i32 %dec3, ptr %t, align 4, !tbaa !9 %tobool.not4 = icmp eq i32 %2, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body call void @solve() %3 = load i32, ptr %t, align 4, !tbaa !9 %dec = add nsw i32 %3, -1 store i32 %dec, ptr %t, align 4, !tbaa !9 %tobool.not = icmp eq i32 %3, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #8 ret i32 0 } declare ptr @freopen(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @solve() local_unnamed_addr #4 { entry: %str = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %str) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.5, ptr noundef nonnull %str) %call1 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #9 %sub = shl i64 %call1, 32 %sext = add i64 %sub, -4294967296 %conv2 = ashr exact i64 %sext, 32 %smax = call i64 @llvm.smax.i64(i64 %conv2, i64 0) br label %for.cond for.cond: ; preds = %for.body, %entry %i.0 = phi i64 [ 0, %entry ], [ %add, %for.body ] %exitcond.not = icmp eq i64 %i.0, %smax br i1 %exitcond.not, label %if.then9, label %for.body for.body: ; preds = %for.cond %arrayidx = getelementptr inbounds [101 x i8], ptr %str, i64 0, i64 %i.0 %0 = load i8, ptr %arrayidx, align 1, !tbaa !13 %add = add nuw nsw i64 %i.0, 1 %arrayidx5 = getelementptr inbounds [101 x i8], ptr %str, i64 0, i64 %add %1 = load i8, ptr %arrayidx5, align 1, !tbaa !13 %cmp7.not = icmp eq i8 %0, %1 br i1 %cmp7.not, label %for.cond, label %for.cond13.preheader, !llvm.loop !14 for.cond13.preheader: ; preds = %for.body %cmp1533 = icmp sgt i64 %sub, 0 br i1 %cmp1533, label %for.body18.preheader, label %for.cond.cleanup17 for.body18.preheader: ; preds = %for.cond13.preheader %conv14 = and i64 %call1, 4294967295 %smax35 = call i64 @llvm.smax.i64(i64 %conv14, i64 1) br label %for.body18 if.then9: ; preds = %for.cond %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str) br label %if.end25 for.cond.cleanup17: ; preds = %for.body18, %for.cond13.preheader %putchar = call i32 @putchar(i32 10) br label %if.end25 for.body18: ; preds = %for.body18.preheader, %for.body18 %i12.034 = phi i64 [ %inc21, %for.body18 ], [ 0, %for.body18.preheader ] %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef 48, i32 noundef 49) %inc21 = add nuw nsw i64 %i12.034, 1 %exitcond36.not = icmp eq i64 %inc21, %smax35 br i1 %exitcond36.not, label %for.cond.cleanup17, label %for.body18, !llvm.loop !15 if.end25: ; preds = %for.cond.cleanup17, %if.then9 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %str) #8 ret void } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #7 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nounwind } attributes #9 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!7, !7, i64 0} !14 = distinct !{!14, !12} !15 = distinct !{!15, !12}
#include<stdio.h> #include<string.h> int main(void){ int k; char s[110]; scanf("%d %s",&k,s); if(strlen(s)>k){ s[k]='\0';printf("%s...\n",s);} else puts(s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216673/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216673/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %s\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%s...\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %s = alloca [110 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %0 = load i32, ptr %k, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %cmp = icmp ugt i64 %call2, %conv br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %arrayidx = getelementptr inbounds [110 x i8], ptr %s, i64 0, i64 %conv store i8 0, ptr %arrayidx, align 1, !tbaa !9 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s) br label %if.end if.else: ; preds = %entry %call7 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %s) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: 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 nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !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 s[101]; int n, h; scanf("%d", &n); scanf("%s", s); h = strlen(s); if(h <= n){ printf("%s", s); }else{ for(int i = 0; i < n; i++){ printf("%c", s[i]); } printf("..."); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216716/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216716/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [101 x i8], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6 %conv = trunc i64 %call3 to i32 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %conv br i1 %cmp.not, label %for.cond.preheader, label %if.then for.cond.preheader: ; preds = %entry %cmp716 = icmp sgt i32 %0, 0 br i1 %cmp716, label %for.body, label %for.cond.cleanup if.then: ; preds = %entry %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s) br label %if.end for.cond.cleanup: ; preds = %for.body, %for.cond.preheader %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv9 = sext i8 %1 to i32 %putchar = call i32 @putchar(i32 %conv9) %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 %cmp7 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp7, label %for.body, label %for.cond.cleanup, !llvm.loop !10 if.end: ; preds = %for.cond.cleanup, %if.then %putchar15 = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main() { char s[100]; int k,l,i; scanf("%d",&k); scanf("%s",s); l=strlen(s); if(k<l) {for(i=0;i<k;i++) printf("%c",s[i]); printf("..."); } else printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216767/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216767/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [100 x i8], align 16 %k = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #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 %k) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6 %conv = trunc i64 %call3 to i32 %0 = load i32, ptr %k, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %conv br i1 %cmp, label %for.cond.preheader, label %if.else for.cond.preheader: ; preds = %entry %cmp514 = icmp sgt i32 %0, 0 br i1 %cmp514, label %for.body, label %for.end for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv7 = sext i8 %1 to i32 %putchar = call i32 @putchar(i32 %conv7) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %k, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp5 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp5, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %for.body, %for.cond.preheader %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end if.else: ; preds = %entry %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s) br label %if.end if.end: ; preds = %if.else, %for.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> int main() { int T, l, cnt0, cnt1, i; char ch[110], c; scanf("%d", &T); while (T--) { scanf("%s", ch); l=strlen(ch);cnt0=0; cnt1=0; for (i=0; i<l; i++) { if (ch[i]=='0') cnt0++; else cnt1++; } if (cnt0==0 || cnt1==0) printf("%s\n", ch); else { for (i=0; i<l; i++) printf("10"); printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21681/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [3 x i8] c"10\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %T = alloca i32, align 4 %ch = alloca [110 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #6 call void @llvm.lifetime.start.p0(i64 110, ptr nonnull %ch) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !5 %dec42 = add nsw i32 %0, -1 store i32 %dec42, ptr %T, align 4, !tbaa !5 %tobool.not43 = icmp eq i32 %0, 0 br i1 %tobool.not43, label %while.end, label %while.body while.body: ; preds = %entry, %if.end27 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ch) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %ch) #7 %conv = trunc i64 %call3 to i32 %cmp35 = icmp sgt i32 %conv, 0 br i1 %cmp35, label %for.body.preheader, label %if.then14 for.body.preheader: ; preds = %while.body %wide.trip.count = and i64 %call3, 4294967295 %min.iters.check = icmp ult i64 %wide.trip.count, 8 br i1 %min.iters.check, label %for.body.preheader57, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.mod.vf = and i64 %call3, 7 %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf 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.phi51 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %vec.phi52 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ] %vec.phi53 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ] %1 = getelementptr inbounds [110 x i8], ptr %ch, 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.load54 = load <4 x i8>, ptr %2, align 4, !tbaa !9 %3 = icmp ne <4 x i8> %wide.load, <i8 48, i8 48, i8 48, i8 48> %4 = icmp ne <4 x i8> %wide.load54, <i8 48, i8 48, i8 48, i8 48> %5 = zext <4 x i1> %3 to <4 x i32> %6 = zext <4 x i1> %4 to <4 x i32> %7 = add <4 x i32> %vec.phi52, %5 %8 = add <4 x i32> %vec.phi53, %6 %9 = xor <4 x i1> %3, <i1 true, i1 true, i1 true, i1 true> %10 = xor <4 x i1> %4, <i1 true, i1 true, i1 true, i1 true> %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.phi51, %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 !10 middle.block: ; preds = %vector.body %bin.rdx55 = add <4 x i32> %8, %7 %16 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx55) %bin.rdx = add <4 x i32> %14, %13 %17 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.mod.vf, 0 br i1 %cmp.n, label %for.end, label %for.body.preheader57 for.body.preheader57: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %cnt0.038.ph = phi i32 [ 0, %for.body.preheader ], [ %17, %middle.block ] %cnt1.036.ph = phi i32 [ 0, %for.body.preheader ], [ %16, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader57, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader57 ] %cnt0.038 = phi i32 [ %cnt0.1, %for.body ], [ %cnt0.038.ph, %for.body.preheader57 ] %cnt1.036 = phi i32 [ %cnt1.1, %for.body ], [ %cnt1.036.ph, %for.body.preheader57 ] %arrayidx = getelementptr inbounds [110 x i8], ptr %ch, i64 0, i64 %indvars.iv %18 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp6 = icmp ne i8 %18, 48 %inc8 = zext i1 %cmp6 to i32 %cnt1.1 = add nuw nsw i32 %cnt1.036, %inc8 %not.cmp6 = xor i1 %cmp6, true %inc = zext i1 %not.cmp6 to i32 %cnt0.1 = add nuw nsw i32 %cnt0.038, %inc %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !14 for.end: ; preds = %for.body, %middle.block %cnt1.1.lcssa = phi i32 [ %16, %middle.block ], [ %cnt1.1, %for.body ] %cnt0.1.lcssa = phi i32 [ %17, %middle.block ], [ %cnt0.1, %for.body ] %cmp10 = icmp eq i32 %cnt0.1.lcssa, 0 %cmp12 = icmp eq i32 %cnt1.1.lcssa, 0 %or.cond = select i1 %cmp10, i1 true, i1 %cmp12 br i1 %or.cond, label %if.then14, label %for.cond18.preheader for.cond18.preheader: ; preds = %for.end br i1 %cmp35, label %for.body21, label %for.end25 if.then14: ; preds = %while.body, %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) %ch) br label %if.end27 for.body21: ; preds = %for.cond18.preheader, %for.body21 %i.141 = phi i32 [ %inc24, %for.body21 ], [ 0, %for.cond18.preheader ] %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) %inc24 = add nuw nsw i32 %i.141, 1 %exitcond45.not = icmp eq i32 %inc24, %conv br i1 %exitcond45.not, label %for.end25, label %for.body21, !llvm.loop !15 for.end25: ; preds = %for.body21, %for.cond18.preheader %putchar = call i32 @putchar(i32 10) br label %if.end27 if.end27: ; preds = %for.end25, %if.then14 %19 = load i32, ptr %T, align 4, !tbaa !5 %dec = add nsw i32 %19, -1 store i32 %dec, ptr %T, align 4, !tbaa !5 %tobool.not = icmp eq i32 %19, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !16 while.end: ; preds = %if.end27, %entry call void @llvm.lifetime.end.p0(i64 110, ptr nonnull %ch) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11}
#include<stdio.h> #include<string.h> int main() { int k,c,i; char t[10000]; scanf("%d",&k); scanf("%s",t); c=strlen(t); if(c<=k) { printf("%s",t); } else { for(i=0;i<k;i++) { printf("%c",t[i]); } printf("...\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216853/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216853/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %t = alloca [10000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 10000, ptr nonnull %t) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %t) #6 %conv = trunc i64 %call3 to i32 %0 = load i32, ptr %k, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %conv br i1 %cmp.not, label %for.cond.preheader, label %if.then for.cond.preheader: ; preds = %entry %cmp714 = icmp sgt i32 %0, 0 br i1 %cmp714, label %for.body, label %for.end if.then: ; preds = %entry %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %t) br label %if.end for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [10000 x i8], ptr %t, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv9 = sext i8 %1 to i32 %putchar = call i32 @putchar(i32 %conv9) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %k, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp7 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp7, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %for.body, %for.cond.preheader %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %for.end, %if.then call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %t) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: 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 #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main(){ int k; char s[128], w[128]; scanf("%d", &k); scanf("%128s", s); if(strlen(s) <= k){ puts(s); }else{ strncpy(w, s, k); w[k] = '.'; w[k + 1] = '.'; w[k + 2] = '.'; w[k + 3] = '\0'; puts(w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%128s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %s = alloca [128 x i8], align 16 %w = alloca [128 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %s) #5 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %w) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6 %0 = load i32, ptr %k, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %cmp.not = icmp ugt i64 %call3, %conv br i1 %cmp.not, label %if.else, label %if.end if.else: ; preds = %entry %call10 = call ptr @strncpy(ptr noundef nonnull %w, ptr noundef nonnull %s, i64 noundef %conv) #5 %arrayidx = getelementptr inbounds [128 x i8], ptr %w, i64 0, i64 %conv store i8 46, ptr %arrayidx, align 1, !tbaa !9 %add = add nsw i32 %0, 1 %idxprom11 = sext i32 %add to i64 %arrayidx12 = getelementptr inbounds [128 x i8], ptr %w, i64 0, i64 %idxprom11 store i8 46, ptr %arrayidx12, align 1, !tbaa !9 %add13 = add nsw i32 %0, 2 %idxprom14 = sext i32 %add13 to i64 %arrayidx15 = getelementptr inbounds [128 x i8], ptr %w, i64 0, i64 %idxprom14 store i8 46, ptr %arrayidx15, align 1, !tbaa !9 %add16 = add nsw i32 %0, 3 %idxprom17 = sext i32 %add16 to i64 %arrayidx18 = getelementptr inbounds [128 x i8], ptr %w, i64 0, i64 %idxprom17 store i8 0, ptr %arrayidx18, align 1, !tbaa !9 br label %if.end if.end: ; preds = %entry, %if.else %w.sink = phi ptr [ %w, %if.else ], [ %s, %entry ] %call20 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %w.sink) call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %w) #5 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite) declare ptr @strncpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly, i64 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-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 } 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0}
#include <stdio.h> #include <stdlib.h> #include<string.h> int main() { int T,i; scanf("%d",&T); getchar(); for(i=1;i<=T;i++){ char str[200]; scanf("%s",str); int len,sum=0; len=strlen(str); int j; for(j=0;j<len;j++){ sum+=(str[j]-'0'); } if(sum==0||sum==len){ printf("%s\n",str); } else{ for(j=0;j<len;j++) { printf("10"); } printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21694/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21694/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [3 x i8] c"10\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %T = alloca i32, align 4 %str = alloca [200 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = call i32 @getc(ptr noundef %0) %1 = load i32, ptr %T, align 4, !tbaa !9 %cmp.not42 = icmp slt i32 %1, 1 br i1 %cmp.not42, label %for.end27, label %for.body for.body: ; preds = %entry, %if.end %i.043 = phi i32 [ %inc26, %if.end ], [ 1, %entry ] call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %str) #6 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #7 %conv = trunc i64 %call4 to i32 %cmp637 = icmp sgt i32 %conv, 0 br i1 %cmp637, label %for.body8.preheader, label %if.then for.body8.preheader: ; preds = %for.body %wide.trip.count = and i64 %call4, 4294967295 %min.iters.check = icmp ult i64 %wide.trip.count, 8 br i1 %min.iters.check, label %for.body8.preheader52, label %vector.ph vector.ph: ; preds = %for.body8.preheader %n.mod.vf = and i64 %call4, 7 %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ] %vec.phi50 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %9, %vector.body ] %2 = getelementptr inbounds [200 x i8], ptr %str, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %2, align 8, !tbaa !11 %3 = getelementptr inbounds i8, ptr %2, i64 4 %wide.load51 = load <4 x i8>, ptr %3, align 4, !tbaa !11 %4 = sext <4 x i8> %wide.load to <4 x i32> %5 = sext <4 x i8> %wide.load51 to <4 x i32> %6 = add <4 x i32> %vec.phi, <i32 -48, i32 -48, i32 -48, i32 -48> %7 = add <4 x i32> %vec.phi50, <i32 -48, i32 -48, i32 -48, i32 -48> %8 = add <4 x i32> %6, %4 %9 = add <4 x i32> %7, %5 %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %9, %8 %11 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.mod.vf, 0 br i1 %cmp.n, label %for.end, label %for.body8.preheader52 for.body8.preheader52: ; preds = %for.body8.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body8.preheader ], [ %n.vec, %middle.block ] %sum.038.ph = phi i32 [ 0, %for.body8.preheader ], [ %11, %middle.block ] br label %for.body8 for.body8: ; preds = %for.body8.preheader52, %for.body8 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body8 ], [ %indvars.iv.ph, %for.body8.preheader52 ] %sum.038 = phi i32 [ %add, %for.body8 ], [ %sum.038.ph, %for.body8.preheader52 ] %arrayidx = getelementptr inbounds [200 x i8], ptr %str, i64 0, i64 %indvars.iv %12 = load i8, ptr %arrayidx, align 1, !tbaa !11 %conv9 = sext i8 %12 to i32 %sub = add i32 %sum.038, -48 %add = add i32 %sub, %conv9 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body8, !llvm.loop !16 for.end: ; preds = %for.body8, %middle.block %add.lcssa = phi i32 [ %11, %middle.block ], [ %add, %for.body8 ] %cmp10 = icmp eq i32 %add.lcssa, 0 %cmp12 = icmp eq i32 %add.lcssa, %conv %or.cond = or i1 %cmp10, %cmp12 br i1 %or.cond, label %if.then, label %for.cond16.preheader for.cond16.preheader: ; preds = %for.end br i1 %cmp637, label %for.body19, label %for.end23 if.then: ; preds = %for.body, %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str) br label %if.end for.body19: ; preds = %for.cond16.preheader, %for.body19 %j.141 = phi i32 [ %inc22, %for.body19 ], [ 0, %for.cond16.preheader ] %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) %inc22 = add nuw nsw i32 %j.141, 1 %exitcond45.not = icmp eq i32 %inc22, %conv br i1 %exitcond45.not, label %for.end23, label %for.body19, !llvm.loop !17 for.end23: ; preds = %for.body19, %for.cond16.preheader %putchar = call i32 @putchar(i32 10) br label %if.end if.end: ; preds = %for.end23, %if.then call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %str) #6 %inc26 = add nuw nsw i32 %i.043, 1 %13 = load i32, ptr %T, align 4, !tbaa !9 %cmp.not.not = icmp slt i32 %i.043, %13 br i1 %cmp.not.not, label %for.body, label %for.end27, !llvm.loop !18 for.end27: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: 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 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13, !14, !15} !13 = !{!"llvm.loop.mustprogress"} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !13, !15, !14} !17 = distinct !{!17, !13} !18 = distinct !{!18, !13}
#include<stdio.h> int main(void) { unsigned long int a, b, c; char s[100]; int i; scanf("%ld", &a); scanf("%s", &s); for (i = 0; i < 100; i++) { if (s[i] == '\0') { break; } } if (i <= a) { printf("%s", s); } else { for (i = 0; i < a; i++) { printf("%c", s[i]); } printf("..."); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_216983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_216983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 %s = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) br label %for.body for.body: ; preds = %for.inc.4, %entry %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next.4, %for.inc.4 ] %arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp2 = icmp eq i8 %0, 0 br i1 %cmp2, label %for.end, label %for.inc for.inc: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp2.1 = icmp eq i8 %1, 0 br i1 %cmp2.1, label %for.end, label %for.inc.1 for.inc.1: ; preds = %for.inc %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %arrayidx.2 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next.1 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp2.2 = icmp eq i8 %2, 0 br i1 %cmp2.2, label %for.end, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %arrayidx.3 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next.2 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %cmp2.3 = icmp eq i8 %3, 0 br i1 %cmp2.3, label %for.end, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %arrayidx.4 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next.3 %4 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 %cmp2.4 = icmp eq i8 %4, 0 br i1 %cmp2.4, label %for.end, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5 %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4, 100 br i1 %exitcond.not.4, label %for.end, label %for.body, !llvm.loop !8 for.end: ; preds = %for.inc.4, %for.inc.3, %for.inc.2, %for.inc.1, %for.inc, %for.body %i.0.lcssa = phi i64 [ %indvars.iv, %for.body ], [ %indvars.iv.next, %for.inc ], [ %indvars.iv.next.1, %for.inc.1 ], [ %indvars.iv.next.2, %for.inc.2 ], [ %indvars.iv.next.3, %for.inc.3 ], [ 100, %for.inc.4 ] %conv4 = and i64 %i.0.lcssa, 4294967295 %5 = load i64, ptr %a, align 8, !tbaa !10 %cmp5.not = icmp ult i64 %5, %conv4 br i1 %cmp5.not, label %for.cond9.preheader, label %if.then7 for.cond9.preheader: ; preds = %for.end %cmp1130.not = icmp eq i64 %5, 0 br i1 %cmp1130.not, label %for.end20, label %for.body13 if.then7: ; preds = %for.end %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %s) br label %if.end22 for.body13: ; preds = %for.cond9.preheader, %for.body13 %indvars.iv34 = phi i64 [ %indvars.iv.next35, %for.body13 ], [ 0, %for.cond9.preheader ] %arrayidx15 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv34 %6 = load i8, ptr %arrayidx15, align 1, !tbaa !5 %conv16 = sext i8 %6 to i32 %putchar = call i32 @putchar(i32 %conv16) %indvars.iv.next35 = add nuw i64 %indvars.iv34, 1 %7 = load i64, ptr %a, align 8, !tbaa !10 %cmp11 = icmp ugt i64 %7, %indvars.iv.next35 br i1 %cmp11, label %for.body13, label %for.end20, !llvm.loop !12 for.end20: ; preds = %for.body13, %for.cond9.preheader %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end22 if.end22: ; preds = %for.end20, %if.then7 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = !{!11, !11, i64 0} !11 = !{!"long", !6, i64 0} !12 = distinct !{!12, !9}
#include<stdio.h> #include<stdbool.h> #include<string.h> #define rep(i,n) for(int i=0; i < (n); i++) int main(){ int k; char s[100]; scanf("%d%s",&k,s); int len=strlen(s); if(len<=k){ printf("%s\n",s ); return 0; }else{ rep(i,k){ printf("%c",s[i]); } printf("..."); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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%s\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %s = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6 %conv = trunc i64 %call2 to i32 %0 = load i32, ptr %k, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %conv br i1 %cmp.not, label %for.cond.preheader, label %if.then for.cond.preheader: ; preds = %entry %cmp615 = icmp sgt i32 %0, 0 br i1 %cmp615, label %for.body, label %for.cond.cleanup if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) %s) br label %cleanup for.cond.cleanup: ; preds = %for.body, %for.cond.preheader %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %cleanup for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv8 = sext i8 %1 to i32 %putchar = call i32 @putchar(i32 %conv8) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %k, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp6 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp6, label %for.body, label %for.cond.cleanup, !llvm.loop !10 cleanup: ; preds = %for.cond.cleanup, %if.then call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main(void){ char str[128]; int limit,i; scanf("%d%*c",&limit); scanf("%s%*c",str); if(strlen(str)<=limit){ puts(str); }else{ for(i=0;i<limit;i++){ putc(str[i],stdout); } puts("..."); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217083/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217083/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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%*c\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%s%*c\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 @.str.2 = private unnamed_addr constant [4 x i8] c"...\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [128 x i8], align 16 %limit = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %str) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %limit) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %limit) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %str) %call3 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #5 %0 = load i32, ptr %limit, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %cmp.not = icmp ugt i64 %call3, %conv br i1 %cmp.not, label %for.cond.preheader, label %if.end for.cond.preheader: ; preds = %entry %cmp714 = icmp sgt i32 %0, 0 br i1 %cmp714, label %for.body, label %if.end for.body: ; preds = %for.cond.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [128 x i8], ptr %str, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv9 = sext i8 %1 to i32 %2 = load ptr, ptr @stdout, align 8, !tbaa !10 %call10 = call i32 @putc(i32 noundef %conv9, ptr noundef %2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %limit, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp7 = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp7, label %for.body, label %if.end, !llvm.loop !12 if.end: ; preds = %for.body, %for.cond.preheader, %entry %.str.2.sink = phi ptr [ %str, %entry ], [ @.str.2, %for.cond.preheader ], [ @.str.2, %for.body ] %call11 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %limit) #4 call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %str) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> #define STACK_MAX (100 + 1) double stack[STACK_MAX]; int head = 0; void push(double n){ int i; for (i = head; i > 0; i--){ stack[i] = stack[i - 1]; } head++; stack[0] = n; } double pop(void){ double temp; int i; temp = stack[0]; for (i = 0; i < head - 1; i++){ stack[i] = stack[i + 1]; } stack[i + 1] = 0; head--; return(temp); } double integer(char *str) { double sum; int i; sum = i = 0; while (str[i] != '\0'){ sum = sum * 10 + str[i] - '0'; i++; } return (sum); } int main(void) { char operate[100]; char temp[10]; int i, j; double a, b; memset(operate, '\0', sizeof(operate)); while (scanf("%[^\n]", operate) != EOF){ getchar(); memset(stack, 0, sizeof(stack)); i = 0; while (operate[i] != '\0'){ j = 0; memset(temp, '\0', sizeof(temp)); while (operate[i] != ' ' && operate[i] != '\0'){ temp[j] = operate[i]; i++; j++; } if (operate[i] == ' ' || operate[i] == '\0'){ switch(temp[0] + temp[1]){ case '+' + '\0': a = pop(); b = pop(); push(b + a); break; case '-' + '\0': a = pop(); b = pop(); push(b - a); break; case '*' + '\0': a = pop(); b = pop(); push(b * a); break; case '/' + '\0': a = pop(); b = pop(); push(b / a); break; default: if (temp[0] == '-'){ push(-1 * integer(&temp[1])); } else { push(integer(temp)); } } if (operate[j] == '\0'){ break; } i++; } } printf("%f\n", pop()); memset(operate, '\0', sizeof(operate)); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217148/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217148/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @head = dso_local local_unnamed_addr global i32 0, align 4 @stack = dso_local local_unnamed_addr global [101 x double] zeroinitializer, align 16 @.str = private unnamed_addr constant [6 x i8] c"%[^\0A]\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%f\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @push(double noundef %n) local_unnamed_addr #0 { entry: %0 = load i32, ptr @head, align 4, !tbaa !5 %cmp6 = icmp sgt i32 %0, 0 br i1 %cmp6, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %1 = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 60 br i1 %min.iters.check, label %for.body.preheader20, label %vector.scevcheck vector.scevcheck: ; preds = %for.body.preheader %2 = add nsw i64 %1, -1 %3 = add i32 %0, -1 %4 = trunc i64 %2 to i32 %5 = icmp ult i32 %3, %4 %6 = icmp ugt i64 %2, 4294967295 %7 = or i1 %5, %6 %8 = shl nuw nsw i64 %1, 3 %scevgep = getelementptr i8, ptr @stack, i64 %8 %mul.result10.neg = mul nsw i64 %2, -8 %9 = getelementptr i8, ptr %scevgep, i64 %mul.result10.neg %10 = icmp ugt ptr %9, %scevgep %11 = zext i32 %3 to i64 %12 = shl nuw nsw i64 %11, 3 %scevgep12 = getelementptr i8, ptr @stack, i64 %12 %mul.result14.neg = mul nsw i64 %2, -8 %13 = getelementptr i8, ptr %scevgep12, i64 %mul.result14.neg %14 = icmp ugt ptr %13, %scevgep12 %15 = or i1 %10, %7 %16 = or i1 %14, %15 br i1 %16, label %for.body.preheader20, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %17 = add i32 %0, -1 %18 = zext i32 %17 to i64 %19 = shl nuw nsw i64 %18, 3 %20 = add i64 %19, ptrtoint (ptr @stack to i64) %21 = shl nuw nsw i64 %1, 3 %22 = add i64 %21, ptrtoint (ptr @stack to i64) %23 = sub i64 %20, %22 %diff.check = icmp ult i64 %23, 32 br i1 %diff.check, label %for.body.preheader20, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %1, 4294967292 %ind.end = and i64 %1, 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = sub i64 %1, %index %24 = add i64 %offset.idx, 4294967295 %25 = and i64 %24, 4294967295 %26 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %25 %27 = getelementptr inbounds double, ptr %26, i64 -1 %wide.load = load <2 x double>, ptr %27, align 8, !tbaa !9 %28 = getelementptr inbounds double, ptr %26, i64 -3 %wide.load16 = load <2 x double>, ptr %28, align 8, !tbaa !9 %29 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx %30 = getelementptr inbounds double, ptr %29, i64 -1 store <2 x double> %wide.load, ptr %30, align 8, !tbaa !9 %31 = getelementptr inbounds double, ptr %29, i64 -3 store <2 x double> %wide.load16, ptr %31, align 8, !tbaa !9 %index.next = add nuw i64 %index, 4 %32 = icmp eq i64 %index.next, %n.vec br i1 %32, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader20 for.body.preheader20: ; preds = %vector.memcheck, %vector.scevcheck, %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %1, %vector.memcheck ], [ %1, %vector.scevcheck ], [ %1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader20, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader20 ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %idxprom = and i64 %indvars.iv.next, 4294967295 %arrayidx = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom %33 = load double, ptr %arrayidx, align 8, !tbaa !9 %arrayidx2 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv store double %33, ptr %arrayidx2, align 8, !tbaa !9 %cmp = icmp ugt i64 %indvars.iv, 1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !15 for.end: ; preds = %for.body, %middle.block, %entry %inc = add nsw i32 %0, 1 store i32 %inc, ptr @head, align 4, !tbaa !5 store double %n, ptr @stack, align 16, !tbaa !9 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 nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local double @pop() local_unnamed_addr #2 { entry: %0 = load double, ptr @stack, align 16, !tbaa !9 %1 = load i32, ptr @head, align 4, !tbaa !5 %sub = add i32 %1, -1 %cmp10 = icmp sgt i32 %1, 1 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %2 = zext i32 %sub to i64 %3 = shl nuw nsw i64 %2, 3 tail call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %3, i1 false), !tbaa !9 %4 = zext i32 %1 to i64 br label %for.end for.end: ; preds = %for.body.preheader, %entry %i.0.lcssa = phi i64 [ 1, %entry ], [ %4, %for.body.preheader ] %arrayidx5 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa store double 0.000000e+00, ptr %arrayidx5, align 8, !tbaa !9 store i32 %sub, ptr @head, align 4, !tbaa !5 ret double %0 } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local double @integer(ptr nocapture noundef readonly %str) local_unnamed_addr #3 { entry: %0 = load i8, ptr %str, align 1, !tbaa !16 %cmp.not10 = icmp eq i8 %0, 0 br i1 %cmp.not10, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %1 = phi i8 [ %3, %while.body ], [ %0, %entry ] %sum.011 = phi double [ %sub, %while.body ], [ 0.000000e+00, %entry ] %conv5 = sitofp i8 %1 to double %2 = tail call double @llvm.fmuladd.f64(double %sum.011, double 1.000000e+01, double %conv5) %sub = fadd double %2, -4.800000e+01 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i8, ptr %str, i64 %indvars.iv.next %3 = load i8, ptr %arrayidx, align 1, !tbaa !16 %cmp.not = icmp eq i8 %3, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !17 while.end: ; preds = %while.body, %entry %sum.0.lcssa = phi double [ 0.000000e+00, %entry ], [ %sub, %while.body ] ret double %sum.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: %operate = alloca [100 x i8], align 16 %temp = alloca [10 x i8], align 1 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %operate) #9 call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %temp) #9 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %operate, i8 0, i64 100, i1 false) %call238 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %operate) %cmp.not239 = icmp eq i32 %call238, -1 br i1 %cmp.not239, label %while.end74, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %arrayidx37 = getelementptr inbounds [10 x i8], ptr %temp, i64 0, i64 1 br label %while.body while.body: ; preds = %while.body.lr.ph, %pop.exit208 %0 = load ptr, ptr @stdin, align 8, !tbaa !18 %call.i = call i32 @getc(ptr noundef %0) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(808) @stack, i8 0, i64 808, i1 false) %head.promoted = load i32, ptr @head, align 4, !tbaa !5 %1 = load i8, ptr %operate, align 16, !tbaa !16 %cmp4.not235 = icmp eq i8 %1, 0 br i1 %cmp4.not235, label %while.end70, label %while.body6 while.cond3: ; preds = %sw.epilog %inc68 = add nsw i32 %6, 1 %idxprom = sext i32 %inc68 to i64 %arrayidx = getelementptr inbounds [100 x i8], ptr %operate, i64 0, i64 %idxprom %2 = load i8, ptr %arrayidx, align 1, !tbaa !16 %cmp4.not = icmp eq i8 %2, 0 br i1 %cmp4.not, label %while.end70.loopexit, label %while.body6, !llvm.loop !20 while.body6: ; preds = %while.body, %while.cond3 %3 = phi double [ %mul58.sink, %while.cond3 ], [ 0.000000e+00, %while.body ] %i.0237 = phi i32 [ %inc68, %while.cond3 ], [ 0, %while.body ] %sub.i149233236 = phi i32 [ %inc.i171.sink, %while.cond3 ], [ %head.promoted, %while.body ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(10) %temp, i8 0, i64 10, i1 false) %4 = sext i32 %i.0237 to i64 br label %while.cond8 while.cond8: ; preds = %while.body19, %while.body6 %indvars.iv240 = phi i64 [ %indvars.iv.next241, %while.body19 ], [ 0, %while.body6 ] %indvars.iv = phi i64 [ %indvars.iv.next, %while.body19 ], [ %4, %while.body6 ] %arrayidx10 = getelementptr inbounds [100 x i8], ptr %operate, i64 0, i64 %indvars.iv %5 = load i8, ptr %arrayidx10, align 1, !tbaa !16 switch i8 %5, label %while.body19 [ i8 32, label %if.then i8 0, label %if.then ] while.body19: ; preds = %while.cond8 %arrayidx23 = getelementptr inbounds [10 x i8], ptr %temp, i64 0, i64 %indvars.iv240 store i8 %5, ptr %arrayidx23, align 1, !tbaa !16 %indvars.iv.next = add i64 %indvars.iv, 1 %indvars.iv.next241 = add nuw i64 %indvars.iv240, 1 br label %while.cond8, !llvm.loop !21 if.then: ; preds = %while.cond8, %while.cond8 %6 = trunc i64 %indvars.iv to i32 %7 = load i8, ptr %temp, align 1, !tbaa !16 %conv36 = sext i8 %7 to i32 %8 = load i8, ptr %arrayidx37, align 1, !tbaa !16 %conv38 = sext i8 %8 to i32 %add = add nsw i32 %conv38, %conv36 switch i32 %add, label %sw.default [ i32 43, label %sw.bb i32 45, label %sw.bb42 i32 42, label %sw.bb45 i32 47, label %sw.bb48 ] sw.bb: ; preds = %if.then %sub.i = add i32 %sub.i149233236, -1 %cmp10.i = icmp sgt i32 %sub.i149233236, 1 br i1 %cmp10.i, label %for.body.preheader.i, label %pop.exit for.body.preheader.i: ; preds = %sw.bb %9 = zext i32 %sub.i to i64 %10 = shl nuw nsw i64 %9, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %10, i1 false), !tbaa !9 %11 = zext i32 %sub.i149233236 to i64 br label %pop.exit pop.exit: ; preds = %sw.bb, %for.body.preheader.i %i.0.lcssa.i = phi i64 [ 1, %sw.bb ], [ %11, %for.body.preheader.i ] %arrayidx5.i = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa.i store double 0.000000e+00, ptr %arrayidx5.i, align 8, !tbaa !9 %12 = load double, ptr @stack, align 16, !tbaa !9 %sub.i90 = add i32 %sub.i149233236, -2 %cmp10.i91 = icmp sgt i32 %sub.i, 1 br i1 %cmp10.i91, label %pop.exit95.thread, label %pop.exit95 pop.exit95.thread: ; preds = %pop.exit %13 = zext i32 %sub.i90 to i64 %14 = shl nuw nsw i64 %13, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %14, i1 false), !tbaa !9 %15 = zext i32 %sub.i to i64 %arrayidx5.i93210 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %15 store double 0.000000e+00, ptr %arrayidx5.i93210, align 8, !tbaa !9 %add41211 = fadd double %3, %12 br label %for.body.preheader.i96 pop.exit95: ; preds = %pop.exit store double 0.000000e+00, ptr getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), align 8, !tbaa !9 %add41 = fadd double %3, %12 %cmp6.i = icmp sgt i32 %sub.i90, 0 br i1 %cmp6.i, label %pop.exit95.for.body.preheader.i96_crit_edge, label %sw.epilog pop.exit95.for.body.preheader.i96_crit_edge: ; preds = %pop.exit95 %.pre = zext i32 %sub.i90 to i64 br label %for.body.preheader.i96 for.body.preheader.i96: ; preds = %pop.exit95.for.body.preheader.i96_crit_edge, %pop.exit95.thread %.pre-phi = phi i64 [ %.pre, %pop.exit95.for.body.preheader.i96_crit_edge ], [ %13, %pop.exit95.thread ] %add41214 = phi double [ %add41, %pop.exit95.for.body.preheader.i96_crit_edge ], [ %add41211, %pop.exit95.thread ] %16 = add nuw nsw i64 %.pre-phi, 1 %17 = icmp ne i64 %.pre-phi, 0 %umin314.neg = sext i1 %17 to i64 %18 = add nsw i64 %16, %umin314.neg %min.iters.check317 = icmp ult i64 %18, 62 br i1 %min.iters.check317, label %for.body.i.preheader, label %vector.scevcheck300 vector.scevcheck300: ; preds = %for.body.preheader.i96 %19 = icmp ne i64 %.pre-phi, 0 %umin.neg = sext i1 %19 to i64 %20 = add nsw i64 %.pre-phi, %umin.neg %21 = trunc i64 %.pre-phi to i32 %22 = add i32 %21, -1 %23 = trunc i64 %20 to i32 %24 = icmp ult i32 %22, %23 %25 = icmp ugt i64 %20, 4294967295 %26 = or i1 %24, %25 %27 = shl nuw nsw i64 %.pre-phi, 3 %scevgep304 = getelementptr i8, ptr @stack, i64 %27 %mul.result306.neg = mul nsw i64 %20, -8 %28 = getelementptr i8, ptr %scevgep304, i64 %mul.result306.neg %29 = icmp ugt ptr %28, %scevgep304 %30 = zext i32 %22 to i64 %31 = shl nuw nsw i64 %30, 3 %scevgep308 = getelementptr i8, ptr @stack, i64 %31 %mul.result310.neg = mul nsw i64 %20, -8 %32 = getelementptr i8, ptr %scevgep308, i64 %mul.result310.neg %33 = icmp ugt ptr %32, %scevgep308 %34 = or i1 %29, %26 %35 = or i1 %33, %34 br i1 %35, label %for.body.i.preheader, label %vector.memcheck312 vector.memcheck312: ; preds = %vector.scevcheck300 %36 = shl nuw nsw i64 %.pre-phi, 3 %37 = add nuw nsw i64 %36, 34359738360 %38 = and i64 %37, 34359738360 %39 = add i64 %38, ptrtoint (ptr @stack to i64) %40 = shl nuw nsw i64 %.pre-phi, 3 %41 = add i64 %40, ptrtoint (ptr @stack to i64) %42 = sub i64 %39, %41 %diff.check313 = icmp ult i64 %42, 32 br i1 %diff.check313, label %for.body.i.preheader, label %vector.ph318 vector.ph318: ; preds = %vector.memcheck312 %n.vec320 = and i64 %18, -4 %ind.end321 = sub nsw i64 %.pre-phi, %n.vec320 br label %vector.body324 vector.body324: ; preds = %vector.body324, %vector.ph318 %index325 = phi i64 [ 0, %vector.ph318 ], [ %index.next333, %vector.body324 ] %offset.idx326 = sub i64 %.pre-phi, %index325 %43 = add i64 %offset.idx326, 4294967295 %44 = and i64 %43, 4294967295 %45 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %44 %46 = getelementptr inbounds double, ptr %45, i64 -1 %wide.load327 = load <2 x double>, ptr %46, align 8, !tbaa !9 %47 = getelementptr inbounds double, ptr %45, i64 -3 %wide.load329 = load <2 x double>, ptr %47, align 8, !tbaa !9 %48 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx326 %49 = getelementptr inbounds double, ptr %48, i64 -1 store <2 x double> %wide.load327, ptr %49, align 8, !tbaa !9 %50 = getelementptr inbounds double, ptr %48, i64 -3 store <2 x double> %wide.load329, ptr %50, align 8, !tbaa !9 %index.next333 = add nuw i64 %index325, 4 %51 = icmp eq i64 %index.next333, %n.vec320 br i1 %51, label %middle.block315, label %vector.body324, !llvm.loop !22 middle.block315: ; preds = %vector.body324 %cmp.n323 = icmp eq i64 %18, %n.vec320 br i1 %cmp.n323, label %sw.epilog, label %for.body.i.preheader for.body.i.preheader: ; preds = %vector.memcheck312, %vector.scevcheck300, %for.body.preheader.i96, %middle.block315 %indvars.iv.i.ph = phi i64 [ %.pre-phi, %vector.memcheck312 ], [ %.pre-phi, %vector.scevcheck300 ], [ %.pre-phi, %for.body.preheader.i96 ], [ %ind.end321, %middle.block315 ] br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, -1 %idxprom.i = and i64 %indvars.iv.next.i, 4294967295 %arrayidx.i = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i %52 = load double, ptr %arrayidx.i, align 8, !tbaa !9 %arrayidx2.i = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i store double %52, ptr %arrayidx2.i, align 8, !tbaa !9 %cmp.i = icmp ugt i64 %indvars.iv.i, 1 br i1 %cmp.i, label %for.body.i, label %sw.epilog, !llvm.loop !23 sw.bb42: ; preds = %if.then %sub.i97 = add i32 %sub.i149233236, -1 %cmp10.i98 = icmp sgt i32 %sub.i149233236, 1 br i1 %cmp10.i98, label %for.body.preheader.i101, label %pop.exit102 for.body.preheader.i101: ; preds = %sw.bb42 %53 = zext i32 %sub.i97 to i64 %54 = shl nuw nsw i64 %53, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %54, i1 false), !tbaa !9 %55 = zext i32 %sub.i149233236 to i64 br label %pop.exit102 pop.exit102: ; preds = %sw.bb42, %for.body.preheader.i101 %i.0.lcssa.i99 = phi i64 [ 1, %sw.bb42 ], [ %55, %for.body.preheader.i101 ] %arrayidx5.i100 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa.i99 store double 0.000000e+00, ptr %arrayidx5.i100, align 8, !tbaa !9 %56 = load double, ptr @stack, align 16, !tbaa !9 %sub.i103 = add i32 %sub.i149233236, -2 %cmp10.i104 = icmp sgt i32 %sub.i97, 1 br i1 %cmp10.i104, label %pop.exit108.thread, label %pop.exit108 pop.exit108.thread: ; preds = %pop.exit102 %57 = zext i32 %sub.i103 to i64 %58 = shl nuw nsw i64 %57, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %58, i1 false), !tbaa !9 %59 = zext i32 %sub.i97 to i64 %arrayidx5.i106216 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %59 store double 0.000000e+00, ptr %arrayidx5.i106216, align 8, !tbaa !9 %sub217 = fsub double %56, %3 br label %for.body.preheader.i111 pop.exit108: ; preds = %pop.exit102 store double 0.000000e+00, ptr getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), align 8, !tbaa !9 %sub = fsub double %56, %3 %cmp6.i109 = icmp sgt i32 %sub.i103, 0 br i1 %cmp6.i109, label %pop.exit108.for.body.preheader.i111_crit_edge, label %sw.epilog pop.exit108.for.body.preheader.i111_crit_edge: ; preds = %pop.exit108 %.pre245 = zext i32 %sub.i103 to i64 br label %for.body.preheader.i111 for.body.preheader.i111: ; preds = %pop.exit108.for.body.preheader.i111_crit_edge, %pop.exit108.thread %.pre-phi246 = phi i64 [ %.pre245, %pop.exit108.for.body.preheader.i111_crit_edge ], [ %57, %pop.exit108.thread ] %sub220 = phi double [ %sub, %pop.exit108.for.body.preheader.i111_crit_edge ], [ %sub217, %pop.exit108.thread ] %60 = add nuw nsw i64 %.pre-phi246, 1 %61 = icmp ne i64 %.pre-phi246, 0 %umin349.neg = sext i1 %61 to i64 %62 = add nsw i64 %60, %umin349.neg %min.iters.check352 = icmp ult i64 %62, 62 br i1 %min.iters.check352, label %for.body.i112.preheader, label %vector.scevcheck334 vector.scevcheck334: ; preds = %for.body.preheader.i111 %63 = icmp ne i64 %.pre-phi246, 0 %umin335.neg = sext i1 %63 to i64 %64 = add nsw i64 %.pre-phi246, %umin335.neg %65 = trunc i64 %.pre-phi246 to i32 %66 = add i32 %65, -1 %67 = trunc i64 %64 to i32 %68 = icmp ult i32 %66, %67 %69 = icmp ugt i64 %64, 4294967295 %70 = or i1 %68, %69 %71 = shl nuw nsw i64 %.pre-phi246, 3 %scevgep339 = getelementptr i8, ptr @stack, i64 %71 %mul.result341.neg = mul nsw i64 %64, -8 %72 = getelementptr i8, ptr %scevgep339, i64 %mul.result341.neg %73 = icmp ugt ptr %72, %scevgep339 %74 = zext i32 %66 to i64 %75 = shl nuw nsw i64 %74, 3 %scevgep343 = getelementptr i8, ptr @stack, i64 %75 %mul.result345.neg = mul nsw i64 %64, -8 %76 = getelementptr i8, ptr %scevgep343, i64 %mul.result345.neg %77 = icmp ugt ptr %76, %scevgep343 %78 = or i1 %73, %70 %79 = or i1 %77, %78 br i1 %79, label %for.body.i112.preheader, label %vector.memcheck347 vector.memcheck347: ; preds = %vector.scevcheck334 %80 = shl nuw nsw i64 %.pre-phi246, 3 %81 = add nuw nsw i64 %80, 34359738360 %82 = and i64 %81, 34359738360 %83 = add i64 %82, ptrtoint (ptr @stack to i64) %84 = shl nuw nsw i64 %.pre-phi246, 3 %85 = add i64 %84, ptrtoint (ptr @stack to i64) %86 = sub i64 %83, %85 %diff.check348 = icmp ult i64 %86, 32 br i1 %diff.check348, label %for.body.i112.preheader, label %vector.ph353 vector.ph353: ; preds = %vector.memcheck347 %n.vec355 = and i64 %62, -4 %ind.end356 = sub nsw i64 %.pre-phi246, %n.vec355 br label %vector.body359 vector.body359: ; preds = %vector.body359, %vector.ph353 %index360 = phi i64 [ 0, %vector.ph353 ], [ %index.next368, %vector.body359 ] %offset.idx361 = sub i64 %.pre-phi246, %index360 %87 = add i64 %offset.idx361, 4294967295 %88 = and i64 %87, 4294967295 %89 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %88 %90 = getelementptr inbounds double, ptr %89, i64 -1 %wide.load362 = load <2 x double>, ptr %90, align 8, !tbaa !9 %91 = getelementptr inbounds double, ptr %89, i64 -3 %wide.load364 = load <2 x double>, ptr %91, align 8, !tbaa !9 %92 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx361 %93 = getelementptr inbounds double, ptr %92, i64 -1 store <2 x double> %wide.load362, ptr %93, align 8, !tbaa !9 %94 = getelementptr inbounds double, ptr %92, i64 -3 store <2 x double> %wide.load364, ptr %94, align 8, !tbaa !9 %index.next368 = add nuw i64 %index360, 4 %95 = icmp eq i64 %index.next368, %n.vec355 br i1 %95, label %middle.block350, label %vector.body359, !llvm.loop !24 middle.block350: ; preds = %vector.body359 %cmp.n358 = icmp eq i64 %62, %n.vec355 br i1 %cmp.n358, label %sw.epilog, label %for.body.i112.preheader for.body.i112.preheader: ; preds = %vector.memcheck347, %vector.scevcheck334, %for.body.preheader.i111, %middle.block350 %indvars.iv.i113.ph = phi i64 [ %.pre-phi246, %vector.memcheck347 ], [ %.pre-phi246, %vector.scevcheck334 ], [ %.pre-phi246, %for.body.preheader.i111 ], [ %ind.end356, %middle.block350 ] br label %for.body.i112 for.body.i112: ; preds = %for.body.i112.preheader, %for.body.i112 %indvars.iv.i113 = phi i64 [ %indvars.iv.next.i114, %for.body.i112 ], [ %indvars.iv.i113.ph, %for.body.i112.preheader ] %indvars.iv.next.i114 = add nsw i64 %indvars.iv.i113, -1 %idxprom.i115 = and i64 %indvars.iv.next.i114, 4294967295 %arrayidx.i116 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i115 %96 = load double, ptr %arrayidx.i116, align 8, !tbaa !9 %arrayidx2.i117 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i113 store double %96, ptr %arrayidx2.i117, align 8, !tbaa !9 %cmp.i118 = icmp ugt i64 %indvars.iv.i113, 1 br i1 %cmp.i118, label %for.body.i112, label %sw.epilog, !llvm.loop !25 sw.bb45: ; preds = %if.then %sub.i120 = add i32 %sub.i149233236, -1 %cmp10.i121 = icmp sgt i32 %sub.i149233236, 1 br i1 %cmp10.i121, label %for.body.preheader.i124, label %pop.exit125 for.body.preheader.i124: ; preds = %sw.bb45 %97 = zext i32 %sub.i120 to i64 %98 = shl nuw nsw i64 %97, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %98, i1 false), !tbaa !9 %99 = zext i32 %sub.i149233236 to i64 br label %pop.exit125 pop.exit125: ; preds = %sw.bb45, %for.body.preheader.i124 %i.0.lcssa.i122 = phi i64 [ 1, %sw.bb45 ], [ %99, %for.body.preheader.i124 ] %arrayidx5.i123 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa.i122 store double 0.000000e+00, ptr %arrayidx5.i123, align 8, !tbaa !9 %100 = load double, ptr @stack, align 16, !tbaa !9 %sub.i126 = add i32 %sub.i149233236, -2 %cmp10.i127 = icmp sgt i32 %sub.i120, 1 br i1 %cmp10.i127, label %pop.exit131.thread, label %pop.exit131 pop.exit131.thread: ; preds = %pop.exit125 %101 = zext i32 %sub.i126 to i64 %102 = shl nuw nsw i64 %101, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %102, i1 false), !tbaa !9 %103 = zext i32 %sub.i120 to i64 %arrayidx5.i129222 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %103 store double 0.000000e+00, ptr %arrayidx5.i129222, align 8, !tbaa !9 %mul223 = fmul double %3, %100 br label %for.body.preheader.i134 pop.exit131: ; preds = %pop.exit125 store double 0.000000e+00, ptr getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), align 8, !tbaa !9 %mul = fmul double %3, %100 %cmp6.i132 = icmp sgt i32 %sub.i126, 0 br i1 %cmp6.i132, label %pop.exit131.for.body.preheader.i134_crit_edge, label %sw.epilog pop.exit131.for.body.preheader.i134_crit_edge: ; preds = %pop.exit131 %.pre247 = zext i32 %sub.i126 to i64 br label %for.body.preheader.i134 for.body.preheader.i134: ; preds = %pop.exit131.for.body.preheader.i134_crit_edge, %pop.exit131.thread %.pre-phi248 = phi i64 [ %.pre247, %pop.exit131.for.body.preheader.i134_crit_edge ], [ %101, %pop.exit131.thread ] %mul226 = phi double [ %mul, %pop.exit131.for.body.preheader.i134_crit_edge ], [ %mul223, %pop.exit131.thread ] %104 = add nuw nsw i64 %.pre-phi248, 1 %105 = icmp ne i64 %.pre-phi248, 0 %umin384.neg = sext i1 %105 to i64 %106 = add nsw i64 %104, %umin384.neg %min.iters.check387 = icmp ult i64 %106, 62 br i1 %min.iters.check387, label %for.body.i135.preheader, label %vector.scevcheck369 vector.scevcheck369: ; preds = %for.body.preheader.i134 %107 = icmp ne i64 %.pre-phi248, 0 %umin370.neg = sext i1 %107 to i64 %108 = add nsw i64 %.pre-phi248, %umin370.neg %109 = trunc i64 %.pre-phi248 to i32 %110 = add i32 %109, -1 %111 = trunc i64 %108 to i32 %112 = icmp ult i32 %110, %111 %113 = icmp ugt i64 %108, 4294967295 %114 = or i1 %112, %113 %115 = shl nuw nsw i64 %.pre-phi248, 3 %scevgep374 = getelementptr i8, ptr @stack, i64 %115 %mul.result376.neg = mul nsw i64 %108, -8 %116 = getelementptr i8, ptr %scevgep374, i64 %mul.result376.neg %117 = icmp ugt ptr %116, %scevgep374 %118 = zext i32 %110 to i64 %119 = shl nuw nsw i64 %118, 3 %scevgep378 = getelementptr i8, ptr @stack, i64 %119 %mul.result380.neg = mul nsw i64 %108, -8 %120 = getelementptr i8, ptr %scevgep378, i64 %mul.result380.neg %121 = icmp ugt ptr %120, %scevgep378 %122 = or i1 %117, %114 %123 = or i1 %121, %122 br i1 %123, label %for.body.i135.preheader, label %vector.memcheck382 vector.memcheck382: ; preds = %vector.scevcheck369 %124 = shl nuw nsw i64 %.pre-phi248, 3 %125 = add nuw nsw i64 %124, 34359738360 %126 = and i64 %125, 34359738360 %127 = add i64 %126, ptrtoint (ptr @stack to i64) %128 = shl nuw nsw i64 %.pre-phi248, 3 %129 = add i64 %128, ptrtoint (ptr @stack to i64) %130 = sub i64 %127, %129 %diff.check383 = icmp ult i64 %130, 32 br i1 %diff.check383, label %for.body.i135.preheader, label %vector.ph388 vector.ph388: ; preds = %vector.memcheck382 %n.vec390 = and i64 %106, -4 %ind.end391 = sub nsw i64 %.pre-phi248, %n.vec390 br label %vector.body394 vector.body394: ; preds = %vector.body394, %vector.ph388 %index395 = phi i64 [ 0, %vector.ph388 ], [ %index.next403, %vector.body394 ] %offset.idx396 = sub i64 %.pre-phi248, %index395 %131 = add i64 %offset.idx396, 4294967295 %132 = and i64 %131, 4294967295 %133 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %132 %134 = getelementptr inbounds double, ptr %133, i64 -1 %wide.load397 = load <2 x double>, ptr %134, align 8, !tbaa !9 %135 = getelementptr inbounds double, ptr %133, i64 -3 %wide.load399 = load <2 x double>, ptr %135, align 8, !tbaa !9 %136 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx396 %137 = getelementptr inbounds double, ptr %136, i64 -1 store <2 x double> %wide.load397, ptr %137, align 8, !tbaa !9 %138 = getelementptr inbounds double, ptr %136, i64 -3 store <2 x double> %wide.load399, ptr %138, align 8, !tbaa !9 %index.next403 = add nuw i64 %index395, 4 %139 = icmp eq i64 %index.next403, %n.vec390 br i1 %139, label %middle.block385, label %vector.body394, !llvm.loop !26 middle.block385: ; preds = %vector.body394 %cmp.n393 = icmp eq i64 %106, %n.vec390 br i1 %cmp.n393, label %sw.epilog, label %for.body.i135.preheader for.body.i135.preheader: ; preds = %vector.memcheck382, %vector.scevcheck369, %for.body.preheader.i134, %middle.block385 %indvars.iv.i136.ph = phi i64 [ %.pre-phi248, %vector.memcheck382 ], [ %.pre-phi248, %vector.scevcheck369 ], [ %.pre-phi248, %for.body.preheader.i134 ], [ %ind.end391, %middle.block385 ] br label %for.body.i135 for.body.i135: ; preds = %for.body.i135.preheader, %for.body.i135 %indvars.iv.i136 = phi i64 [ %indvars.iv.next.i137, %for.body.i135 ], [ %indvars.iv.i136.ph, %for.body.i135.preheader ] %indvars.iv.next.i137 = add nsw i64 %indvars.iv.i136, -1 %idxprom.i138 = and i64 %indvars.iv.next.i137, 4294967295 %arrayidx.i139 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i138 %140 = load double, ptr %arrayidx.i139, align 8, !tbaa !9 %arrayidx2.i140 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i136 store double %140, ptr %arrayidx2.i140, align 8, !tbaa !9 %cmp.i141 = icmp ugt i64 %indvars.iv.i136, 1 br i1 %cmp.i141, label %for.body.i135, label %sw.epilog, !llvm.loop !27 sw.bb48: ; preds = %if.then %sub.i143 = add i32 %sub.i149233236, -1 %cmp10.i144 = icmp sgt i32 %sub.i149233236, 1 br i1 %cmp10.i144, label %for.body.preheader.i147, label %pop.exit148 for.body.preheader.i147: ; preds = %sw.bb48 %141 = zext i32 %sub.i143 to i64 %142 = shl nuw nsw i64 %141, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %142, i1 false), !tbaa !9 %143 = zext i32 %sub.i149233236 to i64 br label %pop.exit148 pop.exit148: ; preds = %sw.bb48, %for.body.preheader.i147 %i.0.lcssa.i145 = phi i64 [ 1, %sw.bb48 ], [ %143, %for.body.preheader.i147 ] %arrayidx5.i146 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa.i145 store double 0.000000e+00, ptr %arrayidx5.i146, align 8, !tbaa !9 %144 = load double, ptr @stack, align 16, !tbaa !9 %sub.i149 = add i32 %sub.i149233236, -2 %cmp10.i150 = icmp sgt i32 %sub.i143, 1 br i1 %cmp10.i150, label %pop.exit154.thread, label %pop.exit154 pop.exit154.thread: ; preds = %pop.exit148 %145 = zext i32 %sub.i149 to i64 %146 = shl nuw nsw i64 %145, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %146, i1 false), !tbaa !9 %147 = zext i32 %sub.i143 to i64 %arrayidx5.i152228 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %147 store double 0.000000e+00, ptr %arrayidx5.i152228, align 8, !tbaa !9 %div229 = fdiv double %144, %3 br label %for.body.preheader.i157 pop.exit154: ; preds = %pop.exit148 store double 0.000000e+00, ptr getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), align 8, !tbaa !9 %div = fdiv double %144, %3 %cmp6.i155 = icmp sgt i32 %sub.i149, 0 br i1 %cmp6.i155, label %pop.exit154.for.body.preheader.i157_crit_edge, label %sw.epilog pop.exit154.for.body.preheader.i157_crit_edge: ; preds = %pop.exit154 %.pre249 = zext i32 %sub.i149 to i64 br label %for.body.preheader.i157 for.body.preheader.i157: ; preds = %pop.exit154.for.body.preheader.i157_crit_edge, %pop.exit154.thread %.pre-phi250 = phi i64 [ %.pre249, %pop.exit154.for.body.preheader.i157_crit_edge ], [ %145, %pop.exit154.thread ] %div232 = phi double [ %div, %pop.exit154.for.body.preheader.i157_crit_edge ], [ %div229, %pop.exit154.thread ] %148 = add nuw nsw i64 %.pre-phi250, 1 %149 = icmp ne i64 %.pre-phi250, 0 %umin419.neg = sext i1 %149 to i64 %150 = add nsw i64 %148, %umin419.neg %min.iters.check422 = icmp ult i64 %150, 62 br i1 %min.iters.check422, label %for.body.i158.preheader, label %vector.scevcheck404 vector.scevcheck404: ; preds = %for.body.preheader.i157 %151 = icmp ne i64 %.pre-phi250, 0 %umin405.neg = sext i1 %151 to i64 %152 = add nsw i64 %.pre-phi250, %umin405.neg %153 = trunc i64 %.pre-phi250 to i32 %154 = add i32 %153, -1 %155 = trunc i64 %152 to i32 %156 = icmp ult i32 %154, %155 %157 = icmp ugt i64 %152, 4294967295 %158 = or i1 %156, %157 %159 = shl nuw nsw i64 %.pre-phi250, 3 %scevgep409 = getelementptr i8, ptr @stack, i64 %159 %mul.result411.neg = mul nsw i64 %152, -8 %160 = getelementptr i8, ptr %scevgep409, i64 %mul.result411.neg %161 = icmp ugt ptr %160, %scevgep409 %162 = zext i32 %154 to i64 %163 = shl nuw nsw i64 %162, 3 %scevgep413 = getelementptr i8, ptr @stack, i64 %163 %mul.result415.neg = mul nsw i64 %152, -8 %164 = getelementptr i8, ptr %scevgep413, i64 %mul.result415.neg %165 = icmp ugt ptr %164, %scevgep413 %166 = or i1 %161, %158 %167 = or i1 %165, %166 br i1 %167, label %for.body.i158.preheader, label %vector.memcheck417 vector.memcheck417: ; preds = %vector.scevcheck404 %168 = shl nuw nsw i64 %.pre-phi250, 3 %169 = add nuw nsw i64 %168, 34359738360 %170 = and i64 %169, 34359738360 %171 = add i64 %170, ptrtoint (ptr @stack to i64) %172 = shl nuw nsw i64 %.pre-phi250, 3 %173 = add i64 %172, ptrtoint (ptr @stack to i64) %174 = sub i64 %171, %173 %diff.check418 = icmp ult i64 %174, 32 br i1 %diff.check418, label %for.body.i158.preheader, label %vector.ph423 vector.ph423: ; preds = %vector.memcheck417 %n.vec425 = and i64 %150, -4 %ind.end426 = sub nsw i64 %.pre-phi250, %n.vec425 br label %vector.body429 vector.body429: ; preds = %vector.body429, %vector.ph423 %index430 = phi i64 [ 0, %vector.ph423 ], [ %index.next438, %vector.body429 ] %offset.idx431 = sub i64 %.pre-phi250, %index430 %175 = add i64 %offset.idx431, 4294967295 %176 = and i64 %175, 4294967295 %177 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %176 %178 = getelementptr inbounds double, ptr %177, i64 -1 %wide.load432 = load <2 x double>, ptr %178, align 8, !tbaa !9 %179 = getelementptr inbounds double, ptr %177, i64 -3 %wide.load434 = load <2 x double>, ptr %179, align 8, !tbaa !9 %180 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx431 %181 = getelementptr inbounds double, ptr %180, i64 -1 store <2 x double> %wide.load432, ptr %181, align 8, !tbaa !9 %182 = getelementptr inbounds double, ptr %180, i64 -3 store <2 x double> %wide.load434, ptr %182, align 8, !tbaa !9 %index.next438 = add nuw i64 %index430, 4 %183 = icmp eq i64 %index.next438, %n.vec425 br i1 %183, label %middle.block420, label %vector.body429, !llvm.loop !28 middle.block420: ; preds = %vector.body429 %cmp.n428 = icmp eq i64 %150, %n.vec425 br i1 %cmp.n428, label %sw.epilog, label %for.body.i158.preheader for.body.i158.preheader: ; preds = %vector.memcheck417, %vector.scevcheck404, %for.body.preheader.i157, %middle.block420 %indvars.iv.i159.ph = phi i64 [ %.pre-phi250, %vector.memcheck417 ], [ %.pre-phi250, %vector.scevcheck404 ], [ %.pre-phi250, %for.body.preheader.i157 ], [ %ind.end426, %middle.block420 ] br label %for.body.i158 for.body.i158: ; preds = %for.body.i158.preheader, %for.body.i158 %indvars.iv.i159 = phi i64 [ %indvars.iv.next.i160, %for.body.i158 ], [ %indvars.iv.i159.ph, %for.body.i158.preheader ] %indvars.iv.next.i160 = add nsw i64 %indvars.iv.i159, -1 %idxprom.i161 = and i64 %indvars.iv.next.i160, 4294967295 %arrayidx.i162 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i161 %184 = load double, ptr %arrayidx.i162, align 8, !tbaa !9 %arrayidx2.i163 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i159 store double %184, ptr %arrayidx2.i163, align 8, !tbaa !9 %cmp.i164 = icmp ugt i64 %indvars.iv.i159, 1 br i1 %cmp.i164, label %for.body.i158, label %sw.epilog, !llvm.loop !29 sw.default: ; preds = %if.then switch i8 %7, label %while.body.i182 [ i8 45, label %if.then55 i8 0, label %integer.exit191 ] if.then55: ; preds = %sw.default %cmp.not10.i = icmp eq i8 %8, 0 br i1 %cmp.not10.i, label %integer.exit, label %while.body.i while.body.i: ; preds = %if.then55, %while.body.i %indvars.iv.i166 = phi i64 [ %indvars.iv.next.i168, %while.body.i ], [ 0, %if.then55 ] %185 = phi i8 [ %187, %while.body.i ], [ %8, %if.then55 ] %sum.011.i = phi double [ %sub.i167, %while.body.i ], [ 0.000000e+00, %if.then55 ] %conv5.i = sitofp i8 %185 to double %186 = call double @llvm.fmuladd.f64(double %sum.011.i, double 1.000000e+01, double %conv5.i) %sub.i167 = fadd double %186, -4.800000e+01 %indvars.iv.next.i168 = add nuw nsw i64 %indvars.iv.i166, 1 %arrayidx.i169 = getelementptr inbounds i8, ptr %arrayidx37, i64 %indvars.iv.next.i168 %187 = load i8, ptr %arrayidx.i169, align 1, !tbaa !16 %cmp.not.i = icmp eq i8 %187, 0 br i1 %cmp.not.i, label %integer.exit, label %while.body.i, !llvm.loop !17 integer.exit: ; preds = %while.body.i, %if.then55 %sum.0.lcssa.i = phi double [ 0.000000e+00, %if.then55 ], [ %sub.i167, %while.body.i ] %mul58 = fneg double %sum.0.lcssa.i %cmp6.i170 = icmp sgt i32 %sub.i149233236, 0 br i1 %cmp6.i170, label %for.body.preheader.i172, label %push.exit180 for.body.preheader.i172: ; preds = %integer.exit %188 = zext i32 %sub.i149233236 to i64 %min.iters.check283 = icmp ult i32 %sub.i149233236, 60 br i1 %min.iters.check283, label %for.body.i173.preheader, label %vector.scevcheck267 vector.scevcheck267: ; preds = %for.body.preheader.i172 %189 = add nsw i64 %188, -1 %190 = add i32 %sub.i149233236, -1 %191 = trunc i64 %189 to i32 %192 = icmp ult i32 %190, %191 %193 = icmp ugt i64 %189, 4294967295 %194 = or i1 %192, %193 %195 = shl nuw nsw i64 %188, 3 %scevgep271 = getelementptr i8, ptr @stack, i64 %195 %mul.result273.neg = mul nsw i64 %189, -8 %196 = getelementptr i8, ptr %scevgep271, i64 %mul.result273.neg %197 = icmp ugt ptr %196, %scevgep271 %198 = zext i32 %190 to i64 %199 = shl nuw nsw i64 %198, 3 %scevgep275 = getelementptr i8, ptr @stack, i64 %199 %mul.result277.neg = mul nsw i64 %189, -8 %200 = getelementptr i8, ptr %scevgep275, i64 %mul.result277.neg %201 = icmp ugt ptr %200, %scevgep275 %202 = or i1 %197, %194 %203 = or i1 %201, %202 br i1 %203, label %for.body.i173.preheader, label %vector.memcheck279 vector.memcheck279: ; preds = %vector.scevcheck267 %204 = add i32 %sub.i149233236, -1 %205 = zext i32 %204 to i64 %206 = shl nuw nsw i64 %205, 3 %207 = add i64 %206, ptrtoint (ptr @stack to i64) %208 = shl nuw nsw i64 %188, 3 %209 = add i64 %208, ptrtoint (ptr @stack to i64) %210 = sub i64 %207, %209 %diff.check280 = icmp ult i64 %210, 32 br i1 %diff.check280, label %for.body.i173.preheader, label %vector.ph284 vector.ph284: ; preds = %vector.memcheck279 %n.vec286 = and i64 %188, 4294967292 %ind.end287 = and i64 %188, 3 br label %vector.body290 vector.body290: ; preds = %vector.body290, %vector.ph284 %index291 = phi i64 [ 0, %vector.ph284 ], [ %index.next299, %vector.body290 ] %offset.idx292 = sub i64 %188, %index291 %211 = add i64 %offset.idx292, 4294967295 %212 = and i64 %211, 4294967295 %213 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %212 %214 = getelementptr inbounds double, ptr %213, i64 -1 %wide.load293 = load <2 x double>, ptr %214, align 8, !tbaa !9 %215 = getelementptr inbounds double, ptr %213, i64 -3 %wide.load295 = load <2 x double>, ptr %215, align 8, !tbaa !9 %216 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx292 %217 = getelementptr inbounds double, ptr %216, i64 -1 store <2 x double> %wide.load293, ptr %217, align 8, !tbaa !9 %218 = getelementptr inbounds double, ptr %216, i64 -3 store <2 x double> %wide.load295, ptr %218, align 8, !tbaa !9 %index.next299 = add nuw i64 %index291, 4 %219 = icmp eq i64 %index.next299, %n.vec286 br i1 %219, label %middle.block281, label %vector.body290, !llvm.loop !30 middle.block281: ; preds = %vector.body290 %cmp.n289 = icmp eq i64 %n.vec286, %188 br i1 %cmp.n289, label %push.exit180, label %for.body.i173.preheader for.body.i173.preheader: ; preds = %vector.memcheck279, %vector.scevcheck267, %for.body.preheader.i172, %middle.block281 %indvars.iv.i174.ph = phi i64 [ %188, %vector.memcheck279 ], [ %188, %vector.scevcheck267 ], [ %188, %for.body.preheader.i172 ], [ %ind.end287, %middle.block281 ] br label %for.body.i173 for.body.i173: ; preds = %for.body.i173.preheader, %for.body.i173 %indvars.iv.i174 = phi i64 [ %indvars.iv.next.i175, %for.body.i173 ], [ %indvars.iv.i174.ph, %for.body.i173.preheader ] %indvars.iv.next.i175 = add nsw i64 %indvars.iv.i174, -1 %idxprom.i176 = and i64 %indvars.iv.next.i175, 4294967295 %arrayidx.i177 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i176 %220 = load double, ptr %arrayidx.i177, align 8, !tbaa !9 %arrayidx2.i178 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i174 store double %220, ptr %arrayidx2.i178, align 8, !tbaa !9 %cmp.i179 = icmp ugt i64 %indvars.iv.i174, 1 br i1 %cmp.i179, label %for.body.i173, label %push.exit180, !llvm.loop !31 push.exit180: ; preds = %for.body.i173, %middle.block281, %integer.exit %inc.i171 = add nsw i32 %sub.i149233236, 1 br label %sw.epilog while.body.i182: ; preds = %sw.default, %while.body.i182 %indvars.iv.i183 = phi i64 [ %indvars.iv.next.i187, %while.body.i182 ], [ 0, %sw.default ] %221 = phi i8 [ %223, %while.body.i182 ], [ %7, %sw.default ] %sum.011.i184 = phi double [ %sub.i186, %while.body.i182 ], [ 0.000000e+00, %sw.default ] %conv5.i185 = sitofp i8 %221 to double %222 = call double @llvm.fmuladd.f64(double %sum.011.i184, double 1.000000e+01, double %conv5.i185) %sub.i186 = fadd double %222, -4.800000e+01 %indvars.iv.next.i187 = add nuw nsw i64 %indvars.iv.i183, 1 %arrayidx.i188 = getelementptr inbounds i8, ptr %temp, i64 %indvars.iv.next.i187 %223 = load i8, ptr %arrayidx.i188, align 1, !tbaa !16 %cmp.not.i189 = icmp eq i8 %223, 0 br i1 %cmp.not.i189, label %integer.exit191, label %while.body.i182, !llvm.loop !17 integer.exit191: ; preds = %while.body.i182, %sw.default %sum.0.lcssa.i190 = phi double [ 0.000000e+00, %sw.default ], [ %sub.i186, %while.body.i182 ] %cmp6.i192 = icmp sgt i32 %sub.i149233236, 0 br i1 %cmp6.i192, label %for.body.preheader.i194, label %push.exit202 for.body.preheader.i194: ; preds = %integer.exit191 %224 = zext i32 %sub.i149233236 to i64 %min.iters.check = icmp ult i32 %sub.i149233236, 60 br i1 %min.iters.check, label %for.body.i195.preheader, label %vector.scevcheck vector.scevcheck: ; preds = %for.body.preheader.i194 %225 = add nsw i64 %224, -1 %226 = add i32 %sub.i149233236, -1 %227 = trunc i64 %225 to i32 %228 = icmp ult i32 %226, %227 %229 = icmp ugt i64 %225, 4294967295 %230 = or i1 %228, %229 %231 = shl nuw nsw i64 %224, 3 %scevgep = getelementptr i8, ptr @stack, i64 %231 %mul.result257.neg = mul nsw i64 %225, -8 %232 = getelementptr i8, ptr %scevgep, i64 %mul.result257.neg %233 = icmp ugt ptr %232, %scevgep %234 = zext i32 %226 to i64 %235 = shl nuw nsw i64 %234, 3 %scevgep259 = getelementptr i8, ptr @stack, i64 %235 %mul.result261.neg = mul nsw i64 %225, -8 %236 = getelementptr i8, ptr %scevgep259, i64 %mul.result261.neg %237 = icmp ugt ptr %236, %scevgep259 %238 = or i1 %233, %230 %239 = or i1 %237, %238 br i1 %239, label %for.body.i195.preheader, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %240 = add i32 %sub.i149233236, -1 %241 = zext i32 %240 to i64 %242 = shl nuw nsw i64 %241, 3 %243 = add i64 %242, ptrtoint (ptr @stack to i64) %244 = shl nuw nsw i64 %224, 3 %245 = add i64 %244, ptrtoint (ptr @stack to i64) %246 = sub i64 %243, %245 %diff.check = icmp ult i64 %246, 32 br i1 %diff.check, label %for.body.i195.preheader, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %224, 4294967292 %ind.end = and i64 %224, 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = sub i64 %224, %index %247 = add i64 %offset.idx, 4294967295 %248 = and i64 %247, 4294967295 %249 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %248 %250 = getelementptr inbounds double, ptr %249, i64 -1 %wide.load = load <2 x double>, ptr %250, align 8, !tbaa !9 %251 = getelementptr inbounds double, ptr %249, i64 -3 %wide.load263 = load <2 x double>, ptr %251, align 8, !tbaa !9 %252 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %offset.idx %253 = getelementptr inbounds double, ptr %252, i64 -1 store <2 x double> %wide.load, ptr %253, align 8, !tbaa !9 %254 = getelementptr inbounds double, ptr %252, i64 -3 store <2 x double> %wide.load263, ptr %254, align 8, !tbaa !9 %index.next = add nuw i64 %index, 4 %255 = icmp eq i64 %index.next, %n.vec br i1 %255, label %middle.block, label %vector.body, !llvm.loop !32 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %224 br i1 %cmp.n, label %push.exit202, label %for.body.i195.preheader for.body.i195.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %for.body.preheader.i194, %middle.block %indvars.iv.i196.ph = phi i64 [ %224, %vector.memcheck ], [ %224, %vector.scevcheck ], [ %224, %for.body.preheader.i194 ], [ %ind.end, %middle.block ] br label %for.body.i195 for.body.i195: ; preds = %for.body.i195.preheader, %for.body.i195 %indvars.iv.i196 = phi i64 [ %indvars.iv.next.i197, %for.body.i195 ], [ %indvars.iv.i196.ph, %for.body.i195.preheader ] %indvars.iv.next.i197 = add nsw i64 %indvars.iv.i196, -1 %idxprom.i198 = and i64 %indvars.iv.next.i197, 4294967295 %arrayidx.i199 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %idxprom.i198 %256 = load double, ptr %arrayidx.i199, align 8, !tbaa !9 %arrayidx2.i200 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %indvars.iv.i196 store double %256, ptr %arrayidx2.i200, align 8, !tbaa !9 %cmp.i201 = icmp ugt i64 %indvars.iv.i196, 1 br i1 %cmp.i201, label %for.body.i195, label %push.exit202, !llvm.loop !33 push.exit202: ; preds = %for.body.i195, %middle.block, %integer.exit191 %inc.i193 = add nsw i32 %sub.i149233236, 1 br label %sw.epilog sw.epilog: ; preds = %for.body.i158, %for.body.i135, %for.body.i112, %for.body.i, %middle.block420, %middle.block385, %middle.block350, %middle.block315, %pop.exit154, %pop.exit131, %pop.exit108, %pop.exit95, %push.exit180, %push.exit202 %inc.i171.sink = phi i32 [ %inc.i171, %push.exit180 ], [ %inc.i193, %push.exit202 ], [ %sub.i, %pop.exit95 ], [ %sub.i97, %pop.exit108 ], [ %sub.i120, %pop.exit131 ], [ %sub.i143, %pop.exit154 ], [ %sub.i, %middle.block315 ], [ %sub.i97, %middle.block350 ], [ %sub.i120, %middle.block385 ], [ %sub.i143, %middle.block420 ], [ %sub.i, %for.body.i ], [ %sub.i97, %for.body.i112 ], [ %sub.i120, %for.body.i135 ], [ %sub.i143, %for.body.i158 ] %mul58.sink = phi double [ %mul58, %push.exit180 ], [ %sum.0.lcssa.i190, %push.exit202 ], [ %add41, %pop.exit95 ], [ %sub, %pop.exit108 ], [ %mul, %pop.exit131 ], [ %div, %pop.exit154 ], [ %add41214, %middle.block315 ], [ %sub220, %middle.block350 ], [ %mul226, %middle.block385 ], [ %div232, %middle.block420 ], [ %add41214, %for.body.i ], [ %sub220, %for.body.i112 ], [ %mul226, %for.body.i135 ], [ %div232, %for.body.i158 ] store double %mul58.sink, ptr @stack, align 16, !tbaa !9 %idxprom61 = and i64 %indvars.iv240, 4294967295 %arrayidx62 = getelementptr inbounds [100 x i8], ptr %operate, i64 0, i64 %idxprom61 %257 = load i8, ptr %arrayidx62, align 1, !tbaa !16 %cmp64 = icmp eq i8 %257, 0 br i1 %cmp64, label %while.end70.loopexit, label %while.cond3 while.end70.loopexit: ; preds = %sw.epilog, %while.cond3 store i32 %inc.i171.sink, ptr @head, align 4, !tbaa !5 br label %while.end70 while.end70: ; preds = %while.end70.loopexit, %while.body %258 = phi i32 [ %head.promoted, %while.body ], [ %inc.i171.sink, %while.end70.loopexit ] %259 = phi double [ 0.000000e+00, %while.body ], [ %mul58.sink, %while.end70.loopexit ] %sub.i203 = add i32 %258, -1 %cmp10.i204 = icmp sgt i32 %258, 1 br i1 %cmp10.i204, label %for.body.preheader.i207, label %pop.exit208 for.body.preheader.i207: ; preds = %while.end70 %260 = zext i32 %sub.i203 to i64 %261 = shl nuw nsw i64 %260, 3 call void @llvm.memmove.p0.p0.i64(ptr nonnull align 16 @stack, ptr nonnull align 8 getelementptr inbounds ([101 x double], ptr @stack, i64 0, i64 1), i64 %261, i1 false), !tbaa !9 %262 = zext i32 %258 to i64 br label %pop.exit208 pop.exit208: ; preds = %while.end70, %for.body.preheader.i207 %i.0.lcssa.i205 = phi i64 [ 1, %while.end70 ], [ %262, %for.body.preheader.i207 ] %arrayidx5.i206 = getelementptr inbounds [101 x double], ptr @stack, i64 0, i64 %i.0.lcssa.i205 store double 0.000000e+00, ptr %arrayidx5.i206, align 8, !tbaa !9 store i32 %sub.i203, ptr @head, align 4, !tbaa !5 %call72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %259) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %operate, i8 0, i64 100, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %operate) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end74, label %while.body, !llvm.loop !34 while.end74: ; preds = %pop.exit208, %entry call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %temp) #9 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %operate) #9 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) #6 ; 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: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memmove.p0.p0.i64(ptr nocapture writeonly, ptr nocapture readonly, i64, i1 immarg) #8 attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } 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 nounwind willreturn memory(argmem: readwrite) } 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"double", !7, i64 0} !11 = distinct !{!11, !12, !13, !14} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !12, !13} !16 = !{!7, !7, i64 0} !17 = distinct !{!17, !12} !18 = !{!19, !19, i64 0} !19 = !{!"any pointer", !7, i64 0} !20 = distinct !{!20, !12} !21 = distinct !{!21, !12} !22 = distinct !{!22, !12, !13, !14} !23 = distinct !{!23, !12, !13} !24 = distinct !{!24, !12, !13, !14} !25 = distinct !{!25, !12, !13} !26 = distinct !{!26, !12, !13, !14} !27 = distinct !{!27, !12, !13} !28 = distinct !{!28, !12, !13, !14} !29 = distinct !{!29, !12, !13} !30 = distinct !{!30, !12, !13, !14} !31 = distinct !{!31, !12, !13} !32 = distinct !{!32, !12, !13, !14} !33 = distinct !{!33, !12, !13} !34 = distinct !{!34, !12}
#include<stdio.h> #include<string.h> int main() { int len,count0,count1,T,l,i; scanf("%d",&T); for(l=1;l<=T;l++){ char t[100]; scanf("%s",&t); len=strlen(t); count0=0; count1=0; for(i=0;i<len;i++){ if(t[i]=='1') count1++; else count0++; } //printf("%d %d\n",count0,count1); if(count0==0||count1==0) printf("%s\n",t); else{ for(i=0;i<(len-1);i++){ printf("%c",t[i]); if(t[i]=='0'&&t[i+1]=='0') printf("1"); else if(t[i]=='1'&&t[i+1]=='1') printf("0"); } printf("%c\n",t[len-1]); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21722/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.6 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %T = alloca i32, align 4 %t = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !5 %cmp.not94 = icmp slt i32 %0, 1 br i1 %cmp.not94, label %for.end68, label %for.body for.body: ; preds = %entry, %if.end65 %l.095 = phi i32 [ %inc67, %if.end65 ], [ 1, %entry ] call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %t) #6 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %t) #7 %conv = trunc i64 %call2 to i32 %cmp486 = icmp sgt i32 %conv, 0 br i1 %cmp486, label %for.body6.preheader, label %if.then16 for.body6.preheader: ; preds = %for.body %wide.trip.count = and i64 %call2, 4294967295 %min.iters.check = icmp ult i64 %wide.trip.count, 8 br i1 %min.iters.check, label %for.body6.preheader115, label %vector.ph vector.ph: ; preds = %for.body6.preheader %n.mod.vf = and i64 %call2, 7 %n.vec = sub nsw i64 %wide.trip.count, %n.mod.vf 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.phi109 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %vec.phi110 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ] %vec.phi111 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ] %1 = getelementptr inbounds [100 x i8], ptr %t, 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.load112 = load <4 x i8>, ptr %2, align 4, !tbaa !9 %3 = icmp ne <4 x i8> %wide.load, <i8 49, i8 49, i8 49, i8 49> %4 = icmp ne <4 x i8> %wide.load112, <i8 49, i8 49, i8 49, i8 49> %5 = zext <4 x i1> %3 to <4 x i32> %6 = zext <4 x i1> %4 to <4 x i32> %7 = add <4 x i32> %vec.phi110, %5 %8 = add <4 x i32> %vec.phi111, %6 %9 = xor <4 x i1> %3, <i1 true, i1 true, i1 true, i1 true> %10 = xor <4 x i1> %4, <i1 true, i1 true, i1 true, i1 true> %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.phi109, %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 !10 middle.block: ; preds = %vector.body %bin.rdx113 = add <4 x i32> %8, %7 %16 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx113) %bin.rdx = add <4 x i32> %14, %13 %17 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.mod.vf, 0 br i1 %cmp.n, label %for.end, label %for.body6.preheader115 for.body6.preheader115: ; preds = %for.body6.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body6.preheader ], [ %n.vec, %middle.block ] %count1.088.ph = phi i32 [ 0, %for.body6.preheader ], [ %17, %middle.block ] %count0.087.ph = phi i32 [ 0, %for.body6.preheader ], [ %16, %middle.block ] br label %for.body6 for.body6: ; preds = %for.body6.preheader115, %for.body6 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body6 ], [ %indvars.iv.ph, %for.body6.preheader115 ] %count1.088 = phi i32 [ %count1.1, %for.body6 ], [ %count1.088.ph, %for.body6.preheader115 ] %count0.087 = phi i32 [ %count0.1, %for.body6 ], [ %count0.087.ph, %for.body6.preheader115 ] %arrayidx = getelementptr inbounds [100 x i8], ptr %t, i64 0, i64 %indvars.iv %18 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp8 = icmp ne i8 %18, 49 %inc10 = zext i1 %cmp8 to i32 %count0.1 = add nuw nsw i32 %count0.087, %inc10 %not.cmp8 = xor i1 %cmp8, true %inc = zext i1 %not.cmp8 to i32 %count1.1 = add nuw nsw i32 %count1.088, %inc %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body6, !llvm.loop !14 for.end: ; preds = %for.body6, %middle.block %count0.1.lcssa = phi i32 [ %16, %middle.block ], [ %count0.1, %for.body6 ] %count1.1.lcssa = phi i32 [ %17, %middle.block ], [ %count1.1, %for.body6 ] %cmp12 = icmp eq i32 %count0.1.lcssa, 0 %cmp14 = icmp eq i32 %count1.1.lcssa, 0 %or.cond = select i1 %cmp12, i1 true, i1 %cmp14 br i1 %or.cond, label %if.then16, label %for.cond20.preheader for.cond20.preheader: ; preds = %for.end %sub = add i32 %conv, -1 %cmp2191 = icmp sgt i32 %conv, 1 br i1 %cmp2191, label %for.body23.preheader, label %for.end59 for.body23.preheader: ; preds = %for.cond20.preheader %wide.trip.count102 = zext i32 %sub to i64 br label %for.body23 if.then16: ; preds = %for.body, %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) %t) br label %if.end65 for.body23: ; preds = %for.body23.preheader, %for.inc57 %indvars.iv97 = phi i64 [ 0, %for.body23.preheader ], [ %.pre, %for.inc57 ] %arrayidx25 = getelementptr inbounds [100 x i8], ptr %t, i64 0, i64 %indvars.iv97 %19 = load i8, ptr %arrayidx25, align 1, !tbaa !9 %conv26 = sext i8 %19 to i32 %putchar = call i32 @putchar(i32 %conv26) %20 = load i8, ptr %arrayidx25, align 1, !tbaa !9 %.pre = add nuw nsw i64 %indvars.iv97, 1 switch i8 %20, label %for.inc57 [ i8 48, label %land.lhs.true i8 49, label %land.lhs.true46 ] land.lhs.true: ; preds = %for.body23 %arrayidx34 = getelementptr inbounds [100 x i8], ptr %t, i64 0, i64 %.pre %21 = load i8, ptr %arrayidx34, align 1, !tbaa !9 %cmp36 = icmp eq i8 %21, 48 br i1 %cmp36, label %for.inc57.sink.split, label %for.inc57 land.lhs.true46: ; preds = %for.body23 %arrayidx49 = getelementptr inbounds [100 x i8], ptr %t, i64 0, i64 %.pre %22 = load i8, ptr %arrayidx49, align 1, !tbaa !9 %cmp51 = icmp eq i8 %22, 49 br i1 %cmp51, label %for.inc57.sink.split, label %for.inc57 for.inc57.sink.split: ; preds = %land.lhs.true46, %land.lhs.true %.sink = phi i32 [ 49, %land.lhs.true ], [ 48, %land.lhs.true46 ] %putchar84 = call i32 @putchar(i32 %.sink) br label %for.inc57 for.inc57: ; preds = %for.inc57.sink.split, %for.body23, %land.lhs.true, %land.lhs.true46 %exitcond103.not = icmp eq i64 %.pre, %wide.trip.count102 br i1 %exitcond103.not, label %for.end59, label %for.body23, !llvm.loop !15 for.end59: ; preds = %for.inc57, %for.cond20.preheader %idxprom61 = sext i32 %sub to i64 %arrayidx62 = getelementptr inbounds [100 x i8], ptr %t, i64 0, i64 %idxprom61 %23 = load i8, ptr %arrayidx62, align 1, !tbaa !9 %conv63 = sext i8 %23 to i32 %call64 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv63) br label %if.end65 if.end65: ; preds = %for.end59, %if.then16 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %t) #6 %inc67 = add nuw nsw i32 %l.095, 1 %24 = load i32, ptr %T, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %l.095, %24 br i1 %cmp.not.not, label %for.body, label %for.end68, !llvm.loop !16 for.end68: ; preds = %if.end65, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11}
#include<stdio.h> void write_chess(int stage,int width); int main() { int h,w,s; int i,j,k; int check=1; while(check){ scanf("%d %d",&h,&w); if(h==0 && w == 0){ check=0; } else { for(i=1;i<=h;i++){ s = i%2; write_chess(s,w); } printf("\n"); } } return 0; } void write_chess(int stage,int width){ int count; if(stage==0){ for(count=1;count<=width;count++){ if((count%2)==1){ printf("."); }else{ printf("#"); } } printf("\n"); }else if(stage==1){ for(count=1;count<=width;count++){ if((count%2)==1){ printf("#"); }else{ printf("."); } } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217278/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217278/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 br label %while.body while.body: ; preds = %entry, %if.end %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 %cmp = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %while.body %cmp2.not8 = icmp slt i32 %0, 1 br i1 %cmp2.not8, label %if.end, label %for.body for.body: ; preds = %for.cond.preheader, %if.end24.sink.split.i %i.09 = phi i32 [ %inc, %if.end24.sink.split.i ], [ 1, %for.cond.preheader ] %rem = and i32 %i.09, 1 %2 = load i32, ptr %w, align 4, !tbaa !5 %switch.not.not = icmp eq i32 %rem, 0 %cmp1.not39.i = icmp slt i32 %2, 1 br i1 %switch.not.not, label %for.cond.preheader.i, label %for.cond9.preheader.i for.cond9.preheader.i: ; preds = %for.body br i1 %cmp1.not39.i, label %if.end24.sink.split.i, label %for.body11.i for.cond.preheader.i: ; preds = %for.body br i1 %cmp1.not39.i, label %if.end24.sink.split.i, label %for.body.i for.body.i: ; preds = %for.cond.preheader.i, %for.body.i %count.040.i = phi i32 [ %inc.i, %for.body.i ], [ 1, %for.cond.preheader.i ] %rem.i = and i32 %count.040.i, 1 %cmp2.not.i = icmp eq i32 %rem.i, 0 %..i = select i1 %cmp2.not.i, i32 35, i32 46 %putchar36.i = call i32 @putchar(i32 %..i) %inc.i = add nuw i32 %count.040.i, 1 %exitcond41.not.i = icmp eq i32 %count.040.i, %2 br i1 %exitcond41.not.i, label %if.end24.sink.split.i, label %for.body.i, !llvm.loop !9 for.body11.i: ; preds = %for.cond9.preheader.i, %for.body11.i %count.138.i = phi i32 [ %inc20.i, %for.body11.i ], [ 1, %for.cond9.preheader.i ] %rem12.i = and i32 %count.138.i, 1 %cmp13.not.i = icmp eq i32 %rem12.i, 0 %.43.i = select i1 %cmp13.not.i, i32 46, i32 35 %putchar33.i = call i32 @putchar(i32 %.43.i) %inc20.i = add nuw i32 %count.138.i, 1 %exitcond.not.i = icmp eq i32 %count.138.i, %2 br i1 %exitcond.not.i, label %if.end24.sink.split.i, label %for.body11.i, !llvm.loop !11 if.end24.sink.split.i: ; preds = %for.body11.i, %for.body.i, %for.cond.preheader.i, %for.cond9.preheader.i %putchar.i = call i32 @putchar(i32 10) %inc = add nuw nsw i32 %i.09, 1 %3 = load i32, ptr %h, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.09, %3 br i1 %cmp2.not.not, label %for.body, label %if.end, !llvm.loop !12 if.end: ; preds = %if.end24.sink.split.i, %for.cond.preheader %putchar = call i32 @putchar(i32 10) br i1 %or.cond, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %while.body, %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local void @write_chess(i32 noundef %stage, i32 noundef %width) local_unnamed_addr #0 { entry: switch i32 %stage, label %if.end24 [ i32 0, label %for.cond.preheader i32 1, label %for.cond9.preheader ] for.cond9.preheader: ; preds = %entry %cmp10.not37 = icmp slt i32 %width, 1 br i1 %cmp10.not37, label %if.end24.sink.split, label %for.body11 for.cond.preheader: ; preds = %entry %cmp1.not39 = icmp slt i32 %width, 1 br i1 %cmp1.not39, label %if.end24.sink.split, label %for.body for.body: ; preds = %for.cond.preheader, %for.body %count.040 = phi i32 [ %inc, %for.body ], [ 1, %for.cond.preheader ] %rem = and i32 %count.040, 1 %cmp2.not = icmp eq i32 %rem, 0 %. = select i1 %cmp2.not, i32 35, i32 46 %putchar36 = tail call i32 @putchar(i32 %.) %inc = add nuw i32 %count.040, 1 %exitcond41.not = icmp eq i32 %count.040, %width br i1 %exitcond41.not, label %if.end24.sink.split, label %for.body, !llvm.loop !9 for.body11: ; preds = %for.cond9.preheader, %for.body11 %count.138 = phi i32 [ %inc20, %for.body11 ], [ 1, %for.cond9.preheader ] %rem12 = and i32 %count.138, 1 %cmp13.not = icmp eq i32 %rem12, 0 %.43 = select i1 %cmp13.not, i32 46, i32 35 %putchar33 = tail call i32 @putchar(i32 %.43) %inc20 = add nuw i32 %count.138, 1 %exitcond.not = icmp eq i32 %count.138, %width br i1 %exitcond.not, label %if.end24.sink.split, label %for.body11, !llvm.loop !11 if.end24.sink.split: ; preds = %for.body11, %for.body, %for.cond9.preheader, %for.cond.preheader %putchar = tail call i32 @putchar(i32 10) br label %if.end24 if.end24: ; preds = %if.end24.sink.split, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main() { int H, W, i, j; scanf("%d %d", &H, &W); while(H != 0 && W != 0){ for(i = 0; i < H; i++){ for(j = 0 ; j < W; j++){ if(i % 2 == 0){ if(j % 2 == 0){ printf("#"); }else{ printf("."); } }else if(i % 2 == 1){ if(j % 2 == 0){ printf("."); }else{ printf("#"); } } } printf("\n"); } printf("\n"); scanf("%d %d", &H, &W); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217328/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %cmp46 = icmp ne i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp147 = icmp ne i32 %1, 0 %2 = select i1 %cmp46, i1 %cmp147, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end28 %3 = phi i32 [ %8, %for.end28 ], [ %0, %entry ] %cmp244 = icmp sgt i32 %3, 0 br i1 %cmp244, label %for.cond3.preheader, label %for.end28 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.045 = phi i32 [ %inc27, %for.end ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp442 = icmp sgt i32 %4, 0 br i1 %cmp442, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %rem = and i32 %i.045, 1 %cmp6 = icmp eq i32 %rem, 0 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.043.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %rem7.us = and i32 %j.043.us, 1 %cmp8.us = icmp eq i32 %rem7.us, 0 %. = select i1 %cmp8.us, i32 35, i32 46 %putchar41.us = call i32 @putchar(i32 %.) %inc.us = add nuw nsw i32 %j.043.us, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %5 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %j.043 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %rem16 = and i32 %j.043, 1 %cmp17 = icmp eq i32 %rem16, 0 %.51 = select i1 %cmp17, i32 46, i32 35 %putchar39 = call i32 @putchar(i32 %.51) %inc = add nuw nsw i32 %j.043, 1 %6 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %6 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar37 = call i32 @putchar(i32 10) %inc27 = add nuw nsw i32 %i.045, 1 %7 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc27, %7 br i1 %cmp2, label %for.cond3.preheader, label %for.end28, !llvm.loop !11 for.end28: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp ne i32 %8, 0 %9 = load i32, ptr %W, align 4 %cmp1 = icmp ne i32 %9, 0 %10 = select i1 %cmp, i1 %cmp1, i1 false br i1 %10, label %for.cond.preheader, label %while.end, !llvm.loop !12 while.end: ; preds = %for.end28, %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}
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <math.h> #include <limits.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){ if ( (i+j)%2==0) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217371/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217371/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call27 = 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 %cmp28 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp129 = icmp eq i32 %1, 0 %or.cond30 = select i1 %cmp28, i1 %cmp129, i1 false br i1 %or.cond30, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end14 %2 = phi i32 [ %6, %for.end14 ], [ %0, %entry ] %cmp225 = icmp sgt i32 %2, 0 br i1 %cmp225, label %for.cond3.preheader, label %for.end14 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.026 = phi i32 [ %inc13, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp423 = icmp sgt i32 %3, 0 br i1 %cmp423, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.024 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %add = add nuw nsw i32 %j.024, %i.026 %rem = and i32 %add, 1 %cmp6 = icmp eq i32 %rem, 0 %. = select i1 %cmp6, i32 35, i32 46 %putchar22 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.024, 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 %putchar20 = call i32 @putchar(i32 10) %inc13 = add nuw nsw i32 %i.026, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc13, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end14, !llvm.loop !11 for.end14: ; 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.end14, %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, H, W; for(;;){ scanf("%d %d", &H, &W); if(H == 0 && W == 0) break; for(h = 0; h < H; h++){ for(w = 0; w < W; w++){ if(h % 2 == 0){ if(w % 2 == 0){ printf("#"); }else{ printf("."); } }else{ if(w % 2 == 1){ printf("#"); }else{ printf("."); } } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call44 = 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 %cmp45 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp146 = icmp eq i32 %1, 0 %or.cond47 = select i1 %cmp45, i1 %cmp146, i1 false br i1 %or.cond47, label %for.end29, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %for.end27 %2 = phi i32 [ %7, %for.end27 ], [ %0, %entry ] %cmp342 = icmp sgt i32 %2, 0 br i1 %cmp342, label %for.cond4.preheader, label %for.end27 for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end %h.043 = phi i32 [ %inc26, %for.end ], [ 0, %for.cond2.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp540 = icmp sgt i32 %3, 0 br i1 %cmp540, label %for.body6.lr.ph, label %for.end for.body6.lr.ph: ; preds = %for.cond4.preheader %rem = and i32 %h.043, 1 %cmp7 = icmp eq i32 %rem, 0 br i1 %cmp7, label %for.body6.us, label %for.body6 for.body6.us: ; preds = %for.body6.lr.ph, %for.body6.us %w.041.us = phi i32 [ %inc.us, %for.body6.us ], [ 0, %for.body6.lr.ph ] %rem9.us = and i32 %w.041.us, 1 %cmp10.us = icmp eq i32 %rem9.us, 0 %. = select i1 %cmp10.us, i32 35, i32 46 %putchar39.us = call i32 @putchar(i32 %.) %inc.us = add nuw nsw i32 %w.041.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp5.us = icmp slt i32 %inc.us, %4 br i1 %cmp5.us, label %for.body6.us, label %for.end, !llvm.loop !9 for.body6: ; preds = %for.body6.lr.ph, %for.body6 %w.041 = phi i32 [ %inc, %for.body6 ], [ 0, %for.body6.lr.ph ] %rem16 = and i32 %w.041, 1 %cmp17.not = icmp eq i32 %rem16, 0 %.51 = select i1 %cmp17.not, i32 46, i32 35 %putchar36 = call i32 @putchar(i32 %.51) %inc = add nuw nsw i32 %w.041, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %5 br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body6, %for.body6.us, %for.cond4.preheader %putchar35 = call i32 @putchar(i32 10) %inc26 = add nuw nsw i32 %h.043, 1 %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc26, %6 br i1 %cmp3, label %for.cond4.preheader, label %for.end27, !llvm.loop !11 for.end27: ; preds = %for.end, %for.cond2.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %7 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end29, label %for.cond2.preheader for.end29: ; preds = %for.end27, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(){ int i, j, H, W; scanf("%d %d", &H, &W); while((H!=0)||(W!=0)){ for(i=0; i<H ;i++){ for(j=0; j<W; j++){ if((i+j)%2 == 0) printf("#"); else printf("."); if(j==(W-1)) printf("\n"); } } printf("\n"); scanf("%d %d", &H, &W); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217458/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217458/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %cmp30 = icmp ne i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp131 = icmp ne i32 %1, 0 %2 = select i1 %cmp30, i1 true, i1 %cmp131 br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end15 %3 = phi i32 [ %13, %for.end15 ], [ %1, %entry ] %4 = phi i32 [ %12, %for.end15 ], [ %0, %entry ] %cmp228 = icmp sgt i32 %4, 0 %5 = icmp sgt i32 %3, 0 %or.cond = select i1 %cmp228, i1 %5, i1 false br i1 %or.cond, label %for.cond3.preheader, label %for.end15 for.cond3.preheader: ; preds = %for.cond.preheader, %for.inc13 %6 = phi i32 [ %10, %for.inc13 ], [ %4, %for.cond.preheader ] %7 = phi i32 [ %11, %for.inc13 ], [ %3, %for.cond.preheader ] %i.029 = phi i32 [ %inc14, %for.inc13 ], [ 0, %for.cond.preheader ] %cmp426 = icmp sgt i32 %7, 0 br i1 %cmp426, label %for.body5, label %for.inc13 for.body5: ; preds = %for.cond3.preheader, %for.inc %j.027 = phi i32 [ %inc, %for.inc ], [ 0, %for.cond3.preheader ] %add = add nuw nsw i32 %j.027, %i.029 %rem = and i32 %add, 1 %cmp6 = icmp eq i32 %rem, 0 %. = select i1 %cmp6, i32 35, i32 46 %putchar23 = call i32 @putchar(i32 %.) %8 = load i32, ptr %W, align 4, !tbaa !5 %sub = add nsw i32 %8, -1 %cmp9 = icmp eq i32 %j.027, %sub br i1 %cmp9, label %if.then10, label %for.inc if.then10: ; preds = %for.body5 %putchar25 = call i32 @putchar(i32 10) %.pre = load i32, ptr %W, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body5, %if.then10 %9 = phi i32 [ %8, %for.body5 ], [ %.pre, %if.then10 ] %inc = add nuw nsw i32 %j.027, 1 %cmp4 = icmp slt i32 %inc, %9 br i1 %cmp4, label %for.body5, label %for.inc13.loopexit, !llvm.loop !9 for.inc13.loopexit: ; preds = %for.inc %.pre33 = load i32, ptr %H, align 4, !tbaa !5 br label %for.inc13 for.inc13: ; preds = %for.inc13.loopexit, %for.cond3.preheader %10 = phi i32 [ %.pre33, %for.inc13.loopexit ], [ %6, %for.cond3.preheader ] %11 = phi i32 [ %9, %for.inc13.loopexit ], [ %7, %for.cond3.preheader ] %inc14 = add nuw nsw i32 %i.029, 1 %cmp2 = icmp slt i32 %inc14, %10 br i1 %cmp2, label %for.cond3.preheader, label %for.end15, !llvm.loop !11 for.end15: ; preds = %for.inc13, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %12 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp ne i32 %12, 0 %13 = load i32, ptr %W, align 4 %cmp1 = icmp ne i32 %13, 0 %14 = select i1 %cmp, i1 true, i1 %cmp1 br i1 %14, label %for.cond.preheader, label %while.end, !llvm.loop !13 while.end: ; preds = %for.end15, %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} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10}
#include <stdio.h> int read(int *a) { int h,w; scanf("%d %d", &h, &w); if(h == 0 && w == 0) return 0; a[0] = h; a[1] = w; return 1; } void printChess(int *a) { int i, j; char sym[] = {'#', '.'}; for(i=0;i<a[0];i++) { for(j=0;j<a[1];j++) { printf("%c", sym[(i%2+j%2) % 2]); } putchar('\n'); } } int main(void) { int i, idx = 0; int data[100][2]; while(read(data[idx++]) != 0); for(i=0;i<idx-1;i++) { printChess(data[i]); putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217508/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217508/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @__const.printChess.sym = private unnamed_addr constant [2 x i8] c"#.", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @read(ptr nocapture noundef writeonly %a) 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 %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 %cmp = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %cleanup, label %if.end if.end: ; preds = %entry store i32 %0, ptr %a, align 4, !tbaa !5 %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 1 store i32 %1, ptr %arrayidx2, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %entry, %if.end %retval.0 = phi i32 [ 1, %if.end ], [ 0, %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 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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 void @printChess(ptr nocapture noundef readonly %a) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp20 = icmp sgt i32 %0, 0 br i1 %cmp20, label %for.cond1.preheader.lr.ph, label %for.end11 for.cond1.preheader.lr.ph: ; preds = %entry %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 1 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.end %i.021 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc10, %for.end ] %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp318 = icmp sgt i32 %1, 0 br i1 %cmp318, label %for.body4, label %for.end for.body4: ; preds = %for.cond1.preheader, %for.body4 %j.019 = phi i32 [ %inc, %for.body4 ], [ 0, %for.cond1.preheader ] %add = add nuw i32 %j.019, %i.021 %rem6 = and i32 %add, 1 %idxprom = zext i32 %rem6 to i64 %arrayidx7 = getelementptr inbounds [2 x i8], ptr @__const.printChess.sym, i64 0, i64 %idxprom %2 = load i8, ptr %arrayidx7, align 1, !tbaa !9 %conv = sext i8 %2 to i32 %3 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i = tail call noundef i32 @putc(i32 noundef %conv, ptr noundef %3) %inc = add nuw nsw i32 %j.019, 1 %4 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %4 br i1 %cmp3, label %for.body4, label %for.end, !llvm.loop !12 for.end: ; preds = %for.body4, %for.cond1.preheader %5 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i17 = tail call noundef i32 @putc(i32 noundef 10, ptr noundef %5) %inc10 = add nuw nsw i32 %i.021, 1 %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp slt i32 %inc10, %6 br i1 %cmp, label %for.cond1.preheader, label %for.end11, !llvm.loop !14 for.end11: ; preds = %for.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h.i = alloca i32, align 4 %w.i = alloca i32, align 4 %data = alloca [100 x [2 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %data) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h.i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w.i) #3 %call.i13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h.i, ptr noundef nonnull %w.i) %0 = load i32, ptr %h.i, align 4, !tbaa !5 %cmp.i14 = icmp eq i32 %0, 0 %1 = load i32, ptr %w.i, align 4 %cmp1.i15 = icmp eq i32 %1, 0 %or.cond.i16 = select i1 %cmp.i14, i1 %cmp1.i15, i1 false br i1 %or.cond.i16, label %for.cond.critedge.thread, label %if.end.i for.cond.critedge.thread: ; preds = %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w.i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h.i) #3 br label %for.end if.end.i: ; preds = %entry, %if.end.i %indvars.iv22 = phi i64 [ %indvars.iv.next23, %if.end.i ], [ 0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %if.end.i ], [ 1, %entry ] %2 = phi i32 [ %5, %if.end.i ], [ %1, %entry ] %3 = phi i32 [ %4, %if.end.i ], [ %0, %entry ] %indvars.iv.next23 = add nuw nsw i64 %indvars.iv22, 1 %arrayidx = getelementptr inbounds [100 x [2 x i32]], ptr %data, i64 0, i64 %indvars.iv22 store i32 %3, ptr %arrayidx, align 8, !tbaa !5 %arrayidx2.i = getelementptr inbounds i32, ptr %arrayidx, i64 1 store i32 %2, ptr %arrayidx2.i, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w.i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h.i) #3 %indvars.iv.next = add nuw i64 %indvars.iv, 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h.i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w.i) #3 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h.i, ptr noundef nonnull %w.i) %4 = load i32, ptr %h.i, align 4, !tbaa !5 %cmp.i = icmp eq i32 %4, 0 %5 = load i32, ptr %w.i, align 4 %cmp1.i = icmp eq i32 %5, 0 %or.cond.i = select i1 %cmp.i, i1 %cmp1.i, i1 false br i1 %or.cond.i, label %for.cond.critedge, label %if.end.i, !llvm.loop !15 for.cond.critedge: ; preds = %if.end.i call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w.i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h.i) #3 %6 = and i64 %indvars.iv, 4294967295 %cmp119.not = icmp eq i64 %6, 0 br i1 %cmp119.not, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %for.cond.critedge %wide.trip.count = and i64 %indvars.iv, 4294967295 br label %for.body for.body: ; preds = %for.body.preheader, %printChess.exit %indvars.iv29 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next30, %printChess.exit ] %arrayidx3 = getelementptr inbounds [100 x [2 x i32]], ptr %data, i64 0, i64 %indvars.iv29 %7 = load i32, ptr %arrayidx3, align 8, !tbaa !5 %cmp20.i = icmp sgt i32 %7, 0 br i1 %cmp20.i, label %for.cond1.preheader.lr.ph.i, label %printChess.exit for.cond1.preheader.lr.ph.i: ; preds = %for.body %arrayidx2.i10 = getelementptr inbounds i32, ptr %arrayidx3, i64 1 %8 = load i32, ptr %arrayidx2.i10, align 4, !tbaa !5 %cmp318.i = icmp sgt i32 %8, 0 br i1 %cmp318.i, label %for.cond1.preheader.i.us, label %for.cond1.preheader.i for.cond1.preheader.i.us: ; preds = %for.cond1.preheader.lr.ph.i, %for.end.i.loopexit.us %i.021.i.us = phi i32 [ %inc10.i.us, %for.end.i.loopexit.us ], [ 0, %for.cond1.preheader.lr.ph.i ] br label %for.body4.i.us for.body4.i.us: ; preds = %for.cond1.preheader.i.us, %for.body4.i.us %j.019.i.us = phi i32 [ %inc.i.us, %for.body4.i.us ], [ 0, %for.cond1.preheader.i.us ] %add.i.us = add nuw i32 %j.019.i.us, %i.021.i.us %rem6.i.us = and i32 %add.i.us, 1 %idxprom.i.us = zext i32 %rem6.i.us to i64 %arrayidx7.i.us = getelementptr inbounds [2 x i8], ptr @__const.printChess.sym, i64 0, i64 %idxprom.i.us %9 = load i8, ptr %arrayidx7.i.us, align 1, !tbaa !9 %conv.i.us = sext i8 %9 to i32 %10 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i.i.us = call noundef i32 @putc(i32 noundef %conv.i.us, ptr noundef %10) %inc.i.us = add nuw nsw i32 %j.019.i.us, 1 %exitcond27.not = icmp eq i32 %inc.i.us, %8 br i1 %exitcond27.not, label %for.end.i.loopexit.us, label %for.body4.i.us, !llvm.loop !12 for.end.i.loopexit.us: ; preds = %for.body4.i.us %11 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i17.i.us = call noundef i32 @putc(i32 noundef 10, ptr noundef %11) %inc10.i.us = add nuw nsw i32 %i.021.i.us, 1 %exitcond28.not = icmp eq i32 %inc10.i.us, %7 br i1 %exitcond28.not, label %printChess.exit, label %for.cond1.preheader.i.us, !llvm.loop !14 for.cond1.preheader.i: ; preds = %for.cond1.preheader.lr.ph.i, %for.cond1.preheader.i %i.021.i = phi i32 [ %inc10.i, %for.cond1.preheader.i ], [ 0, %for.cond1.preheader.lr.ph.i ] %12 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i17.i = call noundef i32 @putc(i32 noundef 10, ptr noundef %12) %inc10.i = add nuw nsw i32 %i.021.i, 1 %exitcond.not = icmp eq i32 %inc10.i, %7 br i1 %exitcond.not, label %printChess.exit, label %for.cond1.preheader.i, !llvm.loop !14 printChess.exit: ; preds = %for.cond1.preheader.i, %for.end.i.loopexit.us, %for.body %13 = load ptr, ptr @stdout, align 8, !tbaa !10 %call.i12 = call noundef i32 @putc(i32 noundef 10, ptr noundef %13) %indvars.iv.next30 = add nuw nsw i64 %indvars.iv29, 1 %exitcond32.not = icmp eq i64 %indvars.iv.next30, %wide.trip.count br i1 %exitcond32.not, label %for.end, label %for.body, !llvm.loop !16 for.end: ; preds = %printChess.exit, %for.cond.critedge.thread, %for.cond.critedge call void @llvm.lifetime.end.p0(i64 800, ptr nonnull %data) #3 ret i32 0 } ; 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 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !13} !16 = distinct !{!16, !13}
#include <stdio.h> int main(){ int height[300], weight[300]; int i = 0, j = 0, count = 0, l = 0; for(i=1;i<=300;i++){ scanf("%d %d", &height[i], &weight[i]); if(height[i]==0&&weight[i]==0) break; count++; } for(l=1;l<=count;l++){ for(i=1;i<=height[l];i++){ for(j=1;j<=weight[l];j++){ if(i%2==0){ if(j%2==0){ printf("#"); }else{ printf("."); } }else{ if(j%2==0){ printf("."); }else{ printf("#"); } } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217551/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217551/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %height = alloca [300 x i32], align 16 %weight = alloca [300 x i32], align 16 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %height) #4 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %weight) #4 br label %for.body for.body: ; preds = %entry, %if.end %indvars.iv = phi i64 [ 1, %entry ], [ %indvars.iv.next, %if.end ] %count.072 = phi i32 [ 0, %entry ], [ %inc, %if.end ] %arrayidx = getelementptr inbounds [300 x i32], ptr %height, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [300 x i32], ptr %weight, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp5 = icmp eq i32 %0, 0 br i1 %cmp5, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %for.body %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp8 = icmp eq i32 %1, 0 br i1 %cmp8, label %for.end, label %if.end if.end: ; preds = %land.lhs.true, %for.body %inc = add nuw nsw i32 %count.072, 1 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i32 %inc, 300 br i1 %exitcond.not, label %for.cond13.preheader.preheader, label %for.body, !llvm.loop !9 for.end: ; preds = %land.lhs.true %cmp11.not77 = icmp eq i32 %count.072, 0 br i1 %cmp11.not77, label %for.end50, label %for.cond13.preheader.preheader for.cond13.preheader.preheader: ; preds = %if.end, %for.end %count.0.lcssa87 = phi i32 [ %count.072, %for.end ], [ 300, %if.end ] %2 = add nuw nsw i32 %count.0.lcssa87, 1 %wide.trip.count = zext i32 %2 to i64 br label %for.cond13.preheader for.cond13.preheader: ; preds = %for.cond13.preheader.preheader, %for.end46 %indvars.iv81 = phi i64 [ 1, %for.cond13.preheader.preheader ], [ %indvars.iv.next82, %for.end46 ] %arrayidx15 = getelementptr inbounds [300 x i32], ptr %height, i64 0, i64 %indvars.iv81 %3 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %cmp16.not75 = icmp slt i32 %3, 1 br i1 %cmp16.not75, label %for.end46, label %for.cond18.preheader.lr.ph for.cond18.preheader.lr.ph: ; preds = %for.cond13.preheader %arrayidx20 = getelementptr inbounds [300 x i32], ptr %weight, i64 0, i64 %indvars.iv81 br label %for.cond18.preheader for.cond18.preheader: ; preds = %for.cond18.preheader.lr.ph, %for.end42 %i.176 = phi i32 [ 1, %for.cond18.preheader.lr.ph ], [ %inc45, %for.end42 ] %4 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %cmp21.not73 = icmp slt i32 %4, 1 br i1 %cmp21.not73, label %for.end42, label %for.body22.lr.ph for.body22.lr.ph: ; preds = %for.cond18.preheader %rem = and i32 %i.176, 1 %cmp23 = icmp eq i32 %rem, 0 br i1 %cmp23, label %for.body22.us, label %for.body22 for.body22.us: ; preds = %for.body22.lr.ph, %for.body22.us %j.074.us = phi i32 [ %inc41.us, %for.body22.us ], [ 1, %for.body22.lr.ph ] %rem25.us = and i32 %j.074.us, 1 %cmp26.us = icmp eq i32 %rem25.us, 0 %. = select i1 %cmp26.us, i32 35, i32 46 %putchar70.us = call i32 @putchar(i32 %.) %inc41.us = add nuw nsw i32 %j.074.us, 1 %5 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %cmp21.not.us.not = icmp slt i32 %j.074.us, %5 br i1 %cmp21.not.us.not, label %for.body22.us, label %for.end42, !llvm.loop !11 for.body22: ; preds = %for.body22.lr.ph, %for.body22 %j.074 = phi i32 [ %inc41, %for.body22 ], [ 1, %for.body22.lr.ph ] %rem32 = and i32 %j.074, 1 %cmp33 = icmp eq i32 %rem32, 0 %.91 = select i1 %cmp33, i32 46, i32 35 %putchar67 = call i32 @putchar(i32 %.91) %inc41 = add nuw nsw i32 %j.074, 1 %6 = load i32, ptr %arrayidx20, align 4, !tbaa !5 %cmp21.not.not = icmp slt i32 %j.074, %6 br i1 %cmp21.not.not, label %for.body22, label %for.end42, !llvm.loop !11 for.end42: ; preds = %for.body22, %for.body22.us, %for.cond18.preheader %putchar66 = call i32 @putchar(i32 10) %inc45 = add nuw nsw i32 %i.176, 1 %7 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %cmp16.not.not = icmp slt i32 %i.176, %7 br i1 %cmp16.not.not, label %for.cond18.preheader, label %for.end46, !llvm.loop !12 for.end46: ; preds = %for.end42, %for.cond13.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %exitcond84.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count br i1 %exitcond84.not, label %for.end50, label %for.cond13.preheader, !llvm.loop !13 for.end50: ; preds = %for.end46, %for.end call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %weight) #4 call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %height) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main(void) { // 1_5-A Print a Rectangle int h,w; int i,j; scanf("%d %d",&h,&w); while(h!=0 && w!=0){ for(i=0; i<h; i++){ for(j=0; j<w; j++){ if((i+j)%2==0){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); scanf("%d %d",&h,&w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217595/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %cmp26 = icmp ne i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp127 = icmp ne i32 %1, 0 %2 = select i1 %cmp26, i1 %cmp127, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end12 %3 = phi i32 [ %7, %for.end12 ], [ %0, %entry ] %cmp224 = icmp sgt i32 %3, 0 br i1 %cmp224, label %for.cond3.preheader, label %for.end12 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.025 = phi i32 [ %inc11, %for.end ], [ 0, %for.cond.preheader ] %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp422 = icmp sgt i32 %4, 0 br i1 %cmp422, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.023 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %add = add nuw nsw i32 %j.023, %i.025 %rem = and i32 %add, 1 %cmp6 = icmp eq i32 %rem, 0 %. = select i1 %cmp6, i32 35, i32 46 %putchar21 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.023, 1 %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %5 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar19 = call i32 @putchar(i32 10) %inc11 = add nuw nsw i32 %i.025, 1 %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc11, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.end12, !llvm.loop !11 for.end12: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %7 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp ne i32 %7, 0 %8 = load i32, ptr %w, 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.end12, %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> void printRectangle(int H, int W){ int i,j; int check_cnt = 0; int line_cnt = 0; for(i=0; i<H; i++){ check_cnt = line_cnt; for(j=0; j<W; j++){ if(check_cnt %2 == 0) printf("#"); else printf("."); check_cnt++; } printf("\n"); line_cnt++; } printf("\n"); } int main(void){ int h,w; while(1){ scanf("%d %d", &h, &w); if(h==0 && w==0) break; printRectangle(h, w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217645/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217645/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.3 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @printRectangle(i32 noundef %H, i32 noundef %W) local_unnamed_addr #0 { entry: %cmp23 = icmp sgt i32 %H, 0 br i1 %cmp23, label %for.cond1.preheader.lr.ph, label %for.end11 for.cond1.preheader.lr.ph: ; preds = %entry %cmp220 = icmp sgt i32 %W, 0 br i1 %cmp220, label %for.cond1.preheader.us, label %for.cond1.preheader for.cond1.preheader.us: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.for.end_crit_edge.us %indvars.iv = phi i32 [ %indvars.iv.next, %for.cond1.for.end_crit_edge.us ], [ %W, %for.cond1.preheader.lr.ph ] %line_cnt.025.us = phi i32 [ %inc8.us, %for.cond1.for.end_crit_edge.us ], [ 0, %for.cond1.preheader.lr.ph ] br label %for.body3.us for.body3.us: ; preds = %for.cond1.preheader.us, %for.body3.us %check_cnt.022.us = phi i32 [ %line_cnt.025.us, %for.cond1.preheader.us ], [ %inc.us, %for.body3.us ] %rem.us = and i32 %check_cnt.022.us, 1 %cmp4.us = icmp eq i32 %rem.us, 0 %. = select i1 %cmp4.us, i32 35, i32 46 %putchar19.us = tail call i32 @putchar(i32 %.) %inc.us = add nuw i32 %check_cnt.022.us, 1 %exitcond27.not = icmp eq i32 %inc.us, %indvars.iv br i1 %exitcond27.not, label %for.cond1.for.end_crit_edge.us, label %for.body3.us, !llvm.loop !5 for.cond1.for.end_crit_edge.us: ; preds = %for.body3.us %putchar17.us = tail call i32 @putchar(i32 10) %inc8.us = add nuw nsw i32 %line_cnt.025.us, 1 %indvars.iv.next = add i32 %indvars.iv, 1 %exitcond28.not = icmp eq i32 %inc8.us, %H br i1 %exitcond28.not, label %for.end11, label %for.cond1.preheader.us, !llvm.loop !7 for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.preheader %i.024 = phi i32 [ %inc10, %for.cond1.preheader ], [ 0, %for.cond1.preheader.lr.ph ] %putchar17 = tail call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %i.024, 1 %exitcond.not = icmp eq i32 %inc10, %H br i1 %exitcond.not, label %for.end11, label %for.cond1.preheader, !llvm.loop !7 for.end11: ; preds = %for.cond1.preheader, %for.cond1.for.end_crit_edge.us, %entry %putchar = tail call i32 @putchar(i32 10) 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 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 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !8 %cmp4 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp15 = icmp eq i32 %1, 0 %or.cond6 = select i1 %cmp4, i1 %cmp15, i1 false br i1 %or.cond6, label %while.end, label %if.end if.end: ; preds = %entry, %printRectangle.exit %2 = phi i32 [ %5, %printRectangle.exit ], [ %1, %entry ] %3 = phi i32 [ %4, %printRectangle.exit ], [ %0, %entry ] %cmp23.i = icmp sgt i32 %3, 0 br i1 %cmp23.i, label %for.cond1.preheader.lr.ph.i, label %printRectangle.exit for.cond1.preheader.lr.ph.i: ; preds = %if.end %cmp220.i = icmp sgt i32 %2, 0 br i1 %cmp220.i, label %for.cond1.preheader.us.i, label %for.cond1.preheader.i for.cond1.preheader.us.i: ; preds = %for.cond1.preheader.lr.ph.i, %for.cond1.for.end_crit_edge.us.i %indvars.iv.i = phi i32 [ %indvars.iv.next.i, %for.cond1.for.end_crit_edge.us.i ], [ %2, %for.cond1.preheader.lr.ph.i ] %line_cnt.025.us.i = phi i32 [ %inc8.us.i, %for.cond1.for.end_crit_edge.us.i ], [ 0, %for.cond1.preheader.lr.ph.i ] br label %for.body3.us.i for.body3.us.i: ; preds = %for.body3.us.i, %for.cond1.preheader.us.i %check_cnt.022.us.i = phi i32 [ %line_cnt.025.us.i, %for.cond1.preheader.us.i ], [ %inc.us.i, %for.body3.us.i ] %rem.us.i = and i32 %check_cnt.022.us.i, 1 %cmp4.us.i = icmp eq i32 %rem.us.i, 0 %..i = select i1 %cmp4.us.i, i32 35, i32 46 %putchar19.us.i = call i32 @putchar(i32 %..i) %inc.us.i = add nuw i32 %check_cnt.022.us.i, 1 %exitcond27.not.i = icmp eq i32 %inc.us.i, %indvars.iv.i br i1 %exitcond27.not.i, label %for.cond1.for.end_crit_edge.us.i, label %for.body3.us.i, !llvm.loop !5 for.cond1.for.end_crit_edge.us.i: ; preds = %for.body3.us.i %putchar17.us.i = call i32 @putchar(i32 10) %inc8.us.i = add nuw nsw i32 %line_cnt.025.us.i, 1 %indvars.iv.next.i = add i32 %indvars.iv.i, 1 %exitcond28.not.i = icmp eq i32 %inc8.us.i, %3 br i1 %exitcond28.not.i, label %printRectangle.exit, label %for.cond1.preheader.us.i, !llvm.loop !7 for.cond1.preheader.i: ; preds = %for.cond1.preheader.lr.ph.i, %for.cond1.preheader.i %i.024.i = phi i32 [ %inc10.i, %for.cond1.preheader.i ], [ 0, %for.cond1.preheader.lr.ph.i ] %putchar17.i = call i32 @putchar(i32 10) %inc10.i = add nuw nsw i32 %i.024.i, 1 %exitcond.not.i = icmp eq i32 %inc10.i, %3 br i1 %exitcond.not.i, label %printRectangle.exit, label %for.cond1.preheader.i, !llvm.loop !7 printRectangle.exit: ; preds = %for.cond1.preheader.i, %for.cond1.for.end_crit_edge.us.i, %if.end %putchar.i = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %h, ptr noundef nonnull %w) %4 = load i32, ptr %h, align 4, !tbaa !8 %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 %if.end while.end: ; preds = %printRectangle.exit, %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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = !{!9, !9, i64 0} !9 = !{!"int", !10, i64 0} !10 = !{!"omnipotent char", !11, i64 0} !11 = !{!"Simple C/C++ TBAA"}
#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++){ if(i%2==0){ for(j=0;j<W;j++){ if(j%2==0){ printf("#"); }else{ printf("."); }} }else{ for(j=0;j<W;j++){ if(j%2==1){ printf("#"); }else{ printf("."); }} } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217689/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217689/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call61 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %1 = load i32, ptr %W, align 4, !tbaa !5 %2 = or i32 %1, %0 %and4862 = icmp eq i32 %2, 0 br i1 %and4862, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end39 %3 = phi i32 [ %8, %for.end39 ], [ %0, %entry ] %cmp359 = icmp sgt i32 %3, 0 br i1 %cmp359, label %for.body, label %for.end39 for.body: ; preds = %for.cond.preheader, %if.end35 %i.060 = phi i32 [ %inc38, %if.end35 ], [ 0, %for.cond.preheader ] %rem = and i32 %i.060, 1 %cmp5 = icmp eq i32 %rem, 0 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp957 = icmp sgt i32 %4, 0 br i1 %cmp5, label %for.cond8.preheader, label %for.cond20.preheader for.cond20.preheader: ; preds = %for.body br i1 %cmp957, label %for.body23, label %if.end35 for.cond8.preheader: ; preds = %for.body br i1 %cmp957, label %for.body11, label %if.end35 for.body11: ; preds = %for.cond8.preheader, %for.body11 %j.058 = phi i32 [ %inc, %for.body11 ], [ 0, %for.cond8.preheader ] %rem12 = and i32 %j.058, 1 %cmp13 = icmp eq i32 %rem12, 0 %. = select i1 %cmp13, i32 35, i32 46 %putchar53 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.058, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp9 = icmp slt i32 %inc, %5 br i1 %cmp9, label %for.body11, label %if.end35, !llvm.loop !9 for.body23: ; preds = %for.cond20.preheader, %for.body23 %j.156 = phi i32 [ %inc33, %for.body23 ], [ 0, %for.cond20.preheader ] %rem24 = and i32 %j.156, 1 %cmp25.not = icmp eq i32 %rem24, 0 %.66 = select i1 %cmp25.not, i32 46, i32 35 %putchar50 = call i32 @putchar(i32 %.66) %inc33 = add nuw nsw i32 %j.156, 1 %6 = load i32, ptr %W, align 4, !tbaa !5 %cmp21 = icmp slt i32 %inc33, %6 br i1 %cmp21, label %for.body23, label %if.end35, !llvm.loop !11 if.end35: ; preds = %for.body23, %for.body11, %for.cond20.preheader, %for.cond8.preheader %putchar51 = call i32 @putchar(i32 10) %inc38 = add nuw nsw i32 %i.060, 1 %7 = load i32, ptr %H, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc38, %7 br i1 %cmp3, label %for.body, label %for.end39, !llvm.loop !12 for.end39: ; preds = %if.end35, %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) %8 = load i32, ptr %H, align 4, !tbaa !5 %9 = load i32, ptr %W, align 4, !tbaa !5 %10 = or i32 %9, %8 %and48 = icmp eq i32 %10, 0 br i1 %and48, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end39, %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> #include <time.h> #include <stdlib.h> int main() { long long int n,k,i,j,count; long long int* arr=(long long int*)malloc(sizeof(long long int )*10000000); scanf("%I64d %I64d",&n,&k); j=1; for(i=1;i*i<=n;i++) { if(n%i==0) { arr[j]=i; j++; } } i--; j--; if(i*i==n) count=j*2-1; else count=j*2; if(count>=k) { if(k>count/2) { printf("%I64d\n",n/arr[count-k+1]); } else printf("%I64d\n",arr[k]); } else printf("-1\n"); free(arr); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21784/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21784/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [7 x i8] c"%I64d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #6 %call = tail call noalias dereferenceable_or_null(80000000) ptr @malloc(i64 noundef 80000000) #7 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i64, ptr %n, align 8, !tbaa !5 %cmp.not43 = icmp slt i64 %0, 1 br i1 %cmp.not43, label %for.end, label %for.body for.body: ; preds = %entry, %for.inc %i.045 = phi i64 [ %inc3, %for.inc ], [ 1, %entry ] %j.044 = phi i64 [ %j.1, %for.inc ], [ 1, %entry ] %rem = srem i64 %0, %i.045 %cmp2 = icmp eq i64 %rem, 0 br i1 %cmp2, label %if.then, label %for.inc if.then: ; preds = %for.body %arrayidx = getelementptr inbounds i64, ptr %call, i64 %j.044 store i64 %i.045, ptr %arrayidx, align 8, !tbaa !5 %inc = add nsw i64 %j.044, 1 br label %for.inc for.inc: ; preds = %for.body, %if.then %j.1 = phi i64 [ %inc, %if.then ], [ %j.044, %for.body ] %inc3 = add nuw nsw i64 %i.045, 1 %mul = mul nsw i64 %inc3, %inc3 %cmp.not = icmp sgt i64 %mul, %0 br i1 %cmp.not, label %for.end.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit: ; preds = %for.inc %1 = shl i64 %j.1, 1 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %j.0.lcssa = phi i64 [ 2, %entry ], [ %1, %for.end.loopexit ] %i.0.lcssa = phi i64 [ 0, %entry ], [ %i.045, %for.end.loopexit ] %mul5 = mul nsw i64 %i.0.lcssa, %i.0.lcssa %cmp6 = icmp eq i64 %mul5, %0 %count.0.v = select i1 %cmp6, i64 -3, i64 -2 %count.0 = add i64 %count.0.v, %j.0.lcssa %2 = load i64, ptr %k, align 8, !tbaa !5 %cmp11.not = icmp slt i64 %count.0, %2 br i1 %cmp11.not, label %if.else23, label %if.then12 if.then12: ; preds = %for.end %div = sdiv i64 %count.0, 2 %cmp13 = icmp sgt i64 %2, %div br i1 %cmp13, label %if.then14, label %if.else19 if.then14: ; preds = %if.then12 %sub15 = sub nsw i64 %count.0, %2 %3 = getelementptr i64, ptr %call, i64 %sub15 %arrayidx16 = getelementptr i64, ptr %3, i64 1 %4 = load i64, ptr %arrayidx16, align 8, !tbaa !5 %div17 = sdiv i64 %0, %4 %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div17) br label %if.end25 if.else19: ; preds = %if.then12 %arrayidx20 = getelementptr inbounds i64, ptr %call, i64 %2 %5 = load i64, ptr %arrayidx20, align 8, !tbaa !5 %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %5) br label %if.end25 if.else23: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end25 if.end25: ; preds = %if.then14, %if.else19, %if.else23 call void @free(ptr noundef %call) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-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 nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } attributes #7 = { 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 = !{!"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> int main(void){//float?????????double??? int i,j,h,w,a; a=1; while(a==1){ scanf("%d %d",&h,&w); if(h==0&&w==0){ break; } for(i=1;i<=h;i++){ for(j=1;j<=w;j++){ if((j+i)%2==1) printf("."); else printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217890/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217890/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call28 = 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 %cmp129 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp230 = icmp eq i32 %1, 0 %or.cond31 = select i1 %cmp129, i1 %cmp230, i1 false br i1 %or.cond31, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end15 %2 = phi i32 [ %6, %for.end15 ], [ %0, %entry ] %cmp3.not26 = icmp slt i32 %2, 1 br i1 %cmp3.not26, label %for.end15, label %for.cond4.preheader for.cond4.preheader: ; preds = %for.cond.preheader, %for.end %i.027 = phi i32 [ %inc14, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp5.not24 = icmp slt i32 %3, 1 br i1 %cmp5.not24, label %for.end, label %for.body6 for.body6: ; preds = %for.cond4.preheader, %for.body6 %j.025 = phi i32 [ %inc, %for.body6 ], [ 1, %for.cond4.preheader ] %add = add nuw nsw i32 %j.025, %i.027 %rem = and i32 %add, 1 %cmp7.not = icmp eq i32 %rem, 0 %. = select i1 %cmp7.not, i32 35, i32 46 %putchar23 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.025, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp5.not.not = icmp slt i32 %j.025, %4 br i1 %cmp5.not.not, label %for.body6, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body6, %for.cond4.preheader %putchar21 = call i32 @putchar(i32 10) %inc14 = add nuw nsw i32 %i.027, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %i.027, %5 br i1 %cmp3.not.not, label %for.cond4.preheader, label %for.end15, !llvm.loop !11 for.end15: ; 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 %cmp1 = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp2 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp1, i1 %cmp2, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader, !llvm.loop !12 while.end: ; preds = %for.end15, %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(void) { int h, w, H, W; while (1) { scanf("%d %d", &H, &W); for (h = 1; h <= H; h++) { if (h % 2 != 0) { for (w = 1; w <= (W); w++) { if (w % 2 != 0) { printf("#"); } else { printf("."); } } } else { for (w = 1; w <= (W); w++) { if (w % 2 != 0) { printf("."); } else { printf("#"); } } } printf("\n"); } if (H == 0 && W == 0) break; printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_217984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_217984/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 br label %while.cond while.cond: ; preds = %if.end32, %entry %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 %cmp.not51 = icmp slt i32 %0, 1 br i1 %cmp.not51, label %for.end28, label %for.body for.body: ; preds = %while.cond, %if.end24 %h.052 = phi i32 [ %inc27, %if.end24 ], [ 1, %while.cond ] %rem = and i32 %h.052, 1 %cmp1.not = icmp eq i32 %rem, 0 %1 = load i32, ptr %W, align 4, !tbaa !5 %cmp12.not49 = icmp slt i32 %1, 1 br i1 %cmp1.not, label %for.cond11.preheader, label %for.cond2.preheader for.cond2.preheader: ; preds = %for.body br i1 %cmp12.not49, label %if.end24, label %for.body4 for.cond11.preheader: ; preds = %for.body br i1 %cmp12.not49, label %if.end24, label %for.body13 for.body4: ; preds = %for.cond2.preheader, %for.body4 %w.048 = phi i32 [ %inc, %for.body4 ], [ 1, %for.cond2.preheader ] %rem5 = and i32 %w.048, 1 %cmp6.not = icmp eq i32 %rem5, 0 %. = select i1 %cmp6.not, i32 46, i32 35 %putchar45 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %w.048, 1 %2 = load i32, ptr %W, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %w.048, %2 br i1 %cmp3.not.not, label %for.body4, label %if.end24, !llvm.loop !9 for.body13: ; preds = %for.cond11.preheader, %for.body13 %w.150 = phi i32 [ %inc22, %for.body13 ], [ 1, %for.cond11.preheader ] %rem14 = and i32 %w.150, 1 %cmp15.not = icmp eq i32 %rem14, 0 %.58 = select i1 %cmp15.not, i32 35, i32 46 %putchar42 = call i32 @putchar(i32 %.58) %inc22 = add nuw nsw i32 %w.150, 1 %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp12.not.not = icmp slt i32 %w.150, %3 br i1 %cmp12.not.not, label %for.body13, label %if.end24, !llvm.loop !11 if.end24: ; preds = %for.body4, %for.body13, %for.cond2.preheader, %for.cond11.preheader %putchar43 = call i32 @putchar(i32 10) %inc27 = add nuw nsw i32 %h.052, 1 %4 = load i32, ptr %H, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %h.052, %4 br i1 %cmp.not.not, label %for.body, label %for.end28, !llvm.loop !12 for.end28: ; preds = %if.end24, %while.cond %.lcssa = phi i32 [ %0, %while.cond ], [ %4, %if.end24 ] %cmp29 = icmp eq i32 %.lcssa, 0 %5 = load i32, ptr %W, align 4 %cmp30 = icmp eq i32 %5, 0 %or.cond = select i1 %cmp29, i1 %cmp30, i1 false br i1 %or.cond, label %while.end, label %if.end32 if.end32: ; preds = %for.end28 %putchar = call i32 @putchar(i32 10) br label %while.cond while.end: ; preds = %for.end28 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(void) { int i,j,H,W; while(scanf("%d %d",&H,&W)!=EOF) { if(H==0&&W==0) { break; } for ( i = 0; i < H; i++ ) { for ( j = 0; j < W; j++ ) { if((j%2==1&&i%2==1)||(j%2==0&&i%2==0)) { printf("#"); } else if((j%2==1&&i%2==0)||(j%2==0&&i%2==1)) { printf("."); } } printf("\n"); } printf("\n"); } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218026/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218026/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call62 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %cmp.not63 = icmp eq i32 %call62, -1 br i1 %cmp.not63, label %while.end, label %while.body while.body: ; preds = %entry, %for.end36 %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp1 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp2 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp1, i1 %cmp2, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %while.body %cmp360 = icmp sgt i32 %0, 0 br i1 %cmp360, label %for.cond4.preheader, label %for.end36 for.cond4.preheader: ; preds = %for.cond.preheader, %for.end %i.061 = phi i32 [ %inc35, %for.end ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %W, align 4, !tbaa !5 %cmp558 = icmp sgt i32 %2, 0 br i1 %cmp558, label %for.body6.lr.ph, label %for.end for.body6.lr.ph: ; preds = %for.cond4.preheader %3 = and i32 %i.061, 1 %cmp10.not = icmp eq i32 %3, 0 br label %for.body6 for.body6: ; preds = %for.body6.lr.ph, %for.inc %j.059 = phi i32 [ 0, %for.body6.lr.ph ], [ %inc, %for.inc ] %4 = and i32 %3, %j.059 %or.cond51.not57 = icmp ne i32 %4, 0 %5 = or i32 %j.059, %i.061 %6 = and i32 %5, 1 %or.cond52 = icmp eq i32 %6, 0 %or.cond55 = or i1 %or.cond51.not57, %or.cond52 br i1 %or.cond55, label %for.inc.sink.split, label %if.else if.else: ; preds = %for.body6 %rem = and i32 %j.059, 1 %cmp7.not = icmp ne i32 %rem, 0 %or.cond56 = xor i1 %cmp10.not, %cmp7.not br i1 %or.cond56, label %for.inc, label %for.inc.sink.split for.inc.sink.split: ; preds = %if.else, %for.body6 %.sink = phi i32 [ 35, %for.body6 ], [ 46, %if.else ] %putchar50 = call i32 @putchar(i32 %.sink) br label %for.inc for.inc: ; preds = %for.inc.sink.split, %if.else %inc = add nuw nsw i32 %j.059, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %7 br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc, %for.cond4.preheader %putchar48 = call i32 @putchar(i32 10) %inc35 = add nuw nsw i32 %i.061, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc35, %8 br i1 %cmp3, label %for.cond4.preheader, label %for.end36, !llvm.loop !11 for.end36: ; 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) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %for.end36, %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main() { int n; scanf("%d",&n); int a[101]={0}; int i=0; int diff=0; int old=0; for(i=0;i<n;i++) { scanf("%d",&a[i]); } diff = a[1]-a[0]; int flag=0; for(i=2;i<n;i++) { old = diff; diff = a[i]-a[i-1]; if(old!=diff){flag=1;break;} } if(flag==0)printf("%d\n",a[n-1]+diff); else printf("%d\n",a[n-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21807/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21807/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [101 x i32], 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 404, ptr nonnull %a) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %a, i8 0, i64 404, i1 false) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp38 = icmp sgt i32 %0, 0 br i1 %cmp38, label %for.body, label %if.then18 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body %arrayidx2.phi.trans.insert = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 1 %.pre = load i32, ptr %arrayidx2.phi.trans.insert, align 4, !tbaa !5 %.pre51 = load i32, ptr %a, align 16, !tbaa !5 %sub = sub nsw i32 %.pre, %.pre51 %cmp5.not40 = icmp sgt i32 %1, 2 br i1 %cmp5.not40, label %for.body6.preheader, label %if.then18 for.body6.preheader: ; preds = %for.end %wide.trip.count = zext i32 %1 to i64 br label %for.body6 for.cond4: ; preds = %for.body6 %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1 %exitcond.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count br i1 %exitcond.not, label %if.then18, label %for.body6, !llvm.loop !11 for.body6: ; preds = %for.body6.preheader, %for.cond4 %3 = phi i32 [ %.pre, %for.body6.preheader ], [ %4, %for.cond4 ] %indvars.iv47 = phi i64 [ 2, %for.body6.preheader ], [ %indvars.iv.next48, %for.cond4 ] %arrayidx8 = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %indvars.iv47 %4 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %sub12 = sub nsw i32 %4, %3 %cmp13.not = icmp eq i32 %sub, %sub12 br i1 %cmp13.not, label %for.cond4, label %if.else if.then18: ; preds = %for.cond4, %entry, %for.end %sub58 = phi i32 [ %sub, %for.end ], [ 0, %entry ], [ %sub, %for.cond4 ] %.lcssa57 = phi i32 [ %1, %for.end ], [ %0, %entry ], [ %1, %for.cond4 ] %sub19 = add nsw i32 %.lcssa57, -1 %idxprom20 = sext i32 %sub19 to i64 %arrayidx21 = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %idxprom20 %5 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %add = add nsw i32 %5, %sub58 br label %if.end27 if.else: ; preds = %for.body6 %sub23 = add nsw i32 %1, -1 %idxprom24 = sext i32 %sub23 to i64 %arrayidx25 = getelementptr inbounds [101 x i32], ptr %a, i64 0, i64 %idxprom24 %6 = load i32, ptr %arrayidx25, align 4, !tbaa !5 br label %if.end27 if.end27: ; preds = %if.else, %if.then18 %.sink = phi i32 [ %6, %if.else ], [ %add, %if.then18 ] %call26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.sink) call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree 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: 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}
#include<stdio.h> int main() { int n,flag=1,as=0,t,oddt; scanf("%d%d%d",&n,&oddt,&t); as=t-oddt; oddt=t; while (n-->2) { scanf("%d",&t); if (flag==1) if (t-oddt!=as) flag=0; else oddt=t; } if (flag==1) printf("%d\n",oddt+as); else printf("%d\n",t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @.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 %t = alloca i32, align 4 %oddt = 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 %t) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %oddt) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %oddt, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %1 = load i32, ptr %oddt, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 store i32 %0, ptr %oddt, align 4, !tbaa !5 %2 = load i32, ptr %n, align 4, !tbaa !5 %dec15 = add nsw i32 %2, -1 store i32 %dec15, ptr %n, align 4, !tbaa !5 %cmp16 = icmp sgt i32 %2, 2 br i1 %cmp16, label %while.body, label %if.then8 while.body: ; preds = %entry, %if.end6 %flag.017 = phi i32 [ %flag.1, %if.end6 ], [ 1, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t) %cmp2 = icmp eq i32 %flag.017, 1 br i1 %cmp2, label %if.then, label %if.end6 if.then: ; preds = %while.body %3 = load i32, ptr %t, align 4, !tbaa !5 %4 = load i32, ptr %oddt, align 4, !tbaa !5 %sub3 = sub nsw i32 %3, %4 %cmp4.not = icmp eq i32 %sub3, %sub br i1 %cmp4.not, label %if.else, label %if.end6 if.else: ; preds = %if.then store i32 %3, ptr %oddt, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then, %if.else, %while.body %5 = phi i1 [ true, %if.else ], [ false, %while.body ], [ false, %if.then ] %flag.1 = phi i32 [ 1, %if.else ], [ 0, %while.body ], [ 0, %if.then ] %6 = load i32, ptr %n, align 4, !tbaa !5 %dec = add nsw i32 %6, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 %cmp = icmp sgt i32 %6, 2 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %if.end6 br i1 %5, label %if.then8, label %if.else10 if.then8: ; preds = %entry, %while.end %7 = load i32, ptr %oddt, align 4, !tbaa !5 %add = add nsw i32 %7, %sub br label %if.end12 if.else10: ; preds = %while.end %8 = load i32, ptr %t, align 4, !tbaa !5 br label %if.end12 if.end12: ; preds = %if.else10, %if.then8 %.sink = phi i32 [ %8, %if.else10 ], [ %add, %if.then8 ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %oddt) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void) { int a, b, c, w, h; for (c = 1;;) { scanf("%d %d", &a, &b); if (a == 0 && b == 0) break; for (h = 1;h <= a;h++) if (h % 2 == 0) { for (w = 1;w <= b;w++) { if (w % 2 == 0) printf("#"); else printf("."); } printf("\n"); } else { for (w = 1;w <= b;w++) { if (w % 2==0) printf("."); else printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call56 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp57 = icmp eq i32 %0, 0 %1 = load i32, ptr %b, align 4 %cmp158 = icmp eq i32 %1, 0 %or.cond59 = select i1 %cmp57, i1 %cmp158, i1 false br i1 %or.cond59, label %for.end36, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %for.end34 %2 = phi i32 [ %7, %for.end34 ], [ %0, %entry ] %cmp3.not54 = icmp slt i32 %2, 1 br i1 %cmp3.not54, label %for.end34, label %for.body for.body: ; preds = %for.cond2.preheader, %for.inc32 %h.055 = phi i32 [ %inc33, %for.inc32 ], [ 1, %for.cond2.preheader ] %rem = and i32 %h.055, 1 %cmp4 = icmp eq i32 %rem, 0 %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp7.not52 = icmp slt i32 %3, 1 br i1 %cmp4, label %for.cond6.preheader, label %for.cond17.preheader for.cond17.preheader: ; preds = %for.body br i1 %cmp7.not52, label %for.inc32, label %for.body19 for.cond6.preheader: ; preds = %for.body br i1 %cmp7.not52, label %for.inc32, label %for.body8 for.body8: ; preds = %for.cond6.preheader, %for.body8 %w.053 = phi i32 [ %inc, %for.body8 ], [ 1, %for.cond6.preheader ] %rem9 = and i32 %w.053, 1 %cmp10 = icmp eq i32 %rem9, 0 %. = select i1 %cmp10, i32 35, i32 46 %putchar49 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %w.053, 1 %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp7.not.not = icmp slt i32 %w.053, %4 br i1 %cmp7.not.not, label %for.body8, label %for.inc32, !llvm.loop !9 for.body19: ; preds = %for.cond17.preheader, %for.body19 %w.151 = phi i32 [ %inc28, %for.body19 ], [ 1, %for.cond17.preheader ] %rem20 = and i32 %w.151, 1 %cmp21 = icmp eq i32 %rem20, 0 %.61 = select i1 %cmp21, i32 46, i32 35 %putchar46 = call i32 @putchar(i32 %.61) %inc28 = add nuw nsw i32 %w.151, 1 %5 = load i32, ptr %b, align 4, !tbaa !5 %cmp18.not.not = icmp slt i32 %w.151, %5 br i1 %cmp18.not.not, label %for.body19, label %for.inc32, !llvm.loop !11 for.inc32: ; preds = %for.body19, %for.body8, %for.cond17.preheader, %for.cond6.preheader %putchar47 = call i32 @putchar(i32 10) %inc33 = add nuw nsw i32 %h.055, 1 %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %h.055, %6 br i1 %cmp3.not.not, label %for.body, label %for.end34, !llvm.loop !12 for.end34: ; preds = %for.inc32, %for.cond2.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %7 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %b, align 4 %cmp1 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end36, label %for.cond2.preheader for.end36: ; preds = %for.end34, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main(void){ int H,W,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++){ if(j%2==1){ if(i%2==1){ printf("#"); }else{ printf("."); } }else{ if(i%2==1){ printf("."); }else{ printf("#"); } } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218220/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218220/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call54 = 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 %cmp55 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp156 = icmp eq i32 %1, 0 %or.cond57 = select i1 %cmp55, i1 %cmp156, i1 false br i1 %or.cond57, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end26 %2 = phi i32 [ %7, %for.end26 ], [ %0, %entry ] %cmp252 = icmp sgt i32 %2, 0 br i1 %cmp252, label %for.cond3.preheader, label %for.end26 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.053 = phi i32 [ %inc25, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp438 = icmp sgt i32 %3, 0 br i1 %cmp438, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %rem8 = and i32 %i.053, 1 %cmp9.not = icmp eq i32 %rem8, 0 br i1 %cmp9.not, label %for.body5.us.us, label %for.body5 for.body5.us.us: ; preds = %for.body5.lr.ph, %for.body5.us.us %j.039.us.us = phi i32 [ %inc.us.us, %for.body5.us.us ], [ 0, %for.body5.lr.ph ] %rem.us.us = and i32 %j.039.us.us, 1 %cmp6.not.us.us = icmp eq i32 %rem.us.us, 0 %. = select i1 %cmp6.not.us.us, i32 35, i32 46 %putchar34.us.us = call i32 @putchar(i32 %.) %inc.us.us = add nuw nsw i32 %j.039.us.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.us.us = icmp slt i32 %inc.us.us, %4 br i1 %cmp4.us.us, label %for.body5.us.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %j.039 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %rem = and i32 %j.039, 1 %cmp6.not = icmp eq i32 %rem, 0 %.63 = select i1 %cmp6.not, i32 46, i32 35 %putchar37 = call i32 @putchar(i32 %.63) %inc = add nuw nsw i32 %j.039, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %5 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us.us, %for.cond3.preheader %putchar33 = call i32 @putchar(i32 10) %inc25 = add nuw nsw i32 %i.053, 1 %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc25, %6 br i1 %cmp2, label %for.cond3.preheader, label %for.end26, !llvm.loop !11 for.end26: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %7 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %8, 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.end26, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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> //prototype int main(void); int main(void){ int i, j; //count variable int height, width; while(1){ scanf("%d", &height); scanf("%d", &width); if(height == 0 && width == 0){ break; //Exit conditions } for (i = 1; i <= height; i++) { if (i % 2 != 0) { //odd row for (j = 1; j <= width; j++) { if(j % 2 != 0){ printf("#");//odd } else { printf(".");//even } } printf("\n"); } else { //even row for (j = 1; j <= width; j++) { if(j % 2 != 0){ printf(".");//odd } else { printf("#");//even } } printf("\n"); } } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218264/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218264/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %height = alloca i32, align 4 %width = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %height) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %width) #4 %call55 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height) %call156 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %width) %0 = load i32, ptr %height, align 4, !tbaa !5 %cmp57 = icmp eq i32 %0, 0 %1 = load i32, ptr %width, align 4 %cmp258 = icmp eq i32 %1, 0 %or.cond59 = select i1 %cmp57, i1 %cmp258, i1 false br i1 %or.cond59, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end34 %2 = phi i32 [ %7, %for.end34 ], [ %0, %entry ] %cmp3.not53 = icmp slt i32 %2, 1 br i1 %cmp3.not53, label %for.end34, label %for.body for.body: ; preds = %for.cond.preheader, %for.inc32 %i.054 = phi i32 [ %inc33, %for.inc32 ], [ 1, %for.cond.preheader ] %rem = and i32 %i.054, 1 %cmp4.not = icmp eq i32 %rem, 0 %3 = load i32, ptr %width, align 4, !tbaa !5 %cmp18.not51 = icmp slt i32 %3, 1 br i1 %cmp4.not, label %for.cond17.preheader, label %for.cond6.preheader for.cond6.preheader: ; preds = %for.body br i1 %cmp18.not51, label %for.inc32, label %for.body8 for.cond17.preheader: ; preds = %for.body br i1 %cmp18.not51, label %for.inc32, label %for.body19 for.body8: ; preds = %for.cond6.preheader, %for.body8 %j.050 = phi i32 [ %inc, %for.body8 ], [ 1, %for.cond6.preheader ] %rem9 = and i32 %j.050, 1 %cmp10.not = icmp eq i32 %rem9, 0 %. = select i1 %cmp10.not, i32 46, i32 35 %putchar48 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.050, 1 %4 = load i32, ptr %width, align 4, !tbaa !5 %cmp7.not.not = icmp slt i32 %j.050, %4 br i1 %cmp7.not.not, label %for.body8, label %for.inc32, !llvm.loop !9 for.body19: ; preds = %for.cond17.preheader, %for.body19 %j.152 = phi i32 [ %inc28, %for.body19 ], [ 1, %for.cond17.preheader ] %rem20 = and i32 %j.152, 1 %cmp21.not = icmp eq i32 %rem20, 0 %.61 = select i1 %cmp21.not, i32 35, i32 46 %putchar45 = call i32 @putchar(i32 %.61) %inc28 = add nuw nsw i32 %j.152, 1 %5 = load i32, ptr %width, align 4, !tbaa !5 %cmp18.not.not = icmp slt i32 %j.152, %5 br i1 %cmp18.not.not, label %for.body19, label %for.inc32, !llvm.loop !11 for.inc32: ; preds = %for.body8, %for.body19, %for.cond17.preheader, %for.cond6.preheader %putchar46 = call i32 @putchar(i32 10) %inc33 = add nuw nsw i32 %i.054, 1 %6 = load i32, ptr %height, align 4, !tbaa !5 %cmp3.not.not = icmp slt i32 %i.054, %6 br i1 %cmp3.not.not, label %for.body, label %for.end34, !llvm.loop !12 for.end34: ; preds = %for.inc32, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %width) %7 = load i32, ptr %height, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %width, align 4 %cmp2 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp2, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end34, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %width) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %height) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main(void){ int w[300], h[300]; int i_count = 0; while (1){ scanf("%d %d", &h[i_count], &w[i_count]); if (h[i_count] == 0 && w[i_count] == 0) break; i_count++; } int i, j,n=i_count; for (i_count = 0; i_count < n; i_count++){ for (i = 0; i < h[i_count]; i++){ for (j = 0; j < w[i_count]; j++){ if ((i+j)%2==0) printf("%c", '#'); else printf("%c", '.'); } putchar('\n'); } putchar('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218314/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218314/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %w = alloca [300 x i32], align 16 %h = alloca [300 x i32], align 16 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %w) #3 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %h) #3 br label %while.cond while.cond: ; preds = %if.end, %entry %indvars.iv60 = phi i32 [ %indvars.iv.next61, %if.end ], [ 0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ] %arrayidx = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 0 br i1 %cmp, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %while.cond %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp7 = icmp eq i32 %1, 0 br i1 %cmp7, label %for.cond.preheader, label %if.end for.cond.preheader: ; preds = %land.lhs.true %2 = and i64 %indvars.iv, 4294967295 %cmp854.not = icmp eq i64 %2, 0 br i1 %cmp854.not, label %for.end32, label %for.cond9.preheader.preheader for.cond9.preheader.preheader: ; preds = %for.cond.preheader %wide.trip.count = zext i32 %indvars.iv60 to i64 br label %for.cond9.preheader if.end: ; preds = %land.lhs.true, %while.cond %indvars.iv.next = add nuw i64 %indvars.iv, 1 %indvars.iv.next61 = add nuw i32 %indvars.iv60, 1 br label %while.cond for.cond9.preheader: ; preds = %for.cond9.preheader.preheader, %for.end28 %indvars.iv57 = phi i64 [ 0, %for.cond9.preheader.preheader ], [ %indvars.iv.next58, %for.end28 ] %arrayidx11 = getelementptr inbounds [300 x i32], ptr %h, i64 0, i64 %indvars.iv57 %3 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp1252 = icmp sgt i32 %3, 0 br i1 %cmp1252, label %for.cond14.preheader.lr.ph, label %for.end28 for.cond14.preheader.lr.ph: ; preds = %for.cond9.preheader %arrayidx16 = getelementptr inbounds [300 x i32], ptr %w, i64 0, i64 %indvars.iv57 br label %for.cond14.preheader for.cond14.preheader: ; preds = %for.cond14.preheader.lr.ph, %for.end %i.053 = phi i32 [ 0, %for.cond14.preheader.lr.ph ], [ %inc27, %for.end ] %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %cmp1750 = icmp sgt i32 %4, 0 br i1 %cmp1750, label %for.body18, label %for.end for.body18: ; preds = %for.cond14.preheader, %for.body18 %j.051 = phi i32 [ %inc24, %for.body18 ], [ 0, %for.cond14.preheader ] %add = add nuw nsw i32 %j.051, %i.053 %rem = and i32 %add, 1 %cmp19 = icmp eq i32 %rem, 0 %5 = load ptr, ptr @stdout, align 8, !tbaa !9 %. = select i1 %cmp19, i32 35, i32 46 %call.i = call noundef i32 @putc(i32 noundef %., ptr noundef %5) %inc24 = add nuw nsw i32 %j.051, 1 %6 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %cmp17 = icmp slt i32 %inc24, %6 br i1 %cmp17, label %for.body18, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body18, %for.cond14.preheader %7 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i48 = call noundef i32 @putc(i32 noundef 10, ptr noundef %7) %inc27 = add nuw nsw i32 %i.053, 1 %8 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc27, %8 br i1 %cmp12, label %for.cond14.preheader, label %for.end28, !llvm.loop !13 for.end28: ; preds = %for.end, %for.cond9.preheader %9 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i49 = call noundef i32 @putc(i32 noundef 10, ptr noundef %9) %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1 %exitcond.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count br i1 %exitcond.not, label %for.end32, label %for.cond9.preheader, !llvm.loop !14 for.end32: ; preds = %for.end28, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %h) #3 call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %w) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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> void printChessboard(int h, int w) { for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { ((i + j) % 2 == 0) ? printf("#") : printf("."); } printf("\n"); } printf("\n"); } int main() { int h, w; while (1) { scanf("%d %d", &h, &w); if(h == 0 && w == 0) break; printChessboard(h, w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218358/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218358/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.3 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @printChessboard(i32 noundef %h, i32 noundef %w) local_unnamed_addr #0 { entry: %cmp21 = icmp sgt i32 %h, 0 br i1 %cmp21, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup for.cond1.preheader.lr.ph: ; preds = %entry %cmp219 = icmp sgt i32 %w, 0 br i1 %cmp219, label %for.cond1.preheader.us, label %for.cond1.preheader for.cond1.preheader.us: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.for.cond.cleanup3_crit_edge.us %i.022.us = phi i32 [ %inc9.us, %for.cond1.for.cond.cleanup3_crit_edge.us ], [ 0, %for.cond1.preheader.lr.ph ] br label %for.body4.us for.body4.us: ; preds = %for.cond1.preheader.us, %for.body4.us %j.020.us = phi i32 [ 0, %for.cond1.preheader.us ], [ %inc.us, %for.body4.us ] %add.us = add nuw nsw i32 %j.020.us, %i.022.us %rem.us = and i32 %add.us, 1 %cmp5.us = icmp eq i32 %rem.us, 0 %. = select i1 %cmp5.us, i32 35, i32 46 %putchar18.us = tail call i32 @putchar(i32 %.) %inc.us = add nuw nsw i32 %j.020.us, 1 %exitcond24.not = icmp eq i32 %inc.us, %w br i1 %exitcond24.not, label %for.cond1.for.cond.cleanup3_crit_edge.us, label %for.body4.us, !llvm.loop !5 for.cond1.for.cond.cleanup3_crit_edge.us: ; preds = %for.body4.us %putchar16.us = tail call i32 @putchar(i32 10) %inc9.us = add nuw nsw i32 %i.022.us, 1 %exitcond25.not = icmp eq i32 %inc9.us, %h br i1 %exitcond25.not, label %for.cond.cleanup, label %for.cond1.preheader.us, !llvm.loop !7 for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.preheader %i.022 = phi i32 [ %inc9, %for.cond1.preheader ], [ 0, %for.cond1.preheader.lr.ph ] %putchar16 = tail call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.022, 1 %exitcond.not = icmp eq i32 %inc9, %h br i1 %exitcond.not, label %for.cond.cleanup, label %for.cond1.preheader, !llvm.loop !7 for.cond.cleanup: ; preds = %for.cond1.preheader, %for.cond1.for.cond.cleanup3_crit_edge.us, %entry %putchar = tail call i32 @putchar(i32 10) 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 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 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !8 %cmp4 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp15 = icmp eq i32 %1, 0 %or.cond6 = select i1 %cmp4, i1 %cmp15, i1 false br i1 %or.cond6, label %while.end, label %if.end if.end: ; preds = %entry, %printChessboard.exit %2 = phi i32 [ %5, %printChessboard.exit ], [ %1, %entry ] %3 = phi i32 [ %4, %printChessboard.exit ], [ %0, %entry ] %cmp21.i = icmp sgt i32 %3, 0 br i1 %cmp21.i, label %for.cond1.preheader.lr.ph.i, label %printChessboard.exit for.cond1.preheader.lr.ph.i: ; preds = %if.end %cmp219.i = icmp sgt i32 %2, 0 br i1 %cmp219.i, label %for.cond1.preheader.us.i, label %for.cond1.preheader.i for.cond1.preheader.us.i: ; preds = %for.cond1.preheader.lr.ph.i, %for.cond1.for.cond.cleanup3_crit_edge.us.i %i.022.us.i = phi i32 [ %inc9.us.i, %for.cond1.for.cond.cleanup3_crit_edge.us.i ], [ 0, %for.cond1.preheader.lr.ph.i ] br label %for.body4.us.i for.body4.us.i: ; preds = %for.body4.us.i, %for.cond1.preheader.us.i %j.020.us.i = phi i32 [ 0, %for.cond1.preheader.us.i ], [ %inc.us.i, %for.body4.us.i ] %add.us.i = add nuw nsw i32 %j.020.us.i, %i.022.us.i %rem.us.i = and i32 %add.us.i, 1 %cmp5.us.i = icmp eq i32 %rem.us.i, 0 %..i = select i1 %cmp5.us.i, i32 35, i32 46 %putchar18.us.i = call i32 @putchar(i32 %..i) %inc.us.i = add nuw nsw i32 %j.020.us.i, 1 %exitcond24.not.i = icmp eq i32 %inc.us.i, %2 br i1 %exitcond24.not.i, label %for.cond1.for.cond.cleanup3_crit_edge.us.i, label %for.body4.us.i, !llvm.loop !5 for.cond1.for.cond.cleanup3_crit_edge.us.i: ; preds = %for.body4.us.i %putchar16.us.i = call i32 @putchar(i32 10) %inc9.us.i = add nuw nsw i32 %i.022.us.i, 1 %exitcond25.not.i = icmp eq i32 %inc9.us.i, %3 br i1 %exitcond25.not.i, label %printChessboard.exit, label %for.cond1.preheader.us.i, !llvm.loop !7 for.cond1.preheader.i: ; preds = %for.cond1.preheader.lr.ph.i, %for.cond1.preheader.i %i.022.i = phi i32 [ %inc9.i, %for.cond1.preheader.i ], [ 0, %for.cond1.preheader.lr.ph.i ] %putchar16.i = call i32 @putchar(i32 10) %inc9.i = add nuw nsw i32 %i.022.i, 1 %exitcond.not.i = icmp eq i32 %inc9.i, %3 br i1 %exitcond.not.i, label %printChessboard.exit, label %for.cond1.preheader.i, !llvm.loop !7 printChessboard.exit: ; preds = %for.cond1.preheader.i, %for.cond1.for.cond.cleanup3_crit_edge.us.i, %if.end %putchar.i = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %h, ptr noundef nonnull %w) %4 = load i32, ptr %h, align 4, !tbaa !8 %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 %if.end while.end: ; preds = %printChessboard.exit, %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: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = !{!9, !9, i64 0} !9 = !{!"int", !10, i64 0} !10 = !{!"omnipotent char", !11, i64 0} !11 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int h, w; int i, j; for (;;) { scanf("%d %d", &h, &w); if (h == 0 && w == 0) break; for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { if ((i + j) % 2 == 0) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218444/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218444/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call29 = 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 %cmp30 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp131 = icmp eq i32 %1, 0 %or.cond32 = select i1 %cmp30, i1 %cmp131, i1 false br i1 %or.cond32, label %for.end17, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %for.end15 %2 = phi i32 [ %6, %for.end15 ], [ %0, %entry ] %cmp327 = icmp sgt i32 %2, 0 br i1 %cmp327, label %for.cond4.preheader, label %for.end15 for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end %i.028 = phi i32 [ %inc14, %for.end ], [ 0, %for.cond2.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp525 = icmp sgt i32 %3, 0 br i1 %cmp525, label %for.body6, label %for.end for.body6: ; preds = %for.cond4.preheader, %for.body6 %j.026 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ] %add = add nuw nsw i32 %j.026, %i.028 %rem = and i32 %add, 1 %cmp7 = icmp eq i32 %rem, 0 %. = select i1 %cmp7, i32 35, i32 46 %putchar24 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.026, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %4 br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body6, %for.cond4.preheader %putchar22 = call i32 @putchar(i32 10) %inc14 = add nuw nsw i32 %i.028, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc14, %5 br i1 %cmp3, label %for.cond4.preheader, label %for.end15, !llvm.loop !11 for.end15: ; preds = %for.end, %for.cond2.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 %for.end17, label %for.cond2.preheader for.end17: ; preds = %for.end15, %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 H, W; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0) break; for(int i=1;i<=H;i++){ for(int k=1;k<=W;k++){ if(i%2!=0){ if(k%2!=0){ printf("#"); }else printf("."); }else{ if(k%2==0){ printf("#"); }else printf("."); } } printf("\n"); } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218530/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218530/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call43 = 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 %cmp44 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp145 = icmp eq i32 %1, 0 %or.cond46 = select i1 %cmp44, i1 %cmp145, i1 false br i1 %or.cond46, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.cond.cleanup %2 = phi i32 [ %5, %for.cond.cleanup ], [ %0, %entry ] %cmp2.not41 = icmp slt i32 %2, 1 br i1 %cmp2.not41, label %for.cond.cleanup, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.042 = phi i32 [ %inc26, %for.cond.cleanup5 ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not39 = icmp slt i32 %3, 1 br i1 %cmp4.not39, label %for.cond.cleanup5, label %for.body6.lr.ph for.body6.lr.ph: ; preds = %for.cond3.preheader %rem = and i32 %i.042, 1 %cmp7.not = icmp eq i32 %rem, 0 br i1 %cmp7.not, label %for.body6.us, label %for.body6 for.body6.us: ; preds = %for.body6.lr.ph, %for.body6.us %k.040.us = phi i32 [ %inc.us, %for.body6.us ], [ 1, %for.body6.lr.ph ] %rem16.us = and i32 %k.040.us, 1 %cmp17.us = icmp eq i32 %rem16.us, 0 %. = select i1 %cmp17.us, i32 35, i32 46 %putchar36.us = call i32 @putchar(i32 %.) %inc.us = add nuw nsw i32 %k.040.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.us.not = icmp slt i32 %k.040.us, %4 br i1 %cmp4.not.us.not, label %for.body6.us, label %for.cond.cleanup5, !llvm.loop !9 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) %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %5, 0 %6 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %6, 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.body6.us, %for.cond3.preheader %putchar34 = call i32 @putchar(i32 10) %inc26 = add nuw nsw i32 %i.042, 1 %7 = load i32, ptr %H, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.042, %7 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11 for.body6: ; preds = %for.body6.lr.ph, %for.body6 %k.040 = phi i32 [ %inc, %for.body6 ], [ 1, %for.body6.lr.ph ] %rem9 = and i32 %k.040, 1 %cmp10.not = icmp eq i32 %rem9, 0 %.50 = select i1 %cmp10.not, i32 46, i32 35 %putchar37 = call i32 @putchar(i32 %.50) %inc = add nuw nsw i32 %k.040, 1 %8 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %k.040, %8 br i1 %cmp4.not.not, label %for.body6, label %for.cond.cleanup5, !llvm.loop !9 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(){ long A,B,K; scanf("%ld %ld %ld",&A,&B,&K); if(A>K){ A = A-K; }else{ K = K-A; A = 0; if(K > B){ B = 0; }else{ B = B-K; } } printf("%ld %ld\n",A,B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218581/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218581/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld %ld %ld\00", align 1 @.str.1 = private unnamed_addr constant [9 x i8] c"%ld %ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 %K = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %K) %0 = load i64, ptr %A, align 8, !tbaa !5 %1 = load i64, ptr %K, align 8, !tbaa !5 %cmp = icmp sgt i64 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %sub = sub nsw i64 %0, %1 store i64 %sub, ptr %A, align 8, !tbaa !5 %.pre = load i64, ptr %B, align 8, !tbaa !5 br label %if.end6 if.else: ; preds = %entry %sub1 = sub nsw i64 %1, %0 store i64 %sub1, ptr %K, align 8, !tbaa !5 store i64 0, ptr %A, align 8, !tbaa !5 %2 = load i64, ptr %B, align 8, !tbaa !5 %cmp2 = icmp sgt i64 %sub1, %2 br i1 %cmp2, label %if.then3, label %if.else4 if.then3: ; preds = %if.else store i64 0, ptr %B, align 8, !tbaa !5 br label %if.end6 if.else4: ; preds = %if.else %sub5 = sub nsw i64 %2, %sub1 store i64 %sub5, ptr %B, align 8, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then3, %if.else4, %if.then %3 = phi i64 [ 0, %if.then3 ], [ %sub5, %if.else4 ], [ %.pre, %if.then ] %4 = phi i64 [ 0, %if.then3 ], [ 0, %if.else4 ], [ %sub, %if.then ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %4, i64 noundef %3) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { long long int a,b,k; scanf("%lld%lld%lld",&a,&b,&k); if(a>=k) printf("%lld %lld\n",a-k,b); else if(a+b>=k) printf("0 %lld\n",a+b-k); else printf("0 0\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218631/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218631/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [11 x i8] c"%lld %lld\0A\00", align 1 @.str.2 = private unnamed_addr constant [8 x i8] c"0 %lld\0A\00", align 1 @str = private unnamed_addr constant [4 x i8] c"0 0\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %k) %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %k, align 8, !tbaa !5 %cmp.not = icmp slt i64 %0, %1 br i1 %cmp.not, label %if.else, label %if.then if.then: ; preds = %entry %sub = sub nsw i64 %0, %1 %2 = load i64, ptr %b, align 8, !tbaa !5 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sub, i64 noundef %2) br label %if.end9 if.else: ; preds = %entry %3 = load i64, ptr %b, align 8, !tbaa !5 %add = add nsw i64 %3, %0 %cmp2.not = icmp slt i64 %add, %1 br i1 %cmp2.not, label %if.else7, label %if.then3 if.then3: ; preds = %if.else %sub5 = sub nsw i64 %add, %1 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %sub5) br label %if.end9 if.else7: ; preds = %if.else %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end9 if.end9: ; preds = %if.then3, %if.else7, %if.then call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { unsigned long l_havingCookieCountOfTakahashi; unsigned long l_havingCookieCountOfAoki; unsigned long l_repeatCount; scanf("%ld%ld%ld", &l_havingCookieCountOfTakahashi, &l_havingCookieCountOfAoki, &l_repeatCount); if (l_havingCookieCountOfTakahashi > l_repeatCount) { l_havingCookieCountOfTakahashi -= l_repeatCount; } else if (l_havingCookieCountOfTakahashi == l_repeatCount) { l_havingCookieCountOfTakahashi = 0; } else { l_repeatCount -= l_havingCookieCountOfTakahashi; l_havingCookieCountOfTakahashi = 0; if (l_repeatCount <= l_havingCookieCountOfAoki) { l_havingCookieCountOfAoki -= l_repeatCount; } else { l_havingCookieCountOfAoki = 0; } } printf("%ld %ld", l_havingCookieCountOfTakahashi, l_havingCookieCountOfAoki); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218675/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218675/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld%ld%ld\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%ld %ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %l_havingCookieCountOfTakahashi = alloca i64, align 8 %l_havingCookieCountOfAoki = alloca i64, align 8 %l_repeatCount = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %l_havingCookieCountOfTakahashi) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %l_havingCookieCountOfAoki) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %l_repeatCount) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %l_havingCookieCountOfTakahashi, ptr noundef nonnull %l_havingCookieCountOfAoki, ptr noundef nonnull %l_repeatCount) %0 = load i64, ptr %l_havingCookieCountOfTakahashi, align 8, !tbaa !5 %1 = load i64, ptr %l_repeatCount, align 8, !tbaa !5 %cmp = icmp ugt i64 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %sub = sub i64 %0, %1 store i64 %sub, ptr %l_havingCookieCountOfTakahashi, align 8, !tbaa !5 br label %if.end10 if.else: ; preds = %entry %cmp1 = icmp eq i64 %0, %1 br i1 %cmp1, label %if.then2, label %if.else3 if.then2: ; preds = %if.else store i64 0, ptr %l_havingCookieCountOfTakahashi, align 8, !tbaa !5 br label %if.end10 if.else3: ; preds = %if.else %sub4 = sub i64 %1, %0 store i64 %sub4, ptr %l_repeatCount, align 8, !tbaa !5 store i64 0, ptr %l_havingCookieCountOfTakahashi, align 8, !tbaa !5 %2 = load i64, ptr %l_havingCookieCountOfAoki, align 8, !tbaa !5 %cmp5.not = icmp ugt i64 %sub4, %2 br i1 %cmp5.not, label %if.else8, label %if.then6 if.then6: ; preds = %if.else3 %sub7 = sub i64 %2, %sub4 store i64 %sub7, ptr %l_havingCookieCountOfAoki, align 8, !tbaa !5 br label %if.end10 if.else8: ; preds = %if.else3 store i64 0, ptr %l_havingCookieCountOfAoki, align 8, !tbaa !5 br label %if.end10 if.end10: ; preds = %if.then2, %if.else8, %if.then6, %if.then %3 = phi i64 [ 0, %if.then2 ], [ 0, %if.else8 ], [ 0, %if.then6 ], [ %sub, %if.then ] %4 = load i64, ptr %l_havingCookieCountOfAoki, align 8, !tbaa !5 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %3, i64 noundef %4) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %l_repeatCount) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %l_havingCookieCountOfAoki) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %l_havingCookieCountOfTakahashi) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { unsigned long int a, b, k; scanf("%lu %lu %lu",&a,&b,&k); if(a <= k) { if(b <= (k - a)) { b = 0; a = 0; } else { b -= (k - a); a = 0; } } else { a -= k; } printf("%lu %lu", a, b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218725/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218725/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lu %lu %lu\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%lu %lu\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %k) %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %k, align 8, !tbaa !5 %cmp.not = icmp ugt i64 %0, %1 br i1 %cmp.not, label %if.else5, label %if.then if.then: ; preds = %entry %2 = load i64, ptr %b, align 8, !tbaa !5 %sub = sub i64 %1, %0 %cmp1.not = icmp ugt i64 %2, %sub br i1 %cmp1.not, label %if.else, label %if.then2 if.then2: ; preds = %if.then store i64 0, ptr %b, align 8, !tbaa !5 store i64 0, ptr %a, align 8, !tbaa !5 br label %if.end7 if.else: ; preds = %if.then %sub4 = sub i64 %2, %sub store i64 %sub4, ptr %b, align 8, !tbaa !5 store i64 0, ptr %a, align 8, !tbaa !5 br label %if.end7 if.else5: ; preds = %entry %sub6 = sub i64 %0, %1 store i64 %sub6, ptr %a, align 8, !tbaa !5 %.pre = load i64, ptr %b, align 8, !tbaa !5 br label %if.end7 if.end7: ; preds = %if.then2, %if.else, %if.else5 %3 = phi i64 [ 0, %if.then2 ], [ %sub4, %if.else ], [ %.pre, %if.else5 ] %4 = phi i64 [ 0, %if.then2 ], [ 0, %if.else ], [ %sub6, %if.else5 ] %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %4, i64 noundef %3) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<string.h> #include<math.h> #define ll long long int void sort(int array[],ll n){ ll i,j,temp; for(i=0;i<n;i++) { for(j=0;j<n;j++) { if (array[j] > array[j + 1]) { temp = array[j]; array[j] = array[j + 1]; array[j + 1] = temp; } } } } int main() { ll a,b,k,left; scanf("%lld%lld%lld",&a,&b,&k); if(a<=k) { k=k-a; a=0; } if(a>k) { a=a-k; k=0; } if(b>=k) { b=b-k; k=0; } if(b<k) { b=0; } printf("%lld %lld",a,b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218769/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218769/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"%lld %lld\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @sort(ptr nocapture noundef %array, i64 noundef %n) local_unnamed_addr #0 { entry: %cmp33 = icmp sgt i64 %n, 0 br i1 %cmp33, label %for.cond1.preheader.us.preheader, label %for.end15 for.cond1.preheader.us.preheader: ; preds = %entry %xtraiter = and i64 %n, 1 %0 = icmp eq i64 %n, 1 %unroll_iter = and i64 %n, -2 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 %invariant.gep = getelementptr i32, ptr %array, i64 1 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us.preheader, %for.cond1.for.inc13_crit_edge.us %i.034.us = phi i64 [ %inc14.us, %for.cond1.for.inc13_crit_edge.us ], [ 0, %for.cond1.preheader.us.preheader ] %.pre = load i32, ptr %array, align 4, !tbaa !5 br i1 %0, label %for.cond1.for.inc13_crit_edge.us.unr-lcssa, label %for.body3.us for.body3.us: ; preds = %for.cond1.preheader.us, %for.inc.us.1 %1 = phi i32 [ %5, %for.inc.us.1 ], [ %.pre, %for.cond1.preheader.us ] %j.032.us = phi i64 [ %add.us.1, %for.inc.us.1 ], [ 0, %for.cond1.preheader.us ] %niter = phi i64 [ %niter.next.1, %for.inc.us.1 ], [ 0, %for.cond1.preheader.us ] %add.us = or i64 %j.032.us, 1 %arrayidx4.us = getelementptr inbounds i32, ptr %array, i64 %add.us %2 = load i32, ptr %arrayidx4.us, align 4, !tbaa !5 %cmp5.us = icmp sgt i32 %1, %2 br i1 %cmp5.us, label %if.then.us, label %for.inc.us if.then.us: ; preds = %for.body3.us %arrayidx.us = getelementptr inbounds i32, ptr %array, i64 %j.032.us store i32 %2, ptr %arrayidx.us, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4.us, align 4, !tbaa !5 br label %for.inc.us for.inc.us: ; preds = %if.then.us, %for.body3.us %3 = phi i32 [ %1, %if.then.us ], [ %2, %for.body3.us ] %add.us.1 = add nuw nsw i64 %j.032.us, 2 %arrayidx4.us.1 = getelementptr inbounds i32, ptr %array, i64 %add.us.1 %4 = load i32, ptr %arrayidx4.us.1, align 4, !tbaa !5 %cmp5.us.1 = icmp sgt i32 %3, %4 br i1 %cmp5.us.1, label %if.then.us.1, label %for.inc.us.1 if.then.us.1: ; preds = %for.inc.us %arrayidx.us.1 = getelementptr inbounds i32, ptr %array, i64 %add.us store i32 %4, ptr %arrayidx.us.1, align 4, !tbaa !5 store i32 %3, ptr %arrayidx4.us.1, align 4, !tbaa !5 br label %for.inc.us.1 for.inc.us.1: ; preds = %if.then.us.1, %for.inc.us %5 = phi i32 [ %3, %if.then.us.1 ], [ %4, %for.inc.us ] %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.cond1.for.inc13_crit_edge.us.unr-lcssa, label %for.body3.us, !llvm.loop !9 for.cond1.for.inc13_crit_edge.us.unr-lcssa: ; preds = %for.inc.us.1, %for.cond1.preheader.us %.unr = phi i32 [ %.pre, %for.cond1.preheader.us ], [ %5, %for.inc.us.1 ] %j.032.us.unr = phi i64 [ 0, %for.cond1.preheader.us ], [ %add.us.1, %for.inc.us.1 ] br i1 %lcmp.mod.not, label %for.cond1.for.inc13_crit_edge.us, label %for.body3.us.epil for.body3.us.epil: ; preds = %for.cond1.for.inc13_crit_edge.us.unr-lcssa %gep = getelementptr i32, ptr %invariant.gep, i64 %j.032.us.unr %6 = load i32, ptr %gep, align 4, !tbaa !5 %cmp5.us.epil = icmp sgt i32 %.unr, %6 br i1 %cmp5.us.epil, label %if.then.us.epil, label %for.cond1.for.inc13_crit_edge.us if.then.us.epil: ; preds = %for.body3.us.epil %arrayidx.us.epil = getelementptr inbounds i32, ptr %array, i64 %j.032.us.unr store i32 %6, ptr %arrayidx.us.epil, align 4, !tbaa !5 store i32 %.unr, ptr %gep, align 4, !tbaa !5 br label %for.cond1.for.inc13_crit_edge.us for.cond1.for.inc13_crit_edge.us: ; preds = %for.body3.us.epil, %if.then.us.epil, %for.cond1.for.inc13_crit_edge.us.unr-lcssa %inc14.us = add nuw nsw i64 %i.034.us, 1 %exitcond35.not = icmp eq i64 %inc14.us, %n br i1 %exitcond35.not, label %for.end15, label %for.cond1.preheader.us, !llvm.loop !11 for.end15: ; preds = %for.cond1.for.inc13_crit_edge.us, %entry 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 nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %a = alloca i64, align 8 %b = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %k) %0 = load i64, ptr %a, align 8, !tbaa !12 %1 = load i64, ptr %k, align 8, !tbaa !12 %cmp.not = icmp sgt i64 %0, %1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %entry %sub = sub nsw i64 %1, %0 store i64 %sub, ptr %k, align 8, !tbaa !12 store i64 0, ptr %a, align 8, !tbaa !12 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i64 [ %sub, %if.then ], [ %1, %entry ] %3 = phi i64 [ 0, %if.then ], [ %0, %entry ] %cmp1 = icmp sgt i64 %3, %2 br i1 %cmp1, label %if.then2, label %if.end4 if.then2: ; preds = %if.end %sub3 = sub nsw i64 %3, %2 store i64 %sub3, ptr %a, align 8, !tbaa !12 store i64 0, ptr %k, align 8, !tbaa !12 br label %if.end4 if.end4: ; preds = %if.then2, %if.end %4 = phi i64 [ %sub3, %if.then2 ], [ %3, %if.end ] %5 = phi i64 [ 0, %if.then2 ], [ %2, %if.end ] %6 = load i64, ptr %b, align 8, !tbaa !12 %cmp5.not = icmp slt i64 %6, %5 br i1 %cmp5.not, label %if.end8, label %if.then6 if.then6: ; preds = %if.end4 %sub7 = sub nsw i64 %6, %5 store i64 %sub7, ptr %b, align 8, !tbaa !12 store i64 0, ptr %k, align 8, !tbaa !12 br label %if.end8 if.end8: ; preds = %if.then6, %if.end4 %7 = phi i64 [ 0, %if.then6 ], [ %5, %if.end4 ] %8 = phi i64 [ %sub7, %if.then6 ], [ %6, %if.end4 ] %cmp9 = icmp slt i64 %8, %7 br i1 %cmp9, label %if.then10, label %if.end11 if.then10: ; preds = %if.end8 store i64 0, ptr %b, align 8, !tbaa !12 br label %if.end11 if.end11: ; preds = %if.then10, %if.end8 %9 = phi i64 [ 0, %if.then10 ], [ %8, %if.end8 ] %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %4, i64 noundef %9) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #4 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 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!13, !13, i64 0} !13 = !{!"long long", !7, i64 0}
/* * main.c * * Created on: 2019/12/29 * Author: family */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define MAX(a,b) (a > b ? a : b) #define MIN(a,b) (a > b ? b : a) typedef long long int ll; int main() { ll A = 0, B = 0, K = 0; scanf("%lld %lld %lld", &A, &B, &K); if (A > 0) { if (A < K) { K = K - A; A = 0; } else { A = A - K; K = 0; } } if (B > 0) { if (B > K) { B -= K; } else { B = 0; } } printf("%lld %lld\n", A, B); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218811/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218811/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [15 x i8] c"%lld %lld %lld\00", align 1 @.str.1 = private unnamed_addr constant [11 x i8] c"%lld %lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 %K = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #3 store i64 0, ptr %A, align 8, !tbaa !5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #3 store i64 0, ptr %B, align 8, !tbaa !5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %K) #3 store i64 0, ptr %K, align 8, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %K) %0 = load i64, ptr %A, align 8, !tbaa !5 %cmp = icmp sgt i64 %0, 0 br i1 %cmp, label %if.then, label %if.end4 if.then: ; preds = %entry %1 = load i64, ptr %K, align 8, !tbaa !5 %cmp1 = icmp slt i64 %0, %1 br i1 %cmp1, label %if.then2, label %if.else if.then2: ; preds = %if.then %sub = sub nsw i64 %1, %0 store i64 %sub, ptr %K, align 8, !tbaa !5 store i64 0, ptr %A, align 8, !tbaa !5 br label %if.end4 if.else: ; preds = %if.then %sub3 = sub nsw i64 %0, %1 store i64 %sub3, ptr %A, align 8, !tbaa !5 store i64 0, ptr %K, align 8, !tbaa !5 br label %if.end4 if.end4: ; preds = %if.then2, %if.else, %entry %2 = phi i64 [ 0, %if.then2 ], [ %sub3, %if.else ], [ %0, %entry ] %3 = load i64, ptr %B, align 8, !tbaa !5 %cmp5 = icmp sgt i64 %3, 0 br i1 %cmp5, label %if.then6, label %if.end12 if.then6: ; preds = %if.end4 %4 = load i64, ptr %K, align 8, !tbaa !5 %cmp7 = icmp sgt i64 %3, %4 br i1 %cmp7, label %if.then8, label %if.else10 if.then8: ; preds = %if.then6 %sub9 = sub nsw i64 %3, %4 store i64 %sub9, ptr %B, align 8, !tbaa !5 br label %if.end12 if.else10: ; preds = %if.then6 store i64 0, ptr %B, align 8, !tbaa !5 br label %if.end12 if.end12: ; preds = %if.then8, %if.else10, %if.end4 %5 = phi i64 [ %sub9, %if.then8 ], [ 0, %if.else10 ], [ %3, %if.end4 ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %2, i64 noundef %5) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %K) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int n,a; scanf("%d",&n); int i = 0; do { do { a = i * (i + 1) / 2; i ++; } while (a < n); printf("%d\n",i -1); n -= (i - 1); i = 0; } while (n != 0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218855/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218855/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %do.body do.body: ; preds = %do.end, %entry %0 = phi i32 [ %sub4, %do.end ], [ %.pre, %entry ] br label %do.body1 do.body1: ; preds = %do.body1, %do.body %i.1 = phi i32 [ 0, %do.body ], [ %add, %do.body1 ] %add = add nuw nsw i32 %i.1, 1 %mul = mul nsw i32 %add, %i.1 %div12 = lshr i32 %mul, 1 %cmp = icmp slt i32 %div12, %0 br i1 %cmp, label %do.body1, label %do.end, !llvm.loop !9 do.end: ; preds = %do.body1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.1) %1 = load i32, ptr %n, align 4, !tbaa !5 %sub4 = sub nsw i32 %1, %i.1 store i32 %sub4, ptr %n, align 4, !tbaa !5 %cmp6.not = icmp eq i32 %1, %i.1 br i1 %cmp6.not, label %do.end7, label %do.body, !llvm.loop !11 do.end7: ; preds = %do.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <stdlib.h> int gethead(int n) { if(0 < n && n < 10) return n; return gethead(n/10); } int gettail(int n) { return n%10; } int main(void) { int n, i, j; scanf("%d", &n); int **count = malloc(sizeof(int *)*9); for(i = 0; i < 9; i++) { *(count + i) = malloc(sizeof(int)*9); for(j = 0; j < 9; j++) *(*(count + i) + j) = 0; } for(i = 1; i <= n; i++) { int head = gethead(i); int tail = gettail(i); if(head > 0 && tail > 0) (*(*(count + head - 1) + tail - 1))++; } int ans = 0; for(i = 0; i < 9; i++) for(j = 0; j < 9; j++) ans += (*(*(count + i) + j))*(*(*(count + j) + i)); free(count); printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gethead(i32 noundef %n) local_unnamed_addr #0 { entry: %0 = add i32 %n, -1 %or.cond5 = icmp ult i32 %0, 9 br i1 %or.cond5, label %return, label %if.end if.end: ; preds = %entry, %if.end %n.tr6 = phi i32 [ %div, %if.end ], [ %n, %entry ] %div = sdiv i32 %n.tr6, 10 %1 = add nsw i32 %div, -1 %or.cond = icmp ult i32 %1, 9 br i1 %or.cond, label %return, label %if.end return: ; preds = %if.end, %entry %n.tr.lcssa = phi i32 [ %n, %entry ], [ %div, %if.end ] ret i32 %n.tr.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @gettail(i32 noundef %n) local_unnamed_addr #1 { entry: %rem = srem i32 %n, 10 ret i32 %rem } ; Function Attrs: 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) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call noalias dereferenceable_or_null(72) ptr @malloc(i64 noundef 72) #9 %calloc = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) store ptr %calloc, ptr %call1, align 8, !tbaa !5 %calloc88 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.1 = getelementptr inbounds ptr, ptr %call1, i64 1 store ptr %calloc88, ptr %add.ptr.1, align 8, !tbaa !5 %calloc89 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.2 = getelementptr inbounds ptr, ptr %call1, i64 2 store ptr %calloc89, ptr %add.ptr.2, align 8, !tbaa !5 %calloc90 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.3 = getelementptr inbounds ptr, ptr %call1, i64 3 store ptr %calloc90, ptr %add.ptr.3, align 8, !tbaa !5 %calloc91 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.4 = getelementptr inbounds ptr, ptr %call1, i64 4 store ptr %calloc91, ptr %add.ptr.4, align 8, !tbaa !5 %calloc92 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.5 = getelementptr inbounds ptr, ptr %call1, i64 5 store ptr %calloc92, ptr %add.ptr.5, align 8, !tbaa !5 %calloc93 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.6 = getelementptr inbounds ptr, ptr %call1, i64 6 store ptr %calloc93, ptr %add.ptr.6, align 8, !tbaa !5 %calloc94 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.7 = getelementptr inbounds ptr, ptr %call1, i64 7 store ptr %calloc94, ptr %add.ptr.7, align 8, !tbaa !5 %calloc95 = call dereferenceable_or_null(36) ptr @calloc(i64 1, i64 36) %add.ptr.8 = getelementptr inbounds ptr, ptr %call1, i64 8 store ptr %calloc95, ptr %add.ptr.8, align 8, !tbaa !5 %invariant.gep = getelementptr ptr, ptr %call1, i64 -1 %0 = load i32, ptr %n, align 4, !tbaa !9 %cmp14.not78 = icmp slt i32 %0, 1 br i1 %cmp14.not78, label %for.cond33.preheader.preheader, label %for.body15 for.body15: ; preds = %entry, %if.end %1 = phi i32 [ %5, %if.end ], [ %0, %entry ] %i.179 = phi i32 [ %inc28, %if.end ], [ 1, %entry ] %or.cond5.i = icmp ult i32 %i.179, 10 br i1 %or.cond5.i, label %gethead.exit, label %if.end.i if.end.i: ; preds = %for.body15, %if.end.i %n.tr6.i = phi i32 [ %div.i, %if.end.i ], [ %i.179, %for.body15 ] %div.i = sdiv i32 %n.tr6.i, 10 %2 = add nsw i32 %div.i, -1 %or.cond.i = icmp ult i32 %2, 9 br i1 %or.cond.i, label %gethead.exit, label %if.end.i gethead.exit: ; preds = %if.end.i, %for.body15 %n.tr.lcssa.i = phi i32 [ %i.179, %for.body15 ], [ %div.i, %if.end.i ] %rem.i = urem i32 %i.179, 10 %cmp19.not = icmp eq i32 %rem.i, 0 br i1 %cmp19.not, label %if.end, label %if.then if.then: ; preds = %gethead.exit %idx.ext20 = zext i32 %n.tr.lcssa.i to i64 %gep = getelementptr ptr, ptr %invariant.gep, i64 %idx.ext20 %3 = load ptr, ptr %gep, align 8, !tbaa !5 %idx.ext23 = zext i32 %rem.i to i64 %add.ptr24 = getelementptr inbounds i32, ptr %3, i64 %idx.ext23 %add.ptr25 = getelementptr inbounds i32, ptr %add.ptr24, i64 -1 %4 = load i32, ptr %add.ptr25, align 4, !tbaa !9 %inc26 = add nsw i32 %4, 1 store i32 %inc26, ptr %add.ptr25, align 4, !tbaa !9 %.pre = load i32, ptr %n, align 4, !tbaa !9 br label %if.end if.end: ; preds = %if.then, %gethead.exit %5 = phi i32 [ %.pre, %if.then ], [ %1, %gethead.exit ] %inc28 = add nuw nsw i32 %i.179, 1 %cmp14.not.not = icmp slt i32 %i.179, %5 br i1 %cmp14.not.not, label %for.body15, label %for.cond33.preheader.preheader, !llvm.loop !11 for.cond33.preheader.preheader: ; preds = %if.end, %entry br label %for.cond33.preheader for.cond33.preheader: ; preds = %for.cond33.preheader.preheader, %for.cond33.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond33.preheader ], [ 0, %for.cond33.preheader.preheader ] %ans.083 = phi i32 [ %add.8, %for.cond33.preheader ], [ 0, %for.cond33.preheader.preheader ] %add.ptr37 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv %6 = load ptr, ptr %add.ptr37, align 8, !tbaa !5 %7 = load i32, ptr %6, align 4, !tbaa !9 %add.ptr43 = getelementptr inbounds i32, ptr %calloc, i64 %indvars.iv %8 = load i32, ptr %add.ptr43, align 4, !tbaa !9 %mul = mul nsw i32 %8, %7 %add = add nsw i32 %mul, %ans.083 %add.ptr39.1 = getelementptr inbounds i32, ptr %6, i64 1 %9 = load i32, ptr %add.ptr39.1, align 4, !tbaa !9 %add.ptr43.1 = getelementptr inbounds i32, ptr %calloc88, i64 %indvars.iv %10 = load i32, ptr %add.ptr43.1, align 4, !tbaa !9 %mul.1 = mul nsw i32 %10, %9 %add.1 = add nsw i32 %mul.1, %add %add.ptr39.2 = getelementptr inbounds i32, ptr %6, i64 2 %11 = load i32, ptr %add.ptr39.2, align 4, !tbaa !9 %add.ptr43.2 = getelementptr inbounds i32, ptr %calloc89, i64 %indvars.iv %12 = load i32, ptr %add.ptr43.2, align 4, !tbaa !9 %mul.2 = mul nsw i32 %12, %11 %add.2 = add nsw i32 %mul.2, %add.1 %add.ptr39.3 = getelementptr inbounds i32, ptr %6, i64 3 %13 = load i32, ptr %add.ptr39.3, align 4, !tbaa !9 %add.ptr43.3 = getelementptr inbounds i32, ptr %calloc90, i64 %indvars.iv %14 = load i32, ptr %add.ptr43.3, align 4, !tbaa !9 %mul.3 = mul nsw i32 %14, %13 %add.3 = add nsw i32 %mul.3, %add.2 %add.ptr39.4 = getelementptr inbounds i32, ptr %6, i64 4 %15 = load i32, ptr %add.ptr39.4, align 4, !tbaa !9 %add.ptr43.4 = getelementptr inbounds i32, ptr %calloc91, i64 %indvars.iv %16 = load i32, ptr %add.ptr43.4, align 4, !tbaa !9 %mul.4 = mul nsw i32 %16, %15 %add.4 = add nsw i32 %mul.4, %add.3 %add.ptr39.5 = getelementptr inbounds i32, ptr %6, i64 5 %17 = load i32, ptr %add.ptr39.5, align 4, !tbaa !9 %add.ptr43.5 = getelementptr inbounds i32, ptr %calloc92, i64 %indvars.iv %18 = load i32, ptr %add.ptr43.5, align 4, !tbaa !9 %mul.5 = mul nsw i32 %18, %17 %add.5 = add nsw i32 %mul.5, %add.4 %add.ptr39.6 = getelementptr inbounds i32, ptr %6, i64 6 %19 = load i32, ptr %add.ptr39.6, align 4, !tbaa !9 %add.ptr43.6 = getelementptr inbounds i32, ptr %calloc93, i64 %indvars.iv %20 = load i32, ptr %add.ptr43.6, align 4, !tbaa !9 %mul.6 = mul nsw i32 %20, %19 %add.6 = add nsw i32 %mul.6, %add.5 %add.ptr39.7 = getelementptr inbounds i32, ptr %6, i64 7 %21 = load i32, ptr %add.ptr39.7, align 4, !tbaa !9 %add.ptr43.7 = getelementptr inbounds i32, ptr %calloc94, i64 %indvars.iv %22 = load i32, ptr %add.ptr43.7, align 4, !tbaa !9 %mul.7 = mul nsw i32 %22, %21 %add.7 = add nsw i32 %mul.7, %add.6 %add.ptr39.8 = getelementptr inbounds i32, ptr %6, i64 8 %23 = load i32, ptr %add.ptr39.8, align 4, !tbaa !9 %add.ptr43.8 = getelementptr inbounds i32, ptr %calloc95, i64 %indvars.iv %24 = load i32, ptr %add.ptr43.8, align 4, !tbaa !9 %mul.8 = mul nsw i32 %24, %23 %add.8 = add nsw i32 %mul.8, %add.7 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 9 br i1 %exitcond.not, label %for.end49, label %for.cond33.preheader, !llvm.loop !13 for.end49: ; preds = %for.cond33.preheader call void @free(ptr noundef nonnull %call1) #8 %call50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.8) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7 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 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { 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 #6 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" } attributes #8 = { nounwind } attributes #9 = { 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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include<stdio.h> #define ll long long void solve(){ ll a,b; scanf("%lld",&a); b=360; while(b%a != 0) b+=360; printf("%lld",b/a); } int main() { int t=1; // cin >> t; while (t--) solve(); // cerr << "Run Time : " << ((double)(clock() - z) / CLOCKS_PER_SEC); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @solve() local_unnamed_addr #0 { entry: %a = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i64, ptr %a, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %while.cond, %entry %b.0 = phi i64 [ 360, %entry ], [ %add, %while.cond ] %rem = srem i64 %b.0, %0 %div = sdiv i64 %b.0, %0 %cmp.not = icmp eq i64 %rem, 0 %add = add nuw nsw i64 %b.0, 360 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !9 while.end: ; preds = %while.cond %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #3 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: 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: %a.i = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a.i) #3 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a.i) %0 = load i64, ptr %a.i, align 8, !tbaa !5 br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %b.0.i = phi i64 [ 360, %entry ], [ %add.i, %while.cond.i ] %rem.i = srem i64 %b.0.i, %0 %div.i = sdiv i64 %b.0.i, %0 %cmp.not.i = icmp eq i64 %rem.i, 0 %add.i = add nuw nsw i64 %b.0.i, 360 br i1 %cmp.not.i, label %solve.exit, label %while.cond.i, !llvm.loop !9 solve.exit: ; preds = %while.cond.i %call1.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div.i) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a.i) #3 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 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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 <math.h> int main(void) { double PI = atan(1) * 4; double x = 0, y = 0; int X; int angle = 0; int K = 0; if (scanf("%d", &X) != 1) return 1; do { angle = (angle + X) % 360; x -= sin(angle * PI / 180); y += cos(angle * PI / 180); K++; } while (fabs(x * x + y * y) > 1e-7); printf("%d\n", K); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_218992/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_218992/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %X = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %X) #5 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %X) %cmp.not = icmp eq i32 %call1, 1 br i1 %cmp.not, label %do.body, label %cleanup do.body: ; preds = %entry, %do.body %x.0 = phi double [ %sub, %do.body ], [ 0.000000e+00, %entry ] %y.0 = phi double [ %add8, %do.body ], [ 0.000000e+00, %entry ] %angle.0 = phi i32 [ %rem, %do.body ], [ 0, %entry ] %K.0 = phi i32 [ %inc, %do.body ], [ 0, %entry ] %0 = load i32, ptr %X, align 4, !tbaa !5 %add = add nsw i32 %0, %angle.0 %rem = srem i32 %add, 360 %conv = sitofp i32 %rem to double %mul2 = fmul double %conv, 0x400921FB54442D18 %div = fdiv double %mul2, 1.800000e+02 %call3 = call double @sin(double noundef %div) #5 %sub = fsub double %x.0, %call3 %call7 = call double @cos(double noundef %div) #5 %add8 = fadd double %y.0, %call7 %inc = add nuw nsw i32 %K.0, 1 %mul10 = fmul double %add8, %add8 %1 = call double @llvm.fmuladd.f64(double %sub, double %sub, double %mul10) %2 = call double @llvm.fabs.f64(double %1) %cmp11 = fcmp ogt double %2, 0x3E7AD7F29ABCAF48 br i1 %cmp11, label %do.body, label %do.end, !llvm.loop !9 do.end: ; preds = %do.body %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %inc) br label %cleanup cleanup: ; preds = %entry, %do.end %retval.0 = phi i32 [ 0, %do.end ], [ 1, %entry ] call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #5 ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sin(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @cos(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fabs.f64(double) #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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { 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"}
#include <stdio.h> #include <string.h> char visited[200][200]; int dfs(int x,int y,int turn) { int sum=0; if(visited[y][x]==0)sum++; if(visited[y][x]>=turn+1)return 0; visited[y][x]=turn+1; if(turn>0) { sum+=dfs(x,y+1,turn-1); sum+=dfs(x+1,y+1,turn-1); sum+=dfs(x-1,y,turn-1); sum+=dfs(x+1,y,turn-1); sum+=dfs(x-1,y-1,turn-1); sum+=dfs(x,y-1,turn-1); } return sum; } int main(void) { int t,n; while(scanf("%d%d",&t,&n)==2 && (t|n)!=0) { int i,j; int x[300],y[300]; int sx,sy; memset(visited,0,sizeof(visited)); for(i=0;i<n;i++)scanf("%d%d",&x[i],&y[i]); scanf("%d%d",&sx,&sy); for(i=0;i<n;i++)visited[y[i]+100][x[i]+100]=100; printf("%d\n",dfs(sx+100,sy+100,t)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219034/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219034/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @visited = dso_local local_unnamed_addr global [200 x [200 x i8]] zeroinitializer, align 16 @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @dfs(i32 noundef %x, i32 noundef %y, i32 noundef %turn) local_unnamed_addr #0 { entry: %idxprom1 = sext i32 %x to i64 %idxprom78 = sext i32 %y to i64 %arrayidx279 = getelementptr inbounds [200 x [200 x i8]], ptr @visited, i64 0, i64 %idxprom78, i64 %idxprom1 %0 = load i8, ptr %arrayidx279, align 1, !tbaa !5 %conv882 = sext i8 %0 to i32 %cmp9.not.not83 = icmp sgt i32 %conv882, %turn br i1 %cmp9.not.not83, label %cleanup, label %if.end12.lr.ph if.end12.lr.ph: ; preds = %entry %add24 = add nsw i32 %x, 1 %sub29 = add nsw i32 %x, -1 br label %if.end12 if.end12: ; preds = %if.end12.lr.ph, %if.then21 %indvars.iv = phi i64 [ %idxprom78, %if.end12.lr.ph ], [ %indvars.iv.next, %if.then21 ] %spec.select88.in.in = phi i8 [ %0, %if.end12.lr.ph ], [ %6, %if.then21 ] %arrayidx287 = phi ptr [ %arrayidx279, %if.end12.lr.ph ], [ %arrayidx2, %if.then21 ] %turn.tr86 = phi i32 [ %turn, %if.end12.lr.ph ], [ %sub, %if.then21 ] %accumulator.tr84 = phi i32 [ 0, %if.end12.lr.ph ], [ %add45, %if.then21 ] %spec.select88.in = icmp eq i8 %spec.select88.in.in, 0 %spec.select88 = zext i1 %spec.select88.in to i32 %1 = trunc i32 %turn.tr86 to i8 %conv14 = add i8 %1, 1 store i8 %conv14, ptr %arrayidx287, align 1, !tbaa !5 %cmp19 = icmp sgt i32 %turn.tr86, 0 br i1 %cmp19, label %if.then21, label %cleanup.loopexit if.then21: ; preds = %if.end12 %sub = add nsw i32 %turn.tr86, -1 %2 = trunc i64 %indvars.iv to i32 %3 = add i32 %2, 1 %call = tail call i32 @dfs(i32 noundef %x, i32 noundef %3, i32 noundef %sub) %call27 = tail call i32 @dfs(i32 noundef %add24, i32 noundef %3, i32 noundef %sub) %4 = trunc i64 %indvars.iv to i32 %call31 = tail call i32 @dfs(i32 noundef %sub29, i32 noundef %4, i32 noundef %sub) %call35 = tail call i32 @dfs(i32 noundef %add24, i32 noundef %4, i32 noundef %sub) %indvars.iv.next = add nsw i64 %indvars.iv, -1 %5 = trunc i64 %indvars.iv.next to i32 %call40 = tail call i32 @dfs(i32 noundef %sub29, i32 noundef %5, i32 noundef %sub) %add23 = add i32 %accumulator.tr84, %spec.select88 %add28 = add i32 %add23, %call %add32 = add i32 %add28, %call27 %add36 = add i32 %add32, %call31 %add41 = add i32 %add36, %call35 %add45 = add i32 %add41, %call40 %arrayidx2 = getelementptr inbounds [200 x [200 x i8]], ptr @visited, i64 0, i64 %indvars.iv.next, i64 %idxprom1 %6 = load i8, ptr %arrayidx2, align 1, !tbaa !5 %conv8 = sext i8 %6 to i32 %cmp9.not.not.not = icmp sgt i32 %turn.tr86, %conv8 br i1 %cmp9.not.not.not, label %if.end12, label %cleanup.loopexit cleanup.loopexit: ; preds = %if.end12, %if.then21 %accumulator.tr.lcssa.ph = phi i32 [ %add45, %if.then21 ], [ %accumulator.tr84, %if.end12 ] %retval.0.ph = phi i32 [ 0, %if.then21 ], [ %spec.select88, %if.end12 ] %7 = add nsw i32 %retval.0.ph, %accumulator.tr.lcssa.ph br label %cleanup cleanup: ; preds = %cleanup.loopexit, %entry %accumulator.ret.tr = phi i32 [ 0, %entry ], [ %7, %cleanup.loopexit ] ret i32 %accumulator.ret.tr } ; 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: %t = alloca i32, align 4 %n = alloca i32, align 4 %x = alloca [300 x i32], align 16 %y = alloca [300 x i32], align 16 %sx = alloca i32, align 4 %sy = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t, ptr noundef nonnull %n) %cmp38 = icmp eq i32 %call37, 2 %0 = load i32, ptr %t, align 4 %1 = load i32, ptr %n, align 4 %or39 = or i32 %1, %0 %cmp140 = icmp ne i32 %or39, 0 %2 = select i1 %cmp38, i1 %cmp140, i1 false br i1 %2, label %while.body, label %while.end while.body: ; preds = %entry, %for.end21 %3 = phi i32 [ %18, %for.end21 ], [ %1, %entry ] call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %y) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sx) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sy) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(40000) @visited, i8 0, i64 40000, i1 false) %cmp233 = icmp sgt i32 %3, 0 br i1 %cmp233, label %for.body, label %for.end for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %while.body ] %arrayidx = getelementptr inbounds [300 x i32], ptr %x, i64 0, i64 %indvars.iv %arrayidx4 = getelementptr inbounds [300 x i32], ptr %y, i64 0, i64 %indvars.iv %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx4) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %n, align 4, !tbaa !8 %5 = sext i32 %4 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp2, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %for.body, %while.body %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sx, ptr noundef nonnull %sy) %6 = load i32, ptr %n, align 4, !tbaa !8 %cmp835 = icmp sgt i32 %6, 0 br i1 %cmp835, label %for.body9.preheader, label %for.end21 for.body9.preheader: ; preds = %for.end %wide.trip.count = zext i32 %6 to i64 %xtraiter = and i64 %wide.trip.count, 1 %7 = icmp eq i32 %6, 1 br i1 %7, label %for.end21.loopexit.unr-lcssa, label %for.body9.preheader.new for.body9.preheader.new: ; preds = %for.body9.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body9 for.body9: ; preds = %for.body9, %for.body9.preheader.new %indvars.iv42 = phi i64 [ 0, %for.body9.preheader.new ], [ %indvars.iv.next43.1, %for.body9 ] %niter = phi i64 [ 0, %for.body9.preheader.new ], [ %niter.next.1, %for.body9 ] %arrayidx11 = getelementptr inbounds [300 x i32], ptr %y, i64 0, i64 %indvars.iv42 %8 = load i32, ptr %arrayidx11, align 8, !tbaa !8 %add = add nsw i32 %8, 100 %idxprom12 = sext i32 %add to i64 %arrayidx15 = getelementptr inbounds [300 x i32], ptr %x, i64 0, i64 %indvars.iv42 %9 = load i32, ptr %arrayidx15, align 8, !tbaa !8 %add16 = add nsw i32 %9, 100 %idxprom17 = sext i32 %add16 to i64 %arrayidx18 = getelementptr inbounds [200 x [200 x i8]], ptr @visited, i64 0, i64 %idxprom12, i64 %idxprom17 store i8 100, ptr %arrayidx18, align 1, !tbaa !5 %indvars.iv.next43 = or i64 %indvars.iv42, 1 %arrayidx11.1 = getelementptr inbounds [300 x i32], ptr %y, i64 0, i64 %indvars.iv.next43 %10 = load i32, ptr %arrayidx11.1, align 4, !tbaa !8 %add.1 = add nsw i32 %10, 100 %idxprom12.1 = sext i32 %add.1 to i64 %arrayidx15.1 = getelementptr inbounds [300 x i32], ptr %x, i64 0, i64 %indvars.iv.next43 %11 = load i32, ptr %arrayidx15.1, align 4, !tbaa !8 %add16.1 = add nsw i32 %11, 100 %idxprom17.1 = sext i32 %add16.1 to i64 %arrayidx18.1 = getelementptr inbounds [200 x [200 x i8]], ptr @visited, i64 0, i64 %idxprom12.1, i64 %idxprom17.1 store i8 100, ptr %arrayidx18.1, align 1, !tbaa !5 %indvars.iv.next43.1 = add nuw nsw i64 %indvars.iv42, 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.end21.loopexit.unr-lcssa, label %for.body9, !llvm.loop !12 for.end21.loopexit.unr-lcssa: ; preds = %for.body9, %for.body9.preheader %indvars.iv42.unr = phi i64 [ 0, %for.body9.preheader ], [ %indvars.iv.next43.1, %for.body9 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end21, label %for.body9.epil for.body9.epil: ; preds = %for.end21.loopexit.unr-lcssa %arrayidx11.epil = getelementptr inbounds [300 x i32], ptr %y, i64 0, i64 %indvars.iv42.unr %12 = load i32, ptr %arrayidx11.epil, align 4, !tbaa !8 %add.epil = add nsw i32 %12, 100 %idxprom12.epil = sext i32 %add.epil to i64 %arrayidx15.epil = getelementptr inbounds [300 x i32], ptr %x, i64 0, i64 %indvars.iv42.unr %13 = load i32, ptr %arrayidx15.epil, align 4, !tbaa !8 %add16.epil = add nsw i32 %13, 100 %idxprom17.epil = sext i32 %add16.epil to i64 %arrayidx18.epil = getelementptr inbounds [200 x [200 x i8]], ptr @visited, i64 0, i64 %idxprom12.epil, i64 %idxprom17.epil store i8 100, ptr %arrayidx18.epil, align 1, !tbaa !5 br label %for.end21 for.end21: ; preds = %for.body9.epil, %for.end21.loopexit.unr-lcssa, %for.end %14 = load i32, ptr %sx, align 4, !tbaa !8 %add22 = add nsw i32 %14, 100 %15 = load i32, ptr %sy, align 4, !tbaa !8 %add23 = add nsw i32 %15, 100 %16 = load i32, ptr %t, align 4, !tbaa !8 %call24 = call i32 @dfs(i32 noundef %add22, i32 noundef %add23, i32 noundef %16) %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %call24) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sy) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sx) #5 call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %y) #5 call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %x) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t, ptr noundef nonnull %n) %cmp = icmp eq i32 %call, 2 %17 = load i32, ptr %t, align 4 %18 = load i32, ptr %n, align 4 %or = or i32 %18, %17 %cmp1 = icmp ne i32 %or, 0 %19 = select i1 %cmp, i1 %cmp1, i1 false br i1 %19, label %while.body, label %while.end, !llvm.loop !13 while.end: ; preds = %for.end21, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nosync nounwind memory(readwrite, 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11}
#include<stdio.h> #include<stdlib.h> #include<string.h> int fun(char *,char *,int ); int fun(char *s1,char *s2,int n) { int i,j=0,t=0; for(i=0;i<n;i++) { while(s1[i+t]==s2[j+t]) { t++; if(s1[i+t]=='\0') { break; } } if(s1[i+t]!=s2[j+t]&&s1[i+t]!='\0') { t=0; } if(s1[i+t]=='\0') { break; } } return 2*n-t; } int main() { char a[101]; char b[101]; int n; scanf("%d%s%s",&n,a,b); printf("%d\n",fun(a,b,n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219078/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219078/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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%s%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @fun(ptr nocapture noundef readonly %s1, ptr nocapture noundef readonly %s2, i32 noundef %n) local_unnamed_addr #0 { entry: %cmp61 = icmp sgt i32 %n, 0 br i1 %cmp61, label %while.cond.preheader.preheader, label %for.end while.cond.preheader.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %while.cond.preheader while.cond.preheader: ; preds = %while.end, %while.cond.preheader.preheader %indvars.iv68 = phi i64 [ 0, %while.cond.preheader.preheader ], [ %indvars.iv.next69, %while.end ] %t.063 = phi i32 [ 0, %while.cond.preheader.preheader ], [ %t.3, %while.end ] %0 = sext i32 %t.063 to i64 %invariant.gep = getelementptr i8, ptr %s1, i64 %indvars.iv68 %invariant.gep74 = getelementptr i8, ptr %s1, i64 %indvars.iv68 br label %while.cond while.cond: ; preds = %while.cond.preheader, %while.body %indvars.iv = phi i64 [ %0, %while.cond.preheader ], [ %indvars.iv.next, %while.body ] %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv %1 = load i8, ptr %gep, align 1, !tbaa !5 %arrayidx3 = getelementptr inbounds i8, ptr %s2, i64 %indvars.iv %2 = load i8, ptr %arrayidx3, align 1, !tbaa !5 %cmp5 = icmp eq i8 %1, %2 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %while.cond %indvars.iv.next = add i64 %indvars.iv, 1 %gep75 = getelementptr i8, ptr %invariant.gep74, i64 %indvars.iv.next %3 = load i8, ptr %gep75, align 1, !tbaa !5 %cmp11 = icmp eq i8 %3, 0 br i1 %cmp11, label %while.end, label %while.cond, !llvm.loop !8 while.end: ; preds = %while.body, %while.cond %t.2.in = phi i64 [ %indvars.iv.next, %while.body ], [ %indvars.iv, %while.cond ] %t.2 = trunc i64 %t.2.in to i32 %sext = shl i64 %t.2.in, 32 %4 = ashr exact i64 %sext, 32 %5 = getelementptr i8, ptr %s1, i64 %4 %arrayidx15 = getelementptr i8, ptr %5, i64 %indvars.iv68 %6 = load i8, ptr %arrayidx15, align 1, !tbaa !5 %arrayidx19 = getelementptr inbounds i8, ptr %s2, i64 %4 %7 = load i8, ptr %arrayidx19, align 1, !tbaa !5 %cmp21.not = icmp eq i8 %6, %7 %cmp27.not = icmp eq i8 %6, 0 %8 = or i1 %cmp27.not, %cmp21.not %t.3 = select i1 %8, i32 %t.2, i32 0 %9 = sext i32 %t.3 to i64 %10 = getelementptr i8, ptr %s1, i64 %indvars.iv68 %arrayidx33 = getelementptr i8, ptr %10, i64 %9 %11 = load i8, ptr %arrayidx33, align 1, !tbaa !5 %cmp35 = icmp eq i8 %11, 0 %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %exitcond.not = icmp eq i64 %indvars.iv.next69, %wide.trip.count %or.cond = select i1 %cmp35, i1 true, i1 %exitcond.not br i1 %or.cond, label %for.end, label %while.cond.preheader, !llvm.loop !10 for.end: ; preds = %while.end, %entry %t.4 = phi i32 [ 0, %entry ], [ %t.3, %while.end ] %mul = shl nsw i32 %n, 1 %sub = sub nsw i32 %mul, %t.4 ret i32 %sub } ; 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: %a = alloca [101 x i8], align 16 %b = alloca [101 x i8], align 16 %n = alloca i32, align 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 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %n, align 4, !tbaa !11 %cmp61.i = icmp sgt i32 %0, 0 br i1 %cmp61.i, label %while.cond.preheader.preheader.i, label %fun.exit while.cond.preheader.preheader.i: ; preds = %entry %wide.trip.count.i = zext i32 %0 to i64 br label %while.cond.preheader.i while.cond.preheader.i: ; preds = %while.end.i, %while.cond.preheader.preheader.i %indvars.iv68.i = phi i64 [ 0, %while.cond.preheader.preheader.i ], [ %indvars.iv.next69.i, %while.end.i ] %t.063.i = phi i32 [ 0, %while.cond.preheader.preheader.i ], [ %t.3.i, %while.end.i ] %1 = sext i32 %t.063.i to i64 %invariant.gep.i = getelementptr i8, ptr %a, i64 %indvars.iv68.i %gep.i.phi.trans.insert = getelementptr i8, ptr %invariant.gep.i, i64 %1 %.pre = load i8, ptr %gep.i.phi.trans.insert, align 1, !tbaa !5 br label %while.cond.i while.cond.i: ; preds = %while.body.i, %while.cond.preheader.i %2 = phi i8 [ %.pre, %while.cond.preheader.i ], [ %4, %while.body.i ] %indvars.iv.i = phi i64 [ %1, %while.cond.preheader.i ], [ %indvars.iv.next.i, %while.body.i ] %arrayidx3.i = getelementptr inbounds i8, ptr %b, i64 %indvars.iv.i %3 = load i8, ptr %arrayidx3.i, align 1, !tbaa !5 %cmp5.i = icmp eq i8 %2, %3 br i1 %cmp5.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %while.cond.i %indvars.iv.next.i = add i64 %indvars.iv.i, 1 %gep75.i = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i %4 = load i8, ptr %gep75.i, align 1, !tbaa !5 %cmp11.i = icmp eq i8 %4, 0 br i1 %cmp11.i, label %while.end.i, label %while.cond.i, !llvm.loop !8 while.end.i: ; preds = %while.body.i, %while.cond.i %t.2.in.i = phi i64 [ %indvars.iv.next.i, %while.body.i ], [ %indvars.iv.i, %while.cond.i ] %t.2.i = trunc i64 %t.2.in.i to i32 %sext.i = shl i64 %t.2.in.i, 32 %5 = ashr exact i64 %sext.i, 32 %6 = getelementptr i8, ptr %a, i64 %5 %arrayidx15.i = getelementptr i8, ptr %6, i64 %indvars.iv68.i %7 = load i8, ptr %arrayidx15.i, align 1, !tbaa !5 %arrayidx19.i = getelementptr inbounds i8, ptr %b, i64 %5 %8 = load i8, ptr %arrayidx19.i, align 1, !tbaa !5 %cmp21.not.i = icmp eq i8 %7, %8 %cmp27.not.i = icmp eq i8 %7, 0 %9 = or i1 %cmp27.not.i, %cmp21.not.i %t.3.i = select i1 %9, i32 %t.2.i, i32 0 %10 = sext i32 %t.3.i to i64 %arrayidx33.i = getelementptr i8, ptr %invariant.gep.i, i64 %10 %11 = load i8, ptr %arrayidx33.i, align 1, !tbaa !5 %cmp35.i = icmp eq i8 %11, 0 %indvars.iv.next69.i = add nuw nsw i64 %indvars.iv68.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next69.i, %wide.trip.count.i %or.cond.i = select i1 %cmp35.i, i1 true, i1 %exitcond.not.i br i1 %or.cond.i, label %fun.exit, label %while.cond.preheader.i, !llvm.loop !10 fun.exit: ; preds = %while.end.i, %entry %t.4.i = phi i32 [ 0, %entry ], [ %t.3.i, %while.end.i ] %mul.i = shl nsw i32 %0, 1 %sub.i = sub nsw i32 %mul.i, %t.4.i %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #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: 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 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 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9} !11 = !{!12, !12, i64 0} !12 = !{!"int", !6, i64 0}
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define sl(x) scanf("%ld", &x) #define ss(x) scanf("%s", x) #define pl(x) printf("%ld\n", x) #define INF 100000000000 #define M 1000000007 #define min(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) int main() { long N; char s[101]; char t[101]; int i, j; sl(N); ss(s); ss(t); for(i=0;i<N;i++) { for(j=0;j<N-i;j++) { if(t[j] != s[i+j]) break; } if(j == N - i) { pl(N + i); return 0; } } pl(2 * N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219128/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219128/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i64, align 8 %s = alloca [101 x i8], align 16 %t = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #3 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %t) #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.1, ptr noundef nonnull %s) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t) %0 = load i64, ptr %N, align 8, !tbaa !5 %cmp52 = icmp sgt i64 %0, 0 br i1 %cmp52, label %for.cond5.preheader, label %for.end29 for.cond: ; preds = %for.end %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1 %indvars.iv.next59 = add i64 %indvars.iv58, -1 %exitcond.not = icmp eq i64 %indvars.iv.next62, %0 br i1 %exitcond.not, label %for.end29, label %for.cond5.preheader, !llvm.loop !9 for.cond5.preheader: ; preds = %entry, %for.cond %indvars.iv61 = phi i64 [ %indvars.iv.next62, %for.cond ], [ 0, %entry ] %indvars.iv58 = phi i64 [ %indvars.iv.next59, %for.cond ], [ %0, %entry ] %sub = sub nsw i64 %0, %indvars.iv61 %cmp846 = icmp sgt i64 %sub, 0 br i1 %cmp846, label %for.body10, label %for.end for.cond5: ; preds = %for.body10 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %cmp8 = icmp sgt i64 %sub, %indvars.iv.next br i1 %cmp8, label %for.body10, label %for.end, !llvm.loop !11 for.body10: ; preds = %for.cond5.preheader, %for.cond5 %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond5 ], [ 0, %for.cond5.preheader ] %arrayidx = getelementptr inbounds [101 x i8], ptr %t, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !12 %2 = add nuw nsw i64 %indvars.iv, %indvars.iv61 %arrayidx13 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %2 %3 = load i8, ptr %arrayidx13, align 1, !tbaa !12 %cmp15.not = icmp eq i8 %1, %3 br i1 %cmp15.not, label %for.cond5, label %for.end for.end: ; preds = %for.cond5, %for.body10, %for.cond5.preheader %conv6.lcssa = phi i64 [ 0, %for.cond5.preheader ], [ %indvars.iv, %for.body10 ], [ %indvars.iv58, %for.cond5 ] %cmp20 = icmp eq i64 %sub, %conv6.lcssa br i1 %cmp20, label %if.then22, label %for.cond if.then22: ; preds = %for.end %add24 = add nsw i64 %0, %indvars.iv61 br label %cleanup for.end29: ; preds = %for.cond, %entry %mul = shl nsw i64 %0, 1 br label %cleanup cleanup: ; preds = %for.end29, %if.then22 %mul.sink = phi i64 [ %mul, %for.end29 ], [ %add24, %if.then22 ] %call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %mul.sink) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!7, !7, i64 0}
#include <stdio.h> int c, p, l, lp; long long r; void write(long long n) { if(n) { write(n / 10); putchar_unlocked('0' + n % 10); } } int main() { for(; (c = getchar_unlocked()) != EOF && c > ' '; r += ++l) { if(c != p) { if(c == '<') r -= l < lp ? l : lp; p = c, lp = l, l = 0; } } if(p == '>') r -= l < lp ? l : lp; write(r); putchar_unlocked('\n'); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219179/source.c" target datalayout = "e-m:e-p270: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] } @c = dso_local local_unnamed_addr global i32 0, align 4 @p = dso_local local_unnamed_addr global i32 0, align 4 @l = dso_local local_unnamed_addr global i32 0, align 4 @lp = dso_local local_unnamed_addr global i32 0, align 4 @r = dso_local local_unnamed_addr global i64 0, align 8 @stdout = external local_unnamed_addr global ptr, align 8 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local void @write(i64 noundef %n) local_unnamed_addr #0 { entry: %tobool.not = icmp eq i64 %n, 0 br i1 %tobool.not, label %if.end, label %if.then if.then: ; preds = %entry %div = sdiv i64 %n, 10 tail call void @write(i64 noundef %div) %rem = srem i64 %n, 10 %0 = trunc i64 %rem to i32 %conv = add nsw i32 %0, 48 %1 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %1, i64 0, i32 5 %2 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !9 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %1, i64 0, i32 6 %3 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !14 %cmp.not.i = icmp ult ptr %2, %3 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 %1, i32 noundef %conv) #3 br label %if.end cond.false.i: ; preds = %if.then %conv4.i = trunc i32 %conv to i8 %incdec.ptr.i = getelementptr inbounds i8, ptr %2, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !9 store i8 %conv4.i, ptr %2, align 1, !tbaa !16 br label %if.end if.end: ; preds = %cond.false.i, %cond.true.i, %entry ret void } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %.pre27 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %for.cond for.cond: ; preds = %for.inc, %entry %0 = phi ptr [ %4, %for.inc ], [ %.pre27, %entry ] %_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 !17 %_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 !18 %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 = %for.cond %call.i = tail call i32 @__uflow(ptr noundef nonnull %0) #3 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit cond.false.i: ; preds = %for.cond %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !17 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i = zext i8 %3 to i32 br label %getchar_unlocked.exit getchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i %4 = phi ptr [ %.pre, %cond.true.i ], [ %0, %cond.false.i ] %cond.i = phi i32 [ %call.i, %cond.true.i ], [ %conv3.i, %cond.false.i ] store i32 %cond.i, ptr @c, align 4, !tbaa !19 %cmp1 = icmp sgt i32 %cond.i, 32 %5 = load i32, ptr @p, align 4, !tbaa !19 br i1 %cmp1, label %for.body, label %for.end for.body: ; preds = %getchar_unlocked.exit %cmp2.not = icmp eq i32 %cond.i, %5 %.pre30 = load i32, ptr @l, align 4 br i1 %cmp2.not, label %for.inc, label %if.then if.then: ; preds = %for.body %cmp3 = icmp eq i32 %cond.i, 60 br i1 %cmp3, label %if.then4, label %if.end if.then4: ; preds = %if.then %6 = load i32, ptr @lp, align 4 %cond = tail call i32 @llvm.smin.i32(i32 %.pre30, i32 %6) %conv = sext i32 %cond to i64 %7 = load i64, ptr @r, align 8, !tbaa !20 %sub = sub nsw i64 %7, %conv store i64 %sub, ptr @r, align 8, !tbaa !20 br label %if.end if.end: ; preds = %if.then4, %if.then store i32 %cond.i, ptr @p, align 4, !tbaa !19 store i32 %.pre30, ptr @lp, align 4, !tbaa !19 br label %for.inc for.inc: ; preds = %for.body, %if.end %8 = phi i32 [ %.pre30, %for.body ], [ 0, %if.end ] %inc = add nsw i32 %8, 1 store i32 %inc, ptr @l, align 4, !tbaa !19 %conv7 = sext i32 %inc to i64 %9 = load i64, ptr @r, align 8, !tbaa !20 %add = add nsw i64 %9, %conv7 store i64 %add, ptr @r, align 8, !tbaa !20 br label %for.cond, !llvm.loop !22 for.end: ; preds = %getchar_unlocked.exit %cmp8 = icmp eq i32 %5, 62 %.pre28 = load i64, ptr @r, align 8, !tbaa !20 br i1 %cmp8, label %if.then10, label %if.end19 if.then10: ; preds = %for.end %10 = load i32, ptr @l, align 4 %11 = load i32, ptr @lp, align 4 %cond16 = tail call i32 @llvm.smin.i32(i32 %10, i32 %11) %conv17 = sext i32 %cond16 to i64 %sub18 = sub nsw i64 %.pre28, %conv17 store i64 %sub18, ptr @r, align 8, !tbaa !20 br label %if.end19 if.end19: ; preds = %if.then10, %for.end %12 = phi i64 [ %sub18, %if.then10 ], [ %.pre28, %for.end ] tail call void @write(i64 noundef %12) %13 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %13, i64 0, i32 5 %14 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !9 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %13, i64 0, i32 6 %15 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !14 %cmp.not.i21 = icmp ult ptr %14, %15 br i1 %cmp.not.i21, label %cond.false.i25, label %cond.true.i22, !prof !15 cond.true.i22: ; preds = %if.end19 %call.i23 = tail call i32 @__overflow(ptr noundef nonnull %13, i32 noundef 10) #3 br label %putchar_unlocked.exit cond.false.i25: ; preds = %if.end19 %incdec.ptr.i26 = getelementptr inbounds i8, ptr %14, i64 1 store ptr %incdec.ptr.i26, ptr %_IO_write_ptr.i, align 8, !tbaa !9 store i8 10, ptr %14, align 1, !tbaa !16 br label %putchar_unlocked.exit putchar_unlocked.exit: ; preds = %cond.true.i22, %cond.false.i25 ret i32 0 } declare i32 @__overflow(ptr noundef, i32 noundef) local_unnamed_addr #1 declare i32 @__uflow(ptr noundef) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #2 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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } 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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 40} !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 48} !15 = !{!"branch_weights", i32 2000, i32 1} !16 = !{!7, !7, i64 0} !17 = !{!10, !6, i64 8} !18 = !{!10, !6, i64 16} !19 = !{!11, !11, i64 0} !20 = !{!21, !21, i64 0} !21 = !{!"long long", !7, i64 0} !22 = distinct !{!22, !23} !23 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int n , a , b; scanf("%d %d %d",&n ,&a ,&b); if((b-a)%2 == 0){ printf("Alice\n"); } else{ printf("Borys\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219221/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [6 x i8] c"Borys\00", align 1 @str.3 = private unnamed_addr constant [6 x i8] c"Alice\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %2 = and i32 %sub, 1 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @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() { double a,b,c,d,i,j,k; scanf("%lf %lf %lf %lf",&a,&b,&c,&d); a=a/2; k=3.1415926535897*(a*a)*b; i=(3.1415926535897)*(a*a)*d; if(i>c) printf("NO"); else { printf("YES\n"); j=1/(c-i); printf("%.12lf",k/(c-i)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21928/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21928/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf %lf %lf %lf\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @.str.3 = private unnamed_addr constant [7 x i8] c"%.12lf\00", align 1 @str = 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 double, align 8 %b = alloca double, align 8 %c = alloca double, align 8 %d = alloca double, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 8, 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 double, ptr %a, align 8, !tbaa !5 %div = fmul double %0, 5.000000e-01 store double %div, ptr %a, align 8, !tbaa !5 %mul = fmul double %div, %div %mul1 = fmul double %mul, 0x400921FB54442C46 %1 = load double, ptr %d, align 8, !tbaa !5 %mul5 = fmul double %1, %mul1 %2 = load double, ptr %c, align 8, !tbaa !5 %cmp = fcmp ogt double %mul5, %2 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) br label %if.end if.else: ; preds = %entry %3 = load double, ptr %b, align 8, !tbaa !5 %mul2 = fmul double %mul1, %3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %4 = load double, ptr %c, align 8, !tbaa !5 %sub = fsub double %4, %mul5 %div10 = fdiv double %mul2, %sub %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, double noundef %div10) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!"double", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> int fun(const void *a,const void *b) { return *(int *)b-*(int *)a; } int main() { long long int n,k,li[100001],sum=0,total=0,ans,rest; scanf("%lld",&n); for(k=0;k<n;k++) { scanf("%lld",&li[k]); total+=li[k]; } qsort(li,n,sizeof(li[0]),fun); //printf("%lld %lld %lld",li[0],li[1],li[2]); k=1; while(sum<li[0]) { sum+=li[k]; k++; } sum=sum-li[k-1]; //printf("**%lld**",sum); rest=total-sum-li[0]; ans=li[0]-sum-rest+1; printf("%lld\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21933/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21933/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @fun(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: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i64, align 8 %li = alloca [100001 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %li) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !9 %cmp31 = icmp sgt i64 %0, 0 br i1 %cmp31, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %k.033 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %total.032 = phi i64 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100001 x i64], ptr %li, i64 0, i64 %k.033 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %1 = load i64, ptr %arrayidx, align 8, !tbaa !9 %add = add nsw i64 %1, %total.032 %inc = add nuw nsw i64 %k.033, 1 %2 = load i64, ptr %n, align 8, !tbaa !9 %cmp = icmp slt i64 %inc, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body, %entry %total.0.lcssa = phi i64 [ 0, %entry ], [ %add, %for.body ] %.lcssa30 = phi i64 [ %0, %entry ], [ %2, %for.body ] call void @qsort(ptr noundef nonnull %li, i64 noundef %.lcssa30, i64 noundef 8, ptr noundef nonnull @fun) #5 %3 = load i64, ptr %li, align 16, !tbaa !9 %factor = shl i64 %3, 1 %reass.sub = sub i64 %factor, %total.0.lcssa %add16 = add i64 %reass.sub, 1 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %add16) call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %li) #5 call void @llvm.lifetime.end.p0(i64 8, 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 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> int s[100010],t[100010],idx[100010]; int c(const void*p,const void*q){ if(t[*(int*)p]<t[*(int*)q])return -1; return 1; } int main(){ int n; scanf("%d",&n); for(int i=0;i<n;i++)scanf("%d%d",s+i,t+i); for(int i=0;i<n;i++)idx[i]=i; qsort(idx,n,sizeof(int),c); int ans=0,time=0; for(int i=0;i<n;i++){ if(time<s[idx[i]]){ time=t[idx[i]]; ans++; } } printf("%d\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219380/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219380/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @t = dso_local global [100010 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @s = dso_local global [100010 x i32] zeroinitializer, align 16 @idx = dso_local global [100010 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, inaccessiblemem: none) uwtable define dso_local i32 @c(ptr nocapture noundef readonly %p, ptr nocapture noundef readonly %q) #0 { entry: %0 = load i32, ptr %p, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds [100010 x i32], ptr @t, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = load i32, ptr %q, align 4, !tbaa !5 %idxprom1 = sext i32 %2 to i64 %arrayidx2 = getelementptr inbounds [100010 x i32], ptr @t, i64 0, i64 %idxprom1 %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp = icmp slt i32 %1, %3 %. = select i1 %cmp, i32 -1, i32 1 ret i32 %. } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { 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 %cmp43 = icmp sgt i32 %0, 0 br i1 %cmp43, label %for.body, label %for.cond.cleanup7 for.cond5.preheader: ; preds = %for.body %cmp645 = icmp sgt i32 %4, 0 br i1 %cmp645, label %for.body8.preheader, label %for.cond.cleanup7 for.body8.preheader: ; preds = %for.cond5.preheader %wide.trip.count = zext i32 %4 to i64 %min.iters.check = icmp ult i32 %4, 8 br i1 %min.iters.check, label %for.body8.preheader66, label %vector.ph vector.ph: ; preds = %for.body8.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.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %1 = getelementptr inbounds [100010 x i32], ptr @idx, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> %step.add, ptr %2, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %3 = icmp eq i64 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup7, label %for.body8.preheader66 for.body8.preheader66: ; preds = %for.body8.preheader, %middle.block %indvars.iv54.ph = phi i64 [ 0, %for.body8.preheader ], [ %n.vec, %middle.block ] br label %for.body8 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i32, ptr @s, i64 %indvars.iv %add.ptr2 = getelementptr inbounds i32, ptr @t, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr, ptr noundef nonnull %add.ptr2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %for.body, label %for.cond5.preheader, !llvm.loop !13 for.cond.cleanup7: ; preds = %for.body8, %middle.block, %entry, %for.cond5.preheader %.lcssa64 = phi i32 [ %4, %for.cond5.preheader ], [ %0, %entry ], [ %4, %middle.block ], [ %4, %for.body8 ] %conv = sext i32 %.lcssa64 to i64 call void @qsort(ptr noundef nonnull @idx, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @c) #5 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp1447 = icmp sgt i32 %6, 0 br i1 %cmp1447, label %for.body17.preheader, label %for.cond.cleanup16 for.body17.preheader: ; preds = %for.cond.cleanup7 %wide.trip.count60 = zext i32 %6 to i64 %xtraiter = and i64 %wide.trip.count60, 1 %7 = icmp eq i32 %6, 1 br i1 %7, label %for.cond.cleanup16.loopexit.unr-lcssa, label %for.body17.preheader.new for.body17.preheader.new: ; preds = %for.body17.preheader %unroll_iter = and i64 %wide.trip.count60, 4294967294 br label %for.body17 for.body8: ; preds = %for.body8.preheader66, %for.body8 %indvars.iv54 = phi i64 [ %indvars.iv.next55, %for.body8 ], [ %indvars.iv54.ph, %for.body8.preheader66 ] %arrayidx = getelementptr inbounds [100010 x i32], ptr @idx, i64 0, i64 %indvars.iv54 %8 = trunc i64 %indvars.iv54 to i32 store i32 %8, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup7, label %for.body8, !llvm.loop !14 for.cond.cleanup16.loopexit.unr-lcssa: ; preds = %for.inc29.1, %for.body17.preheader %ans.1.lcssa.ph = phi i32 [ undef, %for.body17.preheader ], [ %ans.1.1, %for.inc29.1 ] %indvars.iv57.unr = phi i64 [ 0, %for.body17.preheader ], [ %indvars.iv.next58.1, %for.inc29.1 ] %time.049.unr = phi i32 [ 0, %for.body17.preheader ], [ %time.1.1, %for.inc29.1 ] %ans.048.unr = phi i32 [ 0, %for.body17.preheader ], [ %ans.1.1, %for.inc29.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup16, label %for.body17.epil for.body17.epil: ; preds = %for.cond.cleanup16.loopexit.unr-lcssa %arrayidx19.epil = getelementptr inbounds [100010 x i32], ptr @idx, i64 0, i64 %indvars.iv57.unr %9 = load i32, ptr %arrayidx19.epil, align 4, !tbaa !5 %idxprom20.epil = sext i32 %9 to i64 %arrayidx21.epil = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %idxprom20.epil %10 = load i32, ptr %arrayidx21.epil, align 4, !tbaa !5 %cmp22.epil = icmp slt i32 %time.049.unr, %10 %inc28.epil = add nsw i32 %ans.048.unr, 1 %spec.select = select i1 %cmp22.epil, i32 %inc28.epil, i32 %ans.048.unr br label %for.cond.cleanup16 for.cond.cleanup16: ; preds = %for.body17.epil, %for.cond.cleanup16.loopexit.unr-lcssa, %for.cond.cleanup7 %ans.0.lcssa = phi i32 [ 0, %for.cond.cleanup7 ], [ %ans.1.lcssa.ph, %for.cond.cleanup16.loopexit.unr-lcssa ], [ %spec.select, %for.body17.epil ] %call32 = 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 %n) #5 ret i32 0 for.body17: ; preds = %for.inc29.1, %for.body17.preheader.new %indvars.iv57 = phi i64 [ 0, %for.body17.preheader.new ], [ %indvars.iv.next58.1, %for.inc29.1 ] %time.049 = phi i32 [ 0, %for.body17.preheader.new ], [ %time.1.1, %for.inc29.1 ] %ans.048 = phi i32 [ 0, %for.body17.preheader.new ], [ %ans.1.1, %for.inc29.1 ] %niter = phi i64 [ 0, %for.body17.preheader.new ], [ %niter.next.1, %for.inc29.1 ] %arrayidx19 = getelementptr inbounds [100010 x i32], ptr @idx, i64 0, i64 %indvars.iv57 %11 = load i32, ptr %arrayidx19, align 8, !tbaa !5 %idxprom20 = sext i32 %11 to i64 %arrayidx21 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %idxprom20 %12 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %cmp22 = icmp slt i32 %time.049, %12 br i1 %cmp22, label %if.then, label %for.inc29 if.then: ; preds = %for.body17 %arrayidx27 = getelementptr inbounds [100010 x i32], ptr @t, i64 0, i64 %idxprom20 %13 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %inc28 = add nsw i32 %ans.048, 1 br label %for.inc29 for.inc29: ; preds = %for.body17, %if.then %ans.1 = phi i32 [ %inc28, %if.then ], [ %ans.048, %for.body17 ] %time.1 = phi i32 [ %13, %if.then ], [ %time.049, %for.body17 ] %indvars.iv.next58 = or i64 %indvars.iv57, 1 %arrayidx19.1 = getelementptr inbounds [100010 x i32], ptr @idx, i64 0, i64 %indvars.iv.next58 %14 = load i32, ptr %arrayidx19.1, align 4, !tbaa !5 %idxprom20.1 = sext i32 %14 to i64 %arrayidx21.1 = getelementptr inbounds [100010 x i32], ptr @s, i64 0, i64 %idxprom20.1 %15 = load i32, ptr %arrayidx21.1, align 4, !tbaa !5 %cmp22.1 = icmp slt i32 %time.1, %15 br i1 %cmp22.1, label %if.then.1, label %for.inc29.1 if.then.1: ; preds = %for.inc29 %arrayidx27.1 = getelementptr inbounds [100010 x i32], ptr @t, i64 0, i64 %idxprom20.1 %16 = load i32, ptr %arrayidx27.1, align 4, !tbaa !5 %inc28.1 = add nsw i32 %ans.1, 1 br label %for.inc29.1 for.inc29.1: ; preds = %if.then.1, %for.inc29 %ans.1.1 = phi i32 [ %inc28.1, %if.then.1 ], [ %ans.1, %for.inc29 ] %time.1.1 = phi i32 [ %16, %if.then.1 ], [ %time.1, %for.inc29 ] %indvars.iv.next58.1 = add nuw nsw i64 %indvars.iv57, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup16.loopexit.unr-lcssa, label %for.body17, !llvm.loop !15 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; 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 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(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 #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, !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} !15 = distinct !{!15, !10}
#include<stdio.h> int main() { int N; scanf("%d",&N); if((N/100)==(N%10))printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219423/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219423/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %div = sdiv i32 %0, 100 %rem = srem i32 %0, 10 %cmp = icmp eq i32 %div, %rem %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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 num; scanf("%d", &num); int numCopy = num; int numReverse = 0; int tmp; while (numCopy != 0) { tmp = numCopy % 10; numCopy = numCopy / 10; numReverse = numReverse * 10 + tmp; } if (num == numReverse) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219467/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219467/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %num = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %0 = load i32, ptr %num, align 4, !tbaa !5 %cmp.not8 = icmp eq i32 %0, 0 br i1 %cmp.not8, label %if.end, label %while.body while.body: ; preds = %entry, %while.body %numCopy.010 = phi i32 [ %div, %while.body ], [ %0, %entry ] %numReverse.09 = phi i32 [ %add, %while.body ], [ 0, %entry ] %rem = srem i32 %numCopy.010, 10 %div = sdiv i32 %numCopy.010, 10 %mul = mul nsw i32 %numReverse.09, 10 %add = add nsw i32 %rem, %mul %numCopy.010.off = add i32 %numCopy.010, 9 %cmp.not = icmp ult i32 %numCopy.010.off, 19 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body %cmp1 = icmp eq i32 %0, %add %spec.select = select i1 %cmp1, ptr @str.3, ptr @str br label %if.end if.end: ; preds = %while.end, %entry %str.sink = phi ptr [ @str.3, %entry ], [ %spec.select, %while.end ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #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 ar[120000]; int main(){ int t=0,max=-1e9,a,b,c,d,x,y,z,i,j; scanf("%d",&a); for(x=1;x<=a;x++){ scanf("%d",&ar[x]); } for(i=1;i<=a;i++){ if(ar[i]>max) max=ar[i]; } for(i=1;i<=a;i++){ if(ar[i]!=max){ t=t+ar[i]; } } printf("%d",max-t+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_21951/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_21951/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @ar = dso_local global [120000 x i32] zeroinitializer, align 16 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp.not42 = icmp slt i32 %0, 1 br i1 %cmp.not42, label %for.end25, label %for.body for.cond2.preheader: ; preds = %for.body %cmp3.not44 = icmp slt i32 %9, 1 br i1 %cmp3.not44, label %for.end25, label %for.body4.preheader for.body4.preheader: ; preds = %for.cond2.preheader %1 = add nuw i32 %9, 1 %wide.trip.count = zext i32 %1 to i64 %2 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %9, 8 br i1 %min.iters.check, label %for.body4.preheader92, label %vector.ph vector.ph: ; preds = %for.body4.preheader %n.vec = and i64 %2, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, %vector.ph ], [ %5, %vector.body ] %vec.phi70 = phi <4 x i32> [ <i32 -1000000000, i32 -1000000000, i32 -1000000000, i32 -1000000000>, %vector.ph ], [ %6, %vector.body ] %offset.idx = or i64 %index, 1 %3 = getelementptr inbounds [120000 x i32], ptr @ar, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 %wide.load71 = load <4 x i32>, ptr %4, align 4, !tbaa !5 %5 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi) %6 = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %wide.load71, <4 x i32> %vec.phi70) %index.next = add nuw i64 %index, 8 %7 = icmp eq i64 %index.next, %n.vec br i1 %7, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %rdx.minmax = call <4 x i32> @llvm.smax.v4i32(<4 x i32> %5, <4 x i32> %6) %8 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %2, %n.vec br i1 %cmp.n, label %for.cond13.preheader, label %for.body4.preheader92 for.body4.preheader92: ; preds = %for.body4.preheader, %middle.block %indvars.iv54.ph = phi i64 [ 1, %for.body4.preheader ], [ %ind.end, %middle.block ] %max.045.ph = phi i32 [ -1000000000, %for.body4.preheader ], [ %8, %middle.block ] br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [120000 x i32], ptr @ar, 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 %9 = load i32, ptr %a, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %10 br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !13 for.cond13.preheader: ; preds = %for.body4, %middle.block %spec.select.lcssa = phi i32 [ %8, %middle.block ], [ %spec.select, %for.body4 ] br i1 %cmp3.not44, label %for.end25, label %for.body15.preheader for.body15.preheader: ; preds = %for.cond13.preheader %11 = add nuw i32 %9, 1 %wide.trip.count60 = zext i32 %11 to i64 %12 = add nsw i64 %wide.trip.count, -1 %min.iters.check74 = icmp ult i32 %9, 8 br i1 %min.iters.check74, label %for.body15.preheader90, label %vector.ph75 vector.ph75: ; preds = %for.body15.preheader %n.vec77 = and i64 %12, -8 %ind.end78 = or i64 %n.vec77, 1 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %spec.select.lcssa, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body81 vector.body81: ; preds = %vector.body81, %vector.ph75 %index82 = phi i64 [ 0, %vector.ph75 ], [ %index.next88, %vector.body81 ] %vec.phi83 = phi <4 x i32> [ zeroinitializer, %vector.ph75 ], [ %19, %vector.body81 ] %vec.phi84 = phi <4 x i32> [ zeroinitializer, %vector.ph75 ], [ %20, %vector.body81 ] %offset.idx85 = or i64 %index82, 1 %13 = getelementptr inbounds [120000 x i32], ptr @ar, i64 0, i64 %offset.idx85 %wide.load86 = load <4 x i32>, ptr %13, align 4, !tbaa !5 %14 = getelementptr inbounds i32, ptr %13, i64 4 %wide.load87 = load <4 x i32>, ptr %14, align 4, !tbaa !5 %15 = icmp eq <4 x i32> %wide.load86, %broadcast.splat %16 = icmp eq <4 x i32> %wide.load87, %broadcast.splat %17 = select <4 x i1> %15, <4 x i32> zeroinitializer, <4 x i32> %wide.load86 %18 = select <4 x i1> %16, <4 x i32> zeroinitializer, <4 x i32> %wide.load87 %19 = add <4 x i32> %17, %vec.phi83 %20 = add <4 x i32> %18, %vec.phi84 %index.next88 = add nuw i64 %index82, 8 %21 = icmp eq i64 %index.next88, %n.vec77 br i1 %21, label %middle.block72, label %vector.body81, !llvm.loop !14 middle.block72: ; preds = %vector.body81 %bin.rdx = add <4 x i32> %20, %19 %22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n80 = icmp eq i64 %12, %n.vec77 br i1 %cmp.n80, label %for.end25, label %for.body15.preheader90 for.body15.preheader90: ; preds = %for.body15.preheader, %middle.block72 %indvars.iv57.ph = phi i64 [ 1, %for.body15.preheader ], [ %ind.end78, %middle.block72 ] %t.050.ph = phi i32 [ 0, %for.body15.preheader ], [ %22, %middle.block72 ] br label %for.body15 for.body4: ; preds = %for.body4.preheader92, %for.body4 %indvars.iv54 = phi i64 [ %indvars.iv.next55, %for.body4 ], [ %indvars.iv54.ph, %for.body4.preheader92 ] %max.045 = phi i32 [ %spec.select, %for.body4 ], [ %max.045.ph, %for.body4.preheader92 ] %arrayidx6 = getelementptr inbounds [120000 x i32], ptr @ar, i64 0, i64 %indvars.iv54 %23 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %spec.select = call i32 @llvm.smax.i32(i32 %23, i32 %max.045) %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count br i1 %exitcond.not, label %for.cond13.preheader, label %for.body4, !llvm.loop !15 for.body15: ; preds = %for.body15.preheader90, %for.body15 %indvars.iv57 = phi i64 [ %indvars.iv.next58, %for.body15 ], [ %indvars.iv57.ph, %for.body15.preheader90 ] %t.050 = phi i32 [ %spec.select41, %for.body15 ], [ %t.050.ph, %for.body15.preheader90 ] %arrayidx17 = getelementptr inbounds [120000 x i32], ptr @ar, i64 0, i64 %indvars.iv57 %24 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %cmp18.not = icmp eq i32 %24, %spec.select.lcssa %add = select i1 %cmp18.not, i32 0, i32 %24 %spec.select41 = add nsw i32 %add, %t.050 %indvars.iv.next58 = add nuw nsw i64 %indvars.iv57, 1 %exitcond61.not = icmp eq i64 %indvars.iv.next58, %wide.trip.count60 br i1 %exitcond61.not, label %for.end25, label %for.body15, !llvm.loop !16 for.end25: ; preds = %for.body15, %middle.block72, %entry, %for.cond2.preheader, %for.cond13.preheader %max.0.lcssa69 = phi i32 [ %spec.select.lcssa, %for.cond13.preheader ], [ -1000000000, %for.cond2.preheader ], [ -1000000000, %entry ], [ %spec.select.lcssa, %middle.block72 ], [ %spec.select.lcssa, %for.body15 ] %t.0.lcssa = phi i32 [ 0, %for.cond13.preheader ], [ 0, %for.cond2.preheader ], [ 0, %entry ], [ %22, %middle.block72 ], [ %spec.select41, %for.body15 ] %sub = add i32 %max.0.lcssa69, 1 %add26 = sub i32 %sub, %t.0.lcssa %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add26) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !11, !12} !15 = distinct !{!15, !10, !12, !11} !16 = distinct !{!16, !10, !12, !11}
#include<stdio.h> int main(){ char x[5]; scanf("%s",x); if(x[0]==x[2])puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219553/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219553/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca [5 x i8], align 1 call void @llvm.lifetime.start.p0(i64 5, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i8, ptr %x, align 1, !tbaa !5 %arrayidx1 = getelementptr inbounds [5 x i8], ptr %x, i64 0, i64 2 %1 = load i8, ptr %arrayidx1, align 1, !tbaa !5 %cmp = icmp eq i8 %0, %1 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call5 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 5, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int main(){ int N; scanf("%d",&N); int a=N/100; int b=N%10; if (a==b){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219618/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219618/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %div = sdiv i32 %0, 100 %rem = srem i32 %0, 10 %cmp = icmp eq i32 %div, %rem %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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() { int N; scanf("%d", &N); if(N%10 == N/100) printf("Yes"); else printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219669/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219669/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %rem = srem i32 %0, 10 %div = sdiv i32 %0, 100 %cmp = icmp eq i32 %rem, %div %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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"}
//set many funcs template //Ver.20181228 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 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 nHr(int a,int b){return nCr(a+b-1,b);} 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;} int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} int sankaku(int x){return ((1+x)*x)/2;} 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 llnHr(long long a,long long b){return llnCr(a+b-1,b);} 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;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} 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 strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);} int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);} int chsortfncsj(const void *a,const void *b){if(*(char *)a>*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} int chsortfnckj(const void *a,const void *b){if(*(char *)a<*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} void shuffledget(int x[],int n){ srand(time(0)); int i,b[524288],p,c; for(i=0;i<n;i++){ b[i]=i; } for(i=n;i>=1;i--){ p=rand()%i; c=b[i-1];b[i-1]=b[p];b[p]=c; } for(i=0;i<n;i++){ scanf("%d",&x[b[i]]); } } int dx4[4]={1,-1,0,0}; int dy4[4]={0,0,1,-1}; int dx8[8]={-1,-1,-1,0,0,1,1,1}; int dy8[8]={-1,0,1,-1,1,-1,0,1}; int search(int x,int a[],int n){ int st=0,fi=n-1,te; while(st<=fi){ te=(st+fi)/2; if(a[te]<x){st=te+1;}else{fi=te-1;} } return st; } void prarr(int arr[],int n){ int i; for(i=0;i<n;i++){ if(i){printf(" ");} printf("%d",arr[i]); } printf("\n"); return; } typedef struct{ int val; int node; }sd; int sdsortfnc(const void *a,const void *b){ if(((sd*)a)->val < ((sd*)b)->val){return -1;} if(((sd*)a)->val > ((sd*)b)->val){return 1;} return 0; } int array[1048576]; int pt=0; void push(int x){ array[pt]=x; pt++; } int pop(){ pt--; int r=array[pt]; return r; } int a,b; int calc(int p,int q){ if(p==0){return q;} if(q==b){return b+p;} if(p==a){return b+a+(b-q);} if(q==0){return b+a+b+(a-p);} return -1; } int main(void){ int p,q,r,s; int i,j,n,m,k,c=0,h,w,l,t; bool fl[524288]={0}; sd data[524288]; scanf("%d%d%d",&a,&b,&n); for(i=0;i<n;i++){ scanf("%d%d%d%d",&p,&q,&r,&s); if(calc(p,q)!=-1 && calc(r,s)!=-1){ data[c].val=calc(p,q); data[c].node=i; c++; data[c].val=calc(r,s); data[c].node=i; c++; } } if(c==0){printf("YES\n");return 0;} qsort(data,c,sizeof(data[0]),sdsortfnc); for(i=0;i<c;i++){ if(fl[data[i].node]==0){ fl[data[i].node]=1; push(data[i].node); } else{ w=pop(); if(w!=data[i].node){printf("NO\n");return 0;} } } printf("YES\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219711/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219711/source.c" target datalayout = "e-m:e-p270: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.sd = type { i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @dx4 = dso_local local_unnamed_addr global [4 x i32] [i32 1, i32 -1, i32 0, i32 0], align 16 @dy4 = dso_local local_unnamed_addr global [4 x i32] [i32 0, i32 0, i32 1, i32 -1], align 16 @dx8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 1, i32 1, i32 1], align 16 @dy8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 0, i32 1, i32 -1, i32 1, i32 -1, i32 0, i32 1], align 16 @pt = dso_local local_unnamed_addr global i32 0, align 4 @array = dso_local local_unnamed_addr global [1048576 x i32] zeroinitializer, align 16 @b = dso_local global i32 0, align 4 @a = dso_local global i32 0, align 4 @.str.3 = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.4 = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @str.7 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.8 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local 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 @nHr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i32 %b, %a %cmp.not6.i = icmp slt i32 %b, 1 br i1 %cmp.not6.i, label %nCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i32 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i32 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i32 %add, %i.07.i %mul.i = mul nsw i32 %sub.i, %r.08.i %div.i = sdiv i32 %mul.i, %i.07.i %inc.i = add nuw i32 %i.07.i, 1 %sub.i.1 = sub i32 %add, %inc.i %mul.i.1 = mul nsw i32 %sub.i.1, %div.i %div.i.1 = sdiv i32 %mul.i.1, %inc.i %inc.i.1 = add nuw i32 %i.07.i, 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 %nCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !7 nCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i32 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %nCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %nCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i32 %add, %i.07.i.unr %mul.i.epil = mul nsw i32 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i32 %mul.i.epil, %i.07.i.unr br label %nCr.exit nCr.exit: ; preds = %for.body.i.epil, %nCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i32 [ 1, %entry ], [ %div.i.lcssa.ph, %nCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i32 %r.0.lcssa.i } ; 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: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsum(i32 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i32 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.05, 10 %add = add nsw i32 %r.06, %rem %div = sdiv i32 %x.addr.05, 10 %x.addr.05.off = add i32 %x.addr.05, 9 %tobool.not = icmp ult i32 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsumb(i32 noundef %x, i32 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i32 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.06, %b %add = add nsw i32 %rem, %r.07 %div = sdiv i32 %x.addr.06, %b %tobool.not = icmp eq i32 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !15 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @sankaku(i32 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i32 %x, 1 %mul = mul nsw i32 %add, %x %div = sdiv i32 %mul, 2 ret i32 %div } ; 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 !16 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 !16 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 !17 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 @llnHr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i64 %b, %a %cmp.not6.i = icmp slt i64 %b, 1 br i1 %cmp.not6.i, label %llnCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %llnCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i64 %b, -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 ] %niter = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i64 %add, %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, %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 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %llnCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !17 llnCr.exit.loopexit.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.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %llnCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %llnCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i64 %add, %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 = %for.body.i.epil, %llnCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i64 [ 1, %entry ], [ %div.i.lcssa.ph, %llnCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i64 %r.0.lcssa.i } ; 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 !18 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 !19 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 !21 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 !22 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 @lldsum(i64 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i64 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.05, 10 %add = add nsw i64 %r.06, %rem %div = sdiv i64 %x.addr.05, 10 %x.addr.05.off = add i64 %x.addr.05, 9 %tobool.not = icmp ult i64 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !23 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lldsumb(i64 noundef %x, i64 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i64 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.06, %b %add = add nsw i64 %rem, %r.07 %div = sdiv i64 %x.addr.06, %b %tobool.not = icmp eq i64 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !24 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llsankaku(i64 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i64 %x, 1 %mul = mul nsw i64 %add, %x %div = sdiv i64 %mul, 2 ret i64 %div } ; 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 !25 %1 = load i32, ptr %b, align 4, !tbaa !25 %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 !25 %1 = load i32, ptr %b, align 4, !tbaa !25 %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 !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %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) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %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 !31 %1 = load double, ptr %b, align 8, !tbaa !31 %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 !31 %1 = load double, ptr %b, align 8, !tbaa !31 %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: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #18 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #18 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @chsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp sgt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext i1 %cmp5 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 @chsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp slt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext i1 %cmp5 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nounwind uwtable define dso_local void @shuffledget(ptr noundef %x, i32 noundef %n) local_unnamed_addr #7 { entry: %b = alloca [524288 x i32], align 16 %call = tail call i64 @time(ptr noundef null) #19 %conv = trunc i64 %call to i32 tail call void @srand(i32 noundef %conv) #19 call void @llvm.lifetime.start.p0(i64 2097152, ptr nonnull %b) #19 %cmp44 = icmp sgt i32 %n, 0 br i1 %cmp44, label %for.body.preheader, label %for.end29 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader61, 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.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %0, align 16, !tbaa !25 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 16, !tbaa !25 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i64 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !34 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond2.preheader, label %for.body.preheader61 for.body.preheader61: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond2.preheader: ; preds = %for.body, %middle.block br i1 %cmp44, label %for.body5.preheader, label %for.end29 for.body5.preheader: ; preds = %for.cond2.preheader %3 = zext i32 %n to i64 br label %for.body5 for.body: ; preds = %for.body.preheader61, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader61 ] %arrayidx = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 4, !tbaa !25 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond2.preheader, label %for.body, !llvm.loop !35 for.cond18.preheader: ; preds = %for.body5 br i1 %cmp44, label %for.body21.preheader, label %for.end29 for.body21.preheader: ; preds = %for.cond18.preheader %wide.trip.count58 = zext i32 %n to i64 br label %for.body21 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv51 = phi i64 [ %3, %for.body5.preheader ], [ %indvars.iv.next52, %for.body5 ] %call6 = tail call i32 @rand() #19 %5 = trunc i64 %indvars.iv51 to i32 %rem = srem i32 %call6, %5 %indvars.iv.next52 = add nsw i64 %indvars.iv51, -1 %idxprom7 = and i64 %indvars.iv.next52, 4294967295 %arrayidx8 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom7 %6 = load i32, ptr %arrayidx8, align 4, !tbaa !25 %idxprom9 = sext i32 %rem to i64 %arrayidx10 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom9 %7 = load i32, ptr %arrayidx10, align 4, !tbaa !25 store i32 %7, ptr %arrayidx8, align 4, !tbaa !25 store i32 %6, ptr %arrayidx10, align 4, !tbaa !25 %cmp3 = icmp ugt i64 %indvars.iv51, 1 br i1 %cmp3, label %for.body5, label %for.cond18.preheader, !llvm.loop !36 for.body21: ; preds = %for.body21.preheader, %for.body21 %indvars.iv54 = phi i64 [ 0, %for.body21.preheader ], [ %indvars.iv.next55, %for.body21 ] %arrayidx23 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv54 %8 = load i32, ptr %arrayidx23, align 4, !tbaa !25 %idxprom24 = sext i32 %8 to i64 %arrayidx25 = getelementptr inbounds i32, ptr %x, i64 %idxprom24 %call26 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx25) %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 %exitcond59.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count58 br i1 %exitcond59.not, label %for.end29, label %for.body21, !llvm.loop !37 for.end29: ; preds = %for.body21, %entry, %for.cond2.preheader, %for.cond18.preheader call void @llvm.lifetime.end.p0(i64 2097152, ptr nonnull %b) #19 ret void } ; Function Attrs: nounwind declare void @srand(i32 noundef) local_unnamed_addr #8 ; Function Attrs: nounwind declare i64 @time(ptr noundef) local_unnamed_addr #8 ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #8 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #9 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @search(i32 noundef %x, ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #10 { entry: %cmp.not9 = icmp slt i32 %n, 1 br i1 %cmp.not9, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %entry %sub = add nsw i32 %n, -1 br label %while.body while.body: ; preds = %while.body.preheader, %while.body %st.011 = phi i32 [ %st.1, %while.body ], [ 0, %while.body.preheader ] %fi.010 = phi i32 [ %fi.1, %while.body ], [ %sub, %while.body.preheader ] %add = add nsw i32 %st.011, %fi.010 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !25 %cmp1 = icmp slt i32 %0, %x %add2 = add nsw i32 %div, 1 %sub3 = add nsw i32 %div, -1 %fi.1 = select i1 %cmp1, i32 %fi.010, i32 %sub3 %st.1 = select i1 %cmp1, i32 %add2, i32 %st.011 %cmp.not = icmp sgt i32 %st.1, %fi.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !38 while.end: ; preds = %while.body, %entry %st.0.lcssa = phi i32 [ 0, %entry ], [ %st.1, %while.body ] ret i32 %st.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local void @prarr(ptr nocapture noundef readonly %arr, i32 noundef %n) local_unnamed_addr #11 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %if.end.peel, label %for.end if.end.peel: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %.pre = load i32, ptr %arr, align 4, !tbaa !25 %call1.peel = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre) %exitcond.peel.not = icmp eq i32 %n, 1 br i1 %exitcond.peel.not, label %for.end, label %if.end if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar6 = tail call i32 @putchar(i32 32) %arrayidx = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !25 %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %if.end, !llvm.loop !39 for.end: ; preds = %if.end, %if.end.peel, %entry %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #9 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sdsortfnc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !41 %1 = load i32, ptr %b, align 4, !tbaa !41 %cmp = icmp slt i32 %0, %1 %cmp4 = icmp sgt i32 %0, %1 %. = zext i1 %cmp4 to i32 %retval.0 = select i1 %cmp, i32 -1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @push(i32 noundef %x) local_unnamed_addr #12 { entry: %0 = load i32, ptr @pt, align 4, !tbaa !25 %idxprom = sext i32 %0 to i64 %arrayidx = getelementptr inbounds [1048576 x i32], ptr @array, i64 0, i64 %idxprom store i32 %x, ptr %arrayidx, align 4, !tbaa !25 %inc = add nsw i32 %0, 1 store i32 %inc, ptr @pt, align 4, !tbaa !25 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @pop() local_unnamed_addr #12 { entry: %0 = load i32, ptr @pt, align 4, !tbaa !25 %dec = add nsw i32 %0, -1 store i32 %dec, ptr @pt, align 4, !tbaa !25 %idxprom = sext i32 %dec to i64 %arrayidx = getelementptr inbounds [1048576 x i32], ptr @array, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !25 ret i32 %1 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @calc(i32 noundef %p, i32 noundef %q) local_unnamed_addr #13 { entry: %cmp = icmp eq i32 %p, 0 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %0 = load i32, ptr @b, align 4, !tbaa !25 %cmp1 = icmp eq i32 %0, %q br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end %add = add nsw i32 %q, %p br label %return if.end3: ; preds = %if.end %1 = load i32, ptr @a, align 4, !tbaa !25 %cmp4 = icmp eq i32 %1, %p br i1 %cmp4, label %if.then5, label %if.end8 if.then5: ; preds = %if.end3 %factor = shl i32 %0, 1 %sub = sub i32 %factor, %q %add7 = add i32 %sub, %p br label %return if.end8: ; preds = %if.end3 %cmp9 = icmp eq i32 %q, 0 br i1 %cmp9, label %if.then10, label %return if.then10: ; preds = %if.end8 %reass.add24 = add i32 %1, %0 %reass.mul = shl i32 %reass.add24, 1 %add14 = sub i32 %reass.mul, %p br label %return return: ; preds = %if.end8, %entry, %if.then10, %if.then5, %if.then2 %retval.0 = phi i32 [ %add, %if.then2 ], [ %add7, %if.then5 ], [ %add14, %if.then10 ], [ %q, %entry ], [ -1, %if.end8 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #11 { entry: %p = alloca i32, align 4 %q = alloca i32, align 4 %r = alloca i32, align 4 %s = alloca i32, align 4 %n = alloca i32, align 4 %fl = alloca [524288 x i8], align 16 %data = alloca [524288 x %struct.sd], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %p) #19 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #19 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #19 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #19 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #19 call void @llvm.lifetime.start.p0(i64 524288, ptr nonnull %fl) #19 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(524288) %fl, i8 0, i64 524288, i1 false) call void @llvm.lifetime.start.p0(i64 4194304, ptr nonnull %data) #19 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull @a, ptr noundef nonnull @b, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !25 %cmp155 = icmp sgt i32 %0, 0 br i1 %cmp155, label %for.body, label %cleanup for.body: ; preds = %entry, %for.inc %i.0157 = phi i32 [ %inc17, %for.inc ], [ 0, %entry ] %c.0156 = phi i32 [ %c.1, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %p, ptr noundef nonnull %q, ptr noundef nonnull %r, ptr noundef nonnull %s) %1 = load i32, ptr %p, align 4, !tbaa !25 %2 = load i32, ptr %q, align 4, !tbaa !25 %cmp.i = icmp eq i32 %1, 0 br i1 %cmp.i, label %calc.exit, label %if.end.i if.end.i: ; preds = %for.body %3 = load i32, ptr @b, align 4, !tbaa !25 %cmp1.i = icmp eq i32 %3, %2 br i1 %cmp1.i, label %if.then2.i, label %if.end3.i if.then2.i: ; preds = %if.end.i %add.i = add nsw i32 %2, %1 br label %calc.exit if.end3.i: ; preds = %if.end.i %4 = load i32, ptr @a, align 4, !tbaa !25 %cmp4.i = icmp eq i32 %4, %1 br i1 %cmp4.i, label %if.then5.i, label %if.end8.i if.then5.i: ; preds = %if.end3.i %factor.i = shl i32 %3, 1 %sub.i = sub i32 %1, %2 %add7.i = add i32 %sub.i, %factor.i br label %calc.exit if.end8.i: ; preds = %if.end3.i %cmp9.i = icmp eq i32 %2, 0 br i1 %cmp9.i, label %if.then10.i, label %for.inc if.then10.i: ; preds = %if.end8.i %reass.add24.i = add i32 %4, %3 %reass.mul.i = shl i32 %reass.add24.i, 1 %add14.i = sub i32 %reass.mul.i, %1 br label %calc.exit calc.exit: ; preds = %for.body, %if.then2.i, %if.then5.i, %if.then10.i %retval.0.i = phi i32 [ %add.i, %if.then2.i ], [ %add7.i, %if.then5.i ], [ %add14.i, %if.then10.i ], [ %2, %for.body ] %cmp3.not = icmp eq i32 %retval.0.i, -1 br i1 %cmp3.not, label %for.inc, label %land.lhs.true land.lhs.true: ; preds = %calc.exit %5 = load i32, ptr %r, align 4, !tbaa !25 %6 = load i32, ptr %s, align 4, !tbaa !25 %cmp.i91 = icmp eq i32 %5, 0 br i1 %cmp.i91, label %calc.exit109, label %if.end.i92 if.end.i92: ; preds = %land.lhs.true %7 = load i32, ptr @b, align 4, !tbaa !25 %cmp1.i93 = icmp eq i32 %7, %6 br i1 %cmp1.i93, label %if.then2.i107, label %if.end3.i94 if.then2.i107: ; preds = %if.end.i92 %add.i108 = add nsw i32 %6, %5 br label %calc.exit109 if.end3.i94: ; preds = %if.end.i92 %8 = load i32, ptr @a, align 4, !tbaa !25 %cmp4.i95 = icmp eq i32 %8, %5 br i1 %cmp4.i95, label %if.then5.i103, label %if.end8.i96 if.then5.i103: ; preds = %if.end3.i94 %factor.i104 = shl i32 %7, 1 %sub.i105 = sub i32 %5, %6 %add7.i106 = add i32 %sub.i105, %factor.i104 br label %calc.exit109 if.end8.i96: ; preds = %if.end3.i94 %cmp9.i97 = icmp eq i32 %6, 0 br i1 %cmp9.i97, label %if.then10.i99, label %for.inc if.then10.i99: ; preds = %if.end8.i96 %reass.add24.i100 = add i32 %8, %7 %reass.mul.i101 = shl i32 %reass.add24.i100, 1 %add14.i102 = sub i32 %reass.mul.i101, %5 br label %calc.exit109 calc.exit109: ; preds = %land.lhs.true, %if.then2.i107, %if.then5.i103, %if.then10.i99 %retval.0.i98 = phi i32 [ %add.i108, %if.then2.i107 ], [ %add7.i106, %if.then5.i103 ], [ %add14.i102, %if.then10.i99 ], [ %6, %land.lhs.true ] %cmp5.not = icmp eq i32 %retval.0.i98, -1 br i1 %cmp5.not, label %for.inc, label %if.then if.then: ; preds = %calc.exit109 br i1 %cmp.i, label %calc.exit128, label %if.end.i111 if.end.i111: ; preds = %if.then %9 = load i32, ptr @b, align 4, !tbaa !25 %cmp1.i112 = icmp eq i32 %9, %2 br i1 %cmp1.i112, label %if.then2.i126, label %if.end3.i113 if.then2.i126: ; preds = %if.end.i111 %add.i127 = add nsw i32 %2, %1 br label %calc.exit128 if.end3.i113: ; preds = %if.end.i111 %10 = load i32, ptr @a, align 4, !tbaa !25 %cmp4.i114 = icmp eq i32 %10, %1 br i1 %cmp4.i114, label %if.then5.i122, label %if.end8.i115 if.then5.i122: ; preds = %if.end3.i113 %factor.i123 = shl i32 %9, 1 %sub.i124 = sub i32 %1, %2 %add7.i125 = add i32 %sub.i124, %factor.i123 br label %calc.exit128 if.end8.i115: ; preds = %if.end3.i113 %cmp9.i116 = icmp eq i32 %2, 0 br i1 %cmp9.i116, label %if.then10.i118, label %calc.exit128 if.then10.i118: ; preds = %if.end8.i115 %reass.add24.i119 = add i32 %10, %9 %reass.mul.i120 = shl i32 %reass.add24.i119, 1 %add14.i121 = sub i32 %reass.mul.i120, %1 br label %calc.exit128 calc.exit128: ; preds = %if.then, %if.then2.i126, %if.then5.i122, %if.end8.i115, %if.then10.i118 %retval.0.i117 = phi i32 [ %add.i127, %if.then2.i126 ], [ %add7.i125, %if.then5.i122 ], [ %add14.i121, %if.then10.i118 ], [ %2, %if.then ], [ -1, %if.end8.i115 ] %idxprom = sext i32 %c.0156 to i64 %arrayidx = getelementptr inbounds [524288 x %struct.sd], ptr %data, i64 0, i64 %idxprom store i32 %retval.0.i117, ptr %arrayidx, align 8, !tbaa !41 %node = getelementptr inbounds [524288 x %struct.sd], ptr %data, i64 0, i64 %idxprom, i32 1 store i32 %i.0157, ptr %node, align 4, !tbaa !43 %inc = add nsw i32 %c.0156, 1 br i1 %cmp.i91, label %calc.exit147, label %if.end.i130 if.end.i130: ; preds = %calc.exit128 %11 = load i32, ptr @b, align 4, !tbaa !25 %cmp1.i131 = icmp eq i32 %11, %6 br i1 %cmp1.i131, label %if.then2.i145, label %if.end3.i132 if.then2.i145: ; preds = %if.end.i130 %add.i146 = add nsw i32 %6, %5 br label %calc.exit147 if.end3.i132: ; preds = %if.end.i130 %12 = load i32, ptr @a, align 4, !tbaa !25 %cmp4.i133 = icmp eq i32 %12, %5 br i1 %cmp4.i133, label %if.then5.i141, label %if.end8.i134 if.then5.i141: ; preds = %if.end3.i132 %factor.i142 = shl i32 %11, 1 %sub.i143 = sub i32 %5, %6 %add7.i144 = add i32 %sub.i143, %factor.i142 br label %calc.exit147 if.end8.i134: ; preds = %if.end3.i132 %cmp9.i135 = icmp eq i32 %6, 0 br i1 %cmp9.i135, label %if.then10.i137, label %calc.exit147 if.then10.i137: ; preds = %if.end8.i134 %reass.add24.i138 = add i32 %12, %11 %reass.mul.i139 = shl i32 %reass.add24.i138, 1 %add14.i140 = sub i32 %reass.mul.i139, %5 br label %calc.exit147 calc.exit147: ; preds = %calc.exit128, %if.then2.i145, %if.then5.i141, %if.end8.i134, %if.then10.i137 %retval.0.i136 = phi i32 [ %add.i146, %if.then2.i145 ], [ %add7.i144, %if.then5.i141 ], [ %add14.i140, %if.then10.i137 ], [ %6, %calc.exit128 ], [ -1, %if.end8.i134 ] %idxprom10 = sext i32 %inc to i64 %arrayidx11 = getelementptr inbounds [524288 x %struct.sd], ptr %data, i64 0, i64 %idxprom10 store i32 %retval.0.i136, ptr %arrayidx11, align 8, !tbaa !41 %node15 = getelementptr inbounds [524288 x %struct.sd], ptr %data, i64 0, i64 %idxprom10, i32 1 store i32 %i.0157, ptr %node15, align 4, !tbaa !43 %inc16 = add nsw i32 %c.0156, 2 br label %for.inc for.inc: ; preds = %if.end8.i96, %if.end8.i, %calc.exit, %calc.exit109, %calc.exit147 %c.1 = phi i32 [ %inc16, %calc.exit147 ], [ %c.0156, %calc.exit109 ], [ %c.0156, %calc.exit ], [ %c.0156, %if.end8.i ], [ %c.0156, %if.end8.i96 ] %inc17 = add nuw nsw i32 %i.0157, 1 %13 = load i32, ptr %n, align 4, !tbaa !25 %cmp = icmp slt i32 %inc17, %13 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !44 for.end: ; preds = %for.inc %cmp18 = icmp eq i32 %c.1, 0 br i1 %cmp18, label %cleanup, label %if.end21 if.end21: ; preds = %for.end %conv = sext i32 %c.1 to i64 call void @qsort(ptr noundef nonnull %data, i64 noundef %conv, i64 noundef 8, ptr noundef nonnull @sdsortfnc) #19 %cmp23160 = icmp sgt i32 %c.1, 0 br i1 %cmp23160, label %for.body25.preheader, label %cleanup for.body25.preheader: ; preds = %if.end21 %pt.promoted = load i32, ptr @pt, align 4, !tbaa !25 %wide.trip.count = zext i32 %c.1 to i64 br label %for.body25 for.body25: ; preds = %for.body25.preheader, %for.inc53 %indvars.iv = phi i64 [ 0, %for.body25.preheader ], [ %indvars.iv.next, %for.inc53 ] %dec.i158161 = phi i32 [ %pt.promoted, %for.body25.preheader ], [ %dec.i159, %for.inc53 ] %node28 = getelementptr inbounds [524288 x %struct.sd], ptr %data, i64 0, i64 %indvars.iv, i32 1 %14 = load i32, ptr %node28, align 4, !tbaa !43 %idxprom29 = sext i32 %14 to i64 %arrayidx30 = getelementptr inbounds [524288 x i8], ptr %fl, i64 0, i64 %idxprom29 %15 = load i8, ptr %arrayidx30, align 1, !tbaa !45, !range !47, !noundef !48 %cmp32 = icmp eq i8 %15, 0 br i1 %cmp32, label %if.then34, label %if.else if.then34: ; preds = %for.body25 store i8 1, ptr %arrayidx30, align 1, !tbaa !45 %idxprom.i = sext i32 %dec.i158161 to i64 %arrayidx.i = getelementptr inbounds [1048576 x i32], ptr @array, i64 0, i64 %idxprom.i store i32 %14, ptr %arrayidx.i, align 4, !tbaa !25 %inc.i = add nsw i32 %dec.i158161, 1 store i32 %inc.i, ptr @pt, align 4, !tbaa !25 br label %for.inc53 if.else: ; preds = %for.body25 %dec.i = add nsw i32 %dec.i158161, -1 store i32 %dec.i, ptr @pt, align 4, !tbaa !25 %idxprom.i148 = sext i32 %dec.i to i64 %arrayidx.i149 = getelementptr inbounds [1048576 x i32], ptr @array, i64 0, i64 %idxprom.i148 %16 = load i32, ptr %arrayidx.i149, align 4, !tbaa !25 %cmp47.not = icmp eq i32 %16, %14 br i1 %cmp47.not, label %for.inc53, label %cleanup for.inc53: ; preds = %if.then34, %if.else %dec.i159 = phi i32 [ %inc.i, %if.then34 ], [ %dec.i, %if.else ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %cleanup, label %for.body25, !llvm.loop !49 cleanup: ; preds = %for.inc53, %if.else, %if.end21, %for.end, %entry %str.sink = phi ptr [ @str.8, %entry ], [ @str.8, %for.end ], [ @str.8, %if.end21 ], [ @str.7, %if.else ], [ @str.8, %for.inc53 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4194304, ptr nonnull %data) #19 call void @llvm.lifetime.end.p0(i64 524288, ptr nonnull %fl) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #19 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %p) #19 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) #14 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #15 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #16 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #16 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #17 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #17 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 = { 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 #6 = { 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 #7 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nofree nounwind "no-trapping-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 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 #11 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { mustprogress nofree norecurse nosync nounwind willreturn memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #14 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #15 = { 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 #16 = { nofree nounwind } attributes #17 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #18 = { nounwind willreturn memory(read) } attributes #19 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"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, !6} !18 = distinct !{!18, !6} !19 = distinct !{!19, !20} !20 = !{!"llvm.loop.unroll.disable"} !21 = distinct !{!21, !6} !22 = distinct !{!22, !20} !23 = distinct !{!23, !6} !24 = distinct !{!24, !6} !25 = !{!26, !26, i64 0} !26 = !{!"int", !27, i64 0} !27 = !{!"omnipotent char", !28, i64 0} !28 = !{!"Simple C/C++ TBAA"} !29 = !{!30, !30, i64 0} !30 = !{!"long long", !27, i64 0} !31 = !{!32, !32, i64 0} !32 = !{!"double", !27, i64 0} !33 = !{!27, !27, i64 0} !34 = distinct !{!34, !6, !9, !10} !35 = distinct !{!35, !6, !10, !9} !36 = distinct !{!36, !6} !37 = distinct !{!37, !6} !38 = distinct !{!38, !6} !39 = distinct !{!39, !6, !40} !40 = !{!"llvm.loop.peeled.count", i32 1} !41 = !{!42, !26, i64 0} !42 = !{!"", !26, i64 0, !26, i64 4} !43 = !{!42, !26, i64 4} !44 = distinct !{!44, !6} !45 = !{!46, !46, i64 0} !46 = !{!"_Bool", !27, i64 0} !47 = !{i8 0, i8 2} !48 = !{} !49 = distinct !{!49, !6}
#include <stdio.h> int main() { long long int i,A,B,M,a[100001],b[100001],x,y,c,amin,bmin,sum; scanf("%d %d %d",&A,&B,&M); scanf("%d",&a[0]); amin=a[0]; for(i=1;i<A;i++) { scanf("%d",&a[i]); if(a[i]<amin) amin=a[i]; } scanf("%d",&b[0]); bmin=b[0]; for(i=1;i<B;i++) { scanf("%d",&b[i]); if(b[i]<bmin) bmin=b[i]; } sum=amin+bmin; for(i=0;i<M;i++) { scanf("%d %d %d",&x,&y,&c); x--;y--; if((a[x]+b[y]-c)<sum) sum=a[x]+b[y]-c; } printf("%d",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 %M = alloca i64, align 8 %a = alloca [100001 x i64], align 16 %b = alloca [100001 x i64], align 16 %x = alloca i64, align 8 %y = alloca i64, align 8 %c = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %M) #4 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 800008, ptr nonnull %b) #4 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 %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %M) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %0 = load i64, ptr %a, align 16, !tbaa !5 %1 = load i64, ptr %A, align 8, !tbaa !5 %cmp60 = icmp sgt i64 %1, 1 br i1 %cmp60, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %amin.062 = phi i64 [ %spec.select, %for.body ], [ %0, %entry ] %i.061 = phi i64 [ %inc, %for.body ], [ 1, %entry ] %arrayidx3 = getelementptr inbounds [100001 x i64], ptr %a, i64 0, i64 %i.061 %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx3) %2 = load i64, ptr %arrayidx3, align 8, !tbaa !5 %spec.select = call i64 @llvm.smin.i64(i64 %2, i64 %amin.062) %inc = add nuw nsw i64 %i.061, 1 %3 = load i64, ptr %A, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %amin.0.lcssa = phi i64 [ %0, %entry ], [ %spec.select, %for.body ] %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %4 = load i64, ptr %b, align 16, !tbaa !5 %5 = load i64, ptr %B, align 8, !tbaa !5 %cmp1263 = icmp sgt i64 %5, 1 br i1 %cmp1263, label %for.body13, label %for.end23 for.body13: ; preds = %for.end, %for.body13 %bmin.065 = phi i64 [ %spec.select58, %for.body13 ], [ %4, %for.end ] %i.164 = phi i64 [ %inc22, %for.body13 ], [ 1, %for.end ] %arrayidx14 = getelementptr inbounds [100001 x i64], ptr %b, i64 0, i64 %i.164 %call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx14) %6 = load i64, ptr %arrayidx14, align 8, !tbaa !5 %spec.select58 = call i64 @llvm.smin.i64(i64 %6, i64 %bmin.065) %inc22 = add nuw nsw i64 %i.164, 1 %7 = load i64, ptr %B, align 8, !tbaa !5 %cmp12 = icmp slt i64 %inc22, %7 br i1 %cmp12, label %for.body13, label %for.end23, !llvm.loop !11 for.end23: ; preds = %for.body13, %for.end %bmin.0.lcssa = phi i64 [ %4, %for.end ], [ %spec.select58, %for.body13 ] %add = add nsw i64 %bmin.0.lcssa, %amin.0.lcssa %8 = load i64, ptr %M, align 8, !tbaa !5 %cmp2567 = icmp sgt i64 %8, 0 br i1 %cmp2567, label %for.body26, label %for.end41 for.body26: ; preds = %for.end23, %for.body26 %sum.069 = phi i64 [ %spec.select59, %for.body26 ], [ %add, %for.end23 ] %i.268 = phi i64 [ %inc40, %for.body26 ], [ 0, %for.end23 ] %call27 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %c) %9 = load i64, ptr %x, align 8, !tbaa !5 %dec = add nsw i64 %9, -1 store i64 %dec, ptr %x, align 8, !tbaa !5 %10 = load i64, ptr %y, align 8, !tbaa !5 %dec28 = add nsw i64 %10, -1 store i64 %dec28, ptr %y, align 8, !tbaa !5 %arrayidx29 = getelementptr inbounds [100001 x i64], ptr %a, i64 0, i64 %dec %11 = load i64, ptr %arrayidx29, align 8, !tbaa !5 %arrayidx30 = getelementptr inbounds [100001 x i64], ptr %b, i64 0, i64 %dec28 %12 = load i64, ptr %arrayidx30, align 8, !tbaa !5 %add31 = add nsw i64 %12, %11 %13 = load i64, ptr %c, align 8, !tbaa !5 %sub = sub i64 %add31, %13 %spec.select59 = call i64 @llvm.smin.i64(i64 %sub, i64 %sum.069) %inc40 = add nuw nsw i64 %i.268, 1 %14 = load i64, ptr %M, align 8, !tbaa !5 %cmp25 = icmp slt i64 %inc40, %14 br i1 %cmp25, label %for.body26, label %for.end41, !llvm.loop !12 for.end41: ; preds = %for.body26, %for.end23 %sum.0.lcssa = phi i64 [ %add, %for.end23 ], [ %spec.select59, %for.body26 ] %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #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 call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 800008, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %M) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %A) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.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} !12 = distinct !{!12, !10}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int acs(const void *a, const void *b) { return *(int*)a - *(int*)b; } /* 1,2,3,4.. */ int des(const void *a, const void *b) { return *(int*)b - *(int*)a; } /* 8,7,6,5.. */ int cmp_char(const void *a, const void *b) { return *(char*)a - *(char*)b; } /* a,b,c,d.. */ int cmp_str(const void *a, const void *b) { return strcmp(*(const char **)a, *(const char **)b); } /* aaa,aab.. */ #define min(a,b) (a < b ? a : b) #define max(a,b) (a > b ? a : b) #define rep(i, l, r) for (int i = l; i < r; i++) #define MAX 100001 #define MOD 1000000007 #define INF 1000000009 typedef long long int lli; int main(void) { int A, B, M; scanf("%d %d %d", &A, &B, &M); int a[MAX], b[MAX]; rep(i, 0, A) scanf("%d", &a[i]); rep(i, 0, B) scanf("%d", &b[i]); int x[MAX], y[MAX], c[MAX]; rep(i, 0, M) scanf("%d %d %d", &x[i], &y[i], &c[i]); int ma = INF, mb = INF; rep(i, 0, A) ma = min(a[i], ma); rep(i, 0, B) mb = min(b[i], mb); int ans = ma + mb; rep(i, 0, M) { ans = min(ans, a[x[i]-1] + b[y[i]-1] - c[i]); } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219805/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219805/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @.str.2 = 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 @acs(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 @des(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 norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp_char(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i8, ptr %a, align 1, !tbaa !9 %conv = sext i8 %0 to i32 %1 = load i8, ptr %b, align 1, !tbaa !9 %conv1 = sext i8 %1 to i32 %sub = sub nsw i32 %conv, %conv1 ret i32 %sub } ; Function Attrs: mustprogress nofree nounwind willreturn memory(read, inaccessiblemem: none) uwtable define dso_local i32 @cmp_str(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #1 { entry: %0 = load ptr, ptr %a, align 8, !tbaa !10 %1 = load ptr, ptr %b, align 8, !tbaa !10 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %0, ptr noundef nonnull dereferenceable(1) %1) #7 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 nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %A = alloca i32, align 4 %B = alloca i32, align 4 %M = alloca i32, align 4 %a = alloca [100001 x i32], align 16 %b = alloca [100001 x i32], align 16 %x = alloca [100001 x i32], align 16 %y = alloca [100001 x i32], align 16 %c = alloca [100001 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %M) call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %a) #8 call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %b) #8 %0 = load i32, ptr %A, align 4, !tbaa !5 %cmp127 = icmp sgt i32 %0, 0 br i1 %cmp127, label %for.body, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.body, %entry %1 = load i32, ptr %B, align 4, !tbaa !5 %cmp4129 = icmp sgt i32 %1, 0 br i1 %cmp4129, label %for.body6, label %for.cond.cleanup5 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100001 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %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.cond3.preheader, !llvm.loop !12 for.cond.cleanup5: ; preds = %for.body6, %for.cond3.preheader call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %x) #8 call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %y) #8 call void @llvm.lifetime.start.p0(i64 400004, ptr nonnull %c) #8 %4 = load i32, ptr %M, align 4, !tbaa !5 %cmp15131 = icmp sgt i32 %4, 0 br i1 %cmp15131, label %for.body17, label %for.cond29.preheader for.body6: ; preds = %for.cond3.preheader, %for.body6 %indvars.iv147 = phi i64 [ %indvars.iv.next148, %for.body6 ], [ 0, %for.cond3.preheader ] %arrayidx8 = getelementptr inbounds [100001 x i32], ptr %b, i64 0, i64 %indvars.iv147 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8) %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1 %5 = load i32, ptr %B, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp4 = icmp slt i64 %indvars.iv.next148, %6 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !14 for.cond29.preheader: ; preds = %for.body17, %for.cond.cleanup5 %.lcssa = phi i32 [ %4, %for.cond.cleanup5 ], [ %14, %for.body17 ] %7 = load i32, ptr %A, align 4, !tbaa !5 %cmp30133 = icmp sgt i32 %7, 0 br i1 %cmp30133, label %for.body32.preheader, label %for.cond42.preheader for.body32.preheader: ; preds = %for.cond29.preheader %wide.trip.count = zext i32 %7 to i64 %min.iters.check = icmp ult i32 %7, 8 br i1 %min.iters.check, label %for.body32.preheader190, label %vector.ph vector.ph: ; preds = %for.body32.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 1000000009, i32 1000000009, i32 1000000009, i32 1000000009>, %vector.ph ], [ %10, %vector.body ] %vec.phi168 = phi <4 x i32> [ <i32 1000000009, i32 1000000009, i32 1000000009, i32 1000000009>, %vector.ph ], [ %11, %vector.body ] %8 = getelementptr inbounds [100001 x i32], ptr %a, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 %wide.load169 = load <4 x i32>, ptr %9, align 16, !tbaa !5 %10 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load, <4 x i32> %vec.phi) %11 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load169, <4 x i32> %vec.phi168) %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 !15 middle.block: ; preds = %vector.body %rdx.minmax = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %10, <4 x i32> %11) %13 = 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.cond42.preheader, label %for.body32.preheader190 for.body32.preheader190: ; preds = %for.body32.preheader, %middle.block %indvars.iv153.ph = phi i64 [ 0, %for.body32.preheader ], [ %n.vec, %middle.block ] %ma.0134.ph = phi i32 [ 1000000009, %for.body32.preheader ], [ %13, %middle.block ] br label %for.body32 for.body17: ; preds = %for.cond.cleanup5, %for.body17 %indvars.iv150 = phi i64 [ %indvars.iv.next151, %for.body17 ], [ 0, %for.cond.cleanup5 ] %arrayidx19 = getelementptr inbounds [100001 x i32], ptr %x, i64 0, i64 %indvars.iv150 %arrayidx21 = getelementptr inbounds [100001 x i32], ptr %y, i64 0, i64 %indvars.iv150 %arrayidx23 = getelementptr inbounds [100001 x i32], ptr %c, i64 0, i64 %indvars.iv150 %call24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx19, ptr noundef nonnull %arrayidx21, ptr noundef nonnull %arrayidx23) %indvars.iv.next151 = add nuw nsw i64 %indvars.iv150, 1 %14 = load i32, ptr %M, align 4, !tbaa !5 %15 = sext i32 %14 to i64 %cmp15 = icmp slt i64 %indvars.iv.next151, %15 br i1 %cmp15, label %for.body17, label %for.cond29.preheader, !llvm.loop !18 for.cond42.preheader: ; preds = %for.body32, %middle.block, %for.cond29.preheader %ma.0.lcssa = phi i32 [ 1000000009, %for.cond29.preheader ], [ %13, %middle.block ], [ %.ma.0, %for.body32 ] %16 = load i32, ptr %B, align 4, !tbaa !5 %cmp43137 = icmp sgt i32 %16, 0 br i1 %cmp43137, label %for.body45.preheader, label %for.cond.cleanup44 for.body45.preheader: ; preds = %for.cond42.preheader %wide.trip.count159 = zext i32 %16 to i64 %min.iters.check172 = icmp ult i32 %16, 8 br i1 %min.iters.check172, label %for.body45.preheader187, label %vector.ph173 vector.ph173: ; preds = %for.body45.preheader %n.vec175 = and i64 %wide.trip.count159, 4294967288 br label %vector.body178 vector.body178: ; preds = %vector.body178, %vector.ph173 %index179 = phi i64 [ 0, %vector.ph173 ], [ %index.next184, %vector.body178 ] %vec.phi180 = phi <4 x i32> [ <i32 1000000009, i32 1000000009, i32 1000000009, i32 1000000009>, %vector.ph173 ], [ %19, %vector.body178 ] %vec.phi181 = phi <4 x i32> [ <i32 1000000009, i32 1000000009, i32 1000000009, i32 1000000009>, %vector.ph173 ], [ %20, %vector.body178 ] %17 = getelementptr inbounds [100001 x i32], ptr %b, i64 0, i64 %index179 %wide.load182 = load <4 x i32>, ptr %17, align 16, !tbaa !5 %18 = getelementptr inbounds i32, ptr %17, i64 4 %wide.load183 = load <4 x i32>, ptr %18, align 16, !tbaa !5 %19 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load182, <4 x i32> %vec.phi180) %20 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %wide.load183, <4 x i32> %vec.phi181) %index.next184 = add nuw i64 %index179, 8 %21 = icmp eq i64 %index.next184, %n.vec175 br i1 %21, label %middle.block170, label %vector.body178, !llvm.loop !19 middle.block170: ; preds = %vector.body178 %rdx.minmax185 = call <4 x i32> @llvm.smin.v4i32(<4 x i32> %19, <4 x i32> %20) %22 = call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax185) %cmp.n177 = icmp eq i64 %n.vec175, %wide.trip.count159 br i1 %cmp.n177, label %for.cond.cleanup44, label %for.body45.preheader187 for.body45.preheader187: ; preds = %for.body45.preheader, %middle.block170 %indvars.iv156.ph = phi i64 [ 0, %for.body45.preheader ], [ %n.vec175, %middle.block170 ] %mb.0138.ph = phi i32 [ 1000000009, %for.body45.preheader ], [ %22, %middle.block170 ] br label %for.body45 for.body32: ; preds = %for.body32.preheader190, %for.body32 %indvars.iv153 = phi i64 [ %indvars.iv.next154, %for.body32 ], [ %indvars.iv153.ph, %for.body32.preheader190 ] %ma.0134 = phi i32 [ %.ma.0, %for.body32 ], [ %ma.0134.ph, %for.body32.preheader190 ] %arrayidx34 = getelementptr inbounds [100001 x i32], ptr %a, i64 0, i64 %indvars.iv153 %23 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %.ma.0 = call i32 @llvm.smin.i32(i32 %23, i32 %ma.0134) %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1 %exitcond.not = icmp eq i64 %indvars.iv.next154, %wide.trip.count br i1 %exitcond.not, label %for.cond42.preheader, label %for.body32, !llvm.loop !20 for.cond.cleanup44: ; preds = %for.body45, %middle.block170, %for.cond42.preheader %mb.0.lcssa = phi i32 [ 1000000009, %for.cond42.preheader ], [ %22, %middle.block170 ], [ %.mb.0, %for.body45 ] %add = add nsw i32 %mb.0.lcssa, %ma.0.lcssa %cmp60141 = icmp sgt i32 %.lcssa, 0 br i1 %cmp60141, label %for.body62.preheader, label %for.cond.cleanup61 for.body62.preheader: ; preds = %for.cond.cleanup44 %wide.trip.count164 = zext i32 %.lcssa to i64 br label %for.body62 for.body45: ; preds = %for.body45.preheader187, %for.body45 %indvars.iv156 = phi i64 [ %indvars.iv.next157, %for.body45 ], [ %indvars.iv156.ph, %for.body45.preheader187 ] %mb.0138 = phi i32 [ %.mb.0, %for.body45 ], [ %mb.0138.ph, %for.body45.preheader187 ] %arrayidx47 = getelementptr inbounds [100001 x i32], ptr %b, i64 0, i64 %indvars.iv156 %24 = load i32, ptr %arrayidx47, align 4, !tbaa !5 %.mb.0 = call i32 @llvm.smin.i32(i32 %24, i32 %mb.0138) %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1 %exitcond160.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count159 br i1 %exitcond160.not, label %for.cond.cleanup44, label %for.body45, !llvm.loop !21 for.cond.cleanup61: ; preds = %for.body62, %for.cond.cleanup44 %ans.0.lcssa = phi i32 [ %add, %for.cond.cleanup44 ], [ %ans.0.sub75, %for.body62 ] %call98 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %c) #8 call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %y) #8 call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %x) #8 call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %b) #8 call void @llvm.lifetime.end.p0(i64 400004, ptr nonnull %a) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %B) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #8 ret i32 0 for.body62: ; preds = %for.body62.preheader, %for.body62 %indvars.iv161 = phi i64 [ 0, %for.body62.preheader ], [ %indvars.iv.next162, %for.body62 ] %ans.0142 = phi i32 [ %add, %for.body62.preheader ], [ %ans.0.sub75, %for.body62 ] %arrayidx64 = getelementptr inbounds [100001 x i32], ptr %x, i64 0, i64 %indvars.iv161 %25 = load i32, ptr %arrayidx64, align 4, !tbaa !5 %sub = add nsw i32 %25, -1 %idxprom65 = sext i32 %sub to i64 %arrayidx66 = getelementptr inbounds [100001 x i32], ptr %a, i64 0, i64 %idxprom65 %26 = load i32, ptr %arrayidx66, align 4, !tbaa !5 %arrayidx68 = getelementptr inbounds [100001 x i32], ptr %y, i64 0, i64 %indvars.iv161 %27 = load i32, ptr %arrayidx68, align 4, !tbaa !5 %sub69 = add nsw i32 %27, -1 %idxprom70 = sext i32 %sub69 to i64 %arrayidx71 = getelementptr inbounds [100001 x i32], ptr %b, i64 0, i64 %idxprom70 %28 = load i32, ptr %arrayidx71, align 4, !tbaa !5 %add72 = add nsw i32 %28, %26 %arrayidx74 = getelementptr inbounds [100001 x i32], ptr %c, i64 0, i64 %indvars.iv161 %29 = load i32, ptr %arrayidx74, align 4, !tbaa !5 %sub75 = sub i32 %add72, %29 %ans.0.sub75 = call i32 @llvm.smin.i32(i32 %ans.0142, i32 %sub75) %indvars.iv.next162 = add nuw nsw i64 %indvars.iv161, 1 %exitcond165.not = icmp eq i64 %indvars.iv.next162, %wide.trip.count164 br i1 %exitcond165.not, label %for.cond.cleanup61, label %for.body62, !llvm.loop !22 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #4 ; 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 memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smin.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 = { mustprogress nofree nounwind willreturn memory(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 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 uwtable "min-legal-vector-width"="0" "no-trapping-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 nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind willreturn memory(read) } 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 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"any pointer", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !13, !16, !17} !16 = !{!"llvm.loop.isvectorized", i32 1} !17 = !{!"llvm.loop.unroll.runtime.disable"} !18 = distinct !{!18, !13} !19 = distinct !{!19, !13, !16, !17} !20 = distinct !{!20, !13, !17, !16} !21 = distinct !{!21, !13, !17, !16} !22 = distinct !{!22, !13}
#include <stdio.h> int main(void) { int i,K,X; scanf("%d%d",&K,&X); for(i=X-K+1;i<X+K;i++) printf("%d\n",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219849/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219849/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %K = alloca i32, align 4 %X = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %K) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %X) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %K, ptr noundef nonnull %X) %0 = load i32, ptr %X, align 4, !tbaa !5 %1 = load i32, ptr %K, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %i.05 = add nsw i32 %sub, 1 %add16 = add nsw i32 %1, %0 %cmp7 = icmp slt i32 %i.05, %add16 br i1 %cmp7, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.08 = phi i32 [ %i.0, %for.body ], [ %i.05, %entry ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.08) %i.0 = add nsw i32 %i.08, 1 %2 = load i32, ptr %X, align 4, !tbaa !5 %3 = load i32, ptr %K, align 4, !tbaa !5 %add1 = add nsw i32 %3, %2 %cmp = icmp slt i32 %i.0, %add1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %K) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main() { int x,y,a,b,c,i; scanf("%d%d", &x, &y); a = x-1; b = y+a; c = y-a; for(i=c;i<=b;i++) { printf("%d ", i); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219892/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219892/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %1 = load i32, ptr %y, align 4, !tbaa !5 %add = add nsw i32 %1, %sub %sub1 = sub nsw i32 %1, %sub %cmp.not6 = icmp sgt i32 %sub1, %add br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %2 = add i32 %1, %0 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %i.07 = phi i32 [ %inc, %for.body ], [ %sub1, %for.body.preheader ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.07) %inc = add i32 %i.07, 1 %exitcond.not = icmp eq i32 %inc, %2 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void){ int k, x, i, n; scanf("%d", &k); scanf("%d",&x); n = x + k - 1; for(i = x - k + 1; i <= n; i++) { printf("%d ", i); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_219935/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_219935/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %k, align 4, !tbaa !5 %add = add i32 %0, -1 %sub = add i32 %add, %1 %sub2 = sub nsw i32 %0, %1 %cmp.not.not7 = icmp slt i32 %sub2, %sub br i1 %cmp.not.not7, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.0.in8 = phi i32 [ %i.0, %for.body ], [ %sub2, %entry ] %i.0 = add nsw i32 %i.0.in8, 1 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.0) %exitcond.not = icmp eq i32 %i.0, %sub br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}