Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
/* ex5_3 moka223711 */ #include <stdio.h> #define ROW 101 // マス目の行の上限 #define COL 101 // マス目の列の上限 int main(void){ // br = black_row, bc = black_column // 黒が少なくとも1マス含まれている行,列を記録する 0で初期化 int row, col, i, j, br[ROW]={0}, bc[COL]={0}; // マス目の配色を受け取る2次元配列 char sq[ROW][COL]; scanf("%d %d", &row, &col); for(i = 0; i < row; i++){ for(j = 0; j < col; j++){ // マス目の配色を受け取り、黒が1マスでも含まれている行と列はbr[i], bc[j]を1に変える scanf(" %c", &sq[i][j]); if(sq[i][j]=='#'){ br[i] = 1; bc[j] = 1; } } } for(i = 0; i < row; i++){ // 上から1行ずつ出力していく // 黒が1マスも含まれない行(すべて白の行)は飛ばす if(br[i] == 0) continue; // このfor文が実行される行には黒が少なくとも1マス含まれている for(j = 0; j < col; j++){ // 黒が1マスも含まれない列(すべて白の列)は飛ばす if(bc[j] == 0) continue; // マス目を出力 printf("%c", sq[i][j]); } // 改行を出力 printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133189/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133189/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %row = alloca i32, align 4 %col = alloca i32, align 4 %br = alloca [101 x i32], align 16 %bc = alloca [101 x i32], align 16 %sq = alloca [101 x [101 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %row) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %col) #5 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %br) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %br, i8 0, i64 404, i1 false) call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %bc) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %bc, i8 0, i64 404, i1 false) call void @llvm.lifetime.start.p0(i64 10201, ptr nonnull %sq) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %row, ptr noundef nonnull %col) %0 = load i32, ptr %row, align 4, !tbaa !5 %cmp72 = icmp sgt i32 %0, 0 br i1 %cmp72, label %for.cond1.preheader.lr.ph, label %for.end52 for.cond1.preheader.lr.ph: ; preds = %entry %1 = load i32, ptr %col, align 4, !tbaa !5 %2 = icmp sgt i32 %1, 0 br i1 %2, label %for.cond1.preheader, label %for.body23.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.inc17 %3 = phi i32 [ %8, %for.inc17 ], [ %0, %for.cond1.preheader.lr.ph ] %4 = phi i32 [ %9, %for.inc17 ], [ %1, %for.cond1.preheader.lr.ph ] %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.inc17 ], [ 0, %for.cond1.preheader.lr.ph ] %cmp270 = icmp sgt i32 %4, 0 br i1 %cmp270, label %for.body3.lr.ph, label %for.inc17 for.body3.lr.ph: ; preds = %for.cond1.preheader %arrayidx14 = getelementptr inbounds [101 x i32], ptr %br, i64 0, i64 %indvars.iv80 br label %for.body3 for.cond20.preheader: ; preds = %for.inc17 %cmp2176 = icmp sgt i32 %8, 0 br i1 %cmp2176, label %for.body23.preheader, label %for.end52 for.body23.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond20.preheader %.ph = phi i32 [ %0, %for.cond1.preheader.lr.ph ], [ %8, %for.cond20.preheader ] br label %for.body23 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body3.lr.ph ], [ %indvars.iv.next, %for.inc ] %arrayidx5 = getelementptr inbounds [101 x [101 x i8]], ptr %sq, i64 0, i64 %indvars.iv80, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5) %5 = load i8, ptr %arrayidx5, align 1, !tbaa !9 %cmp11 = icmp eq i8 %5, 35 br i1 %cmp11, label %if.then, label %for.inc if.then: ; preds = %for.body3 store i32 1, ptr %arrayidx14, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [101 x i32], ptr %bc, i64 0, i64 %indvars.iv store i32 1, ptr %arrayidx16, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %col, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp2, label %for.body3, label %for.inc17.loopexit, !llvm.loop !10 for.inc17.loopexit: ; preds = %for.inc %.pre = load i32, ptr %row, align 4, !tbaa !5 br label %for.inc17 for.inc17: ; preds = %for.inc17.loopexit, %for.cond1.preheader %8 = phi i32 [ %.pre, %for.inc17.loopexit ], [ %3, %for.cond1.preheader ] %9 = phi i32 [ %6, %for.inc17.loopexit ], [ %4, %for.cond1.preheader ] %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %10 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next81, %10 br i1 %cmp, label %for.cond1.preheader, label %for.cond20.preheader, !llvm.loop !12 for.body23: ; preds = %for.body23.preheader, %for.inc50 %11 = phi i32 [ %19, %for.inc50 ], [ %.ph, %for.body23.preheader ] %indvars.iv86 = phi i64 [ %indvars.iv.next87, %for.inc50 ], [ 0, %for.body23.preheader ] %arrayidx25 = getelementptr inbounds [101 x i32], ptr %br, i64 0, i64 %indvars.iv86 %12 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %cmp26 = icmp eq i32 %12, 0 br i1 %cmp26, label %for.inc50, label %for.cond30.preheader for.cond30.preheader: ; preds = %for.body23 %13 = load i32, ptr %col, align 4, !tbaa !5 %cmp3174 = icmp sgt i32 %13, 0 br i1 %cmp3174, label %for.body33, label %for.end48 for.body33: ; preds = %for.cond30.preheader, %for.inc46 %14 = phi i32 [ %17, %for.inc46 ], [ %13, %for.cond30.preheader ] %indvars.iv83 = phi i64 [ %indvars.iv.next84, %for.inc46 ], [ 0, %for.cond30.preheader ] %arrayidx35 = getelementptr inbounds [101 x i32], ptr %bc, i64 0, i64 %indvars.iv83 %15 = load i32, ptr %arrayidx35, align 4, !tbaa !5 %cmp36 = icmp eq i32 %15, 0 br i1 %cmp36, label %for.inc46, label %if.end39 if.end39: ; preds = %for.body33 %arrayidx43 = getelementptr inbounds [101 x [101 x i8]], ptr %sq, i64 0, i64 %indvars.iv86, i64 %indvars.iv83 %16 = load i8, ptr %arrayidx43, align 1, !tbaa !9 %conv44 = sext i8 %16 to i32 %putchar69 = call i32 @putchar(i32 %conv44) %.pre89 = load i32, ptr %col, align 4, !tbaa !5 br label %for.inc46 for.inc46: ; preds = %for.body33, %if.end39 %17 = phi i32 [ %14, %for.body33 ], [ %.pre89, %if.end39 ] %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %18 = sext i32 %17 to i64 %cmp31 = icmp slt i64 %indvars.iv.next84, %18 br i1 %cmp31, label %for.body33, label %for.end48, !llvm.loop !14 for.end48: ; preds = %for.inc46, %for.cond30.preheader %putchar = call i32 @putchar(i32 10) %.pre90 = load i32, ptr %row, align 4, !tbaa !5 br label %for.inc50 for.inc50: ; preds = %for.body23, %for.end48 %19 = phi i32 [ %11, %for.body23 ], [ %.pre90, %for.end48 ] %indvars.iv.next87 = add nuw nsw i64 %indvars.iv86, 1 %20 = sext i32 %19 to i64 %cmp21 = icmp slt i64 %indvars.iv.next87, %20 br i1 %cmp21, label %for.body23, label %for.end52, !llvm.loop !15 for.end52: ; preds = %for.inc50, %entry, %for.cond20.preheader call void @llvm.lifetime.end.p0(i64 10201, ptr nonnull %sq) #5 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %bc) #5 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %br) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %col) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %row) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11, !13} !13 = !{!"llvm.loop.unswitch.partial.disable"} !14 = distinct !{!14, !11} !15 = distinct !{!15, !11}
#include <stdio.h> int main(){ int h, w; scanf("%d %d", &h, &w); char field[102][102]; for(int i=0; i<h; i++) scanf("%s", field[i]); int rows[101] = {0}; int columns[101] = {0}; int i, j; for(i=0; i<h; i++){ for(j=0; j<w; j++) if(field[i][j] == '#') break; if(j == w) rows[++rows[0]] = i; } for(j=0; j<w; j++){ for(i=0; i<h; i++) if(field[i][j] == '#') break; if(i == h) columns[++columns[0]] = j; } for(i=0; i<h; i++){ int rowflag = 0; for(int r=1; r<=rows[0]; r++) if(i == rows[r]) rowflag = 1; if(rowflag) continue; for(j=0; j<w; j++){ int columnflag = 0; for(int c=1; c<=columns[0]; c++) if(j == columns[c]) columnflag = 1; if(columnflag) continue; printf("%c", field[i][j]); } puts(""); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133231/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133231/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\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 %field = alloca [102 x [102 x i8]], align 16 %rows = alloca [101 x i32], align 16 %columns = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) call void @llvm.lifetime.start.p0(i64 10404, ptr nonnull %field) #5 %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp157 = icmp sgt i32 %0, 0 br i1 %cmp157, label %for.body, label %for.cond29.preheader.thread261 for.cond.cleanup: ; preds = %for.body call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %rows) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %rows, i8 0, i64 404, i1 false) call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %columns) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %columns, i8 0, i64 404, i1 false) %cmp4165 = icmp sgt i32 %8, 0 %.pre = load i32, ptr %w, align 4, !tbaa !5 br i1 %cmp4165, label %for.cond6.preheader.lr.ph, label %for.cond29.preheader for.cond6.preheader.lr.ph: ; preds = %for.cond.cleanup %cmp7159 = icmp sgt i32 %.pre, 0 br i1 %cmp7159, label %for.cond6.preheader.us.preheader, label %for.cond6.preheader.lr.ph.split for.cond6.preheader.us.preheader: ; preds = %for.cond6.preheader.lr.ph %wide.trip.count217 = zext i32 %8 to i64 %wide.trip.count = zext i32 %.pre to i64 br label %for.cond6.preheader.us for.cond6.preheader.us: ; preds = %for.cond6.preheader.us.preheader, %for.inc26.us %indvars.iv214 = phi i64 [ 0, %for.cond6.preheader.us.preheader ], [ %indvars.iv.next215, %for.inc26.us ] br label %for.body8.us for.body8.us: ; preds = %for.cond6.preheader.us, %for.inc15.us %indvars.iv210 = phi i64 [ 0, %for.cond6.preheader.us ], [ %indvars.iv.next211, %for.inc15.us ] %arrayidx12.us = getelementptr inbounds [102 x [102 x i8]], ptr %field, i64 0, i64 %indvars.iv214, i64 %indvars.iv210 %1 = load i8, ptr %arrayidx12.us, align 1, !tbaa !9 %cmp13.us = icmp eq i8 %1, 35 br i1 %cmp13.us, label %for.end17.us, label %for.inc15.us for.inc15.us: ; preds = %for.body8.us %indvars.iv.next211 = add nuw nsw i64 %indvars.iv210, 1 %exitcond213.not = icmp eq i64 %indvars.iv.next211, %wide.trip.count br i1 %exitcond213.not, label %if.then20.us, label %for.body8.us, !llvm.loop !10 for.end17.us: ; preds = %for.body8.us %2 = trunc i64 %indvars.iv210 to i32 %cmp18.us = icmp eq i32 %.pre, %2 br i1 %cmp18.us, label %if.then20.us, label %for.inc26.us if.then20.us: ; preds = %for.inc15.us, %for.end17.us %3 = load i32, ptr %rows, align 16, !tbaa !5 %inc22.us = add nsw i32 %3, 1 store i32 %inc22.us, ptr %rows, align 16, !tbaa !5 %idxprom23.us = sext i32 %inc22.us to i64 %arrayidx24.us = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %idxprom23.us %4 = trunc i64 %indvars.iv214 to i32 store i32 %4, ptr %arrayidx24.us, align 4, !tbaa !5 br label %for.inc26.us for.inc26.us: ; preds = %if.then20.us, %for.end17.us %indvars.iv.next215 = add nuw nsw i64 %indvars.iv214, 1 %exitcond218.not = icmp eq i64 %indvars.iv.next215, %wide.trip.count217 br i1 %exitcond218.not, label %for.cond29.preheader, label %for.cond6.preheader.us, !llvm.loop !12 for.cond6.preheader.lr.ph.split: ; preds = %for.cond6.preheader.lr.ph %cmp18 = icmp eq i32 %.pre, 0 br i1 %cmp18, label %for.cond6.preheader.us167.preheader, label %for.cond64.preheader.lr.ph for.cond6.preheader.us167.preheader: ; preds = %for.cond6.preheader.lr.ph.split %xtraiter = and i32 %8, 1 %5 = icmp eq i32 %8, 1 br i1 %5, label %for.cond29.preheader.loopexit331.unr-lcssa, label %for.cond6.preheader.us167.preheader.new for.cond6.preheader.us167.preheader.new: ; preds = %for.cond6.preheader.us167.preheader %unroll_iter = and i32 %8, -2 br label %for.cond6.preheader.us167 for.cond6.preheader.us167: ; preds = %for.cond6.preheader.us167, %for.cond6.preheader.us167.preheader.new %i2.0166.us168 = phi i32 [ 0, %for.cond6.preheader.us167.preheader.new ], [ %inc27.us174.1, %for.cond6.preheader.us167 ] %niter = phi i32 [ 0, %for.cond6.preheader.us167.preheader.new ], [ %niter.next.1, %for.cond6.preheader.us167 ] %6 = load i32, ptr %rows, align 16, !tbaa !5 %inc22.us170 = add nsw i32 %6, 1 store i32 %inc22.us170, ptr %rows, align 16, !tbaa !5 %idxprom23.us171 = sext i32 %inc22.us170 to i64 %arrayidx24.us172 = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %idxprom23.us171 store i32 %i2.0166.us168, ptr %arrayidx24.us172, align 4, !tbaa !5 %inc27.us174 = or i32 %i2.0166.us168, 1 %7 = load i32, ptr %rows, align 16, !tbaa !5 %inc22.us170.1 = add nsw i32 %7, 1 store i32 %inc22.us170.1, ptr %rows, align 16, !tbaa !5 %idxprom23.us171.1 = sext i32 %inc22.us170.1 to i64 %arrayidx24.us172.1 = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %idxprom23.us171.1 store i32 %inc27.us174, ptr %arrayidx24.us172.1, align 4, !tbaa !5 %inc27.us174.1 = add nuw nsw i32 %i2.0166.us168, 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.cond29.preheader.loopexit331.unr-lcssa, label %for.cond6.preheader.us167, !llvm.loop !12 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [102 x [102 x i8]], ptr %field, 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 %8 = load i32, ptr %h, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next, %9 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !13 for.cond29.preheader.loopexit331.unr-lcssa: ; preds = %for.cond6.preheader.us167, %for.cond6.preheader.us167.preheader %i2.0166.us168.unr = phi i32 [ 0, %for.cond6.preheader.us167.preheader ], [ %inc27.us174.1, %for.cond6.preheader.us167 ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond29.preheader, label %for.cond6.preheader.us167.epil for.cond6.preheader.us167.epil: ; preds = %for.cond29.preheader.loopexit331.unr-lcssa %10 = load i32, ptr %rows, align 16, !tbaa !5 %inc22.us170.epil = add nsw i32 %10, 1 store i32 %inc22.us170.epil, ptr %rows, align 16, !tbaa !5 %idxprom23.us171.epil = sext i32 %inc22.us170.epil to i64 %arrayidx24.us172.epil = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %idxprom23.us171.epil store i32 %i2.0166.us168.unr, ptr %arrayidx24.us172.epil, align 4, !tbaa !5 br label %for.cond29.preheader for.cond29.preheader: ; preds = %for.cond6.preheader.us167.epil, %for.cond29.preheader.loopexit331.unr-lcssa, %for.inc26.us, %for.cond.cleanup %cmp30180 = icmp sgt i32 %.pre, 0 br i1 %cmp30180, label %for.cond33.preheader.lr.ph, label %for.cond60.preheader for.cond29.preheader.thread261: ; preds = %entry call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %rows) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %rows, i8 0, i64 404, i1 false) call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %columns) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %columns, i8 0, i64 404, i1 false) %.pre252 = load i32, ptr %w, align 4, !tbaa !5 %cmp30180264 = icmp sgt i32 %.pre252, 0 br i1 %cmp30180264, label %for.cond33.preheader.lr.ph.split, label %for.end118 for.cond33.preheader.lr.ph: ; preds = %for.cond29.preheader br i1 %cmp4165, label %for.cond33.preheader.us.preheader, label %for.cond33.preheader.lr.ph.split for.cond33.preheader.us.preheader: ; preds = %for.cond33.preheader.lr.ph %wide.trip.count228 = zext i32 %.pre to i64 %wide.trip.count223 = zext i32 %8 to i64 br label %for.cond33.preheader.us for.cond33.preheader.us: ; preds = %for.cond33.preheader.us.preheader, %for.inc57.us %indvars.iv225 = phi i64 [ 0, %for.cond33.preheader.us.preheader ], [ %indvars.iv.next226, %for.inc57.us ] br label %for.body36.us for.body36.us: ; preds = %for.cond33.preheader.us, %for.inc46.us %indvars.iv220 = phi i64 [ 0, %for.cond33.preheader.us ], [ %indvars.iv.next221, %for.inc46.us ] %arrayidx40.us = getelementptr inbounds [102 x [102 x i8]], ptr %field, i64 0, i64 %indvars.iv220, i64 %indvars.iv225 %11 = load i8, ptr %arrayidx40.us, align 1, !tbaa !9 %cmp42.us = icmp eq i8 %11, 35 br i1 %cmp42.us, label %for.end48.us, label %for.inc46.us for.inc46.us: ; preds = %for.body36.us %indvars.iv.next221 = add nuw nsw i64 %indvars.iv220, 1 %exitcond224.not = icmp eq i64 %indvars.iv.next221, %wide.trip.count223 br i1 %exitcond224.not, label %if.then51.us, label %for.body36.us, !llvm.loop !14 for.end48.us: ; preds = %for.body36.us %12 = trunc i64 %indvars.iv220 to i32 %cmp49.us = icmp eq i32 %8, %12 br i1 %cmp49.us, label %if.then51.us, label %for.inc57.us if.then51.us: ; preds = %for.inc46.us, %for.end48.us %13 = load i32, ptr %columns, align 16, !tbaa !5 %inc53.us = add nsw i32 %13, 1 store i32 %inc53.us, ptr %columns, align 16, !tbaa !5 %idxprom54.us = sext i32 %inc53.us to i64 %arrayidx55.us = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %idxprom54.us %14 = trunc i64 %indvars.iv225 to i32 store i32 %14, ptr %arrayidx55.us, align 4, !tbaa !5 br label %for.inc57.us for.inc57.us: ; preds = %if.then51.us, %for.end48.us %indvars.iv.next226 = add nuw nsw i64 %indvars.iv225, 1 %exitcond229.not = icmp eq i64 %indvars.iv.next226, %wide.trip.count228 br i1 %exitcond229.not, label %for.cond60.preheader, label %for.cond33.preheader.us, !llvm.loop !15 for.cond33.preheader.lr.ph.split: ; preds = %for.cond29.preheader.thread261, %for.cond33.preheader.lr.ph %.pre254265270 = phi i32 [ %.pre, %for.cond33.preheader.lr.ph ], [ %.pre252, %for.cond29.preheader.thread261 ] %15 = phi i32 [ %8, %for.cond33.preheader.lr.ph ], [ %0, %for.cond29.preheader.thread261 ] %cmp49 = icmp eq i32 %15, 0 br i1 %cmp49, label %for.cond33.preheader.us182.preheader, label %for.end118 for.cond33.preheader.us182.preheader: ; preds = %for.cond33.preheader.lr.ph.split %xtraiter333 = and i32 %.pre254265270, 1 %16 = icmp eq i32 %.pre254265270, 1 br i1 %16, label %for.cond60.preheader.loopexit329.unr-lcssa, label %for.cond33.preheader.us182.preheader.new for.cond33.preheader.us182.preheader.new: ; preds = %for.cond33.preheader.us182.preheader %unroll_iter335 = and i32 %.pre254265270, -2 br label %for.cond33.preheader.us182 for.cond33.preheader.us182: ; preds = %for.cond33.preheader.us182, %for.cond33.preheader.us182.preheader.new %j.1181.us183 = phi i32 [ 0, %for.cond33.preheader.us182.preheader.new ], [ %inc58.us189.1, %for.cond33.preheader.us182 ] %niter336 = phi i32 [ 0, %for.cond33.preheader.us182.preheader.new ], [ %niter336.next.1, %for.cond33.preheader.us182 ] %17 = load i32, ptr %columns, align 16, !tbaa !5 %inc53.us185 = add nsw i32 %17, 1 store i32 %inc53.us185, ptr %columns, align 16, !tbaa !5 %idxprom54.us186 = sext i32 %inc53.us185 to i64 %arrayidx55.us187 = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %idxprom54.us186 store i32 %j.1181.us183, ptr %arrayidx55.us187, align 4, !tbaa !5 %inc58.us189 = or i32 %j.1181.us183, 1 %18 = load i32, ptr %columns, align 16, !tbaa !5 %inc53.us185.1 = add nsw i32 %18, 1 store i32 %inc53.us185.1, ptr %columns, align 16, !tbaa !5 %idxprom54.us186.1 = sext i32 %inc53.us185.1 to i64 %arrayidx55.us187.1 = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %idxprom54.us186.1 store i32 %inc58.us189, ptr %arrayidx55.us187.1, align 4, !tbaa !5 %inc58.us189.1 = add nuw nsw i32 %j.1181.us183, 2 %niter336.next.1 = add i32 %niter336, 2 %niter336.ncmp.1 = icmp eq i32 %niter336.next.1, %unroll_iter335 br i1 %niter336.ncmp.1, label %for.cond60.preheader.loopexit329.unr-lcssa, label %for.cond33.preheader.us182, !llvm.loop !15 for.cond60.preheader.loopexit329.unr-lcssa: ; preds = %for.cond33.preheader.us182, %for.cond33.preheader.us182.preheader %j.1181.us183.unr = phi i32 [ 0, %for.cond33.preheader.us182.preheader ], [ %inc58.us189.1, %for.cond33.preheader.us182 ] %lcmp.mod334.not = icmp eq i32 %xtraiter333, 0 br i1 %lcmp.mod334.not, label %for.cond60.preheader, label %for.cond33.preheader.us182.epil for.cond33.preheader.us182.epil: ; preds = %for.cond60.preheader.loopexit329.unr-lcssa %19 = load i32, ptr %columns, align 16, !tbaa !5 %inc53.us185.epil = add nsw i32 %19, 1 store i32 %inc53.us185.epil, ptr %columns, align 16, !tbaa !5 %idxprom54.us186.epil = sext i32 %inc53.us185.epil to i64 %arrayidx55.us187.epil = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %idxprom54.us186.epil store i32 %j.1181.us183.unr, ptr %arrayidx55.us187.epil, align 4, !tbaa !5 br label %for.cond60.preheader for.cond60.preheader: ; preds = %for.cond33.preheader.us182.epil, %for.cond60.preheader.loopexit329.unr-lcssa, %for.inc57.us, %for.cond29.preheader %20 = phi i32 [ %8, %for.cond29.preheader ], [ %8, %for.inc57.us ], [ %15, %for.cond60.preheader.loopexit329.unr-lcssa ], [ %15, %for.cond33.preheader.us182.epil ] %cmp4165253260 = phi i1 [ %cmp4165, %for.cond29.preheader ], [ %cmp4165, %for.inc57.us ], [ false, %for.cond60.preheader.loopexit329.unr-lcssa ], [ false, %for.cond33.preheader.us182.epil ] br i1 %cmp4165253260, label %for.cond64.preheader.lr.ph, label %for.end118 for.cond64.preheader.lr.ph: ; preds = %for.cond6.preheader.lr.ph.split, %for.cond60.preheader %21 = phi i32 [ %20, %for.cond60.preheader ], [ %8, %for.cond6.preheader.lr.ph.split ] %22 = load i32, ptr %rows, align 16, !tbaa !5 %cmp66.not191 = icmp slt i32 %22, 1 %23 = load i32, ptr %columns, align 16 %cmp87.not195 = icmp slt i32 %23, 1 %24 = add i32 %22, 1 %25 = add i32 %23, 1 %wide.trip.count233 = zext i32 %24 to i64 %wide.trip.count238 = zext i32 %25 to i64 %26 = add nsw i64 %wide.trip.count238, -1 %27 = add nsw i64 %wide.trip.count233, -1 %min.iters.check296 = icmp ult i64 %27, 8 %n.vec299 = and i64 %27, -8 %ind.end300 = or i64 %n.vec299, 1 %cmp.n302 = icmp eq i64 %27, %n.vec299 %min.iters.check = icmp ult i64 %26, 8 %n.vec = and i64 %26, -8 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %26, %n.vec br label %for.cond64.preheader for.cond64.preheader: ; preds = %for.cond64.preheader.lr.ph, %cleanup113 %28 = phi i32 [ %21, %for.cond64.preheader.lr.ph ], [ %61, %cleanup113 ] %indvars.iv246 = phi i64 [ 0, %for.cond64.preheader.lr.ph ], [ %indvars.iv.next247, %cleanup113 ] br i1 %cmp66.not191, label %for.cond81.preheader, label %for.body69.preheader for.body69.preheader: ; preds = %for.cond64.preheader br i1 %min.iters.check296, label %for.body69.preheader322, label %vector.ph297 vector.ph297: ; preds = %for.body69.preheader %broadcast.splatinsert310 = insertelement <4 x i64> poison, i64 %indvars.iv246, i64 0 %broadcast.splat311 = shufflevector <4 x i64> %broadcast.splatinsert310, <4 x i64> poison, <4 x i32> zeroinitializer br label %vector.body303 vector.body303: ; preds = %vector.body303, %vector.ph297 %index304 = phi i64 [ 0, %vector.ph297 ], [ %index.next312, %vector.body303 ] %vec.phi305 = phi <4 x i32> [ zeroinitializer, %vector.ph297 ], [ %35, %vector.body303 ] %vec.phi306 = phi <4 x i32> [ zeroinitializer, %vector.ph297 ], [ %36, %vector.body303 ] %offset.idx307 = or i64 %index304, 1 %29 = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %offset.idx307 %wide.load308 = load <4 x i32>, ptr %29, align 4, !tbaa !5 %30 = getelementptr inbounds i32, ptr %29, i64 4 %wide.load309 = load <4 x i32>, ptr %30, align 4, !tbaa !5 %31 = zext <4 x i32> %wide.load308 to <4 x i64> %32 = zext <4 x i32> %wide.load309 to <4 x i64> %33 = icmp eq <4 x i64> %broadcast.splat311, %31 %34 = icmp eq <4 x i64> %broadcast.splat311, %32 %35 = select <4 x i1> %33, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi305 %36 = select <4 x i1> %34, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi306 %index.next312 = add nuw i64 %index304, 8 %37 = icmp eq i64 %index.next312, %n.vec299 br i1 %37, label %middle.block294, label %vector.body303, !llvm.loop !16 middle.block294: ; preds = %vector.body303 %rdx.select.cmp313.not = icmp ne <4 x i32> %35, zeroinitializer %rdx.select.cmp315318 = icmp ne <4 x i32> %36, zeroinitializer %rdx.select.cmp315 = select <4 x i1> %rdx.select.cmp313.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp315318 %38 = bitcast <4 x i1> %rdx.select.cmp315 to i4 %.not = icmp ne i4 %38, 0 %rdx.select316 = zext i1 %.not to i32 br i1 %cmp.n302, label %for.cond.cleanup68, label %for.body69.preheader322 for.body69.preheader322: ; preds = %for.body69.preheader, %middle.block294 %indvars.iv230.ph = phi i64 [ 1, %for.body69.preheader ], [ %ind.end300, %middle.block294 ] %rowflag.0192.ph = phi i32 [ 0, %for.body69.preheader ], [ %rdx.select316, %middle.block294 ] br label %for.body69 for.cond.cleanup68: ; preds = %for.body69, %middle.block294 %spec.select.lcssa = phi i32 [ %rdx.select316, %middle.block294 ], [ %spec.select, %for.body69 ] %tobool.not = icmp eq i32 %spec.select.lcssa, 0 br i1 %tobool.not, label %for.cond81.preheader, label %cleanup113 for.cond81.preheader: ; preds = %for.cond64.preheader, %for.cond.cleanup68 %39 = load i32, ptr %w, align 4, !tbaa !5 %cmp82199 = icmp sgt i32 %39, 0 br i1 %cmp82199, label %for.cond85.preheader.lr.ph, label %for.end111 for.cond85.preheader.lr.ph: ; preds = %for.cond81.preheader br i1 %cmp87.not195, label %for.cond85.preheader.us, label %for.cond85.preheader for.cond85.preheader.us: ; preds = %for.cond85.preheader.lr.ph, %for.cond85.preheader.us %indvars.iv243 = phi i64 [ %indvars.iv.next244, %for.cond85.preheader.us ], [ 0, %for.cond85.preheader.lr.ph ] %arrayidx106.us = getelementptr inbounds [102 x [102 x i8]], ptr %field, i64 0, i64 %indvars.iv246, i64 %indvars.iv243 %40 = load i8, ptr %arrayidx106.us, align 1, !tbaa !9 %conv107.us = sext i8 %40 to i32 %putchar154.us = call i32 @putchar(i32 %conv107.us) %indvars.iv.next244 = add nuw nsw i64 %indvars.iv243, 1 %41 = load i32, ptr %w, align 4, !tbaa !5 %42 = sext i32 %41 to i64 %cmp82.us = icmp slt i64 %indvars.iv.next244, %42 br i1 %cmp82.us, label %for.cond85.preheader.us, label %for.end111, !llvm.loop !19 for.body69: ; preds = %for.body69.preheader322, %for.body69 %indvars.iv230 = phi i64 [ %indvars.iv.next231, %for.body69 ], [ %indvars.iv230.ph, %for.body69.preheader322 ] %rowflag.0192 = phi i32 [ %spec.select, %for.body69 ], [ %rowflag.0192.ph, %for.body69.preheader322 ] %arrayidx71 = getelementptr inbounds [101 x i32], ptr %rows, i64 0, i64 %indvars.iv230 %43 = load i32, ptr %arrayidx71, align 4, !tbaa !5 %44 = zext i32 %43 to i64 %cmp72 = icmp eq i64 %indvars.iv246, %44 %spec.select = select i1 %cmp72, i32 1, i32 %rowflag.0192 %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1 %exitcond234.not = icmp eq i64 %indvars.iv.next231, %wide.trip.count233 br i1 %exitcond234.not, label %for.cond.cleanup68, label %for.body69, !llvm.loop !20 for.cond85.preheader: ; preds = %for.cond85.preheader.lr.ph, %cleanup %45 = phi i32 [ %59, %cleanup ], [ %39, %for.cond85.preheader.lr.ph ] %indvars.iv240 = phi i64 [ %indvars.iv.next241, %cleanup ], [ 0, %for.cond85.preheader.lr.ph ] br i1 %min.iters.check, label %for.body90.preheader, label %vector.ph vector.ph: ; preds = %for.cond85.preheader %broadcast.splatinsert = insertelement <4 x i64> poison, i64 %indvars.iv240, i64 0 %broadcast.splat = shufflevector <4 x i64> %broadcast.splatinsert, <4 x i64> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %52, %vector.body ] %vec.phi290 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %53, %vector.body ] %offset.idx = or i64 %index, 1 %46 = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %46, align 4, !tbaa !5 %47 = getelementptr inbounds i32, ptr %46, i64 4 %wide.load291 = load <4 x i32>, ptr %47, align 4, !tbaa !5 %48 = zext <4 x i32> %wide.load to <4 x i64> %49 = zext <4 x i32> %wide.load291 to <4 x i64> %50 = icmp eq <4 x i64> %broadcast.splat, %48 %51 = icmp eq <4 x i64> %broadcast.splat, %49 %52 = select <4 x i1> %50, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi %53 = select <4 x i1> %51, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> %vec.phi290 %index.next = add nuw i64 %index, 8 %54 = icmp eq i64 %index.next, %n.vec br i1 %54, label %middle.block, label %vector.body, !llvm.loop !21 middle.block: ; preds = %vector.body %rdx.select.cmp.not = icmp ne <4 x i32> %52, zeroinitializer %rdx.select.cmp292319 = icmp ne <4 x i32> %53, zeroinitializer %rdx.select.cmp292 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp292319 %55 = bitcast <4 x i1> %rdx.select.cmp292 to i4 %.not320 = icmp ne i4 %55, 0 %rdx.select293 = zext i1 %.not320 to i32 br i1 %cmp.n, label %for.cond85.for.cond.cleanup89_crit_edge, label %for.body90.preheader for.body90.preheader: ; preds = %for.cond85.preheader, %middle.block %indvars.iv235.ph = phi i64 [ 1, %for.cond85.preheader ], [ %ind.end, %middle.block ] %columnflag.0196.ph = phi i32 [ 0, %for.cond85.preheader ], [ %rdx.select293, %middle.block ] br label %for.body90 for.cond85.for.cond.cleanup89_crit_edge: ; preds = %for.body90, %middle.block %spec.select155.lcssa = phi i32 [ %rdx.select293, %middle.block ], [ %spec.select155, %for.body90 ] %tobool100.not = icmp eq i32 %spec.select155.lcssa, 0 br i1 %tobool100.not, label %if.end102, label %cleanup for.body90: ; preds = %for.body90.preheader, %for.body90 %indvars.iv235 = phi i64 [ %indvars.iv.next236, %for.body90 ], [ %indvars.iv235.ph, %for.body90.preheader ] %columnflag.0196 = phi i32 [ %spec.select155, %for.body90 ], [ %columnflag.0196.ph, %for.body90.preheader ] %arrayidx92 = getelementptr inbounds [101 x i32], ptr %columns, i64 0, i64 %indvars.iv235 %56 = load i32, ptr %arrayidx92, align 4, !tbaa !5 %57 = zext i32 %56 to i64 %cmp93 = icmp eq i64 %indvars.iv240, %57 %spec.select155 = select i1 %cmp93, i32 1, i32 %columnflag.0196 %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1 %exitcond239.not = icmp eq i64 %indvars.iv.next236, %wide.trip.count238 br i1 %exitcond239.not, label %for.cond85.for.cond.cleanup89_crit_edge, label %for.body90, !llvm.loop !22 if.end102: ; preds = %for.cond85.for.cond.cleanup89_crit_edge %arrayidx106 = getelementptr inbounds [102 x [102 x i8]], ptr %field, i64 0, i64 %indvars.iv246, i64 %indvars.iv240 %58 = load i8, ptr %arrayidx106, align 1, !tbaa !9 %conv107 = sext i8 %58 to i32 %putchar154 = call i32 @putchar(i32 %conv107) %.pre249 = load i32, ptr %w, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %for.cond85.for.cond.cleanup89_crit_edge, %if.end102 %59 = phi i32 [ %45, %for.cond85.for.cond.cleanup89_crit_edge ], [ %.pre249, %if.end102 ] %indvars.iv.next241 = add nuw nsw i64 %indvars.iv240, 1 %60 = sext i32 %59 to i64 %cmp82 = icmp slt i64 %indvars.iv.next241, %60 br i1 %cmp82, label %for.cond85.preheader, label %for.end111, !llvm.loop !19 for.end111: ; preds = %cleanup, %for.cond85.preheader.us, %for.cond81.preheader %putchar = call i32 @putchar(i32 10) %.pre250 = load i32, ptr %h, align 4, !tbaa !5 br label %cleanup113 cleanup113: ; preds = %for.cond.cleanup68, %for.end111 %61 = phi i32 [ %28, %for.cond.cleanup68 ], [ %.pre250, %for.end111 ] %indvars.iv.next247 = add nuw nsw i64 %indvars.iv246, 1 %62 = sext i32 %61 to i64 %cmp61 = icmp slt i64 %indvars.iv.next247, %62 br i1 %cmp61, label %for.cond64.preheader, label %for.end118, !llvm.loop !23 for.end118: ; preds = %cleanup113, %for.cond33.preheader.lr.ph.split, %for.cond29.preheader.thread261, %for.cond60.preheader call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %columns) #5 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %rows) #5 call void @llvm.lifetime.end.p0(i64 10404, ptr nonnull %field) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #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: 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 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11} !14 = distinct !{!14, !11} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11, !17, !18} !17 = !{!"llvm.loop.isvectorized", i32 1} !18 = !{!"llvm.loop.unroll.runtime.disable"} !19 = distinct !{!19, !11} !20 = distinct !{!20, !11, !18, !17} !21 = distinct !{!21, !11, !17, !18} !22 = distinct !{!22, !11, !18, !17} !23 = distinct !{!23, !11}
#include <stdio.h> #define rep(i,l,r) for((i)=(l);(i)<(r);(i)++) int main(){ int i,j,h,w; scanf("%d%d",&h,&w); char s[h][w]; int row[h],col[w]; rep(i,0,w)col[i]=1; rep(i,0,h){ scanf("%s",s[i]); row[i]=1; rep(j,0,w){ if(s[i][j]!='.'){ col[j]*=0; row[i]*=0; } } } rep(i,0,h){ rep(j,0,w){ if(row[i]||col[j])w+=0; else printf("%c",s[i][j]); } if(i<h-1&&!row[i])printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133275/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133275/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\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) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5 %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 %1 = zext i32 %0 to i64 %2 = load i32, ptr %w, align 4, !tbaa !5 %3 = zext i32 %2 to i64 %4 = call ptr @llvm.stacksave.p0() %5 = mul nuw i64 %3, %1 %vla = alloca i8, i64 %5, align 16 %6 = load i32, ptr %h, align 4, !tbaa !5 %7 = zext i32 %6 to i64 %vla1 = alloca i32, i64 %7, align 16 %8 = load i32, ptr %w, align 4, !tbaa !5 %9 = zext i32 %8 to i64 %vla2 = alloca i32, i64 %9, align 16 %cmp88 = icmp sgt i32 %8, 0 br i1 %cmp88, label %for.body.preheader, label %for.cond3.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %8, 8 br i1 %min.iters.check, label %for.body.preheader117, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %9, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %10 = getelementptr inbounds i32, ptr %vla2, i64 %index store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %10, align 16, !tbaa !5 %11 = getelementptr inbounds i32, ptr %10, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %11, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %9 br i1 %cmp.n, label %for.cond3.preheader, label %for.body.preheader117 for.body.preheader117: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond3.preheader: ; preds = %for.body, %middle.block, %entry %cmp492 = icmp sgt i32 %6, 0 br i1 %cmp492, label %for.body5, label %for.end65 for.body: ; preds = %for.body.preheader117, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader117 ] %arrayidx = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv store i32 1, ptr %arrayidx, align 4, !tbaa !5 %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.cond3.preheader, label %for.body, !llvm.loop !13 for.cond31.preheader: ; preds = %for.inc28 %cmp3296 = icmp sgt i32 %19, 0 br i1 %cmp3296, label %for.cond35.preheader, label %for.end65 for.body5: ; preds = %for.cond3.preheader, %for.inc28 %indvars.iv105 = phi i64 [ %indvars.iv.next106, %for.inc28 ], [ 0, %for.cond3.preheader ] %13 = mul nuw nsw i64 %indvars.iv105, %3 %arrayidx7 = getelementptr inbounds i8, ptr %vla, i64 %13 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx7) %arrayidx10 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv105 store i32 1, ptr %arrayidx10, align 4, !tbaa !5 %14 = load i32, ptr %w, align 4, !tbaa !5 %cmp1290 = icmp sgt i32 %14, 0 br i1 %cmp1290, label %for.body13.preheader, label %for.inc28 for.body13.preheader: ; preds = %for.body5 %wide.trip.count103 = zext i32 %14 to i64 %xtraiter = and i64 %wide.trip.count103, 1 %15 = icmp eq i32 %14, 1 br i1 %15, label %for.inc28.loopexit.unr-lcssa, label %for.body13.preheader.new for.body13.preheader.new: ; preds = %for.body13.preheader %unroll_iter = and i64 %wide.trip.count103, 4294967294 br label %for.body13 for.body13: ; preds = %for.inc25.1, %for.body13.preheader.new %indvars.iv100 = phi i64 [ 0, %for.body13.preheader.new ], [ %indvars.iv.next101.1, %for.inc25.1 ] %niter = phi i64 [ 0, %for.body13.preheader.new ], [ %niter.next.1, %for.inc25.1 ] %arrayidx17 = getelementptr inbounds i8, ptr %arrayidx7, i64 %indvars.iv100 %16 = load i8, ptr %arrayidx17, align 1, !tbaa !14 %cmp18.not = icmp eq i8 %16, 46 br i1 %cmp18.not, label %for.inc25, label %if.then if.then: ; preds = %for.body13 %arrayidx21 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv100 store i32 0, ptr %arrayidx21, align 8, !tbaa !5 store i32 0, ptr %arrayidx10, align 4, !tbaa !5 br label %for.inc25 for.inc25: ; preds = %for.body13, %if.then %indvars.iv.next101 = or i64 %indvars.iv100, 1 %arrayidx17.1 = getelementptr inbounds i8, ptr %arrayidx7, i64 %indvars.iv.next101 %17 = load i8, ptr %arrayidx17.1, align 1, !tbaa !14 %cmp18.not.1 = icmp eq i8 %17, 46 br i1 %cmp18.not.1, label %for.inc25.1, label %if.then.1 if.then.1: ; preds = %for.inc25 %arrayidx21.1 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv.next101 store i32 0, ptr %arrayidx21.1, align 4, !tbaa !5 store i32 0, ptr %arrayidx10, align 4, !tbaa !5 br label %for.inc25.1 for.inc25.1: ; preds = %if.then.1, %for.inc25 %indvars.iv.next101.1 = add nuw nsw i64 %indvars.iv100, 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.inc28.loopexit.unr-lcssa, label %for.body13, !llvm.loop !15 for.inc28.loopexit.unr-lcssa: ; preds = %for.inc25.1, %for.body13.preheader %indvars.iv100.unr = phi i64 [ 0, %for.body13.preheader ], [ %indvars.iv.next101.1, %for.inc25.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.inc28, label %for.body13.epil for.body13.epil: ; preds = %for.inc28.loopexit.unr-lcssa %arrayidx17.epil = getelementptr inbounds i8, ptr %arrayidx7, i64 %indvars.iv100.unr %18 = load i8, ptr %arrayidx17.epil, align 1, !tbaa !14 %cmp18.not.epil = icmp eq i8 %18, 46 br i1 %cmp18.not.epil, label %for.inc28, label %if.then.epil if.then.epil: ; preds = %for.body13.epil %arrayidx21.epil = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv100.unr store i32 0, ptr %arrayidx21.epil, align 4, !tbaa !5 store i32 0, ptr %arrayidx10, align 4, !tbaa !5 br label %for.inc28 for.inc28: ; preds = %for.inc28.loopexit.unr-lcssa, %if.then.epil, %for.body13.epil, %for.body5 %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1 %19 = load i32, ptr %h, align 4, !tbaa !5 %20 = sext i32 %19 to i64 %cmp4 = icmp slt i64 %indvars.iv.next106, %20 br i1 %cmp4, label %for.body5, label %for.cond31.preheader, !llvm.loop !16 for.cond35.preheader: ; preds = %for.cond31.preheader, %for.inc63 %21 = phi i32 [ %33, %for.inc63 ], [ %19, %for.cond31.preheader ] %indvars.iv111 = phi i64 [ %indvars.iv.next112, %for.inc63 ], [ 0, %for.cond31.preheader ] %22 = load i32, ptr %w, align 4, !tbaa !5 %cmp3694 = icmp sgt i32 %22, 0 br i1 %cmp3694, label %for.body38.lr.ph, label %for.end54 for.body38.lr.ph: ; preds = %for.cond35.preheader %arrayidx40 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv111 %23 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %tobool.not = icmp eq i32 %23, 0 %24 = mul nuw nsw i64 %indvars.iv111, %3 %arrayidx46 = getelementptr inbounds i8, ptr %vla, i64 %24 br i1 %tobool.not, label %for.body38.us, label %for.end54 for.body38.us: ; preds = %for.body38.lr.ph, %for.inc52.us %25 = phi i32 [ %28, %for.inc52.us ], [ %22, %for.body38.lr.ph ] %indvars.iv108 = phi i64 [ %indvars.iv.next109, %for.inc52.us ], [ 0, %for.body38.lr.ph ] %arrayidx42.us = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv108 %26 = load i32, ptr %arrayidx42.us, align 4, !tbaa !5 %tobool43.not.us = icmp eq i32 %26, 0 br i1 %tobool43.not.us, label %if.else.us, label %for.inc52.us if.else.us: ; preds = %for.body38.us %arrayidx48.us = getelementptr inbounds i8, ptr %arrayidx46, i64 %indvars.iv108 %27 = load i8, ptr %arrayidx48.us, align 1, !tbaa !14 %conv49.us = sext i8 %27 to i32 %putchar87.us = call i32 @putchar(i32 %conv49.us) %.pre = load i32, ptr %w, align 4, !tbaa !5 br label %for.inc52.us for.inc52.us: ; preds = %if.else.us, %for.body38.us %28 = phi i32 [ %.pre, %if.else.us ], [ %25, %for.body38.us ] %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1 %29 = sext i32 %28 to i64 %cmp36.us = icmp slt i64 %indvars.iv.next109, %29 br i1 %cmp36.us, label %for.body38.us, label %for.end54.loopexit, !llvm.loop !17 for.end54.loopexit: ; preds = %for.inc52.us %.pre114 = load i32, ptr %h, align 4, !tbaa !5 br label %for.end54 for.end54: ; preds = %for.body38.lr.ph, %for.end54.loopexit, %for.cond35.preheader %30 = phi i32 [ %.pre114, %for.end54.loopexit ], [ %21, %for.cond35.preheader ], [ %21, %for.body38.lr.ph ] %sub = add nsw i32 %30, -1 %31 = sext i32 %sub to i64 %cmp55 = icmp slt i64 %indvars.iv111, %31 br i1 %cmp55, label %land.lhs.true, label %for.inc63 land.lhs.true: ; preds = %for.end54 %arrayidx58 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv111 %32 = load i32, ptr %arrayidx58, align 4, !tbaa !5 %tobool59.not = icmp eq i32 %32, 0 br i1 %tobool59.not, label %if.then60, label %for.inc63 if.then60: ; preds = %land.lhs.true %putchar = call i32 @putchar(i32 10) %.pre115 = load i32, ptr %h, align 4, !tbaa !5 br label %for.inc63 for.inc63: ; preds = %for.end54, %land.lhs.true, %if.then60 %33 = phi i32 [ %30, %for.end54 ], [ %30, %land.lhs.true ], [ %.pre115, %if.then60 ] %indvars.iv.next112 = add nuw nsw i64 %indvars.iv111, 1 %34 = sext i32 %33 to i64 %cmp32 = icmp slt i64 %indvars.iv.next112, %34 br i1 %cmp32, label %for.cond35.preheader, label %for.end65, !llvm.loop !18 for.end65: ; preds = %for.inc63, %for.cond3.preheader, %for.cond31.preheader call void @llvm.stackrestore.p0(ptr %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11} !14 = !{!7, !7, i64 0} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include<stdio.h> int main() { int r,c,i,j,ok; char a[1000][1000]; scanf("%d %d",&r,&c); for(i=0;i<r;i++) scanf("%s", a[i]); for(i=0;i<r;i++){ ok=1; for(j=0;j<c;j++) if(a[i][j]!='.' && a[i][j]!=' ') ok=0; if(ok==1) for(j=0;j<c;j++) a[i][j]=' '; } for(j=0;j<c;j++){ ok=1; for(i=0;i<r;i++) if(a[i][j]!='.' && a[i][j]!=' ') ok=0; if(ok==1) for(i=0;i<r;i++) a[i][j]=' '; } for(i=0;i<r;i++){ for(j=0;j<c;j++) if(a[i][j]!=' ') printf("%c",a[i][j]); printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133325/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133325/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %c = alloca i32, align 4 %a = alloca [1000 x [1000 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #5 call void @llvm.lifetime.start.p0(i64 1000000, ptr nonnull %a) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %c) %0 = load i32, ptr %r, align 4, !tbaa !5 %cmp154 = icmp sgt i32 %0, 0 br i1 %cmp154, label %for.body, label %for.end117 for.cond2.preheader: ; preds = %for.body %cmp3163 = icmp sgt i32 %4, 0 %.pre = load i32, ptr %c, align 4, !tbaa !5 br i1 %cmp3163, label %for.cond5.preheader.lr.ph, label %for.cond42.preheader for.cond5.preheader.lr.ph: ; preds = %for.cond2.preheader %cmp6156 = icmp sgt i32 %.pre, 0 br i1 %cmp6156, label %for.cond5.preheader.us.us.preheader, label %for.cond92.preheader.preheader for.cond5.preheader.us.us.preheader: ; preds = %for.cond5.preheader.lr.ph %1 = zext i32 %.pre to i64 %wide.trip.count218 = zext i32 %4 to i64 br label %for.cond5.preheader.us.us for.cond5.preheader.us.us: ; preds = %for.cond5.preheader.us.us.preheader, %for.inc39.us.us %indvar = phi i64 [ 0, %for.cond5.preheader.us.us.preheader ], [ %indvar.next, %for.inc39.us.us ] %2 = mul nuw nsw i64 %indvar, 1000 %scevgep = getelementptr i8, ptr %a, i64 %2 br label %for.body7.us.us.outer for.body7.us.us.outer: ; preds = %for.inc21.us.us.thread, %for.cond5.preheader.us.us %indvars.iv211.ph = phi i64 [ %indvars.iv.next212247, %for.inc21.us.us.thread ], [ 0, %for.cond5.preheader.us.us ] %cmp24.us.us = phi i1 [ false, %for.inc21.us.us.thread ], [ true, %for.cond5.preheader.us.us ] br label %for.body7.us.us for.inc39.us.us: ; preds = %for.inc21.us.us.thread, %for.cond27.preheader.us.us, %for.cond5.for.end23_crit_edge.us.us %indvar.next = add nuw nsw i64 %indvar, 1 %exitcond219.not = icmp eq i64 %indvar.next, %wide.trip.count218 br i1 %exitcond219.not, label %for.cond42.preheader, label %for.cond5.preheader.us.us, !llvm.loop !9 for.body7.us.us: ; preds = %for.body7.us.us.outer, %for.inc21.us.us %indvars.iv211 = phi i64 [ %indvars.iv.next212, %for.inc21.us.us ], [ %indvars.iv211.ph, %for.body7.us.us.outer ] %arrayidx11.us.us = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvar, i64 %indvars.iv211 %3 = load i8, ptr %arrayidx11.us.us, align 1, !tbaa !11 switch i8 %3, label %for.inc21.us.us.thread [ i8 46, label %for.inc21.us.us i8 32, label %for.inc21.us.us ] for.inc21.us.us: ; preds = %for.body7.us.us, %for.body7.us.us %indvars.iv.next212 = add nuw nsw i64 %indvars.iv211, 1 %exitcond.not = icmp eq i64 %indvars.iv.next212, %1 br i1 %exitcond.not, label %for.cond5.for.end23_crit_edge.us.us, label %for.body7.us.us, !llvm.loop !12 for.inc21.us.us.thread: ; preds = %for.body7.us.us %indvars.iv.next212247 = add nuw nsw i64 %indvars.iv211, 1 %exitcond.not248 = icmp eq i64 %indvars.iv.next212247, %1 br i1 %exitcond.not248, label %for.inc39.us.us, label %for.body7.us.us.outer, !llvm.loop !12 for.cond27.preheader.us.us: ; preds = %for.cond5.for.end23_crit_edge.us.us call void @llvm.memset.p0.i64(ptr align 8 %scevgep, i8 32, i64 %1, i1 false), !tbaa !11 br label %for.inc39.us.us for.cond5.for.end23_crit_edge.us.us: ; preds = %for.inc21.us.us br i1 %cmp24.us.us, label %for.cond27.preheader.us.us, label %for.inc39.us.us for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000 x [1000 x i8]], 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 %4 = load i32, ptr %r, 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.cond2.preheader, !llvm.loop !13 for.cond42.preheader: ; preds = %for.inc39.us.us, %for.cond2.preheader %cmp43186 = icmp sgt i32 %.pre, 0 br i1 %cmp43186, label %for.cond46.preheader.lr.ph, label %for.cond88.preheader for.cond46.preheader.lr.ph: ; preds = %for.cond42.preheader %cmp74184 = icmp slt i32 %4, 1 br i1 %cmp3163, label %for.cond46.preheader.us.preheader, label %for.end117 for.cond46.preheader.us.preheader: ; preds = %for.cond46.preheader.lr.ph %wide.trip.count233 = zext i32 %.pre to i64 %wide.trip.count223 = zext i32 %4 to i64 %xtraiter = and i64 %wide.trip.count223, 3 %6 = icmp ult i32 %4, 4 %unroll_iter = and i64 %wide.trip.count223, 4294967292 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 %xtraiter276 = and i64 %wide.trip.count223, 3 %7 = icmp ult i32 %4, 4 %unroll_iter279 = and i64 %wide.trip.count223, 4294967292 %lcmp.mod278.not = icmp eq i64 %xtraiter276, 0 br label %for.cond46.preheader.us for.cond46.preheader.us: ; preds = %for.cond46.preheader.us.preheader, %for.inc85.us %indvars.iv230 = phi i64 [ 0, %for.cond46.preheader.us.preheader ], [ %indvars.iv.next231, %for.inc85.us ] br i1 %6, label %for.cond46.for.end69_crit_edge.us.unr-lcssa, label %for.body49.us for.inc85.us.loopexit.unr-lcssa: ; preds = %for.body76.us, %for.body76.us.preheader %indvars.iv225.unr = phi i64 [ 0, %for.body76.us.preheader ], [ %indvars.iv.next226.3, %for.body76.us ] br i1 %lcmp.mod278.not, label %for.inc85.us, label %for.body76.us.epil for.body76.us.epil: ; preds = %for.inc85.us.loopexit.unr-lcssa, %for.body76.us.epil %indvars.iv225.epil = phi i64 [ %indvars.iv.next226.epil, %for.body76.us.epil ], [ %indvars.iv225.unr, %for.inc85.us.loopexit.unr-lcssa ] %epil.iter277 = phi i64 [ %epil.iter277.next, %for.body76.us.epil ], [ 0, %for.inc85.us.loopexit.unr-lcssa ] %arrayidx80.us.epil = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv225.epil, i64 %indvars.iv230 store i8 32, ptr %arrayidx80.us.epil, align 1, !tbaa !11 %indvars.iv.next226.epil = add nuw nsw i64 %indvars.iv225.epil, 1 %epil.iter277.next = add i64 %epil.iter277, 1 %epil.iter277.cmp.not = icmp eq i64 %epil.iter277.next, %xtraiter276 br i1 %epil.iter277.cmp.not, label %for.inc85.us, label %for.body76.us.epil, !llvm.loop !14 for.inc85.us: ; preds = %for.inc85.us.loopexit.unr-lcssa, %for.body76.us.epil, %for.cond46.for.end69_crit_edge.us %indvars.iv.next231 = add nuw nsw i64 %indvars.iv230, 1 %exitcond234.not = icmp eq i64 %indvars.iv.next231, %wide.trip.count233 br i1 %exitcond234.not, label %for.cond88.preheader, label %for.cond46.preheader.us, !llvm.loop !16 for.body76.us: ; preds = %for.body76.us.preheader, %for.body76.us %indvars.iv225 = phi i64 [ %indvars.iv.next226.3, %for.body76.us ], [ 0, %for.body76.us.preheader ] %niter280 = phi i64 [ %niter280.next.3, %for.body76.us ], [ 0, %for.body76.us.preheader ] %arrayidx80.us = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv225, i64 %indvars.iv230 store i8 32, ptr %arrayidx80.us, align 1, !tbaa !11 %indvars.iv.next226 = or i64 %indvars.iv225, 1 %arrayidx80.us.1 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next226, i64 %indvars.iv230 store i8 32, ptr %arrayidx80.us.1, align 1, !tbaa !11 %indvars.iv.next226.1 = or i64 %indvars.iv225, 2 %arrayidx80.us.2 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next226.1, i64 %indvars.iv230 store i8 32, ptr %arrayidx80.us.2, align 1, !tbaa !11 %indvars.iv.next226.2 = or i64 %indvars.iv225, 3 %arrayidx80.us.3 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next226.2, i64 %indvars.iv230 store i8 32, ptr %arrayidx80.us.3, align 1, !tbaa !11 %indvars.iv.next226.3 = add nuw nsw i64 %indvars.iv225, 4 %niter280.next.3 = add i64 %niter280, 4 %niter280.ncmp.3 = icmp eq i64 %niter280.next.3, %unroll_iter279 br i1 %niter280.ncmp.3, label %for.inc85.us.loopexit.unr-lcssa, label %for.body76.us, !llvm.loop !17 for.body49.us: ; preds = %for.cond46.preheader.us, %for.inc67.us.3 %indvars.iv220 = phi i64 [ %indvars.iv.next221.3, %for.inc67.us.3 ], [ 0, %for.cond46.preheader.us ] %ok.2182.us = phi i32 [ %ok.3.us.3, %for.inc67.us.3 ], [ 1, %for.cond46.preheader.us ] %niter = phi i64 [ %niter.next.3, %for.inc67.us.3 ], [ 0, %for.cond46.preheader.us ] %arrayidx53.us = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv220, i64 %indvars.iv230 %8 = load i8, ptr %arrayidx53.us, align 1, !tbaa !11 switch i8 %8, label %if.then65.us [ i8 46, label %for.inc67.us i8 32, label %for.inc67.us ] if.then65.us: ; preds = %for.body49.us br label %for.inc67.us for.inc67.us: ; preds = %if.then65.us, %for.body49.us, %for.body49.us %ok.3.us = phi i32 [ 0, %if.then65.us ], [ %ok.2182.us, %for.body49.us ], [ %ok.2182.us, %for.body49.us ] %indvars.iv.next221 = or i64 %indvars.iv220, 1 %arrayidx53.us.1 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next221, i64 %indvars.iv230 %9 = load i8, ptr %arrayidx53.us.1, align 1, !tbaa !11 switch i8 %9, label %if.then65.us.1 [ i8 46, label %for.inc67.us.1 i8 32, label %for.inc67.us.1 ] if.then65.us.1: ; preds = %for.inc67.us br label %for.inc67.us.1 for.inc67.us.1: ; preds = %if.then65.us.1, %for.inc67.us, %for.inc67.us %ok.3.us.1 = phi i32 [ 0, %if.then65.us.1 ], [ %ok.3.us, %for.inc67.us ], [ %ok.3.us, %for.inc67.us ] %indvars.iv.next221.1 = or i64 %indvars.iv220, 2 %arrayidx53.us.2 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next221.1, i64 %indvars.iv230 %10 = load i8, ptr %arrayidx53.us.2, align 1, !tbaa !11 switch i8 %10, label %if.then65.us.2 [ i8 46, label %for.inc67.us.2 i8 32, label %for.inc67.us.2 ] if.then65.us.2: ; preds = %for.inc67.us.1 br label %for.inc67.us.2 for.inc67.us.2: ; preds = %if.then65.us.2, %for.inc67.us.1, %for.inc67.us.1 %ok.3.us.2 = phi i32 [ 0, %if.then65.us.2 ], [ %ok.3.us.1, %for.inc67.us.1 ], [ %ok.3.us.1, %for.inc67.us.1 ] %indvars.iv.next221.2 = or i64 %indvars.iv220, 3 %arrayidx53.us.3 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv.next221.2, i64 %indvars.iv230 %11 = load i8, ptr %arrayidx53.us.3, align 1, !tbaa !11 switch i8 %11, label %if.then65.us.3 [ i8 46, label %for.inc67.us.3 i8 32, label %for.inc67.us.3 ] if.then65.us.3: ; preds = %for.inc67.us.2 br label %for.inc67.us.3 for.inc67.us.3: ; preds = %if.then65.us.3, %for.inc67.us.2, %for.inc67.us.2 %ok.3.us.3 = phi i32 [ 0, %if.then65.us.3 ], [ %ok.3.us.2, %for.inc67.us.2 ], [ %ok.3.us.2, %for.inc67.us.2 ] %indvars.iv.next221.3 = add nuw nsw i64 %indvars.iv220, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond46.for.end69_crit_edge.us.unr-lcssa, label %for.body49.us, !llvm.loop !18 for.cond46.for.end69_crit_edge.us.unr-lcssa: ; preds = %for.inc67.us.3, %for.cond46.preheader.us %ok.3.us.lcssa.ph = phi i32 [ undef, %for.cond46.preheader.us ], [ %ok.3.us.3, %for.inc67.us.3 ] %indvars.iv220.unr = phi i64 [ 0, %for.cond46.preheader.us ], [ %indvars.iv.next221.3, %for.inc67.us.3 ] %ok.2182.us.unr = phi i32 [ 1, %for.cond46.preheader.us ], [ %ok.3.us.3, %for.inc67.us.3 ] br i1 %lcmp.mod.not, label %for.cond46.for.end69_crit_edge.us, label %for.body49.us.epil for.body49.us.epil: ; preds = %for.cond46.for.end69_crit_edge.us.unr-lcssa, %for.inc67.us.epil %indvars.iv220.epil = phi i64 [ %indvars.iv.next221.epil, %for.inc67.us.epil ], [ %indvars.iv220.unr, %for.cond46.for.end69_crit_edge.us.unr-lcssa ] %ok.2182.us.epil = phi i32 [ %ok.3.us.epil, %for.inc67.us.epil ], [ %ok.2182.us.unr, %for.cond46.for.end69_crit_edge.us.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.inc67.us.epil ], [ 0, %for.cond46.for.end69_crit_edge.us.unr-lcssa ] %arrayidx53.us.epil = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv220.epil, i64 %indvars.iv230 %12 = load i8, ptr %arrayidx53.us.epil, align 1, !tbaa !11 switch i8 %12, label %if.then65.us.epil [ i8 46, label %for.inc67.us.epil i8 32, label %for.inc67.us.epil ] if.then65.us.epil: ; preds = %for.body49.us.epil br label %for.inc67.us.epil for.inc67.us.epil: ; preds = %if.then65.us.epil, %for.body49.us.epil, %for.body49.us.epil %ok.3.us.epil = phi i32 [ 0, %if.then65.us.epil ], [ %ok.2182.us.epil, %for.body49.us.epil ], [ %ok.2182.us.epil, %for.body49.us.epil ] %indvars.iv.next221.epil = add nuw nsw i64 %indvars.iv220.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.cond46.for.end69_crit_edge.us, label %for.body49.us.epil, !llvm.loop !19 for.cond46.for.end69_crit_edge.us: ; preds = %for.inc67.us.epil, %for.cond46.for.end69_crit_edge.us.unr-lcssa %ok.3.us.lcssa = phi i32 [ %ok.3.us.lcssa.ph, %for.cond46.for.end69_crit_edge.us.unr-lcssa ], [ %ok.3.us.epil, %for.inc67.us.epil ] %cmp70.us = icmp ne i32 %ok.3.us.lcssa, 1 %brmerge = or i1 %cmp70.us, %cmp74184 br i1 %brmerge, label %for.inc85.us, label %for.body76.us.preheader for.body76.us.preheader: ; preds = %for.cond46.for.end69_crit_edge.us br i1 %7, label %for.inc85.us.loopexit.unr-lcssa, label %for.body76.us for.cond88.preheader: ; preds = %for.inc85.us, %for.cond42.preheader br i1 %cmp3163, label %for.cond92.preheader.preheader, label %for.end117 for.cond92.preheader.preheader: ; preds = %for.cond5.preheader.lr.ph, %for.cond88.preheader br label %for.cond92.preheader for.cond92.preheader: ; preds = %for.cond92.preheader.preheader, %for.end113 %indvars.iv238 = phi i64 [ %indvars.iv.next239, %for.end113 ], [ 0, %for.cond92.preheader.preheader ] %13 = load i32, ptr %c, align 4, !tbaa !5 %cmp93203 = icmp sgt i32 %13, 0 br i1 %cmp93203, label %for.body95, label %for.end113 for.body95: ; preds = %for.cond92.preheader, %for.inc111 %14 = phi i32 [ %16, %for.inc111 ], [ %13, %for.cond92.preheader ] %indvars.iv235 = phi i64 [ %indvars.iv.next236, %for.inc111 ], [ 0, %for.cond92.preheader ] %arrayidx99 = getelementptr inbounds [1000 x [1000 x i8]], ptr %a, i64 0, i64 %indvars.iv238, i64 %indvars.iv235 %15 = load i8, ptr %arrayidx99, align 1, !tbaa !11 %cmp101.not = icmp eq i8 %15, 32 br i1 %cmp101.not, label %for.inc111, label %if.then103 if.then103: ; preds = %for.body95 %conv100 = sext i8 %15 to i32 %putchar152 = call i32 @putchar(i32 %conv100) %.pre241 = load i32, ptr %c, align 4, !tbaa !5 br label %for.inc111 for.inc111: ; preds = %for.body95, %if.then103 %16 = phi i32 [ %14, %for.body95 ], [ %.pre241, %if.then103 ] %indvars.iv.next236 = add nuw nsw i64 %indvars.iv235, 1 %17 = sext i32 %16 to i64 %cmp93 = icmp slt i64 %indvars.iv.next236, %17 br i1 %cmp93, label %for.body95, label %for.end113, !llvm.loop !20 for.end113: ; preds = %for.inc111, %for.cond92.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next239 = add nuw nsw i64 %indvars.iv238, 1 %18 = load i32, ptr %r, align 4, !tbaa !5 %19 = sext i32 %18 to i64 %cmp89 = icmp slt i64 %indvars.iv.next239, %19 br i1 %cmp89, label %for.cond92.preheader, label %for.end117, !llvm.loop !21 for.end117: ; preds = %for.end113, %entry, %for.cond46.preheader.lr.ph, %for.cond88.preheader call void @llvm.lifetime.end.p0(i64 1000000, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #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 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.unroll.disable"} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !15} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10}
#include <stdio.h> int main(void) { int H, W, i, t; while (1) { scanf("%d %d", &H, &W); if (H == 0 && W == 0) break; for (i = 0; i < H; i++) { for (t = 0; t < W; t++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133419/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133419/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %t.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %t.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int H,W,i,j; while(1){ scanf("%d%d",&W,&H); if(H==0&&W==0)break; for(i=1;i<=W;i++){ for(j=1;j<=H;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133462/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133462/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W, ptr noundef nonnull %H) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %7, %for.end10 ], [ %1, %entry ] %cmp2.not18 = icmp slt i32 %2, 1 br i1 %cmp2.not18, label %for.end10, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %H, align 4, !tbaa !5 %cmp4.not16 = icmp slt i32 %3, 1 br i1 %cmp4.not16, label %for.end, label %for.body5 for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 1, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %H, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.017, %4 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.019, %5 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W, ptr noundef nonnull %H) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(int argc, const char * argv[]) { while (1) { int h,w; scanf("%d %d",&h,&w); if(h==0 && w==0){ break; } int i,j; for (i=0; i<h; i++) { for(j=0;j<w;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133505/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133505/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call23 = 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 %cmp24 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp125 = icmp eq i32 %1, 0 %or.cond26 = select i1 %cmp24, i1 %cmp125, i1 false br i1 %or.cond26, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %cleanup %2 = phi i32 [ %6, %cleanup ], [ %0, %entry ] %cmp221 = icmp sgt i32 %2, 0 br i1 %cmp221, label %for.cond3.preheader, label %cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.022 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp419 = icmp sgt i32 %3, 0 br i1 %cmp419, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.020 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.020, 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 %putchar15 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.022, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %cleanup, !llvm.loop !11 cleanup: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #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) %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 = %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(void){ int h = 0,w = 0,i = 0,j = 0; scanf("%d %d",&h,&w); while(h != 0 && w != 0){ // scanf("%d %d",&h,&w); /* if( h == 0 && w == 0){ puts(""); break; }else { */ for( i = 1;i <= h;i++){ for( j = 1;j <= w; j++){ printf("#"); } puts(""); } puts(""); scanf("%d %d",&h,&w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133549/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133549/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 store i32 0, ptr %h, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 store i32 0, ptr %w, align 4, !tbaa !5 %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 %cmp21 = icmp ne i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp ne i32 %1, 0 %2 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %2, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end10 %3 = phi i32 [ %7, %for.end10 ], [ %0, %entry ] %cmp2.not19 = icmp slt i32 %3, 1 br i1 %cmp2.not19, label %for.end10, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.020 = phi i32 [ %inc9, %for.end ], [ 1, %for.cond.preheader ] %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4.not17 = icmp slt i32 %4, 1 br i1 %cmp4.not17, label %for.end, label %for.body5 for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.018 = phi i32 [ %inc, %for.body5 ], [ 1, %for.cond3.preheader ] %putchar16 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.018, 1 %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.018, %5 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar15 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.020, 1 %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.020, %6 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %7 = load i32, ptr %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.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <string.h> #define MAX 301 int main(void) { int H, W; char buf[MAX]; for(; scanf("%d %d", &H, &W), H || W; printf("\n")) { for(memset(buf, '#', W), buf[W] = 0; H--; printf("%s\n", buf)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133642/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133642/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %buf = alloca [301 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #5 call void @llvm.lifetime.start.p0(i64 301, ptr nonnull %buf) #5 %call12 = 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 %tobool13 = icmp ne i32 %0, 0 %1 = load i32, ptr %W, align 4 %tobool114 = icmp ne i32 %1, 0 %2 = select i1 %tobool13, i1 true, i1 %tobool114 br i1 %2, label %for.body, label %for.end9 for.body: ; preds = %entry, %for.inc7 %3 = phi i32 [ %6, %for.inc7 ], [ %0, %entry ] %4 = phi i32 [ %7, %for.inc7 ], [ %1, %entry ] %conv = sext i32 %4 to i64 call void @llvm.memset.p0.i64(ptr nonnull align 16 %buf, i8 35, i64 %conv, i1 false) %arrayidx = getelementptr inbounds [301 x i8], ptr %buf, i64 0, i64 %conv store i8 0, ptr %arrayidx, align 1, !tbaa !9 %dec10 = add nsw i32 %3, -1 store i32 %dec10, ptr %H, align 4, !tbaa !5 %tobool3.not11 = icmp eq i32 %3, 0 br i1 %tobool3.not11, label %for.inc7, label %for.inc for.inc: ; preds = %for.body, %for.inc %puts = call i32 @puts(ptr nonnull dereferenceable(1) %buf) %5 = load i32, ptr %H, align 4, !tbaa !5 %dec = add nsw i32 %5, -1 store i32 %dec, ptr %H, align 4, !tbaa !5 %tobool3.not = icmp eq i32 %5, 0 br i1 %tobool3.not, label %for.inc7, label %for.inc, !llvm.loop !10 for.inc7: ; preds = %for.inc, %for.body %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 %tobool = icmp ne i32 %6, 0 %7 = load i32, ptr %W, align 4 %tobool1 = icmp ne i32 %7, 0 %8 = select i1 %tobool, i1 true, i1 %tobool1 br i1 %8, label %for.body, label %for.end9, !llvm.loop !12 for.end9: ; preds = %for.inc7, %entry call void @llvm.lifetime.end.p0(i64 301, ptr nonnull %buf) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: 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 nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(void) { int H, W, i, j; while (1) { scanf("%d %d", &H, &W); if (H == 0 && W == 0) break; for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133686/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int i,j,h, w; while(1){ scanf("%d %d", &h, &w); if(w == 0 && h == 0) break; for(i = 0; i < h; i++){ for(j = 0; j < w; j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133729/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133729/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %w, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %h, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %7, %for.end10 ], [ %1, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %w, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %h, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main() { int t, r, g, b, w, count; scanf("%d", &t); for (int i = 0; i < t; i++) { count = 0; scanf("%d %d %d %d", &r, &g, &b, &w); if (r % 2 == 0) count++; if (g % 2 == 0) count++; if (b % 2 == 0) count++; if (w % 2 == 0) count++; if (count == 4 || count == 3 || count == 0) printf("Yes\n"); else if (r != 0 && g != 0 && b != 0 && count == 1) printf("Yes\n"); else printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13378/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13378/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [12 x i8] c"%d %d %d %d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %r = alloca i32, align 4 %g = alloca i32, align 4 %b = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #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 %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp51 = icmp sgt i32 %0, 0 br i1 %cmp51, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.inc, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 for.body: ; preds = %entry, %for.inc %i.052 = phi i32 [ %inc36, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %r, ptr noundef nonnull %g, ptr noundef nonnull %b, ptr noundef nonnull %w) %1 = load i32, ptr %r, align 4, !tbaa !5 %2 = and i32 %1, 1 %spec.select = xor i32 %2, 1 %3 = load i32, ptr %g, align 4 %4 = and i32 %3, 1 %cmp4 = icmp eq i32 %4, 0 %inc6 = sub nuw nsw i32 2, %2 %count.1 = select i1 %cmp4, i32 %inc6, i32 %spec.select %5 = load i32, ptr %b, align 4 %6 = and i32 %5, 1 %7 = xor i32 %6, 1 %count.2 = add nuw nsw i32 %count.1, %7 %8 = load i32, ptr %w, align 4, !tbaa !5 %9 = and i32 %8, 1 %10 = xor i32 %9, 1 %count.3 = add nuw nsw i32 %count.2, %10 switch i32 %count.3, label %if.else [ i32 4, label %for.inc i32 3, label %for.inc i32 0, label %for.inc ] if.else: ; preds = %for.body %cmp24 = icmp ne i32 %1, 0 %cmp25 = icmp ne i32 %3, 0 %or.cond38 = and i1 %cmp24, %cmp25 %cmp27 = icmp ne i32 %5, 0 %or.cond39 = and i1 %or.cond38, %cmp27 %cmp29 = icmp eq i32 %count.3, 1 %or.cond40 = and i1 %or.cond39, %cmp29 %str.4.str = select i1 %or.cond40, ptr @str.5, ptr @str br label %for.inc for.inc: ; preds = %if.else, %for.body, %for.body, %for.body %str.5.sink = phi ptr [ @str.5, %for.body ], [ @str.5, %for.body ], [ @str.5, %for.body ], [ %str.4.str, %if.else ] %puts50 = call i32 @puts(ptr nonnull dereferenceable(1) %str.5.sink) %inc36 = add nuw nsw i32 %i.052, 1 %11 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc36, %11 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main() { for (;;) { int w, h; scanf("%d %d", &h, &w); if (w == 0 && h == 0) break; int x, y; for (y = 0; y < h; y++) { for (x = 0; x < w; x++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133837/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133837/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %w = alloca i32, align 4 %h = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 %call25 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %w, align 4, !tbaa !5 %cmp26 = icmp eq i32 %0, 0 %1 = load i32, ptr %h, align 4 %cmp127 = icmp eq i32 %1, 0 %or.cond28 = select i1 %cmp26, i1 %cmp127, i1 false br i1 %or.cond28, label %for.end14, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %cleanup %2 = phi i32 [ %7, %cleanup ], [ %1, %entry ] %cmp323 = icmp sgt i32 %2, 0 br i1 %cmp323, label %for.cond4.preheader, label %cleanup for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end %y.024 = phi i32 [ %inc10, %for.end ], [ 0, %for.cond2.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp521 = icmp sgt i32 %3, 0 br i1 %cmp521, label %for.body6, label %for.end for.body6: ; preds = %for.cond4.preheader, %for.body6 %x.022 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond4.preheader ] %putchar18 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %x.022, 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 %putchar17 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %y.024, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc10, %5 br i1 %cmp3, label %for.cond4.preheader, label %cleanup, !llvm.loop !11 cleanup: ; preds = %for.end, %for.cond2.preheader %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %w, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %h, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end14, label %for.cond2.preheader for.end14: ; preds = %cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int i, j, H, W; while (1) { scanf("%d %d", &H, &W); if (H == 0 && W == 0) { break; } for (i = 0;i < H;i++) { for (j = 0;j < W;j++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133880/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133880/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int i,j,k,H,W; while (1){ scanf("%d %d",&H,&W); if (H != 0 && W != 0){ for (j = 0; j < H; j++){ for (i = 0; i < W; i++){ printf("#"); } printf("\n"); } printf("\n"); } else { break; } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133923/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133923/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp ne i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp ne i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %j.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %i.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %i.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %j.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp ne i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp ne i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.cond.preheader, label %while.end while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void){ int h, w; int i, j; while(1){ scanf("%d %d ", &h, &w); /* H??¨W?????\??? */ if(h==0&&w==0)break; /* H??¨W????????????0??????????????¢?????????????????? */ for(i=0;i<h;i++){ /* ???H????????? */ for(j=0;j<w;j++){ /* ?¨?W????????? */ printf("#"); /* H??W?????§????????§#????????? */ } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_133967/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_133967/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d %d \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %6 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void) { int H = 1, W = 1, i, j; while (1) { scanf("%d %d", &H, &W); if ((H == 0) && (W == 0)) break; for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134009/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134009/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 store i32 1, ptr %H, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 store i32 1, ptr %W, align 4, !tbaa !5 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void) { int H, W, i, j; H = 1; W = 1; while ((H!=0)||(W!=0)) { scanf("%d %d",&H, &W); if ((H==0)&&(W==0)) { break; } for (i = 0;i < H;i++) { for (j = 0;j < W;j++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134052/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { while.body.preheader: %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 store i32 1, ptr %H, align 4, !tbaa !5 store i32 1, ptr %W, align 4, !tbaa !5 br label %while.body while.body: ; preds = %while.body.preheader, %for.end12 %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 %cmp2 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp3 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp2, i1 %cmp3, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %while.body %cmp420 = icmp sgt i32 %0, 0 br i1 %cmp420, label %for.cond5.preheader, label %for.end12 for.cond5.preheader: ; preds = %for.cond.preheader, %for.end %i.021 = phi i32 [ %inc11, %for.end ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %W, align 4, !tbaa !5 %cmp618 = icmp sgt i32 %2, 0 br i1 %cmp618, label %for.body7, label %for.end for.body7: ; preds = %for.cond5.preheader, %for.body7 %j.019 = phi i32 [ %inc, %for.body7 ], [ 0, %for.cond5.preheader ] %putchar17 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.019, 1 %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc, %3 br i1 %cmp6, label %for.body7, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body7, %for.cond5.preheader %putchar16 = call i32 @putchar(i32 10) %inc11 = add nuw nsw i32 %i.021, 1 %4 = load i32, ptr %H, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc11, %4 br i1 %cmp4, label %for.cond5.preheader, label %for.end12, !llvm.loop !11 for.end12: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp ne i32 %5, 0 %6 = load i32, ptr %W, align 4 %cmp1 = icmp ne i32 %6, 0 %7 = select i1 %cmp, i1 true, i1 %cmp1 br i1 %7, label %while.body, label %while.end, !llvm.loop !12 while.end: ; preds = %for.end12, %while.body 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; while(1) { scanf("%d %d",&H,&W); if(H==0&&W==0) break; for(int i=0;i<H;i++) { for(int k=0;k<W;k++) putchar('#'); printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #3 %call22 = 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 %cmp23 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp124 = icmp eq i32 %1, 0 %or.cond25 = select i1 %cmp23, i1 %cmp124, i1 false br i1 %or.cond25, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.cond.cleanup %2 = phi i32 [ %5, %for.cond.cleanup ], [ %0, %entry ] %cmp220 = icmp sgt i32 %2, 0 br i1 %cmp220, label %for.cond3.preheader, label %for.cond.cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup5 %i.021 = phi i32 [ %inc10, %for.cond.cleanup5 ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp418 = icmp sgt i32 %3, 0 br i1 %cmp418, label %for.body6, label %for.cond.cleanup5 for.cond.cleanup: ; preds = %for.cond.cleanup5, %for.cond.preheader %4 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i = call noundef i32 @putc(i32 noundef 10, ptr noundef %4) %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.cond3.preheader %7 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i16 = call noundef i32 @putc(i32 noundef 10, ptr noundef %7) %inc10 = add nuw nsw i32 %i.021, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc10, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.cond.cleanup, !llvm.loop !11 for.body6: ; preds = %for.cond3.preheader, %for.body6 %k.019 = phi i32 [ %inc, %for.body6 ], [ 0, %for.cond3.preheader ] %9 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i17 = call noundef i32 @putc(i32 noundef 35, ptr noundef %9) %inc = add nuw nsw i32 %k.019, 1 %10 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %10 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !13 while.end: ; preds = %for.cond.cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include <stdio.h> int main(void) { int a[10000],i=0,k=0,j,l; while(k==0){ scanf("%d %d",&a[i],&a[i+1]); if(a[i]==0 && a[i+1]==0){ k=1; }else{ i=i+2; } } l=i/2; int x,y; for(j=1;j<=l;j++){ for(x=1;x<=a[2*j-2];x++){ for(y=1;y<=a[2*j-1];y++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %a) #4 br label %while.body while.body: ; preds = %if.end, %entry %i.045 = phi i32 [ 0, %entry ], [ %add10, %if.end ] %idxprom = zext i32 %i.045 to i64 %arrayidx = getelementptr inbounds [10000 x i32], ptr %a, i64 0, i64 %idxprom %add = or i32 %i.045, 1 %idxprom1 = zext i32 %add to i64 %arrayidx2 = getelementptr inbounds [10000 x i32], ptr %a, i64 0, i64 %idxprom1 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %0 = load i32, ptr %arrayidx, align 8, !tbaa !5 %cmp5 = icmp eq i32 %0, 0 br i1 %cmp5, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %while.body %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp9 = icmp eq i32 %1, 0 br i1 %cmp9, label %while.end, label %if.end if.end: ; preds = %while.body, %land.lhs.true %add10 = add nuw nsw i32 %i.045, 2 br label %while.body, !llvm.loop !9 while.end: ; preds = %land.lhs.true %cmp11.not50 = icmp eq i32 %i.045, 0 br i1 %cmp11.not50, label %for.end32, label %for.cond12.preheader.preheader for.cond12.preheader.preheader: ; preds = %while.end %div5960 = lshr exact i32 %i.045, 1 %2 = add nuw nsw i32 %div5960, 1 %wide.trip.count = zext i32 %2 to i64 br label %for.cond12.preheader for.cond12.preheader: ; preds = %for.cond12.preheader.preheader, %for.end28 %indvars.iv = phi i64 [ 1, %for.cond12.preheader.preheader ], [ %indvars.iv.next, %for.end28 ] %3 = shl nuw nsw i64 %indvars.iv, 1 %4 = add nsw i64 %3, -2 %arrayidx14 = getelementptr inbounds [10000 x i32], ptr %a, i64 0, i64 %4 %5 = load i32, ptr %arrayidx14, align 8, !tbaa !5 %cmp15.not48 = icmp slt i32 %5, 1 br i1 %cmp15.not48, label %for.end28, label %for.cond17.preheader.lr.ph for.cond17.preheader.lr.ph: ; preds = %for.cond12.preheader %6 = add nsw i64 %3, -1 %arrayidx21 = getelementptr inbounds [10000 x i32], ptr %a, i64 0, i64 %6 br label %for.cond17.preheader for.cond17.preheader: ; preds = %for.cond17.preheader.lr.ph, %for.end %x.049 = phi i32 [ 1, %for.cond17.preheader.lr.ph ], [ %inc27, %for.end ] %7 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %cmp22.not46 = icmp slt i32 %7, 1 br i1 %cmp22.not46, label %for.end, label %for.body23 for.body23: ; preds = %for.cond17.preheader, %for.body23 %y.047 = phi i32 [ %inc, %for.body23 ], [ 1, %for.cond17.preheader ] %putchar44 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %y.047, 1 %8 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %cmp22.not.not = icmp slt i32 %y.047, %8 br i1 %cmp22.not.not, label %for.body23, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body23, %for.cond17.preheader %putchar43 = call i32 @putchar(i32 10) %inc27 = add nuw nsw i32 %x.049, 1 %9 = load i32, ptr %arrayidx14, align 8, !tbaa !5 %cmp15.not.not = icmp slt i32 %x.049, %9 br i1 %cmp15.not.not, label %for.cond17.preheader, label %for.end28, !llvm.loop !12 for.end28: ; preds = %for.end, %for.cond12.preheader %putchar = call i32 @putchar(i32 10) %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.end32, label %for.cond12.preheader, !llvm.loop !13 for.end32: ; preds = %for.end28, %while.end call void @llvm.lifetime.end.p0(i64 40000, 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} !13 = distinct !{!13, !10}
#include<stdio.h> int main() { int i,j,a,b; while(1){ scanf("%d%d",&a,&b); if(a==0&&b==0) break; for(i=0;i<a;i++) { for(j=0;j<b;j++){ printf("#");} printf("\n");} printf("\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %call20 = 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 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %b, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %b, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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}
#include<stdio.h> int main(void) { int h,w,H, W; while (1) { scanf("%d %d", &H, &W); for (h = 1; h <= H; h++) { for (w = 1; w <= W; w++) { printf("#"); } printf("\n"); } if (H == 0 && W == 0) break; printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.end, %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.not18 = icmp slt i32 %0, 1 br i1 %cmp.not18, label %for.end8, label %for.cond1.preheader for.cond1.preheader: ; preds = %while.cond, %for.end %h.019 = phi i32 [ %inc7, %for.end ], [ 1, %while.cond ] %1 = load i32, ptr %W, align 4, !tbaa !5 %cmp2.not16 = icmp slt i32 %1, 1 br i1 %cmp2.not16, label %for.end, label %for.body3 for.body3: ; preds = %for.cond1.preheader, %for.body3 %w.017 = phi i32 [ %inc, %for.body3 ], [ 1, %for.cond1.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %w.017, 1 %2 = load i32, ptr %W, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %w.017, %2 br i1 %cmp2.not.not, label %for.body3, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body3, %for.cond1.preheader %putchar14 = call i32 @putchar(i32 10) %inc7 = add nuw nsw i32 %h.019, 1 %3 = load i32, ptr %H, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %h.019, %3 br i1 %cmp.not.not, label %for.cond1.preheader, label %for.end8, !llvm.loop !11 for.end8: ; preds = %for.end, %while.cond %.lcssa = phi i32 [ %0, %while.cond ], [ %3, %for.end ] %cmp9 = icmp eq i32 %.lcssa, 0 %4 = load i32, ptr %W, align 4 %cmp10 = icmp eq i32 %4, 0 %or.cond = select i1 %cmp9, i1 %cmp10, i1 false br i1 %or.cond, label %while.end, label %if.end if.end: ; preds = %for.end8 %putchar = call i32 @putchar(i32 10) br label %while.cond while.end: ; preds = %for.end8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void){ int h,w,i,j; while(scanf("%d %d",&h,&w),h+w){ for(i=0;i<h;i++){ for(j=0;j<w;j++) printf("#"); printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134340/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134340/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call18 = 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 %add19 = sub i32 0, %1 %tobool.not20 = icmp eq i32 %0, %add19 br i1 %tobool.not20, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end8 %2 = phi i32 [ %6, %for.end8 ], [ %0, %entry ] %cmp16 = icmp sgt i32 %2, 0 br i1 %cmp16, label %for.cond1.preheader, label %for.end8 for.cond1.preheader: ; preds = %for.cond.preheader, %for.end %i.017 = phi i32 [ %inc7, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp214 = icmp sgt i32 %3, 0 br i1 %cmp214, label %for.body3, label %for.end for.body3: ; preds = %for.cond1.preheader, %for.body3 %j.015 = phi i32 [ %inc, %for.body3 ], [ 0, %for.cond1.preheader ] %putchar13 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.015, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %4 br i1 %cmp2, label %for.body3, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body3, %for.cond1.preheader %putchar12 = call i32 @putchar(i32 10) %inc7 = add nuw nsw i32 %i.017, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp slt i32 %inc7, %5 br i1 %cmp, label %for.cond1.preheader, label %for.end8, !llvm.loop !11 for.end8: ; 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 %7 = load i32, ptr %w, align 4, !tbaa !5 %add = sub i32 0, %7 %tobool.not = icmp eq i32 %6, %add br i1 %tobool.not, label %while.end, label %for.cond.preheader, !llvm.loop !12 while.end: ; preds = %for.end8, %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); if(H == 0 && W == 0){ break; } for(h=0; h<H; h++){ for(w=0; w<W; w++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134384/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134384/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %w.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %h.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(void) { int h,w,i,j; do{ scanf("%d %d",&h,&w); for(i=0;i<h;i++) { for(j=0;j<w;j++) { if(h!=0 && w!=0)printf("#"); } if(h!=0 && w!=0)printf("\n"); } if(h!=0 && w!=0)printf("\n"); }while(h!=0 && w!=0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134434/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134434/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %do.body do.body: ; preds = %do.cond, %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 %cmp34 = icmp sgt i32 %0, 0 br i1 %cmp34, label %for.cond1.preheader, label %for.end15 for.cond1.preheader: ; preds = %do.body, %for.inc13 %1 = phi i32 [ %7, %for.inc13 ], [ %0, %do.body ] %i.035 = phi i32 [ %inc14, %for.inc13 ], [ 0, %do.body ] %2 = load i32, ptr %w, align 4 %cmp232 = icmp sgt i32 %2, 0 br i1 %cmp232, label %for.body3, label %for.end for.body3: ; preds = %for.cond1.preheader, %for.inc %3 = phi i32 [ %5, %for.inc ], [ %2, %for.cond1.preheader ] %j.033 = phi i32 [ %inc, %for.inc ], [ 0, %for.cond1.preheader ] %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp4 = icmp ne i32 %4, 0 %cmp5 = icmp ne i32 %3, 0 %or.cond = and i1 %cmp5, %cmp4 br i1 %or.cond, label %if.then, label %for.inc if.then: ; preds = %for.body3 %putchar30 = call i32 @putchar(i32 35) %.pre = load i32, ptr %w, align 4 br label %for.inc for.inc: ; preds = %for.body3, %if.then %5 = phi i32 [ %3, %for.body3 ], [ %.pre, %if.then ] %inc = add nuw nsw i32 %j.033, 1 %cmp2 = icmp slt i32 %inc, %5 br i1 %cmp2, label %for.body3, label %for.end.loopexit, !llvm.loop !9 for.end.loopexit: ; preds = %for.inc %.pre39 = load i32, ptr %h, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit, %for.cond1.preheader %6 = phi i32 [ %1, %for.cond1.preheader ], [ %.pre39, %for.end.loopexit ] %.lcssa = phi i32 [ %2, %for.cond1.preheader ], [ %5, %for.end.loopexit ] %cmp7 = icmp ne i32 %6, 0 %cmp9 = icmp ne i32 %.lcssa, 0 %or.cond24 = and i1 %cmp9, %cmp7 br i1 %or.cond24, label %if.then10, label %for.inc13 if.then10: ; preds = %for.end %putchar29 = call i32 @putchar(i32 10) %.pre40 = load i32, ptr %h, align 4, !tbaa !5 br label %for.inc13 for.inc13: ; preds = %for.end, %if.then10 %7 = phi i32 [ %6, %for.end ], [ %.pre40, %if.then10 ] %inc14 = add nuw nsw i32 %i.035, 1 %cmp = icmp slt i32 %inc14, %7 br i1 %cmp, label %for.cond1.preheader, label %for.end15, !llvm.loop !11 for.end15: ; preds = %for.inc13, %do.body %.lcssa31 = phi i32 [ %0, %do.body ], [ %7, %for.inc13 ] %cmp16 = icmp ne i32 %.lcssa31, 0 %8 = load i32, ptr %w, align 4 %cmp18 = icmp ne i32 %8, 0 %or.cond25 = select i1 %cmp16, i1 %cmp18, i1 false br i1 %or.cond25, label %if.then19, label %do.cond if.then19: ; preds = %for.end15 %putchar = call i32 @putchar(i32 10) %.pre41 = load i32, ptr %h, align 4, !tbaa !5 %.pre42 = load i32, ptr %w, align 4 br label %do.cond do.cond: ; preds = %for.end15, %if.then19 %9 = phi i32 [ %8, %for.end15 ], [ %.pre42, %if.then19 ] %10 = phi i32 [ %.lcssa31, %for.end15 ], [ %.pre41, %if.then19 ] %cmp22 = icmp ne i32 %10, 0 %cmp23 = icmp ne i32 %9, 0 %11 = select i1 %cmp22, i1 %cmp23, i1 false br i1 %11, label %do.body, label %do.end, !llvm.loop !12 do.end: ; preds = %do.cond 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 tate,yoko; int x,y; while(1){ scanf("%d %d",&x,&y); if(x == 0 && y == 0) break; else for(tate = 0; tate < x; tate++){ for(yoko = 0; yoko < y; yoko++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134478/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134478/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #4 %call20 = 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 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %y, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %if.end %2 = phi i32 [ %6, %if.end ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %if.end for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %tate.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %y, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %yoko.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %yoko.017, 1 %4 = load i32, ptr %y, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %tate.019, 1 %5 = load i32, ptr %x, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %if.end, !llvm.loop !11 if.end: ; 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 %x, ptr noundef nonnull %y) %6 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %y, 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 = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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,i,j; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0) break; for(i=0;i<H;i++){ for(j=0;j<W;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134520/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int H, W, i, j; while (1) { scanf("%d %d", &H, &W); if (H == 0 && W == 0) { return 0; } for (i = 0; i < H; i++) { for (j = 0; j < W; j++) { printf ("#"); } printf ("\n"); } printf ("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134579/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134579/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %if.then, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 if.then: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %for.cond.preheader } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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=0; int W=0; do{ scanf("%d %d",&H,&W); if(H*W==0)break; for(int i=0;i<H;i++){ for(int j=0;j<W;j++){ printf("#"); } puts(""); } puts(""); }while(H*W!=0); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134621/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134621/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 store i32 0, ptr %H, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 store i32 0, ptr %W, align 4, !tbaa !5 br label %do.body do.body: ; preds = %for.cond.cleanup, %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 %1 = load i32, ptr %W, align 4, !tbaa !5 %mul = mul nsw i32 %1, %0 %cmp = icmp eq i32 %mul, 0 br i1 %cmp, label %do.end, label %for.cond.preheader for.cond.preheader: ; preds = %do.body %cmp120 = icmp sgt i32 %0, 0 br i1 %cmp120, label %for.cond2.preheader, label %for.cond.cleanup for.cond2.preheader: ; preds = %for.cond.preheader, %for.cond.cleanup4 %i.021 = phi i32 [ %inc9, %for.cond.cleanup4 ], [ 0, %for.cond.preheader ] %2 = load i32, ptr %W, align 4, !tbaa !5 %cmp318 = icmp sgt i32 %2, 0 br i1 %cmp318, label %for.body5, label %for.cond.cleanup4 for.cond.cleanup: ; preds = %for.cond.cleanup4, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %3 = load i32, ptr %H, align 4, !tbaa !5 %4 = load i32, ptr %W, align 4, !tbaa !5 %mul12 = mul nsw i32 %4, %3 %cmp13.not = icmp eq i32 %mul12, 0 br i1 %cmp13.not, label %do.end, label %do.body, !llvm.loop !9 for.cond.cleanup4: ; preds = %for.body5, %for.cond2.preheader %putchar16 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.021, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp1 = icmp slt i32 %inc9, %5 br i1 %cmp1, label %for.cond2.preheader, label %for.cond.cleanup, !llvm.loop !11 for.body5: ; preds = %for.cond2.preheader, %for.body5 %j.019 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond2.preheader ] %putchar17 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.019, 1 %6 = load i32, ptr %W, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %6 br i1 %cmp3, label %for.body5, label %for.cond.cleanup4, !llvm.loop !12 do.end: ; preds = %do.body, %for.cond.cleanup 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 = 0; int w = 0; while (1) { scanf("%d %d", &h, &w); if (h == 0 && w == 0) break ; int i; int j; j = 0; while (j < h) { i = 0; while (i < w) { printf("%c", '#'); i++; } printf("%c", '\n'); j++; } printf("%c", '\n'); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134665/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134665/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 store i32 0, ptr %h, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 store i32 0, ptr %w, align 4, !tbaa !5 %call22 = 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 %cmp23 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp124 = icmp eq i32 %1, 0 %or.cond25 = select i1 %cmp23, i1 %cmp124, i1 false br i1 %or.cond25, label %while.end13, label %while.cond2.preheader while.cond2.preheader: ; preds = %entry, %while.end11 %2 = phi i32 [ %6, %while.end11 ], [ %0, %entry ] %cmp320 = icmp sgt i32 %2, 0 br i1 %cmp320, label %while.cond5.preheader, label %while.end11 while.cond5.preheader: ; preds = %while.cond2.preheader, %while.end %j.021 = phi i32 [ %inc10, %while.end ], [ 0, %while.cond2.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp618 = icmp sgt i32 %3, 0 br i1 %cmp618, label %while.body7, label %while.end while.body7: ; preds = %while.cond5.preheader, %while.body7 %i.019 = phi i32 [ %inc, %while.body7 ], [ 0, %while.cond5.preheader ] %putchar17 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %i.019, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc, %4 br i1 %cmp6, label %while.body7, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body7, %while.cond5.preheader %putchar16 = call i32 @putchar(i32 10) %inc10 = add nuw nsw i32 %j.021, 1 %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc10, %5 br i1 %cmp3, label %while.cond5.preheader, label %while.end11, !llvm.loop !11 while.end11: ; preds = %while.end, %while.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 %while.end13, label %while.cond2.preheader while.end13: ; preds = %while.end11, %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 a,b; int c = 0; int i,q; while(c == 0){ scanf("%d", &a); scanf("%d", &b); if(a==0){ if(b==0){ break;}} for(i=1;i<=a;i++){ for(q=1;q<=b;q++){ printf("#"); } printf("\n"); } printf("\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134715/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134715/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call24 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call125 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp226 = icmp eq i32 %0, 0 %1 = load i32, ptr %b, align 4 %cmp327 = icmp eq i32 %1, 0 %or.cond28 = select i1 %cmp226, i1 %cmp327, i1 false br i1 %or.cond28, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end14 %2 = phi i32 [ %6, %for.end14 ], [ %0, %entry ] %cmp6.not22 = icmp slt i32 %2, 1 br i1 %cmp6.not22, label %for.end14, label %for.cond7.preheader for.cond7.preheader: ; preds = %for.cond.preheader, %for.end %i.023 = phi i32 [ %inc13, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp8.not20 = icmp slt i32 %3, 1 br i1 %cmp8.not20, label %for.end, label %for.body9 for.body9: ; preds = %for.cond7.preheader, %for.body9 %q.021 = phi i32 [ %inc, %for.body9 ], [ 1, %for.cond7.preheader ] %putchar19 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %q.021, 1 %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp8.not.not = icmp slt i32 %q.021, %4 br i1 %cmp8.not.not, label %for.body9, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body9, %for.cond7.preheader %putchar18 = call i32 @putchar(i32 10) %inc13 = add nuw nsw i32 %i.023, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp6.not.not = icmp slt i32 %i.023, %5 br i1 %cmp6.not.not, label %for.cond7.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 %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp2 = icmp eq i32 %6, 0 %7 = load i32, ptr %b, align 4 %cmp3 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp2, i1 %cmp3, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader, !llvm.loop !12 while.end: ; preds = %for.end14, %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 height, width; int i, r; while (1) { scanf("%d %d", &height, &width); if (height == 0 && width == 0) break; for (i = 0; i < height; i++) { for (r = 0; r < width; r++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134766/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134766/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 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 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width) %0 = load i32, ptr %height, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %width, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %width, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %r.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %r.017, 1 %4 = load i32, ptr %width, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %height, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %height, ptr noundef nonnull %width) %6 = load i32, ptr %height, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %width, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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}
#include <stdio.h> int main() { int H, W; int h, w; while(1) { scanf("%d%d", &H, &W); if (H == 0 && W == 0) break; for (h = 0; h < H; h++) { for (w = 0; w < W; w++) { printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134809/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134809/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %w.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %h.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int h, w, a, b; while(1){ scanf("%d%d", &a, &b); if( a == 0 && b == 0 ){ break; } for( h = 0; h < a; h++ ){ for( w = 0; w < b; w++ ){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134852/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134852/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %call20 = 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 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %b, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp218 = icmp sgt i32 %2, 0 br i1 %cmp218, label %for.cond3.preheader, label %for.end10 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %h.019 = phi i32 [ %inc9, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp416 = icmp sgt i32 %3, 0 br i1 %cmp416, label %for.body5, label %for.end for.body5: ; preds = %for.cond3.preheader, %for.body5 %w.017 = phi i32 [ %inc, %for.body5 ], [ 0, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %w.017, 1 %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %4 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %h.019, 1 %5 = load i32, ptr %a, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc9, %5 br i1 %cmp2, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %b, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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}
#include <stdio.h> int main(void) { int H,W; int i,j; while(1){ scanf("%d %d",&H,&W); if(H==0 && W==0){ break; } for(i=1;i<=H;i++){ for(j=1;j<=W;j++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134896/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134896/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp21 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp122 = icmp eq i32 %1, 0 %or.cond23 = select i1 %cmp21, i1 %cmp122, i1 false br i1 %or.cond23, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end10 %2 = phi i32 [ %6, %for.end10 ], [ %0, %entry ] %cmp2.not18 = icmp slt i32 %2, 1 br i1 %cmp2.not18, label %for.end10, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.019 = phi i32 [ %inc9, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not16 = icmp slt i32 %3, 1 br i1 %cmp4.not16, label %for.end, label %for.body5 for.body5: ; preds = %for.cond3.preheader, %for.body5 %j.017 = phi i32 [ %inc, %for.body5 ], [ 1, %for.cond3.preheader ] %putchar15 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.017, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.017, %4 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.cond3.preheader %putchar14 = call i32 @putchar(i32 10) %inc9 = add nuw nsw i32 %i.019, 1 %5 = load i32, ptr %H, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %i.019, %5 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end10, !llvm.loop !11 for.end10: ; preds = %for.end, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %7, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end10, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main(){ long n = 0; char str[300000] = {}; long i = 0; long letnum = 0; long height = 0; long highest = 0; long highi = 0; long cnt = 0; scanf("%ld",&n); scanf(" %s",str); for(i=0;i<n;i++){ if(str[i] == 'W'){ height--; }else if(str[i] == 'E'){ height++; } if(height > highest){ highest = height; highi = i; } } for(i=0;i<n;i++){ if(i < highi && str[i] == 'W'){ cnt++; } if(i > highi && str[i] == 'E'){ cnt++; } } printf("%ld",cnt); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134946/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134946/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [4 x i8] c" %s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %str = alloca [300000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #5 store i64 0, ptr %n, align 8, !tbaa !5 call void @llvm.lifetime.start.p0(i64 300000, ptr nonnull %str) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(300000) %str, i8 0, i64 300000, i1 false) %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 %str) %0 = load i64, ptr %n, align 8, !tbaa !5 %cmp61 = icmp sgt i64 %0, 0 br i1 %cmp61, label %for.body.preheader, label %for.end40 for.body.preheader: ; preds = %entry %xtraiter = and i64 %0, 1 %1 = icmp eq i64 %0, 1 br i1 %1, label %for.cond15.preheader.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %0, -2 br label %for.body for.cond15.preheader.unr-lcssa: ; preds = %if.end9.1, %for.body.preheader %spec.select58.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %spec.select58.1, %if.end9.1 ] %highi.065.unr = phi i64 [ 0, %for.body.preheader ], [ %spec.select58.1, %if.end9.1 ] %highest.064.unr = phi i64 [ 0, %for.body.preheader ], [ %spec.select.1, %if.end9.1 ] %height.063.unr = phi i64 [ 0, %for.body.preheader ], [ %height.1.1, %if.end9.1 ] %i.062.unr = phi i64 [ 0, %for.body.preheader ], [ %inc14.1, %if.end9.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond15.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond15.preheader.unr-lcssa %arrayidx.epil = getelementptr inbounds [300000 x i8], ptr %str, i64 0, i64 %i.062.unr %2 = load i8, ptr %arrayidx.epil, align 1, !tbaa !9 switch i8 %2, label %if.end9.epil [ i8 87, label %if.then.epil i8 69, label %if.then8.epil ] if.then8.epil: ; preds = %for.body.epil %inc.epil = add nsw i64 %height.063.unr, 1 br label %if.end9.epil if.then.epil: ; preds = %for.body.epil %dec.epil = add nsw i64 %height.063.unr, -1 br label %if.end9.epil if.end9.epil: ; preds = %if.then.epil, %if.then8.epil, %for.body.epil %height.1.epil = phi i64 [ %dec.epil, %if.then.epil ], [ %inc.epil, %if.then8.epil ], [ %height.063.unr, %for.body.epil ] %cmp10.epil = icmp sgt i64 %height.1.epil, %highest.064.unr %spec.select58.epil = select i1 %cmp10.epil, i64 %i.062.unr, i64 %highi.065.unr br label %for.cond15.preheader for.cond15.preheader: ; preds = %for.cond15.preheader.unr-lcssa, %if.end9.epil %spec.select58.lcssa = phi i64 [ %spec.select58.lcssa.ph, %for.cond15.preheader.unr-lcssa ], [ %spec.select58.epil, %if.end9.epil ] br i1 %cmp61, label %for.body18, label %for.end40 for.body: ; preds = %if.end9.1, %for.body.preheader.new %highi.065 = phi i64 [ 0, %for.body.preheader.new ], [ %spec.select58.1, %if.end9.1 ] %highest.064 = phi i64 [ 0, %for.body.preheader.new ], [ %spec.select.1, %if.end9.1 ] %height.063 = phi i64 [ 0, %for.body.preheader.new ], [ %height.1.1, %if.end9.1 ] %i.062 = phi i64 [ 0, %for.body.preheader.new ], [ %inc14.1, %if.end9.1 ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %if.end9.1 ] %arrayidx = getelementptr inbounds [300000 x i8], ptr %str, i64 0, i64 %i.062 %3 = load i8, ptr %arrayidx, align 2, !tbaa !9 switch i8 %3, label %if.end9 [ i8 87, label %if.then i8 69, label %if.then8 ] if.then: ; preds = %for.body %dec = add nsw i64 %height.063, -1 br label %if.end9 if.then8: ; preds = %for.body %inc = add nsw i64 %height.063, 1 br label %if.end9 if.end9: ; preds = %for.body, %if.then8, %if.then %height.1 = phi i64 [ %dec, %if.then ], [ %inc, %if.then8 ], [ %height.063, %for.body ] %cmp10 = icmp sgt i64 %height.1, %highest.064 %spec.select = call i64 @llvm.smax.i64(i64 %height.1, i64 %highest.064) %spec.select58 = select i1 %cmp10, i64 %i.062, i64 %highi.065 %inc14 = or i64 %i.062, 1 %arrayidx.1 = getelementptr inbounds [300000 x i8], ptr %str, i64 0, i64 %inc14 %4 = load i8, ptr %arrayidx.1, align 1, !tbaa !9 switch i8 %4, label %if.end9.1 [ i8 87, label %if.then.1 i8 69, label %if.then8.1 ] if.then8.1: ; preds = %if.end9 %inc.1 = add nsw i64 %height.1, 1 br label %if.end9.1 if.then.1: ; preds = %if.end9 %dec.1 = add nsw i64 %height.1, -1 br label %if.end9.1 if.end9.1: ; preds = %if.then.1, %if.then8.1, %if.end9 %height.1.1 = phi i64 [ %dec.1, %if.then.1 ], [ %inc.1, %if.then8.1 ], [ %height.1, %if.end9 ] %cmp10.1 = icmp sgt i64 %height.1.1, %spec.select %spec.select.1 = call i64 @llvm.smax.i64(i64 %height.1.1, i64 %spec.select) %spec.select58.1 = select i1 %cmp10.1, i64 %inc14, i64 %spec.select58 %inc14.1 = add nuw nsw i64 %i.062, 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.cond15.preheader.unr-lcssa, label %for.body, !llvm.loop !10 for.body18: ; preds = %for.cond15.preheader, %for.inc38 %cnt.069 = phi i64 [ %cnt.2, %for.inc38 ], [ 0, %for.cond15.preheader ] %i.168 = phi i64 [ %inc39, %for.inc38 ], [ 0, %for.cond15.preheader ] %cmp19 = icmp slt i64 %i.168, %spec.select58.lcssa br i1 %cmp19, label %land.lhs.true, label %if.end27 land.lhs.true: ; preds = %for.body18 %arrayidx21 = getelementptr inbounds [300000 x i8], ptr %str, i64 0, i64 %i.168 %5 = load i8, ptr %arrayidx21, align 1, !tbaa !9 %cmp23 = icmp eq i8 %5, 87 %inc26 = zext i1 %cmp23 to i64 %spec.select59 = add nsw i64 %cnt.069, %inc26 br label %if.end27 if.end27: ; preds = %land.lhs.true, %for.body18 %cnt.1 = phi i64 [ %cnt.069, %for.body18 ], [ %spec.select59, %land.lhs.true ] %cmp28 = icmp sgt i64 %i.168, %spec.select58.lcssa br i1 %cmp28, label %land.lhs.true30, label %for.inc38 land.lhs.true30: ; preds = %if.end27 %arrayidx31 = getelementptr inbounds [300000 x i8], ptr %str, i64 0, i64 %i.168 %6 = load i8, ptr %arrayidx31, align 1, !tbaa !9 %cmp33 = icmp eq i8 %6, 69 %inc36 = zext i1 %cmp33 to i64 %spec.select60 = add nsw i64 %cnt.1, %inc36 br label %for.inc38 for.inc38: ; preds = %land.lhs.true30, %if.end27 %cnt.2 = phi i64 [ %cnt.1, %if.end27 ], [ %spec.select60, %land.lhs.true30 ] %inc39 = add nuw nsw i64 %i.168, 1 %exitcond71.not = icmp eq i64 %inc39, %0 br i1 %exitcond71.not, label %for.end40, label %for.body18, !llvm.loop !12 for.end40: ; preds = %for.inc38, %entry, %for.cond15.preheader %cnt.0.lcssa = phi i64 [ 0, %for.cond15.preheader ], [ 0, %entry ], [ %cnt.2, %for.inc38 ] %call41 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %cnt.0.lcssa) call void @llvm.lifetime.end.p0(i64 300000, ptr nonnull %str) #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) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, 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 = { 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) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> #include <stdlib.h> int asc(const void *a,const void *b){ return *(int*)a-*(int*)b; } int main(void){ int n,m,i,x[100000],y[100000],ans=0; scanf("%d%d",&n,&m); for(i=0;i<m;i++) scanf("%d",&x[i]); qsort(x,m,sizeof(x[i]),asc); for(i=1;i<m;i++){ y[i-1] = x[i]-x[i-1]; } qsort(y,m-1,sizeof(y[i]),asc); for(i=0;i<m-n;i++) ans+=y[i]; printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_134997/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_134997/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %x = alloca [100000 x i32], align 16 %y = alloca [100000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %x) #6 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %y) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp44 = icmp sgt i32 %0, 0 br i1 %cmp44, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre63 = sext i32 %0 to i64 br label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %m, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry.for.end_crit_edge %conv.pre-phi = phi i64 [ %.pre63, %entry.for.end_crit_edge ], [ %2, %for.body ] call void @qsort(ptr noundef nonnull %x, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @asc) #6 %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp346 = icmp sgt i32 %3, 1 br i1 %cmp346, label %for.body5.preheader, label %for.end16 for.body5.preheader: ; preds = %for.end %wide.trip.count = zext i32 %3 to i64 %.pre = load i32, ptr %x, align 16, !tbaa !5 %4 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %3, 9 br i1 %min.iters.check, label %for.body5.preheader81, label %vector.ph vector.ph: ; preds = %for.body5.preheader %n.vec = and i64 %4, -8 %ind.end = or i64 %n.vec, 1 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load64, %vector.body ] %offset.idx = or i64 %index, 1 %5 = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %5, align 4, !tbaa !5 %6 = getelementptr inbounds i32, ptr %5, i64 4 %wide.load64 = load <4 x i32>, ptr %6, align 4, !tbaa !5 %7 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %8 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load64, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %9 = sub nsw <4 x i32> %wide.load, %7 %10 = sub nsw <4 x i32> %wide.load64, %8 %11 = getelementptr inbounds [100000 x i32], ptr %y, i64 0, i64 %index store <4 x i32> %9, ptr %11, align 16, !tbaa !5 %12 = getelementptr inbounds i32, ptr %11, i64 4 store <4 x i32> %10, ptr %12, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %13 = icmp eq i64 %index.next, %n.vec br i1 %13, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %4, %n.vec %vector.recur.extract = extractelement <4 x i32> %wide.load64, i64 3 br i1 %cmp.n, label %for.end16, label %for.body5.preheader81 for.body5.preheader81: ; preds = %for.body5.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body5.preheader ] %indvars.iv54.ph = phi i64 [ %ind.end, %middle.block ], [ 1, %for.body5.preheader ] br label %for.body5 for.body5: ; preds = %for.body5.preheader81, %for.body5 %scalar.recur = phi i32 [ %14, %for.body5 ], [ %scalar.recur.ph, %for.body5.preheader81 ] %indvars.iv54 = phi i64 [ %indvars.iv.next55, %for.body5 ], [ %indvars.iv54.ph, %for.body5.preheader81 ] %arrayidx7 = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %indvars.iv54 %14 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %15 = add nsw i64 %indvars.iv54, -1 %sub10 = sub nsw i32 %14, %scalar.recur %arrayidx13 = getelementptr inbounds [100000 x i32], ptr %y, i64 0, i64 %15 store i32 %sub10, ptr %arrayidx13, 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.end16, label %for.body5, !llvm.loop !14 for.end16: ; preds = %for.body5, %middle.block, %for.end %sub18 = add nsw i32 %3, -1 %conv19 = sext i32 %sub18 to i64 call void @qsort(ptr noundef nonnull %y, i64 noundef %conv19, i64 noundef 4, ptr noundef nonnull @asc) #6 %16 = load i32, ptr %m, align 4, !tbaa !5 %17 = load i32, ptr %n, align 4, !tbaa !5 %sub21 = sub nsw i32 %16, %17 %cmp2249 = icmp sgt i32 %sub21, 0 br i1 %cmp2249, label %for.body24.preheader, label %for.end29 for.body24.preheader: ; preds = %for.end16 %wide.trip.count61 = zext i32 %sub21 to i64 %min.iters.check67 = icmp ult i32 %sub21, 8 br i1 %min.iters.check67, label %for.body24.preheader79, label %vector.ph68 vector.ph68: ; preds = %for.body24.preheader %n.vec70 = and i64 %wide.trip.count61, 4294967288 br label %vector.body73 vector.body73: ; preds = %vector.body73, %vector.ph68 %index74 = phi i64 [ 0, %vector.ph68 ], [ %index.next78, %vector.body73 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %20, %vector.body73 ] %vec.phi75 = phi <4 x i32> [ zeroinitializer, %vector.ph68 ], [ %21, %vector.body73 ] %18 = getelementptr inbounds [100000 x i32], ptr %y, i64 0, i64 %index74 %wide.load76 = load <4 x i32>, ptr %18, align 16, !tbaa !5 %19 = getelementptr inbounds i32, ptr %18, i64 4 %wide.load77 = load <4 x i32>, ptr %19, align 16, !tbaa !5 %20 = add <4 x i32> %wide.load76, %vec.phi %21 = add <4 x i32> %wide.load77, %vec.phi75 %index.next78 = add nuw i64 %index74, 8 %22 = icmp eq i64 %index.next78, %n.vec70 br i1 %22, label %middle.block65, label %vector.body73, !llvm.loop !15 middle.block65: ; preds = %vector.body73 %bin.rdx = add <4 x i32> %21, %20 %23 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n72 = icmp eq i64 %n.vec70, %wide.trip.count61 br i1 %cmp.n72, label %for.end29, label %for.body24.preheader79 for.body24.preheader79: ; preds = %for.body24.preheader, %middle.block65 %indvars.iv58.ph = phi i64 [ 0, %for.body24.preheader ], [ %n.vec70, %middle.block65 ] %ans.051.ph = phi i32 [ 0, %for.body24.preheader ], [ %23, %middle.block65 ] br label %for.body24 for.body24: ; preds = %for.body24.preheader79, %for.body24 %indvars.iv58 = phi i64 [ %indvars.iv.next59, %for.body24 ], [ %indvars.iv58.ph, %for.body24.preheader79 ] %ans.051 = phi i32 [ %add, %for.body24 ], [ %ans.051.ph, %for.body24.preheader79 ] %arrayidx26 = getelementptr inbounds [100000 x i32], ptr %y, i64 0, i64 %indvars.iv58 %24 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %add = add nsw i32 %24, %ans.051 %indvars.iv.next59 = add nuw nsw i64 %indvars.iv58, 1 %exitcond62.not = icmp eq i64 %indvars.iv.next59, %wide.trip.count61 br i1 %exitcond62.not, label %for.end29, label %for.body24, !llvm.loop !16 for.end29: ; preds = %for.body24, %middle.block65, %for.end16 %ans.0.lcssa = phi i32 [ 0, %for.end16 ], [ %23, %middle.block65 ], [ %add, %for.body24 ] %call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %y) #6 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %x) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10, !12, !13} !16 = distinct !{!16, !10, !13, !12}
#include<stdio.h> #include<stdlib.h> #include<stdint.h> #include<inttypes.h> #include<string.h> typedef int32_t i32; typedef int64_t i64; static i64 read_int(void){int prev='\0';int c=getchar();while(!('0'<=c && c<='9')){prev=c;c=getchar();}i64 res=0;while('0'<=c && c<='9'){res=10*res+c-'0';c=getchar();}return prev=='-'?-res:res;} typedef i32 radix_type; #define RADIX_WIDTH 9 const uint32_t radix_type_max = 18; const uint32_t radix_type_begin = 0; const uint32_t radix_width = RADIX_WIDTH; const uint32_t radix_mask = (1 << RADIX_WIDTH) - 1; #undef RADIX_WIDTH static inline uint32_t radix_get_bit (radix_type v, uint32_t shift) { return v >> shift & radix_mask; } void radix_sort (radix_type *a, uint32_t n) { radix_type * const array = (radix_type *) calloc (4 * n, sizeof (radix_type)); radix_type **bucket = (radix_type **) calloc (1 << radix_width, sizeof (radix_type *)); uint32_t *len = (uint32_t *) calloc (2 << radix_width, sizeof (uint32_t)); uint32_t *max_len = len + (1 << radix_width); for (uint32_t shift = radix_type_begin; shift < radix_type_max; shift += radix_width) { radix_type *p = array; memset (len, 0, sizeof (uint32_t) << (radix_width + 1)); for (uint32_t i = 0; i < n; ++i) { uint32_t bit = radix_get_bit (a[i], shift); if (len[bit] == max_len[bit]) { for (uint32_t j = 0; j < len[bit]; ++j) { p[j] = bucket[bit][j]; } max_len[bit] = 2 * max_len[bit] + 1; bucket[bit] = p; p += max_len[bit]; } bucket[bit][len[bit]++] = a[i]; } for (uint32_t bit = 0, i = 0; bit < (1 << radix_width); ++bit) { for (uint32_t j = 0; j < len[bit]; ++j, ++i) { a[i] = bucket[bit][j]; } } } free (array); free (bucket); free (len); } void run (void) { i32 n = read_int(); i32 m = read_int(); i32 *x = (i32 *) calloc (m, sizeof (i32)); for (i32 i = 0; i < m; ++i) { x[i] = read_int() + 100000; } radix_sort (x, m); for (i32 i = 0; i < m - 1; ++i) { x[i] = x[i + 1] - x[i]; } radix_sort (x, m - 1); i32 ans = 0; for (i32 i = 0; i < m - n; ++i) { ans += x[i]; } printf("%" PRIi32 "\n", ans); } int main (void) { run(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135039/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @radix_type_max = dso_local local_unnamed_addr constant i32 18, align 4 @radix_type_begin = dso_local local_unnamed_addr constant i32 0, align 4 @radix_width = dso_local local_unnamed_addr constant i32 9, align 4 @radix_mask = dso_local local_unnamed_addr constant i32 511, align 4 @.str = private unnamed_addr constant [4 x i8] c"%i\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local void @radix_sort(ptr nocapture noundef %a, i32 noundef %n) local_unnamed_addr #0 { entry: %a169 = ptrtoint ptr %a to i64 %mul = shl i32 %n, 2 %conv = zext i32 %mul to i64 %call = tail call noalias ptr @calloc(i64 noundef %conv, i64 noundef 4) #6 %call1 = tail call noalias dereferenceable_or_null(4096) ptr @calloc(i64 noundef 512, i64 noundef 8) #6 %call2 = tail call noalias dereferenceable_or_null(4096) ptr @calloc(i64 noundef 1024, i64 noundef 4) #6 %add.ptr = getelementptr inbounds i32, ptr %call2, i64 512 %cmp5126.not = icmp eq i32 %n, 0 br i1 %cmp5126.not, label %for.cond59.preheader, label %for.body.us.preheader for.body.us.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body8.us for.cond.cleanup56.us: ; preds = %for.cond.cleanup64.us tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4096) %call2, i8 0, i64 4096, i1 false) br label %for.body8.us.1 for.body8.us.1: ; preds = %if.end.us.1, %for.cond.cleanup56.us %indvars.iv137.1 = phi i64 [ 0, %for.cond.cleanup56.us ], [ %indvars.iv.next138.1, %if.end.us.1 ] %p.0127.us.1 = phi ptr [ %call, %for.cond.cleanup56.us ], [ %p.1.us.1, %if.end.us.1 ] %arrayidx.us.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv137.1 %0 = load i32, ptr %arrayidx.us.1, align 4, !tbaa !5 %shr.i.us.1 = lshr i32 %0, 9 %and.i.us.1 = and i32 %shr.i.us.1, 511 %idxprom10.us.1 = zext i32 %and.i.us.1 to i64 %arrayidx11.us.1 = getelementptr inbounds i32, ptr %call2, i64 %idxprom10.us.1 %1 = load i32, ptr %arrayidx11.us.1, align 4, !tbaa !5 %arrayidx13.us.1 = getelementptr inbounds i32, ptr %add.ptr, i64 %idxprom10.us.1 %2 = load i32, ptr %arrayidx13.us.1, align 4, !tbaa !5 %cmp14.us.1 = icmp eq i32 %1, %2 br i1 %cmp14.us.1, label %for.cond16.preheader.us.1, label %for.body8.us.1.if.end.us.1_crit_edge for.body8.us.1.if.end.us.1_crit_edge: ; preds = %for.body8.us.1 %arrayidx42.us.1.phi.trans.insert = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us.1 %.pre162 = load ptr, ptr %arrayidx42.us.1.phi.trans.insert, align 8, !tbaa !9 br label %if.end.us.1 for.cond16.preheader.us.1: ; preds = %for.body8.us.1 %cmp19124.us.not.1 = icmp eq i32 %1, 0 br i1 %cmp19124.us.not.1, label %for.cond.cleanup21.us.1, label %for.body22.lr.ph.us.1 for.body22.lr.ph.us.1: ; preds = %for.cond16.preheader.us.1 %arrayidx24.us.1 = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us.1 %3 = load ptr, ptr %arrayidx24.us.1, align 8, !tbaa !9 br label %for.body22.us.1 for.body22.us.1: ; preds = %for.body22.us.1, %for.body22.lr.ph.us.1 %indvars.iv.1 = phi i64 [ 0, %for.body22.lr.ph.us.1 ], [ %indvars.iv.next.1, %for.body22.us.1 ] %arrayidx26.us.1 = getelementptr inbounds i32, ptr %3, i64 %indvars.iv.1 %4 = load i32, ptr %arrayidx26.us.1, align 4, !tbaa !5 %arrayidx28.us.1 = getelementptr inbounds i32, ptr %p.0127.us.1, i64 %indvars.iv.1 store i32 %4, ptr %arrayidx28.us.1, align 4, !tbaa !5 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %5 = load i32, ptr %arrayidx11.us.1, align 4, !tbaa !5 %6 = zext i32 %5 to i64 %cmp19.us.1 = icmp ult i64 %indvars.iv.next.1, %6 br i1 %cmp19.us.1, label %for.body22.us.1, label %for.cond.cleanup21.us.loopexit.1, !llvm.loop !11 for.cond.cleanup21.us.loopexit.1: ; preds = %for.body22.us.1 %.pre160 = load i32, ptr %arrayidx13.us.1, align 4, !tbaa !5 %.pre161.pre = load i32, ptr %arrayidx.us.1, align 4, !tbaa !5 br label %for.cond.cleanup21.us.1 for.cond.cleanup21.us.1: ; preds = %for.cond.cleanup21.us.loopexit.1, %for.cond16.preheader.us.1 %.pre161 = phi i32 [ %.pre161.pre, %for.cond.cleanup21.us.loopexit.1 ], [ %0, %for.cond16.preheader.us.1 ] %7 = phi i32 [ %5, %for.cond.cleanup21.us.loopexit.1 ], [ 0, %for.cond16.preheader.us.1 ] %8 = phi i32 [ %.pre160, %for.cond.cleanup21.us.loopexit.1 ], [ 0, %for.cond16.preheader.us.1 ] %mul31.us.1 = shl i32 %8, 1 %add.us.1 = or i32 %mul31.us.1, 1 store i32 %add.us.1, ptr %arrayidx13.us.1, align 4, !tbaa !5 %arrayidx35.us.1 = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us.1 store ptr %p.0127.us.1, ptr %arrayidx35.us.1, align 8, !tbaa !9 %idx.ext.us.1 = zext i32 %add.us.1 to i64 %add.ptr38.us.1 = getelementptr inbounds i32, ptr %p.0127.us.1, i64 %idx.ext.us.1 br label %if.end.us.1 if.end.us.1: ; preds = %for.body8.us.1.if.end.us.1_crit_edge, %for.cond.cleanup21.us.1 %9 = phi i32 [ %7, %for.cond.cleanup21.us.1 ], [ %1, %for.body8.us.1.if.end.us.1_crit_edge ] %10 = phi ptr [ %p.0127.us.1, %for.cond.cleanup21.us.1 ], [ %.pre162, %for.body8.us.1.if.end.us.1_crit_edge ] %11 = phi i32 [ %.pre161, %for.cond.cleanup21.us.1 ], [ %0, %for.body8.us.1.if.end.us.1_crit_edge ] %p.1.us.1 = phi ptr [ %add.ptr38.us.1, %for.cond.cleanup21.us.1 ], [ %p.0127.us.1, %for.body8.us.1.if.end.us.1_crit_edge ] %inc45.us.1 = add i32 %9, 1 store i32 %inc45.us.1, ptr %arrayidx11.us.1, align 4, !tbaa !5 %idxprom46.us.1 = zext i32 %9 to i64 %arrayidx47.us.1 = getelementptr inbounds i32, ptr %10, i64 %idxprom46.us.1 store i32 %11, ptr %arrayidx47.us.1, align 4, !tbaa !5 %indvars.iv.next138.1 = add nuw nsw i64 %indvars.iv137.1, 1 %exitcond.1.not = icmp eq i64 %indvars.iv.next138.1, %wide.trip.count br i1 %exitcond.1.not, label %for.cond59.preheader.us.1, label %for.body8.us.1, !llvm.loop !13 for.cond59.preheader.us.1: ; preds = %if.end.us.1, %for.cond.cleanup64.us.1 %indvars.iv145.1 = phi i64 [ %indvars.iv.next146.1, %for.cond.cleanup64.us.1 ], [ 0, %if.end.us.1 ] %i52.0133.us.1 = phi i32 [ %i52.1.lcssa.us.1, %for.cond.cleanup64.us.1 ], [ 0, %if.end.us.1 ] %arrayidx61.us.1 = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv145.1 %12 = load i32, ptr %arrayidx61.us.1, align 4, !tbaa !5 %cmp62129.us.not.1 = icmp eq i32 %12, 0 br i1 %cmp62129.us.not.1, label %for.cond.cleanup64.us.1, label %for.body65.lr.ph.us.1 for.body65.lr.ph.us.1: ; preds = %for.cond59.preheader.us.1 %arrayidx67.us.1 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv145.1 %13 = load ptr, ptr %arrayidx67.us.1, align 8, !tbaa !9 %14 = ptrtoint ptr %13 to i64 %wide.trip.count143.1 = zext i32 %12 to i64 %min.iters.check178 = icmp ult i32 %12, 20 br i1 %min.iters.check178, label %for.body65.us.1.preheader, label %vector.scevcheck173 vector.scevcheck173: ; preds = %for.body65.lr.ph.us.1 %15 = add nsw i64 %wide.trip.count143.1, -1 %16 = trunc i64 %15 to i32 %17 = xor i32 %i52.0133.us.1, -1 %18 = icmp ult i32 %17, %16 %19 = icmp ugt i64 %15, 4294967295 %20 = or i1 %18, %19 br i1 %20, label %for.body65.us.1.preheader, label %vector.memcheck174 vector.memcheck174: ; preds = %vector.scevcheck173 %21 = zext i32 %i52.0133.us.1 to i64 %22 = shl nuw nsw i64 %21, 2 %23 = add i64 %22, %a169 %24 = sub i64 %23, %14 %diff.check175 = icmp ult i64 %24, 32 br i1 %diff.check175, label %for.body65.us.1.preheader, label %vector.ph179 vector.ph179: ; preds = %vector.memcheck174 %n.vec181 = and i64 %wide.trip.count143.1, 4294967288 %.cast183 = trunc i64 %n.vec181 to i32 %ind.end184 = add i32 %i52.0133.us.1, %.cast183 br label %vector.body187 vector.body187: ; preds = %vector.body187, %vector.ph179 %index188 = phi i64 [ 0, %vector.ph179 ], [ %index.next193, %vector.body187 ] %.cast189 = trunc i64 %index188 to i32 %offset.idx190 = add i32 %i52.0133.us.1, %.cast189 %25 = getelementptr inbounds i32, ptr %13, i64 %index188 %wide.load191 = load <4 x i32>, ptr %25, align 4, !tbaa !5 %26 = getelementptr inbounds i32, ptr %25, i64 4 %wide.load192 = load <4 x i32>, ptr %26, align 4, !tbaa !5 %27 = zext i32 %offset.idx190 to i64 %28 = getelementptr inbounds i32, ptr %a, i64 %27 store <4 x i32> %wide.load191, ptr %28, align 4, !tbaa !5 %29 = getelementptr inbounds i32, ptr %28, i64 4 store <4 x i32> %wide.load192, ptr %29, align 4, !tbaa !5 %index.next193 = add nuw i64 %index188, 8 %30 = icmp eq i64 %index.next193, %n.vec181 br i1 %30, label %middle.block176, label %vector.body187, !llvm.loop !14 middle.block176: ; preds = %vector.body187 %cmp.n186 = icmp eq i64 %n.vec181, %wide.trip.count143.1 br i1 %cmp.n186, label %for.cond.cleanup64.us.1, label %for.body65.us.1.preheader for.body65.us.1.preheader: ; preds = %vector.memcheck174, %vector.scevcheck173, %for.body65.lr.ph.us.1, %middle.block176 %indvars.iv140.1.ph = phi i64 [ 0, %vector.memcheck174 ], [ 0, %vector.scevcheck173 ], [ 0, %for.body65.lr.ph.us.1 ], [ %n.vec181, %middle.block176 ] %i52.1130.us.1.ph = phi i32 [ %i52.0133.us.1, %vector.memcheck174 ], [ %i52.0133.us.1, %vector.scevcheck173 ], [ %i52.0133.us.1, %for.body65.lr.ph.us.1 ], [ %ind.end184, %middle.block176 ] %31 = xor i64 %indvars.iv140.1.ph, -1 %32 = add nsw i64 %31, %wide.trip.count143.1 %xtraiter246 = and i64 %wide.trip.count143.1, 3 %lcmp.mod247.not = icmp eq i64 %xtraiter246, 0 br i1 %lcmp.mod247.not, label %for.body65.us.1.prol.loopexit, label %for.body65.us.1.prol for.body65.us.1.prol: ; preds = %for.body65.us.1.preheader, %for.body65.us.1.prol %indvars.iv140.1.prol = phi i64 [ %indvars.iv.next141.1.prol, %for.body65.us.1.prol ], [ %indvars.iv140.1.ph, %for.body65.us.1.preheader ] %i52.1130.us.1.prol = phi i32 [ %inc74.us.1.prol, %for.body65.us.1.prol ], [ %i52.1130.us.1.ph, %for.body65.us.1.preheader ] %prol.iter248 = phi i64 [ %prol.iter248.next, %for.body65.us.1.prol ], [ 0, %for.body65.us.1.preheader ] %arrayidx69.us.1.prol = getelementptr inbounds i32, ptr %13, i64 %indvars.iv140.1.prol %33 = load i32, ptr %arrayidx69.us.1.prol, align 4, !tbaa !5 %idxprom70.us.1.prol = zext i32 %i52.1130.us.1.prol to i64 %arrayidx71.us.1.prol = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1.prol store i32 %33, ptr %arrayidx71.us.1.prol, align 4, !tbaa !5 %indvars.iv.next141.1.prol = add nuw nsw i64 %indvars.iv140.1.prol, 1 %inc74.us.1.prol = add i32 %i52.1130.us.1.prol, 1 %prol.iter248.next = add i64 %prol.iter248, 1 %prol.iter248.cmp.not = icmp eq i64 %prol.iter248.next, %xtraiter246 br i1 %prol.iter248.cmp.not, label %for.body65.us.1.prol.loopexit, label %for.body65.us.1.prol, !llvm.loop !17 for.body65.us.1.prol.loopexit: ; preds = %for.body65.us.1.prol, %for.body65.us.1.preheader %inc74.us.1.lcssa.unr = phi i32 [ undef, %for.body65.us.1.preheader ], [ %inc74.us.1.prol, %for.body65.us.1.prol ] %indvars.iv140.1.unr = phi i64 [ %indvars.iv140.1.ph, %for.body65.us.1.preheader ], [ %indvars.iv.next141.1.prol, %for.body65.us.1.prol ] %i52.1130.us.1.unr = phi i32 [ %i52.1130.us.1.ph, %for.body65.us.1.preheader ], [ %inc74.us.1.prol, %for.body65.us.1.prol ] %34 = icmp ult i64 %32, 3 br i1 %34, label %for.cond.cleanup64.us.1, label %for.body65.us.1.preheader.new for.body65.us.1.preheader.new: ; preds = %for.body65.us.1.prol.loopexit %invariant.gep268 = getelementptr i32, ptr %13, i64 1 %invariant.gep270 = getelementptr i32, ptr %13, i64 2 %invariant.gep272 = getelementptr i32, ptr %13, i64 3 br label %for.body65.us.1 for.body65.us.1: ; preds = %for.body65.us.1, %for.body65.us.1.preheader.new %indvars.iv140.1 = phi i64 [ %indvars.iv140.1.unr, %for.body65.us.1.preheader.new ], [ %indvars.iv.next141.1.3, %for.body65.us.1 ] %i52.1130.us.1 = phi i32 [ %i52.1130.us.1.unr, %for.body65.us.1.preheader.new ], [ %inc74.us.1.3, %for.body65.us.1 ] %arrayidx69.us.1 = getelementptr inbounds i32, ptr %13, i64 %indvars.iv140.1 %35 = load i32, ptr %arrayidx69.us.1, align 4, !tbaa !5 %idxprom70.us.1 = zext i32 %i52.1130.us.1 to i64 %arrayidx71.us.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1 store i32 %35, ptr %arrayidx71.us.1, align 4, !tbaa !5 %inc74.us.1 = add i32 %i52.1130.us.1, 1 %gep269 = getelementptr i32, ptr %invariant.gep268, i64 %indvars.iv140.1 %36 = load i32, ptr %gep269, align 4, !tbaa !5 %idxprom70.us.1.1 = zext i32 %inc74.us.1 to i64 %arrayidx71.us.1.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1.1 store i32 %36, ptr %arrayidx71.us.1.1, align 4, !tbaa !5 %inc74.us.1.1 = add i32 %i52.1130.us.1, 2 %gep271 = getelementptr i32, ptr %invariant.gep270, i64 %indvars.iv140.1 %37 = load i32, ptr %gep271, align 4, !tbaa !5 %idxprom70.us.1.2 = zext i32 %inc74.us.1.1 to i64 %arrayidx71.us.1.2 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1.2 store i32 %37, ptr %arrayidx71.us.1.2, align 4, !tbaa !5 %inc74.us.1.2 = add i32 %i52.1130.us.1, 3 %gep273 = getelementptr i32, ptr %invariant.gep272, i64 %indvars.iv140.1 %38 = load i32, ptr %gep273, align 4, !tbaa !5 %idxprom70.us.1.3 = zext i32 %inc74.us.1.2 to i64 %arrayidx71.us.1.3 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1.3 store i32 %38, ptr %arrayidx71.us.1.3, align 4, !tbaa !5 %indvars.iv.next141.1.3 = add nuw nsw i64 %indvars.iv140.1, 4 %inc74.us.1.3 = add i32 %i52.1130.us.1, 4 %exitcond144.1.not.3 = icmp eq i64 %indvars.iv.next141.1.3, %wide.trip.count143.1 br i1 %exitcond144.1.not.3, label %for.cond.cleanup64.us.1, label %for.body65.us.1, !llvm.loop !19 for.cond.cleanup64.us.1: ; preds = %for.body65.us.1.prol.loopexit, %for.body65.us.1, %middle.block176, %for.cond59.preheader.us.1 %i52.1.lcssa.us.1 = phi i32 [ %i52.0133.us.1, %for.cond59.preheader.us.1 ], [ %ind.end184, %middle.block176 ], [ %inc74.us.1.lcssa.unr, %for.body65.us.1.prol.loopexit ], [ %inc74.us.1.3, %for.body65.us.1 ] %indvars.iv.next146.1 = add nuw nsw i64 %indvars.iv145.1, 1 %exitcond148.1.not = icmp eq i64 %indvars.iv.next146.1, 512 br i1 %exitcond148.1.not, label %for.cond.cleanup, label %for.cond59.preheader.us.1, !llvm.loop !20 for.cond.cleanup64.us: ; preds = %for.body65.us.prol.loopexit, %for.body65.us, %middle.block, %for.cond59.preheader.us %i52.1.lcssa.us = phi i32 [ %i52.0133.us, %for.cond59.preheader.us ], [ %ind.end, %middle.block ], [ %inc74.us.lcssa.unr, %for.body65.us.prol.loopexit ], [ %inc74.us.3, %for.body65.us ] %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1 %exitcond148.not = icmp eq i64 %indvars.iv.next146, 512 br i1 %exitcond148.not, label %for.cond.cleanup56.us, label %for.cond59.preheader.us, !llvm.loop !20 for.body65.us: ; preds = %for.body65.us, %for.body65.us.preheader.new %indvars.iv140 = phi i64 [ %indvars.iv140.unr, %for.body65.us.preheader.new ], [ %indvars.iv.next141.3, %for.body65.us ] %i52.1130.us = phi i32 [ %i52.1130.us.unr, %for.body65.us.preheader.new ], [ %inc74.us.3, %for.body65.us ] %arrayidx69.us = getelementptr inbounds i32, ptr %56, i64 %indvars.iv140 %39 = load i32, ptr %arrayidx69.us, align 4, !tbaa !5 %idxprom70.us = zext i32 %i52.1130.us to i64 %arrayidx71.us = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us store i32 %39, ptr %arrayidx71.us, align 4, !tbaa !5 %inc74.us = add i32 %i52.1130.us, 1 %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv140 %40 = load i32, ptr %gep, align 4, !tbaa !5 %idxprom70.us.1241 = zext i32 %inc74.us to i64 %arrayidx71.us.1242 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.1241 store i32 %40, ptr %arrayidx71.us.1242, align 4, !tbaa !5 %inc74.us.1244 = add i32 %i52.1130.us, 2 %gep265 = getelementptr i32, ptr %invariant.gep264, i64 %indvars.iv140 %41 = load i32, ptr %gep265, align 4, !tbaa !5 %idxprom70.us.2 = zext i32 %inc74.us.1244 to i64 %arrayidx71.us.2 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.2 store i32 %41, ptr %arrayidx71.us.2, align 4, !tbaa !5 %inc74.us.2 = add i32 %i52.1130.us, 3 %gep267 = getelementptr i32, ptr %invariant.gep266, i64 %indvars.iv140 %42 = load i32, ptr %gep267, align 4, !tbaa !5 %idxprom70.us.3 = zext i32 %inc74.us.2 to i64 %arrayidx71.us.3 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.3 store i32 %42, ptr %arrayidx71.us.3, align 4, !tbaa !5 %indvars.iv.next141.3 = add nuw nsw i64 %indvars.iv140, 4 %inc74.us.3 = add i32 %i52.1130.us, 4 %exitcond144.not.3 = icmp eq i64 %indvars.iv.next141.3, %wide.trip.count143 br i1 %exitcond144.not.3, label %for.cond.cleanup64.us, label %for.body65.us, !llvm.loop !21 for.body8.us: ; preds = %for.body.us.preheader, %if.end.us %indvars.iv137 = phi i64 [ 0, %for.body.us.preheader ], [ %indvars.iv.next138, %if.end.us ] %p.0127.us = phi ptr [ %call, %for.body.us.preheader ], [ %p.1.us, %if.end.us ] %arrayidx.us = getelementptr inbounds i32, ptr %a, i64 %indvars.iv137 %43 = load i32, ptr %arrayidx.us, align 4, !tbaa !5 %and.i.us = and i32 %43, 511 %idxprom10.us = zext i32 %and.i.us to i64 %arrayidx11.us = getelementptr inbounds i32, ptr %call2, i64 %idxprom10.us %44 = load i32, ptr %arrayidx11.us, align 4, !tbaa !5 %arrayidx13.us = getelementptr inbounds i32, ptr %add.ptr, i64 %idxprom10.us %45 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %cmp14.us = icmp eq i32 %44, %45 br i1 %cmp14.us, label %for.cond16.preheader.us, label %for.body8.us.if.end.us_crit_edge for.body8.us.if.end.us_crit_edge: ; preds = %for.body8.us %arrayidx42.us.phi.trans.insert = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us %.pre159 = load ptr, ptr %arrayidx42.us.phi.trans.insert, align 8, !tbaa !9 br label %if.end.us for.cond.cleanup21.us.loopexit: ; preds = %for.body22.us %.pre = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %.pre158.pre = load i32, ptr %arrayidx.us, align 4, !tbaa !5 br label %for.cond.cleanup21.us for.cond.cleanup21.us: ; preds = %for.cond.cleanup21.us.loopexit, %for.cond16.preheader.us %.pre158 = phi i32 [ %.pre158.pre, %for.cond.cleanup21.us.loopexit ], [ %43, %for.cond16.preheader.us ] %46 = phi i32 [ %52, %for.cond.cleanup21.us.loopexit ], [ 0, %for.cond16.preheader.us ] %47 = phi i32 [ %.pre, %for.cond.cleanup21.us.loopexit ], [ 0, %for.cond16.preheader.us ] %mul31.us = shl i32 %47, 1 %add.us = or i32 %mul31.us, 1 store i32 %add.us, ptr %arrayidx13.us, align 4, !tbaa !5 %arrayidx35.us = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us store ptr %p.0127.us, ptr %arrayidx35.us, align 8, !tbaa !9 %idx.ext.us = zext i32 %add.us to i64 %add.ptr38.us = getelementptr inbounds i32, ptr %p.0127.us, i64 %idx.ext.us br label %if.end.us if.end.us: ; preds = %for.body8.us.if.end.us_crit_edge, %for.cond.cleanup21.us %48 = phi i32 [ %46, %for.cond.cleanup21.us ], [ %44, %for.body8.us.if.end.us_crit_edge ] %49 = phi ptr [ %p.0127.us, %for.cond.cleanup21.us ], [ %.pre159, %for.body8.us.if.end.us_crit_edge ] %50 = phi i32 [ %.pre158, %for.cond.cleanup21.us ], [ %43, %for.body8.us.if.end.us_crit_edge ] %p.1.us = phi ptr [ %add.ptr38.us, %for.cond.cleanup21.us ], [ %p.0127.us, %for.body8.us.if.end.us_crit_edge ] %inc45.us = add i32 %48, 1 store i32 %inc45.us, ptr %arrayidx11.us, align 4, !tbaa !5 %idxprom46.us = zext i32 %48 to i64 %arrayidx47.us = getelementptr inbounds i32, ptr %49, i64 %idxprom46.us store i32 %50, ptr %arrayidx47.us, align 4, !tbaa !5 %indvars.iv.next138 = add nuw nsw i64 %indvars.iv137, 1 %exitcond.not = icmp eq i64 %indvars.iv.next138, %wide.trip.count br i1 %exitcond.not, label %for.cond59.preheader.us, label %for.body8.us, !llvm.loop !13 for.body22.us: ; preds = %for.body22.lr.ph.us, %for.body22.us %indvars.iv = phi i64 [ 0, %for.body22.lr.ph.us ], [ %indvars.iv.next, %for.body22.us ] %arrayidx26.us = getelementptr inbounds i32, ptr %55, i64 %indvars.iv %51 = load i32, ptr %arrayidx26.us, align 4, !tbaa !5 %arrayidx28.us = getelementptr inbounds i32, ptr %p.0127.us, i64 %indvars.iv store i32 %51, ptr %arrayidx28.us, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %52 = load i32, ptr %arrayidx11.us, align 4, !tbaa !5 %53 = zext i32 %52 to i64 %cmp19.us = icmp ult i64 %indvars.iv.next, %53 br i1 %cmp19.us, label %for.body22.us, label %for.cond.cleanup21.us.loopexit, !llvm.loop !11 for.cond59.preheader.us: ; preds = %if.end.us, %for.cond.cleanup64.us %indvars.iv145 = phi i64 [ %indvars.iv.next146, %for.cond.cleanup64.us ], [ 0, %if.end.us ] %i52.0133.us = phi i32 [ %i52.1.lcssa.us, %for.cond.cleanup64.us ], [ 0, %if.end.us ] %arrayidx61.us = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv145 %54 = load i32, ptr %arrayidx61.us, align 4, !tbaa !5 %cmp62129.us.not = icmp eq i32 %54, 0 br i1 %cmp62129.us.not, label %for.cond.cleanup64.us, label %for.body65.lr.ph.us for.cond16.preheader.us: ; preds = %for.body8.us %cmp19124.us.not = icmp eq i32 %44, 0 br i1 %cmp19124.us.not, label %for.cond.cleanup21.us, label %for.body22.lr.ph.us for.body22.lr.ph.us: ; preds = %for.cond16.preheader.us %arrayidx24.us = getelementptr inbounds ptr, ptr %call1, i64 %idxprom10.us %55 = load ptr, ptr %arrayidx24.us, align 8, !tbaa !9 br label %for.body22.us for.body65.lr.ph.us: ; preds = %for.cond59.preheader.us %arrayidx67.us = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv145 %56 = load ptr, ptr %arrayidx67.us, align 8, !tbaa !9 %57 = ptrtoint ptr %56 to i64 %wide.trip.count143 = zext i32 %54 to i64 %min.iters.check = icmp ult i32 %54, 20 br i1 %min.iters.check, label %for.body65.us.preheader, label %vector.scevcheck vector.scevcheck: ; preds = %for.body65.lr.ph.us %58 = add nsw i64 %wide.trip.count143, -1 %59 = trunc i64 %58 to i32 %60 = xor i32 %i52.0133.us, -1 %61 = icmp ult i32 %60, %59 %62 = icmp ugt i64 %58, 4294967295 %63 = or i1 %61, %62 br i1 %63, label %for.body65.us.preheader, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %64 = zext i32 %i52.0133.us to i64 %65 = shl nuw nsw i64 %64, 2 %66 = add i64 %65, %a169 %67 = sub i64 %66, %57 %diff.check = icmp ult i64 %67, 32 br i1 %diff.check, label %for.body65.us.preheader, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %wide.trip.count143, 4294967288 %.cast = trunc i64 %n.vec to i32 %ind.end = add i32 %i52.0133.us, %.cast br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %.cast171 = trunc i64 %index to i32 %offset.idx = add i32 %i52.0133.us, %.cast171 %68 = getelementptr inbounds i32, ptr %56, i64 %index %wide.load = load <4 x i32>, ptr %68, align 4, !tbaa !5 %69 = getelementptr inbounds i32, ptr %68, i64 4 %wide.load172 = load <4 x i32>, ptr %69, align 4, !tbaa !5 %70 = zext i32 %offset.idx to i64 %71 = getelementptr inbounds i32, ptr %a, i64 %70 store <4 x i32> %wide.load, ptr %71, align 4, !tbaa !5 %72 = getelementptr inbounds i32, ptr %71, i64 4 store <4 x i32> %wide.load172, ptr %72, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %73 = icmp eq i64 %index.next, %n.vec br i1 %73, label %middle.block, label %vector.body, !llvm.loop !22 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count143 br i1 %cmp.n, label %for.cond.cleanup64.us, label %for.body65.us.preheader for.body65.us.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %for.body65.lr.ph.us, %middle.block %indvars.iv140.ph = phi i64 [ 0, %vector.memcheck ], [ 0, %vector.scevcheck ], [ 0, %for.body65.lr.ph.us ], [ %n.vec, %middle.block ] %i52.1130.us.ph = phi i32 [ %i52.0133.us, %vector.memcheck ], [ %i52.0133.us, %vector.scevcheck ], [ %i52.0133.us, %for.body65.lr.ph.us ], [ %ind.end, %middle.block ] %74 = xor i64 %indvars.iv140.ph, -1 %75 = add nsw i64 %74, %wide.trip.count143 %xtraiter = and i64 %wide.trip.count143, 3 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body65.us.prol.loopexit, label %for.body65.us.prol for.body65.us.prol: ; preds = %for.body65.us.preheader, %for.body65.us.prol %indvars.iv140.prol = phi i64 [ %indvars.iv.next141.prol, %for.body65.us.prol ], [ %indvars.iv140.ph, %for.body65.us.preheader ] %i52.1130.us.prol = phi i32 [ %inc74.us.prol, %for.body65.us.prol ], [ %i52.1130.us.ph, %for.body65.us.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %for.body65.us.prol ], [ 0, %for.body65.us.preheader ] %arrayidx69.us.prol = getelementptr inbounds i32, ptr %56, i64 %indvars.iv140.prol %76 = load i32, ptr %arrayidx69.us.prol, align 4, !tbaa !5 %idxprom70.us.prol = zext i32 %i52.1130.us.prol to i64 %arrayidx71.us.prol = getelementptr inbounds i32, ptr %a, i64 %idxprom70.us.prol store i32 %76, ptr %arrayidx71.us.prol, align 4, !tbaa !5 %indvars.iv.next141.prol = add nuw nsw i64 %indvars.iv140.prol, 1 %inc74.us.prol = add i32 %i52.1130.us.prol, 1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %for.body65.us.prol.loopexit, label %for.body65.us.prol, !llvm.loop !23 for.body65.us.prol.loopexit: ; preds = %for.body65.us.prol, %for.body65.us.preheader %inc74.us.lcssa.unr = phi i32 [ undef, %for.body65.us.preheader ], [ %inc74.us.prol, %for.body65.us.prol ] %indvars.iv140.unr = phi i64 [ %indvars.iv140.ph, %for.body65.us.preheader ], [ %indvars.iv.next141.prol, %for.body65.us.prol ] %i52.1130.us.unr = phi i32 [ %i52.1130.us.ph, %for.body65.us.preheader ], [ %inc74.us.prol, %for.body65.us.prol ] %77 = icmp ult i64 %75, 3 br i1 %77, label %for.cond.cleanup64.us, label %for.body65.us.preheader.new for.body65.us.preheader.new: ; preds = %for.body65.us.prol.loopexit %invariant.gep = getelementptr i32, ptr %56, i64 1 %invariant.gep264 = getelementptr i32, ptr %56, i64 2 %invariant.gep266 = getelementptr i32, ptr %56, i64 3 br label %for.body65.us for.cond.cleanup: ; preds = %for.cond.cleanup64.us.1, %for.cond.cleanup64.1 tail call void @free(ptr noundef %call) #7 tail call void @free(ptr noundef %call1) #7 tail call void @free(ptr noundef %call2) #7 ret void for.cond59.preheader: ; preds = %entry, %for.cond.cleanup64 %indvars.iv154 = phi i64 [ %indvars.iv.next155, %for.cond.cleanup64 ], [ 0, %entry ] %i52.0133 = phi i32 [ %i52.1.lcssa, %for.cond.cleanup64 ], [ 0, %entry ] %arrayidx61 = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv154 %78 = load i32, ptr %arrayidx61, align 4, !tbaa !5 %cmp62129.not = icmp eq i32 %78, 0 br i1 %cmp62129.not, label %for.cond.cleanup64, label %for.body65.lr.ph for.body65.lr.ph: ; preds = %for.cond59.preheader %arrayidx67 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv154 %79 = load ptr, ptr %arrayidx67, align 8, !tbaa !9 %80 = ptrtoint ptr %79 to i64 %wide.trip.count152 = zext i32 %78 to i64 %min.iters.check199 = icmp ult i32 %78, 20 br i1 %min.iters.check199, label %for.body65.preheader, label %vector.scevcheck194 vector.scevcheck194: ; preds = %for.body65.lr.ph %81 = add nsw i64 %wide.trip.count152, -1 %82 = trunc i64 %81 to i32 %83 = xor i32 %i52.0133, -1 %84 = icmp ult i32 %83, %82 %85 = icmp ugt i64 %81, 4294967295 %86 = or i1 %84, %85 br i1 %86, label %for.body65.preheader, label %vector.memcheck195 vector.memcheck195: ; preds = %vector.scevcheck194 %87 = zext i32 %i52.0133 to i64 %88 = shl nuw nsw i64 %87, 2 %89 = add i64 %88, %a169 %90 = sub i64 %89, %80 %diff.check196 = icmp ult i64 %90, 32 br i1 %diff.check196, label %for.body65.preheader, label %vector.ph200 vector.ph200: ; preds = %vector.memcheck195 %n.vec202 = and i64 %wide.trip.count152, 4294967288 %.cast204 = trunc i64 %n.vec202 to i32 %ind.end205 = add i32 %i52.0133, %.cast204 br label %vector.body208 vector.body208: ; preds = %vector.body208, %vector.ph200 %index209 = phi i64 [ 0, %vector.ph200 ], [ %index.next214, %vector.body208 ] %.cast210 = trunc i64 %index209 to i32 %offset.idx211 = add i32 %i52.0133, %.cast210 %91 = getelementptr inbounds i32, ptr %79, i64 %index209 %wide.load212 = load <4 x i32>, ptr %91, align 4, !tbaa !5 %92 = getelementptr inbounds i32, ptr %91, i64 4 %wide.load213 = load <4 x i32>, ptr %92, align 4, !tbaa !5 %93 = zext i32 %offset.idx211 to i64 %94 = getelementptr inbounds i32, ptr %a, i64 %93 store <4 x i32> %wide.load212, ptr %94, align 4, !tbaa !5 %95 = getelementptr inbounds i32, ptr %94, i64 4 store <4 x i32> %wide.load213, ptr %95, align 4, !tbaa !5 %index.next214 = add nuw i64 %index209, 8 %96 = icmp eq i64 %index.next214, %n.vec202 br i1 %96, label %middle.block197, label %vector.body208, !llvm.loop !24 middle.block197: ; preds = %vector.body208 %cmp.n207 = icmp eq i64 %n.vec202, %wide.trip.count152 br i1 %cmp.n207, label %for.cond.cleanup64, label %for.body65.preheader for.body65.preheader: ; preds = %vector.memcheck195, %vector.scevcheck194, %for.body65.lr.ph, %middle.block197 %indvars.iv149.ph = phi i64 [ 0, %vector.memcheck195 ], [ 0, %vector.scevcheck194 ], [ 0, %for.body65.lr.ph ], [ %n.vec202, %middle.block197 ] %i52.1130.ph = phi i32 [ %i52.0133, %vector.memcheck195 ], [ %i52.0133, %vector.scevcheck194 ], [ %i52.0133, %for.body65.lr.ph ], [ %ind.end205, %middle.block197 ] %97 = xor i64 %indvars.iv149.ph, -1 %98 = add nsw i64 %97, %wide.trip.count152 %xtraiter249 = and i64 %wide.trip.count152, 3 %lcmp.mod250.not = icmp eq i64 %xtraiter249, 0 br i1 %lcmp.mod250.not, label %for.body65.prol.loopexit, label %for.body65.prol for.body65.prol: ; preds = %for.body65.preheader, %for.body65.prol %indvars.iv149.prol = phi i64 [ %indvars.iv.next150.prol, %for.body65.prol ], [ %indvars.iv149.ph, %for.body65.preheader ] %i52.1130.prol = phi i32 [ %inc74.prol, %for.body65.prol ], [ %i52.1130.ph, %for.body65.preheader ] %prol.iter251 = phi i64 [ %prol.iter251.next, %for.body65.prol ], [ 0, %for.body65.preheader ] %arrayidx69.prol = getelementptr inbounds i32, ptr %79, i64 %indvars.iv149.prol %99 = load i32, ptr %arrayidx69.prol, align 4, !tbaa !5 %idxprom70.prol = zext i32 %i52.1130.prol to i64 %arrayidx71.prol = getelementptr inbounds i32, ptr %a, i64 %idxprom70.prol store i32 %99, ptr %arrayidx71.prol, align 4, !tbaa !5 %indvars.iv.next150.prol = add nuw nsw i64 %indvars.iv149.prol, 1 %inc74.prol = add i32 %i52.1130.prol, 1 %prol.iter251.next = add i64 %prol.iter251, 1 %prol.iter251.cmp.not = icmp eq i64 %prol.iter251.next, %xtraiter249 br i1 %prol.iter251.cmp.not, label %for.body65.prol.loopexit, label %for.body65.prol, !llvm.loop !25 for.body65.prol.loopexit: ; preds = %for.body65.prol, %for.body65.preheader %inc74.lcssa.unr = phi i32 [ undef, %for.body65.preheader ], [ %inc74.prol, %for.body65.prol ] %indvars.iv149.unr = phi i64 [ %indvars.iv149.ph, %for.body65.preheader ], [ %indvars.iv.next150.prol, %for.body65.prol ] %i52.1130.unr = phi i32 [ %i52.1130.ph, %for.body65.preheader ], [ %inc74.prol, %for.body65.prol ] %100 = icmp ult i64 %98, 3 br i1 %100, label %for.cond.cleanup64, label %for.body65.preheader.new for.body65.preheader.new: ; preds = %for.body65.prol.loopexit %invariant.gep274 = getelementptr i32, ptr %79, i64 1 %invariant.gep276 = getelementptr i32, ptr %79, i64 2 %invariant.gep278 = getelementptr i32, ptr %79, i64 3 br label %for.body65 for.cond.cleanup56: ; preds = %for.cond.cleanup64 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(4096) %call2, i8 0, i64 4096, i1 false) br label %for.cond59.preheader.1 for.cond59.preheader.1: ; preds = %for.cond.cleanup64.1, %for.cond.cleanup56 %indvars.iv154.1 = phi i64 [ 0, %for.cond.cleanup56 ], [ %indvars.iv.next155.1, %for.cond.cleanup64.1 ] %i52.0133.1 = phi i32 [ 0, %for.cond.cleanup56 ], [ %i52.1.lcssa.1, %for.cond.cleanup64.1 ] %arrayidx61.1 = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv154.1 %101 = load i32, ptr %arrayidx61.1, align 4, !tbaa !5 %cmp62129.not.1 = icmp eq i32 %101, 0 br i1 %cmp62129.not.1, label %for.cond.cleanup64.1, label %for.body65.lr.ph.1 for.body65.lr.ph.1: ; preds = %for.cond59.preheader.1 %arrayidx67.1 = getelementptr inbounds ptr, ptr %call1, i64 %indvars.iv154.1 %102 = load ptr, ptr %arrayidx67.1, align 8, !tbaa !9 %103 = ptrtoint ptr %102 to i64 %wide.trip.count152.1 = zext i32 %101 to i64 %min.iters.check220 = icmp ult i32 %101, 20 br i1 %min.iters.check220, label %for.body65.1.preheader, label %vector.scevcheck215 vector.scevcheck215: ; preds = %for.body65.lr.ph.1 %104 = add nsw i64 %wide.trip.count152.1, -1 %105 = trunc i64 %104 to i32 %106 = xor i32 %i52.0133.1, -1 %107 = icmp ult i32 %106, %105 %108 = icmp ugt i64 %104, 4294967295 %109 = or i1 %107, %108 br i1 %109, label %for.body65.1.preheader, label %vector.memcheck216 vector.memcheck216: ; preds = %vector.scevcheck215 %110 = zext i32 %i52.0133.1 to i64 %111 = shl nuw nsw i64 %110, 2 %112 = add i64 %111, %a169 %113 = sub i64 %112, %103 %diff.check217 = icmp ult i64 %113, 32 br i1 %diff.check217, label %for.body65.1.preheader, label %vector.ph221 vector.ph221: ; preds = %vector.memcheck216 %n.vec223 = and i64 %wide.trip.count152.1, 4294967288 %.cast225 = trunc i64 %n.vec223 to i32 %ind.end226 = add i32 %i52.0133.1, %.cast225 br label %vector.body229 vector.body229: ; preds = %vector.body229, %vector.ph221 %index230 = phi i64 [ 0, %vector.ph221 ], [ %index.next235, %vector.body229 ] %.cast231 = trunc i64 %index230 to i32 %offset.idx232 = add i32 %i52.0133.1, %.cast231 %114 = getelementptr inbounds i32, ptr %102, i64 %index230 %wide.load233 = load <4 x i32>, ptr %114, align 4, !tbaa !5 %115 = getelementptr inbounds i32, ptr %114, i64 4 %wide.load234 = load <4 x i32>, ptr %115, align 4, !tbaa !5 %116 = zext i32 %offset.idx232 to i64 %117 = getelementptr inbounds i32, ptr %a, i64 %116 store <4 x i32> %wide.load233, ptr %117, align 4, !tbaa !5 %118 = getelementptr inbounds i32, ptr %117, i64 4 store <4 x i32> %wide.load234, ptr %118, align 4, !tbaa !5 %index.next235 = add nuw i64 %index230, 8 %119 = icmp eq i64 %index.next235, %n.vec223 br i1 %119, label %middle.block218, label %vector.body229, !llvm.loop !26 middle.block218: ; preds = %vector.body229 %cmp.n228 = icmp eq i64 %n.vec223, %wide.trip.count152.1 br i1 %cmp.n228, label %for.cond.cleanup64.1, label %for.body65.1.preheader for.body65.1.preheader: ; preds = %vector.memcheck216, %vector.scevcheck215, %for.body65.lr.ph.1, %middle.block218 %indvars.iv149.1.ph = phi i64 [ 0, %vector.memcheck216 ], [ 0, %vector.scevcheck215 ], [ 0, %for.body65.lr.ph.1 ], [ %n.vec223, %middle.block218 ] %i52.1130.1.ph = phi i32 [ %i52.0133.1, %vector.memcheck216 ], [ %i52.0133.1, %vector.scevcheck215 ], [ %i52.0133.1, %for.body65.lr.ph.1 ], [ %ind.end226, %middle.block218 ] %120 = xor i64 %indvars.iv149.1.ph, -1 %121 = add nsw i64 %120, %wide.trip.count152.1 %xtraiter260 = and i64 %wide.trip.count152.1, 3 %lcmp.mod261.not = icmp eq i64 %xtraiter260, 0 br i1 %lcmp.mod261.not, label %for.body65.1.prol.loopexit, label %for.body65.1.prol for.body65.1.prol: ; preds = %for.body65.1.preheader, %for.body65.1.prol %indvars.iv149.1.prol = phi i64 [ %indvars.iv.next150.1.prol, %for.body65.1.prol ], [ %indvars.iv149.1.ph, %for.body65.1.preheader ] %i52.1130.1.prol = phi i32 [ %inc74.1.prol, %for.body65.1.prol ], [ %i52.1130.1.ph, %for.body65.1.preheader ] %prol.iter262 = phi i64 [ %prol.iter262.next, %for.body65.1.prol ], [ 0, %for.body65.1.preheader ] %arrayidx69.1.prol = getelementptr inbounds i32, ptr %102, i64 %indvars.iv149.1.prol %122 = load i32, ptr %arrayidx69.1.prol, align 4, !tbaa !5 %idxprom70.1.prol = zext i32 %i52.1130.1.prol to i64 %arrayidx71.1.prol = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1.prol store i32 %122, ptr %arrayidx71.1.prol, align 4, !tbaa !5 %indvars.iv.next150.1.prol = add nuw nsw i64 %indvars.iv149.1.prol, 1 %inc74.1.prol = add i32 %i52.1130.1.prol, 1 %prol.iter262.next = add i64 %prol.iter262, 1 %prol.iter262.cmp.not = icmp eq i64 %prol.iter262.next, %xtraiter260 br i1 %prol.iter262.cmp.not, label %for.body65.1.prol.loopexit, label %for.body65.1.prol, !llvm.loop !27 for.body65.1.prol.loopexit: ; preds = %for.body65.1.prol, %for.body65.1.preheader %inc74.1.lcssa.unr = phi i32 [ undef, %for.body65.1.preheader ], [ %inc74.1.prol, %for.body65.1.prol ] %indvars.iv149.1.unr = phi i64 [ %indvars.iv149.1.ph, %for.body65.1.preheader ], [ %indvars.iv.next150.1.prol, %for.body65.1.prol ] %i52.1130.1.unr = phi i32 [ %i52.1130.1.ph, %for.body65.1.preheader ], [ %inc74.1.prol, %for.body65.1.prol ] %123 = icmp ult i64 %121, 3 br i1 %123, label %for.cond.cleanup64.1, label %for.body65.1.preheader.new for.body65.1.preheader.new: ; preds = %for.body65.1.prol.loopexit %invariant.gep280 = getelementptr i32, ptr %102, i64 1 %invariant.gep282 = getelementptr i32, ptr %102, i64 2 %invariant.gep284 = getelementptr i32, ptr %102, i64 3 br label %for.body65.1 for.body65.1: ; preds = %for.body65.1, %for.body65.1.preheader.new %indvars.iv149.1 = phi i64 [ %indvars.iv149.1.unr, %for.body65.1.preheader.new ], [ %indvars.iv.next150.1.3, %for.body65.1 ] %i52.1130.1 = phi i32 [ %i52.1130.1.unr, %for.body65.1.preheader.new ], [ %inc74.1.3, %for.body65.1 ] %arrayidx69.1 = getelementptr inbounds i32, ptr %102, i64 %indvars.iv149.1 %124 = load i32, ptr %arrayidx69.1, align 4, !tbaa !5 %idxprom70.1 = zext i32 %i52.1130.1 to i64 %arrayidx71.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1 store i32 %124, ptr %arrayidx71.1, align 4, !tbaa !5 %inc74.1 = add i32 %i52.1130.1, 1 %gep281 = getelementptr i32, ptr %invariant.gep280, i64 %indvars.iv149.1 %125 = load i32, ptr %gep281, align 4, !tbaa !5 %idxprom70.1.1 = zext i32 %inc74.1 to i64 %arrayidx71.1.1 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1.1 store i32 %125, ptr %arrayidx71.1.1, align 4, !tbaa !5 %inc74.1.1 = add i32 %i52.1130.1, 2 %gep283 = getelementptr i32, ptr %invariant.gep282, i64 %indvars.iv149.1 %126 = load i32, ptr %gep283, align 4, !tbaa !5 %idxprom70.1.2 = zext i32 %inc74.1.1 to i64 %arrayidx71.1.2 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1.2 store i32 %126, ptr %arrayidx71.1.2, align 4, !tbaa !5 %inc74.1.2 = add i32 %i52.1130.1, 3 %gep285 = getelementptr i32, ptr %invariant.gep284, i64 %indvars.iv149.1 %127 = load i32, ptr %gep285, align 4, !tbaa !5 %idxprom70.1.3 = zext i32 %inc74.1.2 to i64 %arrayidx71.1.3 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1.3 store i32 %127, ptr %arrayidx71.1.3, align 4, !tbaa !5 %indvars.iv.next150.1.3 = add nuw nsw i64 %indvars.iv149.1, 4 %inc74.1.3 = add i32 %i52.1130.1, 4 %exitcond153.1.not.3 = icmp eq i64 %indvars.iv.next150.1.3, %wide.trip.count152.1 br i1 %exitcond153.1.not.3, label %for.cond.cleanup64.1, label %for.body65.1, !llvm.loop !28 for.cond.cleanup64.1: ; preds = %for.body65.1.prol.loopexit, %for.body65.1, %middle.block218, %for.cond59.preheader.1 %i52.1.lcssa.1 = phi i32 [ %i52.0133.1, %for.cond59.preheader.1 ], [ %ind.end226, %middle.block218 ], [ %inc74.1.lcssa.unr, %for.body65.1.prol.loopexit ], [ %inc74.1.3, %for.body65.1 ] %indvars.iv.next155.1 = add nuw nsw i64 %indvars.iv154.1, 1 %exitcond157.1.not = icmp eq i64 %indvars.iv.next155.1, 512 br i1 %exitcond157.1.not, label %for.cond.cleanup, label %for.cond59.preheader.1, !llvm.loop !20 for.cond.cleanup64: ; preds = %for.body65.prol.loopexit, %for.body65, %middle.block197, %for.cond59.preheader %i52.1.lcssa = phi i32 [ %i52.0133, %for.cond59.preheader ], [ %ind.end205, %middle.block197 ], [ %inc74.lcssa.unr, %for.body65.prol.loopexit ], [ %inc74.3, %for.body65 ] %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1 %exitcond157.not = icmp eq i64 %indvars.iv.next155, 512 br i1 %exitcond157.not, label %for.cond.cleanup56, label %for.cond59.preheader, !llvm.loop !20 for.body65: ; preds = %for.body65, %for.body65.preheader.new %indvars.iv149 = phi i64 [ %indvars.iv149.unr, %for.body65.preheader.new ], [ %indvars.iv.next150.3, %for.body65 ] %i52.1130 = phi i32 [ %i52.1130.unr, %for.body65.preheader.new ], [ %inc74.3, %for.body65 ] %arrayidx69 = getelementptr inbounds i32, ptr %79, i64 %indvars.iv149 %128 = load i32, ptr %arrayidx69, align 4, !tbaa !5 %idxprom70 = zext i32 %i52.1130 to i64 %arrayidx71 = getelementptr inbounds i32, ptr %a, i64 %idxprom70 store i32 %128, ptr %arrayidx71, align 4, !tbaa !5 %inc74 = add i32 %i52.1130, 1 %gep275 = getelementptr i32, ptr %invariant.gep274, i64 %indvars.iv149 %129 = load i32, ptr %gep275, align 4, !tbaa !5 %idxprom70.1255 = zext i32 %inc74 to i64 %arrayidx71.1256 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.1255 store i32 %129, ptr %arrayidx71.1256, align 4, !tbaa !5 %inc74.1258 = add i32 %i52.1130, 2 %gep277 = getelementptr i32, ptr %invariant.gep276, i64 %indvars.iv149 %130 = load i32, ptr %gep277, align 4, !tbaa !5 %idxprom70.2 = zext i32 %inc74.1258 to i64 %arrayidx71.2 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.2 store i32 %130, ptr %arrayidx71.2, align 4, !tbaa !5 %inc74.2 = add i32 %i52.1130, 3 %gep279 = getelementptr i32, ptr %invariant.gep278, i64 %indvars.iv149 %131 = load i32, ptr %gep279, align 4, !tbaa !5 %idxprom70.3 = zext i32 %inc74.2 to i64 %arrayidx71.3 = getelementptr inbounds i32, ptr %a, i64 %idxprom70.3 store i32 %131, ptr %arrayidx71.3, align 4, !tbaa !5 %indvars.iv.next150.3 = add nuw nsw i64 %indvars.iv149, 4 %inc74.3 = add i32 %i52.1130, 4 %exitcond153.not.3 = icmp eq i64 %indvars.iv.next150.3, %wide.trip.count152 br i1 %exitcond153.not.3, label %for.cond.cleanup64, label %for.body65, !llvm.loop !29 } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define dso_local void @run() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i.i = tail call i32 @getc(ptr noundef %0) %1 = add i32 %call.i.i, -58 %2 = icmp ult i32 %1, -10 br i1 %2, label %while.body.i, label %while.body8.preheader.i while.cond3.preheader.loopexit.i: ; preds = %while.body.i %3 = icmp eq i32 %c.023.i, 45 br label %while.body8.preheader.i while.body8.preheader.i: ; preds = %while.cond3.preheader.loopexit.i, %entry %prev.0.lcssa.i = phi i1 [ false, %entry ], [ %3, %while.cond3.preheader.loopexit.i ] %c.0.lcssa.i = phi i32 [ %call.i.i, %entry ], [ %call.i21.i, %while.cond3.preheader.loopexit.i ] br label %while.body8.i while.body.i: ; preds = %entry, %while.body.i %c.023.i = phi i32 [ %call.i21.i, %while.body.i ], [ %call.i.i, %entry ] %4 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i21.i = tail call i32 @getc(ptr noundef %4) %5 = add i32 %call.i21.i, -58 %6 = icmp ult i32 %5, -10 br i1 %6, label %while.body.i, label %while.cond3.preheader.loopexit.i, !llvm.loop !30 while.body8.i: ; preds = %while.body8.i, %while.body8.preheader.i %res.026.i = phi i32 [ %sub.i, %while.body8.i ], [ 0, %while.body8.preheader.i ] %c.125.i = phi i32 [ %call.i22.i, %while.body8.i ], [ %c.0.lcssa.i, %while.body8.preheader.i ] %mul.i = mul i32 %res.026.i, 10 %add.i = add nsw i32 %c.125.i, -48 %sub.i = add i32 %add.i, %mul.i %7 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i22.i = tail call i32 @getc(ptr noundef %7) %8 = add i32 %call.i22.i, -48 %9 = icmp ult i32 %8, 10 br i1 %9, label %while.body8.i, label %read_int.exit, !llvm.loop !31 read_int.exit: ; preds = %while.body8.i %sub13.i = sub i32 0, %sub.i %10 = select i1 %prev.0.lcssa.i, i32 %sub.i, i32 %sub13.i %11 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i.i60 = tail call i32 @getc(ptr noundef %11) %12 = add i32 %call.i.i60, -58 %13 = icmp ult i32 %12, -10 br i1 %13, label %while.body.i74, label %while.body8.preheader.i61 while.cond3.preheader.loopexit.i77: ; preds = %while.body.i74 %14 = icmp eq i32 %c.023.i75, 45 br label %while.body8.preheader.i61 while.body8.preheader.i61: ; preds = %while.cond3.preheader.loopexit.i77, %read_int.exit %prev.0.lcssa.i62 = phi i1 [ false, %read_int.exit ], [ %14, %while.cond3.preheader.loopexit.i77 ] %c.0.lcssa.i63 = phi i32 [ %call.i.i60, %read_int.exit ], [ %call.i21.i76, %while.cond3.preheader.loopexit.i77 ] br label %while.body8.i64 while.body.i74: ; preds = %read_int.exit, %while.body.i74 %c.023.i75 = phi i32 [ %call.i21.i76, %while.body.i74 ], [ %call.i.i60, %read_int.exit ] %15 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i21.i76 = tail call i32 @getc(ptr noundef %15) %16 = add i32 %call.i21.i76, -58 %17 = icmp ult i32 %16, -10 br i1 %17, label %while.body.i74, label %while.cond3.preheader.loopexit.i77, !llvm.loop !30 while.body8.i64: ; preds = %while.body8.i64, %while.body8.preheader.i61 %res.026.i65 = phi i64 [ %sub.i70, %while.body8.i64 ], [ 0, %while.body8.preheader.i61 ] %c.125.i66 = phi i32 [ %call.i22.i71, %while.body8.i64 ], [ %c.0.lcssa.i63, %while.body8.preheader.i61 ] %mul.i67 = mul nsw i64 %res.026.i65, 10 %conv.i68 = zext i32 %c.125.i66 to i64 %add.i69 = add i64 %mul.i67, -48 %sub.i70 = add i64 %add.i69, %conv.i68 %18 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i22.i71 = tail call i32 @getc(ptr noundef %18) %19 = add i32 %call.i22.i71, -48 %20 = icmp ult i32 %19, 10 br i1 %20, label %while.body8.i64, label %read_int.exit78, !llvm.loop !31 read_int.exit78: ; preds = %while.body8.i64 %sub13.i72 = sub nsw i64 0, %sub.i70 %cond.i73 = select i1 %prev.0.lcssa.i62, i64 %sub13.i72, i64 %sub.i70 %conv2 = trunc i64 %cond.i73 to i32 %sext = shl i64 %cond.i73, 32 %conv3 = ashr exact i64 %sext, 32 %call4 = tail call noalias ptr @calloc(i64 noundef %conv3, i64 noundef 4) #6 %cmp98 = icmp sgt i32 %conv2, 0 br i1 %cmp98, label %for.body.preheader, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %read_int.exit78 tail call void @radix_sort(ptr noundef %call4, i32 noundef %conv2) %sub117 = add i32 %conv2, -1 br label %for.cond.cleanup12 for.body.preheader: ; preds = %read_int.exit78 %wide.trip.count = and i64 %cond.i73, 4294967295 br label %for.body for.cond.cleanup: ; preds = %read_int.exit97 tail call void @radix_sort(ptr noundef nonnull %call4, i32 noundef %conv2) %sub = add i32 %conv2, -1 %cmp10100 = icmp sgt i32 %conv2, 1 br i1 %cmp10100, label %for.body13.preheader, label %for.cond.cleanup12 for.body13.preheader: ; preds = %for.cond.cleanup %wide.trip.count110 = zext i32 %sub to i64 %.pre = load i32, ptr %call4, align 4, !tbaa !5 %min.iters.check = icmp ult i32 %conv2, 9 br i1 %min.iters.check, label %for.body13.preheader137, label %vector.ph vector.ph: ; preds = %for.body13.preheader %n.vec = and i64 %wide.trip.count110, 4294967288 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load120, %vector.body ] %21 = or i64 %index, 1 %22 = getelementptr inbounds i32, ptr %call4, i64 %21 %wide.load = load <4 x i32>, ptr %22, align 4, !tbaa !5 %23 = getelementptr inbounds i32, ptr %22, i64 4 %wide.load120 = load <4 x i32>, ptr %23, align 4, !tbaa !5 %24 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %25 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load120, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %26 = getelementptr inbounds i32, ptr %call4, i64 %index %27 = sub nsw <4 x i32> %wide.load, %24 %28 = sub nsw <4 x i32> %wide.load120, %25 store <4 x i32> %27, ptr %26, align 4, !tbaa !5 %29 = getelementptr inbounds i32, ptr %26, i64 4 store <4 x i32> %28, ptr %29, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %30 = icmp eq i64 %index.next, %n.vec br i1 %30, label %middle.block, label %vector.body, !llvm.loop !32 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count110 %vector.recur.extract = extractelement <4 x i32> %wide.load120, i64 3 br i1 %cmp.n, label %for.cond.cleanup12, label %for.body13.preheader137 for.body13.preheader137: ; preds = %for.body13.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body13.preheader ] %indvars.iv107.ph = phi i64 [ %n.vec, %middle.block ], [ 0, %for.body13.preheader ] br label %for.body13 for.body: ; preds = %for.body.preheader, %read_int.exit97 %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %read_int.exit97 ] %31 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i.i79 = tail call i32 @getc(ptr noundef %31) %32 = add i32 %call.i.i79, -58 %33 = icmp ult i32 %32, -10 br i1 %33, label %while.body.i93, label %while.body8.preheader.i80 while.cond3.preheader.loopexit.i96: ; preds = %while.body.i93 %34 = icmp eq i32 %c.023.i94, 45 br label %while.body8.preheader.i80 while.body8.preheader.i80: ; preds = %while.cond3.preheader.loopexit.i96, %for.body %prev.0.lcssa.i81 = phi i1 [ false, %for.body ], [ %34, %while.cond3.preheader.loopexit.i96 ] %c.0.lcssa.i82 = phi i32 [ %call.i.i79, %for.body ], [ %call.i21.i95, %while.cond3.preheader.loopexit.i96 ] br label %while.body8.i83 while.body.i93: ; preds = %for.body, %while.body.i93 %c.023.i94 = phi i32 [ %call.i21.i95, %while.body.i93 ], [ %call.i.i79, %for.body ] %35 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i21.i95 = tail call i32 @getc(ptr noundef %35) %36 = add i32 %call.i21.i95, -58 %37 = icmp ult i32 %36, -10 br i1 %37, label %while.body.i93, label %while.cond3.preheader.loopexit.i96, !llvm.loop !30 while.body8.i83: ; preds = %while.body8.i83, %while.body8.preheader.i80 %res.026.i84 = phi i32 [ %sub.i89, %while.body8.i83 ], [ 0, %while.body8.preheader.i80 ] %c.125.i85 = phi i32 [ %call.i22.i90, %while.body8.i83 ], [ %c.0.lcssa.i82, %while.body8.preheader.i80 ] %mul.i86 = mul i32 %res.026.i84, 10 %add.i88 = add nsw i32 %c.125.i85, -48 %sub.i89 = add i32 %add.i88, %mul.i86 %38 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i22.i90 = tail call i32 @getc(ptr noundef %38) %39 = add i32 %call.i22.i90, -48 %40 = icmp ult i32 %39, 10 br i1 %40, label %while.body8.i83, label %read_int.exit97, !llvm.loop !31 read_int.exit97: ; preds = %while.body8.i83 %sub13.i91 = sub i32 0, %sub.i89 %cond.i92 = select i1 %prev.0.lcssa.i81, i32 %sub13.i91, i32 %sub.i89 %conv7 = add i32 %cond.i92, 100000 %arrayidx = getelementptr inbounds i32, ptr %call4, i64 %indvars.iv store i32 %conv7, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !33 for.cond.cleanup12: ; preds = %for.body13, %middle.block, %for.cond.cleanup.thread, %for.cond.cleanup %sub119 = phi i32 [ %sub117, %for.cond.cleanup.thread ], [ %sub, %for.cond.cleanup ], [ %sub, %middle.block ], [ %sub, %for.body13 ] tail call void @radix_sort(ptr noundef %call4, i32 noundef %sub119) %sub28 = add i32 %10, %conv2 %cmp29102 = icmp sgt i32 %sub28, 0 br i1 %cmp29102, label %for.body32.preheader, label %for.cond.cleanup31 for.body32.preheader: ; preds = %for.cond.cleanup12 %wide.trip.count115 = zext i32 %sub28 to i64 %min.iters.check123 = icmp ult i32 %sub28, 8 br i1 %min.iters.check123, label %for.body32.preheader135, label %vector.ph124 vector.ph124: ; preds = %for.body32.preheader %n.vec126 = and i64 %wide.trip.count115, 4294967288 br label %vector.body129 vector.body129: ; preds = %vector.body129, %vector.ph124 %index130 = phi i64 [ 0, %vector.ph124 ], [ %index.next134, %vector.body129 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph124 ], [ %43, %vector.body129 ] %vec.phi131 = phi <4 x i32> [ zeroinitializer, %vector.ph124 ], [ %44, %vector.body129 ] %41 = getelementptr inbounds i32, ptr %call4, i64 %index130 %wide.load132 = load <4 x i32>, ptr %41, align 4, !tbaa !5 %42 = getelementptr inbounds i32, ptr %41, i64 4 %wide.load133 = load <4 x i32>, ptr %42, align 4, !tbaa !5 %43 = add <4 x i32> %wide.load132, %vec.phi %44 = add <4 x i32> %wide.load133, %vec.phi131 %index.next134 = add nuw i64 %index130, 8 %45 = icmp eq i64 %index.next134, %n.vec126 br i1 %45, label %middle.block121, label %vector.body129, !llvm.loop !34 middle.block121: ; preds = %vector.body129 %bin.rdx = add <4 x i32> %44, %43 %46 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n128 = icmp eq i64 %n.vec126, %wide.trip.count115 br i1 %cmp.n128, label %for.cond.cleanup31, label %for.body32.preheader135 for.body32.preheader135: ; preds = %for.body32.preheader, %middle.block121 %indvars.iv112.ph = phi i64 [ 0, %for.body32.preheader ], [ %n.vec126, %middle.block121 ] %ans.0103.ph = phi i32 [ 0, %for.body32.preheader ], [ %46, %middle.block121 ] br label %for.body32 for.body13: ; preds = %for.body13.preheader137, %for.body13 %scalar.recur = phi i32 [ %47, %for.body13 ], [ %scalar.recur.ph, %for.body13.preheader137 ] %indvars.iv107 = phi i64 [ %indvars.iv.next108, %for.body13 ], [ %indvars.iv107.ph, %for.body13.preheader137 ] %indvars.iv.next108 = add nuw nsw i64 %indvars.iv107, 1 %arrayidx16 = getelementptr inbounds i32, ptr %call4, i64 %indvars.iv.next108 %47 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %arrayidx18 = getelementptr inbounds i32, ptr %call4, i64 %indvars.iv107 %sub19 = sub nsw i32 %47, %scalar.recur store i32 %sub19, ptr %arrayidx18, align 4, !tbaa !5 %exitcond111.not = icmp eq i64 %indvars.iv.next108, %wide.trip.count110 br i1 %exitcond111.not, label %for.cond.cleanup12, label %for.body13, !llvm.loop !35 for.cond.cleanup31: ; preds = %for.body32, %middle.block121, %for.cond.cleanup12 %ans.0.lcssa = phi i32 [ 0, %for.cond.cleanup12 ], [ %46, %middle.block121 ], [ %add35, %for.body32 ] %call39 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.0.lcssa) ret void for.body32: ; preds = %for.body32.preheader135, %for.body32 %indvars.iv112 = phi i64 [ %indvars.iv.next113, %for.body32 ], [ %indvars.iv112.ph, %for.body32.preheader135 ] %ans.0103 = phi i32 [ %add35, %for.body32 ], [ %ans.0103.ph, %for.body32.preheader135 ] %arrayidx34 = getelementptr inbounds i32, ptr %call4, i64 %indvars.iv112 %48 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %add35 = add nsw i32 %48, %ans.0103 %indvars.iv.next113 = add nuw nsw i64 %indvars.iv112, 1 %exitcond116.not = icmp eq i64 %indvars.iv.next113, %wide.trip.count115 br i1 %exitcond116.not, label %for.cond.cleanup31, label %for.body32, !llvm.loop !36 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: tail call void @run() ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "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 allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { 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 #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind allocsize(0,1) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!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, !15, !16} !15 = !{!"llvm.loop.isvectorized", i32 1} !16 = !{!"llvm.loop.unroll.runtime.disable"} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.unroll.disable"} !19 = distinct !{!19, !12, !15} !20 = distinct !{!20, !12} !21 = distinct !{!21, !12, !15} !22 = distinct !{!22, !12, !15, !16} !23 = distinct !{!23, !18} !24 = distinct !{!24, !12, !15, !16} !25 = distinct !{!25, !18} !26 = distinct !{!26, !12, !15, !16} !27 = distinct !{!27, !18} !28 = distinct !{!28, !12, !15} !29 = distinct !{!29, !12, !15} !30 = distinct !{!30, !12} !31 = distinct !{!31, !12} !32 = distinct !{!32, !12, !15, !16} !33 = distinct !{!33, !12} !34 = distinct !{!34, !12, !15, !16} !35 = distinct !{!35, !12, !16, !15} !36 = distinct !{!36, !12, !16, !15}
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #define MOD 1000000009 #define MAX(a,b) (a>b?a:b) #define MAX3(a,b,c) MAX(a,MAX(b,c)) #define MIN(a,b) (a<b?a:b) #define MIN3(a,b,c) MIN(a, MIN(b,c)) typedef long long lli; typedef unsigned short int usi; typedef struct { int a; int dif; int idx; } at; // 昇順 int cmp(const void *a, const void *b) { return *(int*)a - *(int*)b; } int main() { int i, n, m, ans=0, x[100000]; scanf("%d %d",&n, &m); for(i=0; i<m; i++) { scanf("%d",x+i); } qsort(x,m,sizeof(int),cmp); int dif[m]; dif[0] = 0; for(i=1; i<m; i++) { dif[i] = x[i] - x[i-1]; } qsort(dif, m, sizeof(int), cmp); for(i=1; i<=m-n; i++) { ans += dif[i]; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135082/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135082/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %x = alloca [100000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #7 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %x) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp41 = icmp sgt i32 %0, 0 br i1 %cmp41, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre60 = sext i32 %0 to i64 br label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i32, ptr %x, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %m, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry.for.end_crit_edge %conv.pre-phi = phi i64 [ %.pre60, %entry.for.end_crit_edge ], [ %2, %for.body ] call void @qsort(ptr noundef nonnull %x, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @cmp) #7 %3 = load i32, ptr %m, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %5 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %4, align 16 store i32 0, ptr %vla, align 16, !tbaa !5 %6 = load i32, ptr %m, align 4, !tbaa !5 %cmp443 = icmp sgt i32 %6, 1 br i1 %cmp443, label %for.body6.preheader, label %for.end15 for.body6.preheader: ; preds = %for.end %wide.trip.count = zext i32 %6 to i64 %.pre = load i32, ptr %x, align 16, !tbaa !5 %7 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %6, 9 br i1 %min.iters.check, label %for.body6.preheader80, label %vector.ph vector.ph: ; preds = %for.body6.preheader %n.vec = and i64 %7, -8 %ind.end = or i64 %n.vec, 1 %vector.recur.init = insertelement <4 x i32> poison, i32 %.pre, i64 3 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vector.recur = phi <4 x i32> [ %vector.recur.init, %vector.ph ], [ %wide.load61, %vector.body ] %offset.idx = or i64 %index, 1 %8 = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %8, align 4, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 %wide.load61 = load <4 x i32>, ptr %9, align 4, !tbaa !5 %10 = shufflevector <4 x i32> %vector.recur, <4 x i32> %wide.load, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %11 = shufflevector <4 x i32> %wide.load, <4 x i32> %wide.load61, <4 x i32> <i32 3, i32 4, i32 5, i32 6> %12 = sub nsw <4 x i32> %wide.load, %10 %13 = sub nsw <4 x i32> %wide.load61, %11 %14 = getelementptr inbounds i32, ptr %vla, i64 %offset.idx store <4 x i32> %12, ptr %14, align 4, !tbaa !5 %15 = getelementptr inbounds i32, ptr %14, i64 4 store <4 x i32> %13, ptr %15, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %16 = icmp eq i64 %index.next, %n.vec br i1 %16, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %7, %n.vec %vector.recur.extract = extractelement <4 x i32> %wide.load61, i64 3 br i1 %cmp.n, label %for.end15, label %for.body6.preheader80 for.body6.preheader80: ; preds = %for.body6.preheader, %middle.block %scalar.recur.ph = phi i32 [ %vector.recur.extract, %middle.block ], [ %.pre, %for.body6.preheader ] %indvars.iv51.ph = phi i64 [ %ind.end, %middle.block ], [ 1, %for.body6.preheader ] br label %for.body6 for.body6: ; preds = %for.body6.preheader80, %for.body6 %scalar.recur = phi i32 [ %17, %for.body6 ], [ %scalar.recur.ph, %for.body6.preheader80 ] %indvars.iv51 = phi i64 [ %indvars.iv.next52, %for.body6 ], [ %indvars.iv51.ph, %for.body6.preheader80 ] %arrayidx7 = getelementptr inbounds [100000 x i32], ptr %x, i64 0, i64 %indvars.iv51 %17 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %sub10 = sub nsw i32 %17, %scalar.recur %arrayidx12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv51 store i32 %sub10, ptr %arrayidx12, align 4, !tbaa !5 %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1 %exitcond.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count br i1 %exitcond.not, label %for.end15, label %for.body6, !llvm.loop !14 for.end15: ; preds = %for.body6, %middle.block, %for.end %conv16 = sext i32 %6 to i64 call void @qsort(ptr noundef nonnull %vla, i64 noundef %conv16, i64 noundef 4, ptr noundef nonnull @cmp) #7 %18 = load i32, ptr %m, align 4, !tbaa !5 %19 = load i32, ptr %n, align 4, !tbaa !5 %cmp19.not46.not = icmp sgt i32 %18, %19 br i1 %cmp19.not46.not, label %for.body21.preheader, label %for.end26 for.body21.preheader: ; preds = %for.end15 %20 = add i32 %18, 1 %21 = sub i32 %20, %19 %wide.trip.count58 = zext i32 %21 to i64 %22 = add nsw i64 %wide.trip.count58, -1 %min.iters.check64 = icmp ult i64 %22, 8 br i1 %min.iters.check64, label %for.body21.preheader78, label %vector.ph65 vector.ph65: ; preds = %for.body21.preheader %n.vec67 = and i64 %22, -8 %ind.end68 = or i64 %n.vec67, 1 br label %vector.body71 vector.body71: ; preds = %vector.body71, %vector.ph65 %index72 = phi i64 [ 0, %vector.ph65 ], [ %index.next77, %vector.body71 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph65 ], [ %25, %vector.body71 ] %vec.phi73 = phi <4 x i32> [ zeroinitializer, %vector.ph65 ], [ %26, %vector.body71 ] %offset.idx74 = or i64 %index72, 1 %23 = getelementptr inbounds i32, ptr %vla, i64 %offset.idx74 %wide.load75 = load <4 x i32>, ptr %23, align 4, !tbaa !5 %24 = getelementptr inbounds i32, ptr %23, i64 4 %wide.load76 = load <4 x i32>, ptr %24, align 4, !tbaa !5 %25 = add <4 x i32> %wide.load75, %vec.phi %26 = add <4 x i32> %wide.load76, %vec.phi73 %index.next77 = add nuw i64 %index72, 8 %27 = icmp eq i64 %index.next77, %n.vec67 br i1 %27, label %middle.block62, label %vector.body71, !llvm.loop !15 middle.block62: ; preds = %vector.body71 %bin.rdx = add <4 x i32> %26, %25 %28 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n70 = icmp eq i64 %22, %n.vec67 br i1 %cmp.n70, label %for.end26, label %for.body21.preheader78 for.body21.preheader78: ; preds = %for.body21.preheader, %middle.block62 %indvars.iv55.ph = phi i64 [ 1, %for.body21.preheader ], [ %ind.end68, %middle.block62 ] %ans.047.ph = phi i32 [ 0, %for.body21.preheader ], [ %28, %middle.block62 ] br label %for.body21 for.body21: ; preds = %for.body21.preheader78, %for.body21 %indvars.iv55 = phi i64 [ %indvars.iv.next56, %for.body21 ], [ %indvars.iv55.ph, %for.body21.preheader78 ] %ans.047 = phi i32 [ %add, %for.body21 ], [ %ans.047.ph, %for.body21.preheader78 ] %arrayidx23 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv55 %29 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %add = add nsw i32 %29, %ans.047 %indvars.iv.next56 = add nuw nsw i64 %indvars.iv55, 1 %exitcond59.not = icmp eq i64 %indvars.iv.next56, %wide.trip.count58 br i1 %exitcond59.not, label %for.end26, label %for.body21, !llvm.loop !16 for.end26: ; preds = %for.body21, %middle.block62, %for.end15 %ans.0.lcssa = phi i32 [ 0, %for.end15 ], [ %28, %middle.block62 ], [ %add, %for.body21 ] %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) call void @llvm.stackrestore.p0(ptr %5) call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %x) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10, !12, !13} !16 = distinct !{!16, !10, !13, !12}
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <inttypes.h> #include <string.h> #include <math.h> int compare (const void *a, const void *b) { if(*(int64_t *)a - *(int64_t *)b < 0) return 1; if(*(int64_t *)a - *(int64_t *)b > 0) return -1; return 0; } int main (int argc, char const *argv[]) { int64_t N, M, X[(int)1e5]; int64_t sub[(int)1e5 - 1], ans = 0; scanf("%"PRId64"%"PRId64, &N, &M); for (int i = 0; i < M; i++) { scanf("%"PRId64, &X[i]); } qsort(X, M, sizeof(int64_t), compare); for (int i = 0; i < M; i++) { if (i != 0) sub[i - 1] = X[i - 1] - X[i]; } qsort(sub, (M - 1), sizeof(int64_t), compare); for(int i = (N - 1); i < M; i++) { ans += sub[i]; } printf("%"PRId64"\n", ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135125/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135125/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%ld%ld\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.2 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp2.not = icmp ne i64 %0, %1 %. = sext i1 %cmp2.not to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #1 { entry: %N = alloca i64, align 8 %M = alloca i64, align 8 %X = alloca [100000 x i64], align 16 %sub = alloca [99999 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %N) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %M) #6 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %X) #6 call void @llvm.lifetime.start.p0(i64 799992, ptr nonnull %sub) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) %0 = load i64, ptr %M, align 8, !tbaa !5 %cmp53 = icmp sgt i64 %0, 0 br i1 %cmp53, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %.lcssa52 = phi i64 [ %0, %entry ], [ %12, %for.body ] call void @qsort(ptr noundef nonnull %X, i64 noundef %.lcssa52, i64 noundef 8, ptr noundef nonnull @compare) #6 %1 = load i64, ptr %M, align 8, !tbaa !5 %or.cond = icmp slt i64 %1, 2 br i1 %or.cond, label %for.cond.cleanup8, label %for.inc21.preheader for.inc21.preheader: ; preds = %for.cond.cleanup %2 = add i64 %1, -1 %min.iters.check = icmp ult i64 %1, 5 br i1 %min.iters.check, label %for.inc21.preheader96, label %vector.ph vector.ph: ; preds = %for.inc21.preheader %n.vec = and i64 %2, -4 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = or i64 %index, 1 %3 = getelementptr inbounds [100000 x i64], ptr %X, i64 0, i64 %index %wide.load = load <2 x i64>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i64, ptr %3, i64 2 %wide.load75 = load <2 x i64>, ptr %4, align 16, !tbaa !5 %5 = getelementptr inbounds [100000 x i64], ptr %X, i64 0, i64 %offset.idx %wide.load76 = load <2 x i64>, ptr %5, align 8, !tbaa !5 %6 = getelementptr inbounds i64, ptr %5, i64 2 %wide.load77 = load <2 x i64>, ptr %6, align 8, !tbaa !5 %7 = sub nsw <2 x i64> %wide.load, %wide.load76 %8 = sub nsw <2 x i64> %wide.load75, %wide.load77 %9 = getelementptr inbounds [99999 x i64], ptr %sub, i64 0, i64 %index store <2 x i64> %7, ptr %9, align 16, !tbaa !5 %10 = getelementptr inbounds i64, ptr %9, i64 2 store <2 x i64> %8, ptr %10, align 16, !tbaa !5 %index.next = add nuw i64 %index, 4 %11 = icmp eq i64 %index.next, %n.vec br i1 %11, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %2, %n.vec br i1 %cmp.n, label %for.cond.cleanup8, label %for.inc21.preheader96 for.inc21.preheader96: ; preds = %for.inc21.preheader, %middle.block %indvars.iv67.ph = phi i64 [ 1, %for.inc21.preheader ], [ %ind.end, %middle.block ] br label %for.inc21 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i64], ptr %X, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %12 = load i64, ptr %M, align 8, !tbaa !5 %cmp = icmp sgt i64 %12, %indvars.iv.next br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !14 for.cond.cleanup8: ; preds = %for.inc21, %middle.block, %for.cond.cleanup %sub25 = add nsw i64 %1, -1 call void @qsort(ptr noundef nonnull %sub, i64 noundef %sub25, i64 noundef 8, ptr noundef nonnull @compare) #6 %13 = load i64, ptr %N, align 8, !tbaa !5 %14 = load i64, ptr %M, align 8, !tbaa !5 %conv28 = shl i64 %13, 32 %sext = add i64 %conv28, -4294967296 %conv3060 = ashr exact i64 %sext, 32 %cmp3161 = icmp sgt i64 %14, %conv3060 br i1 %cmp3161, label %for.body34.preheader, label %for.cond.cleanup33 for.body34.preheader: ; preds = %for.cond.cleanup8 %15 = sub i64 %14, %conv3060 %min.iters.check80 = icmp ult i64 %15, 4 br i1 %min.iters.check80, label %for.body34.preheader94, label %vector.ph81 vector.ph81: ; preds = %for.body34.preheader %n.vec83 = and i64 %15, -4 %ind.end84 = add i64 %conv3060, %n.vec83 br label %vector.body87 vector.body87: ; preds = %vector.body87, %vector.ph81 %index88 = phi i64 [ 0, %vector.ph81 ], [ %index.next93, %vector.body87 ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph81 ], [ %18, %vector.body87 ] %vec.phi89 = phi <2 x i64> [ zeroinitializer, %vector.ph81 ], [ %19, %vector.body87 ] %offset.idx90 = add i64 %conv3060, %index88 %16 = getelementptr inbounds [99999 x i64], ptr %sub, i64 0, i64 %offset.idx90 %wide.load91 = load <2 x i64>, ptr %16, align 8, !tbaa !5 %17 = getelementptr inbounds i64, ptr %16, i64 2 %wide.load92 = load <2 x i64>, ptr %17, align 8, !tbaa !5 %18 = add <2 x i64> %wide.load91, %vec.phi %19 = add <2 x i64> %wide.load92, %vec.phi89 %index.next93 = add nuw i64 %index88, 4 %20 = icmp eq i64 %index.next93, %n.vec83 br i1 %20, label %middle.block78, label %vector.body87, !llvm.loop !15 middle.block78: ; preds = %vector.body87 %bin.rdx = add <2 x i64> %19, %18 %21 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n86 = icmp eq i64 %15, %n.vec83 br i1 %cmp.n86, label %for.cond.cleanup33, label %for.body34.preheader94 for.body34.preheader94: ; preds = %for.body34.preheader, %middle.block78 %indvars.iv72.ph = phi i64 [ %conv3060, %for.body34.preheader ], [ %ind.end84, %middle.block78 ] %ans.062.ph = phi i64 [ 0, %for.body34.preheader ], [ %21, %middle.block78 ] br label %for.body34 for.inc21: ; preds = %for.inc21.preheader96, %for.inc21 %indvars.iv67 = phi i64 [ %indvars.iv.next68, %for.inc21 ], [ %indvars.iv67.ph, %for.inc21.preheader96 ] %22 = add nsw i64 %indvars.iv67, -1 %arrayidx14 = getelementptr inbounds [100000 x i64], ptr %X, i64 0, i64 %22 %23 = load i64, ptr %arrayidx14, align 8, !tbaa !5 %arrayidx16 = getelementptr inbounds [100000 x i64], ptr %X, i64 0, i64 %indvars.iv67 %24 = load i64, ptr %arrayidx16, align 8, !tbaa !5 %sub17 = sub nsw i64 %23, %24 %arrayidx20 = getelementptr inbounds [99999 x i64], ptr %sub, i64 0, i64 %22 store i64 %sub17, ptr %arrayidx20, align 8, !tbaa !5 %indvars.iv.next68 = add nuw nsw i64 %indvars.iv67, 1 %exitcond.not = icmp eq i64 %indvars.iv.next68, %1 br i1 %exitcond.not, label %for.cond.cleanup8, label %for.inc21, !llvm.loop !16 for.cond.cleanup33: ; preds = %for.body34, %middle.block78, %for.cond.cleanup8 %ans.0.lcssa = phi i64 [ 0, %for.cond.cleanup8 ], [ %21, %middle.block78 ], [ %add, %for.body34 ] %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 799992, ptr nonnull %sub) #6 call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %X) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %M) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %N) #6 ret i32 0 for.body34: ; preds = %for.body34.preheader94, %for.body34 %indvars.iv72 = phi i64 [ %indvars.iv.next73, %for.body34 ], [ %indvars.iv72.ph, %for.body34.preheader94 ] %ans.062 = phi i64 [ %add, %for.body34 ], [ %ans.062.ph, %for.body34.preheader94 ] %arrayidx36 = getelementptr inbounds [99999 x i64], ptr %sub, i64 0, i64 %indvars.iv72 %25 = load i64, ptr %arrayidx36, align 8, !tbaa !5 %add = add nsw i64 %25, %ans.062 %indvars.iv.next73 = add nsw i64 %indvars.iv72, 1 %cmp31 = icmp sgt i64 %14, %indvars.iv.next73 br i1 %cmp31, label %for.body34, label %for.cond.cleanup33, !llvm.loop !17 } ; 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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12, !13} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.peeled.count", i32 1} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !12, !13} !16 = distinct !{!16, !10, !11, !13, !12} !17 = distinct !{!17, !10, !13, !12}
/* AOJ - ITP11_1_d Date: 20181025 Author: Mikoron * ♡mikoiwate351♡ */ #include<stdio.h> #include<string.h> #define DMAX 101 #define TOP 1 #define FRONT 2 #define RIGHT 3 #define LEFT 4 #define BACK 5 #define BOTTOM 6 typedef struct { short suf[7]; } dice_state_t; void show_surface(dice_state_t *dice, short s_suf); void rot_dice(dice_state_t *dice, char command); short search_tow_side(dice_state_t *dice, short s_TOP, short s_FRONT); short compare_dice(dice_state_t *dice1, dice_state_t *dice2); void rot_y(dice_state_t *dice); void rot_x(dice_state_t *dice); void rot_z(dice_state_t *dice); int main(void) { short i, j, dice_num; dice_state_t dice[DMAX]; scanf("%hd", &dice_num); for(i = 0; i < dice_num; i++) { for(j = 1; j < 7; j++) scanf("%hd", &dice[i].suf[j]); } for(i = 0; i < dice_num - 1; i++) { for(j = i + 1; j < dice_num; j++) { if(!compare_dice(&dice[i], &dice[j])) { printf("No\n"); return 0; } } } printf("Yes\n"); return 0; } void show_surface(dice_state_t *dice, short s_suf) { printf("%hd\n", dice->suf[s_suf]); } void rot_dice(dice_state_t *dice, char command) { short i; switch(command) { case 'N': rot_y(dice); break; case 'E': rot_x(dice); break; case 'S': for(i = 0; i < 3; i++) rot_y(dice); break; case 'W': for(i = 0; i < 3; i++) rot_x(dice); break; } } short search_tow_side(dice_state_t *dice, short s_TOP, short s_FRONT) { short flag_TOP = 0, flag_FRONT = 0, i, j; for(i = 0; i < 2; i++) { if(flag_TOP == 1) break; for(j = 0; j < 4; j++) { if(dice->suf[TOP] == s_TOP) flag_TOP = 1; if(flag_TOP == 1) break; if(i == 0) rot_y(dice); else if(i == 1) rot_x(dice); } } for(i = 0; i < 3; i++) { if(dice->suf[FRONT] == s_FRONT) { flag_FRONT = 1; break; } rot_z(dice); } if(flag_TOP == 1 && flag_FRONT == 1) return 0; else return 1; } short compare_dice(dice_state_t *dice1, dice_state_t *dice2) { short i, j, k, l, flag; for(i = 0; i < 2; i++) { for(j = 0; j < 4; j++) { for(k = 0; k < 4; k++) { flag = 1; for(l = 1; l < 7; l++) { if(dice2->suf[l] != dice1->suf[l]) { flag = 0; break; } } if(flag == 1) return 0; rot_z(dice2); } if(i == 0) rot_y(dice2); else if(i == 1) rot_x(dice2); } } return 1; } void rot_y(dice_state_t *dice) { short buf; buf = dice->suf[TOP]; dice->suf[TOP] = dice->suf[FRONT]; // 1 -> 2 dice->suf[FRONT] = dice->suf[BOTTOM]; // 2 -> 6 dice->suf[BOTTOM] = dice->suf[BACK]; // 6 -> 5 dice->suf[BACK] = buf; // 5 -> 1 } void rot_x(dice_state_t *dice) { short buf; buf = dice->suf[TOP]; dice->suf[TOP] = dice->suf[LEFT]; // 1 -> 4 dice->suf[LEFT] = dice->suf[BOTTOM]; // 4 -> 6 dice->suf[BOTTOM] = dice->suf[RIGHT]; // 6 -> 3 dice->suf[RIGHT] = buf; // 3 -> 1 } void rot_z(dice_state_t *dice) { short buf; buf = dice->suf[FRONT]; dice->suf[FRONT] = dice->suf[RIGHT]; // 2 -> 3 dice->suf[RIGHT] = dice->suf[BACK]; // 3 -> 5 dice->suf[BACK] = dice->suf[LEFT]; // 5 -> 4 dice->suf[LEFT] = buf; // 4 -> 2 }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135176/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135176/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.dice_state_t = type { [7 x i16] } @.str = private unnamed_addr constant [4 x i8] c"%hd\00", align 1 @.str.3 = private unnamed_addr constant [5 x i8] c"%hd\0A\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %dice_num = alloca i16, align 2 %dice = alloca [101 x %struct.dice_state_t], align 16 call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %dice_num) #7 call void @llvm.lifetime.start.p0(i64 1414, ptr nonnull %dice) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %dice_num) %0 = load i16, ptr %dice_num, align 2, !tbaa !5 %cmp57 = icmp sgt i16 %0, 0 br i1 %cmp57, label %for.cond3.preheader, label %cleanup for.cond3.preheader: ; preds = %entry, %for.cond3.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond3.preheader ], [ 0, %entry ] %arrayidx = getelementptr inbounds [101 x %struct.dice_state_t], ptr %dice, i64 0, i64 %indvars.iv %arrayidx9 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 1 %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9) %arrayidx9.1 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 2 %call10.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9.1) %arrayidx9.2 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 3 %call10.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9.2) %arrayidx9.3 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 4 %call10.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9.3) %arrayidx9.4 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 5 %call10.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9.4) %arrayidx9.5 = getelementptr inbounds [7 x i16], ptr %arrayidx, i64 0, i64 6 %call10.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i16, ptr %dice_num, align 2, !tbaa !5 %2 = sext i16 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond3.preheader, label %for.cond14.preheader, !llvm.loop !9 for.cond14.preheader: ; preds = %for.cond3.preheader %3 = icmp sgt i16 %1, 1 br i1 %3, label %for.cond22.preheader, label %cleanup for.cond22.preheader: ; preds = %for.cond14.preheader, %for.inc37 %i.162 = phi i16 [ %inc38, %for.inc37 ], [ 0, %for.cond14.preheader ] %idxprom28 = sext i16 %i.162 to i64 %arrayidx29 = getelementptr inbounds [101 x %struct.dice_state_t], ptr %dice, i64 0, i64 %idxprom28 br label %for.cond22 for.cond22: ; preds = %for.cond22.preheader, %for.body27 %j.1.in = phi i16 [ %j.1, %for.body27 ], [ %i.162, %for.cond22.preheader ] %j.1 = add i16 %j.1.in, 1 %4 = load i16, ptr %dice_num, align 2, !tbaa !5 %cmp25 = icmp slt i16 %j.1, %4 br i1 %cmp25, label %for.body27, label %for.inc37 for.body27: ; preds = %for.cond22 %idxprom30 = sext i16 %j.1 to i64 %arrayidx31 = getelementptr inbounds [101 x %struct.dice_state_t], ptr %dice, i64 0, i64 %idxprom30 %call32 = call signext i16 @compare_dice(ptr noundef nonnull %arrayidx29, ptr noundef nonnull %arrayidx31), !range !11 %tobool.not = icmp eq i16 %call32, 0 br i1 %tobool.not, label %cleanup, label %for.cond22, !llvm.loop !12 for.inc37: ; preds = %for.cond22 %inc38 = add i16 %i.162, 1 %conv15 = sext i16 %inc38 to i32 %conv16 = sext i16 %4 to i32 %sub = add nsw i32 %conv16, -1 %cmp17 = icmp sgt i32 %sub, %conv15 br i1 %cmp17, label %for.cond22.preheader, label %cleanup, !llvm.loop !13 cleanup: ; preds = %for.inc37, %for.body27, %for.cond14.preheader, %entry %str.sink = phi ptr [ @str, %entry ], [ @str, %for.cond14.preheader ], [ @str.4, %for.body27 ], [ @str, %for.inc37 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 1414, ptr nonnull %dice) #7 call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %dice_num) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(write, argmem: readwrite, inaccessiblemem: none) uwtable define dso_local signext i16 @compare_dice(ptr nocapture noundef readonly %dice1, ptr nocapture noundef %dice2) local_unnamed_addr #3 { entry: %arrayidx.i = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 2 %arrayidx2.i = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 3 %arrayidx6.i = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 5 %arrayidx10.i = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 4 %arrayidx.i67 = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 1 %arrayidx6.i69 = getelementptr inbounds [7 x i16], ptr %dice2, i64 0, i64 6 %arrayidx20 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 1 %arrayidx20.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 2 %arrayidx20.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 3 %arrayidx20.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 4 %arrayidx20.4 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 5 %arrayidx20.5 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 6 %arrayidx20.1.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 2 %arrayidx20.2.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 3 %arrayidx20.3.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 4 %arrayidx20.4.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 5 %arrayidx20.5.1 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 6 %arrayidx20.1.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 2 %arrayidx20.2.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 3 %arrayidx20.3.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 4 %arrayidx20.4.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 5 %arrayidx20.5.2 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 6 %arrayidx20.1.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 2 %arrayidx20.2.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 3 %arrayidx20.3.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 4 %arrayidx20.4.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 5 %arrayidx20.5.3 = getelementptr inbounds [7 x i16], ptr %dice1, i64 0, i64 6 %.pre91.pre.pre = load i16, ptr %arrayidx.i, align 2, !tbaa !5 %.pre.pre = load i16, ptr %arrayidx.i67, align 2, !tbaa !5 br label %for.cond7.preheader for.cond7.preheader: ; preds = %entry, %if.end28.3 %.pre91 = phi i16 [ %.pre91.pre.pre, %entry ], [ %34, %if.end28.3 ] %0 = phi i16 [ %.pre.pre, %entry ], [ %.pre91, %if.end28.3 ] %j.074 = phi i16 [ 0, %entry ], [ %inc43, %if.end28.3 ] %1 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not = icmp eq i16 %0, %1 br i1 %cmp22.not, label %for.cond12, label %for.cond7.preheader.if.end28_crit_edge for.cond7.preheader.if.end28_crit_edge: ; preds = %for.cond7.preheader %.pre92 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 br label %if.end28 for.cond12: ; preds = %for.cond7.preheader %2 = load i16, ptr %arrayidx20.1, align 2, !tbaa !5 %cmp22.not.1 = icmp eq i16 %.pre91, %2 %.pre93 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 br i1 %cmp22.not.1, label %for.cond12.1, label %if.end28 for.cond12.1: ; preds = %for.cond12 %3 = load i16, ptr %arrayidx20.2, align 2, !tbaa !5 %cmp22.not.2 = icmp eq i16 %.pre93, %3 br i1 %cmp22.not.2, label %for.cond12.2, label %if.end28 for.cond12.2: ; preds = %for.cond12.1 %4 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 %5 = load i16, ptr %arrayidx20.3, align 2, !tbaa !5 %cmp22.not.3 = icmp eq i16 %4, %5 br i1 %cmp22.not.3, label %for.cond12.3, label %if.end28 for.cond12.3: ; preds = %for.cond12.2 %6 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5 %7 = load i16, ptr %arrayidx20.4, align 2, !tbaa !5 %cmp22.not.4 = icmp eq i16 %6, %7 br i1 %cmp22.not.4, label %for.cond12.4, label %if.end28 for.cond12.4: ; preds = %for.cond12.3 %8 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %9 = load i16, ptr %arrayidx20.5, align 2, !tbaa !5 %cmp22.not.5 = icmp eq i16 %8, %9 br i1 %cmp22.not.5, label %cleanup, label %if.end28 if.end28: ; preds = %for.cond7.preheader.if.end28_crit_edge, %for.cond12.4, %for.cond12.3, %for.cond12.2, %for.cond12.1, %for.cond12 %10 = phi i16 [ %.pre92, %for.cond7.preheader.if.end28_crit_edge ], [ %.pre93, %for.cond12.4 ], [ %.pre93, %for.cond12.3 ], [ %.pre93, %for.cond12.2 ], [ %.pre93, %for.cond12.1 ], [ %.pre93, %for.cond12 ] store i16 %10, ptr %arrayidx.i, align 2, !tbaa !5 %11 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %11, ptr %arrayidx2.i, align 2, !tbaa !5 %12 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %12, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %.pre91, ptr %arrayidx10.i, align 2, !tbaa !5 %13 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.180 = icmp eq i16 %0, %13 br i1 %cmp22.not.180, label %for.cond12.181, label %if.end28.1 for.cond12.181: ; preds = %if.end28 %14 = load i16, ptr %arrayidx20.1.1, align 2, !tbaa !5 %cmp22.not.1.1 = icmp eq i16 %10, %14 br i1 %cmp22.not.1.1, label %for.cond12.1.1, label %if.end28.1 for.cond12.1.1: ; preds = %for.cond12.181 %15 = load i16, ptr %arrayidx20.2.1, align 2, !tbaa !5 %cmp22.not.2.1 = icmp eq i16 %11, %15 br i1 %cmp22.not.2.1, label %for.cond12.2.1, label %if.end28.1 for.cond12.2.1: ; preds = %for.cond12.1.1 %16 = load i16, ptr %arrayidx20.3.1, align 2, !tbaa !5 %cmp22.not.3.1 = icmp eq i16 %.pre91, %16 br i1 %cmp22.not.3.1, label %for.cond12.3.1, label %if.end28.1 for.cond12.3.1: ; preds = %for.cond12.2.1 %17 = load i16, ptr %arrayidx20.4.1, align 2, !tbaa !5 %cmp22.not.4.1 = icmp eq i16 %12, %17 br i1 %cmp22.not.4.1, label %for.cond12.4.1, label %if.end28.1 for.cond12.4.1: ; preds = %for.cond12.3.1 %18 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %19 = load i16, ptr %arrayidx20.5.1, align 2, !tbaa !5 %cmp22.not.5.1 = icmp eq i16 %18, %19 br i1 %cmp22.not.5.1, label %cleanup, label %if.end28.1 if.end28.1: ; preds = %for.cond12.4.1, %for.cond12.3.1, %for.cond12.2.1, %for.cond12.1.1, %for.cond12.181, %if.end28 store i16 %11, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %12, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %.pre91, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %10, ptr %arrayidx10.i, align 2, !tbaa !5 %20 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.284 = icmp eq i16 %0, %20 br i1 %cmp22.not.284, label %for.cond12.285, label %if.end28.2 for.cond12.285: ; preds = %if.end28.1 %21 = load i16, ptr %arrayidx20.1.2, align 2, !tbaa !5 %cmp22.not.1.2 = icmp eq i16 %11, %21 br i1 %cmp22.not.1.2, label %for.cond12.1.2, label %if.end28.2 for.cond12.1.2: ; preds = %for.cond12.285 %22 = load i16, ptr %arrayidx20.2.2, align 2, !tbaa !5 %cmp22.not.2.2 = icmp eq i16 %12, %22 br i1 %cmp22.not.2.2, label %for.cond12.2.2, label %if.end28.2 for.cond12.2.2: ; preds = %for.cond12.1.2 %23 = load i16, ptr %arrayidx20.3.2, align 2, !tbaa !5 %cmp22.not.3.2 = icmp eq i16 %10, %23 br i1 %cmp22.not.3.2, label %for.cond12.3.2, label %if.end28.2 for.cond12.3.2: ; preds = %for.cond12.2.2 %24 = load i16, ptr %arrayidx20.4.2, align 2, !tbaa !5 %cmp22.not.4.2 = icmp eq i16 %.pre91, %24 br i1 %cmp22.not.4.2, label %for.cond12.4.2, label %if.end28.2 for.cond12.4.2: ; preds = %for.cond12.3.2 %25 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %26 = load i16, ptr %arrayidx20.5.2, align 2, !tbaa !5 %cmp22.not.5.2 = icmp eq i16 %25, %26 br i1 %cmp22.not.5.2, label %cleanup, label %if.end28.2 if.end28.2: ; preds = %for.cond12.4.2, %for.cond12.3.2, %for.cond12.2.2, %for.cond12.1.2, %for.cond12.285, %if.end28.1 store i16 %12, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %.pre91, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %10, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %11, ptr %arrayidx10.i, align 2, !tbaa !5 %27 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.388 = icmp eq i16 %0, %27 br i1 %cmp22.not.388, label %for.cond12.389, label %if.end28.3 for.cond12.389: ; preds = %if.end28.2 %28 = load i16, ptr %arrayidx20.1.3, align 2, !tbaa !5 %cmp22.not.1.3 = icmp eq i16 %12, %28 br i1 %cmp22.not.1.3, label %for.cond12.1.3, label %if.end28.3 for.cond12.1.3: ; preds = %for.cond12.389 %29 = load i16, ptr %arrayidx20.2.3, align 2, !tbaa !5 %cmp22.not.2.3 = icmp eq i16 %.pre91, %29 br i1 %cmp22.not.2.3, label %for.cond12.2.3, label %if.end28.3 for.cond12.2.3: ; preds = %for.cond12.1.3 %30 = load i16, ptr %arrayidx20.3.3, align 2, !tbaa !5 %cmp22.not.3.3 = icmp eq i16 %11, %30 br i1 %cmp22.not.3.3, label %for.cond12.3.3, label %if.end28.3 for.cond12.3.3: ; preds = %for.cond12.2.3 %31 = load i16, ptr %arrayidx20.4.3, align 2, !tbaa !5 %cmp22.not.4.3 = icmp eq i16 %10, %31 br i1 %cmp22.not.4.3, label %for.cond12.4.3, label %if.end28.3 for.cond12.4.3: ; preds = %for.cond12.3.3 %32 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %33 = load i16, ptr %arrayidx20.5.3, align 2, !tbaa !5 %cmp22.not.5.3 = icmp eq i16 %32, %33 br i1 %cmp22.not.5.3, label %cleanup, label %if.end28.3 if.end28.3: ; preds = %for.cond12.4.3, %for.cond12.3.3, %for.cond12.2.3, %for.cond12.1.3, %for.cond12.389, %if.end28.2 store i16 %.pre91, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %10, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %11, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %12, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %.pre91, ptr %arrayidx.i67, align 2, !tbaa !5 %34 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 store i16 %34, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %11, ptr %arrayidx6.i69, align 2, !tbaa !5 store i16 %0, ptr %arrayidx6.i, align 2, !tbaa !5 %inc43 = add nuw nsw i16 %j.074, 1 %exitcond.not = icmp eq i16 %inc43, 4 br i1 %exitcond.not, label %for.cond7.preheader.1, label %for.cond7.preheader, !llvm.loop !14 for.cond7.preheader.1: ; preds = %if.end28.3, %if.end28.3.1 %35 = phi i16 [ %47, %if.end28.3.1 ], [ %.pre91, %if.end28.3 ] %j.074.1 = phi i16 [ %inc43.1, %if.end28.3.1 ], [ 0, %if.end28.3 ] %36 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.1103 = icmp eq i16 %35, %36 br i1 %cmp22.not.1103, label %for.cond12.1105, label %for.cond7.preheader.if.end28_crit_edge.1 for.cond7.preheader.if.end28_crit_edge.1: ; preds = %for.cond7.preheader.1 %.pre92.1 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 br label %if.end28.1114 for.cond12.1105: ; preds = %for.cond7.preheader.1 %37 = load i16, ptr %arrayidx20.1, align 2, !tbaa !5 %cmp22.not.1.1104 = icmp eq i16 %34, %37 %.pre93.1 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 br i1 %cmp22.not.1.1104, label %for.cond12.1.1107, label %if.end28.1114 for.cond12.1.1107: ; preds = %for.cond12.1105 %38 = load i16, ptr %arrayidx20.2, align 2, !tbaa !5 %cmp22.not.2.1106 = icmp eq i16 %.pre93.1, %38 br i1 %cmp22.not.2.1106, label %for.cond12.2.1109, label %if.end28.1114 for.cond12.2.1109: ; preds = %for.cond12.1.1107 %39 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 %40 = load i16, ptr %arrayidx20.3, align 2, !tbaa !5 %cmp22.not.3.1108 = icmp eq i16 %39, %40 br i1 %cmp22.not.3.1108, label %for.cond12.3.1111, label %if.end28.1114 for.cond12.3.1111: ; preds = %for.cond12.2.1109 %41 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5 %42 = load i16, ptr %arrayidx20.4, align 2, !tbaa !5 %cmp22.not.4.1110 = icmp eq i16 %41, %42 br i1 %cmp22.not.4.1110, label %for.cond12.4.1113, label %if.end28.1114 for.cond12.4.1113: ; preds = %for.cond12.3.1111 %43 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %44 = load i16, ptr %arrayidx20.5, align 2, !tbaa !5 %cmp22.not.5.1112 = icmp eq i16 %43, %44 br i1 %cmp22.not.5.1112, label %cleanup, label %if.end28.1114 if.end28.1114: ; preds = %for.cond12.4.1113, %for.cond12.3.1111, %for.cond12.2.1109, %for.cond12.1.1107, %for.cond12.1105, %for.cond7.preheader.if.end28_crit_edge.1 %45 = phi i16 [ %.pre92.1, %for.cond7.preheader.if.end28_crit_edge.1 ], [ %.pre93.1, %for.cond12.4.1113 ], [ %.pre93.1, %for.cond12.3.1111 ], [ %.pre93.1, %for.cond12.2.1109 ], [ %.pre93.1, %for.cond12.1.1107 ], [ %.pre93.1, %for.cond12.1105 ] store i16 %45, ptr %arrayidx.i, align 2, !tbaa !5 %46 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %46, ptr %arrayidx2.i, align 2, !tbaa !5 %47 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %47, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %34, ptr %arrayidx10.i, align 2, !tbaa !5 %48 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.180.1 = icmp eq i16 %35, %48 br i1 %cmp22.not.180.1, label %for.cond12.181.1, label %if.end28.1.1 for.cond12.181.1: ; preds = %if.end28.1114 %49 = load i16, ptr %arrayidx20.1.1, align 2, !tbaa !5 %cmp22.not.1.1.1 = icmp eq i16 %45, %49 br i1 %cmp22.not.1.1.1, label %for.cond12.1.1.1, label %if.end28.1.1 for.cond12.1.1.1: ; preds = %for.cond12.181.1 %50 = load i16, ptr %arrayidx20.2.1, align 2, !tbaa !5 %cmp22.not.2.1.1 = icmp eq i16 %46, %50 br i1 %cmp22.not.2.1.1, label %for.cond12.2.1.1, label %if.end28.1.1 for.cond12.2.1.1: ; preds = %for.cond12.1.1.1 %51 = load i16, ptr %arrayidx20.3.1, align 2, !tbaa !5 %cmp22.not.3.1.1 = icmp eq i16 %34, %51 br i1 %cmp22.not.3.1.1, label %for.cond12.3.1.1, label %if.end28.1.1 for.cond12.3.1.1: ; preds = %for.cond12.2.1.1 %52 = load i16, ptr %arrayidx20.4.1, align 2, !tbaa !5 %cmp22.not.4.1.1 = icmp eq i16 %47, %52 br i1 %cmp22.not.4.1.1, label %for.cond12.4.1.1, label %if.end28.1.1 for.cond12.4.1.1: ; preds = %for.cond12.3.1.1 %53 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %54 = load i16, ptr %arrayidx20.5.1, align 2, !tbaa !5 %cmp22.not.5.1.1 = icmp eq i16 %53, %54 br i1 %cmp22.not.5.1.1, label %cleanup, label %if.end28.1.1 if.end28.1.1: ; preds = %for.cond12.4.1.1, %for.cond12.3.1.1, %for.cond12.2.1.1, %for.cond12.1.1.1, %for.cond12.181.1, %if.end28.1114 store i16 %46, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %47, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %34, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %45, ptr %arrayidx10.i, align 2, !tbaa !5 %55 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.284.1 = icmp eq i16 %35, %55 br i1 %cmp22.not.284.1, label %for.cond12.285.1, label %if.end28.2.1 for.cond12.285.1: ; preds = %if.end28.1.1 %56 = load i16, ptr %arrayidx20.1.2, align 2, !tbaa !5 %cmp22.not.1.2.1 = icmp eq i16 %46, %56 br i1 %cmp22.not.1.2.1, label %for.cond12.1.2.1, label %if.end28.2.1 for.cond12.1.2.1: ; preds = %for.cond12.285.1 %57 = load i16, ptr %arrayidx20.2.2, align 2, !tbaa !5 %cmp22.not.2.2.1 = icmp eq i16 %47, %57 br i1 %cmp22.not.2.2.1, label %for.cond12.2.2.1, label %if.end28.2.1 for.cond12.2.2.1: ; preds = %for.cond12.1.2.1 %58 = load i16, ptr %arrayidx20.3.2, align 2, !tbaa !5 %cmp22.not.3.2.1 = icmp eq i16 %45, %58 br i1 %cmp22.not.3.2.1, label %for.cond12.3.2.1, label %if.end28.2.1 for.cond12.3.2.1: ; preds = %for.cond12.2.2.1 %59 = load i16, ptr %arrayidx20.4.2, align 2, !tbaa !5 %cmp22.not.4.2.1 = icmp eq i16 %34, %59 br i1 %cmp22.not.4.2.1, label %for.cond12.4.2.1, label %if.end28.2.1 for.cond12.4.2.1: ; preds = %for.cond12.3.2.1 %60 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %61 = load i16, ptr %arrayidx20.5.2, align 2, !tbaa !5 %cmp22.not.5.2.1 = icmp eq i16 %60, %61 br i1 %cmp22.not.5.2.1, label %cleanup, label %if.end28.2.1 if.end28.2.1: ; preds = %for.cond12.4.2.1, %for.cond12.3.2.1, %for.cond12.2.2.1, %for.cond12.1.2.1, %for.cond12.285.1, %if.end28.1.1 store i16 %47, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %34, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %45, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %46, ptr %arrayidx10.i, align 2, !tbaa !5 %62 = load i16, ptr %arrayidx20, align 2, !tbaa !5 %cmp22.not.388.1 = icmp eq i16 %35, %62 br i1 %cmp22.not.388.1, label %for.cond12.389.1, label %if.end28.3.1 for.cond12.389.1: ; preds = %if.end28.2.1 %63 = load i16, ptr %arrayidx20.1.3, align 2, !tbaa !5 %cmp22.not.1.3.1 = icmp eq i16 %47, %63 br i1 %cmp22.not.1.3.1, label %for.cond12.1.3.1, label %if.end28.3.1 for.cond12.1.3.1: ; preds = %for.cond12.389.1 %64 = load i16, ptr %arrayidx20.2.3, align 2, !tbaa !5 %cmp22.not.2.3.1 = icmp eq i16 %34, %64 br i1 %cmp22.not.2.3.1, label %for.cond12.2.3.1, label %if.end28.3.1 for.cond12.2.3.1: ; preds = %for.cond12.1.3.1 %65 = load i16, ptr %arrayidx20.3.3, align 2, !tbaa !5 %cmp22.not.3.3.1 = icmp eq i16 %46, %65 br i1 %cmp22.not.3.3.1, label %for.cond12.3.3.1, label %if.end28.3.1 for.cond12.3.3.1: ; preds = %for.cond12.2.3.1 %66 = load i16, ptr %arrayidx20.4.3, align 2, !tbaa !5 %cmp22.not.4.3.1 = icmp eq i16 %45, %66 br i1 %cmp22.not.4.3.1, label %for.cond12.4.3.1, label %if.end28.3.1 for.cond12.4.3.1: ; preds = %for.cond12.3.3.1 %67 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 %68 = load i16, ptr %arrayidx20.5.3, align 2, !tbaa !5 %cmp22.not.5.3.1 = icmp eq i16 %67, %68 br i1 %cmp22.not.5.3.1, label %cleanup, label %if.end28.3.1 if.end28.3.1: ; preds = %for.cond12.4.3.1, %for.cond12.3.3.1, %for.cond12.2.3.1, %for.cond12.1.3.1, %for.cond12.389.1, %if.end28.2.1 store i16 %34, ptr %arrayidx.i, align 2, !tbaa !5 store i16 %45, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %46, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %47, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %47, ptr %arrayidx.i67, align 2, !tbaa !5 %69 = load i16, ptr %arrayidx6.i69, align 2, !tbaa !5 store i16 %69, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %45, ptr %arrayidx6.i69, align 2, !tbaa !5 store i16 %35, ptr %arrayidx2.i, align 2, !tbaa !5 %inc43.1 = add nuw nsw i16 %j.074.1, 1 %exitcond.not.1 = icmp eq i16 %inc43.1, 4 br i1 %exitcond.not.1, label %cleanup, label %for.cond7.preheader.1, !llvm.loop !14 cleanup: ; preds = %for.cond12.4, %for.cond12.4.1, %for.cond12.4.2, %for.cond12.4.3, %for.cond12.4.1113, %for.cond12.4.1.1, %for.cond12.4.2.1, %for.cond12.4.3.1, %if.end28.3.1 %retval.0 = phi i16 [ 1, %if.end28.3.1 ], [ 0, %for.cond12.4.3.1 ], [ 0, %for.cond12.4.2.1 ], [ 0, %for.cond12.4.1.1 ], [ 0, %for.cond12.4.1113 ], [ 0, %for.cond12.4.3 ], [ 0, %for.cond12.4.2 ], [ 0, %for.cond12.4.1 ], [ 0, %for.cond12.4 ] ret i16 %retval.0 } ; 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 void @show_surface(ptr nocapture noundef readonly %dice, i16 noundef signext %s_suf) local_unnamed_addr #0 { entry: %idxprom = sext i16 %s_suf to i64 %arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 %idxprom %0 = load i16, ptr %arrayidx, align 2, !tbaa !5 %conv = sext i16 %0 to i32 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %conv) ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rot_dice(ptr nocapture noundef %dice, i8 noundef signext %command) local_unnamed_addr #4 { entry: %conv = sext i8 %command to i32 switch i32 %conv, label %sw.epilog [ i32 78, label %sw.bb i32 69, label %sw.bb1 i32 83, label %for.cond.preheader i32 87, label %for.cond6.preheader ] for.cond6.preheader: ; preds = %entry %arrayidx.i28 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %arrayidx2.i29 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4 %arrayidx6.i30 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %arrayidx10.i31 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3 %arrayidx.i28.promoted = load i16, ptr %arrayidx.i28, align 2, !tbaa !5 %arrayidx2.i29.promoted = load i16, ptr %arrayidx2.i29, align 2, !tbaa !5 %arrayidx6.i30.promoted = load i16, ptr %arrayidx6.i30, align 2, !tbaa !5 %arrayidx10.i31.promoted = load i16, ptr %arrayidx10.i31, align 2, !tbaa !5 store i16 %arrayidx10.i31.promoted, ptr %arrayidx.i28, align 2, !tbaa !5 store i16 %arrayidx.i28.promoted, ptr %arrayidx2.i29, align 2, !tbaa !5 store i16 %arrayidx2.i29.promoted, ptr %arrayidx6.i30, align 2, !tbaa !5 store i16 %arrayidx6.i30.promoted, ptr %arrayidx10.i31, align 2, !tbaa !5 br label %sw.epilog for.cond.preheader: ; preds = %entry %arrayidx.i24 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %arrayidx2.i25 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2 %arrayidx6.i26 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %arrayidx10.i27 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5 %arrayidx.i24.promoted = load i16, ptr %arrayidx.i24, align 2, !tbaa !5 %arrayidx2.i25.promoted = load i16, ptr %arrayidx2.i25, align 2, !tbaa !5 %arrayidx6.i26.promoted = load i16, ptr %arrayidx6.i26, align 2, !tbaa !5 %arrayidx10.i27.promoted = load i16, ptr %arrayidx10.i27, align 2, !tbaa !5 store i16 %arrayidx10.i27.promoted, ptr %arrayidx.i24, align 2, !tbaa !5 store i16 %arrayidx.i24.promoted, ptr %arrayidx2.i25, align 2, !tbaa !5 store i16 %arrayidx2.i25.promoted, ptr %arrayidx6.i26, align 2, !tbaa !5 store i16 %arrayidx6.i26.promoted, ptr %arrayidx10.i27, align 2, !tbaa !5 br label %sw.epilog sw.bb: ; preds = %entry %arrayidx.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %0 = load i16, ptr %arrayidx.i, align 2, !tbaa !5 %arrayidx2.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2 %1 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %1, ptr %arrayidx.i, align 2, !tbaa !5 %arrayidx6.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %2 = load i16, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %2, ptr %arrayidx2.i, align 2, !tbaa !5 %arrayidx10.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5 %3 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %3, ptr %arrayidx6.i, align 2, !tbaa !5 store i16 %0, ptr %arrayidx10.i, align 2, !tbaa !5 br label %sw.epilog sw.bb1: ; preds = %entry %arrayidx.i20 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %4 = load i16, ptr %arrayidx.i20, align 2, !tbaa !5 %arrayidx2.i21 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4 %5 = load i16, ptr %arrayidx2.i21, align 2, !tbaa !5 store i16 %5, ptr %arrayidx.i20, align 2, !tbaa !5 %arrayidx6.i22 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %6 = load i16, ptr %arrayidx6.i22, align 2, !tbaa !5 store i16 %6, ptr %arrayidx2.i21, align 2, !tbaa !5 %arrayidx10.i23 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3 %7 = load i16, ptr %arrayidx10.i23, align 2, !tbaa !5 store i16 %7, ptr %arrayidx6.i22, align 2, !tbaa !5 store i16 %4, ptr %arrayidx10.i23, align 2, !tbaa !5 br label %sw.epilog sw.epilog: ; preds = %for.cond6.preheader, %for.cond.preheader, %entry, %sw.bb1, %sw.bb ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rot_y(ptr nocapture noundef %dice) local_unnamed_addr #4 { entry: %arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %0 = load i16, ptr %arrayidx, align 2, !tbaa !5 %arrayidx2 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2 %1 = load i16, ptr %arrayidx2, align 2, !tbaa !5 store i16 %1, ptr %arrayidx, align 2, !tbaa !5 %arrayidx6 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %2 = load i16, ptr %arrayidx6, align 2, !tbaa !5 store i16 %2, ptr %arrayidx2, align 2, !tbaa !5 %arrayidx10 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5 %3 = load i16, ptr %arrayidx10, align 2, !tbaa !5 store i16 %3, ptr %arrayidx6, align 2, !tbaa !5 store i16 %0, ptr %arrayidx10, align 2, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rot_x(ptr nocapture noundef %dice) local_unnamed_addr #4 { entry: %arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %0 = load i16, ptr %arrayidx, align 2, !tbaa !5 %arrayidx2 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4 %1 = load i16, ptr %arrayidx2, align 2, !tbaa !5 store i16 %1, ptr %arrayidx, align 2, !tbaa !5 %arrayidx6 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %2 = load i16, ptr %arrayidx6, align 2, !tbaa !5 store i16 %2, ptr %arrayidx2, align 2, !tbaa !5 %arrayidx10 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3 %3 = load i16, ptr %arrayidx10, align 2, !tbaa !5 store i16 %3, ptr %arrayidx6, align 2, !tbaa !5 store i16 %0, ptr %arrayidx10, align 2, !tbaa !5 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local signext i16 @search_tow_side(ptr nocapture noundef %dice, i16 noundef signext %s_TOP, i16 noundef signext %s_FRONT) local_unnamed_addr #5 { entry: %arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 1 %arrayidx2.i75 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 4 %arrayidx6.i76 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 6 %arrayidx10.i77 = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 3 %arrayidx2.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2 %arrayidx10.i = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 5 %arrayidx.promoted99 = load i16, ptr %arrayidx, align 2, !tbaa !5 %cmp12.us = icmp eq i16 %arrayidx.promoted99, %s_TOP br i1 %cmp12.us, label %for.inc31.thread, label %if.end20.us if.end20.us: ; preds = %entry %0 = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %0, ptr %arrayidx, align 2, !tbaa !5 %1 = load i16, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %1, ptr %arrayidx2.i, align 2, !tbaa !5 %2 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %2, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx10.i, align 2, !tbaa !5 %cmp12.us.1 = icmp eq i16 %0, %s_TOP br i1 %cmp12.us.1, label %for.inc31.thread, label %if.end20.us.1 if.end20.us.1: ; preds = %if.end20.us store i16 %1, ptr %arrayidx, align 2, !tbaa !5 store i16 %2, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %0, ptr %arrayidx10.i, align 2, !tbaa !5 %cmp12.us.2 = icmp eq i16 %1, %s_TOP br i1 %cmp12.us.2, label %for.inc31.thread, label %if.end20.us.2 if.end20.us.2: ; preds = %if.end20.us.1 store i16 %2, ptr %arrayidx, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %0, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %1, ptr %arrayidx10.i, align 2, !tbaa !5 %cmp12.us.3 = icmp eq i16 %2, %s_TOP br i1 %cmp12.us.3, label %for.inc31.thread, label %if.end20.us.3 if.end20.us.3: ; preds = %if.end20.us.2 store i16 %arrayidx.promoted99, ptr %arrayidx, align 2, !tbaa !5 store i16 %0, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %1, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %2, ptr %arrayidx10.i, align 2, !tbaa !5 %cmp12.us89 = icmp eq i16 %arrayidx.promoted99, %s_TOP br i1 %cmp12.us89, label %for.inc31.thread, label %if.end20.us90 if.end20.us90: ; preds = %if.end20.us.3 %3 = load i16, ptr %arrayidx2.i75, align 2, !tbaa !5 store i16 %3, ptr %arrayidx, align 2, !tbaa !5 %4 = load i16, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %4, ptr %arrayidx2.i75, align 2, !tbaa !5 %5 = load i16, ptr %arrayidx10.i77, align 2, !tbaa !5 store i16 %5, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx10.i77, align 2, !tbaa !5 %cmp12.us89.1 = icmp eq i16 %3, %s_TOP br i1 %cmp12.us89.1, label %for.inc31.thread, label %if.end20.us90.1 if.end20.us90.1: ; preds = %if.end20.us90 store i16 %4, ptr %arrayidx, align 2, !tbaa !5 store i16 %5, ptr %arrayidx2.i75, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %3, ptr %arrayidx10.i77, align 2, !tbaa !5 %cmp12.us89.2 = icmp eq i16 %4, %s_TOP br i1 %cmp12.us89.2, label %for.inc31.thread, label %if.end20.us90.2 if.end20.us90.2: ; preds = %if.end20.us90.1 store i16 %5, ptr %arrayidx, align 2, !tbaa !5 store i16 %arrayidx.promoted99, ptr %arrayidx2.i75, align 2, !tbaa !5 store i16 %3, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %4, ptr %arrayidx10.i77, align 2, !tbaa !5 %cmp12.us89.3 = icmp eq i16 %5, %s_TOP br i1 %cmp12.us89.3, label %for.inc31.thread, label %if.end20.us90.3 if.end20.us90.3: ; preds = %if.end20.us90.2 store i16 %arrayidx.promoted99, ptr %arrayidx, align 2, !tbaa !5 store i16 %3, ptr %arrayidx2.i75, align 2, !tbaa !5 store i16 %4, ptr %arrayidx6.i76, align 2, !tbaa !5 store i16 %5, ptr %arrayidx10.i77, align 2, !tbaa !5 br label %for.inc31.thread for.inc31.thread: ; preds = %entry, %if.end20.us, %if.end20.us.1, %if.end20.us.2, %if.end20.us.3, %if.end20.us90, %if.end20.us90.1, %if.end20.us90.2, %if.end20.us90.3 %cmp3109 = phi i16 [ 0, %if.end20.us90.3 ], [ 1, %if.end20.us90.2 ], [ 1, %if.end20.us90.1 ], [ 1, %if.end20.us90 ], [ 1, %if.end20.us.3 ], [ 1, %if.end20.us.2 ], [ 1, %if.end20.us.1 ], [ 1, %if.end20.us ], [ 1, %entry ] %arrayidx40.promoted = load i16, ptr %arrayidx2.i, align 2, !tbaa !5 %cmp43 = icmp eq i16 %arrayidx40.promoted, %s_FRONT br i1 %cmp43, label %for.end49, label %if.end46 if.end46: ; preds = %for.inc31.thread %6 = load i16, ptr %arrayidx10.i77, align 2, !tbaa !5 store i16 %6, ptr %arrayidx2.i, align 2, !tbaa !5 %7 = load i16, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %7, ptr %arrayidx10.i77, align 2, !tbaa !5 %8 = load i16, ptr %arrayidx2.i75, align 2, !tbaa !5 store i16 %8, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %arrayidx40.promoted, ptr %arrayidx2.i75, align 2, !tbaa !5 %cmp43.1 = icmp eq i16 %6, %s_FRONT br i1 %cmp43.1, label %for.end49, label %if.end46.1 if.end46.1: ; preds = %if.end46 store i16 %7, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %8, ptr %arrayidx10.i77, align 2, !tbaa !5 store i16 %arrayidx40.promoted, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %6, ptr %arrayidx2.i75, align 2, !tbaa !5 %cmp43.2 = icmp eq i16 %7, %s_FRONT br i1 %cmp43.2, label %for.end49, label %if.end46.2 if.end46.2: ; preds = %if.end46.1 store i16 %8, ptr %arrayidx2.i, align 2, !tbaa !5 store i16 %arrayidx40.promoted, ptr %arrayidx10.i77, align 2, !tbaa !5 store i16 %6, ptr %arrayidx10.i, align 2, !tbaa !5 store i16 %7, ptr %arrayidx2.i75, align 2, !tbaa !5 br label %for.end49 for.end49: ; preds = %if.end46.2, %if.end46.1, %if.end46, %for.inc31.thread %cmp36.lcssa = phi i16 [ 1, %for.inc31.thread ], [ 1, %if.end46 ], [ 1, %if.end46.1 ], [ 0, %if.end46.2 ] %or.cond = and i16 %cmp3109, %cmp36.lcssa %not.or.cond = xor i16 %or.cond, 1 ret i16 %not.or.cond } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rot_z(ptr nocapture noundef %dice) local_unnamed_addr #4 { entry: %arrayidx = getelementptr inbounds [7 x i16], ptr %dice, i64 0, i64 2 %0 = load <4 x i16>, ptr %arrayidx, align 2, !tbaa !5 %1 = shufflevector <4 x i16> %0, <4 x i16> poison, <4 x i32> <i32 1, i32 3, i32 0, i32 2> store <4 x i16> %1, ptr %arrayidx, align 2, !tbaa !5 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(write, argmem: readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree 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 #6 = { nofree nounwind } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"short", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{i16 0, i16 2} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
//============================================================================ //dice1 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> //---------------------------------------------------------------------------- enum {pos1, pos2, pos3, pos4, pos5, pos6, posEND}; enum {posT, posS, posE, posW, posN, posB}; //---------------------------------------------------------------------------- typedef struct{ int Dice[posEND]; //int E; //int W; //int S; //int T; //int B; }TCycoro; //---------------------------------------------------------------------------- char Cmd[101]; //---------------------------------------------------------------------------- void CyRot(TCycoro *cyc, char dir) { int S, cometop, betop; switch(dir){ case 'N': cometop=posN, betop=posS; break; case 'E': cometop=posE, betop=posW; break; case 'W': cometop=posW, betop=posE; break; case 'S': cometop=posS, betop=posN; break; default: return; } S=cyc->Dice[cometop]; cyc->Dice[cometop] = cyc->Dice[posT]; cyc->Dice[posT] = cyc->Dice[betop]; cyc->Dice[betop] = cyc->Dice[posB]; cyc->Dice[posB]=S; } //---------------------------------------------------------------------------- void CyRoll(TCycoro *cyc, char dir) { int S; if (dir){//left S=cyc->Dice[posN]; cyc->Dice[posN] = cyc->Dice[posE]; cyc->Dice[posE] = cyc->Dice[posS]; cyc->Dice[posS] = cyc->Dice[posW]; cyc->Dice[posW]=S; }else{ S=cyc->Dice[posN]; cyc->Dice[posN] = cyc->Dice[posW]; cyc->Dice[posW] = cyc->Dice[posS]; cyc->Dice[posS] = cyc->Dice[posE]; cyc->Dice[posE]=S; } } //---------------------------------------------------------------------------- int fortop(TCycoro *cyc, int pos) { int i; for (i=0; i<posEND; i++) if (cyc->Dice[i]==pos) break; if (i==posEND) return 0; switch(i){ case posN: CyRot(cyc, 'S'); break; case posE: CyRot(cyc, 'W'); break; case posW: CyRot(cyc, 'E'); break; case posS: CyRot(cyc, 'N'); break; case posB: CyRot(cyc, 'S'); CyRot(cyc, 'S'); break; } return 1; } //---------------------------------------------------------------------------- int topval(TCycoro *cyc) { int i,j,k,l,S,value[posEND],cmp[posEND]; memcpy(&value, &cyc->Dice, sizeof(value)); /*for (k=0, l=posEND; k<posEND-1; k++, l--) for (i=0,j=1; j<l; i++, j++){ if (value[i]>value[j]){ S=value[i]; value[i]=value[j]; value[j]=S; } }*/ //for (i=0; i<posEND; i++) // printf("%d: %d, %d\n", i, cyc->Dice[i], value[i]); memset(&cmp, 0, sizeof(cmp)); for (i=0; i<posEND; i++) for (j=0; j<posEND; j++){ if (value[i]==value[j]) cmp[i]++; } //for (i=0; i<posEND; i++) // printf("%d: val %d, %d\n", i, value[i], cmp[i]); for (i=0; i<posEND; i++) if (cmp[i]==1) return value[i]; return *value; } //---------------------------------------------------------------------------- void prndice(TCycoro *cyc, char dir) { printf("dir:%c, N=%d, E=%d, W=%d, S=%d, T=%d, B=%d\n", dir, cyc->Dice[posN], cyc->Dice[posE], cyc->Dice[posW], cyc->Dice[posS], cyc->Dice[posT], cyc->Dice[posB]); } //---------------------------------------------------------------------------- int rgtside(int t, int f) { switch(t){ case pos1: switch(f){ case pos2: return pos3; case pos3: return pos5; case pos5: return pos4; case pos4: return pos2; } break; case pos2: switch(f){ case pos1: return pos4; case pos3: return pos1; case pos4: return pos6; case pos6: return pos3; } break; case pos3: switch(f){ case pos1: return pos2; case pos2: return pos6; case pos5: return pos1; case pos6: return pos5; } break; case pos4: switch(f){ case pos1: return pos5; case pos2: return pos1; case pos5: return pos6; case pos6: return pos2; } break; case pos5: switch(f){ case pos1: return pos3; case pos3: return pos6; case pos4: return pos1; case pos6: return pos4; } break; case pos6: switch(f){ case pos2: return pos4; case pos3: return pos2; case pos4: return pos5; case pos5: return pos3; } break; } return -1; } //---------------------------------------------------------------------------- void rotato(int *ary) { int i,n; for (i=0, n=*ary; i<posEND-1; i++) ary[i]=ary[i+1]; ary[i]=n; } //---------------------------------------------------------------------------- void dice1(void) { int i,cyval[posEND]; TCycoro Cyc; for (i=0; i<posEND; i++) Cyc.Dice[i]=i; for (i=0; i<posEND; i++) scanf("%d", &cyval[i]); scanf("%s",Cmd); for (i=0; Cmd[i]; i++){ CyRot(&Cyc, Cmd[i]); //printf("dir: %c, top: %d(%d)\n", Cmd[i], cyval[Cyc.T], Cyc.T+1); //prndice(&Cyc, Cmd[i]); } printf("%d\n", cyval[Cyc.Dice[posT]]); } //---------------------------------------------------------------------------- int dice2() { int i,n,t,f,rgt, *top,*frn, cyval[posEND]; for (i=0; i<posEND; i++) scanf("%d", &cyval[i]); scanf("%d",&n); top=malloc(n*sizeof(int)); frn=malloc(n*sizeof(int)); for (i=0; i<n; i++) scanf("%d %d", &top[i], &frn[i]); //for (i=0; i<n; i++) // printf("%d:%d %d\n", i, top[i], frn[i]); for (i=0; i<n; i++){ for (t=0; cyval[t]!=top[i]; t++); for (f=0; cyval[f]!=frn[i]; f++); rgt=rgtside(t, f); //printf("t:%d, f:%d, %d\n", t, f, cyval[rgt]); printf("%d\n", cyval[rgt]); } free(top); free(frn); //printf("%d\n", rgt); return 0; } //---------------------------------------------------------------------------- int CycCmp(TCycoro *Cy1, TCycoro *Cy2, int top) { int i; if (!fortop(Cy2, top)) return 0; for (i=0; i<4; i++){ if (!memcmp(Cy1, Cy2, sizeof(TCycoro))) return 1; CyRoll(Cy2, 0); } return 0; } //---------------------------------------------------------------------------- void dice3(void) { int i,res; TCycoro Cyc1,Cyc2; for (i=res=0; i<posEND; i++) scanf("%d", &Cyc1.Dice[i]); for (i=0; i<posEND; i++) scanf("%d", &Cyc2.Dice[i]); i=topval(&Cyc1); fortop(&Cyc1, i); //printf("Top value %d\n",i); if (fortop(&Cyc2, i)){ //prndice(&Cyc1, '1'); for (i=0; i<4; i++){ //prndice(&Cyc2, '2'); if (!memcmp(&Cyc1, &Cyc2, sizeof(TCycoro))) res=1; CyRoll(&Cyc2, 0); } } printf("%s\n", (res)?"Yes":"No"); } //---------------------------------------------------------------------------- void dice4() { int i,j,n,top,res; TCycoro *Cyc; scanf("%d",&n); Cyc=malloc(n*sizeof(TCycoro)); for (i=0; i<n; i++) for (j=0; j<posEND; j++) scanf("%d", &Cyc[i].Dice[j]); for (i=res=0; i<n-1; i++){ top=topval(&Cyc[i]); fortop(&Cyc[i], top); for (j=i+1; j<n; j++){ if (CycCmp(&Cyc[i], &Cyc[j], top)) res++; } } printf("%s\n", (!res)?"Yes":"No"); } //---------------------------------------------------------------------------- int main() { dice4(); return 0; } //----------------------------------------------------------------------------
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135219/source.c" target datalayout = "e-m:e-p270: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.TCycoro = type { [6 x i32] } @.str = private unnamed_addr constant [44 x i8] c"dir:%c, N=%d, E=%d, W=%d, S=%d, T=%d, B=%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @Cmd = dso_local global [101 x i8] zeroinitializer, align 16 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.6 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.7 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @switch.table.rgtside = private unnamed_addr constant [4 x i32] [i32 2, i32 4, i32 1, i32 3], align 4 @switch.table.rgtside.8 = private unnamed_addr constant [6 x i32] [i32 3, i32 -1, i32 0, i32 5, i32 -1, i32 2], align 4 @switch.table.rgtside.9 = private unnamed_addr constant [6 x i32] [i32 1, i32 5, i32 -1, i32 -1, i32 0, i32 4], align 4 @switch.table.rgtside.10 = private unnamed_addr constant [6 x i32] [i32 4, i32 0, i32 -1, i32 -1, i32 5, i32 1], align 4 @switch.table.rgtside.11 = private unnamed_addr constant [6 x i32] [i32 2, i32 -1, i32 5, i32 0, i32 -1, i32 3], align 4 @switch.table.rgtside.12 = private unnamed_addr constant [4 x i32] [i32 3, i32 1, i32 4, i32 2], align 4 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @CyRot(ptr nocapture noundef %cyc, i8 noundef signext %dir) local_unnamed_addr #0 { entry: %conv = sext i8 %dir to i32 switch i32 %conv, label %cleanup [ i32 78, label %sw.epilog i32 69, label %sw.bb1 i32 87, label %sw.bb2 i32 83, label %sw.bb3 ] sw.bb1: ; preds = %entry br label %sw.epilog sw.bb2: ; preds = %entry br label %sw.epilog sw.bb3: ; preds = %entry br label %sw.epilog sw.epilog: ; preds = %entry, %sw.bb3, %sw.bb2, %sw.bb1 %cometop.0 = phi i64 [ 1, %sw.bb3 ], [ 3, %sw.bb2 ], [ 2, %sw.bb1 ], [ 4, %entry ] %betop.0 = phi i64 [ 4, %sw.bb3 ], [ 2, %sw.bb2 ], [ 3, %sw.bb1 ], [ 1, %entry ] %arrayidx = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 %cometop.0 %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %1 = load i32, ptr %cyc, align 4, !tbaa !5 store i32 %1, ptr %arrayidx, align 4, !tbaa !5 %arrayidx11 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 %betop.0 %2 = load i32, ptr %arrayidx11, align 4, !tbaa !5 store i32 %2, ptr %cyc, align 4, !tbaa !5 %arrayidx15 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %3 = load i32, ptr %arrayidx15, align 4, !tbaa !5 store i32 %3, ptr %arrayidx11, align 4, !tbaa !5 store i32 %0, ptr %arrayidx15, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %entry, %sw.epilog ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @CyRoll(ptr nocapture noundef %cyc, i8 noundef signext %dir) local_unnamed_addr #0 { entry: %tobool.not = icmp eq i8 %dir, 0 %arrayidx16 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %0 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %arrayidx22 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %. = select i1 %tobool.not, i64 3, i64 2 %.52 = select i1 %tobool.not, i64 2, i64 3 %arrayidx18 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 %. %1 = load i32, ptr %arrayidx18, align 4, !tbaa !5 store i32 %1, ptr %arrayidx16, align 4, !tbaa !5 %2 = load i32, ptr %arrayidx22, align 4, !tbaa !5 store i32 %2, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx26 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 %.52 %3 = load i32, ptr %arrayidx26, align 4, !tbaa !5 store i32 %3, ptr %arrayidx22, align 4, !tbaa !5 store i32 %0, ptr %arrayidx26, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @fortop(ptr nocapture noundef %cyc, i32 noundef %pos) local_unnamed_addr #0 { entry: %0 = load i32, ptr %cyc, align 4, !tbaa !5 %cmp1 = icmp eq i32 %0, %pos br i1 %cmp1, label %cleanup, label %for.inc for.inc: ; preds = %entry %arrayidx.1 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp1.1 = icmp eq i32 %1, %pos br i1 %cmp1.1, label %sw.bb7, label %for.inc.1 for.inc.1: ; preds = %for.inc %arrayidx.2 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 2 %2 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %cmp1.2 = icmp eq i32 %2, %pos %arrayidx.i19 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 3 %3 = load i32, ptr %arrayidx.i19, align 4, !tbaa !5 br i1 %cmp1.2, label %sw.bb5, label %for.inc.2 for.inc.2: ; preds = %for.inc.1 %cmp1.3 = icmp eq i32 %3, %pos br i1 %cmp1.3, label %sw.bb6, label %for.inc.3 for.inc.3: ; preds = %for.inc.2 %arrayidx.4 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %4 = load i32, ptr %arrayidx.4, align 4, !tbaa !5 %cmp1.4 = icmp eq i32 %4, %pos br i1 %cmp1.4, label %sw.bb, label %for.inc.4 for.inc.4: ; preds = %for.inc.3 %arrayidx.5 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %5 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 %cmp1.5 = icmp eq i32 %5, %pos br i1 %cmp1.5, label %sw.bb8, label %cleanup sw.bb: ; preds = %for.inc.3 %arrayidx.i = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %6 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.i, align 4, !tbaa !5 %arrayidx11.i = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %7 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 store i32 %7, ptr %cyc, align 4, !tbaa !5 %arrayidx15.i = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %8 = load i32, ptr %arrayidx15.i, align 4, !tbaa !5 store i32 %8, ptr %arrayidx11.i, align 4, !tbaa !5 store i32 %6, ptr %arrayidx15.i, align 4, !tbaa !5 br label %cleanup sw.bb5: ; preds = %for.inc.1 store i32 %0, ptr %arrayidx.i19, align 4, !tbaa !5 %arrayidx11.i20 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 2 %9 = load i32, ptr %arrayidx11.i20, align 4, !tbaa !5 store i32 %9, ptr %cyc, align 4, !tbaa !5 %arrayidx15.i21 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %10 = load i32, ptr %arrayidx15.i21, align 4, !tbaa !5 store i32 %10, ptr %arrayidx11.i20, align 4, !tbaa !5 store i32 %3, ptr %arrayidx15.i21, align 4, !tbaa !5 br label %cleanup sw.bb6: ; preds = %for.inc.2 %arrayidx.i22 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 2 %11 = load i32, ptr %arrayidx.i22, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.i22, align 4, !tbaa !5 %arrayidx11.i23 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 3 %12 = load i32, ptr %arrayidx11.i23, align 4, !tbaa !5 store i32 %12, ptr %cyc, align 4, !tbaa !5 %arrayidx15.i24 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %13 = load i32, ptr %arrayidx15.i24, align 4, !tbaa !5 store i32 %13, ptr %arrayidx11.i23, align 4, !tbaa !5 store i32 %11, ptr %arrayidx15.i24, align 4, !tbaa !5 br label %cleanup sw.bb7: ; preds = %for.inc %arrayidx.i25 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %14 = load i32, ptr %arrayidx.i25, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.i25, align 4, !tbaa !5 %arrayidx11.i26 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %15 = load i32, ptr %arrayidx11.i26, align 4, !tbaa !5 store i32 %15, ptr %cyc, align 4, !tbaa !5 %arrayidx15.i27 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %16 = load i32, ptr %arrayidx15.i27, align 4, !tbaa !5 store i32 %16, ptr %arrayidx11.i26, align 4, !tbaa !5 store i32 %14, ptr %arrayidx15.i27, align 4, !tbaa !5 br label %cleanup sw.bb8: ; preds = %for.inc.4 %arrayidx.i28 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %17 = load i32, ptr %arrayidx.i28, align 4, !tbaa !5 %arrayidx11.i29 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %arrayidx15.i30 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %18 = load <2 x i32>, ptr %arrayidx11.i29, align 4, !tbaa !5 %19 = shufflevector <2 x i32> %18, <2 x i32> poison, <2 x i32> <i32 1, i32 0> store <2 x i32> %19, ptr %cyc, align 4, !tbaa !5 store i32 %17, ptr %arrayidx11.i29, align 4, !tbaa !5 store i32 %0, ptr %arrayidx15.i30, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %for.inc.4, %entry, %sw.bb, %sw.bb5, %sw.bb6, %sw.bb7, %sw.bb8 %retval.0 = phi i32 [ 1, %sw.bb8 ], [ 1, %sw.bb7 ], [ 1, %sw.bb6 ], [ 1, %sw.bb5 ], [ 1, %sw.bb ], [ 1, %entry ], [ 0, %for.inc.4 ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @topval(ptr nocapture noundef readonly %cyc) local_unnamed_addr #2 { for.inc: %value = alloca [6 x i32], align 16 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %value) #14 call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(24) %value, ptr noundef nonnull align 4 dereferenceable(24) %cyc, i64 24, i1 false) %0 = load i32, ptr %value, align 16, !tbaa !5 %arrayidx6.1 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 1 %1 = load i32, ptr %arrayidx6.1, align 4, !tbaa !5 %cmp7.1 = icmp eq i32 %0, %1 %spec.select = select i1 %cmp7.1, i32 2, i32 1 %arrayidx6.2 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 2 %2 = load i32, ptr %arrayidx6.2, align 8, !tbaa !5 %cmp7.2 = icmp eq i32 %0, %2 %inc.2 = zext i1 %cmp7.2 to i32 %cmp.sroa.0.2 = add nuw nsw i32 %spec.select, %inc.2 %arrayidx6.3 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 3 %3 = load i32, ptr %arrayidx6.3, align 4, !tbaa !5 %cmp7.3 = icmp eq i32 %0, %3 %inc.3 = zext i1 %cmp7.3 to i32 %cmp.sroa.0.3 = add nuw nsw i32 %cmp.sroa.0.2, %inc.3 %arrayidx6.4 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 4 %4 = load i32, ptr %arrayidx6.4, align 16, !tbaa !5 %cmp7.4 = icmp eq i32 %0, %4 %inc.4 = zext i1 %cmp7.4 to i32 %cmp.sroa.0.4 = add nuw nsw i32 %cmp.sroa.0.3, %inc.4 %arrayidx6.5 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 5 %5 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 %cmp7.5 = icmp eq i32 %0, %5 %inc.5 = zext i1 %cmp7.5 to i32 %cmp.sroa.0.5 = add nuw nsw i32 %cmp.sroa.0.4, %inc.5 %cmp7.2.1 = icmp eq i32 %1, %2 %cmp7.3.1 = icmp eq i32 %1, %3 %cmp7.4.1 = icmp eq i32 %1, %4 %cmp7.5.1 = icmp eq i32 %1, %5 %cmp.sroa.29.0 = zext i1 %cmp7.2 to i32 %inc.1.2 = select i1 %cmp7.2, i32 2, i32 1 %cmp.sroa.29.1 = select i1 %cmp7.2.1, i32 %inc.1.2, i32 %cmp.sroa.29.0 %cmp7.3.2 = icmp eq i32 %2, %3 %cmp.sroa.29.3.v = select i1 %cmp7.3.2, i32 2, i32 1 %cmp.sroa.29.3 = add nuw nsw i32 %cmp.sroa.29.1, %cmp.sroa.29.3.v %cmp7.4.2 = icmp eq i32 %2, %4 %inc.4.2 = zext i1 %cmp7.4.2 to i32 %cmp.sroa.29.4 = add nuw nsw i32 %cmp.sroa.29.3, %inc.4.2 %cmp7.5.2 = icmp eq i32 %2, %5 %inc.5.2 = zext i1 %cmp7.5.2 to i32 %cmp.sroa.29.5 = add nuw nsw i32 %cmp.sroa.29.4, %inc.5.2 %cmp.sroa.42.0 = zext i1 %cmp7.3 to i32 %inc.1.3 = select i1 %cmp7.3, i32 2, i32 1 %cmp.sroa.42.1 = select i1 %cmp7.3.1, i32 %inc.1.3, i32 %cmp.sroa.42.0 %inc.2.3 = zext i1 %cmp7.3.2 to i32 %cmp.sroa.42.2 = add nuw nsw i32 %cmp.sroa.42.1, %inc.2.3 %cmp7.4.3 = icmp eq i32 %3, %4 %cmp.sroa.42.4.v = select i1 %cmp7.4.3, i32 2, i32 1 %cmp.sroa.42.4 = add nuw nsw i32 %cmp.sroa.42.2, %cmp.sroa.42.4.v %cmp7.5.3 = icmp eq i32 %3, %5 %inc.5.3 = zext i1 %cmp7.5.3 to i32 %cmp.sroa.42.5 = add nuw nsw i32 %cmp.sroa.42.4, %inc.5.3 %cmp.sroa.55.0 = zext i1 %cmp7.4 to i32 %inc.1.4 = select i1 %cmp7.4, i32 2, i32 1 %cmp.sroa.55.1 = select i1 %cmp7.4.1, i32 %inc.1.4, i32 %cmp.sroa.55.0 %inc.2.4 = zext i1 %cmp7.4.2 to i32 %cmp.sroa.55.2 = add nuw nsw i32 %cmp.sroa.55.1, %inc.2.4 %inc.3.4 = zext i1 %cmp7.4.3 to i32 %cmp.sroa.55.3 = add nuw nsw i32 %cmp.sroa.55.2, %inc.3.4 %cmp7.5.4 = icmp eq i32 %4, %5 %cmp.sroa.55.5.v = select i1 %cmp7.5.4, i32 2, i32 1 %cmp.sroa.55.5 = add nuw nsw i32 %cmp.sroa.55.3, %cmp.sroa.55.5.v %cmp.sroa.68.0 = zext i1 %cmp7.5 to i32 %inc.1.5 = select i1 %cmp7.5, i32 2, i32 1 %cmp.sroa.68.1 = select i1 %cmp7.5.1, i32 %inc.1.5, i32 %cmp.sroa.68.0 %inc.2.5 = zext i1 %cmp7.5.2 to i32 %cmp.sroa.68.2 = add nuw nsw i32 %cmp.sroa.68.1, %inc.2.5 %inc.3.5 = zext i1 %cmp7.5.3 to i32 %cmp.sroa.68.3 = add nuw nsw i32 %cmp.sroa.68.2, %inc.3.5 %inc.4.5.neg = sext i1 %cmp7.5.4 to i32 %cmp19 = icmp eq i32 %cmp.sroa.0.5, 1 br i1 %cmp19, label %if.then20, label %for.cond14 for.cond14: ; preds = %for.inc %cmp.sroa.16.0 = select i1 %cmp7.1, i32 2, i32 1 %inc.2.1 = zext i1 %cmp7.2.1 to i32 %cmp.sroa.16.2 = add nuw nsw i32 %cmp.sroa.16.0, %inc.2.1 %inc.3.1 = zext i1 %cmp7.3.1 to i32 %cmp.sroa.16.3 = add nuw nsw i32 %cmp.sroa.16.2, %inc.3.1 %inc.4.1 = zext i1 %cmp7.4.1 to i32 %cmp.sroa.16.4 = add nuw nsw i32 %cmp.sroa.16.3, %inc.4.1 %inc.5.1 = zext i1 %cmp7.5.1 to i32 %cmp.sroa.16.5 = add nuw nsw i32 %cmp.sroa.16.4, %inc.5.1 %cmp19.1 = icmp eq i32 %cmp.sroa.16.5, 1 br i1 %cmp19.1, label %if.then20, label %for.cond14.1 for.cond14.1: ; preds = %for.cond14 %cmp19.2 = icmp eq i32 %cmp.sroa.29.5, 1 br i1 %cmp19.2, label %if.then20, label %for.cond14.2 for.cond14.2: ; preds = %for.cond14.1 %cmp19.3 = icmp eq i32 %cmp.sroa.42.5, 1 br i1 %cmp19.3, label %if.then20, label %for.cond14.3 for.cond14.3: ; preds = %for.cond14.2 %cmp19.4 = icmp eq i32 %cmp.sroa.55.5, 1 br i1 %cmp19.4, label %if.then20, label %for.cond14.4 for.cond14.4: ; preds = %for.cond14.3 %cmp19.5 = icmp eq i32 %cmp.sroa.68.3, %inc.4.5.neg br i1 %cmp19.5, label %if.then20, label %cleanup if.then20: ; preds = %for.cond14.4, %for.cond14.3, %for.cond14.2, %for.cond14.1, %for.cond14, %for.inc %idxprom17.lcssa = phi i64 [ 0, %for.inc ], [ 1, %for.cond14 ], [ 2, %for.cond14.1 ], [ 3, %for.cond14.2 ], [ 4, %for.cond14.3 ], [ 5, %for.cond14.4 ] %arrayidx22 = getelementptr inbounds [6 x i32], ptr %value, i64 0, i64 %idxprom17.lcssa %retval.0.pre = load i32, ptr %arrayidx22, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %for.cond14.4, %if.then20 %retval.0 = phi i32 [ %retval.0.pre, %if.then20 ], [ %0, %for.cond14.4 ] call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %value) #14 ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind uwtable define dso_local void @prndice(ptr nocapture noundef readonly %cyc, i8 noundef signext %dir) local_unnamed_addr #4 { entry: %conv = sext i8 %dir to i32 %arrayidx = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 4 %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx2 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 2 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 3 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx6 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 1 %3 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %4 = load i32, ptr %cyc, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [6 x i32], ptr %cyc, i64 0, i64 5 %5 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %conv, i32 noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3, i32 noundef %4, i32 noundef %5) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @rgtside(i32 noundef %t, i32 noundef %f) local_unnamed_addr #6 { entry: switch i32 %t, label %return [ i32 0, label %sw.bb i32 1, label %sw.bb5 i32 2, label %sw.bb11 i32 3, label %sw.bb17 i32 4, label %sw.bb23 i32 5, label %sw.bb29 ] sw.bb: ; preds = %entry %switch.tableidx = add i32 %f, -1 %0 = icmp ult i32 %switch.tableidx, 4 br i1 %0, label %switch.lookup, label %return sw.bb5: ; preds = %entry %1 = icmp ult i32 %f, 6 br i1 %1, label %switch.lookup41, label %return sw.bb11: ; preds = %entry %2 = icmp ult i32 %f, 6 br i1 %2, label %switch.lookup44, label %return sw.bb17: ; preds = %entry %3 = icmp ult i32 %f, 6 br i1 %3, label %switch.lookup47, label %return sw.bb23: ; preds = %entry %4 = icmp ult i32 %f, 6 br i1 %4, label %switch.lookup50, label %return sw.bb29: ; preds = %entry %switch.tableidx54 = add i32 %f, -1 %5 = icmp ult i32 %switch.tableidx54, 4 br i1 %5, label %switch.lookup53, label %return switch.lookup: ; preds = %sw.bb %6 = sext i32 %switch.tableidx to i64 %switch.gep = getelementptr inbounds [4 x i32], ptr @switch.table.rgtside, i64 0, i64 %6 br label %return.sink.split switch.lookup41: ; preds = %sw.bb5 %7 = sext i32 %f to i64 %switch.gep42 = getelementptr inbounds [6 x i32], ptr @switch.table.rgtside.8, i64 0, i64 %7 br label %return.sink.split switch.lookup44: ; preds = %sw.bb11 %8 = sext i32 %f to i64 %switch.gep45 = getelementptr inbounds [6 x i32], ptr @switch.table.rgtside.9, i64 0, i64 %8 br label %return.sink.split switch.lookup47: ; preds = %sw.bb17 %9 = sext i32 %f to i64 %switch.gep48 = getelementptr inbounds [6 x i32], ptr @switch.table.rgtside.10, i64 0, i64 %9 br label %return.sink.split switch.lookup50: ; preds = %sw.bb23 %10 = sext i32 %f to i64 %switch.gep51 = getelementptr inbounds [6 x i32], ptr @switch.table.rgtside.11, i64 0, i64 %10 br label %return.sink.split switch.lookup53: ; preds = %sw.bb29 %11 = sext i32 %switch.tableidx54 to i64 %switch.gep55 = getelementptr inbounds [4 x i32], ptr @switch.table.rgtside.12, i64 0, i64 %11 br label %return.sink.split return.sink.split: ; preds = %switch.lookup, %switch.lookup41, %switch.lookup44, %switch.lookup47, %switch.lookup50, %switch.lookup53 %switch.gep55.sink = phi ptr [ %switch.gep55, %switch.lookup53 ], [ %switch.gep51, %switch.lookup50 ], [ %switch.gep48, %switch.lookup47 ], [ %switch.gep45, %switch.lookup44 ], [ %switch.gep42, %switch.lookup41 ], [ %switch.gep, %switch.lookup ] %switch.load56 = load i32, ptr %switch.gep55.sink, align 4 br label %return return: ; preds = %return.sink.split, %entry, %sw.bb, %sw.bb5, %sw.bb11, %sw.bb17, %sw.bb23, %sw.bb29 %retval.0 = phi i32 [ -1, %sw.bb29 ], [ -1, %sw.bb23 ], [ -1, %sw.bb17 ], [ -1, %sw.bb11 ], [ -1, %sw.bb5 ], [ -1, %sw.bb ], [ -1, %entry ], [ %switch.load56, %return.sink.split ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @rotato(ptr nocapture noundef %ary) local_unnamed_addr #2 { entry: %0 = load i32, ptr %ary, align 4, !tbaa !5 %scevgep = getelementptr i8, ptr %ary, i64 4 tail call void @llvm.memmove.p0.p0.i64(ptr noundef nonnull align 4 dereferenceable(20) %ary, ptr noundef nonnull align 4 dereferenceable(20) %scevgep, i64 20, i1 false), !tbaa !5 %arrayidx4 = getelementptr inbounds i32, ptr %ary, i64 5 store i32 %0, ptr %arrayidx4, align 4, !tbaa !5 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @dice1() local_unnamed_addr #4 { entry: %cyval = alloca [6 x i32], align 16 %Cyc = alloca %struct.TCycoro, align 4 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %cyval) #14 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %Cyc) #14 %arrayidx.1 = getelementptr inbounds [6 x i32], ptr %Cyc, i64 0, i64 1 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %arrayidx.1, align 4, !tbaa !5 %arrayidx.5 = getelementptr inbounds [6 x i32], ptr %Cyc, i64 0, i64 5 store i32 5, ptr %arrayidx.5, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %cyval) %arrayidx5.1 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5.1) %arrayidx5.2 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5.2) %arrayidx5.3 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 3 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5.3) %arrayidx5.4 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 4 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5.4) %arrayidx5.5 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 5 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx5.5) %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull @Cmd) %0 = load i8, ptr @Cmd, align 16, !tbaa !9 %tobool.not35 = icmp eq i8 %0, 0 br i1 %tobool.not35, label %for.end18, label %for.body13 for.body13: ; preds = %entry, %CyRot.exit %indvars.iv = phi i64 [ %indvars.iv.next, %CyRot.exit ], [ 0, %entry ] %1 = phi i8 [ %7, %CyRot.exit ], [ %0, %entry ] %2 = phi i32 [ %6, %CyRot.exit ], [ 0, %entry ] %conv.i = sext i8 %1 to i32 switch i32 %conv.i, label %CyRot.exit [ i32 78, label %sw.epilog.i i32 69, label %sw.bb1.i i32 87, label %sw.bb2.i i32 83, label %sw.bb3.i ] sw.bb1.i: ; preds = %for.body13 br label %sw.epilog.i sw.bb2.i: ; preds = %for.body13 br label %sw.epilog.i sw.bb3.i: ; preds = %for.body13 br label %sw.epilog.i sw.epilog.i: ; preds = %sw.bb3.i, %sw.bb2.i, %sw.bb1.i, %for.body13 %cometop.0.i = phi i64 [ 1, %sw.bb3.i ], [ 3, %sw.bb2.i ], [ 2, %sw.bb1.i ], [ 4, %for.body13 ] %betop.0.i = phi i64 [ 4, %sw.bb3.i ], [ 2, %sw.bb2.i ], [ 3, %sw.bb1.i ], [ 1, %for.body13 ] %arrayidx.i = getelementptr inbounds [6 x i32], ptr %Cyc, i64 0, i64 %cometop.0.i %3 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 store i32 %2, ptr %arrayidx.i, align 4, !tbaa !5 %arrayidx11.i = getelementptr inbounds [6 x i32], ptr %Cyc, i64 0, i64 %betop.0.i %4 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 store i32 %5, ptr %arrayidx11.i, align 4, !tbaa !5 store i32 %3, ptr %arrayidx.5, align 4, !tbaa !5 br label %CyRot.exit CyRot.exit: ; preds = %for.body13, %sw.epilog.i %6 = phi i32 [ %2, %for.body13 ], [ %4, %sw.epilog.i ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx12 = getelementptr inbounds [101 x i8], ptr @Cmd, i64 0, i64 %indvars.iv.next %7 = load i8, ptr %arrayidx12, align 1, !tbaa !9 %tobool.not = icmp eq i8 %7, 0 br i1 %tobool.not, label %for.end18.loopexit, label %for.body13, !llvm.loop !10 for.end18.loopexit: ; preds = %CyRot.exit %8 = sext i32 %6 to i64 br label %for.end18 for.end18: ; preds = %for.end18.loopexit, %entry %.lcssa = phi i64 [ 0, %entry ], [ %8, %for.end18.loopexit ] %arrayidx22 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 %.lcssa %9 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %9) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %Cyc) #14 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %cyval) #14 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nounwind uwtable define dso_local i32 @dice2() local_unnamed_addr #7 { entry: %n = alloca i32, align 4 %cyval = alloca [6 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #14 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %cyval) #14 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %cyval) %arrayidx.1 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.2) %arrayidx.3 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 3 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.3) %arrayidx.4 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 4 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.4) %arrayidx.5 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 5 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.5) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %mul = shl nsw i64 %conv, 2 %call2 = call noalias ptr @malloc(i64 noundef %mul) #15 %call5 = call noalias ptr @malloc(i64 noundef %mul) #15 %cmp770 = icmp sgt i32 %0, 0 br i1 %cmp770, label %for.body9, label %for.end50 for.cond18.preheader: ; preds = %for.body9 %1 = icmp sgt i32 %2, 0 br i1 %1, label %for.cond22.preheader, label %for.end50 for.body9: ; preds = %entry, %for.body9 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body9 ], [ 0, %entry ] %arrayidx11 = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv %arrayidx13 = getelementptr inbounds i32, ptr %call5, i64 %indvars.iv %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef %arrayidx11, ptr noundef %arrayidx13) %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.body9, label %for.cond18.preheader, !llvm.loop !12 for.cond22.preheader: ; preds = %for.cond18.preheader, %for.end43 %indvars.iv82 = phi i64 [ %indvars.iv.next83, %for.end43 ], [ 0, %for.cond18.preheader ] %arrayidx26 = getelementptr inbounds i32, ptr %call2, i64 %indvars.iv82 %4 = load i32, ptr %arrayidx26, align 4, !tbaa !5 br label %for.cond22 for.cond22: ; preds = %for.cond22, %for.cond22.preheader %indvars.iv76 = phi i64 [ %indvars.iv.next77, %for.cond22 ], [ 0, %for.cond22.preheader ] %arrayidx24 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 %indvars.iv76 %5 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %cmp27.not = icmp eq i32 %5, %4 %indvars.iv.next77 = add nuw i64 %indvars.iv76, 1 br i1 %cmp27.not, label %for.cond33.preheader, label %for.cond22, !llvm.loop !13 for.cond33.preheader: ; preds = %for.cond22 %arrayidx37 = getelementptr inbounds i32, ptr %call5, i64 %indvars.iv82 %6 = load i32, ptr %arrayidx37, align 4, !tbaa !5 br label %for.cond33 for.cond33: ; preds = %for.cond33, %for.cond33.preheader %indvars.iv79 = phi i64 [ %indvars.iv.next80, %for.cond33 ], [ 0, %for.cond33.preheader ] %arrayidx35 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 %indvars.iv79 %7 = load i32, ptr %arrayidx35, align 4, !tbaa !5 %cmp38.not = icmp eq i32 %7, %6 %indvars.iv.next80 = add nuw i64 %indvars.iv79, 1 br i1 %cmp38.not, label %for.end43, label %for.cond33, !llvm.loop !14 for.end43: ; preds = %for.cond33 %8 = trunc i64 %indvars.iv76 to i32 %9 = trunc i64 %indvars.iv79 to i32 %call44 = call i32 @rgtside(i32 noundef %8, i32 noundef %9), !range !15 %idxprom45 = sext i32 %call44 to i64 %arrayidx46 = getelementptr inbounds [6 x i32], ptr %cyval, i64 0, i64 %idxprom45 %10 = load i32, ptr %arrayidx46, align 4, !tbaa !5 %call47 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %10) %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1 %11 = load i32, ptr %n, align 4, !tbaa !5 %12 = sext i32 %11 to i64 %cmp19 = icmp slt i64 %indvars.iv.next83, %12 br i1 %cmp19, label %for.cond22.preheader, label %for.end50, !llvm.loop !16 for.end50: ; preds = %for.end43, %entry, %for.cond18.preheader call void @free(ptr noundef %call2) #14 call void @free(ptr noundef %call5) #14 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %cyval) #14 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #14 ret i32 0 } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #8 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @CycCmp(ptr nocapture noundef readonly %Cy1, ptr nocapture noundef %Cy2, i32 noundef %top) local_unnamed_addr #10 { entry: %0 = load i32, ptr %Cy2, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %0, %top br i1 %cmp1.i, label %fortop.exit, label %for.inc.i for.inc.i: ; preds = %entry %arrayidx.1.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 1 %1 = load i32, ptr %arrayidx.1.i, align 4, !tbaa !5 %cmp1.1.i = icmp eq i32 %1, %top br i1 %cmp1.1.i, label %sw.bb7.i, label %for.inc.1.i for.inc.1.i: ; preds = %for.inc.i %arrayidx.2.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 2 %2 = load i32, ptr %arrayidx.2.i, align 4, !tbaa !5 %cmp1.2.i = icmp eq i32 %2, %top %arrayidx.i19.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 3 %3 = load i32, ptr %arrayidx.i19.i, align 4, !tbaa !5 br i1 %cmp1.2.i, label %sw.bb5.i, label %for.inc.2.i for.inc.2.i: ; preds = %for.inc.1.i %cmp1.3.i = icmp eq i32 %3, %top br i1 %cmp1.3.i, label %sw.bb6.i, label %for.inc.3.i for.inc.3.i: ; preds = %for.inc.2.i %arrayidx.4.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 4 %4 = load i32, ptr %arrayidx.4.i, align 4, !tbaa !5 %cmp1.4.i = icmp eq i32 %4, %top br i1 %cmp1.4.i, label %sw.bb.i, label %for.inc.4.i for.inc.4.i: ; preds = %for.inc.3.i %arrayidx.5.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 5 %5 = load i32, ptr %arrayidx.5.i, align 4, !tbaa !5 %cmp1.5.i = icmp eq i32 %5, %top br i1 %cmp1.5.i, label %sw.bb8.i, label %cleanup sw.bb.i: ; preds = %for.inc.3.i store i32 %0, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %top, ptr %Cy2, align 4, !tbaa !5 %arrayidx15.i.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 5 %6 = load i32, ptr %arrayidx15.i.i, align 4, !tbaa !5 store i32 %6, ptr %arrayidx.4.i, align 4, !tbaa !5 store i32 %1, ptr %arrayidx15.i.i, align 4, !tbaa !5 br label %fortop.exit sw.bb5.i: ; preds = %for.inc.1.i store i32 %0, ptr %arrayidx.i19.i, align 4, !tbaa !5 store i32 %top, ptr %Cy2, align 4, !tbaa !5 %arrayidx15.i21.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 5 %7 = load i32, ptr %arrayidx15.i21.i, align 4, !tbaa !5 store i32 %7, ptr %arrayidx.2.i, align 4, !tbaa !5 store i32 %3, ptr %arrayidx15.i21.i, align 4, !tbaa !5 br label %fortop.exit sw.bb6.i: ; preds = %for.inc.2.i store i32 %0, ptr %arrayidx.2.i, align 4, !tbaa !5 store i32 %top, ptr %Cy2, align 4, !tbaa !5 %arrayidx15.i24.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 5 %8 = load i32, ptr %arrayidx15.i24.i, align 4, !tbaa !5 store i32 %8, ptr %arrayidx.i19.i, align 4, !tbaa !5 store i32 %2, ptr %arrayidx15.i24.i, align 4, !tbaa !5 br label %fortop.exit sw.bb7.i: ; preds = %for.inc.i %arrayidx.i25.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 4 %9 = load i32, ptr %arrayidx.i25.i, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.i25.i, align 4, !tbaa !5 store i32 %top, ptr %Cy2, align 4, !tbaa !5 %arrayidx15.i27.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 5 %10 = load i32, ptr %arrayidx15.i27.i, align 4, !tbaa !5 store i32 %10, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %9, ptr %arrayidx15.i27.i, align 4, !tbaa !5 br label %fortop.exit sw.bb8.i: ; preds = %for.inc.4.i store i32 %4, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %top, ptr %Cy2, align 4, !tbaa !5 store i32 %1, ptr %arrayidx.4.i, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.5.i, align 4, !tbaa !5 br label %fortop.exit fortop.exit: ; preds = %entry, %sw.bb.i, %sw.bb5.i, %sw.bb6.i, %sw.bb7.i, %sw.bb8.i %arrayidx16.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 4 %arrayidx22.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 1 %arrayidx18.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 3 %arrayidx26.i = getelementptr inbounds [6 x i32], ptr %Cy2, i64 0, i64 2 %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cy1, ptr noundef nonnull dereferenceable(24) %Cy2, i64 24) %tobool2.not = icmp eq i32 %bcmp, 0 br i1 %tobool2.not, label %cleanup, label %if.end4 if.end4: ; preds = %fortop.exit %11 = load i32, ptr %arrayidx16.i, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx18.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx16.i, align 4, !tbaa !5 %13 = load i32, ptr %arrayidx22.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx18.i, align 4, !tbaa !5 %14 = load i32, ptr %arrayidx26.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx22.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx26.i, align 4, !tbaa !5 %bcmp.1 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cy1, ptr noundef nonnull dereferenceable(24) %Cy2, i64 24) %tobool2.not.1 = icmp eq i32 %bcmp.1, 0 br i1 %tobool2.not.1, label %cleanup, label %if.end4.1 if.end4.1: ; preds = %if.end4 store i32 %13, ptr %arrayidx16.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx18.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx22.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx26.i, align 4, !tbaa !5 %bcmp.2 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cy1, ptr noundef nonnull dereferenceable(24) %Cy2, i64 24) %tobool2.not.2 = icmp eq i32 %bcmp.2, 0 br i1 %tobool2.not.2, label %cleanup, label %if.end4.2 if.end4.2: ; preds = %if.end4.1 store i32 %14, ptr %arrayidx16.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx18.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx22.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx26.i, align 4, !tbaa !5 %bcmp.3 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cy1, ptr noundef nonnull dereferenceable(24) %Cy2, i64 24) %tobool2.not.3 = icmp eq i32 %bcmp.3, 0 br i1 %tobool2.not.3, label %cleanup, label %if.end4.3 if.end4.3: ; preds = %if.end4.2 store i32 %11, ptr %arrayidx16.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx18.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx22.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx26.i, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %fortop.exit, %if.end4, %if.end4.1, %if.end4.2, %if.end4.3, %for.inc.4.i %retval.0 = phi i32 [ 0, %for.inc.4.i ], [ 1, %fortop.exit ], [ 1, %if.end4 ], [ 1, %if.end4.1 ], [ 1, %if.end4.2 ], [ 0, %if.end4.3 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local void @dice3() local_unnamed_addr #4 { entry: %Cyc1 = alloca %struct.TCycoro, align 4 %Cyc2 = alloca %struct.TCycoro, align 4 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %Cyc1) #14 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %Cyc2) #14 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %Cyc1) %arrayidx.1 = getelementptr inbounds [6 x i32], ptr %Cyc1, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [6 x i32], ptr %Cyc1, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.2) %arrayidx.3 = getelementptr inbounds [6 x i32], ptr %Cyc1, i64 0, i64 3 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.3) %arrayidx.4 = getelementptr inbounds [6 x i32], ptr %Cyc1, i64 0, i64 4 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.4) %arrayidx.5 = getelementptr inbounds [6 x i32], ptr %Cyc1, i64 0, i64 5 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.5) %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %Cyc2) %arrayidx6.1 = getelementptr inbounds [6 x i32], ptr %Cyc2, i64 0, i64 1 %call7.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6.1) %arrayidx6.2 = getelementptr inbounds [6 x i32], ptr %Cyc2, i64 0, i64 2 %call7.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6.2) %arrayidx6.3 = getelementptr inbounds [6 x i32], ptr %Cyc2, i64 0, i64 3 %call7.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6.3) %arrayidx6.4 = getelementptr inbounds [6 x i32], ptr %Cyc2, i64 0, i64 4 %call7.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6.4) %arrayidx6.5 = getelementptr inbounds [6 x i32], ptr %Cyc2, i64 0, i64 5 %call7.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6.5) %call11 = call i32 @topval(ptr noundef nonnull %Cyc1) %0 = load i32, ptr %Cyc1, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %0, %call11 br i1 %cmp1.i, label %fortop.exit, label %for.inc.i for.inc.i: ; preds = %entry %1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp1.1.i = icmp eq i32 %1, %call11 br i1 %cmp1.1.i, label %sw.bb7.i, label %for.inc.1.i for.inc.1.i: ; preds = %for.inc.i %2 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %cmp1.2.i = icmp eq i32 %2, %call11 %3 = load i32, ptr %arrayidx.3, align 4, !tbaa !5 br i1 %cmp1.2.i, label %sw.bb5.i, label %for.inc.2.i for.inc.2.i: ; preds = %for.inc.1.i %cmp1.3.i = icmp eq i32 %3, %call11 br i1 %cmp1.3.i, label %sw.bb6.i, label %for.inc.3.i for.inc.3.i: ; preds = %for.inc.2.i %4 = load i32, ptr %arrayidx.4, align 4, !tbaa !5 %cmp1.4.i = icmp eq i32 %4, %call11 br i1 %cmp1.4.i, label %sw.bb.i, label %for.inc.4.i for.inc.4.i: ; preds = %for.inc.3.i %5 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 %cmp1.5.i = icmp eq i32 %5, %call11 br i1 %cmp1.5.i, label %sw.bb8.i, label %fortop.exit sw.bb.i: ; preds = %for.inc.3.i store i32 %0, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %call11, ptr %Cyc1, align 4, !tbaa !5 %6 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 store i32 %6, ptr %arrayidx.4, align 4, !tbaa !5 br label %fortop.exit.sink.split sw.bb5.i: ; preds = %for.inc.1.i store i32 %0, ptr %arrayidx.3, align 4, !tbaa !5 store i32 %call11, ptr %Cyc1, align 4, !tbaa !5 %7 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 store i32 %7, ptr %arrayidx.2, align 4, !tbaa !5 br label %fortop.exit.sink.split sw.bb6.i: ; preds = %for.inc.2.i store i32 %0, ptr %arrayidx.2, align 4, !tbaa !5 store i32 %call11, ptr %Cyc1, align 4, !tbaa !5 %8 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 store i32 %8, ptr %arrayidx.3, align 4, !tbaa !5 br label %fortop.exit.sink.split sw.bb7.i: ; preds = %for.inc.i %9 = load i32, ptr %arrayidx.4, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.4, align 4, !tbaa !5 store i32 %call11, ptr %Cyc1, align 4, !tbaa !5 %10 = load i32, ptr %arrayidx.5, align 4, !tbaa !5 store i32 %10, ptr %arrayidx.1, align 4, !tbaa !5 br label %fortop.exit.sink.split sw.bb8.i: ; preds = %for.inc.4.i store i32 %4, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %call11, ptr %Cyc1, align 4, !tbaa !5 store i32 %1, ptr %arrayidx.4, align 4, !tbaa !5 br label %fortop.exit.sink.split fortop.exit.sink.split: ; preds = %sw.bb8.i, %sw.bb7.i, %sw.bb6.i, %sw.bb5.i, %sw.bb.i %.sink = phi i32 [ %1, %sw.bb.i ], [ %3, %sw.bb5.i ], [ %2, %sw.bb6.i ], [ %9, %sw.bb7.i ], [ %0, %sw.bb8.i ] store i32 %.sink, ptr %arrayidx.5, align 4, !tbaa !5 br label %fortop.exit fortop.exit: ; preds = %fortop.exit.sink.split, %entry, %for.inc.4.i %11 = load i32, ptr %Cyc2, align 4, !tbaa !5 %cmp1.i35 = icmp eq i32 %11, %call11 %arrayidx22.i.promoted.pre = load i32, ptr %arrayidx6.1, align 4, !tbaa !5 br i1 %cmp1.i35, label %fortop.exit71, label %for.inc.i36 for.inc.i36: ; preds = %fortop.exit %cmp1.1.i38 = icmp eq i32 %arrayidx22.i.promoted.pre, %call11 br i1 %cmp1.1.i38, label %sw.bb7.i67, label %for.inc.1.i39 for.inc.1.i39: ; preds = %for.inc.i36 %12 = load i32, ptr %arrayidx6.2, align 4, !tbaa !5 %cmp1.2.i41 = icmp eq i32 %12, %call11 %13 = load i32, ptr %arrayidx6.3, align 4, !tbaa !5 br i1 %cmp1.2.i41, label %sw.bb5.i64, label %for.inc.2.i43 for.inc.2.i43: ; preds = %for.inc.1.i39 %cmp1.3.i44 = icmp eq i32 %13, %call11 br i1 %cmp1.3.i44, label %sw.bb6.i60, label %for.inc.3.i45 for.inc.3.i45: ; preds = %for.inc.2.i43 %14 = load i32, ptr %arrayidx6.4, align 4, !tbaa !5 %cmp1.4.i47 = icmp eq i32 %14, %call11 br i1 %cmp1.4.i47, label %sw.bb.i56, label %for.inc.4.i48 for.inc.4.i48: ; preds = %for.inc.3.i45 %15 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 %cmp1.5.i50 = icmp eq i32 %15, %call11 br i1 %cmp1.5.i50, label %sw.bb8.i52, label %if.end23.thread sw.bb.i56: ; preds = %for.inc.3.i45 store i32 %11, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %call11, ptr %Cyc2, align 4, !tbaa !5 %16 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 store i32 %16, ptr %arrayidx6.4, align 4, !tbaa !5 br label %fortop.exit71.sink.split sw.bb5.i64: ; preds = %for.inc.1.i39 store i32 %11, ptr %arrayidx6.3, align 4, !tbaa !5 store i32 %call11, ptr %Cyc2, align 4, !tbaa !5 %17 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 store i32 %17, ptr %arrayidx6.2, align 4, !tbaa !5 br label %fortop.exit71.sink.split sw.bb6.i60: ; preds = %for.inc.2.i43 store i32 %11, ptr %arrayidx6.2, align 4, !tbaa !5 store i32 %call11, ptr %Cyc2, align 4, !tbaa !5 %18 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 store i32 %18, ptr %arrayidx6.3, align 4, !tbaa !5 br label %fortop.exit71.sink.split sw.bb7.i67: ; preds = %for.inc.i36 %19 = load i32, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %11, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %call11, ptr %Cyc2, align 4, !tbaa !5 %20 = load i32, ptr %arrayidx6.5, align 4, !tbaa !5 store i32 %20, ptr %arrayidx6.1, align 4, !tbaa !5 br label %fortop.exit71.sink.split sw.bb8.i52: ; preds = %for.inc.4.i48 store i32 %14, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %call11, ptr %Cyc2, align 4, !tbaa !5 store i32 %arrayidx22.i.promoted.pre, ptr %arrayidx6.4, align 4, !tbaa !5 br label %fortop.exit71.sink.split fortop.exit71.sink.split: ; preds = %sw.bb8.i52, %sw.bb7.i67, %sw.bb6.i60, %sw.bb5.i64, %sw.bb.i56 %arrayidx22.i.promoted.pre.sink = phi i32 [ %arrayidx22.i.promoted.pre, %sw.bb.i56 ], [ %13, %sw.bb5.i64 ], [ %12, %sw.bb6.i60 ], [ %19, %sw.bb7.i67 ], [ %11, %sw.bb8.i52 ] %arrayidx22.i.promoted.ph = phi i32 [ %11, %sw.bb.i56 ], [ %arrayidx22.i.promoted.pre, %sw.bb5.i64 ], [ %arrayidx22.i.promoted.pre, %sw.bb6.i60 ], [ %20, %sw.bb7.i67 ], [ %14, %sw.bb8.i52 ] store i32 %arrayidx22.i.promoted.pre.sink, ptr %arrayidx6.5, align 4, !tbaa !5 br label %fortop.exit71 fortop.exit71: ; preds = %fortop.exit71.sink.split, %fortop.exit %arrayidx22.i.promoted = phi i32 [ %arrayidx22.i.promoted.pre, %fortop.exit ], [ %arrayidx22.i.promoted.ph, %fortop.exit71.sink.split ] %arrayidx16.i.promoted = load i32, ptr %arrayidx6.4, align 4, !tbaa !5 %arrayidx18.i.promoted = load i32, ptr %arrayidx6.3, align 4, !tbaa !5 %arrayidx26.i.promoted = load i32, ptr %arrayidx6.2, align 4, !tbaa !5 %bcmp = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cyc1, ptr noundef nonnull dereferenceable(24) %Cyc2, i64 24) %bcmp.fr = freeze i32 %bcmp %tobool18.not = icmp eq i32 %bcmp.fr, 0 store i32 %arrayidx18.i.promoted, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %arrayidx22.i.promoted, ptr %arrayidx6.3, align 4, !tbaa !5 store i32 %arrayidx26.i.promoted, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %arrayidx16.i.promoted, ptr %arrayidx6.2, align 4, !tbaa !5 %bcmp.1 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cyc1, ptr noundef nonnull dereferenceable(24) %Cyc2, i64 24) %bcmp.fr.1 = freeze i32 %bcmp.1 %tobool18.not.1 = icmp eq i32 %bcmp.fr.1, 0 %narrow = or i1 %tobool18.not.1, %tobool18.not store i32 %arrayidx22.i.promoted, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %arrayidx26.i.promoted, ptr %arrayidx6.3, align 4, !tbaa !5 store i32 %arrayidx16.i.promoted, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %arrayidx18.i.promoted, ptr %arrayidx6.2, align 4, !tbaa !5 %bcmp.2 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cyc1, ptr noundef nonnull dereferenceable(24) %Cyc2, i64 24) %bcmp.fr.2 = freeze i32 %bcmp.2 %tobool18.not.2 = icmp eq i32 %bcmp.fr.2, 0 %narrow84 = or i1 %tobool18.not.2, %narrow store i32 %arrayidx26.i.promoted, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %arrayidx16.i.promoted, ptr %arrayidx6.3, align 4, !tbaa !5 store i32 %arrayidx18.i.promoted, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %arrayidx22.i.promoted, ptr %arrayidx6.2, align 4, !tbaa !5 %bcmp.3 = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %Cyc1, ptr noundef nonnull dereferenceable(24) %Cyc2, i64 24) %bcmp.fr.3 = freeze i32 %bcmp.3 %tobool18.not.3 = icmp eq i32 %bcmp.fr.3, 0 %narrow85 = or i1 %tobool18.not.3, %narrow84 store i32 %arrayidx16.i.promoted, ptr %arrayidx6.4, align 4, !tbaa !5 store i32 %arrayidx18.i.promoted, ptr %arrayidx6.3, align 4, !tbaa !5 store i32 %arrayidx22.i.promoted, ptr %arrayidx6.1, align 4, !tbaa !5 store i32 %arrayidx26.i.promoted, ptr %arrayidx6.2, align 4, !tbaa !5 br i1 %narrow85, label %21, label %if.end23.thread if.end23.thread: ; preds = %for.inc.4.i48, %fortop.exit71 br label %21 21: ; preds = %fortop.exit71, %if.end23.thread %22 = phi ptr [ @.str.7, %if.end23.thread ], [ @.str.6, %fortop.exit71 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %22) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %Cyc2) #14 call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %Cyc1) #14 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @dice4() local_unnamed_addr #4 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #14 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sext i32 %0 to i64 %mul = mul nsw i64 %conv, 24 %call1 = call noalias ptr @malloc(i64 noundef %mul) #15 %cmp65 = icmp sgt i32 %0, 0 br i1 %cmp65, label %for.cond3.preheader, label %for.end38 for.cond3.preheader: ; preds = %entry, %for.cond3.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond3.preheader ], [ 0, %entry ] %arrayidx = getelementptr inbounds %struct.TCycoro, ptr %call1, i64 %indvars.iv %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx) %arrayidx8.1 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 1 %call9.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8.1) %arrayidx8.2 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 2 %call9.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8.2) %arrayidx8.3 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 3 %call9.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8.3) %arrayidx8.4 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 4 %call9.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8.4) %arrayidx8.5 = getelementptr inbounds [6 x i32], ptr %arrayidx, i64 0, i64 5 %call9.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx8.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond3.preheader, label %for.cond13.preheader, !llvm.loop !17 for.cond13.preheader: ; preds = %for.cond3.preheader %cmp1471 = icmp sgt i32 %1, 1 br i1 %cmp1471, label %for.body16.preheader, label %for.end38 for.body16.preheader: ; preds = %for.cond13.preheader %sub = add nsw i32 %1, -1 %3 = zext i32 %1 to i64 %wide.trip.count87 = zext i32 %sub to i64 %wide.trip.count = zext i32 %1 to i64 br label %for.body16 for.cond13.loopexit: ; preds = %for.cond23, %fortop.exit %res.1.lcssa = phi i32 [ %res.072, %fortop.exit ], [ %30, %for.cond23 ] %indvars.iv.next80 = add nuw nsw i64 %indvars.iv79, 1 %exitcond88.not = icmp eq i64 %indvars.iv.next85, %wide.trip.count87 br i1 %exitcond88.not, label %for.end38.loopexit, label %for.body16, !llvm.loop !18 for.body16: ; preds = %for.body16.preheader, %for.cond13.loopexit %indvars.iv84 = phi i64 [ 0, %for.body16.preheader ], [ %indvars.iv.next85, %for.cond13.loopexit ] %indvars.iv79 = phi i64 [ 1, %for.body16.preheader ], [ %indvars.iv.next80, %for.cond13.loopexit ] %res.072 = phi i32 [ 0, %for.body16.preheader ], [ %res.1.lcssa, %for.cond13.loopexit ] %arrayidx18 = getelementptr inbounds %struct.TCycoro, ptr %call1, i64 %indvars.iv84 %call19 = call i32 @topval(ptr noundef %arrayidx18) %4 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %4, %call19 br i1 %cmp1.i, label %fortop.exit, label %for.inc.i for.inc.i: ; preds = %for.body16 %arrayidx.1.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 1 %5 = load i32, ptr %arrayidx.1.i, align 4, !tbaa !5 %cmp1.1.i = icmp eq i32 %5, %call19 br i1 %cmp1.1.i, label %sw.bb7.i, label %for.inc.1.i for.inc.1.i: ; preds = %for.inc.i %arrayidx.2.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 2 %6 = load i32, ptr %arrayidx.2.i, align 4, !tbaa !5 %cmp1.2.i = icmp eq i32 %6, %call19 %arrayidx.i19.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 3 %7 = load i32, ptr %arrayidx.i19.i, align 4, !tbaa !5 br i1 %cmp1.2.i, label %sw.bb5.i, label %for.inc.2.i for.inc.2.i: ; preds = %for.inc.1.i %cmp1.3.i = icmp eq i32 %7, %call19 br i1 %cmp1.3.i, label %sw.bb6.i, label %for.inc.3.i for.inc.3.i: ; preds = %for.inc.2.i %arrayidx.4.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 4 %8 = load i32, ptr %arrayidx.4.i, align 4, !tbaa !5 %cmp1.4.i = icmp eq i32 %8, %call19 br i1 %cmp1.4.i, label %sw.bb.i, label %for.inc.4.i for.inc.4.i: ; preds = %for.inc.3.i %arrayidx.5.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 5 %9 = load i32, ptr %arrayidx.5.i, align 4, !tbaa !5 %cmp1.5.i = icmp eq i32 %9, %call19 br i1 %cmp1.5.i, label %sw.bb8.i, label %fortop.exit sw.bb.i: ; preds = %for.inc.3.i store i32 %4, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx15.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 5 %10 = load i32, ptr %arrayidx15.i.i, align 4, !tbaa !5 store i32 %10, ptr %arrayidx.4.i, align 4, !tbaa !5 store i32 %5, ptr %arrayidx15.i.i, align 4, !tbaa !5 br label %fortop.exit sw.bb5.i: ; preds = %for.inc.1.i store i32 %4, ptr %arrayidx.i19.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx15.i21.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 5 %11 = load i32, ptr %arrayidx15.i21.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx.2.i, align 4, !tbaa !5 store i32 %7, ptr %arrayidx15.i21.i, align 4, !tbaa !5 br label %fortop.exit sw.bb6.i: ; preds = %for.inc.2.i store i32 %4, ptr %arrayidx.2.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx15.i24.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 5 %12 = load i32, ptr %arrayidx15.i24.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx.i19.i, align 4, !tbaa !5 store i32 %6, ptr %arrayidx15.i24.i, align 4, !tbaa !5 br label %fortop.exit sw.bb7.i: ; preds = %for.inc.i %arrayidx.i25.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 4 %13 = load i32, ptr %arrayidx.i25.i, align 4, !tbaa !5 store i32 %4, ptr %arrayidx.i25.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx15.i27.i = getelementptr inbounds [6 x i32], ptr %arrayidx18, i64 0, i64 5 %14 = load i32, ptr %arrayidx15.i27.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx15.i27.i, align 4, !tbaa !5 br label %fortop.exit sw.bb8.i: ; preds = %for.inc.4.i store i32 %8, ptr %arrayidx.1.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx18, align 4, !tbaa !5 store i32 %5, ptr %arrayidx.4.i, align 4, !tbaa !5 store i32 %4, ptr %arrayidx.5.i, align 4, !tbaa !5 br label %fortop.exit fortop.exit: ; preds = %for.body16, %for.inc.4.i, %sw.bb.i, %sw.bb5.i, %sw.bb6.i, %sw.bb7.i, %sw.bb8.i %indvars.iv.next85 = add nuw nsw i64 %indvars.iv84, 1 %cmp2467 = icmp ult i64 %indvars.iv.next85, %3 br i1 %cmp2467, label %for.body26, label %for.cond13.loopexit for.body26: ; preds = %fortop.exit, %for.cond23 %indvars.iv81 = phi i64 [ %indvars.iv.next82, %for.cond23 ], [ %indvars.iv79, %fortop.exit ] %res.169 = phi i32 [ %30, %for.cond23 ], [ %res.072, %fortop.exit ] %arrayidx30 = getelementptr inbounds %struct.TCycoro, ptr %call1, i64 %indvars.iv81 %15 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %cmp1.i.i = icmp eq i32 %15, %call19 br i1 %cmp1.i.i, label %fortop.exit.i, label %for.inc.i.i for.inc.i.i: ; preds = %for.body26 %arrayidx.1.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 1 %16 = load i32, ptr %arrayidx.1.i.i, align 4, !tbaa !5 %cmp1.1.i.i = icmp eq i32 %16, %call19 br i1 %cmp1.1.i.i, label %sw.bb7.i.i, label %for.inc.1.i.i for.inc.1.i.i: ; preds = %for.inc.i.i %arrayidx.2.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 2 %17 = load i32, ptr %arrayidx.2.i.i, align 4, !tbaa !5 %cmp1.2.i.i = icmp eq i32 %17, %call19 %arrayidx.i19.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 3 %18 = load i32, ptr %arrayidx.i19.i.i, align 4, !tbaa !5 br i1 %cmp1.2.i.i, label %sw.bb5.i.i, label %for.inc.2.i.i for.inc.2.i.i: ; preds = %for.inc.1.i.i %cmp1.3.i.i = icmp eq i32 %18, %call19 br i1 %cmp1.3.i.i, label %sw.bb6.i.i, label %for.inc.3.i.i for.inc.3.i.i: ; preds = %for.inc.2.i.i %arrayidx.4.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 4 %19 = load i32, ptr %arrayidx.4.i.i, align 4, !tbaa !5 %cmp1.4.i.i = icmp eq i32 %19, %call19 br i1 %cmp1.4.i.i, label %sw.bb.i.i, label %for.inc.4.i.i for.inc.4.i.i: ; preds = %for.inc.3.i.i %arrayidx.5.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 5 %20 = load i32, ptr %arrayidx.5.i.i, align 4, !tbaa !5 %cmp1.5.i.i = icmp eq i32 %20, %call19 br i1 %cmp1.5.i.i, label %sw.bb8.i.i, label %for.cond23 sw.bb.i.i: ; preds = %for.inc.3.i.i store i32 %15, ptr %arrayidx.1.i.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx15.i.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 5 %21 = load i32, ptr %arrayidx15.i.i.i, align 4, !tbaa !5 store i32 %21, ptr %arrayidx.4.i.i, align 4, !tbaa !5 store i32 %16, ptr %arrayidx15.i.i.i, align 4, !tbaa !5 br label %fortop.exit.i sw.bb5.i.i: ; preds = %for.inc.1.i.i store i32 %15, ptr %arrayidx.i19.i.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx15.i21.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 5 %22 = load i32, ptr %arrayidx15.i21.i.i, align 4, !tbaa !5 store i32 %22, ptr %arrayidx.2.i.i, align 4, !tbaa !5 store i32 %18, ptr %arrayidx15.i21.i.i, align 4, !tbaa !5 br label %fortop.exit.i sw.bb6.i.i: ; preds = %for.inc.2.i.i store i32 %15, ptr %arrayidx.2.i.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx15.i24.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 5 %23 = load i32, ptr %arrayidx15.i24.i.i, align 4, !tbaa !5 store i32 %23, ptr %arrayidx.i19.i.i, align 4, !tbaa !5 store i32 %17, ptr %arrayidx15.i24.i.i, align 4, !tbaa !5 br label %fortop.exit.i sw.bb7.i.i: ; preds = %for.inc.i.i %arrayidx.i25.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 4 %24 = load i32, ptr %arrayidx.i25.i.i, align 4, !tbaa !5 store i32 %15, ptr %arrayidx.i25.i.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx15.i27.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 5 %25 = load i32, ptr %arrayidx15.i27.i.i, align 4, !tbaa !5 store i32 %25, ptr %arrayidx.1.i.i, align 4, !tbaa !5 store i32 %24, ptr %arrayidx15.i27.i.i, align 4, !tbaa !5 br label %fortop.exit.i sw.bb8.i.i: ; preds = %for.inc.4.i.i store i32 %19, ptr %arrayidx.1.i.i, align 4, !tbaa !5 store i32 %call19, ptr %arrayidx30, align 4, !tbaa !5 store i32 %16, ptr %arrayidx.4.i.i, align 4, !tbaa !5 store i32 %15, ptr %arrayidx.5.i.i, align 4, !tbaa !5 br label %fortop.exit.i fortop.exit.i: ; preds = %sw.bb8.i.i, %sw.bb7.i.i, %sw.bb6.i.i, %sw.bb5.i.i, %sw.bb.i.i, %for.body26 %arrayidx16.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 4 %arrayidx22.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 1 %arrayidx18.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 3 %arrayidx26.i.i = getelementptr inbounds [6 x i32], ptr %arrayidx30, i64 0, i64 2 %bcmp.i = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx18, ptr noundef nonnull dereferenceable(24) %arrayidx30, i64 24) %tobool2.not.i = icmp eq i32 %bcmp.i, 0 br i1 %tobool2.not.i, label %CycCmp.exit.thread, label %if.end4.i if.end4.i: ; preds = %fortop.exit.i %26 = load i32, ptr %arrayidx16.i.i, align 4, !tbaa !5 %27 = load i32, ptr %arrayidx18.i.i, align 4, !tbaa !5 store i32 %27, ptr %arrayidx16.i.i, align 4, !tbaa !5 %28 = load i32, ptr %arrayidx22.i.i, align 4, !tbaa !5 store i32 %28, ptr %arrayidx18.i.i, align 4, !tbaa !5 %29 = load i32, ptr %arrayidx26.i.i, align 4, !tbaa !5 store i32 %29, ptr %arrayidx22.i.i, align 4, !tbaa !5 store i32 %26, ptr %arrayidx26.i.i, align 4, !tbaa !5 %bcmp.1.i = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx18, ptr noundef nonnull dereferenceable(24) %arrayidx30, i64 24) %tobool2.not.1.i = icmp eq i32 %bcmp.1.i, 0 br i1 %tobool2.not.1.i, label %CycCmp.exit.thread, label %if.end4.1.i if.end4.1.i: ; preds = %if.end4.i store i32 %28, ptr %arrayidx16.i.i, align 4, !tbaa !5 store i32 %29, ptr %arrayidx18.i.i, align 4, !tbaa !5 store i32 %26, ptr %arrayidx22.i.i, align 4, !tbaa !5 store i32 %27, ptr %arrayidx26.i.i, align 4, !tbaa !5 %bcmp.2.i = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx18, ptr noundef nonnull dereferenceable(24) %arrayidx30, i64 24) %tobool2.not.2.i = icmp eq i32 %bcmp.2.i, 0 br i1 %tobool2.not.2.i, label %CycCmp.exit.thread, label %if.end4.2.i if.end4.2.i: ; preds = %if.end4.1.i store i32 %29, ptr %arrayidx16.i.i, align 4, !tbaa !5 store i32 %26, ptr %arrayidx18.i.i, align 4, !tbaa !5 store i32 %27, ptr %arrayidx22.i.i, align 4, !tbaa !5 store i32 %28, ptr %arrayidx26.i.i, align 4, !tbaa !5 %bcmp.3.i = call i32 @bcmp(ptr noundef nonnull dereferenceable(24) %arrayidx18, ptr noundef nonnull dereferenceable(24) %arrayidx30, i64 24) %tobool2.not.3.i = icmp eq i32 %bcmp.3.i, 0 br i1 %tobool2.not.3.i, label %CycCmp.exit.thread, label %if.end4.3.i if.end4.3.i: ; preds = %if.end4.2.i store i32 %26, ptr %arrayidx16.i.i, align 4, !tbaa !5 store i32 %27, ptr %arrayidx18.i.i, align 4, !tbaa !5 store i32 %28, ptr %arrayidx22.i.i, align 4, !tbaa !5 store i32 %29, ptr %arrayidx26.i.i, align 4, !tbaa !5 br label %for.cond23 CycCmp.exit.thread: ; preds = %fortop.exit.i, %if.end4.i, %if.end4.1.i, %if.end4.2.i %inc3263 = add nsw i32 %res.169, 1 br label %for.cond23 for.cond23: ; preds = %for.inc.4.i.i, %if.end4.3.i, %CycCmp.exit.thread %30 = phi i32 [ %inc3263, %CycCmp.exit.thread ], [ %res.169, %if.end4.3.i ], [ %res.169, %for.inc.4.i.i ] %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %exitcond.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count br i1 %exitcond.not, label %for.cond13.loopexit, label %for.body26, !llvm.loop !19 for.end38.loopexit: ; preds = %for.cond13.loopexit %31 = icmp eq i32 %res.1.lcssa, 0 %32 = select i1 %31, ptr @.str.6, ptr @.str.7 br label %for.end38 for.end38: ; preds = %entry, %for.end38.loopexit, %for.cond13.preheader %res.0.lcssa = phi ptr [ @.str.6, %for.cond13.preheader ], [ %32, %for.end38.loopexit ], [ @.str.6, %entry ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %res.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #14 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: tail call void @dice4() ret i32 0 } ; Function Attrs: nofree nounwind willreturn memory(argmem: read) declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #11 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #12 ; 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) #13 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress 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 #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 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { 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 #10 = { mustprogress nofree 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 #11 = { nofree nounwind willreturn memory(argmem: read) } attributes #12 = { nofree nounwind } attributes #13 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #14 = { nounwind } attributes #15 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11} !14 = distinct !{!14, !11} !15 = !{i32 -1, i32 6} !16 = distinct !{!16, !11} !17 = distinct !{!17, !11} !18 = distinct !{!18, !11} !19 = distinct !{!19, !11}
#include <stdio.h> #include <math.h> long int max(long int a, long int b); long int min(long int a, long int b); int main(void) { int t; scanf("%d", &t); for (int i = 0; i < t; i++) { long int a, b, c, r, ans, maxab, minab; scanf("%ld %ld %ld %ld", &a, &b, &c, &r); long int tt, ct; // tt is the total time and ct is the coverage time maxab = max(a, b); minab = min(a, b); a = minab; b = maxab; tt = b - a; if (c - r >= a && c + r <= b) { ct = 2 * r; ans = tt - ct; } else if (c - r >= b || c + r <= a) { ans = tt; //mobile is always out of range } else if (c - r <= a && c + r >= b) { ans = 0; } else if (c - r >= a && c - r <= b && c + r >= b) { ct = b - c + r; ans = tt - ct; } else { ct = c + r - a; ans = tt - ct; } printf("%ld", ans); if (i != t - 1) { printf("\n"); } } return 0; } long int max(long int a, long int b) { if (a >= b) { return a; } else { return b; } } long int min(long int a, long int b) { if (a >= b) { return b; } else { return a; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [16 x i8] c"%ld %ld %ld %ld\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %a = alloca i64, align 8 %b = alloca i64, align 8 %c = alloca i64, align 8 %r = alloca i64, align 8 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 %cmp60 = icmp sgt i32 %0, 0 br i1 %cmp60, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %if.end45, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #6 ret i32 0 for.body: ; preds = %entry, %if.end45 %i.061 = phi i32 [ %inc, %if.end45 ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #6 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %r) #6 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %r) %1 = load i64, ptr %a, align 8, !tbaa !9 %2 = load i64, ptr %b, align 8, !tbaa !9 %b.a.i = call i64 @llvm.smax.i64(i64 %1, i64 %2) %a.b.i = call i64 @llvm.smin.i64(i64 %1, i64 %2) store i64 %a.b.i, ptr %a, align 8, !tbaa !9 store i64 %b.a.i, ptr %b, align 8, !tbaa !9 %sub = sub nsw i64 %b.a.i, %a.b.i %3 = load i64, ptr %c, align 8, !tbaa !9 %4 = load i64, ptr %r, align 8, !tbaa !9 %sub4 = sub nsw i64 %3, %4 %cmp5.not = icmp slt i64 %sub4, %a.b.i %add = add nsw i64 %4, %3 %cmp6.not = icmp sgt i64 %add, %b.a.i %or.cond = select i1 %cmp5.not, i1 true, i1 %cmp6.not br i1 %or.cond, label %if.else, label %if.then if.then: ; preds = %for.body %mul = shl nsw i64 %4, 1 %sub7 = sub nsw i64 %sub, %mul br label %if.end39 if.else: ; preds = %for.body %cmp9.not = icmp slt i64 %sub4, %b.a.i %cmp11.not = icmp sgt i64 %add, %a.b.i %or.cond57 = select i1 %cmp9.not, i1 %cmp11.not, i1 false br i1 %or.cond57, label %if.else13, label %if.end39 if.else13: ; preds = %if.else %cmp15.not = icmp sgt i64 %sub4, %a.b.i %cmp18.not = icmp slt i64 %add, %b.a.i %or.cond55 = or i1 %cmp15.not, %cmp18.not br i1 %or.cond55, label %if.else20, label %if.end39 if.else20: ; preds = %if.else13 %or.cond58 = or i1 %cmp5.not, %cmp18.not br i1 %or.cond58, label %if.else33, label %if.then29 if.then29: ; preds = %if.else20 %5 = add i64 %a.b.i, %4 %sub32 = sub i64 %3, %5 br label %if.end39 if.else33: ; preds = %if.else20 %sub36 = sub i64 %b.a.i, %add br label %if.end39 if.end39: ; preds = %if.else13, %if.else, %if.then29, %if.else33, %if.then %ans.0 = phi i64 [ %sub7, %if.then ], [ %sub32, %if.then29 ], [ %sub36, %if.else33 ], [ %sub, %if.else ], [ 0, %if.else13 ] %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %ans.0) %6 = load i32, ptr %t, align 4, !tbaa !5 %sub41 = add nsw i32 %6, -1 %cmp42.not = icmp eq i32 %i.061, %sub41 br i1 %cmp42.not, label %if.end45, label %if.then43 if.then43: ; preds = %if.end39 %putchar = call i32 @putchar(i32 10) %.pre = load i32, ptr %t, align 4, !tbaa !5 br label %if.end45 if.end45: ; preds = %if.then43, %if.end39 %7 = phi i32 [ %.pre, %if.then43 ], [ %6, %if.end39 ] call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %r) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #6 %inc = add nuw nsw i32 %i.061, 1 %cmp = icmp slt i32 %inc, %7 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !11 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @max(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %b.a = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %b.a } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @min(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main (int argc, char * argv[]) { int n;//サイコロの個数 int dice[100][7]; int i,j,k,l; scanf("%d",&n); for(i=0;i<n;i++){ for(j=1;j<7;j++){ scanf("%d",&dice[i][j]); } } //処理 for(l=1;l<n;l++){ for(i=0;i<6;i++){ if(dice[0][1]==dice[l][1]) for(j=0;j<4;j++){ for(k=1;k<7;k++) if(dice[0][k]!=dice[l][k])break; if(k==7){ printf("No\n"); return 0; } dice[l][0] = dice[l][2]; dice[l][2] = dice[l][3]; dice[l][3] = dice[l][5]; dice[l][5] = dice[l][4]; dice[l][4] = dice[l][0]; } dice[l][0] = dice[l][1]; switch(i){ case 2: dice[l][1] = dice[l][3]; dice[l][3] = dice[l][6]; dice[l][6] = dice[l][4]; dice[l][4] = dice[l][0]; break; default: dice[l][1] = dice[l][2]; dice[l][2] = dice[l][6]; dice[l][6] = dice[l][5]; dice[l][5] = dice[l][0]; break; } // printf("配列[%d][%d] %d ",l,i,dice[l][i]); // } // printf("\n"); } printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %dice = alloca [100 x [7 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 2800, ptr nonnull %dice) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp192 = icmp sgt i32 %0, 0 br i1 %cmp192, label %for.cond1.preheader, label %cleanup for.cond1.preheader: ; preds = %entry, %for.cond1.preheader %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond1.preheader ], [ 0, %entry ] %arrayidx5 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 1 %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %arrayidx5.1 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 2 %call6.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1) %arrayidx5.2 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 3 %call6.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2) %arrayidx5.3 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 4 %call6.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.3) %arrayidx5.4 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 5 %call6.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.4) %arrayidx5.5 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv, i64 6 %call6.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !9 for.cond10.preheader: ; preds = %for.cond1.preheader %cmp11197 = icmp sgt i32 %1, 1 br i1 %cmp11197, label %for.cond13.preheader.lr.ph, label %cleanup for.cond13.preheader.lr.ph: ; preds = %for.cond10.preheader %arrayidx17 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 1 %3 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %wide.trip.count = zext i32 %1 to i64 %arrayidx30.1 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 2 %4 = load <2 x i32>, ptr %arrayidx30.1, align 8 %arrayidx30.3 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 4 %5 = load i32, ptr %arrayidx30.3, align 16 %arrayidx30.4 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 5 %6 = load i32, ptr %arrayidx30.4, align 4 %arrayidx30.5 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 6 %7 = load i32, ptr %arrayidx30.5, align 8 %arrayidx30.1.1 = getelementptr inbounds [7 x i32], ptr %dice, i64 0, i64 2 %8 = load <4 x i32>, ptr %arrayidx30.1.1, align 8 br label %for.cond13.preheader for.cond13.preheader: ; preds = %for.cond13.preheader.lr.ph, %for.inc135 %indvars.iv217 = phi i64 [ 1, %for.cond13.preheader.lr.ph ], [ %indvars.iv.next218, %for.inc135 ] %arrayidx19 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217 %arrayidx20 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 1 %arrayidx20.promoted = load i32, ptr %arrayidx20, align 4, !tbaa !5 %arrayidx46 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 2 %arrayidx52 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 3 %arrayidx58 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 5 %arrayidx64 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 4 %arrayidx116 = getelementptr inbounds [100 x [7 x i32]], ptr %dice, i64 0, i64 %indvars.iv217, i64 6 br label %for.body15 for.body15: ; preds = %for.cond13.preheader, %if.end77 %i.1196 = phi i32 [ 0, %for.cond13.preheader ], [ %inc133, %if.end77 ] %9 = phi i32 [ %arrayidx20.promoted, %for.cond13.preheader ], [ %41, %if.end77 ] %cmp21 = icmp eq i32 %3, %9 br i1 %cmp21, label %for.inc37, label %if.end77 for.inc37: ; preds = %for.body15 %10 = load <2 x i32>, ptr %arrayidx46, align 4, !tbaa !5 %11 = icmp eq <2 x i32> %4, %10 %12 = extractelement <2 x i1> %11, i64 0 %13 = extractelement <2 x i1> %11, i64 1 %or.cond = select i1 %12, i1 %13, i1 false br i1 %or.cond, label %for.inc37.2, label %for.inc37.1208 for.inc37.2: ; preds = %for.inc37 %14 = load i32, ptr %arrayidx64, align 4, !tbaa !5 %cmp35.not.3 = icmp eq i32 %5, %14 br i1 %cmp35.not.3, label %for.inc37.3, label %for.inc37.1208 for.inc37.3: ; preds = %for.inc37.2 %15 = load i32, ptr %arrayidx58, align 4, !tbaa !5 %cmp35.not.4 = icmp eq i32 %6, %15 br i1 %cmp35.not.4, label %for.inc37.4, label %for.inc37.1208 for.inc37.4: ; preds = %for.inc37.3 %16 = load i32, ptr %arrayidx116, align 4, !tbaa !5 %cmp35.not.5 = icmp eq i32 %7, %16 br i1 %cmp35.not.5, label %cleanup, label %for.inc37.1208 for.inc37.1208: ; preds = %for.inc37.4, %for.inc37.3, %for.inc37.2, %for.inc37 %17 = load <2 x i32>, ptr %arrayidx64, align 4, !tbaa !5 %18 = extractelement <2 x i32> %10, i64 0 store i32 %18, ptr %arrayidx19, align 4, !tbaa !5 %19 = extractelement <2 x i32> %10, i64 1 store i32 %19, ptr %arrayidx46, align 4, !tbaa !5 %20 = extractelement <2 x i32> %17, i64 1 store i32 %20, ptr %arrayidx52, align 4, !tbaa !5 %21 = extractelement <2 x i32> %17, i64 0 store i32 %21, ptr %arrayidx58, align 4, !tbaa !5 store i32 %18, ptr %arrayidx64, align 4, !tbaa !5 %22 = shufflevector <2 x i32> %10, <2 x i32> %17, <4 x i32> <i32 1, i32 3, i32 0, i32 2> %23 = icmp eq <4 x i32> %8, %22 %24 = freeze <4 x i1> %23 %25 = bitcast <4 x i1> %24 to i4 %26 = icmp eq i4 %25, -1 br i1 %26, label %for.inc37.4.1, label %for.inc37.2212 for.inc37.4.1: ; preds = %for.inc37.1208 %27 = load i32, ptr %arrayidx116, align 4, !tbaa !5 %cmp35.not.5.1 = icmp eq i32 %7, %27 br i1 %cmp35.not.5.1, label %cleanup, label %for.inc37.2212 for.inc37.2212: ; preds = %for.inc37.4.1, %for.inc37.1208 store i32 %19, ptr %arrayidx19, align 4, !tbaa !5 %28 = shufflevector <2 x i32> %17, <2 x i32> %10, <4 x i32> <i32 1, i32 0, i32 3, i32 2> store <4 x i32> %28, ptr %arrayidx46, align 4, !tbaa !5 %29 = icmp eq <4 x i32> %8, %28 %30 = freeze <4 x i1> %29 %31 = bitcast <4 x i1> %30 to i4 %32 = icmp eq i4 %31, -1 br i1 %32, label %for.inc37.4.2, label %for.inc37.3216 for.inc37.4.2: ; preds = %for.inc37.2212 %33 = load i32, ptr %arrayidx116, align 4, !tbaa !5 %cmp35.not.5.2 = icmp eq i32 %7, %33 br i1 %cmp35.not.5.2, label %cleanup, label %for.inc37.3216 for.inc37.3216: ; preds = %for.inc37.4.2, %for.inc37.2212 store i32 %20, ptr %arrayidx19, align 4, !tbaa !5 store i32 %21, ptr %arrayidx46, align 4, !tbaa !5 store i32 %18, ptr %arrayidx52, align 4, !tbaa !5 store i32 %19, ptr %arrayidx58, align 4, !tbaa !5 store i32 %20, ptr %arrayidx64, align 4, !tbaa !5 %34 = shufflevector <2 x i32> %17, <2 x i32> %10, <4 x i32> <i32 0, i32 2, i32 1, i32 3> %35 = icmp eq <4 x i32> %8, %34 %36 = freeze <4 x i1> %35 %37 = bitcast <4 x i1> %36 to i4 %38 = icmp eq i4 %37, -1 br i1 %38, label %for.inc37.4.3, label %if.end43.3 for.inc37.4.3: ; preds = %for.inc37.3216 %39 = load i32, ptr %arrayidx116, align 4, !tbaa !5 %cmp35.not.5.3 = icmp eq i32 %7, %39 br i1 %cmp35.not.5.3, label %cleanup, label %if.end43.3 if.end43.3: ; preds = %for.inc37.3216, %for.inc37.4.3 %40 = shufflevector <2 x i32> %10, <2 x i32> %17, <4 x i32> <i32 0, i32 1, i32 2, i32 3> store <4 x i32> %40, ptr %arrayidx46, align 4, !tbaa !5 br label %if.end77 if.end77: ; preds = %if.end43.3, %for.body15 store i32 %9, ptr %arrayidx19, align 4, !tbaa !5 %cond = icmp eq i32 %i.1196, 2 %arrayidx52.arrayidx46 = select i1 %cond, ptr %arrayidx52, ptr %arrayidx46 %arrayidx64.arrayidx58 = select i1 %cond, ptr %arrayidx64, ptr %arrayidx58 %41 = load i32, ptr %arrayidx52.arrayidx46, align 4, !tbaa !5 store i32 %41, ptr %arrayidx20, align 4, !tbaa !5 %42 = load i32, ptr %arrayidx116, align 4, !tbaa !5 store i32 %42, ptr %arrayidx52.arrayidx46, align 4, !tbaa !5 %43 = load i32, ptr %arrayidx64.arrayidx58, align 4, !tbaa !5 store i32 %43, ptr %arrayidx116, align 4, !tbaa !5 store i32 %9, ptr %arrayidx64.arrayidx58, align 4, !tbaa !5 %inc133 = add nuw nsw i32 %i.1196, 1 %exitcond.not = icmp eq i32 %inc133, 6 br i1 %exitcond.not, label %for.inc135, label %for.body15, !llvm.loop !11 for.inc135: ; preds = %if.end77 %indvars.iv.next218 = add nuw nsw i64 %indvars.iv217, 1 %exitcond220.not = icmp eq i64 %indvars.iv.next218, %wide.trip.count br i1 %exitcond220.not, label %cleanup, label %for.cond13.preheader, !llvm.loop !12 cleanup: ; preds = %for.inc135, %for.inc37.4, %for.inc37.4.1, %for.inc37.4.2, %for.inc37.4.3, %for.cond10.preheader, %entry %str.sink = phi ptr [ @str, %entry ], [ @str, %for.cond10.preheader ], [ @str.3, %for.inc37.4.3 ], [ @str.3, %for.inc37.4.2 ], [ @str.3, %for.inc37.4.1 ], [ @str.3, %for.inc37.4 ], [ @str, %for.inc135 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 2800, ptr nonnull %dice) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <string.h> char str[110]; int i,j,k,l,m,n; int n,e,s,w; int a[105][7],b[105][7]; int t; void input() { scanf("%d",&n); for(j=0;j<n;j++){ for(i=0;i<6;i++){ scanf("%d",&a[j][i+1]); b[j][i+1] = a[j][i+1]; // printf("a[%d] = %d\n",i+1,a[i+1]); } } } void N() { t = a[m][1]; a[m][1] = a[m][2]; a[m][2] = a[m][6]; a[m][6] = a[m][5]; a[m][5] = t; } void S() { t = a[m][1]; a[m][1] = a[m][5]; a[m][5] = a[m][6]; a[m][6] = a[m][2]; a[m][2] = t; } void E() { t = a[m][1]; a[m][1] = a[m][4]; a[m][4] = a[m][6]; a[m][6] = a[m][3]; a[m][3] = t; } void W() { t = a[m][1]; a[m][1] = a[m][3]; a[m][3] = a[m][6]; a[m][6] = a[m][4]; a[m][4] = t; } void UF() { if(a[k][1] == a[m][1]) { // if qu == 1; // printf("qu == 1\n"); if(a[k][2] == a[m][3]) strcpy( str, "NWS"); else if(a[k][2] == a[m][5]) strcpy(str ,"NEES"); else if(a[k][2] == a[m][4]) strcpy(str,"NES"); } else if(a[k][1] == a[m][2]) { // if qu == 2; // printf("qu == 2\n"); if(a[k][2] == a[m][3]) strcpy( str, "NWS"); else if(a[k][2] == a[m][1] ) strcpy(str ,"NEES"); else if(a[k][2] == a[m][4]) strcpy(str,"NES"); N(); } else if(a[k][1] == a[m][3]){ // if qu == 3; // printf("qu(%d) == %d\n",qu[k],a[3]); if(a[k][2] == a[m][6]) strcpy( str, "NWS"); else if(a[k][2] == a[m][5]) strcpy(str ,"NEES"); else if(a[k][2] == a[m][1]) strcpy(str,"NES"); W(); } else if(a[k][1] == a[m][4]) { if(a[k][2] == a[m][1]) strcpy( str, "NWS"); if(a[k][2] == a[m][5]) strcpy(str ,"NEES"); if(a[k][2] == a[m][6]) strcpy(str,"NES"); E(); } else if(a[k][1] == a[m][5]) { if(a[k][2] == a[m][3]) strcpy( str, "NWS"); else if(a[k][2] == a[m][6]) strcpy(str ,"NEES"); else if(a[k][2] == a[m][4]) strcpy(str,"NES"); S(); } else if(a[k][1] == a[m][6]) { if(a[k][2] == a[m][3]) strcpy( str, "NWS"); else if(a[k][2] == a[m][2]) strcpy(str ,"NEES"); else if(a[k][2] == a[m][4]) strcpy(str,"NES"); N(); N(); } } void output() { if(l == 6) printf("No\n"); else printf("Yes\n"); } void IF() { for(i=0;i<strlen(str);i++) { if(str[i] == 'N') N(); else if(str[i] == 'S') S(); else if(str[i] == 'W') W(); else if(str[i] == 'E') E(); } } int main() { input(); for(k=0;k<n;k++) { for(m=0; m<n;m++) { UF(); IF(); l=0; if(k != m) { for(i=1; i<=6;i++) { if(a[k][i] == a[m][i]) l++; // printf("{a[%d][%d]=%d} == {a[%d][%d]=%d} ?\n",k,i,a[k][i],m,i,a[m][i]); } } if(l == 6) break; } if(l ==6) break; } output(); // strlen(?) ???????????????(??°) return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135356/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135356/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @n = dso_local global i32 0, align 4 @j = dso_local local_unnamed_addr global i32 0, align 4 @i = dso_local local_unnamed_addr global i32 0, align 4 @a = dso_local global [105 x [7 x i32]] zeroinitializer, align 16 @b = dso_local local_unnamed_addr global [105 x [7 x i32]] zeroinitializer, align 16 @m = dso_local local_unnamed_addr global i32 0, align 4 @t = dso_local local_unnamed_addr global i32 0, align 4 @k = dso_local local_unnamed_addr global i32 0, align 4 @str = dso_local global [110 x i8] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [5 x i8] c"NEES\00", align 1 @l = dso_local local_unnamed_addr global i32 0, align 4 @e = dso_local local_unnamed_addr global i32 0, align 4 @s = dso_local local_unnamed_addr global i32 0, align 4 @w = dso_local local_unnamed_addr global i32 0, align 4 @str.6 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.7 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @input() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) store i32 0, ptr @j, align 4, !tbaa !5 %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp22 = icmp sgt i32 %0, 0 br i1 %cmp22, label %for.cond1.preheader, label %for.end19 for.cond1.preheader: ; preds = %entry, %for.inc17 %1 = phi i32 [ %inc18, %for.inc17 ], [ 0, %entry ] store i32 0, ptr @i, align 4, !tbaa !5 br label %for.body3 for.body3: ; preds = %for.cond1.preheader, %for.body3 %2 = phi i32 [ %1, %for.cond1.preheader ], [ %3, %for.body3 ] %storemerge2021 = phi i32 [ 0, %for.cond1.preheader ], [ %add9, %for.body3 ] %idxprom = sext i32 %2 to i64 %add = add nsw i32 %storemerge2021, 1 %idxprom4 = sext i32 %add to i64 %arrayidx5 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 %idxprom4 %call6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %3 = load i32, ptr @j, align 4, !tbaa !5 %idxprom7 = sext i32 %3 to i64 %4 = load i32, ptr @i, align 4, !tbaa !5 %add9 = add nsw i32 %4, 1 %idxprom10 = sext i32 %add9 to i64 %arrayidx11 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom7, i64 %idxprom10 %5 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [105 x [7 x i32]], ptr @b, i64 0, i64 %idxprom7, i64 %idxprom10 store i32 %5, ptr %arrayidx16, align 4, !tbaa !5 store i32 %add9, ptr @i, align 4, !tbaa !5 %cmp2 = icmp slt i32 %4, 5 br i1 %cmp2, label %for.body3, label %for.inc17, !llvm.loop !9 for.inc17: ; preds = %for.body3 %inc18 = add nsw i32 %3, 1 store i32 %inc18, ptr @j, align 4, !tbaa !5 %6 = load i32, ptr @n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc18, %6 br i1 %cmp, label %for.cond1.preheader, label %for.end19, !llvm.loop !11 for.end19: ; preds = %for.inc17, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @N() local_unnamed_addr #2 { entry: %0 = load i32, ptr @m, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 store i32 %1, ptr @t, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 store i32 %2, ptr %arrayidx1, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 6 %3 = load i32, ptr %arrayidx10, align 4, !tbaa !5 store i32 %3, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 5 %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 store i32 %4, ptr %arrayidx10, align 4, !tbaa !5 store i32 %1, ptr %arrayidx16, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @S() local_unnamed_addr #2 { entry: %0 = load i32, ptr @m, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 store i32 %1, ptr @t, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 5 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 store i32 %2, ptr %arrayidx1, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 6 %3 = load i32, ptr %arrayidx10, align 4, !tbaa !5 store i32 %3, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 store i32 %4, ptr %arrayidx10, align 4, !tbaa !5 store i32 %1, ptr %arrayidx16, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @E() local_unnamed_addr #2 { entry: %0 = load i32, ptr @m, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 store i32 %1, ptr @t, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 4 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 store i32 %2, ptr %arrayidx1, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 6 %3 = load i32, ptr %arrayidx10, align 4, !tbaa !5 store i32 %3, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 3 %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 store i32 %4, ptr %arrayidx10, align 4, !tbaa !5 store i32 %1, ptr %arrayidx16, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @W() local_unnamed_addr #2 { entry: %0 = load i32, ptr @m, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 store i32 %1, ptr @t, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 3 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 store i32 %2, ptr %arrayidx1, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 6 %3 = load i32, ptr %arrayidx10, align 4, !tbaa !5 store i32 %3, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 4 %4 = load i32, ptr %arrayidx16, align 4, !tbaa !5 store i32 %4, ptr %arrayidx10, align 4, !tbaa !5 store i32 %1, ptr %arrayidx16, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @UF() local_unnamed_addr #3 { entry: %0 = load i32, ptr @k, align 4, !tbaa !5 %idxprom = sext i32 %0 to i64 %arrayidx1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %2 = load i32, ptr @m, align 4, !tbaa !5 %idxprom2 = sext i32 %2 to i64 %arrayidx4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 1 %3 = load i32, ptr %arrayidx4, align 4, !tbaa !5 %cmp = icmp eq i32 %1, %3 br i1 %cmp, label %if.then, label %if.else34 if.then: ; preds = %entry %arrayidx7 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %4 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %arrayidx10 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 3 %5 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %cmp11 = icmp eq i32 %4, %5 br i1 %cmp11, label %if.then12, label %if.else if.then12: ; preds = %if.then store i32 5461838, ptr @str, align 16 br label %if.end242 if.else: ; preds = %if.then %arrayidx18 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 5 %6 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %cmp19 = icmp eq i32 %4, %6 br i1 %cmp19, label %if.then20, label %if.else22 if.then20: ; preds = %if.else tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end242 if.else22: ; preds = %if.else %arrayidx28 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 4 %7 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %cmp29 = icmp eq i32 %4, %7 br i1 %cmp29, label %if.then30, label %if.end242 if.then30: ; preds = %if.else22 store i32 5457230, ptr @str, align 16 br label %if.end242 if.else34: ; preds = %entry %arrayidx40 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 2 %8 = load i32, ptr %arrayidx40, align 4, !tbaa !5 %cmp41 = icmp eq i32 %1, %8 br i1 %cmp41, label %if.then42, label %if.else75 if.then42: ; preds = %if.else34 %arrayidx45 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %9 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %arrayidx48 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 3 %10 = load i32, ptr %arrayidx48, align 4, !tbaa !5 %cmp49 = icmp eq i32 %9, %10 br i1 %cmp49, label %if.then50, label %if.else52 if.then50: ; preds = %if.then42 store i32 5461838, ptr @str, align 16 br label %if.end74 if.else52: ; preds = %if.then42 %cmp59 = icmp eq i32 %9, %3 br i1 %cmp59, label %if.then60, label %if.else62 if.then60: ; preds = %if.else52 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end74 if.else62: ; preds = %if.else52 %arrayidx68 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 4 %11 = load i32, ptr %arrayidx68, align 4, !tbaa !5 %cmp69 = icmp eq i32 %9, %11 br i1 %cmp69, label %if.then70, label %if.end74 if.then70: ; preds = %if.else62 store i32 5457230, ptr @str, align 16 br label %if.end74 if.end74: ; preds = %if.then60, %if.then70, %if.else62, %if.then50 store i32 %3, ptr @t, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx10.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %12 = load i32, ptr %arrayidx10.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx40, align 4, !tbaa !5 %arrayidx16.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 5 %13 = load i32, ptr %arrayidx16.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx10.i, align 4, !tbaa !5 store i32 %3, ptr %arrayidx16.i, align 4, !tbaa !5 br label %if.end242 if.else75: ; preds = %if.else34 %arrayidx81 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 3 %14 = load i32, ptr %arrayidx81, align 4, !tbaa !5 %cmp82 = icmp eq i32 %1, %14 br i1 %cmp82, label %if.then83, label %if.else116 if.then83: ; preds = %if.else75 %arrayidx86 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %15 = load i32, ptr %arrayidx86, align 4, !tbaa !5 %arrayidx89 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %16 = load i32, ptr %arrayidx89, align 4, !tbaa !5 %cmp90 = icmp eq i32 %15, %16 br i1 %cmp90, label %if.then91, label %if.else93 if.then91: ; preds = %if.then83 store i32 5461838, ptr @str, align 16 br label %if.end115 if.else93: ; preds = %if.then83 %arrayidx99 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 5 %17 = load i32, ptr %arrayidx99, align 4, !tbaa !5 %cmp100 = icmp eq i32 %15, %17 br i1 %cmp100, label %if.then101, label %if.else103 if.then101: ; preds = %if.else93 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end115 if.else103: ; preds = %if.else93 %cmp110 = icmp eq i32 %15, %3 br i1 %cmp110, label %if.then111, label %if.end115 if.then111: ; preds = %if.else103 store i32 5457230, ptr @str, align 16 br label %if.end115 if.end115: ; preds = %if.then101, %if.then111, %if.else103, %if.then91 store i32 %3, ptr @t, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4, align 4, !tbaa !5 store i32 %16, ptr %arrayidx81, align 4, !tbaa !5 %arrayidx16.i256 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 4 %18 = load i32, ptr %arrayidx16.i256, align 4, !tbaa !5 store i32 %18, ptr %arrayidx89, align 4, !tbaa !5 store i32 %3, ptr %arrayidx16.i256, align 4, !tbaa !5 br label %if.end242 if.else116: ; preds = %if.else75 %arrayidx122 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 4 %19 = load i32, ptr %arrayidx122, align 4, !tbaa !5 %cmp123 = icmp eq i32 %1, %19 br i1 %cmp123, label %if.then124, label %if.else155 if.then124: ; preds = %if.else116 %arrayidx127 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %20 = load i32, ptr %arrayidx127, align 4, !tbaa !5 %cmp131 = icmp eq i32 %20, %3 br i1 %cmp131, label %if.then132, label %if.end134 if.then132: ; preds = %if.then124 store i32 5461838, ptr @str, align 16 br label %if.end134 if.end134: ; preds = %if.then132, %if.then124 %arrayidx140 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 5 %21 = load i32, ptr %arrayidx140, align 4, !tbaa !5 %cmp141 = icmp eq i32 %20, %21 br i1 %cmp141, label %if.then142, label %if.end144 if.then142: ; preds = %if.end134 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end144 if.end144: ; preds = %if.then142, %if.end134 %arrayidx150 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %22 = load i32, ptr %arrayidx150, align 4, !tbaa !5 %cmp151 = icmp eq i32 %20, %22 br i1 %cmp151, label %if.then152, label %if.end154 if.then152: ; preds = %if.end144 store i32 5457230, ptr @str, align 16 br label %if.end154 if.end154: ; preds = %if.then152, %if.end144 store i32 %3, ptr @t, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4, align 4, !tbaa !5 store i32 %22, ptr %arrayidx122, align 4, !tbaa !5 store i32 %14, ptr %arrayidx150, align 4, !tbaa !5 store i32 %3, ptr %arrayidx81, align 4, !tbaa !5 br label %if.end242 if.else155: ; preds = %if.else116 %arrayidx161 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 5 %23 = load i32, ptr %arrayidx161, align 4, !tbaa !5 %cmp162 = icmp eq i32 %1, %23 br i1 %cmp162, label %if.then163, label %if.else196 if.then163: ; preds = %if.else155 %arrayidx166 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %24 = load i32, ptr %arrayidx166, align 4, !tbaa !5 %cmp170 = icmp eq i32 %24, %14 br i1 %cmp170, label %if.then171, label %if.else173 if.then171: ; preds = %if.then163 store i32 5461838, ptr @str, align 16 %arrayidx10.i265.phi.trans.insert = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %.pre = load i32, ptr %arrayidx10.i265.phi.trans.insert, align 4, !tbaa !5 br label %if.end195 if.else173: ; preds = %if.then163 %arrayidx179 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %25 = load i32, ptr %arrayidx179, align 4, !tbaa !5 %cmp180 = icmp eq i32 %24, %25 br i1 %cmp180, label %if.then181, label %if.else183 if.then181: ; preds = %if.else173 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end195 if.else183: ; preds = %if.else173 %cmp190 = icmp eq i32 %24, %19 br i1 %cmp190, label %if.then191, label %if.end195 if.then191: ; preds = %if.else183 store i32 5457230, ptr @str, align 16 br label %if.end195 if.end195: ; preds = %if.then181, %if.then191, %if.else183, %if.then171 %26 = phi i32 [ %24, %if.then181 ], [ %25, %if.then191 ], [ %25, %if.else183 ], [ %.pre, %if.then171 ] store i32 %3, ptr @t, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx10.i265 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 store i32 %26, ptr %arrayidx161, align 4, !tbaa !5 store i32 %8, ptr %arrayidx10.i265, align 4, !tbaa !5 store i32 %3, ptr %arrayidx40, align 4, !tbaa !5 br label %if.end242 if.else196: ; preds = %if.else155 %arrayidx202 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom2, i64 6 %27 = load i32, ptr %arrayidx202, align 4, !tbaa !5 %cmp203 = icmp eq i32 %1, %27 br i1 %cmp203, label %if.then204, label %if.end242 if.then204: ; preds = %if.else196 %arrayidx207 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %28 = load i32, ptr %arrayidx207, align 4, !tbaa !5 %cmp211 = icmp eq i32 %28, %14 br i1 %cmp211, label %if.then212, label %if.else214 if.then212: ; preds = %if.then204 store i32 5461838, ptr @str, align 16 br label %if.end236 if.else214: ; preds = %if.then204 %cmp221 = icmp eq i32 %28, %8 br i1 %cmp221, label %if.then222, label %if.else224 if.then222: ; preds = %if.else214 tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 16 dereferenceable(5) @str, ptr noundef nonnull align 1 dereferenceable(5) @.str.2, i64 5, i1 false) #8 br label %if.end236 if.else224: ; preds = %if.else214 %cmp231 = icmp eq i32 %28, %19 br i1 %cmp231, label %if.then232, label %if.end236 if.then232: ; preds = %if.else224 store i32 5457230, ptr @str, align 16 br label %if.end236 if.end236: ; preds = %if.then222, %if.then232, %if.else224, %if.then212 store i32 %8, ptr @t, align 4, !tbaa !5 store i32 %1, ptr %arrayidx4, align 4, !tbaa !5 store i32 %23, ptr %arrayidx40, align 4, !tbaa !5 store i32 %3, ptr %arrayidx202, align 4, !tbaa !5 store i32 %8, ptr %arrayidx161, align 4, !tbaa !5 br label %if.end242 if.end242: ; preds = %if.end74, %if.end154, %if.else196, %if.end236, %if.end195, %if.end115, %if.then12, %if.else22, %if.then30, %if.then20 ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @output() local_unnamed_addr #0 { entry: %0 = load i32, ptr @l, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 6 %str.7.str.6 = select i1 %cmp, ptr @str.7, ptr @str.6 %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) %str.7.str.6) ret void } ; Function Attrs: nofree nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @IF() local_unnamed_addr #4 { entry: %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #9 %cmp43.not = icmp eq i64 %call, 0 br i1 %cmp43.not, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %0 = load i32, ptr @m, align 4 %idxprom.i38 = sext i32 %0 to i64 %arrayidx1.i39 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 1 %arrayidx4.i40 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 4 %arrayidx10.i41 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 6 %arrayidx16.i42 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 3 %arrayidx4.i30 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 5 %arrayidx16.i32 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38, i64 2 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc ] %arrayidx = getelementptr inbounds [110 x i8], ptr @str, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !12 switch i8 %1, label %for.inc [ i8 78, label %if.then i8 83, label %if.then10 i8 87, label %if.then17 i8 69, label %if.then24 ] if.then: ; preds = %for.body %2 = load i32, ptr %arrayidx1.i39, align 4, !tbaa !5 store i32 %2, ptr @t, align 4, !tbaa !5 %3 = load i32, ptr %arrayidx16.i32, align 4, !tbaa !5 store i32 %3, ptr %arrayidx1.i39, align 4, !tbaa !5 %4 = load i32, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %4, ptr %arrayidx16.i32, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx4.i30, align 4, !tbaa !5 store i32 %5, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %2, ptr %arrayidx4.i30, align 4, !tbaa !5 br label %for.inc if.then10: ; preds = %for.body %6 = load i32, ptr %arrayidx1.i39, align 4, !tbaa !5 store i32 %6, ptr @t, align 4, !tbaa !5 %7 = load i32, ptr %arrayidx4.i30, align 4, !tbaa !5 store i32 %7, ptr %arrayidx1.i39, align 4, !tbaa !5 %8 = load i32, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %8, ptr %arrayidx4.i30, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx16.i32, align 4, !tbaa !5 store i32 %9, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %6, ptr %arrayidx16.i32, align 4, !tbaa !5 br label %for.inc if.then17: ; preds = %for.body %10 = load i32, ptr %arrayidx1.i39, align 4, !tbaa !5 store i32 %10, ptr @t, align 4, !tbaa !5 %11 = load i32, ptr %arrayidx16.i42, align 4, !tbaa !5 store i32 %11, ptr %arrayidx1.i39, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %12, ptr %arrayidx16.i42, align 4, !tbaa !5 %13 = load i32, ptr %arrayidx4.i40, align 4, !tbaa !5 store i32 %13, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %10, ptr %arrayidx4.i40, align 4, !tbaa !5 br label %for.inc if.then24: ; preds = %for.body %14 = load i32, ptr %arrayidx1.i39, align 4, !tbaa !5 store i32 %14, ptr @t, align 4, !tbaa !5 %15 = load i32, ptr %arrayidx4.i40, align 4, !tbaa !5 store i32 %15, ptr %arrayidx1.i39, align 4, !tbaa !5 %16 = load i32, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %16, ptr %arrayidx4.i40, align 4, !tbaa !5 %17 = load i32, ptr %arrayidx16.i42, align 4, !tbaa !5 store i32 %17, ptr %arrayidx10.i41, align 4, !tbaa !5 store i32 %14, ptr %arrayidx16.i42, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body, %if.then, %if.then17, %if.then24, %if.then10 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %call br i1 %exitcond.not, label %for.end.loopexit, label %for.body, !llvm.loop !13 for.end.loopexit: ; preds = %for.inc %18 = trunc i64 %call to i32 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %storemerge.lcssa = phi i32 [ 0, %entry ], [ %18, %for.end.loopexit ] store i32 %storemerge.lcssa, ptr @i, align 4, !tbaa !5 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 uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call.i = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) store i32 0, ptr @j, align 4, !tbaa !5 %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp22.i = icmp sgt i32 %0, 0 br i1 %cmp22.i, label %for.cond1.preheader.i, label %input.exit.thread input.exit.thread: ; preds = %entry store i32 0, ptr @k, align 4, !tbaa !5 br label %for.end29 for.cond1.preheader.i: ; preds = %entry, %for.inc17.i %1 = phi i32 [ %inc18.i, %for.inc17.i ], [ 0, %entry ] store i32 0, ptr @i, align 4, !tbaa !5 br label %for.body3.i for.body3.i: ; preds = %for.body3.i, %for.cond1.preheader.i %2 = phi i32 [ %1, %for.cond1.preheader.i ], [ %3, %for.body3.i ] %storemerge2021.i = phi i32 [ 0, %for.cond1.preheader.i ], [ %add9.i, %for.body3.i ] %idxprom.i = sext i32 %2 to i64 %add.i = add nsw i32 %storemerge2021.i, 1 %idxprom4.i = sext i32 %add.i to i64 %arrayidx5.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i, i64 %idxprom4.i %call6.i = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.i) %3 = load i32, ptr @j, align 4, !tbaa !5 %idxprom7.i = sext i32 %3 to i64 %4 = load i32, ptr @i, align 4, !tbaa !5 %add9.i = add nsw i32 %4, 1 %idxprom10.i = sext i32 %add9.i to i64 %arrayidx11.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom7.i, i64 %idxprom10.i %5 = load i32, ptr %arrayidx11.i, align 4, !tbaa !5 %arrayidx16.i = getelementptr inbounds [105 x [7 x i32]], ptr @b, i64 0, i64 %idxprom7.i, i64 %idxprom10.i store i32 %5, ptr %arrayidx16.i, align 4, !tbaa !5 store i32 %add9.i, ptr @i, align 4, !tbaa !5 %cmp2.i = icmp slt i32 %4, 5 br i1 %cmp2.i, label %for.body3.i, label %for.inc17.i, !llvm.loop !9 for.inc17.i: ; preds = %for.body3.i %inc18.i = add nsw i32 %3, 1 store i32 %inc18.i, ptr @j, align 4, !tbaa !5 %6 = load i32, ptr @n, align 4, !tbaa !5 %cmp.i = icmp slt i32 %inc18.i, %6 br i1 %cmp.i, label %for.cond1.preheader.i, label %input.exit, !llvm.loop !11 input.exit: ; preds = %for.inc17.i store i32 0, ptr @k, align 4, !tbaa !5 %cmp43 = icmp sgt i32 %6, 0 br i1 %cmp43, label %for.cond1.preheader, label %for.end29 for.cond1.preheader: ; preds = %input.exit, %for.inc27 %7 = phi i32 [ %42, %for.inc27 ], [ %6, %input.exit ] %8 = phi i32 [ %inc28, %for.inc27 ], [ 0, %input.exit ] store i32 0, ptr @m, align 4, !tbaa !5 %cmp242 = icmp sgt i32 %7, 0 br i1 %cmp242, label %for.body3, label %for.end23 for.body3: ; preds = %for.cond1.preheader, %for.inc21 tail call void @UF() %call.i32 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #9 %cmp43.not.i = icmp eq i64 %call.i32, 0 %.pre = load i32, ptr @m, align 4 br i1 %cmp43.not.i, label %IF.exit, label %for.body.lr.ph.i for.body.lr.ph.i: ; preds = %for.body3 %idxprom.i38.i = sext i32 %.pre to i64 %arrayidx1.i39.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 1 %arrayidx4.i40.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 4 %arrayidx10.i41.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 6 %arrayidx16.i42.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 3 %arrayidx4.i30.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 5 %arrayidx16.i32.i = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom.i38.i, i64 2 br label %for.body.i for.body.i: ; preds = %for.inc.i, %for.body.lr.ph.i %indvars.iv.i = phi i64 [ 0, %for.body.lr.ph.i ], [ %indvars.iv.next.i, %for.inc.i ] %arrayidx.i = getelementptr inbounds [110 x i8], ptr @str, i64 0, i64 %indvars.iv.i %9 = load i8, ptr %arrayidx.i, align 1, !tbaa !12 switch i8 %9, label %for.inc.i [ i8 78, label %if.then.i i8 83, label %if.then10.i i8 87, label %if.then17.i i8 69, label %if.then24.i ] if.then.i: ; preds = %for.body.i %10 = load i32, ptr %arrayidx1.i39.i, align 4, !tbaa !5 store i32 %10, ptr @t, align 4, !tbaa !5 %11 = load i32, ptr %arrayidx16.i32.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx1.i39.i, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx16.i32.i, align 4, !tbaa !5 %13 = load i32, ptr %arrayidx4.i30.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %10, ptr %arrayidx4.i30.i, align 4, !tbaa !5 br label %for.inc.i if.then10.i: ; preds = %for.body.i %14 = load i32, ptr %arrayidx1.i39.i, align 4, !tbaa !5 store i32 %14, ptr @t, align 4, !tbaa !5 %15 = load i32, ptr %arrayidx4.i30.i, align 4, !tbaa !5 store i32 %15, ptr %arrayidx1.i39.i, align 4, !tbaa !5 %16 = load i32, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %16, ptr %arrayidx4.i30.i, align 4, !tbaa !5 %17 = load i32, ptr %arrayidx16.i32.i, align 4, !tbaa !5 store i32 %17, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %14, ptr %arrayidx16.i32.i, align 4, !tbaa !5 br label %for.inc.i if.then17.i: ; preds = %for.body.i %18 = load i32, ptr %arrayidx1.i39.i, align 4, !tbaa !5 store i32 %18, ptr @t, align 4, !tbaa !5 %19 = load i32, ptr %arrayidx16.i42.i, align 4, !tbaa !5 store i32 %19, ptr %arrayidx1.i39.i, align 4, !tbaa !5 %20 = load i32, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %20, ptr %arrayidx16.i42.i, align 4, !tbaa !5 %21 = load i32, ptr %arrayidx4.i40.i, align 4, !tbaa !5 store i32 %21, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %18, ptr %arrayidx4.i40.i, align 4, !tbaa !5 br label %for.inc.i if.then24.i: ; preds = %for.body.i %22 = load i32, ptr %arrayidx1.i39.i, align 4, !tbaa !5 store i32 %22, ptr @t, align 4, !tbaa !5 %23 = load i32, ptr %arrayidx4.i40.i, align 4, !tbaa !5 store i32 %23, ptr %arrayidx1.i39.i, align 4, !tbaa !5 %24 = load i32, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %24, ptr %arrayidx4.i40.i, align 4, !tbaa !5 %25 = load i32, ptr %arrayidx16.i42.i, align 4, !tbaa !5 store i32 %25, ptr %arrayidx10.i41.i, align 4, !tbaa !5 store i32 %22, ptr %arrayidx16.i42.i, align 4, !tbaa !5 br label %for.inc.i for.inc.i: ; preds = %if.then24.i, %if.then17.i, %if.then10.i, %if.then.i, %for.body.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %call.i32 br i1 %exitcond.not.i, label %for.end.loopexit.i, label %for.body.i, !llvm.loop !13 for.end.loopexit.i: ; preds = %for.inc.i %26 = trunc i64 %call.i32 to i32 br label %IF.exit IF.exit: ; preds = %for.body3, %for.end.loopexit.i %storemerge.lcssa.i = phi i32 [ 0, %for.body3 ], [ %26, %for.end.loopexit.i ] store i32 %storemerge.lcssa.i, ptr @i, align 4, !tbaa !5 store i32 0, ptr @l, align 4, !tbaa !5 %27 = load i32, ptr @k, align 4, !tbaa !5 %cmp4.not = icmp eq i32 %27, %.pre br i1 %cmp4.not, label %for.inc21, label %for.cond5.preheader for.cond5.preheader: ; preds = %IF.exit %idxprom = sext i32 %27 to i64 %idxprom10 = sext i32 %.pre to i64 %arrayidx9 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 1 %28 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %arrayidx13 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 1 %29 = load i32, ptr %arrayidx13, align 4, !tbaa !5 %cmp14 = icmp eq i32 %28, %29 br i1 %cmp14, label %if.then15, label %for.inc if.then15: ; preds = %for.cond5.preheader store i32 1, ptr @l, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.cond5.preheader, %if.then15 %inc38 = phi i32 [ 0, %for.cond5.preheader ], [ 1, %if.then15 ] %arrayidx9.1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 2 %30 = load i32, ptr %arrayidx9.1, align 4, !tbaa !5 %arrayidx13.1 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 2 %31 = load i32, ptr %arrayidx13.1, align 4, !tbaa !5 %cmp14.1 = icmp eq i32 %30, %31 br i1 %cmp14.1, label %if.then15.1, label %for.inc.1 if.then15.1: ; preds = %for.inc %inc.1 = add nuw nsw i32 %inc38, 1 store i32 %inc.1, ptr @l, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then15.1, %for.inc %inc38.1 = phi i32 [ %inc38, %for.inc ], [ %inc.1, %if.then15.1 ] %arrayidx9.2 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 3 %32 = load i32, ptr %arrayidx9.2, align 4, !tbaa !5 %arrayidx13.2 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 3 %33 = load i32, ptr %arrayidx13.2, align 4, !tbaa !5 %cmp14.2 = icmp eq i32 %32, %33 br i1 %cmp14.2, label %if.then15.2, label %for.inc.2 if.then15.2: ; preds = %for.inc.1 %inc.2 = add nuw nsw i32 %inc38.1, 1 store i32 %inc.2, ptr @l, align 4, !tbaa !5 br label %for.inc.2 for.inc.2: ; preds = %if.then15.2, %for.inc.1 %inc38.2 = phi i32 [ %inc38.1, %for.inc.1 ], [ %inc.2, %if.then15.2 ] %arrayidx9.3 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 4 %34 = load i32, ptr %arrayidx9.3, align 4, !tbaa !5 %arrayidx13.3 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 4 %35 = load i32, ptr %arrayidx13.3, align 4, !tbaa !5 %cmp14.3 = icmp eq i32 %34, %35 br i1 %cmp14.3, label %if.then15.3, label %for.inc.3 if.then15.3: ; preds = %for.inc.2 %inc.3 = add nuw nsw i32 %inc38.2, 1 store i32 %inc.3, ptr @l, align 4, !tbaa !5 br label %for.inc.3 for.inc.3: ; preds = %if.then15.3, %for.inc.2 %inc38.3 = phi i32 [ %inc38.2, %for.inc.2 ], [ %inc.3, %if.then15.3 ] %arrayidx9.4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 5 %36 = load i32, ptr %arrayidx9.4, align 4, !tbaa !5 %arrayidx13.4 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 5 %37 = load i32, ptr %arrayidx13.4, align 4, !tbaa !5 %cmp14.4 = icmp eq i32 %36, %37 br i1 %cmp14.4, label %if.then15.4, label %for.inc.4 if.then15.4: ; preds = %for.inc.3 %inc.4 = add nuw nsw i32 %inc38.3, 1 store i32 %inc.4, ptr @l, align 4, !tbaa !5 br label %for.inc.4 for.inc.4: ; preds = %if.then15.4, %for.inc.3 %inc38.4 = phi i32 [ %inc38.3, %for.inc.3 ], [ %inc.4, %if.then15.4 ] %arrayidx9.5 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom, i64 6 %38 = load i32, ptr %arrayidx9.5, align 4, !tbaa !5 %arrayidx13.5 = getelementptr inbounds [105 x [7 x i32]], ptr @a, i64 0, i64 %idxprom10, i64 6 %39 = load i32, ptr %arrayidx13.5, align 4, !tbaa !5 %cmp14.5 = icmp eq i32 %38, %39 br i1 %cmp14.5, label %for.inc.5, label %for.inc.5.thread for.inc.5.thread: ; preds = %for.inc.4 store i32 7, ptr @i, align 4, !tbaa !5 br label %for.inc21 for.inc.5: ; preds = %for.inc.4 %inc.5 = add nuw nsw i32 %inc38.4, 1 store i32 %inc.5, ptr @l, align 4, !tbaa !5 store i32 7, ptr @i, align 4, !tbaa !5 %cmp18 = icmp eq i32 %inc.5, 6 br i1 %cmp18, label %for.end29.thread, label %for.inc21 for.inc21: ; preds = %for.inc.5.thread, %IF.exit, %for.inc.5 %inc22 = add nsw i32 %.pre, 1 store i32 %inc22, ptr @m, align 4, !tbaa !5 %40 = load i32, ptr @n, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc22, %40 br i1 %cmp2, label %for.body3, label %for.inc27, !llvm.loop !14 for.end23: ; preds = %for.cond1.preheader %.pr35.pre = load i32, ptr @l, align 4, !tbaa !5 %cmp24 = icmp eq i32 %.pr35.pre, 6 br i1 %cmp24, label %for.end29.thread, label %for.inc27 for.inc27: ; preds = %for.inc21, %for.end23 %41 = phi i32 [ %8, %for.end23 ], [ %27, %for.inc21 ] %42 = phi i32 [ %7, %for.end23 ], [ %40, %for.inc21 ] %inc28 = add nsw i32 %41, 1 store i32 %inc28, ptr @k, align 4, !tbaa !5 %cmp = icmp slt i32 %inc28, %42 br i1 %cmp, label %for.cond1.preheader, label %for.end29.thread60, !llvm.loop !15 for.end29: ; preds = %input.exit, %input.exit.thread %.pre50 = load i32, ptr @l, align 4, !tbaa !5 %.pre50.fr = freeze i32 %.pre50 %cmp.i33 = icmp eq i32 %.pre50.fr, 6 br i1 %cmp.i33, label %for.end29.thread, label %for.end29.thread60 for.end29.thread: ; preds = %for.end23, %for.inc.5, %for.end29 br label %for.end29.thread60 for.end29.thread60: ; preds = %for.inc27, %for.end29, %for.end29.thread %43 = phi ptr [ @str.7, %for.end29.thread ], [ @str.6, %for.end29 ], [ @str.6, %for.inc27 ] %puts.i = tail call i32 @puts(ptr nonnull dereferenceable(1) %43) ret i32 0 } ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree 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 #3 = { 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 #4 = { nofree 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 #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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #7 = { nofree nounwind } 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!7, !7, i64 0} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.unswitch.partial.disable"}
#include <stdio.h> #include <stdlib.h> int cmp_ll (const void *ap, const void *bp) { long long a = *(long long *)ap; long long b = *(long long *)bp; if (a < b) { return -1; } if (a > b) { return 1; } return 0; } int main () { int n = 0; int p = 0; long long a[200000] = {}; int res = 0; long long ans = 0LL; long long dp[200003] = {}; long long mod_num = 1000000007LL; int idx = 0; int tmp_p = 0; res = scanf("%d", &n); res = scanf("%d", &p); for (int i = 0; i < n; i++) { res = scanf("%lld", a+i); } qsort(a, n, sizeof(long long), cmp_ll); while (idx < n) { while (idx < n && a[idx] < (1LL<<((long long)tmp_p))) { int is_ok = 1; long long tmp = a[idx]; while (is_ok > 0 && tmp > 0LL && (tmp%4LL == 0LL || tmp%2LL == 1LL)) { int lb = -1; int ub = idx; if (tmp%4LL == 0LL) { tmp = tmp/4LL; } else { tmp = (tmp-1LL)/2LL; } while (ub-lb > 1) { int next = (lb+ub)/2; if (a[next] >= tmp) { ub = next; } else { lb = next; } } if (a[ub] == tmp) { is_ok = 0; } } if (is_ok > 0) { dp[tmp_p] += 1LL; } idx++; } dp[tmp_p] %= mod_num; dp[tmp_p+2] += dp[tmp_p]; dp[tmp_p+2] %= mod_num; dp[tmp_p+1] += dp[tmp_p]; dp[tmp_p+1] %= mod_num; if (tmp_p <= p) { ans += dp[tmp_p]; ans %= mod_num; } tmp_p++; } for (int i = tmp_p; i <= p; i++) { dp[i] %= mod_num; dp[i+2] += dp[i]; dp[i+2] %= mod_num; dp[i+1] += dp[i]; dp[i+1] %= mod_num; ans += dp[i]; ans %= mod_num; } printf("%lld\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = 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 @cmp_ll(ptr nocapture noundef readonly %ap, ptr nocapture noundef readonly %bp) #0 { entry: %0 = load i64, ptr %ap, align 8, !tbaa !5 %1 = load i64, ptr %bp, align 8, !tbaa !5 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp sgt i64 %0, %1 %. = zext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 -1, i32 %. 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %p = alloca i32, align 4 %a = alloca [200000 x i64], align 16 %dp = alloca [200003 x i64], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 store i32 0, ptr %n, align 4, !tbaa !9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %p) #7 store i32 0, ptr %p, align 4, !tbaa !9 call void @llvm.lifetime.start.p0(i64 1600000, ptr nonnull %a) #7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600000) %a, i8 0, i64 1600000, i1 false) call void @llvm.lifetime.start.p0(i64 1600024, ptr nonnull %dp) #7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1600024) %dp, i8 0, i64 1600024, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p) %0 = load i32, ptr %n, align 4, !tbaa !9 %cmp188 = icmp sgt i32 %0, 0 br i1 %cmp188, label %for.body, label %entry.for.cond.cleanup_crit_edge entry.for.cond.cleanup_crit_edge: ; preds = %entry %.pre226 = sext i32 %0 to i64 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry.for.cond.cleanup_crit_edge %conv.pre-phi = phi i64 [ %.pre226, %entry.for.cond.cleanup_crit_edge ], [ %4, %for.body ] call void @qsort(ptr noundef nonnull %a, i64 noundef %conv.pre-phi, i64 noundef 8, ptr noundef nonnull @cmp_ll) #7 %1 = load i32, ptr %n, align 4, !tbaa !9 %cmp4202 = icmp sgt i32 %1, 0 %.pre = load i32, ptr %p, align 4, !tbaa !9 br i1 %cmp4202, label %while.cond6.preheader.lr.ph, label %for.cond95.preheader while.cond6.preheader.lr.ph: ; preds = %for.cond.cleanup %2 = sext i32 %.pre to i64 br label %while.cond6.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %add.ptr = getelementptr inbounds i64, ptr %a, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %n, align 4, !tbaa !9 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !11 while.cond6.preheader: ; preds = %while.cond6.preheader.lr.ph, %if.end91 %5 = phi i64 [ 0, %while.cond6.preheader.lr.ph ], [ %rem83, %if.end91 ] %indvars.iv216 = phi i64 [ 0, %while.cond6.preheader.lr.ph ], [ %indvars.iv.next217, %if.end91 ] %idx.0204 = phi i32 [ 0, %while.cond6.preheader.lr.ph ], [ %idx.1.lcssa, %if.end91 ] %ans.0203 = phi i64 [ 0, %while.cond6.preheader.lr.ph ], [ %ans.1, %if.end91 ] %shl = shl nuw i64 1, %indvars.iv216 %arrayidx56 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %indvars.iv216 %6 = add nsw i32 %idx.0204, 1 %smax = call i32 @llvm.smax.i32(i32 %1, i32 %6) br label %land.rhs for.cond95.preheader.loopexit: ; preds = %if.end91 %7 = trunc i64 %indvars.iv.next217 to i32 br label %for.cond95.preheader for.cond95.preheader: ; preds = %for.cond95.preheader.loopexit, %for.cond.cleanup %ans.0.lcssa = phi i64 [ 0, %for.cond.cleanup ], [ %ans.1, %for.cond95.preheader.loopexit ] %tmp_p.0.lcssa = phi i32 [ 0, %for.cond.cleanup ], [ %7, %for.cond95.preheader.loopexit ] %cmp96.not208 = icmp sgt i32 %tmp_p.0.lcssa, %.pre br i1 %cmp96.not208, label %for.cond.cleanup98, label %for.body99.preheader for.body99.preheader: ; preds = %for.cond95.preheader %8 = zext i32 %tmp_p.0.lcssa to i64 %9 = add i32 %.pre, 1 %wide.trip.count = zext i32 %9 to i64 %arrayidx101.phi.trans.insert = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %8 %.pre225 = load i64, ptr %arrayidx101.phi.trans.insert, align 8, !tbaa !5 %10 = srem i64 %.pre225, 1000000007 %11 = shl nuw nsw i64 %8, 3 %12 = getelementptr i8, ptr %dp, i64 %11 %scevgep = getelementptr i8, ptr %12, i64 8 %load_initial = load i64, ptr %scevgep, align 8 br label %for.body99 land.rhs: ; preds = %while.cond6.preheader, %if.end58 %13 = phi i64 [ %5, %while.cond6.preheader ], [ %17, %if.end58 ] %idx.1198 = phi i32 [ %idx.0204, %while.cond6.preheader ], [ %inc59, %if.end58 ] %idxprom = sext i32 %idx.1198 to i64 %arrayidx = getelementptr inbounds [200000 x i64], ptr %a, i64 0, i64 %idxprom %14 = load i64, ptr %arrayidx, align 8, !tbaa !5 %cmp10 = icmp slt i64 %14, %shl br i1 %cmp10, label %while.cond15.preheader, label %while.end60 while.cond15.preheader: ; preds = %land.rhs %cmp18195 = icmp sgt i64 %14, 0 br i1 %cmp18195, label %land.rhs20.lr.ph, label %if.then54 land.rhs20.lr.ph: ; preds = %while.cond15.preheader %cmp34191 = icmp sgt i32 %idx.1198, 0 br i1 %cmp34191, label %land.rhs20.us, label %land.rhs20 land.rhs20.us: ; preds = %land.rhs20.lr.ph, %while.cond32.while.end_crit_edge.us %tmp.0196.us = phi i64 [ %tmp.1.us, %while.cond32.while.end_crit_edge.us ], [ %14, %land.rhs20.lr.ph ] %rem.us = and i64 %tmp.0196.us, 3 %cmp21.us = icmp ne i64 %rem.us, 0 %rem23.us = and i64 %tmp.0196.us, 1 %cmp24.not.us = icmp eq i64 %rem23.us, 0 %or.cond186.us = and i1 %cmp21.us, %cmp24.not.us br i1 %or.cond186.us, label %if.then54, label %while.body27.us while.body27.us: ; preds = %land.rhs20.us %div185.us = lshr i64 %tmp.0196.us, 2 %sub.us = add nsw i64 %tmp.0196.us, -1 %div31184.us = lshr i64 %sub.us, 1 %tmp.1.us = select i1 %cmp21.us, i64 %div31184.us, i64 %div185.us br label %while.body36.us while.body36.us: ; preds = %while.body27.us, %while.body36.us %ub.0193.us = phi i32 [ %idx.1198, %while.body27.us ], [ %ub.0.div37.us, %while.body36.us ] %lb.0192.us = phi i32 [ -1, %while.body27.us ], [ %div37.lb.0.us, %while.body36.us ] %add.us = add nsw i32 %ub.0193.us, %lb.0192.us %div37.us = sdiv i32 %add.us, 2 %idxprom38.us = sext i32 %div37.us to i64 %arrayidx39.us = getelementptr inbounds [200000 x i64], ptr %a, i64 0, i64 %idxprom38.us %15 = load i64, ptr %arrayidx39.us, align 8, !tbaa !5 %cmp40.not.us = icmp slt i64 %15, %tmp.1.us %div37.lb.0.us = select i1 %cmp40.not.us, i32 %div37.us, i32 %lb.0192.us %ub.0.div37.us = select i1 %cmp40.not.us, i32 %ub.0193.us, i32 %div37.us %sub33.us = sub nsw i32 %ub.0.div37.us, %div37.lb.0.us %cmp34.us = icmp sgt i32 %sub33.us, 1 br i1 %cmp34.us, label %while.body36.us, label %while.cond32.while.end_crit_edge.us, !llvm.loop !13 while.cond32.while.end_crit_edge.us: ; preds = %while.body36.us %idxprom45.us = sext i32 %ub.0.div37.us to i64 %arrayidx46.us = getelementptr inbounds [200000 x i64], ptr %a, i64 0, i64 %idxprom45.us %16 = load i64, ptr %arrayidx46.us, align 8, !tbaa !5 %cmp47.us = icmp ne i64 %16, %tmp.1.us %cmp18.us = icmp ne i64 %tmp.1.us, 0 %or.cond.us = and i1 %cmp47.us, %cmp18.us br i1 %or.cond.us, label %land.rhs20.us, label %while.end51, !llvm.loop !14 land.rhs20: ; preds = %land.rhs20.lr.ph, %while.body27 %tmp.0196 = phi i64 [ %tmp.1, %while.body27 ], [ %14, %land.rhs20.lr.ph ] %rem = and i64 %tmp.0196, 3 %cmp21 = icmp ne i64 %rem, 0 %rem23 = and i64 %tmp.0196, 1 %cmp24.not = icmp eq i64 %rem23, 0 %or.cond186 = and i1 %cmp21, %cmp24.not br i1 %or.cond186, label %if.then54, label %while.body27 while.body27: ; preds = %land.rhs20 %div185 = lshr i64 %tmp.0196, 2 %sub = add nsw i64 %tmp.0196, -1 %div31184 = lshr i64 %sub, 1 %tmp.1 = select i1 %cmp21, i64 %div31184, i64 %div185 %cmp47 = icmp ne i64 %14, %tmp.1 %cmp18 = icmp ne i64 %tmp.1, 0 %or.cond = and i1 %cmp47, %cmp18 br i1 %or.cond, label %land.rhs20, label %while.end51, !llvm.loop !14 while.end51: ; preds = %while.body27, %while.cond32.while.end_crit_edge.us %cmp16.lcssa = phi i1 [ %cmp47.us, %while.cond32.while.end_crit_edge.us ], [ %cmp47, %while.body27 ] br i1 %cmp16.lcssa, label %if.then54, label %if.end58 if.then54: ; preds = %land.rhs20, %land.rhs20.us, %while.cond15.preheader, %while.end51 %add57 = add nsw i64 %13, 1 store i64 %add57, ptr %arrayidx56, align 8, !tbaa !5 br label %if.end58 if.end58: ; preds = %if.then54, %while.end51 %17 = phi i64 [ %add57, %if.then54 ], [ %13, %while.end51 ] %inc59 = add i32 %idx.1198, 1 %exitcond.not = icmp eq i32 %inc59, %smax br i1 %exitcond.not, label %while.end60, label %land.rhs, !llvm.loop !15 while.end60: ; preds = %if.end58, %land.rhs %18 = phi i64 [ %17, %if.end58 ], [ %13, %land.rhs ] %idx.1.lcssa = phi i32 [ %smax, %if.end58 ], [ %idx.1198, %land.rhs ] %rem63 = srem i64 %18, 1000000007 store i64 %rem63, ptr %arrayidx56, align 8, !tbaa !5 %19 = add nuw nsw i64 %indvars.iv216, 2 %arrayidx68 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %19 %20 = load i64, ptr %arrayidx68, align 8, !tbaa !5 %add69 = add nsw i64 %20, %rem63 %rem73 = srem i64 %add69, 1000000007 store i64 %rem73, ptr %arrayidx68, align 8, !tbaa !5 %indvars.iv.next217 = add nuw nsw i64 %indvars.iv216, 1 %arrayidx78 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %indvars.iv.next217 %21 = load i64, ptr %arrayidx78, align 8, !tbaa !5 %add79 = add nsw i64 %21, %rem63 %rem83 = srem i64 %add79, 1000000007 store i64 %rem83, ptr %arrayidx78, align 8, !tbaa !5 %cmp84.not = icmp sgt i64 %indvars.iv216, %2 br i1 %cmp84.not, label %if.end91, label %if.then86 if.then86: ; preds = %while.end60 %add89 = add nsw i64 %rem63, %ans.0203 %rem90 = srem i64 %add89, 1000000007 br label %if.end91 if.end91: ; preds = %if.then86, %while.end60 %ans.1 = phi i64 [ %rem90, %if.then86 ], [ %ans.0203, %while.end60 ] %cmp4 = icmp slt i32 %idx.1.lcssa, %1 br i1 %cmp4, label %while.cond6.preheader, label %for.cond95.preheader.loopexit, !llvm.loop !16 for.cond.cleanup98: ; preds = %for.body99, %for.cond95.preheader %ans.2.lcssa = phi i64 [ %ans.0.lcssa, %for.cond95.preheader ], [ %rem126, %for.body99 ] %call130 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %ans.2.lcssa) call void @llvm.lifetime.end.p0(i64 1600024, ptr nonnull %dp) #7 call void @llvm.lifetime.end.p0(i64 1600000, ptr nonnull %a) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %p) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 for.body99: ; preds = %for.body99.preheader, %for.body99 %store_forwarded = phi i64 [ %load_initial, %for.body99.preheader ], [ %rem112, %for.body99 ] %rem102 = phi i64 [ %10, %for.body99.preheader ], [ %rem122, %for.body99 ] %indvars.iv220 = phi i64 [ %8, %for.body99.preheader ], [ %indvars.iv.next221, %for.body99 ] %ans.2209 = phi i64 [ %ans.0.lcssa, %for.body99.preheader ], [ %rem126, %for.body99 ] %arrayidx101 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %indvars.iv220 store i64 %rem102, ptr %arrayidx101, align 8, !tbaa !5 %22 = add nuw nsw i64 %indvars.iv220, 2 %arrayidx107 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %22 %23 = load i64, ptr %arrayidx107, align 8, !tbaa !5 %add108 = add nsw i64 %23, %rem102 %rem112 = srem i64 %add108, 1000000007 store i64 %rem112, ptr %arrayidx107, align 8, !tbaa !5 %indvars.iv.next221 = add nuw nsw i64 %indvars.iv220, 1 %arrayidx117 = getelementptr inbounds [200003 x i64], ptr %dp, i64 0, i64 %indvars.iv.next221 %add118 = add nsw i64 %store_forwarded, %rem102 %rem122 = srem i64 %add118, 1000000007 store i64 %rem122, ptr %arrayidx117, align 8, !tbaa !5 %add125 = add nsw i64 %rem102, %ans.2209 %rem126 = srem i64 %add125, 1000000007 %exitcond224.not = icmp eq i64 %indvars.iv.next221, %wide.trip.count br i1 %exitcond224.not, label %for.cond.cleanup98, label %for.body99, !llvm.loop !17 } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { 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 = { 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 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !12} !15 = distinct !{!15, !12} !16 = distinct !{!16, !12} !17 = distinct !{!17, !12}
// AOJ 2275: Fox Number // 2017.12.11 bal4u@uu #include <stdio.h> #include <string.h> #include <math.h> #define MAX 1000005 // sqrt(1e12) char tbl[MAX+1]; int sz; // max sz = 78500, prime[0] = 2, prime[78499] = 1000005 int prime[79000] = { // prime[168] = 1009, prime[169] = 1013, 1009^2 = 1018081 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97,101,103,107,109,113, 127,131,137,139,149,151,157,163,167,173, 179,181,191,193,197,199,211,223,227,229, 233,239,241,251,257,263,269,271,277,281, 283,293,307,311,313,317,331,337,347,349, 353,359,367,373,379,383,389,397,401,409, 419,421,431,433,439,443,449,457,461,463, 467,479,487,491,499,503,509,521,523,541, 547,557,563,569,571,577,587,593,599,601, 607,613,617,619,631,641,643,647,653,659, 661,673,677,683,691,701,709,719,727,733, 739,743,751,757,761,769,773,787,797,809, 811,821,823,827,829,839,853,857,859,863, 877,881,883,887,907,911,919,929,937,941, 947,953,967,971,977,983,991,997,1009 }; int sqp[169] = { // squre of prime: sqp[i] = prime[i] * prime[i] 4, 9,25,49,121,169,289,361,529,841,961, 1369,1681,1849,2209,2809,3481,3721,4489,5041, 5329,6241,6889,7921,9409,10201,10609,11449,11881,12769, 16129,17161,18769,19321,22201,22801,24649,26569,27889,29929, 32041,32761,36481,37249,38809,39601,44521,49729,51529,52441,54289, 57121,58081,63001,66049,69169,72361,73441,76729,78961,80089,85849, 94249,96721,97969,100489,109561,113569,120409,121801,124609,128881, 134689,139129,143641,146689,151321,157609,160801,167281,175561,177241, 185761,187489,192721,196249,201601,208849,212521,214369,218089,229441, 237169,241081,249001,253009,259081,271441,273529,292681,299209,310249, 316969,323761,326041,332929,344569,351649,358801,361201,368449,375769, 380689,383161,398161,410881,413449,418609,426409,434281,436921,452929, 458329,466489,477481,491401,502681,516961,528529,537289,546121,552049, 564001,573049,579121,591361,597529,619369,635209,654481,657721,674041, 677329,683929,687241,703921,727609,734449,737881,744769,769129,776161, 779689,786769,822649,829921,844561,863041,877969,885481,896809,908209, 935089,942841,954529,966289,982081,994009,1018081 }; void sieve() { int i, j, k; for (i = 1; i < 169; i++) { k = prime[i]; for (j = sqp[i]; j < MAX; j += k) tbl[j] = 1; } for (sz = 168, i = 1009; i <= MAX; i += 2) if (!tbl[i]) prime[sz++] = i; } int base[1000002]; int idx [1000002]; int bsch(int x) { int m, l = 0, r = sz; while (l < r) { m = (l + r) >> 1; if (prime[m] == x) return m; if (prime[m] < x) l = m + 1; else r = m; } return l-1; } int main() { int i, k, p0, ans; long long A, B, a, b, j, pp, ll, rr, t; sieve(); scanf("%lld%lld", &A, &B); a = A-B, b = A+B; if (b <= 1) { puts("0"); return 0; } if (a <= 1) a = 2; sz = bsch((int)sqrt((double)b)); memset(idx, 1, sizeof(idx)); for (i = 0; i <= sz; i++) { p0 = prime[i]; for (k = 0, j = p0; j <= b; j *= p0, k++); for (j /= p0; j > 1; j /= p0, k--) { pp = j, ll = pp*(1+(a-1)/pp), rr = pp*(b/pp); for (t = ll-a; ll <= rr; ll += pp, t += pp) { if (!idx[t] || base[t] == p0) continue; if (idx[t] < k) idx[t] = 0; else base[t] = p0, idx[t] = k; } } } ans = 0, i = (int)(b-a+1); while (i--) if (idx[i]) ans++; printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135457/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135457/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @prime = dso_local local_unnamed_addr global <{ [169 x i32], [78831 x i32] }> <{ [169 x i32] [i32 2, i32 3, i32 5, i32 7, i32 11, i32 13, i32 17, i32 19, i32 23, i32 29, i32 31, i32 37, i32 41, i32 43, i32 47, i32 53, i32 59, i32 61, i32 67, i32 71, i32 73, i32 79, i32 83, i32 89, i32 97, i32 101, i32 103, i32 107, i32 109, i32 113, i32 127, i32 131, i32 137, i32 139, i32 149, i32 151, i32 157, i32 163, i32 167, i32 173, i32 179, i32 181, i32 191, i32 193, i32 197, i32 199, i32 211, i32 223, i32 227, i32 229, i32 233, i32 239, i32 241, i32 251, i32 257, i32 263, i32 269, i32 271, i32 277, i32 281, i32 283, i32 293, i32 307, i32 311, i32 313, i32 317, i32 331, i32 337, i32 347, i32 349, i32 353, i32 359, i32 367, i32 373, i32 379, i32 383, i32 389, i32 397, i32 401, i32 409, i32 419, i32 421, i32 431, i32 433, i32 439, i32 443, i32 449, i32 457, i32 461, i32 463, i32 467, i32 479, i32 487, i32 491, i32 499, i32 503, i32 509, i32 521, i32 523, i32 541, i32 547, i32 557, i32 563, i32 569, i32 571, i32 577, i32 587, i32 593, i32 599, i32 601, i32 607, i32 613, i32 617, i32 619, i32 631, i32 641, i32 643, i32 647, i32 653, i32 659, i32 661, i32 673, i32 677, i32 683, i32 691, i32 701, i32 709, i32 719, i32 727, i32 733, i32 739, i32 743, i32 751, i32 757, i32 761, i32 769, i32 773, i32 787, i32 797, i32 809, i32 811, i32 821, i32 823, i32 827, i32 829, i32 839, i32 853, i32 857, i32 859, i32 863, i32 877, i32 881, i32 883, i32 887, i32 907, i32 911, i32 919, i32 929, i32 937, i32 941, i32 947, i32 953, i32 967, i32 971, i32 977, i32 983, i32 991, i32 997, i32 1009], [78831 x i32] zeroinitializer }>, align 16 @sqp = dso_local local_unnamed_addr global [169 x i32] [i32 4, i32 9, i32 25, i32 49, i32 121, i32 169, i32 289, i32 361, i32 529, i32 841, i32 961, i32 1369, i32 1681, i32 1849, i32 2209, i32 2809, i32 3481, i32 3721, i32 4489, i32 5041, i32 5329, i32 6241, i32 6889, i32 7921, i32 9409, i32 10201, i32 10609, i32 11449, i32 11881, i32 12769, i32 16129, i32 17161, i32 18769, i32 19321, i32 22201, i32 22801, i32 24649, i32 26569, i32 27889, i32 29929, i32 32041, i32 32761, i32 36481, i32 37249, i32 38809, i32 39601, i32 44521, i32 49729, i32 51529, i32 52441, i32 54289, i32 57121, i32 58081, i32 63001, i32 66049, i32 69169, i32 72361, i32 73441, i32 76729, i32 78961, i32 80089, i32 85849, i32 94249, i32 96721, i32 97969, i32 100489, i32 109561, i32 113569, i32 120409, i32 121801, i32 124609, i32 128881, i32 134689, i32 139129, i32 143641, i32 146689, i32 151321, i32 157609, i32 160801, i32 167281, i32 175561, i32 177241, i32 185761, i32 187489, i32 192721, i32 196249, i32 201601, i32 208849, i32 212521, i32 214369, i32 218089, i32 229441, i32 237169, i32 241081, i32 249001, i32 253009, i32 259081, i32 271441, i32 273529, i32 292681, i32 299209, i32 310249, i32 316969, i32 323761, i32 326041, i32 332929, i32 344569, i32 351649, i32 358801, i32 361201, i32 368449, i32 375769, i32 380689, i32 383161, i32 398161, i32 410881, i32 413449, i32 418609, i32 426409, i32 434281, i32 436921, i32 452929, i32 458329, i32 466489, i32 477481, i32 491401, i32 502681, i32 516961, i32 528529, i32 537289, i32 546121, i32 552049, i32 564001, i32 573049, i32 579121, i32 591361, i32 597529, i32 619369, i32 635209, i32 654481, i32 657721, i32 674041, i32 677329, i32 683929, i32 687241, i32 703921, i32 727609, i32 734449, i32 737881, i32 744769, i32 769129, i32 776161, i32 779689, i32 786769, i32 822649, i32 829921, i32 844561, i32 863041, i32 877969, i32 885481, i32 896809, i32 908209, i32 935089, i32 942841, i32 954529, i32 966289, i32 982081, i32 994009, i32 1018081], align 16 @tbl = dso_local local_unnamed_addr global [1000006 x i8] zeroinitializer, align 16 @sz = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [2 x i8] c"0\00", align 1 @idx = dso_local local_unnamed_addr global [1000002 x i32] zeroinitializer, align 16 @base = dso_local local_unnamed_addr global [1000002 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @sieve() local_unnamed_addr #0 { entry: br label %for.body for.body: ; preds = %entry, %for.inc8 %indvars.iv38 = phi i64 [ 1, %entry ], [ %indvars.iv.next39, %for.inc8 ] %arrayidx2 = getelementptr inbounds [169 x i32], ptr @sqp, i64 0, i64 %indvars.iv38 %0 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp430 = icmp slt i32 %0, 1000005 br i1 %cmp430, label %for.body5.preheader, label %for.inc8 for.body5.preheader: ; preds = %for.body %arrayidx = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %indvars.iv38 %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = sext i32 %0 to i64 %3 = sext i32 %1 to i64 br label %for.body5 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv = phi i64 [ %2, %for.body5.preheader ], [ %indvars.iv.next, %for.body5 ] %arrayidx7 = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv store i8 1, ptr %arrayidx7, align 1, !tbaa !9 %indvars.iv.next = add i64 %indvars.iv, %3 %cmp4 = icmp slt i64 %indvars.iv.next, 1000005 br i1 %cmp4, label %for.body5, label %for.inc8, !llvm.loop !10 for.inc8: ; preds = %for.body5, %for.body %indvars.iv.next39 = add nuw nsw i64 %indvars.iv38, 1 %exitcond.not = icmp eq i64 %indvars.iv.next39, 169 br i1 %exitcond.not, label %for.end9, label %for.body, !llvm.loop !12 for.end9: ; preds = %for.inc8 store i32 168, ptr @sz, align 4, !tbaa !5 br label %for.body12 for.body12: ; preds = %for.inc18.1, %for.end9 %indvars.iv41 = phi i64 [ 1009, %for.end9 ], [ %indvars.iv.next42.1, %for.inc18.1 ] %inc153435 = phi i32 [ 168, %for.end9 ], [ %inc1533.1, %for.inc18.1 ] %arrayidx14 = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv41 %4 = load i8, ptr %arrayidx14, align 1, !tbaa !9 %tobool.not = icmp eq i8 %4, 0 br i1 %tobool.not, label %if.then, label %for.inc18 if.then: ; preds = %for.body12 %inc15 = add nsw i32 %inc153435, 1 store i32 %inc15, ptr @sz, align 4, !tbaa !5 %idxprom16 = sext i32 %inc153435 to i64 %arrayidx17 = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom16 %5 = trunc i64 %indvars.iv41 to i32 store i32 %5, ptr %arrayidx17, align 4, !tbaa !5 br label %for.inc18 for.inc18: ; preds = %for.body12, %if.then %inc1533 = phi i32 [ %inc153435, %for.body12 ], [ %inc15, %if.then ] %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 2 %cmp11 = icmp ult i64 %indvars.iv41, 1000004 br i1 %cmp11, label %for.body12.1, label %for.end20, !llvm.loop !13 for.body12.1: ; preds = %for.inc18 %arrayidx14.1 = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv.next42 %6 = load i8, ptr %arrayidx14.1, align 1, !tbaa !9 %tobool.not.1 = icmp eq i8 %6, 0 br i1 %tobool.not.1, label %if.then.1, label %for.inc18.1 if.then.1: ; preds = %for.body12.1 %inc15.1 = add nsw i32 %inc1533, 1 store i32 %inc15.1, ptr @sz, align 4, !tbaa !5 %idxprom16.1 = sext i32 %inc1533 to i64 %arrayidx17.1 = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom16.1 %7 = trunc i64 %indvars.iv.next42 to i32 store i32 %7, ptr %arrayidx17.1, align 4, !tbaa !5 br label %for.inc18.1 for.inc18.1: ; preds = %if.then.1, %for.body12.1 %inc1533.1 = phi i32 [ %inc1533, %for.body12.1 ], [ %inc15.1, %if.then.1 ] %indvars.iv.next42.1 = add nuw nsw i64 %indvars.iv41, 4 br label %for.body12 for.end20: ; preds = %for.inc18 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @bsch(i32 noundef %x) local_unnamed_addr #2 { entry: %0 = load i32, ptr @sz, align 4, !tbaa !5 %cmp19 = icmp sgt i32 %0, 0 br i1 %cmp19, label %while.body, label %cleanup while.body: ; preds = %entry, %if.end %r.021 = phi i32 [ %r.1, %if.end ], [ %0, %entry ] %l.020 = phi i32 [ %l.1, %if.end ], [ 0, %entry ] %add = add nsw i32 %r.021, %l.020 %shr = ashr i32 %add, 1 %idxprom = sext i32 %shr to i64 %arrayidx = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %1, %x br i1 %cmp1, label %cleanup, label %if.end if.end: ; preds = %while.body %cmp4 = icmp slt i32 %1, %x %add6 = add nsw i32 %shr, 1 %l.1 = select i1 %cmp4, i32 %add6, i32 %l.020 %r.1 = select i1 %cmp4, i32 %r.021, i32 %shr %cmp = icmp slt i32 %l.1, %r.1 br i1 %cmp, label %while.body, label %while.end.loopexit, !llvm.loop !14 while.end.loopexit: ; preds = %if.end %2 = add nsw i32 %l.1, -1 br label %cleanup cleanup: ; preds = %while.body, %entry, %while.end.loopexit %retval.0 = phi i32 [ -1, %entry ], [ %2, %while.end.loopexit ], [ %shr, %while.body ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %A = alloca i64, align 8 %B = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %A) #8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %B) #8 br label %for.body.i for.body.i: ; preds = %for.inc8.i, %entry %indvars.iv38.i = phi i64 [ 1, %entry ], [ %indvars.iv.next39.i, %for.inc8.i ] %arrayidx2.i = getelementptr inbounds [169 x i32], ptr @sqp, i64 0, i64 %indvars.iv38.i %0 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %cmp430.i = icmp slt i32 %0, 1000005 br i1 %cmp430.i, label %for.body5.preheader.i, label %for.inc8.i for.body5.preheader.i: ; preds = %for.body.i %arrayidx.i = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %indvars.iv38.i %1 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %2 = sext i32 %0 to i64 %3 = sext i32 %1 to i64 br label %for.body5.i for.body5.i: ; preds = %for.body5.i, %for.body5.preheader.i %indvars.iv.i = phi i64 [ %2, %for.body5.preheader.i ], [ %indvars.iv.next.i, %for.body5.i ] %arrayidx7.i = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv.i store i8 1, ptr %arrayidx7.i, align 1, !tbaa !9 %indvars.iv.next.i = add i64 %indvars.iv.i, %3 %cmp4.i = icmp slt i64 %indvars.iv.next.i, 1000005 br i1 %cmp4.i, label %for.body5.i, label %for.inc8.i, !llvm.loop !10 for.inc8.i: ; preds = %for.body5.i, %for.body.i %indvars.iv.next39.i = add nuw nsw i64 %indvars.iv38.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next39.i, 169 br i1 %exitcond.not.i, label %for.end9.i, label %for.body.i, !llvm.loop !12 for.end9.i: ; preds = %for.inc8.i store i32 168, ptr @sz, align 4, !tbaa !5 br label %for.body12.i for.body12.i: ; preds = %for.inc18.i.1, %for.end9.i %indvars.iv41.i = phi i64 [ 1009, %for.end9.i ], [ %indvars.iv.next42.i.1, %for.inc18.i.1 ] %inc153435.i = phi i32 [ 168, %for.end9.i ], [ %inc1533.i.1, %for.inc18.i.1 ] %arrayidx14.i = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv41.i %4 = load i8, ptr %arrayidx14.i, align 1, !tbaa !9 %tobool.not.i = icmp eq i8 %4, 0 br i1 %tobool.not.i, label %if.then.i, label %for.inc18.i if.then.i: ; preds = %for.body12.i %inc15.i = add nsw i32 %inc153435.i, 1 store i32 %inc15.i, ptr @sz, align 4, !tbaa !5 %idxprom16.i = sext i32 %inc153435.i to i64 %arrayidx17.i = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom16.i %5 = trunc i64 %indvars.iv41.i to i32 store i32 %5, ptr %arrayidx17.i, align 4, !tbaa !5 br label %for.inc18.i for.inc18.i: ; preds = %if.then.i, %for.body12.i %inc1533.i = phi i32 [ %inc153435.i, %for.body12.i ], [ %inc15.i, %if.then.i ] %indvars.iv.next42.i = add nuw nsw i64 %indvars.iv41.i, 2 %cmp11.i = icmp ult i64 %indvars.iv41.i, 1000004 br i1 %cmp11.i, label %for.body12.i.1, label %sieve.exit, !llvm.loop !13 for.body12.i.1: ; preds = %for.inc18.i %arrayidx14.i.1 = getelementptr inbounds [1000006 x i8], ptr @tbl, i64 0, i64 %indvars.iv.next42.i %6 = load i8, ptr %arrayidx14.i.1, align 1, !tbaa !9 %tobool.not.i.1 = icmp eq i8 %6, 0 br i1 %tobool.not.i.1, label %if.then.i.1, label %for.inc18.i.1 if.then.i.1: ; preds = %for.body12.i.1 %inc15.i.1 = add nsw i32 %inc1533.i, 1 store i32 %inc15.i.1, ptr @sz, align 4, !tbaa !5 %idxprom16.i.1 = sext i32 %inc1533.i to i64 %arrayidx17.i.1 = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom16.i.1 %7 = trunc i64 %indvars.iv.next42.i to i32 store i32 %7, ptr %arrayidx17.i.1, align 4, !tbaa !5 br label %for.inc18.i.1 for.inc18.i.1: ; preds = %if.then.i.1, %for.body12.i.1 %inc1533.i.1 = phi i32 [ %inc1533.i, %for.body12.i.1 ], [ %inc15.i.1, %if.then.i.1 ] %indvars.iv.next42.i.1 = add nuw nsw i64 %indvars.iv41.i, 4 br label %for.body12.i sieve.exit: ; preds = %for.inc18.i %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B) %8 = load i64, ptr %A, align 8, !tbaa !15 %9 = load i64, ptr %B, align 8, !tbaa !15 %add = add nsw i64 %9, %8 %add.fr = freeze i64 %add %cmp = icmp slt i64 %add.fr, 2 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %sieve.exit %call1 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) br label %cleanup if.end: ; preds = %sieve.exit %sub = sub nsw i64 %8, %9 %spec.store.select = call i64 @llvm.smax.i64(i64 %sub, i64 2) %conv = sitofp i64 %add.fr to double %call5 = call double @sqrt(double noundef %conv) #8 %conv6 = fptosi double %call5 to i32 %10 = load i32, ptr @sz, align 4, !tbaa !5 %cmp19.i = icmp sgt i32 %10, 0 br i1 %cmp19.i, label %while.body.i, label %bsch.exit.thread bsch.exit.thread: ; preds = %if.end store i32 -1, ptr @sz, align 4, !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000008) @idx, i8 1, i64 4000008, i1 false) br label %for.end56 while.body.i: ; preds = %if.end, %if.end.i %r.021.i = phi i32 [ %r.1.i, %if.end.i ], [ %10, %if.end ] %l.020.i = phi i32 [ %l.1.i, %if.end.i ], [ 0, %if.end ] %add.i = add nsw i32 %l.020.i, %r.021.i %shr.i = ashr i32 %add.i, 1 %idxprom.i = sext i32 %shr.i to i64 %arrayidx.i120 = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %idxprom.i %11 = load i32, ptr %arrayidx.i120, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %11, %conv6 br i1 %cmp1.i, label %bsch.exit, label %if.end.i if.end.i: ; preds = %while.body.i %cmp4.i121 = icmp slt i32 %11, %conv6 %add6.i = add nsw i32 %shr.i, 1 %l.1.i = select i1 %cmp4.i121, i32 %add6.i, i32 %l.020.i %r.1.i = select i1 %cmp4.i121, i32 %r.021.i, i32 %shr.i %cmp.i = icmp slt i32 %l.1.i, %r.1.i br i1 %cmp.i, label %while.body.i, label %while.end.loopexit.i, !llvm.loop !14 while.end.loopexit.i: ; preds = %if.end.i %12 = add nsw i32 %l.1.i, -1 br label %bsch.exit bsch.exit: ; preds = %while.body.i, %while.end.loopexit.i %retval.0.i = phi i32 [ %12, %while.end.loopexit.i ], [ %shr.i, %while.body.i ] store i32 %retval.0.i, ptr @sz, align 4, !tbaa !5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000008) @idx, i8 1, i64 4000008, i1 false) %cmp8.not134 = icmp slt i32 %retval.0.i, 0 br i1 %cmp8.not134, label %for.end56, label %for.body.lr.ph for.body.lr.ph: ; preds = %bsch.exit %sub21 = add nsw i64 %spec.store.select, -1 %13 = add nuw nsw i32 %retval.0.i, 1 %wide.trip.count = zext i32 %13 to i64 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc54 %indvars.iv = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc54 ] %arrayidx = getelementptr inbounds [79000 x i32], ptr @prime, i64 0, i64 %indvars.iv %14 = load i32, ptr %arrayidx, align 4, !tbaa !5 %conv10 = sext i32 %14 to i64 %cmp12.not123 = icmp slt i64 %add.fr, %conv10 br i1 %cmp12.not123, label %for.cond17.preheader, label %for.inc for.cond17.preheader: ; preds = %for.inc, %for.body %k.0.lcssa = phi i32 [ 0, %for.body ], [ %inc, %for.inc ] %j.0.lcssa = phi i64 [ %conv10, %for.body ], [ %mul, %for.inc ] %j.1130 = sdiv i64 %j.0.lcssa, %conv10 %cmp18131 = icmp sgt i64 %j.1130, 1 br i1 %cmp18131, label %for.body20, label %for.inc54 for.inc: ; preds = %for.body, %for.inc %j.0125 = phi i64 [ %mul, %for.inc ], [ %conv10, %for.body ] %k.0124 = phi i32 [ %inc, %for.inc ], [ 0, %for.body ] %mul = mul nsw i64 %j.0125, %conv10 %inc = add nuw nsw i32 %k.0124, 1 %cmp12.not = icmp sgt i64 %mul, %add.fr br i1 %cmp12.not, label %for.cond17.preheader, label %for.inc, !llvm.loop !17 for.body20: ; preds = %for.cond17.preheader, %for.inc50 %j.1133 = phi i64 [ %j.1, %for.inc50 ], [ %j.1130, %for.cond17.preheader ] %k.1132 = phi i32 [ %dec, %for.inc50 ], [ %k.0.lcssa, %for.cond17.preheader ] %div22 = sdiv i64 %sub21, %j.1133 %add23 = add nsw i64 %div22, 1 %mul24 = mul nsw i64 %add23, %j.1133 %15 = urem i64 %add.fr, %j.1133 %mul26 = sub nuw i64 %add.fr, %15 %cmp29.not127 = icmp sgt i64 %mul24, %mul26 br i1 %cmp29.not127, label %for.inc50, label %for.body31.preheader for.body31.preheader: ; preds = %for.body20 %sub27 = sub nsw i64 %mul24, %spec.store.select br label %for.body31 for.body31: ; preds = %for.body31.preheader, %for.inc46 %t.0129 = phi i64 [ %add48, %for.inc46 ], [ %sub27, %for.body31.preheader ] %ll.0128 = phi i64 [ %add47, %for.inc46 ], [ %mul24, %for.body31.preheader ] %arrayidx32 = getelementptr inbounds [1000002 x i32], ptr @idx, i64 0, i64 %t.0129 %16 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %tobool.not = icmp eq i32 %16, 0 br i1 %tobool.not, label %for.inc46, label %lor.lhs.false lor.lhs.false: ; preds = %for.body31 %arrayidx33 = getelementptr inbounds [1000002 x i32], ptr @base, i64 0, i64 %t.0129 %17 = load i32, ptr %arrayidx33, align 4, !tbaa !5 %cmp34 = icmp eq i32 %17, %14 br i1 %cmp34, label %for.inc46, label %if.end37 if.end37: ; preds = %lor.lhs.false %cmp39 = icmp slt i32 %16, %k.1132 br i1 %cmp39, label %for.inc46.sink.split, label %if.else if.else: ; preds = %if.end37 store i32 %14, ptr %arrayidx33, align 4, !tbaa !5 br label %for.inc46.sink.split for.inc46.sink.split: ; preds = %if.end37, %if.else %.sink = phi i32 [ %k.1132, %if.else ], [ 0, %if.end37 ] store i32 %.sink, ptr %arrayidx32, align 4, !tbaa !5 br label %for.inc46 for.inc46: ; preds = %for.inc46.sink.split, %for.body31, %lor.lhs.false %add47 = add nsw i64 %ll.0128, %j.1133 %add48 = add nsw i64 %t.0129, %j.1133 %cmp29.not = icmp sgt i64 %add47, %mul26 br i1 %cmp29.not, label %for.inc50, label %for.body31, !llvm.loop !18 for.inc50: ; preds = %for.inc46, %for.body20 %dec = add nsw i32 %k.1132, -1 %j.1 = sdiv i64 %j.1133, %conv10 %cmp18 = icmp sgt i64 %j.1, 1 br i1 %cmp18, label %for.body20, label %for.inc54, !llvm.loop !19 for.inc54: ; preds = %for.inc50, %for.cond17.preheader %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end56, label %for.body, !llvm.loop !20 for.end56: ; preds = %for.inc54, %bsch.exit.thread, %bsch.exit %sub57 = sub nsw i64 %add.fr, %spec.store.select %18 = trunc i64 %sub57 to i32 %conv59 = add i32 %18, 1 %tobool61.not136 = icmp eq i32 %conv59, 0 br i1 %tobool61.not136, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %for.end56 %19 = sext i32 %conv59 to i64 %20 = and i64 %sub57, 4294967295 %21 = add nuw nsw i64 %20, 1 %min.iters.check = icmp ult i64 %20, 7 br i1 %min.iters.check, label %while.body.preheader152, label %vector.ph vector.ph: ; preds = %while.body.preheader %n.vec = and i64 %21, 8589934584 %ind.end = sub nsw i64 %19, %n.vec 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 ], [ %31, %vector.body ] %vec.phi149 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %32, %vector.body ] %22 = xor i64 %index, -1 %23 = add i64 %22, %19 %24 = getelementptr inbounds [1000002 x i32], ptr @idx, i64 0, i64 %23 %25 = getelementptr inbounds i32, ptr %24, i64 -3 %wide.load = load <4 x i32>, ptr %25, align 4, !tbaa !5 %reverse = shufflevector <4 x i32> %wide.load, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> %26 = getelementptr inbounds i32, ptr %24, i64 -7 %wide.load150 = load <4 x i32>, ptr %26, align 4, !tbaa !5 %reverse151 = shufflevector <4 x i32> %wide.load150, <4 x i32> poison, <4 x i32> <i32 3, i32 2, i32 1, i32 0> %27 = icmp ne <4 x i32> %reverse, zeroinitializer %28 = icmp ne <4 x i32> %reverse151, zeroinitializer %29 = zext <4 x i1> %27 to <4 x i32> %30 = zext <4 x i1> %28 to <4 x i32> %31 = add <4 x i32> %vec.phi, %29 %32 = add <4 x i32> %vec.phi149, %30 %index.next = add nuw i64 %index, 8 %33 = icmp eq i64 %index.next, %n.vec br i1 %33, label %middle.block, label %vector.body, !llvm.loop !21 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %32, %31 %34 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %21, %n.vec br i1 %cmp.n, label %while.end, label %while.body.preheader152 while.body.preheader152: ; preds = %while.body.preheader, %middle.block %indvars.iv142.ph = phi i64 [ %19, %while.body.preheader ], [ %ind.end, %middle.block ] %ans.0137.ph = phi i32 [ 0, %while.body.preheader ], [ %34, %middle.block ] br label %while.body while.body: ; preds = %while.body.preheader152, %while.body %indvars.iv142 = phi i64 [ %indvars.iv.next143, %while.body ], [ %indvars.iv142.ph, %while.body.preheader152 ] %ans.0137 = phi i32 [ %spec.select, %while.body ], [ %ans.0137.ph, %while.body.preheader152 ] %indvars.iv.next143 = add nsw i64 %indvars.iv142, -1 %arrayidx63 = getelementptr inbounds [1000002 x i32], ptr @idx, i64 0, i64 %indvars.iv.next143 %35 = load i32, ptr %arrayidx63, align 4, !tbaa !5 %tobool64.not = icmp ne i32 %35, 0 %inc66 = zext i1 %tobool64.not to i32 %spec.select = add nuw nsw i32 %ans.0137, %inc66 %36 = and i64 %indvars.iv.next143, 4294967295 %tobool61.not = icmp eq i64 %36, 0 br i1 %tobool61.not, label %while.end, label %while.body, !llvm.loop !24 while.end: ; preds = %while.body, %middle.block, %for.end56 %ans.0.lcssa = phi i32 [ 0, %for.end56 ], [ %34, %middle.block ], [ %spec.select, %while.body ] %call68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %ans.0.lcssa) br label %cleanup cleanup: ; preds = %while.end, %if.then call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %B) #8 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %A) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @sqrt(double noundef) local_unnamed_addr #5 ; 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 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #7 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 = { nofree norecurse nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress 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 #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11} !14 = distinct !{!14, !11} !15 = !{!16, !16, i64 0} !16 = !{!"long long", !7, i64 0} !17 = distinct !{!17, !11} !18 = distinct !{!18, !11} !19 = distinct !{!19, !11} !20 = distinct !{!20, !11} !21 = distinct !{!21, !11, !22, !23} !22 = !{!"llvm.loop.isvectorized", i32 1} !23 = !{!"llvm.loop.unroll.runtime.disable"} !24 = distinct !{!24, !11, !23, !22}
#include <stdio.h> struct node{ int parent; long int distance; }; int root(int i, struct node *x){ int k = i; while(x[k].parent != k){ k = x[k].parent; } return k; } long int get_distance(int i, struct node *x){ int k = i; long int d = 0; while(x[k].parent != k){ d += x[k].distance; k = x[k].parent; } return d; } int main(int argc, char *argv[]) { int n, m, l, r, flag = 0; long int d; struct node x[100000]; scanf("%d %d", &n, &m); for(int i = 0; i < n; i++){ x[i].parent = i; x[i].distance = 0; } for(int i = 0; i < m; i++){ scanf("%d %d %ld", &l, &r, &d); l--; r--; if(x[r].parent == r){ if(root(l, x) == r) flag++; x[r].parent = root(l, x); x[r].distance = d + get_distance(l, x); } else{ if(root(r, x) != root(l, x)){ long c = get_distance(l, x), e = get_distance(r, x); int u = root(l, x), v = root(r, x); x[r].parent = u; x[r].distance = c + d; long int D = c + d - e; if(D >= 0){ x[v].parent = u; x[v].distance = D; } else{ x[u].parent = v; x[u].distance = -D; } } else{ if(get_distance(l, x) - get_distance(r, x) != -d){ flag++; } } } } if(flag > 0) printf("No\n"); else printf("Yes\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135521/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135521/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, i64 } @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %ld\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @root(i32 noundef %i, ptr nocapture noundef readonly %x) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %k.0 = phi i32 [ %i, %entry ], [ %0, %while.cond ] %idxprom = sext i32 %k.0 to i64 %arrayidx = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom %0 = load i32, ptr %arrayidx, align 8, !tbaa !5 %cmp.not = icmp eq i32 %0, %k.0 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !11 while.end: ; preds = %while.cond ret i32 %k.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i64 @get_distance(i32 noundef %i, ptr nocapture noundef readonly %x) local_unnamed_addr #0 { entry: %idxprom12 = sext i32 %i to i64 %arrayidx13 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom12 %0 = load i32, ptr %arrayidx13, align 8, !tbaa !5 %cmp.not14 = icmp eq i32 %0, %i br i1 %cmp.not14, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %1 = phi i32 [ %3, %while.body ], [ %0, %entry ] %idxprom16 = phi i64 [ %idxprom, %while.body ], [ %idxprom12, %entry ] %d.015 = phi i64 [ %add, %while.body ], [ 0, %entry ] %distance = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16, i32 1 %2 = load i64, ptr %distance, align 8, !tbaa !13 %add = add nsw i64 %2, %d.015 %idxprom = sext i32 %1 to i64 %arrayidx = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom %3 = load i32, ptr %arrayidx, align 8, !tbaa !5 %cmp.not = icmp eq i32 %3, %1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %d.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %d.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %l = alloca i32, align 4 %r = alloca i32, align 4 %d = alloca i64, align 8 %x = alloca [100000 x %struct.node], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 1600000, ptr nonnull %x) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !15 %cmp191 = icmp sgt i32 %0, 0 br i1 %cmp191, label %for.body.preheader, label %for.cond4.preheader for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %xtraiter = and i64 %wide.trip.count, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.cond4.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body for.cond4.preheader.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond4.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond4.preheader.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv.unr %2 = trunc i64 %indvars.iv.unr to i32 store i32 %2, ptr %arrayidx.epil, align 16, !tbaa !5 %distance.epil = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv.unr, i32 1 store i64 0, ptr %distance.epil, align 8, !tbaa !13 br label %for.cond4.preheader for.cond4.preheader: ; preds = %for.body.epil, %for.cond4.preheader.loopexit.unr-lcssa, %entry %3 = load i32, ptr %m, align 4, !tbaa !15 %cmp5193 = icmp sgt i32 %3, 0 br i1 %cmp5193, label %for.body7, label %if.else86 for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 16, !tbaa !5 %distance = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv, i32 1 store i64 0, ptr %distance, align 8, !tbaa !13 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv.next %5 = trunc i64 %indvars.iv.next to i32 store i32 %5, ptr %arrayidx.1, align 16, !tbaa !5 %distance.1 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %indvars.iv.next, i32 1 store i64 0, ptr %distance.1, align 8, !tbaa !13 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond4.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !16 for.cond.cleanup6: ; preds = %for.inc80 %6 = icmp sgt i32 %flag.2, 0 br i1 %6, label %if.end88, label %if.else86 for.body7: ; preds = %for.cond4.preheader, %for.inc80 %flag.0195 = phi i32 [ %flag.2, %for.inc80 ], [ 0, %for.cond4.preheader ] %i3.0194 = phi i32 [ %inc81, %for.inc80 ], [ 0, %for.cond4.preheader ] %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %l, ptr noundef nonnull %r, ptr noundef nonnull %d) %7 = load i32, ptr %l, align 4, !tbaa !15 %dec = add nsw i32 %7, -1 store i32 %dec, ptr %l, align 4, !tbaa !15 %8 = load i32, ptr %r, align 4, !tbaa !15 %dec9 = add nsw i32 %8, -1 store i32 %dec9, ptr %r, align 4, !tbaa !15 %idxprom10 = sext i32 %dec9 to i64 %arrayidx11 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %idxprom10 %9 = load i32, ptr %arrayidx11, align 16, !tbaa !5 %cmp13 = icmp eq i32 %9, %dec9 br i1 %cmp13, label %while.cond.i, label %while.cond.i115 while.cond.i: ; preds = %for.body7, %while.cond.i %k.0.i = phi i32 [ %10, %while.cond.i ], [ %dec, %for.body7 ] %idxprom.i = sext i32 %k.0.i to i64 %arrayidx.i = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i %10 = load i32, ptr %arrayidx.i, align 16, !tbaa !5 %cmp.not.i = icmp eq i32 %10, %k.0.i br i1 %cmp.not.i, label %root.exit, label %while.cond.i, !llvm.loop !11 root.exit: ; preds = %while.cond.i %cmp15 = icmp eq i32 %k.0.i, %dec9 %inc17 = zext i1 %cmp15 to i32 br label %while.cond.i106 while.cond.i106: ; preds = %while.cond.i106, %root.exit %k.0.i107 = phi i32 [ %dec, %root.exit ], [ %11, %while.cond.i106 ] %idxprom.i108 = sext i32 %k.0.i107 to i64 %arrayidx.i109 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i108 %11 = load i32, ptr %arrayidx.i109, align 16, !tbaa !5 %cmp.not.i110 = icmp eq i32 %11, %k.0.i107 br i1 %cmp.not.i110, label %root.exit111, label %while.cond.i106, !llvm.loop !11 root.exit111: ; preds = %while.cond.i106 %spec.select = add nsw i32 %flag.0195, %inc17 store i32 %k.0.i107, ptr %arrayidx11, align 16, !tbaa !5 %12 = load i64, ptr %d, align 8, !tbaa !17 %idxprom12.i = sext i32 %dec to i64 %arrayidx13.i = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom12.i %13 = load i32, ptr %arrayidx13.i, align 16, !tbaa !5 %cmp.not14.i = icmp eq i32 %13, %dec br i1 %cmp.not14.i, label %get_distance.exit, label %while.body.i while.body.i: ; preds = %root.exit111, %while.body.i %14 = phi i32 [ %16, %while.body.i ], [ %13, %root.exit111 ] %idxprom16.i = phi i64 [ %idxprom.i112, %while.body.i ], [ %idxprom12.i, %root.exit111 ] %d.015.i = phi i64 [ %add.i, %while.body.i ], [ 0, %root.exit111 ] %distance.i = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16.i, i32 1 %15 = load i64, ptr %distance.i, align 8, !tbaa !13 %add.i = add nsw i64 %15, %d.015.i %idxprom.i112 = sext i32 %14 to i64 %arrayidx.i113 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i112 %16 = load i32, ptr %arrayidx.i113, align 16, !tbaa !5 %cmp.not.i114 = icmp eq i32 %16, %14 br i1 %cmp.not.i114, label %get_distance.exit, label %while.body.i, !llvm.loop !14 get_distance.exit: ; preds = %while.body.i, %root.exit111 %d.0.lcssa.i = phi i64 [ 0, %root.exit111 ], [ %add.i, %while.body.i ] %add = add nsw i64 %d.0.lcssa.i, %12 %distance27 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %idxprom10, i32 1 store i64 %add, ptr %distance27, align 8, !tbaa !13 br label %for.inc80 while.cond.i115: ; preds = %for.body7, %while.cond.i115 %k.0.i116 = phi i32 [ %17, %while.cond.i115 ], [ %dec9, %for.body7 ] %idxprom.i117 = sext i32 %k.0.i116 to i64 %arrayidx.i118 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i117 %17 = load i32, ptr %arrayidx.i118, align 16, !tbaa !5 %cmp.not.i119 = icmp eq i32 %17, %k.0.i116 br i1 %cmp.not.i119, label %while.cond.i121, label %while.cond.i115, !llvm.loop !11 while.cond.i121: ; preds = %while.cond.i115, %while.cond.i121 %k.0.i122 = phi i32 [ %18, %while.cond.i121 ], [ %dec, %while.cond.i115 ] %idxprom.i123 = sext i32 %k.0.i122 to i64 %arrayidx.i124 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i123 %18 = load i32, ptr %arrayidx.i124, align 16, !tbaa !5 %cmp.not.i125 = icmp eq i32 %18, %k.0.i122 br i1 %cmp.not.i125, label %root.exit126, label %while.cond.i121, !llvm.loop !11 root.exit126: ; preds = %while.cond.i121 %cmp32.not = icmp eq i32 %k.0.i116, %k.0.i122 %idxprom12.i165 = sext i32 %dec to i64 %arrayidx13.i166 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom12.i165 %19 = load i32, ptr %arrayidx13.i166, align 16, !tbaa !5 %cmp.not14.i167 = icmp eq i32 %19, %dec br i1 %cmp32.not, label %if.else67, label %if.then33 if.then33: ; preds = %root.exit126 br i1 %cmp.not14.i167, label %while.body.i143.preheader, label %while.body.i130 while.body.i130: ; preds = %if.then33, %while.body.i130 %20 = phi i32 [ %22, %while.body.i130 ], [ %19, %if.then33 ] %idxprom16.i131 = phi i64 [ %idxprom.i135, %while.body.i130 ], [ %idxprom12.i165, %if.then33 ] %d.015.i132 = phi i64 [ %add.i134, %while.body.i130 ], [ 0, %if.then33 ] %distance.i133 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16.i131, i32 1 %21 = load i64, ptr %distance.i133, align 8, !tbaa !13 %add.i134 = add nsw i64 %21, %d.015.i132 %idxprom.i135 = sext i32 %20 to i64 %arrayidx.i136 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i135 %22 = load i32, ptr %arrayidx.i136, align 16, !tbaa !5 %cmp.not.i137 = icmp eq i32 %22, %20 br i1 %cmp.not.i137, label %while.body.i143.preheader, label %while.body.i130, !llvm.loop !14 while.body.i143.preheader: ; preds = %while.body.i130, %if.then33 %d.0.lcssa.i138 = phi i64 [ 0, %if.then33 ], [ %add.i134, %while.body.i130 ] br label %while.body.i143 while.body.i143: ; preds = %while.body.i143.preheader, %while.body.i143 %23 = phi i32 [ %25, %while.body.i143 ], [ %9, %while.body.i143.preheader ] %idxprom16.i144 = phi i64 [ %idxprom.i148, %while.body.i143 ], [ %idxprom10, %while.body.i143.preheader ] %d.015.i145 = phi i64 [ %add.i147, %while.body.i143 ], [ 0, %while.body.i143.preheader ] %distance.i146 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16.i144, i32 1 %24 = load i64, ptr %distance.i146, align 8, !tbaa !13 %add.i147 = add nsw i64 %24, %d.015.i145 %idxprom.i148 = sext i32 %23 to i64 %arrayidx.i149 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i148 %25 = load i32, ptr %arrayidx.i149, align 16, !tbaa !5 %cmp.not.i150 = icmp eq i32 %25, %23 br i1 %cmp.not.i150, label %while.cond.i153, label %while.body.i143, !llvm.loop !14 while.cond.i153: ; preds = %while.body.i143, %while.cond.i153 %k.0.i154 = phi i32 [ %26, %while.cond.i153 ], [ %dec, %while.body.i143 ] %idxprom.i155 = sext i32 %k.0.i154 to i64 %arrayidx.i156 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i155 %26 = load i32, ptr %arrayidx.i156, align 16, !tbaa !5 %cmp.not.i157 = icmp eq i32 %26, %k.0.i154 br i1 %cmp.not.i157, label %while.cond.i159, label %while.cond.i153, !llvm.loop !11 while.cond.i159: ; preds = %while.cond.i153, %while.cond.i159 %k.0.i160 = phi i32 [ %27, %while.cond.i159 ], [ %dec9, %while.cond.i153 ] %idxprom.i161 = sext i32 %k.0.i160 to i64 %arrayidx.i162 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i161 %27 = load i32, ptr %arrayidx.i162, align 16, !tbaa !5 %cmp.not.i163 = icmp eq i32 %27, %k.0.i160 br i1 %cmp.not.i163, label %root.exit164, label %while.cond.i159, !llvm.loop !11 root.exit164: ; preds = %while.cond.i159 store i32 %k.0.i154, ptr %arrayidx11, align 16, !tbaa !5 %28 = load i64, ptr %d, align 8, !tbaa !17 %add45 = add nsw i64 %28, %d.0.lcssa.i138 %distance48 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %idxprom10, i32 1 store i64 %add45, ptr %distance48, align 8, !tbaa !13 %sub = sub nsw i64 %add45, %add.i147 %cmp50 = icmp sgt i64 %sub, -1 br i1 %cmp50, label %if.then51, label %if.else58 if.then51: ; preds = %root.exit164 store i32 %k.0.i154, ptr %arrayidx.i162, align 16, !tbaa !5 %distance57 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %idxprom.i161, i32 1 store i64 %sub, ptr %distance57, align 8, !tbaa !13 br label %for.inc80 if.else58: ; preds = %root.exit164 store i32 %k.0.i160, ptr %arrayidx.i156, align 16, !tbaa !5 %sub62 = sub nsw i64 0, %sub %distance65 = getelementptr inbounds [100000 x %struct.node], ptr %x, i64 0, i64 %idxprom.i155, i32 1 store i64 %sub62, ptr %distance65, align 8, !tbaa !13 br label %for.inc80 if.else67: ; preds = %root.exit126 br i1 %cmp.not14.i167, label %while.body.i181.preheader, label %while.body.i168 while.body.i168: ; preds = %if.else67, %while.body.i168 %29 = phi i32 [ %31, %while.body.i168 ], [ %19, %if.else67 ] %idxprom16.i169 = phi i64 [ %idxprom.i173, %while.body.i168 ], [ %idxprom12.i165, %if.else67 ] %d.015.i170 = phi i64 [ %add.i172, %while.body.i168 ], [ 0, %if.else67 ] %distance.i171 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16.i169, i32 1 %30 = load i64, ptr %distance.i171, align 8, !tbaa !13 %add.i172 = add nsw i64 %30, %d.015.i170 %idxprom.i173 = sext i32 %29 to i64 %arrayidx.i174 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i173 %31 = load i32, ptr %arrayidx.i174, align 16, !tbaa !5 %cmp.not.i175 = icmp eq i32 %31, %29 br i1 %cmp.not.i175, label %while.body.i181.preheader, label %while.body.i168, !llvm.loop !14 while.body.i181.preheader: ; preds = %while.body.i168, %if.else67 %d.0.lcssa.i176 = phi i64 [ 0, %if.else67 ], [ %add.i172, %while.body.i168 ] br label %while.body.i181 while.body.i181: ; preds = %while.body.i181.preheader, %while.body.i181 %32 = phi i32 [ %34, %while.body.i181 ], [ %9, %while.body.i181.preheader ] %idxprom16.i182 = phi i64 [ %idxprom.i186, %while.body.i181 ], [ %idxprom10, %while.body.i181.preheader ] %d.015.i183 = phi i64 [ %add.i185, %while.body.i181 ], [ 0, %while.body.i181.preheader ] %distance.i184 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom16.i182, i32 1 %33 = load i64, ptr %distance.i184, align 8, !tbaa !13 %add.i185 = add nsw i64 %33, %d.015.i183 %idxprom.i186 = sext i32 %32 to i64 %arrayidx.i187 = getelementptr inbounds %struct.node, ptr %x, i64 %idxprom.i186 %34 = load i32, ptr %arrayidx.i187, align 16, !tbaa !5 %cmp.not.i188 = icmp eq i32 %34, %32 br i1 %cmp.not.i188, label %get_distance.exit190, label %while.body.i181, !llvm.loop !14 get_distance.exit190: ; preds = %while.body.i181 %sub72 = sub nsw i64 %d.0.lcssa.i176, %add.i185 %35 = load i64, ptr %d, align 8, !tbaa !17 %sub73 = sub nsw i64 0, %35 %cmp74.not = icmp ne i64 %sub72, %sub73 %inc76 = zext i1 %cmp74.not to i32 %spec.select105 = add nsw i32 %flag.0195, %inc76 br label %for.inc80 for.inc80: ; preds = %get_distance.exit190, %if.then51, %if.else58, %get_distance.exit %flag.2 = phi i32 [ %spec.select, %get_distance.exit ], [ %flag.0195, %if.else58 ], [ %flag.0195, %if.then51 ], [ %spec.select105, %get_distance.exit190 ] %inc81 = add nuw nsw i32 %i3.0194, 1 %36 = load i32, ptr %m, align 4, !tbaa !15 %cmp5 = icmp slt i32 %inc81, %36 br i1 %cmp5, label %for.body7, label %for.cond.cleanup6, !llvm.loop !18 if.else86: ; preds = %for.cond4.preheader, %for.cond.cleanup6 br label %if.end88 if.end88: ; preds = %for.cond.cleanup6, %if.else86 %str.sink = phi ptr [ @str, %if.else86 ], [ @str.4, %for.cond.cleanup6 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 1600000, ptr nonnull %x) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %d) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree norecurse nosync nounwind memory(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 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"node", !7, i64 0, !10, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"long", !8, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!6, !10, i64 8} !14 = distinct !{!14, !12} !15 = !{!7, !7, i64 0} !16 = distinct !{!16, !12} !17 = !{!10, !10, i64 0} !18 = distinct !{!18, !12}
#include <stdio.h> int main(void){ int n,x,t; setbuf(stdout,NULL); scanf("%d%d%d",&n,&x,&t); if(n%x==0){ printf("%d",(n/x)*t); }else{ printf("%d",(n/x)*t+t); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135565/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135565/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdout = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %0 = load ptr, ptr @stdout, align 8, !tbaa !5 tail call void @setbuf(ptr noundef %0, ptr noundef null) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %1 = load i32, ptr %n, align 4, !tbaa !9 %2 = load i32, ptr %x, align 4, !tbaa !9 %rem = srem i32 %1, %2 %cmp = icmp ne i32 %rem, 0 %div = sdiv i32 %1, %2 %3 = load i32, ptr %t, align 4, !tbaa !9 %mul35 = zext i1 %cmp to i32 %add.sink.v = add i32 %div, %mul35 %add.sink = mul i32 %3, %add.sink.v %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare void @setbuf(ptr nocapture noundef, ptr noundef) local_unnamed_addr #2 ; 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 = !{!"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}
#include<stdio.h> #include<math.h> int main(){ int n, x, t; scanf("%d%d%d", &n, &x, &t); printf("%.0f\n", ceil(n*1.0/x*1.0)*t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135615/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [6 x i8] c"%.0f\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %1 = load i32, ptr %x, align 4, !tbaa !5 %conv1 = sitofp i32 %1 to double %div = fdiv double %conv, %conv1 %2 = call double @llvm.ceil.f64(double %div) %3 = load i32, ptr %t, align 4, !tbaa !5 %conv3 = sitofp i32 %3 to double %mul4 = fmul double %2, %conv3 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %mul4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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 speculatable willreturn memory(none) declare double @llvm.ceil.f64(double) #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 nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int n,x,t,ans=0; scanf("%d%d%d", &n, &x, &t); if(n%x){ ans = ((n/x)+1) *t; } else { ans = n/x *t; } printf("%d\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135659/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135659/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %rem = srem i32 %0, %1 %tobool.not = icmp eq i32 %rem, 0 %div1 = sdiv i32 %0, %1 br i1 %tobool.not, label %if.else, label %if.then if.then: ; preds = %entry %add = add nsw i32 %div1, 1 %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %add, %2 br label %if.end if.else: ; preds = %entry %3 = load i32, ptr %t, align 4, !tbaa !5 %mul2 = mul nsw i32 %3, %div1 br label %if.end if.end: ; preds = %if.else, %if.then %ans.0 = phi i32 [ %mul, %if.then ], [ %mul2, %if.else ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int n,x,y,z=0; scanf("%d" "%d" "%d",&n,&x,&y); while(n>0){ n=n-x; z=z+y; } printf("%d",z); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %y) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp3 = icmp sgt i32 %.pr, 0 br i1 %cmp3, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %z.04 = phi i32 [ 0, %while.body.lr.ph ], [ %add, %while.body ] %2 = phi i32 [ %.pr, %while.body.lr.ph ], [ %sub, %while.body ] %sub = sub nsw i32 %2, %0 %add = add nsw i32 %1, %z.04 %cmp = icmp sgt i32 %sub, 0 br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %sub, ptr %n, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %z.0.lcssa = phi i32 [ %add, %while.cond.while.end_crit_edge ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %z.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main() { int n,x,t,ans; scanf("%d %d %d",&n,&x,&t); if (n%x==0) ans = (n/x) * t; else ans = ((n/x) + 1) * t; printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135752/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %x, align 4, !tbaa !5 %rem = srem i32 %0, %1 %cmp = icmp eq i32 %rem, 0 %div = sdiv i32 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %2 = load i32, ptr %t, align 4, !tbaa !5 %mul = mul nsw i32 %2, %div br label %if.end if.else: ; preds = %entry %add = add nsw i32 %div, 1 %3 = load i32, ptr %t, align 4, !tbaa !5 %mul2 = mul nsw i32 %add, %3 br label %if.end if.end: ; preds = %if.else, %if.then %ans.0 = phi i32 [ %mul, %if.then ], [ %mul2, %if.else ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #define _USE_MATH_DEFINES #include <math.h> #include <stdlib.h> #include <sys/stat.h> #include <string.h> int N_in; int X_in; int T_in; int out; int main(int argc, char* argv[]){ int i,j; scanf("%d %d %d",&N_in, &X_in, &T_in); out = N_in/X_in; if(N_in % X_in >=1){ out ++; } out *= T_in; printf("%d",out); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135802/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @N_in = dso_local global i32 0, align 4 @X_in = dso_local global i32 0, align 4 @T_in = dso_local global i32 0, align 4 @out = dso_local local_unnamed_addr global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N_in, ptr noundef nonnull @X_in, ptr noundef nonnull @T_in) %0 = load i32, ptr @N_in, align 4, !tbaa !5 %1 = load i32, ptr @X_in, align 4, !tbaa !5 %div = sdiv i32 %0, %1 %rem = srem i32 %0, %1 %cmp = icmp sgt i32 %rem, 0 %inc = zext i1 %cmp to i32 %spec.select = add nsw i32 %div, %inc %2 = load i32, ptr @T_in, align 4, !tbaa !5 %mul = mul nsw i32 %spec.select, %2 store i32 %mul, ptr @out, align 4, !tbaa !5 %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int n,x,t; scanf("%d%d%d",&n,&x,&t); int ans = 0; while(n > 0){ n -= x; ans += t; } printf("%d\n",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135846/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135846/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %x = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %t) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp3 = icmp sgt i32 %.pr, 0 br i1 %cmp3, label %while.body.lr.ph, label %while.end while.body.lr.ph: ; preds = %entry %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %t, align 4, !tbaa !5 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %ans.04 = phi i32 [ 0, %while.body.lr.ph ], [ %add, %while.body ] %2 = phi i32 [ %.pr, %while.body.lr.ph ], [ %sub, %while.body ] %sub = sub nsw i32 %2, %0 %add = add nsw i32 %1, %ans.04 %cmp = icmp sgt i32 %sub, 0 br i1 %cmp, label %while.body, label %while.cond.while.end_crit_edge, !llvm.loop !9 while.cond.while.end_crit_edge: ; preds = %while.body store i32 %sub, ptr %n, align 4, !tbaa !5 br label %while.end while.end: ; preds = %while.cond.while.end_crit_edge, %entry %ans.0.lcssa = phi i32 [ %add, %while.cond.while.end_crit_edge ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> struct node { int ho,aw; }; /*inline void fastRead_int(int &x) { register int c = getchar_unlocked(); x = 0; int neg = 0; for(; ((c<48 || c>57) && c != '-'); c = getchar_unlocked()); if(c=='-') { neg = 1; c = getchar_unlocked(); } for(; c>47 && c<58 ; c = getchar_unlocked()) { x = (x<<1) + (x<<3) + c - 48; } if(neg) x = -x; }*/ int main() { // your code goes here int n,k,i,j,home[100005]={0}; struct node a[100005]; scanf("%d",&n); //fastRead_int(n); for(i=0;i<n;i++) { //fastRead_int(a[i].ho); //fastRead_int(a[i].aw); scanf("%d %d",&a[i].ho,&a[i].aw); home[a[i].ho]+=1; } for(i=0;i<n;i++) { int hom=0,awa=0; hom+=n-1; hom+=home[a[i].aw]; awa=n-1-home[a[i].aw]; printf("%d %d\n",hom,awa); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13589/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13589/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node = type { i32, i32 } @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [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 %home = alloca [100005 x i32], align 16 %a = alloca [100005 x %struct.node], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 400020, ptr nonnull %home) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400020) %home, i8 0, i64 400020, i1 false) call void @llvm.lifetime.start.p0(i64 800040, 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 %cmp40 = icmp sgt i32 %0, 0 br i1 %cmp40, label %for.body, label %for.end29 for.cond9.preheader: ; preds = %for.body %cmp1042 = icmp sgt i32 %3, 0 br i1 %cmp1042, label %for.body11, label %for.end29 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100005 x %struct.node], ptr %a, i64 0, i64 %indvars.iv %aw = getelementptr inbounds [100005 x %struct.node], ptr %a, i64 0, i64 %indvars.iv, i32 1 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %aw) %1 = load i32, ptr %arrayidx, align 8, !tbaa !9 %idxprom7 = sext i32 %1 to i64 %arrayidx8 = getelementptr inbounds [100005 x i32], ptr %home, i64 0, i64 %idxprom7 %2 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %add = add nsw i32 %2, 1 store i32 %add, ptr %arrayidx8, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond9.preheader, !llvm.loop !11 for.body11: ; preds = %for.cond9.preheader, %for.body11 %indvars.iv45 = phi i64 [ %indvars.iv.next46, %for.body11 ], [ 0, %for.cond9.preheader ] %5 = phi i32 [ %8, %for.body11 ], [ %3, %for.cond9.preheader ] %sub = add nsw i32 %5, -1 %aw15 = getelementptr inbounds [100005 x %struct.node], ptr %a, i64 0, i64 %indvars.iv45, i32 1 %6 = load i32, ptr %aw15, align 4, !tbaa !13 %idxprom16 = sext i32 %6 to i64 %arrayidx17 = getelementptr inbounds [100005 x i32], ptr %home, i64 0, i64 %idxprom16 %7 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %add18 = add nsw i32 %7, %sub %sub25 = sub nsw i32 %sub, %7 %call26 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add18, i32 noundef %sub25) %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp10 = icmp slt i64 %indvars.iv.next46, %9 br i1 %cmp10, label %for.body11, label %for.end29, !llvm.loop !14 for.end29: ; preds = %for.body11, %entry, %for.cond9.preheader call void @llvm.lifetime.end.p0(i64 800040, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 400020, ptr nonnull %home) #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 = !{!10, !6, i64 0} !10 = !{!"node", !6, i64 0, !6, i64 4} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!10, !6, i64 4} !14 = distinct !{!14, !12}
#include <stdio.h> int main(void) { int m, j, b, a, c; scanf("%d" "%d" "%d", &m, &j, &b); a = b - m; if(a > 0){ c = j - a; if(c < 0){ printf("NA\n"); } else{ printf("%d\n", a); } } else{ printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135932/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135932/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"0\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"NA\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %j = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m, ptr noundef nonnull %j, ptr noundef nonnull %b) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %m, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 %cmp = icmp sgt i32 %sub, 0 br i1 %cmp, label %if.then, label %if.else6 if.then: ; preds = %entry %2 = load i32, ptr %j, align 4, !tbaa !5 %cmp2 = icmp slt i32 %2, %sub br i1 %cmp2, label %if.then3, label %if.else if.then3: ; preds = %if.then %puts11 = call i32 @puts(ptr nonnull dereferenceable(1) @str.4) br label %if.end8 if.else: ; preds = %if.then %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) br label %if.end8 if.else6: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end8 if.end8: ; preds = %if.then3, %if.else, %if.else6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int n; scanf("%d",&n); for(int i=1;i<10;i++){ for(int j=1;j<10;j++){ if(i*j==n){ printf("Yes"); return 0; } } } printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_135983/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_135983/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %cleanup9, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp5.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond23 = icmp eq i32 %7, 1 %cmp5.5 = icmp eq i32 %0, 6 %exitcond24 = icmp eq i32 %2, 1 %cmp5.7 = icmp eq i32 %0, 8 %exitcond25 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond23.1 = icmp eq i32 %7, 2 %cmp5.5.1 = icmp eq i32 %0, 12 %exitcond24.1 = icmp eq i32 %2, 2 %cmp5.7.1 = icmp eq i32 %0, 16 %exitcond25.1 = icmp eq i32 %1, 2 %cmp5.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond23.2 = icmp eq i32 %7, 3 %cmp5.5.2 = icmp eq i32 %0, 18 %exitcond24.2 = icmp eq i32 %2, 3 %cmp5.7.2 = icmp eq i32 %0, 24 %exitcond25.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond23.3 = icmp eq i32 %7, 4 %exitcond24.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond24.4 = icmp eq i32 %2, 5 %cmp5.7.4 = icmp eq i32 %0, 40 %exitcond25.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp5.5.6 = icmp eq i32 %0, 42 %exitcond24.6 = icmp eq i32 %2, 7 %cmp5.7.6 = icmp eq i32 %0, 56 %exitcond25.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond24.7 = icmp eq i32 %2, 8 %cmp5.7.7 = icmp eq i32 %0, 64 %exitcond25.7 = icmp eq i32 %1, 8 %cmp5.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond23.8 = icmp eq i32 %7, 9 %cmp5.5.8 = icmp eq i32 %0, 54 %exitcond24.8 = icmp eq i32 %2, 9 %cmp5.7.8 = icmp eq i32 %0, 72 %exitcond25.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx98 = or i1 %op.rdx, %cmp5.3 %op.rdx99 = or i1 %exitcond, %exitcond23 %op.rdx100 = or i1 %cmp5.5, %exitcond24 %op.rdx101 = or i1 %cmp5.7, %exitcond25 %op.rdx102 = or i1 %exitcond.1, %exitcond23.1 %op.rdx103 = or i1 %cmp5.5.1, %exitcond24.1 %op.rdx104 = or i1 %cmp5.7.1, %exitcond25.1 %op.rdx105 = or i1 %cmp5.2, %exitcond.2 %op.rdx106 = or i1 %exitcond23.2, %cmp5.5.2 %op.rdx107 = or i1 %exitcond24.2, %cmp5.7.2 %op.rdx108 = or i1 %exitcond25.2, %exitcond.3 %op.rdx109 = or i1 %exitcond23.3, %exitcond24.3 %op.rdx110 = or i1 %exitcond24.4, %cmp5.7.4 %op.rdx111 = or i1 %exitcond25.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx112 = icmp eq i32 %22, 6 %op.rdx113 = or i1 %cmp5.5.6, %exitcond24.6 %op.rdx114 = or i1 %cmp5.7.6, %exitcond25.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx115 = extractelement <2 x i1> %23, i64 0 %op.rdx116 = or i1 %exitcond24.7, %cmp5.7.7 %op.rdx117 = or i1 %exitcond25.7, %cmp5.8 %op.rdx118 = or i1 %exitcond.8, %exitcond23.8 %op.rdx119 = or i1 %cmp5.5.8, %exitcond24.8 %op.rdx120 = or i1 %cmp5.7.8, %exitcond25.8 %op.rdx121 = or i1 %op.rdx98, %op.rdx99 %op.rdx122 = or i1 %op.rdx100, %op.rdx101 %op.rdx123 = or i1 %op.rdx102, %op.rdx103 %op.rdx124 = or i1 %op.rdx104, %op.rdx105 %op.rdx125 = or i1 %op.rdx106, %op.rdx107 %op.rdx126 = or i1 %op.rdx108, %op.rdx109 %op.rdx127 = or i1 %op.rdx110, %op.rdx111 %op.rdx128 = or i1 %op.rdx112, %op.rdx113 %op.rdx129 = or i1 %op.rdx114, %op.rdx115 %op.rdx130 = or i1 %op.rdx116, %op.rdx117 %op.rdx131 = or i1 %op.rdx118, %op.rdx119 %op.rdx132 = or i1 %op.rdx121, %op.rdx122 %op.rdx133 = or i1 %op.rdx123, %op.rdx124 %op.rdx134 = or i1 %op.rdx125, %op.rdx126 %op.rdx135 = or i1 %op.rdx127, %op.rdx128 %op.rdx136 = or i1 %op.rdx129, %op.rdx130 %op.rdx137 = or i1 %op.rdx131, %op.rdx120 %op.rdx138 = or i1 %op.rdx132, %op.rdx133 %op.rdx139 = or i1 %op.rdx134, %op.rdx135 %op.rdx140 = or i1 %op.rdx136, %op.rdx137 %op.rdx141 = or i1 %op.rdx138, %op.rdx139 %op.rdx142 = or i1 %op.rdx141, %op.rdx140 br i1 %op.rdx142, label %cleanup9, label %cleanup13 cleanup9: ; preds = %entry, %for.cond1.1 br label %cleanup13 cleanup13: ; preds = %for.cond1.1, %cleanup9 %.str.1.sink = phi ptr [ @.str.1, %cleanup9 ], [ @.str.2, %for.cond1.1 ] %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
/* ex3_4 key_tree */ #include <stdio.h> // Nを1-9で割った商が1-9かつ余りが0になればよい int main(void) { int N; scanf("%d", &N); int i = 1; // 1-9まで調べる while(i < 10){ int quotient = N / i; int remainder = N % i; //商が1-9かつ余り0 if(quotient >= 1 && quotient <= 9 && remainder == 0){ printf("Yes\n"); break;/*当てはまったらwhile脱出*/ } i += 1; } if(i == 10){ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136025/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136025/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = add i32 %0, -1 %or.cond = icmp ult i32 %1, 9 br i1 %or.cond, label %if.end10, label %cleanup cleanup: ; preds = %entry %div.1 = sdiv i32 %0, 2 %2 = add nsw i32 %div.1, -1 %or.cond.1 = icmp ult i32 %2, 9 %3 = and i32 %0, 1 %cmp4.1 = icmp eq i32 %3, 0 %or.cond13.1 = and i1 %or.cond.1, %cmp4.1 br i1 %or.cond13.1, label %if.end10, label %cleanup.1 cleanup.1: ; preds = %cleanup %div.2 = sdiv i32 %0, 3 %rem.2 = srem i32 %0, 3 %4 = add nsw i32 %div.2, -1 %or.cond.2 = icmp ult i32 %4, 9 %cmp4.2 = icmp eq i32 %rem.2, 0 %or.cond13.2 = and i1 %or.cond.2, %cmp4.2 br i1 %or.cond13.2, label %if.end10, label %cleanup.2 cleanup.2: ; preds = %cleanup.1 %div.3 = sdiv i32 %0, 4 %5 = add nsw i32 %div.3, -1 %or.cond.3 = icmp ult i32 %5, 9 %6 = and i32 %0, 3 %cmp4.3 = icmp eq i32 %6, 0 %or.cond13.3 = and i1 %or.cond.3, %cmp4.3 br i1 %or.cond13.3, label %if.end10, label %cleanup.3 cleanup.3: ; preds = %cleanup.2 %div.4 = sdiv i32 %0, 5 %rem.4 = srem i32 %0, 5 %7 = add nsw i32 %div.4, -1 %or.cond.4 = icmp ult i32 %7, 9 %cmp4.4 = icmp eq i32 %rem.4, 0 %or.cond13.4 = and i1 %or.cond.4, %cmp4.4 br i1 %or.cond13.4, label %if.end10, label %cleanup.4 cleanup.4: ; preds = %cleanup.3 %div.5 = sdiv i32 %0, 6 %rem.5 = srem i32 %0, 6 %8 = add nsw i32 %div.5, -1 %or.cond.5 = icmp ult i32 %8, 9 %cmp4.5 = icmp eq i32 %rem.5, 0 %or.cond13.5 = and i1 %or.cond.5, %cmp4.5 br i1 %or.cond13.5, label %if.end10, label %cleanup.5 cleanup.5: ; preds = %cleanup.4 %div.6 = sdiv i32 %0, 7 %rem.6 = srem i32 %0, 7 %9 = add nsw i32 %div.6, -1 %or.cond.6 = icmp ult i32 %9, 9 %cmp4.6 = icmp eq i32 %rem.6, 0 %or.cond13.6 = and i1 %or.cond.6, %cmp4.6 br i1 %or.cond13.6, label %if.end10, label %cleanup.6 cleanup.6: ; preds = %cleanup.5 %div.7 = sdiv i32 %0, 8 %10 = add nsw i32 %div.7, -1 %or.cond.7 = icmp ult i32 %10, 9 %11 = and i32 %0, 7 %cmp4.7 = icmp eq i32 %11, 0 %or.cond13.7 = and i1 %or.cond.7, %cmp4.7 br i1 %or.cond13.7, label %if.end10, label %cleanup.7 cleanup.7: ; preds = %cleanup.6 %div.8 = sdiv i32 %0, 9 %rem.8 = srem i32 %0, 9 %12 = add nsw i32 %div.8, -1 %or.cond.8 = icmp ult i32 %12, 9 %cmp4.8 = icmp eq i32 %rem.8, 0 %or.cond13.8 = and i1 %or.cond.8, %cmp4.8 %spec.select = select i1 %or.cond13.8, ptr @str, ptr @str.3 br label %if.end10 if.end10: ; preds = %cleanup.7, %entry, %cleanup, %cleanup.1, %cleanup.2, %cleanup.3, %cleanup.4, %cleanup.5, %cleanup.6 %str.sink = phi ptr [ @str, %cleanup.6 ], [ @str, %cleanup.5 ], [ @str, %cleanup.4 ], [ @str, %cleanup.3 ], [ @str, %cleanup.2 ], [ @str, %cleanup.1 ], [ @str, %cleanup ], [ @str, %entry ], [ %spec.select, %cleanup.7 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
/* ex3_4 potter0723sw */ //方針:Nを1〜9で割ってみて商が1〜9かつ余りが0か調べる #include <stdio.h> int main(void) { int number,quotient,remainder,d;//dはdevide scanf("%d", &number); d = 1; while(d <= 9){//1~9まで調べる quotient = number / d;//商 remainder = number % d;//余り if(quotient >= 1 && quotient <= 9 && remainder == 0){//商が1〜9かつ余りが0 printf("Yes\n"); break;//Yesを出力してwhile脱出 } d += 1; } if(d == 10){//1〜9まで試してダメだった場合d=10なのでその時にNoを出力 printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136069/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136069/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %number = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %number) %0 = load i32, ptr %number, align 4, !tbaa !5 %1 = add i32 %0, -1 %or.cond = icmp ult i32 %1, 9 br i1 %or.cond, label %if.end9, label %if.end if.end: ; preds = %entry %div.1 = sdiv i32 %0, 2 %2 = add nsw i32 %div.1, -1 %or.cond.1 = icmp ult i32 %2, 9 %3 = and i32 %0, 1 %cmp4.1 = icmp eq i32 %3, 0 %or.cond10.1 = and i1 %or.cond.1, %cmp4.1 br i1 %or.cond10.1, label %if.end9, label %if.end.1 if.end.1: ; preds = %if.end %div.2 = sdiv i32 %0, 3 %rem.2 = srem i32 %0, 3 %4 = add nsw i32 %div.2, -1 %or.cond.2 = icmp ult i32 %4, 9 %cmp4.2 = icmp eq i32 %rem.2, 0 %or.cond10.2 = and i1 %or.cond.2, %cmp4.2 br i1 %or.cond10.2, label %if.end9, label %if.end.2 if.end.2: ; preds = %if.end.1 %div.3 = sdiv i32 %0, 4 %5 = add nsw i32 %div.3, -1 %or.cond.3 = icmp ult i32 %5, 9 %6 = and i32 %0, 3 %cmp4.3 = icmp eq i32 %6, 0 %or.cond10.3 = and i1 %or.cond.3, %cmp4.3 br i1 %or.cond10.3, label %if.end9, label %if.end.3 if.end.3: ; preds = %if.end.2 %div.4 = sdiv i32 %0, 5 %rem.4 = srem i32 %0, 5 %7 = add nsw i32 %div.4, -1 %or.cond.4 = icmp ult i32 %7, 9 %cmp4.4 = icmp eq i32 %rem.4, 0 %or.cond10.4 = and i1 %or.cond.4, %cmp4.4 br i1 %or.cond10.4, label %if.end9, label %if.end.4 if.end.4: ; preds = %if.end.3 %div.5 = sdiv i32 %0, 6 %rem.5 = srem i32 %0, 6 %8 = add nsw i32 %div.5, -1 %or.cond.5 = icmp ult i32 %8, 9 %cmp4.5 = icmp eq i32 %rem.5, 0 %or.cond10.5 = and i1 %or.cond.5, %cmp4.5 br i1 %or.cond10.5, label %if.end9, label %if.end.5 if.end.5: ; preds = %if.end.4 %div.6 = sdiv i32 %0, 7 %rem.6 = srem i32 %0, 7 %9 = add nsw i32 %div.6, -1 %or.cond.6 = icmp ult i32 %9, 9 %cmp4.6 = icmp eq i32 %rem.6, 0 %or.cond10.6 = and i1 %or.cond.6, %cmp4.6 br i1 %or.cond10.6, label %if.end9, label %if.end.6 if.end.6: ; preds = %if.end.5 %div.7 = sdiv i32 %0, 8 %10 = add nsw i32 %div.7, -1 %or.cond.7 = icmp ult i32 %10, 9 %11 = and i32 %0, 7 %cmp4.7 = icmp eq i32 %11, 0 %or.cond10.7 = and i1 %or.cond.7, %cmp4.7 br i1 %or.cond10.7, label %if.end9, label %if.end.7 if.end.7: ; preds = %if.end.6 %div.8 = sdiv i32 %0, 9 %rem.8 = srem i32 %0, 9 %12 = add nsw i32 %div.8, -1 %or.cond.8 = icmp ult i32 %12, 9 %cmp4.8 = icmp eq i32 %rem.8, 0 %or.cond10.8 = and i1 %or.cond.8, %cmp4.8 %spec.select = select i1 %or.cond10.8, ptr @str, ptr @str.3 br label %if.end9 if.end9: ; preds = %if.end.7, %entry, %if.end, %if.end.1, %if.end.2, %if.end.3, %if.end.4, %if.end.5, %if.end.6 %str.sink = phi ptr [ @str, %if.end.6 ], [ @str, %if.end.5 ], [ @str, %if.end.4 ], [ @str, %if.end.3 ], [ @str, %if.end.2 ], [ @str, %if.end.1 ], [ @str, %if.end ], [ @str, %entry ], [ %spec.select, %if.end.7 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
/* ex3_4 kanon */ #include <stdio.h> int main(void) { //与えられる値を入れる変数を宣言 int number; //変数に値を入力する scanf("%d", &number); //九九に含まれる値全てについてNと一致しないか調べる //一致すればflagを1にする、flagを使って答えの出力の場合分けをする int flag=0; for(int i=1;i<=9;i++){ for(int j=1;j<=9;j++){ if(i*j==number){ flag=1; break; } } if(flag){ break; } } //答えの出力 if(flag){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %number = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %number) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %number) %0 = load i32, ptr %number, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %if.then13, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp5.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond27 = icmp eq i32 %7, 1 %cmp5.5 = icmp eq i32 %0, 6 %exitcond28 = icmp eq i32 %2, 1 %cmp5.7 = icmp eq i32 %0, 8 %exitcond29 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond27.1 = icmp eq i32 %7, 2 %cmp5.5.1 = icmp eq i32 %0, 12 %exitcond28.1 = icmp eq i32 %2, 2 %cmp5.7.1 = icmp eq i32 %0, 16 %exitcond29.1 = icmp eq i32 %1, 2 %cmp5.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond27.2 = icmp eq i32 %7, 3 %cmp5.5.2 = icmp eq i32 %0, 18 %exitcond28.2 = icmp eq i32 %2, 3 %cmp5.7.2 = icmp eq i32 %0, 24 %exitcond29.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond27.3 = icmp eq i32 %7, 4 %exitcond28.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond28.4 = icmp eq i32 %2, 5 %cmp5.7.4 = icmp eq i32 %0, 40 %exitcond29.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp5.5.6 = icmp eq i32 %0, 42 %exitcond28.6 = icmp eq i32 %2, 7 %cmp5.7.6 = icmp eq i32 %0, 56 %exitcond29.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond28.7 = icmp eq i32 %2, 8 %cmp5.7.7 = icmp eq i32 %0, 64 %exitcond29.7 = icmp eq i32 %1, 8 %cmp5.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond27.8 = icmp eq i32 %7, 9 %cmp5.5.8 = icmp eq i32 %0, 54 %exitcond28.8 = icmp eq i32 %2, 9 %cmp5.7.8 = icmp eq i32 %0, 72 %exitcond29.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx102 = or i1 %op.rdx, %cmp5.3 %op.rdx103 = or i1 %exitcond, %exitcond27 %op.rdx104 = or i1 %cmp5.5, %exitcond28 %op.rdx105 = or i1 %cmp5.7, %exitcond29 %op.rdx106 = or i1 %exitcond.1, %exitcond27.1 %op.rdx107 = or i1 %cmp5.5.1, %exitcond28.1 %op.rdx108 = or i1 %cmp5.7.1, %exitcond29.1 %op.rdx109 = or i1 %cmp5.2, %exitcond.2 %op.rdx110 = or i1 %exitcond27.2, %cmp5.5.2 %op.rdx111 = or i1 %exitcond28.2, %cmp5.7.2 %op.rdx112 = or i1 %exitcond29.2, %exitcond.3 %op.rdx113 = or i1 %exitcond27.3, %exitcond28.3 %op.rdx114 = or i1 %exitcond28.4, %cmp5.7.4 %op.rdx115 = or i1 %exitcond29.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx116 = icmp eq i32 %22, 6 %op.rdx117 = or i1 %cmp5.5.6, %exitcond28.6 %op.rdx118 = or i1 %cmp5.7.6, %exitcond29.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx119 = extractelement <2 x i1> %23, i64 0 %op.rdx120 = or i1 %exitcond28.7, %cmp5.7.7 %op.rdx121 = or i1 %exitcond29.7, %cmp5.8 %op.rdx122 = or i1 %exitcond.8, %exitcond27.8 %op.rdx123 = or i1 %cmp5.5.8, %exitcond28.8 %op.rdx124 = or i1 %cmp5.7.8, %exitcond29.8 %op.rdx125 = or i1 %op.rdx102, %op.rdx103 %op.rdx126 = or i1 %op.rdx104, %op.rdx105 %op.rdx127 = or i1 %op.rdx106, %op.rdx107 %op.rdx128 = or i1 %op.rdx108, %op.rdx109 %op.rdx129 = or i1 %op.rdx110, %op.rdx111 %op.rdx130 = or i1 %op.rdx112, %op.rdx113 %op.rdx131 = or i1 %op.rdx114, %op.rdx115 %op.rdx132 = or i1 %op.rdx116, %op.rdx117 %op.rdx133 = or i1 %op.rdx118, %op.rdx119 %op.rdx134 = or i1 %op.rdx120, %op.rdx121 %op.rdx135 = or i1 %op.rdx122, %op.rdx123 %op.rdx136 = or i1 %op.rdx125, %op.rdx126 %op.rdx137 = or i1 %op.rdx127, %op.rdx128 %op.rdx138 = or i1 %op.rdx129, %op.rdx130 %op.rdx139 = or i1 %op.rdx131, %op.rdx132 %op.rdx140 = or i1 %op.rdx133, %op.rdx134 %op.rdx141 = or i1 %op.rdx135, %op.rdx124 %op.rdx142 = or i1 %op.rdx136, %op.rdx137 %op.rdx143 = or i1 %op.rdx138, %op.rdx139 %op.rdx144 = or i1 %op.rdx140, %op.rdx141 %op.rdx145 = or i1 %op.rdx142, %op.rdx143 %op.rdx146 = or i1 %op.rdx145, %op.rdx144 br i1 %op.rdx146, label %if.then13, label %if.end16 if.then13: ; preds = %entry, %for.cond1.1 br label %if.end16 if.end16: ; preds = %for.cond1.1, %if.then13 %str.sink = phi ptr [ @str.3, %if.then13 ], [ @str, %for.cond1.1 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %number) #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"}
/*3.4 hightierra*/ #include <stdio.h> int main(void){ //変数Nを定義、値を入力 int N; scanf("%d",&N); int i,j; //for文のカウンタ int judge = 0; //九九で表せるかの判定 /*二重ループで九九にあるかを判定*/ for(i=1; i<10; i++){ for(j=1; j<10; j++){ if(N == i*j){ judge = 1; //表せたらjudgeを1に break; //内側for文を抜ける } } if(judge){ break; //外側for文を抜ける } } // 判定 if(judge){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %if.then11, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp4.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond23 = icmp eq i32 %7, 1 %cmp4.5 = icmp eq i32 %0, 6 %exitcond24 = icmp eq i32 %2, 1 %cmp4.7 = icmp eq i32 %0, 8 %exitcond25 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond23.1 = icmp eq i32 %7, 2 %cmp4.5.1 = icmp eq i32 %0, 12 %exitcond24.1 = icmp eq i32 %2, 2 %cmp4.7.1 = icmp eq i32 %0, 16 %exitcond25.1 = icmp eq i32 %1, 2 %cmp4.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond23.2 = icmp eq i32 %7, 3 %cmp4.5.2 = icmp eq i32 %0, 18 %exitcond24.2 = icmp eq i32 %2, 3 %cmp4.7.2 = icmp eq i32 %0, 24 %exitcond25.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond23.3 = icmp eq i32 %7, 4 %exitcond24.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond24.4 = icmp eq i32 %2, 5 %cmp4.7.4 = icmp eq i32 %0, 40 %exitcond25.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp4.5.6 = icmp eq i32 %0, 42 %exitcond24.6 = icmp eq i32 %2, 7 %cmp4.7.6 = icmp eq i32 %0, 56 %exitcond25.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond24.7 = icmp eq i32 %2, 8 %cmp4.7.7 = icmp eq i32 %0, 64 %exitcond25.7 = icmp eq i32 %1, 8 %cmp4.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond23.8 = icmp eq i32 %7, 9 %cmp4.5.8 = icmp eq i32 %0, 54 %exitcond24.8 = icmp eq i32 %2, 9 %cmp4.7.8 = icmp eq i32 %0, 72 %exitcond25.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx98 = or i1 %op.rdx, %cmp4.3 %op.rdx99 = or i1 %exitcond, %exitcond23 %op.rdx100 = or i1 %cmp4.5, %exitcond24 %op.rdx101 = or i1 %cmp4.7, %exitcond25 %op.rdx102 = or i1 %exitcond.1, %exitcond23.1 %op.rdx103 = or i1 %cmp4.5.1, %exitcond24.1 %op.rdx104 = or i1 %cmp4.7.1, %exitcond25.1 %op.rdx105 = or i1 %cmp4.2, %exitcond.2 %op.rdx106 = or i1 %exitcond23.2, %cmp4.5.2 %op.rdx107 = or i1 %exitcond24.2, %cmp4.7.2 %op.rdx108 = or i1 %exitcond25.2, %exitcond.3 %op.rdx109 = or i1 %exitcond23.3, %exitcond24.3 %op.rdx110 = or i1 %exitcond24.4, %cmp4.7.4 %op.rdx111 = or i1 %exitcond25.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx112 = icmp eq i32 %22, 6 %op.rdx113 = or i1 %cmp4.5.6, %exitcond24.6 %op.rdx114 = or i1 %cmp4.7.6, %exitcond25.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx115 = extractelement <2 x i1> %23, i64 0 %op.rdx116 = or i1 %exitcond24.7, %cmp4.7.7 %op.rdx117 = or i1 %exitcond25.7, %cmp4.8 %op.rdx118 = or i1 %exitcond.8, %exitcond23.8 %op.rdx119 = or i1 %cmp4.5.8, %exitcond24.8 %op.rdx120 = or i1 %cmp4.7.8, %exitcond25.8 %op.rdx121 = or i1 %op.rdx98, %op.rdx99 %op.rdx122 = or i1 %op.rdx100, %op.rdx101 %op.rdx123 = or i1 %op.rdx102, %op.rdx103 %op.rdx124 = or i1 %op.rdx104, %op.rdx105 %op.rdx125 = or i1 %op.rdx106, %op.rdx107 %op.rdx126 = or i1 %op.rdx108, %op.rdx109 %op.rdx127 = or i1 %op.rdx110, %op.rdx111 %op.rdx128 = or i1 %op.rdx112, %op.rdx113 %op.rdx129 = or i1 %op.rdx114, %op.rdx115 %op.rdx130 = or i1 %op.rdx116, %op.rdx117 %op.rdx131 = or i1 %op.rdx118, %op.rdx119 %op.rdx132 = or i1 %op.rdx121, %op.rdx122 %op.rdx133 = or i1 %op.rdx123, %op.rdx124 %op.rdx134 = or i1 %op.rdx125, %op.rdx126 %op.rdx135 = or i1 %op.rdx127, %op.rdx128 %op.rdx136 = or i1 %op.rdx129, %op.rdx130 %op.rdx137 = or i1 %op.rdx131, %op.rdx120 %op.rdx138 = or i1 %op.rdx132, %op.rdx133 %op.rdx139 = or i1 %op.rdx134, %op.rdx135 %op.rdx140 = or i1 %op.rdx136, %op.rdx137 %op.rdx141 = or i1 %op.rdx138, %op.rdx139 %op.rdx142 = or i1 %op.rdx141, %op.rdx140 br i1 %op.rdx142, label %if.then11, label %if.end14 if.then11: ; preds = %entry, %for.cond1.1 br label %if.end14 if.end14: ; preds = %for.cond1.1, %if.then11 %str.sink = phi ptr [ @str.3, %if.then11 ], [ @str, %for.cond1.1 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int n,a,b,i; scanf("%d",&n); for(i=1;i<=9;i++){ a = n % i; b = n / i; if((a == 0) &&(b <= 9)){ printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %cmp2 = icmp slt i32 %0, 10 br i1 %cmp2, label %if.then, label %for.cond for.cond: ; preds = %entry %1 = and i32 %0, 1 %cmp1.1 = icmp eq i32 %1, 0 %cmp2.1 = icmp ult i32 %0, 20 %or.cond.1 = and i1 %cmp1.1, %cmp2.1 br i1 %or.cond.1, label %if.then, label %for.cond.1 for.cond.1: ; preds = %for.cond %rem.213 = urem i32 %0, 3 %cmp1.2 = icmp eq i32 %rem.213, 0 %cmp2.2 = icmp ult i32 %0, 30 %or.cond.2 = and i1 %cmp1.2, %cmp2.2 br i1 %or.cond.2, label %if.then, label %for.cond.2 for.cond.2: ; preds = %for.cond.1 %2 = and i32 %0, 3 %cmp1.3 = icmp eq i32 %2, 0 %cmp2.3 = icmp ult i32 %0, 40 %or.cond.3 = and i1 %cmp1.3, %cmp2.3 br i1 %or.cond.3, label %if.then, label %for.cond.3 for.cond.3: ; preds = %for.cond.2 %rem.414 = urem i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.414, 0 %cmp2.4 = icmp ult i32 %0, 50 %or.cond.4 = and i1 %cmp1.4, %cmp2.4 br i1 %or.cond.4, label %if.then, label %for.cond.4 for.cond.4: ; preds = %for.cond.3 %rem.515 = urem i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.515, 0 %cmp2.5 = icmp ult i32 %0, 60 %or.cond.5 = and i1 %cmp1.5, %cmp2.5 br i1 %or.cond.5, label %if.then, label %for.cond.5 for.cond.5: ; preds = %for.cond.4 %rem.616 = urem i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.616, 0 %cmp2.6 = icmp ult i32 %0, 70 %or.cond.6 = and i1 %cmp1.6, %cmp2.6 br i1 %or.cond.6, label %if.then, label %for.cond.6 for.cond.6: ; preds = %for.cond.5 %3 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %3, 0 %cmp2.7 = icmp ult i32 %0, 80 %or.cond.7 = and i1 %cmp1.7, %cmp2.7 br i1 %or.cond.7, label %if.then, label %for.cond.7 for.cond.7: ; preds = %for.cond.6 %rem.817 = urem i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.817, 0 %cmp2.8 = icmp ult i32 %0, 90 %or.cond.8 = and i1 %cmp1.8, %cmp2.8 br i1 %or.cond.8, label %if.then, label %cleanup if.then: ; preds = %for.cond.7, %for.cond.6, %for.cond.5, %for.cond.4, %for.cond.3, %for.cond.2, %for.cond.1, %for.cond, %entry br label %cleanup cleanup: ; preds = %for.cond.7, %if.then %str.sink = phi ptr [ @str.3, %if.then ], [ @str, %for.cond.7 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int a,i,c=0; scanf("%d",&a); for(i=1;i<10;i++){ if((a%i==0)&&((a/i)<10))c=1; } c==1?printf("Yes"):printf("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136241/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { for.inc: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp2 = icmp slt i32 %0, 10 %rem.2 = srem i32 %0, 3 %1 = and i32 %0, 3 %rem.4 = srem i32 %0, 5 %rem.5 = srem i32 %0, 6 %rem.6 = srem i32 %0, 7 %2 = insertelement <2 x i32> poison, i32 %0, i64 0 %3 = shufflevector <2 x i32> %2, <2 x i32> poison, <2 x i32> zeroinitializer %4 = and <2 x i32> %3, <i32 1, i32 7> %rem.8 = srem i32 %0, 9 %5 = shufflevector <2 x i32> %4, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %6 = insertelement <8 x i32> %5, i32 %rem.8, i64 2 %7 = insertelement <8 x i32> %6, i32 %rem.6, i64 3 %8 = insertelement <8 x i32> %7, i32 %rem.5, i64 4 %9 = insertelement <8 x i32> %8, i32 %rem.4, i64 5 %10 = insertelement <8 x i32> %9, i32 %1, i64 6 %11 = insertelement <8 x i32> %10, i32 %rem.2, i64 7 %12 = icmp eq <8 x i32> %11, zeroinitializer %13 = insertelement <8 x i32> poison, i32 %0, i64 0 %14 = shufflevector <8 x i32> %13, <8 x i32> poison, <8 x i32> zeroinitializer %15 = icmp slt <8 x i32> %14, <i32 20, i32 80, i32 90, i32 70, i32 60, i32 50, i32 40, i32 30> %16 = and <8 x i1> %12, %15 %17 = freeze <8 x i1> %16 %18 = bitcast <8 x i1> %17 to i8 %19 = icmp ne i8 %18, 0 %op.rdx = select i1 %19, i1 true, i1 %cmp2 %.str.2.sink = select i1 %op.rdx, ptr @.str.1, ptr @.str.2 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int N,i,j; scanf("%d", &N); for(i=1;i<=9;i++){ for(j=1;j<=9;j++){ if(N==i*j){ puts("Yes"); return 0; } } } puts("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136285/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136285/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %if.then, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp4.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond18 = icmp eq i32 %7, 1 %cmp4.5 = icmp eq i32 %0, 6 %exitcond19 = icmp eq i32 %2, 1 %cmp4.7 = icmp eq i32 %0, 8 %exitcond20 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond18.1 = icmp eq i32 %7, 2 %cmp4.5.1 = icmp eq i32 %0, 12 %exitcond19.1 = icmp eq i32 %2, 2 %cmp4.7.1 = icmp eq i32 %0, 16 %exitcond20.1 = icmp eq i32 %1, 2 %cmp4.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond18.2 = icmp eq i32 %7, 3 %cmp4.5.2 = icmp eq i32 %0, 18 %exitcond19.2 = icmp eq i32 %2, 3 %cmp4.7.2 = icmp eq i32 %0, 24 %exitcond20.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond18.3 = icmp eq i32 %7, 4 %exitcond19.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond19.4 = icmp eq i32 %2, 5 %cmp4.7.4 = icmp eq i32 %0, 40 %exitcond20.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp4.5.6 = icmp eq i32 %0, 42 %exitcond19.6 = icmp eq i32 %2, 7 %cmp4.7.6 = icmp eq i32 %0, 56 %exitcond20.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond19.7 = icmp eq i32 %2, 8 %cmp4.7.7 = icmp eq i32 %0, 64 %exitcond20.7 = icmp eq i32 %1, 8 %cmp4.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond18.8 = icmp eq i32 %7, 9 %cmp4.5.8 = icmp eq i32 %0, 54 %exitcond19.8 = icmp eq i32 %2, 9 %cmp4.7.8 = icmp eq i32 %0, 72 %exitcond20.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx93 = or i1 %op.rdx, %cmp4.3 %op.rdx94 = or i1 %exitcond, %exitcond18 %op.rdx95 = or i1 %cmp4.5, %exitcond19 %op.rdx96 = or i1 %cmp4.7, %exitcond20 %op.rdx97 = or i1 %exitcond.1, %exitcond18.1 %op.rdx98 = or i1 %cmp4.5.1, %exitcond19.1 %op.rdx99 = or i1 %cmp4.7.1, %exitcond20.1 %op.rdx100 = or i1 %cmp4.2, %exitcond.2 %op.rdx101 = or i1 %exitcond18.2, %cmp4.5.2 %op.rdx102 = or i1 %exitcond19.2, %cmp4.7.2 %op.rdx103 = or i1 %exitcond20.2, %exitcond.3 %op.rdx104 = or i1 %exitcond18.3, %exitcond19.3 %op.rdx105 = or i1 %exitcond19.4, %cmp4.7.4 %op.rdx106 = or i1 %exitcond20.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx107 = icmp eq i32 %22, 6 %op.rdx108 = or i1 %cmp4.5.6, %exitcond19.6 %op.rdx109 = or i1 %cmp4.7.6, %exitcond20.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx110 = extractelement <2 x i1> %23, i64 0 %op.rdx111 = or i1 %exitcond19.7, %cmp4.7.7 %op.rdx112 = or i1 %exitcond20.7, %cmp4.8 %op.rdx113 = or i1 %exitcond.8, %exitcond18.8 %op.rdx114 = or i1 %cmp4.5.8, %exitcond19.8 %op.rdx115 = or i1 %cmp4.7.8, %exitcond20.8 %op.rdx116 = or i1 %op.rdx93, %op.rdx94 %op.rdx117 = or i1 %op.rdx95, %op.rdx96 %op.rdx118 = or i1 %op.rdx97, %op.rdx98 %op.rdx119 = or i1 %op.rdx99, %op.rdx100 %op.rdx120 = or i1 %op.rdx101, %op.rdx102 %op.rdx121 = or i1 %op.rdx103, %op.rdx104 %op.rdx122 = or i1 %op.rdx105, %op.rdx106 %op.rdx123 = or i1 %op.rdx107, %op.rdx108 %op.rdx124 = or i1 %op.rdx109, %op.rdx110 %op.rdx125 = or i1 %op.rdx111, %op.rdx112 %op.rdx126 = or i1 %op.rdx113, %op.rdx114 %op.rdx127 = or i1 %op.rdx116, %op.rdx117 %op.rdx128 = or i1 %op.rdx118, %op.rdx119 %op.rdx129 = or i1 %op.rdx120, %op.rdx121 %op.rdx130 = or i1 %op.rdx122, %op.rdx123 %op.rdx131 = or i1 %op.rdx124, %op.rdx125 %op.rdx132 = or i1 %op.rdx126, %op.rdx115 %op.rdx133 = or i1 %op.rdx127, %op.rdx128 %op.rdx134 = or i1 %op.rdx129, %op.rdx130 %op.rdx135 = or i1 %op.rdx131, %op.rdx132 %op.rdx136 = or i1 %op.rdx133, %op.rdx134 %op.rdx137 = or i1 %op.rdx136, %op.rdx135 br i1 %op.rdx137, label %if.then, label %cleanup if.then: ; preds = %entry, %for.cond1.1 br label %cleanup cleanup: ; preds = %for.cond1.1, %if.then %.str.2.sink = phi ptr [ @.str.1, %if.then ], [ @.str.2, %for.cond1.1 ] %call9 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a = 0; int flag = 0; int i,j = 0; scanf("%d",&a); for(i = 1 ; i < 10;i++){ for(j = 1;j < 10;j++){ if(i*j == a){ flag = 1; printf("Yes\n"); break; }else{ flag = 0; } } if(flag == 1) break; } if(flag == 0){ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136328/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136328/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 store i32 0, ptr %a, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %for.end11, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp4.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond24 = icmp eq i32 %7, 1 %cmp4.5 = icmp eq i32 %0, 6 %exitcond25 = icmp eq i32 %2, 1 %cmp4.7 = icmp eq i32 %0, 8 %exitcond26 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond24.1 = icmp eq i32 %7, 2 %cmp4.5.1 = icmp eq i32 %0, 12 %exitcond25.1 = icmp eq i32 %2, 2 %cmp4.7.1 = icmp eq i32 %0, 16 %exitcond26.1 = icmp eq i32 %1, 2 %cmp4.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond24.2 = icmp eq i32 %7, 3 %cmp4.5.2 = icmp eq i32 %0, 18 %exitcond25.2 = icmp eq i32 %2, 3 %cmp4.7.2 = icmp eq i32 %0, 24 %exitcond26.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond24.3 = icmp eq i32 %7, 4 %exitcond25.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond25.4 = icmp eq i32 %2, 5 %cmp4.7.4 = icmp eq i32 %0, 40 %exitcond26.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp4.5.6 = icmp eq i32 %0, 42 %exitcond25.6 = icmp eq i32 %2, 7 %cmp4.7.6 = icmp eq i32 %0, 56 %exitcond26.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond25.7 = icmp eq i32 %2, 8 %cmp4.7.7 = icmp eq i32 %0, 64 %exitcond26.7 = icmp eq i32 %1, 8 %cmp4.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond24.8 = icmp eq i32 %7, 9 %cmp4.5.8 = icmp eq i32 %0, 54 %exitcond25.8 = icmp eq i32 %2, 9 %cmp4.7.8 = icmp eq i32 %0, 72 %exitcond26.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx99 = or i1 %op.rdx, %cmp4.3 %op.rdx100 = or i1 %exitcond, %exitcond24 %op.rdx101 = or i1 %cmp4.5, %exitcond25 %op.rdx102 = or i1 %cmp4.7, %exitcond26 %op.rdx103 = or i1 %exitcond.1, %exitcond24.1 %op.rdx104 = or i1 %cmp4.5.1, %exitcond25.1 %op.rdx105 = or i1 %cmp4.7.1, %exitcond26.1 %op.rdx106 = or i1 %cmp4.2, %exitcond.2 %op.rdx107 = or i1 %exitcond24.2, %cmp4.5.2 %op.rdx108 = or i1 %exitcond25.2, %cmp4.7.2 %op.rdx109 = or i1 %exitcond26.2, %exitcond.3 %op.rdx110 = or i1 %exitcond24.3, %exitcond25.3 %op.rdx111 = or i1 %exitcond25.4, %cmp4.7.4 %op.rdx112 = or i1 %exitcond26.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx113 = icmp eq i32 %22, 6 %op.rdx114 = or i1 %cmp4.5.6, %exitcond25.6 %op.rdx115 = or i1 %cmp4.7.6, %exitcond26.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx116 = extractelement <2 x i1> %23, i64 0 %op.rdx117 = or i1 %exitcond25.7, %cmp4.7.7 %op.rdx118 = or i1 %exitcond26.7, %cmp4.8 %op.rdx119 = or i1 %exitcond.8, %exitcond24.8 %op.rdx120 = or i1 %cmp4.5.8, %exitcond25.8 %op.rdx121 = or i1 %cmp4.7.8, %exitcond26.8 %op.rdx122 = or i1 %op.rdx99, %op.rdx100 %op.rdx123 = or i1 %op.rdx101, %op.rdx102 %op.rdx124 = or i1 %op.rdx103, %op.rdx104 %op.rdx125 = or i1 %op.rdx105, %op.rdx106 %op.rdx126 = or i1 %op.rdx107, %op.rdx108 %op.rdx127 = or i1 %op.rdx109, %op.rdx110 %op.rdx128 = or i1 %op.rdx111, %op.rdx112 %op.rdx129 = or i1 %op.rdx113, %op.rdx114 %op.rdx130 = or i1 %op.rdx115, %op.rdx116 %op.rdx131 = or i1 %op.rdx117, %op.rdx118 %op.rdx132 = or i1 %op.rdx119, %op.rdx120 %op.rdx133 = or i1 %op.rdx122, %op.rdx123 %op.rdx134 = or i1 %op.rdx124, %op.rdx125 %op.rdx135 = or i1 %op.rdx126, %op.rdx127 %op.rdx136 = or i1 %op.rdx128, %op.rdx129 %op.rdx137 = or i1 %op.rdx130, %op.rdx131 %op.rdx138 = or i1 %op.rdx132, %op.rdx121 %op.rdx139 = or i1 %op.rdx133, %op.rdx134 %op.rdx140 = or i1 %op.rdx135, %op.rdx136 %op.rdx141 = or i1 %op.rdx137, %op.rdx138 %op.rdx142 = or i1 %op.rdx139, %op.rdx140 %op.rdx143 = or i1 %op.rdx142, %op.rdx141 br i1 %op.rdx143, label %for.end11, label %if.end15 for.end11: ; preds = %entry, %for.cond1.1 br label %if.end15 if.end15: ; preds = %for.cond1.1, %for.end11 %str.sink = phi ptr [ @str, %for.end11 ], [ @str.3, %for.cond1.1 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int a, b, n; scanf("%d", &n); for (a = 1; a <= 9; a++) { for (b = 1; b <= 9; b++) { if (a*b == n) { puts("Yes"); return 0; } } } puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136371/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136371/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %if.then, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp4.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond18 = icmp eq i32 %7, 1 %cmp4.5 = icmp eq i32 %0, 6 %exitcond19 = icmp eq i32 %2, 1 %cmp4.7 = icmp eq i32 %0, 8 %exitcond20 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond18.1 = icmp eq i32 %7, 2 %cmp4.5.1 = icmp eq i32 %0, 12 %exitcond19.1 = icmp eq i32 %2, 2 %cmp4.7.1 = icmp eq i32 %0, 16 %exitcond20.1 = icmp eq i32 %1, 2 %cmp4.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond18.2 = icmp eq i32 %7, 3 %cmp4.5.2 = icmp eq i32 %0, 18 %exitcond19.2 = icmp eq i32 %2, 3 %cmp4.7.2 = icmp eq i32 %0, 24 %exitcond20.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond18.3 = icmp eq i32 %7, 4 %exitcond19.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond19.4 = icmp eq i32 %2, 5 %cmp4.7.4 = icmp eq i32 %0, 40 %exitcond20.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp4.5.6 = icmp eq i32 %0, 42 %exitcond19.6 = icmp eq i32 %2, 7 %cmp4.7.6 = icmp eq i32 %0, 56 %exitcond20.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond19.7 = icmp eq i32 %2, 8 %cmp4.7.7 = icmp eq i32 %0, 64 %exitcond20.7 = icmp eq i32 %1, 8 %cmp4.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond18.8 = icmp eq i32 %7, 9 %cmp4.5.8 = icmp eq i32 %0, 54 %exitcond19.8 = icmp eq i32 %2, 9 %cmp4.7.8 = icmp eq i32 %0, 72 %exitcond20.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx93 = or i1 %op.rdx, %cmp4.3 %op.rdx94 = or i1 %exitcond, %exitcond18 %op.rdx95 = or i1 %cmp4.5, %exitcond19 %op.rdx96 = or i1 %cmp4.7, %exitcond20 %op.rdx97 = or i1 %exitcond.1, %exitcond18.1 %op.rdx98 = or i1 %cmp4.5.1, %exitcond19.1 %op.rdx99 = or i1 %cmp4.7.1, %exitcond20.1 %op.rdx100 = or i1 %cmp4.2, %exitcond.2 %op.rdx101 = or i1 %exitcond18.2, %cmp4.5.2 %op.rdx102 = or i1 %exitcond19.2, %cmp4.7.2 %op.rdx103 = or i1 %exitcond20.2, %exitcond.3 %op.rdx104 = or i1 %exitcond18.3, %exitcond19.3 %op.rdx105 = or i1 %exitcond19.4, %cmp4.7.4 %op.rdx106 = or i1 %exitcond20.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx107 = icmp eq i32 %22, 6 %op.rdx108 = or i1 %cmp4.5.6, %exitcond19.6 %op.rdx109 = or i1 %cmp4.7.6, %exitcond20.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx110 = extractelement <2 x i1> %23, i64 0 %op.rdx111 = or i1 %exitcond19.7, %cmp4.7.7 %op.rdx112 = or i1 %exitcond20.7, %cmp4.8 %op.rdx113 = or i1 %exitcond.8, %exitcond18.8 %op.rdx114 = or i1 %cmp4.5.8, %exitcond19.8 %op.rdx115 = or i1 %cmp4.7.8, %exitcond20.8 %op.rdx116 = or i1 %op.rdx93, %op.rdx94 %op.rdx117 = or i1 %op.rdx95, %op.rdx96 %op.rdx118 = or i1 %op.rdx97, %op.rdx98 %op.rdx119 = or i1 %op.rdx99, %op.rdx100 %op.rdx120 = or i1 %op.rdx101, %op.rdx102 %op.rdx121 = or i1 %op.rdx103, %op.rdx104 %op.rdx122 = or i1 %op.rdx105, %op.rdx106 %op.rdx123 = or i1 %op.rdx107, %op.rdx108 %op.rdx124 = or i1 %op.rdx109, %op.rdx110 %op.rdx125 = or i1 %op.rdx111, %op.rdx112 %op.rdx126 = or i1 %op.rdx113, %op.rdx114 %op.rdx127 = or i1 %op.rdx116, %op.rdx117 %op.rdx128 = or i1 %op.rdx118, %op.rdx119 %op.rdx129 = or i1 %op.rdx120, %op.rdx121 %op.rdx130 = or i1 %op.rdx122, %op.rdx123 %op.rdx131 = or i1 %op.rdx124, %op.rdx125 %op.rdx132 = or i1 %op.rdx126, %op.rdx115 %op.rdx133 = or i1 %op.rdx127, %op.rdx128 %op.rdx134 = or i1 %op.rdx129, %op.rdx130 %op.rdx135 = or i1 %op.rdx131, %op.rdx132 %op.rdx136 = or i1 %op.rdx133, %op.rdx134 %op.rdx137 = or i1 %op.rdx136, %op.rdx135 br i1 %op.rdx137, label %if.then, label %cleanup if.then: ; preds = %entry, %for.cond1.1 br label %cleanup cleanup: ; preds = %for.cond1.1, %if.then %.str.2.sink = phi ptr [ @.str.1, %if.then ], [ @.str.2, %for.cond1.1 ] %call9 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int N; int flag=0; scanf("%d",&N); for(int i=1;i<=9;i++) { if(N%i==0 && 1<=N/i && N/i<=9) { flag=1; } } if(flag==1) { printf("Yes"); } else printf("No"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { for.inc: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = add i32 %0, -1 %or.cond = icmp ult i32 %1, 9 %spec.select = zext i1 %or.cond to i32 %2 = and i32 %0, 1 %cmp1.1 = icmp eq i32 %2, 0 br i1 %cmp1.1, label %land.lhs.true.1, label %for.inc.1 land.lhs.true.1: ; preds = %for.inc %div.1 = sdiv i32 %0, 2 %3 = add nsw i32 %div.1, -1 %or.cond.1 = icmp ult i32 %3, 9 %spec.select.1 = select i1 %or.cond.1, i32 1, i32 %spec.select br label %for.inc.1 for.inc.1: ; preds = %land.lhs.true.1, %for.inc %flag.1.1 = phi i32 [ %spec.select, %for.inc ], [ %spec.select.1, %land.lhs.true.1 ] %rem.2 = srem i32 %0, 3 %div.2 = sdiv i32 %0, 3 %cmp1.2 = icmp eq i32 %rem.2, 0 %4 = add nsw i32 %div.2, -1 %or.cond.2 = icmp ult i32 %4, 9 %spec.select.2 = select i1 %or.cond.2, i32 1, i32 %flag.1.1 %flag.1.2 = select i1 %cmp1.2, i32 %spec.select.2, i32 %flag.1.1 %5 = and i32 %0, 3 %cmp1.3 = icmp eq i32 %5, 0 br i1 %cmp1.3, label %land.lhs.true.3, label %for.inc.3 land.lhs.true.3: ; preds = %for.inc.1 %div.3 = sdiv i32 %0, 4 %6 = add nsw i32 %div.3, -1 %or.cond.3 = icmp ult i32 %6, 9 %spec.select.3 = select i1 %or.cond.3, i32 1, i32 %flag.1.2 br label %for.inc.3 for.inc.3: ; preds = %land.lhs.true.3, %for.inc.1 %flag.1.3 = phi i32 [ %flag.1.2, %for.inc.1 ], [ %spec.select.3, %land.lhs.true.3 ] %rem.4 = srem i32 %0, 5 %div.4 = sdiv i32 %0, 5 %cmp1.4 = icmp eq i32 %rem.4, 0 %7 = add nsw i32 %div.4, -1 %or.cond.4 = icmp ult i32 %7, 9 %spec.select.4 = select i1 %or.cond.4, i32 1, i32 %flag.1.3 %flag.1.4 = select i1 %cmp1.4, i32 %spec.select.4, i32 %flag.1.3 %rem.5 = srem i32 %0, 6 %div.5 = sdiv i32 %0, 6 %cmp1.5 = icmp eq i32 %rem.5, 0 %8 = add nsw i32 %div.5, -1 %or.cond.5 = icmp ult i32 %8, 9 %spec.select.5 = select i1 %or.cond.5, i32 1, i32 %flag.1.4 %flag.1.5 = select i1 %cmp1.5, i32 %spec.select.5, i32 %flag.1.4 %rem.6 = srem i32 %0, 7 %div.6 = sdiv i32 %0, 7 %cmp1.6 = icmp eq i32 %rem.6, 0 %9 = add nsw i32 %div.6, -1 %or.cond.6 = icmp ult i32 %9, 9 %spec.select.6 = select i1 %or.cond.6, i32 1, i32 %flag.1.5 %flag.1.6 = select i1 %cmp1.6, i32 %spec.select.6, i32 %flag.1.5 %10 = and i32 %0, 7 %cmp1.7 = icmp eq i32 %10, 0 br i1 %cmp1.7, label %land.lhs.true.7, label %for.inc.7 land.lhs.true.7: ; preds = %for.inc.3 %div.7 = sdiv i32 %0, 8 %11 = add nsw i32 %div.7, -1 %or.cond.7 = icmp ult i32 %11, 9 %spec.select.7 = select i1 %or.cond.7, i32 1, i32 %flag.1.6 br label %for.inc.7 for.inc.7: ; preds = %land.lhs.true.7, %for.inc.3 %flag.1.7 = phi i32 [ %flag.1.6, %for.inc.3 ], [ %spec.select.7, %land.lhs.true.7 ] %rem.8 = srem i32 %0, 9 %div.8 = sdiv i32 %0, 9 %cmp1.8 = icmp eq i32 %rem.8, 0 br i1 %cmp1.8, label %land.lhs.true.8, label %for.inc.8 land.lhs.true.8: ; preds = %for.inc.7 %12 = add nsw i32 %div.8, -1 %or.cond.8 = icmp ult i32 %12, 9 %cmp6 = icmp eq i32 %flag.1.7, 1 %or.cond19 = select i1 %or.cond.8, i1 true, i1 %cmp6 br i1 %or.cond19, label %if.end10, label %if.else for.inc.8: ; preds = %for.inc.7 %cmp6.old = icmp eq i32 %flag.1.7, 1 br i1 %cmp6.old, label %if.end10, label %if.else if.else: ; preds = %land.lhs.true.8, %for.inc.8 br label %if.end10 if.end10: ; preds = %for.inc.8, %land.lhs.true.8, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true.8 ], [ @.str.1, %for.inc.8 ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int num; int count=0; int check=0; scanf("%d",&num); for(int i = 1; i <= 9; i++){ if(check==1)break; for(int j = 1; j <= 9; j++){ if(i*j==num) { printf("Yes\n"); check = 1; break; }else{ count++; } } } if(count==81) printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136458/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136458/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 switch i32 %0, label %if.then16 [ i32 1, label %cleanup.thread i32 2, label %cleanup.thread i32 3, label %cleanup.thread i32 4, label %cleanup.thread i32 5, label %cleanup.thread i32 6, label %cleanup.thread i32 7, label %cleanup.thread i32 8, label %cleanup.thread i32 9, label %cleanup.thread i32 10, label %cleanup.thread i32 12, label %cleanup.thread i32 14, label %cleanup.thread i32 16, label %cleanup.thread i32 18, label %cleanup.thread i32 15, label %cleanup.thread i32 21, label %cleanup.thread i32 24, label %cleanup.thread i32 27, label %cleanup.thread i32 20, label %cleanup.thread i32 28, label %cleanup.thread i32 32, label %cleanup.thread i32 36, label %cleanup.thread i32 25, label %cleanup.thread i32 30, label %cleanup.thread i32 35, label %cleanup.thread i32 40, label %cleanup.thread i32 45, label %cleanup.thread i32 42, label %cleanup.thread i32 48, label %cleanup.thread i32 54, label %cleanup.thread i32 49, label %cleanup.thread i32 56, label %cleanup.thread i32 63, label %cleanup.thread i32 64, label %cleanup.thread i32 72, label %cleanup.thread i32 81, label %cleanup.thread ] cleanup.thread: ; preds = %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry, %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end18 if.then16: ; preds = %entry %puts27 = call i32 @puts(ptr nonnull dereferenceable(1) @str.3) br label %if.end18 if.end18: ; preds = %cleanup.thread, %if.then16 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"}
#include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int main() { int input; int i,j; scanf("%d",&input); if(input<10){ printf("Yes\n"); } else if(input>81){ printf("No\n"); } else if(1){ j = 0; for(i=2;i<=9;i++){ if( (input%i)==0 && (input/i)<10 ){ j = 1; break; } else{ j = 2; } } } if(j==1){ printf("Yes\n"); } if(j==2){ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136500/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136500/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.4 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.5 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %input = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %input) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input) %0 = load i32, ptr %input, align 4, !tbaa !5 %cmp = icmp slt i32 %0, 10 br i1 %cmp, label %if.then18.sink.split, label %if.else if.else: ; preds = %entry %cmp2 = icmp ugt i32 %0, 81 br i1 %cmp2, label %if.then18.sink.split, label %for.body.preheader for.body.preheader: ; preds = %if.else %1 = and i32 %0, 1 %cmp7 = icmp eq i32 %1, 0 %cmp8 = icmp ult i32 %0, 20 %or.cond = and i1 %cmp7, %cmp8 br i1 %or.cond, label %if.end20, label %if.else10 if.else10: ; preds = %for.body.preheader %rem.133.lhs.trunc = trunc i32 %0 to i8 %rem.13334 = urem i8 %rem.133.lhs.trunc, 3 %cmp7.1 = icmp eq i8 %rem.13334, 0 %cmp8.1 = icmp ult i32 %0, 30 %or.cond43 = and i1 %cmp7.1, %cmp8.1 br i1 %or.cond43, label %if.end20, label %if.else10.1 if.else10.1: ; preds = %if.else10 %2 = and i32 %0, 3 %cmp7.2 = icmp eq i32 %2, 0 %cmp8.2 = icmp ult i32 %0, 40 %or.cond44 = and i1 %cmp7.2, %cmp8.2 br i1 %or.cond44, label %if.end20, label %if.else10.2 if.else10.2: ; preds = %if.else10.1 %rem.335.lhs.trunc = trunc i32 %0 to i8 %rem.33536 = urem i8 %rem.335.lhs.trunc, 5 %cmp7.3 = icmp eq i8 %rem.33536, 0 %cmp8.3 = icmp ult i32 %0, 50 %or.cond45 = and i1 %cmp7.3, %cmp8.3 br i1 %or.cond45, label %if.end20, label %if.else10.3 if.else10.3: ; preds = %if.else10.2 %rem.437.lhs.trunc = trunc i32 %0 to i8 %rem.43738 = urem i8 %rem.437.lhs.trunc, 6 %cmp7.4 = icmp eq i8 %rem.43738, 0 %cmp8.4 = icmp ult i32 %0, 60 %or.cond46 = and i1 %cmp7.4, %cmp8.4 br i1 %or.cond46, label %if.end20, label %if.else10.4 if.else10.4: ; preds = %if.else10.3 %rem.539.lhs.trunc = trunc i32 %0 to i8 %rem.53940 = urem i8 %rem.539.lhs.trunc, 7 %cmp7.5 = icmp eq i8 %rem.53940, 0 %cmp8.5 = icmp ult i32 %0, 70 %or.cond47 = and i1 %cmp7.5, %cmp8.5 br i1 %or.cond47, label %if.end20, label %if.else10.5 if.else10.5: ; preds = %if.else10.4 %3 = and i32 %0, 7 %cmp7.6 = icmp eq i32 %3, 0 %cmp8.6 = icmp ult i32 %0, 80 %or.cond48 = and i1 %cmp7.6, %cmp8.6 %rem.741.lhs.trunc = trunc i32 %0 to i8 %rem.74142 = urem i8 %rem.741.lhs.trunc, 9 %cmp7.7 = icmp eq i8 %rem.74142, 0 %or.cond49 = or i1 %or.cond48, %cmp7.7 br i1 %or.cond49, label %if.end20, label %if.then18 if.then18.sink.split: ; preds = %if.else, %entry %str.sink = phi ptr [ @str.4, %entry ], [ @str.5, %if.else ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) br label %if.then18 if.then18: ; preds = %if.else10.5, %if.then18.sink.split br label %if.end20 if.end20: ; preds = %for.body.preheader, %if.else10, %if.else10.1, %if.else10.2, %if.else10.3, %if.else10.4, %if.else10.5, %if.then18 %str.4.sink = phi ptr [ @str.5, %if.then18 ], [ @str.4, %if.else10.5 ], [ @str.4, %if.else10.4 ], [ @str.4, %if.else10.3 ], [ @str.4, %if.else10.2 ], [ @str.4, %if.else10.1 ], [ @str.4, %if.else10 ], [ @str.4, %for.body.preheader ] %puts26 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %input) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int N; int flag; int i,j; flag=0; scanf("%d",&N); for(i=1; i<10; i++){ for(j=1; j<10; j++){ if(i*j == N) flag=1; }if(flag==1) break; } if(flag==1) printf("Yes\n"); else printf("No\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136551/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136551/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @reltable.main = private unnamed_addr constant [79 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str.3 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @str 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 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 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.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 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 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 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 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.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 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.3 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.3 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.3 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.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 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 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 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 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 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.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 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 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 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 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 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 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.3 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 %1 = add i32 %0, -1 %narrow44 = icmp ult i32 %1, 9 br i1 %narrow44, label %if.end15, label %switch.early.test switch.early.test: ; preds = %entry %switch.tableidx = add i32 %0, -3 %2 = icmp ult i32 %switch.tableidx, 79 br i1 %2, label %switch.lookup, label %if.end15 switch.lookup: ; preds = %switch.early.test %3 = sext i32 %switch.tableidx to i64 %reltable.shift = shl i64 %3, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) br label %if.end15 if.end15: ; preds = %entry, %switch.lookup, %switch.early.test %str.sink = phi ptr [ @str, %switch.early.test ], [ %reltable.intrinsic, %switch.lookup ], [ @str.3, %entry ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.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"}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #define max(a, b) (((a) > (b)) ? (a) : (b)) /* 2個の値の最大値 */ #define min(a, b) (((a) < (b)) ? (a) : (b)) /* 2個の値の最小値 */ #define ENTER printf("\n") /* 改行プリント */ int DBG = 1; /* デバッグプリント 提出時は0 */ /* main *************************************************************/ int main() { int a,b,c,i,j,k,n,m,x,y; char str[256]; double ans; scanf("%d", &n); for(i=1;i<=9;i++) { for(j=1;j<=9;j++) { if (n == (i*j)) { printf("Yes\n"); return 0; } } } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136595/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136595/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @DBG = dso_local local_unnamed_addr global i32 1, align 4 @.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 %.off = add i32 %0, -1 %switch = icmp ult i32 %.off, 2 br i1 %switch, label %if.then, label %for.cond1.1 for.cond1.1: ; preds = %entry %1 = mul i32 %0, 954437177 %2 = mul i32 %0, -1227133513 %3 = insertelement <2 x i32> poison, i32 %0, i64 0 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <2 x i32> zeroinitializer %5 = mul <2 x i32> %4, <i32 -1431655765, i32 -858993459> %6 = extractelement <2 x i32> %5, i64 0 %exitcond = icmp eq i32 %6, 1 %cmp4.3 = icmp eq i32 %0, 4 %7 = extractelement <2 x i32> %5, i64 1 %exitcond28 = icmp eq i32 %7, 1 %cmp4.5 = icmp eq i32 %0, 6 %exitcond29 = icmp eq i32 %2, 1 %cmp4.7 = icmp eq i32 %0, 8 %exitcond30 = icmp eq i32 %1, 1 %exitcond.1 = icmp eq i32 %6, 2 %exitcond28.1 = icmp eq i32 %7, 2 %cmp4.5.1 = icmp eq i32 %0, 12 %exitcond29.1 = icmp eq i32 %2, 2 %cmp4.7.1 = icmp eq i32 %0, 16 %exitcond30.1 = icmp eq i32 %1, 2 %cmp4.2 = icmp eq i32 %0, 3 %exitcond.2 = icmp eq i32 %6, 3 %exitcond28.2 = icmp eq i32 %7, 3 %cmp4.5.2 = icmp eq i32 %0, 18 %exitcond29.2 = icmp eq i32 %2, 3 %cmp4.7.2 = icmp eq i32 %0, 24 %exitcond30.2 = icmp eq i32 %1, 3 %exitcond.3 = icmp eq i32 %6, 4 %exitcond28.3 = icmp eq i32 %7, 4 %exitcond29.3 = icmp eq i32 %2, 4 %8 = insertelement <8 x i32> poison, i32 %0, i64 0 %9 = insertelement <8 x i32> %8, i32 %1, i64 1 %10 = shufflevector <2 x i32> %5, <2 x i32> poison, <8 x i32> <i32 0, i32 1, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison> %11 = shufflevector <8 x i32> %9, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 poison, i32 poison, i32 poison, i32 poison> %12 = shufflevector <8 x i32> %11, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 0, i32 2, i32 0, i32 3, i32 0> %13 = icmp eq <8 x i32> %12, <i32 32, i32 4, i32 5, i32 10, i32 5, i32 20, i32 5, i32 30> %exitcond29.4 = icmp eq i32 %2, 5 %cmp4.7.4 = icmp eq i32 %0, 40 %exitcond30.4 = icmp eq i32 %1, 5 %exitcond.5 = icmp eq i32 %6, 6 %14 = insertelement <8 x i32> %8, i32 %2, i64 1 %15 = insertelement <8 x i32> %14, i32 %1, i64 2 %16 = shufflevector <8 x i32> %15, <8 x i32> %10, <8 x i32> <i32 0, i32 1, i32 2, i32 8, i32 poison, i32 poison, i32 poison, i32 poison> %17 = shufflevector <8 x i32> %16, <8 x i32> poison, <8 x i32> <i32 0, i32 1, i32 0, i32 2, i32 0, i32 0, i32 3, i32 0> %18 = icmp eq <8 x i32> %17, <i32 36, i32 6, i32 48, i32 6, i32 7, i32 14, i32 7, i32 28> %cmp4.5.6 = icmp eq i32 %0, 42 %exitcond29.6 = icmp eq i32 %2, 7 %cmp4.7.6 = icmp eq i32 %0, 56 %exitcond30.6 = icmp eq i32 %1, 7 %19 = icmp eq <2 x i32> %5, <i32 8, i32 8> %exitcond29.7 = icmp eq i32 %2, 8 %cmp4.7.7 = icmp eq i32 %0, 64 %exitcond30.7 = icmp eq i32 %1, 8 %cmp4.8 = icmp eq i32 %0, 9 %exitcond.8 = icmp eq i32 %6, 9 %exitcond28.8 = icmp eq i32 %7, 9 %cmp4.5.8 = icmp eq i32 %0, 54 %exitcond29.8 = icmp eq i32 %2, 9 %cmp4.7.8 = icmp eq i32 %0, 72 %exitcond30.8 = icmp eq i32 %1, 9 %20 = or <8 x i1> %13, %18 %21 = bitcast <8 x i1> %20 to i8 %op.rdx = icmp ne i8 %21, 0 %op.rdx103 = or i1 %op.rdx, %cmp4.3 %op.rdx104 = or i1 %exitcond, %exitcond28 %op.rdx105 = or i1 %cmp4.5, %exitcond29 %op.rdx106 = or i1 %cmp4.7, %exitcond30 %op.rdx107 = or i1 %exitcond.1, %exitcond28.1 %op.rdx108 = or i1 %cmp4.5.1, %exitcond29.1 %op.rdx109 = or i1 %cmp4.7.1, %exitcond30.1 %op.rdx110 = or i1 %cmp4.2, %exitcond.2 %op.rdx111 = or i1 %exitcond28.2, %cmp4.5.2 %op.rdx112 = or i1 %exitcond29.2, %cmp4.7.2 %op.rdx113 = or i1 %exitcond30.2, %exitcond.3 %op.rdx114 = or i1 %exitcond28.3, %exitcond29.3 %op.rdx115 = or i1 %exitcond29.4, %cmp4.7.4 %op.rdx116 = or i1 %exitcond30.4, %exitcond.5 %22 = and i32 %7, -2 %op.rdx117 = icmp eq i32 %22, 6 %op.rdx118 = or i1 %cmp4.5.6, %exitcond29.6 %op.rdx119 = or i1 %cmp4.7.6, %exitcond30.6 %shift = shufflevector <2 x i1> %19, <2 x i1> poison, <2 x i32> <i32 1, i32 poison> %23 = or <2 x i1> %19, %shift %op.rdx120 = extractelement <2 x i1> %23, i64 0 %op.rdx121 = or i1 %exitcond29.7, %cmp4.7.7 %op.rdx122 = or i1 %exitcond30.7, %cmp4.8 %op.rdx123 = or i1 %exitcond.8, %exitcond28.8 %op.rdx124 = or i1 %cmp4.5.8, %exitcond29.8 %op.rdx125 = or i1 %cmp4.7.8, %exitcond30.8 %op.rdx126 = or i1 %op.rdx103, %op.rdx104 %op.rdx127 = or i1 %op.rdx105, %op.rdx106 %op.rdx128 = or i1 %op.rdx107, %op.rdx108 %op.rdx129 = or i1 %op.rdx109, %op.rdx110 %op.rdx130 = or i1 %op.rdx111, %op.rdx112 %op.rdx131 = or i1 %op.rdx113, %op.rdx114 %op.rdx132 = or i1 %op.rdx115, %op.rdx116 %op.rdx133 = or i1 %op.rdx117, %op.rdx118 %op.rdx134 = or i1 %op.rdx119, %op.rdx120 %op.rdx135 = or i1 %op.rdx121, %op.rdx122 %op.rdx136 = or i1 %op.rdx123, %op.rdx124 %op.rdx137 = or i1 %op.rdx126, %op.rdx127 %op.rdx138 = or i1 %op.rdx128, %op.rdx129 %op.rdx139 = or i1 %op.rdx130, %op.rdx131 %op.rdx140 = or i1 %op.rdx132, %op.rdx133 %op.rdx141 = or i1 %op.rdx134, %op.rdx135 %op.rdx142 = or i1 %op.rdx136, %op.rdx125 %op.rdx143 = or i1 %op.rdx137, %op.rdx138 %op.rdx144 = or i1 %op.rdx139, %op.rdx140 %op.rdx145 = or i1 %op.rdx141, %op.rdx142 %op.rdx146 = or i1 %op.rdx143, %op.rdx144 %op.rdx147 = or i1 %op.rdx146, %op.rdx145 br i1 %op.rdx147, label %if.then, label %cleanup if.then: ; preds = %entry, %for.cond1.1 br label %cleanup cleanup: ; preds = %for.cond1.1, %if.then %str.sink = phi ptr [ @str.3, %if.then ], [ @str, %for.cond1.1 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int W[15], L[15], r; int i, j, n, max; char t[15]; while (1){ scanf("%d", &n); if (n == 0){ break; } for (i = 0; i < n; i++){ scanf(" %c", &t[i]); W[i] = 0; L[i] = 0; for (j = 0; j < n - 1; j++){ scanf ("%d", &r); if (r == 0){ W[i]++; } else if (r == 1){ L[i]++; } } } for (i = 0; i < n; i++){ max = 0; for (j = 0; j < n; j++){ if (W[max] < W[j]){ max = j; } else if (W[max] == W[j]){ if (L[max] > L[j]){ max = j; } } } printf("%c\n", t[max]); W[max] = -1; } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136696/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136696/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %c\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %W = alloca [15 x i32], align 16 %L = alloca [15 x i32], align 16 %r = alloca i32, align 4 %n = alloca i32, align 4 %t = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %W) #3 call void @llvm.lifetime.start.p0(i64 60, ptr nonnull %L) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %t) #3 %call97 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp98 = icmp eq i32 %0, 0 br i1 %cmp98, label %while.end, label %for.cond.preheader while.cond.loopexit: ; preds = %for.end56, %for.cond.preheader, %for.cond26.preheader %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp eq i32 %1, 0 br i1 %cmp, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %while.cond.loopexit %2 = phi i32 [ %1, %while.cond.loopexit ], [ %0, %entry ] %cmp190 = icmp sgt i32 %2, 0 br i1 %cmp190, label %for.body, label %while.cond.loopexit for.cond26.preheader: ; preds = %for.inc23 %cmp2795 = icmp sgt i32 %10, 0 br i1 %cmp2795, label %for.cond29.preheader, label %while.cond.loopexit for.body: ; preds = %for.cond.preheader, %for.inc23 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc23 ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [15 x i8], ptr %t, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %arrayidx4 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %indvars.iv store i32 0, ptr %arrayidx4, align 4, !tbaa !5 %arrayidx6 = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %indvars.iv store i32 0, ptr %arrayidx6, align 4, !tbaa !5 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp888 = icmp sgt i32 %3, 1 br i1 %cmp888, label %for.body9, label %for.inc23 for.body9: ; preds = %for.body, %for.inc %4 = phi i32 [ %7, %for.inc ], [ 0, %for.body ] %5 = phi i32 [ %8, %for.inc ], [ 0, %for.body ] %j.089 = phi i32 [ %inc22, %for.inc ], [ 0, %for.body ] %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r) %6 = load i32, ptr %r, align 4, !tbaa !5 switch i32 %6, label %for.inc [ i32 0, label %if.then12 i32 1, label %if.then16 ] if.then12: ; preds = %for.body9 %inc = add nsw i32 %4, 1 store i32 %inc, ptr %arrayidx4, align 4, !tbaa !5 br label %for.inc if.then16: ; preds = %for.body9 %inc19 = add nsw i32 %5, 1 store i32 %inc19, ptr %arrayidx6, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body9, %if.then12, %if.then16 %7 = phi i32 [ %4, %for.body9 ], [ %inc, %if.then12 ], [ %4, %if.then16 ] %8 = phi i32 [ %5, %for.body9 ], [ %5, %if.then12 ], [ %inc19, %if.then16 ] %inc22 = add nuw nsw i32 %j.089, 1 %9 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %9, -1 %cmp8 = icmp slt i32 %inc22, %sub br i1 %cmp8, label %for.body9, label %for.inc23, !llvm.loop !9 for.inc23: ; preds = %for.inc, %for.body %10 = phi i32 [ %3, %for.body ], [ %9, %for.inc ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = sext i32 %10 to i64 %cmp1 = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp1, label %for.body, label %for.cond26.preheader, !llvm.loop !11 for.cond29.preheader: ; preds = %for.cond26.preheader, %for.end56 %12 = phi i32 [ %30, %for.end56 ], [ %10, %for.cond26.preheader ] %i.196 = phi i32 [ %inc63, %for.end56 ], [ 0, %for.cond26.preheader ] %cmp3092 = icmp sgt i32 %12, 0 br i1 %cmp3092, label %for.body31.preheader, label %for.end56 for.body31.preheader: ; preds = %for.cond29.preheader %wide.trip.count = zext i32 %12 to i64 %xtraiter = and i64 %wide.trip.count, 1 %13 = icmp eq i32 %12, 1 br i1 %13, label %for.end56.loopexit.unr-lcssa, label %for.body31.preheader.new for.body31.preheader.new: ; preds = %for.body31.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body31 for.body31: ; preds = %for.inc54.1, %for.body31.preheader.new %indvars.iv100 = phi i64 [ 0, %for.body31.preheader.new ], [ %indvars.iv.next101.1, %for.inc54.1 ] %max.094 = phi i32 [ 0, %for.body31.preheader.new ], [ %max.1.1, %for.inc54.1 ] %niter = phi i64 [ 0, %for.body31.preheader.new ], [ %niter.next.1, %for.inc54.1 ] %idxprom32 = sext i32 %max.094 to i64 %arrayidx33 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %idxprom32 %14 = load i32, ptr %arrayidx33, align 4, !tbaa !5 %arrayidx35 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %indvars.iv100 %15 = load i32, ptr %arrayidx35, align 8, !tbaa !5 %cmp36 = icmp slt i32 %14, %15 %16 = trunc i64 %indvars.iv100 to i32 br i1 %cmp36, label %for.inc54, label %if.else38 if.else38: ; preds = %for.body31 %cmp43 = icmp eq i32 %14, %15 br i1 %cmp43, label %if.then44, label %for.inc54 if.then44: ; preds = %if.else38 %arrayidx46 = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %idxprom32 %17 = load i32, ptr %arrayidx46, align 4, !tbaa !5 %arrayidx48 = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %indvars.iv100 %18 = load i32, ptr %arrayidx48, align 8, !tbaa !5 %cmp49 = icmp sgt i32 %17, %18 %spec.select = select i1 %cmp49, i32 %16, i32 %max.094 br label %for.inc54 for.inc54: ; preds = %if.then44, %for.body31, %if.else38 %max.1 = phi i32 [ %max.094, %if.else38 ], [ %16, %for.body31 ], [ %spec.select, %if.then44 ] %indvars.iv.next101 = or i64 %indvars.iv100, 1 %idxprom32.1 = sext i32 %max.1 to i64 %arrayidx33.1 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %idxprom32.1 %19 = load i32, ptr %arrayidx33.1, align 4, !tbaa !5 %arrayidx35.1 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %indvars.iv.next101 %20 = load i32, ptr %arrayidx35.1, align 4, !tbaa !5 %cmp36.1 = icmp slt i32 %19, %20 %21 = trunc i64 %indvars.iv.next101 to i32 br i1 %cmp36.1, label %for.inc54.1, label %if.else38.1 if.else38.1: ; preds = %for.inc54 %cmp43.1 = icmp eq i32 %19, %20 br i1 %cmp43.1, label %if.then44.1, label %for.inc54.1 if.then44.1: ; preds = %if.else38.1 %arrayidx46.1 = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %idxprom32.1 %22 = load i32, ptr %arrayidx46.1, align 4, !tbaa !5 %arrayidx48.1 = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %indvars.iv.next101 %23 = load i32, ptr %arrayidx48.1, align 4, !tbaa !5 %cmp49.1 = icmp sgt i32 %22, %23 %spec.select.1 = select i1 %cmp49.1, i32 %21, i32 %max.1 br label %for.inc54.1 for.inc54.1: ; preds = %if.then44.1, %if.else38.1, %for.inc54 %max.1.1 = phi i32 [ %max.1, %if.else38.1 ], [ %21, %for.inc54 ], [ %spec.select.1, %if.then44.1 ] %indvars.iv.next101.1 = add nuw nsw i64 %indvars.iv100, 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.end56.loopexit.unr-lcssa, label %for.body31, !llvm.loop !12 for.end56.loopexit.unr-lcssa: ; preds = %for.inc54.1, %for.body31.preheader %max.1.lcssa.ph = phi i32 [ undef, %for.body31.preheader ], [ %max.1.1, %for.inc54.1 ] %indvars.iv100.unr = phi i64 [ 0, %for.body31.preheader ], [ %indvars.iv.next101.1, %for.inc54.1 ] %max.094.unr = phi i32 [ 0, %for.body31.preheader ], [ %max.1.1, %for.inc54.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end56, label %for.body31.epil for.body31.epil: ; preds = %for.end56.loopexit.unr-lcssa %idxprom32.epil = sext i32 %max.094.unr to i64 %arrayidx33.epil = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %idxprom32.epil %24 = load i32, ptr %arrayidx33.epil, align 4, !tbaa !5 %arrayidx35.epil = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %indvars.iv100.unr %25 = load i32, ptr %arrayidx35.epil, align 4, !tbaa !5 %cmp36.epil = icmp slt i32 %24, %25 %26 = trunc i64 %indvars.iv100.unr to i32 br i1 %cmp36.epil, label %for.end56, label %if.else38.epil if.else38.epil: ; preds = %for.body31.epil %cmp43.epil = icmp eq i32 %24, %25 br i1 %cmp43.epil, label %if.then44.epil, label %for.end56 if.then44.epil: ; preds = %if.else38.epil %arrayidx46.epil = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %idxprom32.epil %27 = load i32, ptr %arrayidx46.epil, align 4, !tbaa !5 %arrayidx48.epil = getelementptr inbounds [15 x i32], ptr %L, i64 0, i64 %indvars.iv100.unr %28 = load i32, ptr %arrayidx48.epil, align 4, !tbaa !5 %cmp49.epil = icmp sgt i32 %27, %28 %spec.select.epil = select i1 %cmp49.epil, i32 %26, i32 %max.094.unr br label %for.end56 for.end56: ; preds = %for.end56.loopexit.unr-lcssa, %if.then44.epil, %if.else38.epil, %for.body31.epil, %for.cond29.preheader %max.0.lcssa = phi i32 [ 0, %for.cond29.preheader ], [ %max.1.lcssa.ph, %for.end56.loopexit.unr-lcssa ], [ %max.094.unr, %if.else38.epil ], [ %26, %for.body31.epil ], [ %spec.select.epil, %if.then44.epil ] %idxprom57 = sext i32 %max.0.lcssa to i64 %arrayidx58 = getelementptr inbounds [15 x i8], ptr %t, i64 0, i64 %idxprom57 %29 = load i8, ptr %arrayidx58, align 1, !tbaa !13 %conv = sext i8 %29 to i32 %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv) %arrayidx61 = getelementptr inbounds [15 x i32], ptr %W, i64 0, i64 %idxprom57 store i32 -1, ptr %arrayidx61, align 4, !tbaa !5 %inc63 = add nuw nsw i32 %i.196, 1 %30 = load i32, ptr %n, align 4, !tbaa !5 %cmp27 = icmp slt i32 %inc63, %30 br i1 %cmp27, label %for.cond29.preheader, label %while.cond.loopexit, !llvm.loop !14 while.end: ; preds = %while.cond.loopexit, %entry call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %t) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %L) #3 call void @llvm.lifetime.end.p0(i64 60, ptr nonnull %W) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = !{!7, !7, i64 0} !14 = distinct !{!14, !10}
#include <stdio.h> void merge_sort(long long x[], int n) { static long long y[51] = {}; if (n <= 1) return; merge_sort(&(x[0]), n/2); merge_sort(&(x[n/2]), (n+1)/2); int i, p, q; for (i = 0, p = 0, q = n/2; i < n; i++) { if (p >= n/2) y[i] = x[q++]; else if (q >= n) y[i] = x[p++]; else y[i] = (x[p] < x[q])? x[p++]: x[q++]; } for (i = 0; i < n; i++) x[i] = y[i]; } long long combination(int n, int k) { if (k > n / 2) k = n - k; if (k == 0) return 1; int i, j, flag[51] = {}; long long x; for (i = n, x = 1; i >= n - k + 1; i--) { x *= i; for (j = 2; j <= k; j++) { if (flag[j] == 0 && x % j == 0) { x /= j; flag[j] = 1; } } } return x; } int main() { int i, N, A, B; long long v[51]; scanf("%d %d %d", &N, &A, &B); for (i = 0; i < N; i++) scanf("%lld", &(v[i])); merge_sort(v, N); int j, k; long long sum = 0; for (i = N - 1; i >= N - A; i--) sum += v[i]; printf("%.10Lf\n", (long double)sum / A); for (i = N - A + 1; i <= N - 1 && v[i] == v[i-1]; i++); for (j = N - A - 1; j >= 0 && v[j] == v[j+1]; j--); sum = combination(i - j - 1, i - N + A); if (v[N-A] == v[N-1]) { for (k = (i - j - 1 < i - N + B)? i - j - 1: i - N + B; k > i - N + A; k--) sum += combination(i - j - 1, k); } printf("%lld\n", sum); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136746/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136746/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @merge_sort.y = internal unnamed_addr global [51 x i64] zeroinitializer, align 16 @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [8 x i8] c"%.10Lf\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @merge_sort(ptr noundef %x, i32 noundef %n) local_unnamed_addr #0 { entry: %cmp = icmp slt i32 %n, 2 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %div78 = lshr i32 %n, 1 tail call void @merge_sort(ptr noundef %x, i32 noundef %div78) %idxprom = zext i32 %div78 to i64 %arrayidx2 = getelementptr inbounds i64, ptr %x, i64 %idxprom %add = add nuw nsw i32 %n, 1 %div37980 = lshr i32 %add, 1 tail call void @merge_sort(ptr noundef %arrayidx2, i32 noundef %div37980) %wide.trip.count = zext i32 %n to i64 br label %for.body for.cond37.preheader: ; preds = %for.inc %cmp3884 = icmp sgt i32 %n, 0 br i1 %cmp3884, label %for.body39.preheader, label %return for.body39.preheader: ; preds = %for.cond37.preheader %0 = shl nuw nsw i64 %wide.trip.count, 3 tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 8 %x, ptr nonnull align 16 @merge_sort.y, i64 %0, i1 false), !tbaa !5 br label %return for.body: ; preds = %if.end, %for.inc %indvars.iv = phi i64 [ 0, %if.end ], [ %indvars.iv.next, %for.inc ] %q.083 = phi i32 [ %div78, %if.end ], [ %q.2, %for.inc ] %p.082 = phi i32 [ 0, %if.end ], [ %p.2, %for.inc ] %cmp7.not = icmp slt i32 %p.082, %div78 br i1 %cmp7.not, label %if.else, label %if.then8 if.then8: ; preds = %for.body %inc = add nsw i32 %q.083, 1 %idxprom9 = sext i32 %q.083 to i64 %arrayidx10 = getelementptr inbounds i64, ptr %x, i64 %idxprom9 %1 = load i64, ptr %arrayidx10, align 8, !tbaa !5 br label %for.inc if.else: ; preds = %for.body %cmp13.not = icmp slt i32 %q.083, %n br i1 %cmp13.not, label %if.else20, label %if.then14 if.then14: ; preds = %if.else %inc15 = add nsw i32 %p.082, 1 %idxprom16 = sext i32 %p.082 to i64 %arrayidx17 = getelementptr inbounds i64, ptr %x, i64 %idxprom16 %2 = load i64, ptr %arrayidx17, align 8, !tbaa !5 br label %for.inc if.else20: ; preds = %if.else %idxprom21 = sext i32 %p.082 to i64 %arrayidx22 = getelementptr inbounds i64, ptr %x, i64 %idxprom21 %3 = load i64, ptr %arrayidx22, align 8, !tbaa !5 %idxprom23 = sext i32 %q.083 to i64 %arrayidx24 = getelementptr inbounds i64, ptr %x, i64 %idxprom23 %4 = load i64, ptr %arrayidx24, align 8, !tbaa !5 %cmp25 = icmp slt i64 %3, %4 %inc26 = zext i1 %cmp25 to i32 %p.1 = add nsw i32 %p.082, %inc26 %not.cmp25 = xor i1 %cmp25, true %inc29 = zext i1 %not.cmp25 to i32 %q.1 = add nsw i32 %q.083, %inc29 %cond = tail call i64 @llvm.smin.i64(i64 %3, i64 %4) br label %for.inc for.inc: ; preds = %if.then8, %if.else20, %if.then14 %.sink = phi i64 [ %1, %if.then8 ], [ %cond, %if.else20 ], [ %2, %if.then14 ] %p.2 = phi i32 [ %p.082, %if.then8 ], [ %p.1, %if.else20 ], [ %inc15, %if.then14 ] %q.2 = phi i32 [ %inc, %if.then8 ], [ %q.1, %if.else20 ], [ %q.083, %if.then14 ] %arrayidx12 = getelementptr inbounds [51 x i64], ptr @merge_sort.y, i64 0, i64 %indvars.iv store i64 %.sink, ptr %arrayidx12, align 8, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond37.preheader, label %for.body, !llvm.loop !9 return: ; preds = %for.body39.preheader, %for.cond37.preheader, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @combination(i32 noundef %n, i32 noundef %k) local_unnamed_addr #2 { entry: %flag = alloca [51 x i32], align 16 %div = sdiv i32 %n, 2 %cmp = icmp slt i32 %div, %k %sub = sub nsw i32 %n, %k %spec.select = select i1 %cmp, i32 %sub, i32 %k %cmp1 = icmp eq i32 %spec.select, 0 br i1 %cmp1, label %return, label %if.end3 if.end3: ; preds = %entry call void @llvm.lifetime.start.p0(i64 204, ptr nonnull %flag) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(204) %flag, i8 0, i64 204, i1 false) %sub4 = sub nsw i32 %n, %spec.select %cmp5.not.not43 = icmp sgt i32 %spec.select, 0 br i1 %cmp5.not.not43, label %for.body.lr.ph, label %for.end22 for.body.lr.ph: ; preds = %if.end3 %cmp7.not40 = icmp eq i32 %spec.select, 1 br i1 %cmp7.not40, label %for.body.us.preheader, label %for.body.preheader for.body.preheader: ; preds = %for.body.lr.ph %0 = add nuw i32 %spec.select, 1 %1 = sext i32 %n to i64 %2 = sext i32 %sub4 to i64 %wide.trip.count = zext i32 %0 to i64 br label %for.body for.body.us.preheader: ; preds = %for.body.lr.ph %3 = sext i32 %n to i64 %4 = sext i32 %sub4 to i64 br label %for.body.us for.body.us: ; preds = %for.body.us.preheader, %for.body.us %indvars.iv52 = phi i64 [ %3, %for.body.us.preheader ], [ %indvars.iv.next53, %for.body.us ] %x.045.us = phi i64 [ 1, %for.body.us.preheader ], [ %mul.us, %for.body.us ] %mul.us = mul nsw i64 %x.045.us, %indvars.iv52 %indvars.iv.next53 = add nsw i64 %indvars.iv52, -1 %cmp5.not.not.us = icmp sgt i64 %indvars.iv.next53, %4 br i1 %cmp5.not.not.us, label %for.body.us, label %for.end22, !llvm.loop !11 for.body: ; preds = %for.body.preheader, %for.cond6.for.inc21_crit_edge %indvars.iv49 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next50, %for.cond6.for.inc21_crit_edge ] %x.045 = phi i64 [ 1, %for.body.preheader ], [ %x.2, %for.cond6.for.inc21_crit_edge ] %mul = mul nsw i64 %x.045, %indvars.iv49 br label %for.body9 for.body9: ; preds = %for.body, %for.inc %indvars.iv = phi i64 [ 2, %for.body ], [ %indvars.iv.next, %for.inc ] %x.142 = phi i64 [ %mul, %for.body ], [ %x.2, %for.inc ] %arrayidx = getelementptr inbounds [51 x i32], ptr %flag, i64 0, i64 %indvars.iv %5 = load i32, ptr %arrayidx, align 4, !tbaa !12 %cmp10 = icmp eq i32 %5, 0 br i1 %cmp10, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body9 %rem = srem i64 %x.142, %indvars.iv %div17 = sdiv i64 %x.142, %indvars.iv %cmp13 = icmp eq i64 %rem, 0 br i1 %cmp13, label %if.then15, label %for.inc if.then15: ; preds = %land.lhs.true store i32 1, ptr %arrayidx, align 4, !tbaa !12 br label %for.inc for.inc: ; preds = %for.body9, %land.lhs.true, %if.then15 %x.2 = phi i64 [ %div17, %if.then15 ], [ %x.142, %land.lhs.true ], [ %x.142, %for.body9 ] %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.cond6.for.inc21_crit_edge, label %for.body9, !llvm.loop !14 for.cond6.for.inc21_crit_edge: ; preds = %for.inc %indvars.iv.next50 = add nsw i64 %indvars.iv49, -1 %cmp5.not.not = icmp sgt i64 %indvars.iv.next50, %2 br i1 %cmp5.not.not, label %for.body, label %for.end22, !llvm.loop !11 for.end22: ; preds = %for.cond6.for.inc21_crit_edge, %for.body.us, %if.end3 %x.0.lcssa = phi i64 [ 1, %if.end3 ], [ %mul.us, %for.body.us ], [ %x.2, %for.cond6.for.inc21_crit_edge ] call void @llvm.lifetime.end.p0(i64 204, ptr nonnull %flag) #8 br label %return return: ; preds = %entry, %for.end22 %retval.0 = phi i64 [ %x.0.lcssa, %for.end22 ], [ 1, %entry ] ret i64 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %flag.i114 = alloca [51 x i32], align 16 %flag.i = alloca [51 x i32], align 16 %N = alloca i32, align 4 %A = alloca i32, align 4 %B = alloca i32, align 4 %v = alloca [51 x i64], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #8 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 408, ptr nonnull %v) #8 %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 !12 %cmp162 = icmp sgt i32 %0, 0 br i1 %cmp162, 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 [51 x i64], ptr %v, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %N, align 4, !tbaa !12 %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 !15 for.end: ; preds = %for.body, %entry %.lcssa161 = phi i32 [ %0, %entry ], [ %1, %for.body ] call void @merge_sort(ptr noundef nonnull %v, i32 noundef %.lcssa161) %3 = load i32, ptr %A, align 4, !tbaa !12 %cmp4.not.not164 = icmp sgt i32 %3, 0 br i1 %cmp4.not.not164, label %for.body5.preheader, label %for.end9 for.body5.preheader: ; preds = %for.end %4 = load i32, ptr %N, align 4, !tbaa !12 %sub3 = sub nsw i32 %4, %3 %5 = sext i32 %4 to i64 %6 = sext i32 %sub3 to i64 %7 = add nsw i64 %5, -1 %smin = call i64 @llvm.smin.i64(i64 %6, i64 %7) %8 = sub i64 %5, %smin %min.iters.check = icmp ult i64 %8, 4 br i1 %min.iters.check, label %for.body5.preheader200, label %vector.ph vector.ph: ; preds = %for.body5.preheader %n.vec = and i64 %8, -4 %ind.end = sub i64 %5, %n.vec br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %vec.phi194 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %15, %vector.body ] %9 = xor i64 %index, -1 %10 = add i64 %9, %5 %11 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %10 %12 = getelementptr inbounds i64, ptr %11, i64 -1 %wide.load = load <2 x i64>, ptr %12, align 8, !tbaa !5 %reverse = shufflevector <2 x i64> %wide.load, <2 x i64> poison, <2 x i32> <i32 1, i32 0> %13 = getelementptr inbounds i64, ptr %11, i64 -3 %wide.load195 = load <2 x i64>, ptr %13, align 8, !tbaa !5 %reverse196 = shufflevector <2 x i64> %wide.load195, <2 x i64> poison, <2 x i32> <i32 1, i32 0> %14 = add <2 x i64> %reverse, %vec.phi %15 = add <2 x i64> %reverse196, %vec.phi194 %index.next = add nuw i64 %index, 4 %16 = icmp eq i64 %index.next, %n.vec br i1 %16, label %middle.block, label %vector.body, !llvm.loop !16 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i64> %15, %14 %17 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %8, %n.vec br i1 %cmp.n, label %for.end9.loopexit, label %for.body5.preheader200 for.body5.preheader200: ; preds = %for.body5.preheader, %middle.block %indvars.iv180.ph = phi i64 [ %5, %for.body5.preheader ], [ %ind.end, %middle.block ] %sum.0166.ph = phi i64 [ 0, %for.body5.preheader ], [ %17, %middle.block ] br label %for.body5 for.body5: ; preds = %for.body5.preheader200, %for.body5 %indvars.iv180 = phi i64 [ %indvars.iv.next181, %for.body5 ], [ %indvars.iv180.ph, %for.body5.preheader200 ] %sum.0166 = phi i64 [ %add, %for.body5 ], [ %sum.0166.ph, %for.body5.preheader200 ] %indvars.iv.next181 = add nsw i64 %indvars.iv180, -1 %arrayidx7 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %indvars.iv.next181 %18 = load i64, ptr %arrayidx7, align 8, !tbaa !5 %add = add nsw i64 %18, %sum.0166 %cmp4.not.not = icmp sgt i64 %indvars.iv.next181, %6 br i1 %cmp4.not.not, label %for.body5, label %for.end9.loopexit, !llvm.loop !19 for.end9.loopexit: ; preds = %for.body5, %middle.block %add.lcssa = phi i64 [ %17, %middle.block ], [ %add, %for.body5 ] %19 = sitofp i64 %add.lcssa to x86_fp80 br label %for.end9 for.end9: ; preds = %for.end9.loopexit, %for.end %sum.0.lcssa = phi x86_fp80 [ 0xK00000000000000000000, %for.end ], [ %19, %for.end9.loopexit ] %conv10 = sitofp i32 %3 to x86_fp80 %div = fdiv x86_fp80 %sum.0.lcssa, %conv10 %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, x86_fp80 noundef %div) %20 = load i32, ptr %N, align 4, !tbaa !12 %21 = load i32, ptr %A, align 4, !tbaa !12 %sub12 = sub i32 %20, %21 %sub15 = add nsw i32 %20, -1 %22 = sext i32 %sub12 to i64 %23 = sext i32 %sub15 to i64 %smax = call i32 @llvm.smax.i32(i32 %sub12, i32 %sub15) %24 = add i32 %smax, 1 br label %for.cond14 for.cond14: ; preds = %land.rhs, %for.end9 %indvars.iv183 = phi i64 [ %indvars.iv.next184, %land.rhs ], [ %22, %for.end9 ] %cmp16.not.not = icmp slt i64 %indvars.iv183, %23 br i1 %cmp16.not.not, label %land.rhs, label %for.end28 land.rhs: ; preds = %for.cond14 %indvars.iv.next184 = add nsw i64 %indvars.iv183, 1 %arrayidx19 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %indvars.iv.next184 %25 = load i64, ptr %arrayidx19, align 8, !tbaa !5 %arrayidx22 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %indvars.iv183 %26 = load i64, ptr %arrayidx22, align 8, !tbaa !5 %cmp23 = icmp eq i64 %25, %26 br i1 %cmp23, label %for.cond14, label %for.end28.split.loop.exit188, !llvm.loop !20 for.end28.split.loop.exit188: ; preds = %land.rhs %27 = trunc i64 %indvars.iv183 to i32 %28 = trunc i64 %indvars.iv.next184 to i32 br label %for.end28 for.end28: ; preds = %for.cond14, %for.end28.split.loop.exit188 %i.2.in.lcssa = phi i32 [ %27, %for.end28.split.loop.exit188 ], [ %smax, %for.cond14 ] %i.2.lcssa = phi i32 [ %28, %for.end28.split.loop.exit188 ], [ %24, %for.cond14 ] %29 = xor i32 %21, -1 %sub30 = add i32 %20, %29 %cmp32169 = icmp sgt i32 %sub30, -1 br i1 %cmp32169, label %land.rhs34, label %for.end46 land.rhs34: ; preds = %for.end28, %for.inc44 %j.0170 = phi i32 [ %dec45, %for.inc44 ], [ %sub30, %for.end28 ] %idxprom35 = zext i32 %j.0170 to i64 %arrayidx36 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %idxprom35 %30 = load i64, ptr %arrayidx36, align 8, !tbaa !5 %add37 = add nuw nsw i32 %j.0170, 1 %idxprom38 = zext i32 %add37 to i64 %arrayidx39 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %idxprom38 %31 = load i64, ptr %arrayidx39, align 8, !tbaa !5 %cmp40 = icmp eq i64 %30, %31 br i1 %cmp40, label %for.inc44, label %for.end46 for.inc44: ; preds = %land.rhs34 %dec45 = add nsw i32 %j.0170, -1 %cmp32 = icmp sgt i32 %j.0170, 0 br i1 %cmp32, label %land.rhs34, label %for.end46, !llvm.loop !21 for.end46: ; preds = %land.rhs34, %for.inc44, %for.end28 %j.0.lcssa = phi i32 [ %sub30, %for.end28 ], [ -1, %for.inc44 ], [ %j.0170, %land.rhs34 ] %sub48 = sub i32 %i.2.in.lcssa, %j.0.lcssa %sub49 = sub nsw i32 %i.2.lcssa, %20 %add50 = add nsw i32 %sub49, %21 %div.i = sdiv i32 %sub48, 2 %cmp.i = icmp slt i32 %div.i, %add50 %sub.i = sub nsw i32 %sub48, %add50 %spec.select.i = select i1 %cmp.i, i32 %sub.i, i32 %add50 %cmp1.i = icmp eq i32 %spec.select.i, 0 br i1 %cmp1.i, label %combination.exit, label %if.end3.i if.end3.i: ; preds = %for.end46 call void @llvm.lifetime.start.p0(i64 204, ptr nonnull %flag.i) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(204) %flag.i, i8 0, i64 204, i1 false) %sub4.i = sub nsw i32 %sub48, %spec.select.i %cmp5.not.not43.i = icmp sgt i32 %spec.select.i, 0 br i1 %cmp5.not.not43.i, label %for.body.lr.ph.i, label %for.end22.i for.body.lr.ph.i: ; preds = %if.end3.i %cmp7.not40.i = icmp eq i32 %spec.select.i, 1 br i1 %cmp7.not40.i, label %for.body.us.preheader.i, label %for.body.preheader.i for.body.preheader.i: ; preds = %for.body.lr.ph.i %32 = add nuw i32 %spec.select.i, 1 %33 = sext i32 %sub48 to i64 %34 = sext i32 %sub4.i to i64 %wide.trip.count.i = zext i32 %32 to i64 br label %for.body.i for.body.us.preheader.i: ; preds = %for.body.lr.ph.i %35 = sext i32 %sub48 to i64 %36 = sext i32 %sub4.i to i64 br label %for.body.us.i for.body.us.i: ; preds = %for.body.us.i, %for.body.us.preheader.i %indvars.iv52.i = phi i64 [ %35, %for.body.us.preheader.i ], [ %indvars.iv.next53.i, %for.body.us.i ] %x.045.us.i = phi i64 [ 1, %for.body.us.preheader.i ], [ %mul.us.i, %for.body.us.i ] %mul.us.i = mul nsw i64 %x.045.us.i, %indvars.iv52.i %indvars.iv.next53.i = add nsw i64 %indvars.iv52.i, -1 %cmp5.not.not.us.i = icmp sgt i64 %indvars.iv.next53.i, %36 br i1 %cmp5.not.not.us.i, label %for.body.us.i, label %for.end22.i, !llvm.loop !11 for.body.i: ; preds = %for.cond6.for.inc21_crit_edge.i, %for.body.preheader.i %indvars.iv49.i = phi i64 [ %33, %for.body.preheader.i ], [ %indvars.iv.next50.i, %for.cond6.for.inc21_crit_edge.i ] %x.045.i = phi i64 [ 1, %for.body.preheader.i ], [ %x.2.i, %for.cond6.for.inc21_crit_edge.i ] %mul.i = mul nsw i64 %x.045.i, %indvars.iv49.i br label %for.body9.i for.body9.i: ; preds = %for.inc.i, %for.body.i %indvars.iv.i = phi i64 [ 2, %for.body.i ], [ %indvars.iv.next.i, %for.inc.i ] %x.142.i = phi i64 [ %mul.i, %for.body.i ], [ %x.2.i, %for.inc.i ] %arrayidx.i = getelementptr inbounds [51 x i32], ptr %flag.i, i64 0, i64 %indvars.iv.i %37 = load i32, ptr %arrayidx.i, align 4, !tbaa !12 %cmp10.i = icmp eq i32 %37, 0 br i1 %cmp10.i, label %land.lhs.true.i, label %for.inc.i land.lhs.true.i: ; preds = %for.body9.i %rem.i = srem i64 %x.142.i, %indvars.iv.i %div17.i = sdiv i64 %x.142.i, %indvars.iv.i %cmp13.i = icmp eq i64 %rem.i, 0 br i1 %cmp13.i, label %if.then15.i, label %for.inc.i if.then15.i: ; preds = %land.lhs.true.i store i32 1, ptr %arrayidx.i, align 4, !tbaa !12 br label %for.inc.i for.inc.i: ; preds = %if.then15.i, %land.lhs.true.i, %for.body9.i %x.2.i = phi i64 [ %div17.i, %if.then15.i ], [ %x.142.i, %land.lhs.true.i ], [ %x.142.i, %for.body9.i ] %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %for.cond6.for.inc21_crit_edge.i, label %for.body9.i, !llvm.loop !14 for.cond6.for.inc21_crit_edge.i: ; preds = %for.inc.i %indvars.iv.next50.i = add nsw i64 %indvars.iv49.i, -1 %cmp5.not.not.i = icmp sgt i64 %indvars.iv.next50.i, %34 br i1 %cmp5.not.not.i, label %for.body.i, label %for.end22.i, !llvm.loop !11 for.end22.i: ; preds = %for.cond6.for.inc21_crit_edge.i, %for.body.us.i, %if.end3.i %x.0.lcssa.i = phi i64 [ 1, %if.end3.i ], [ %mul.us.i, %for.body.us.i ], [ %x.2.i, %for.cond6.for.inc21_crit_edge.i ] call void @llvm.lifetime.end.p0(i64 204, ptr nonnull %flag.i) #8 br label %combination.exit combination.exit: ; preds = %for.end46, %for.end22.i %retval.0.i = phi i64 [ %x.0.lcssa.i, %for.end22.i ], [ 1, %for.end46 ] %arrayidx54 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %22 %38 = load i64, ptr %arrayidx54, align 8, !tbaa !5 %arrayidx57 = getelementptr inbounds [51 x i64], ptr %v, i64 0, i64 %23 %39 = load i64, ptr %arrayidx57, align 8, !tbaa !5 %cmp58 = icmp eq i64 %38, %39 br i1 %cmp58, label %if.then, label %if.end if.then: ; preds = %combination.exit %40 = load i32, ptr %B, align 4, !tbaa !12 %add63 = add nsw i32 %40, %sub49 %sub48.add63 = call i32 @llvm.smin.i32(i32 %sub48, i32 %add63) %cmp73173 = icmp sgt i32 %sub48.add63, %add50 br i1 %cmp73173, label %for.body75.lr.ph, label %if.end for.body75.lr.ph: ; preds = %if.then %41 = sext i32 %sub48 to i64 br label %for.body75 for.body75: ; preds = %for.body75.lr.ph, %combination.exit158 %sum.1175 = phi i64 [ %retval.0.i, %for.body75.lr.ph ], [ %add79, %combination.exit158 ] %k.0174 = phi i32 [ %sub48.add63, %for.body75.lr.ph ], [ %dec81, %combination.exit158 ] %cmp.i116 = icmp slt i32 %div.i, %k.0174 %sub.i117 = sub nsw i32 %sub48, %k.0174 %spec.select.i118 = select i1 %cmp.i116, i32 %sub.i117, i32 %k.0174 %cmp1.i119 = icmp eq i32 %spec.select.i118, 0 br i1 %cmp1.i119, label %combination.exit158, label %if.end3.i120 if.end3.i120: ; preds = %for.body75 call void @llvm.lifetime.start.p0(i64 204, ptr nonnull %flag.i114) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(204) %flag.i114, i8 0, i64 204, i1 false) %sub4.i121 = sub nsw i32 %sub48, %spec.select.i118 %cmp5.not.not43.i122 = icmp sgt i32 %spec.select.i118, 0 br i1 %cmp5.not.not43.i122, label %for.body.lr.ph.i126, label %for.end22.i123 for.body.lr.ph.i126: ; preds = %if.end3.i120 %cmp7.not40.i127 = icmp eq i32 %spec.select.i118, 1 br i1 %cmp7.not40.i127, label %for.body.us.preheader.i151, label %for.body.preheader.i128 for.body.preheader.i128: ; preds = %for.body.lr.ph.i126 %42 = add nuw i32 %spec.select.i118, 1 %43 = sext i32 %sub4.i121 to i64 %wide.trip.count.i129 = zext i32 %42 to i64 br label %for.body.i130 for.body.us.preheader.i151: ; preds = %for.body.lr.ph.i126 %44 = sext i32 %sub4.i121 to i64 br label %for.body.us.i152 for.body.us.i152: ; preds = %for.body.us.i152, %for.body.us.preheader.i151 %indvars.iv52.i153 = phi i64 [ %41, %for.body.us.preheader.i151 ], [ %indvars.iv.next53.i156, %for.body.us.i152 ] %x.045.us.i154 = phi i64 [ 1, %for.body.us.preheader.i151 ], [ %mul.us.i155, %for.body.us.i152 ] %mul.us.i155 = mul nsw i64 %x.045.us.i154, %indvars.iv52.i153 %indvars.iv.next53.i156 = add nsw i64 %indvars.iv52.i153, -1 %cmp5.not.not.us.i157 = icmp sgt i64 %indvars.iv.next53.i156, %44 br i1 %cmp5.not.not.us.i157, label %for.body.us.i152, label %for.end22.i123, !llvm.loop !11 for.body.i130: ; preds = %for.cond6.for.inc21_crit_edge.i143, %for.body.preheader.i128 %indvars.iv49.i131 = phi i64 [ %41, %for.body.preheader.i128 ], [ %indvars.iv.next50.i144, %for.cond6.for.inc21_crit_edge.i143 ] %x.045.i132 = phi i64 [ 1, %for.body.preheader.i128 ], [ %x.2.i140, %for.cond6.for.inc21_crit_edge.i143 ] %mul.i133 = mul nsw i64 %x.045.i132, %indvars.iv49.i131 br label %for.body9.i134 for.body9.i134: ; preds = %for.inc.i139, %for.body.i130 %indvars.iv.i135 = phi i64 [ 2, %for.body.i130 ], [ %indvars.iv.next.i141, %for.inc.i139 ] %x.142.i136 = phi i64 [ %mul.i133, %for.body.i130 ], [ %x.2.i140, %for.inc.i139 ] %arrayidx.i137 = getelementptr inbounds [51 x i32], ptr %flag.i114, i64 0, i64 %indvars.iv.i135 %45 = load i32, ptr %arrayidx.i137, align 4, !tbaa !12 %cmp10.i138 = icmp eq i32 %45, 0 br i1 %cmp10.i138, label %land.lhs.true.i146, label %for.inc.i139 land.lhs.true.i146: ; preds = %for.body9.i134 %rem.i147 = srem i64 %x.142.i136, %indvars.iv.i135 %div17.i150 = sdiv i64 %x.142.i136, %indvars.iv.i135 %cmp13.i148 = icmp eq i64 %rem.i147, 0 br i1 %cmp13.i148, label %if.then15.i149, label %for.inc.i139 if.then15.i149: ; preds = %land.lhs.true.i146 store i32 1, ptr %arrayidx.i137, align 4, !tbaa !12 br label %for.inc.i139 for.inc.i139: ; preds = %if.then15.i149, %land.lhs.true.i146, %for.body9.i134 %x.2.i140 = phi i64 [ %div17.i150, %if.then15.i149 ], [ %x.142.i136, %land.lhs.true.i146 ], [ %x.142.i136, %for.body9.i134 ] %indvars.iv.next.i141 = add nuw nsw i64 %indvars.iv.i135, 1 %exitcond.not.i142 = icmp eq i64 %indvars.iv.next.i141, %wide.trip.count.i129 br i1 %exitcond.not.i142, label %for.cond6.for.inc21_crit_edge.i143, label %for.body9.i134, !llvm.loop !14 for.cond6.for.inc21_crit_edge.i143: ; preds = %for.inc.i139 %indvars.iv.next50.i144 = add nsw i64 %indvars.iv49.i131, -1 %cmp5.not.not.i145 = icmp sgt i64 %indvars.iv.next50.i144, %43 br i1 %cmp5.not.not.i145, label %for.body.i130, label %for.end22.i123, !llvm.loop !11 for.end22.i123: ; preds = %for.cond6.for.inc21_crit_edge.i143, %for.body.us.i152, %if.end3.i120 %x.0.lcssa.i124 = phi i64 [ 1, %if.end3.i120 ], [ %mul.us.i155, %for.body.us.i152 ], [ %x.2.i140, %for.cond6.for.inc21_crit_edge.i143 ] call void @llvm.lifetime.end.p0(i64 204, ptr nonnull %flag.i114) #8 br label %combination.exit158 combination.exit158: ; preds = %for.body75, %for.end22.i123 %retval.0.i125 = phi i64 [ %x.0.lcssa.i124, %for.end22.i123 ], [ 1, %for.body75 ] %add79 = add nsw i64 %retval.0.i125, %sum.1175 %dec81 = add nsw i32 %k.0174, -1 %cmp73 = icmp sgt i32 %dec81, %add50 br i1 %cmp73, label %for.body75, label %if.end, !llvm.loop !22 if.end: ; preds = %combination.exit158, %if.then, %combination.exit %sum.2 = phi i64 [ %retval.0.i, %combination.exit ], [ %retval.0.i, %if.then ], [ %add79, %combination.exit158 ] %call83 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %sum.2) %46 = load ptr, ptr @stdout, align 8, !tbaa !23 %call84 = call i32 @fflush(ptr noundef %46) call void @llvm.lifetime.end.p0(i64 408, ptr nonnull %v) #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 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7 ; 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 i32 @llvm.smax.i32(i32, i32) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #6 attributes #0 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree 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 nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } 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 = !{!"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 = !{!13, !13, i64 0} !13 = !{!"int", !7, i64 0} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10, !17, !18} !17 = !{!"llvm.loop.isvectorized", i32 1} !18 = !{!"llvm.loop.unroll.runtime.disable"} !19 = distinct !{!19, !10, !18, !17} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10} !22 = distinct !{!22, !10} !23 = !{!24, !24, i64 0} !24 = !{!"any pointer", !7, i64 0}
#include<stdio.h> #include<string.h> #include<stdlib.h> #define SORT(a,n) qsort(a,n,sizeof(int),intcmp) #define s(n) scanf("%d",&n) #define sc(n) scanf("%c",&n) #define sl(n) scanf("%I64d",&n) #define sf(n) scanf("%lf",&n) #define ss(n) scanf("%s",n) #define fill(a,v) memset(a, v, sizeof(a)) int intcmp(const void *f,const void *s) { return (*(int *)f-*(int *)s); } int gcd(int a,int b){ return ((b==0)?a:gcd(b,a%b));} #define MAX #define MODBY 1000000007 typedef long long int lld; typedef long double Lf; int main() { int a,b,c; int ab,bc,ca; s(ab); s(bc); s(ca); for(a=1;a<=ab;++a){ b=ab/a; c=ca/a; if(((a*b==ab)&&(b*c==bc)&&(c*a==ca))) break; } printf("%d\n",4*(a+b+c)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_13679/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_13679/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @intcmp(ptr nocapture noundef readonly %f, ptr nocapture noundef readonly %s) local_unnamed_addr #0 { entry: %0 = load i32, ptr %f, align 4, !tbaa !5 %1 = load i32, ptr %s, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %cmp4 = icmp eq i32 %b, 0 br i1 %cmp4, label %cond.end, label %cond.false cond.false: ; preds = %entry, %cond.false %b.tr6 = phi i32 [ %rem, %cond.false ], [ %b, %entry ] %a.tr5 = phi i32 [ %b.tr6, %cond.false ], [ %a, %entry ] %rem = srem i32 %a.tr5, %b.tr6 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %cond.end, label %cond.false cond.end: ; preds = %cond.false, %entry %a.tr.lcssa = phi i32 [ %a, %entry ], [ %b.tr6, %cond.false ] ret i32 %a.tr.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %ab = alloca i32, align 4 %bc = alloca i32, align 4 %ca = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ab) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %bc) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ca) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ab) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %bc) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %ca) %0 = load i32, ptr %ab, align 4, !tbaa !5 %cmp.not23 = icmp slt i32 %0, 1 br i1 %cmp.not23, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %1 = load i32, ptr %ca, align 4, !tbaa !5 %2 = load i32, ptr %bc, align 4 %3 = add nuw i32 %0, 1 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc %a.024 = phi i32 [ 1, %for.body.lr.ph ], [ %inc, %for.inc ] %div = sdiv i32 %0, %a.024 %div3 = sdiv i32 %1, %a.024 %mul = mul nsw i32 %div, %a.024 %cmp4 = icmp eq i32 %mul, %0 br i1 %cmp4, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body %mul5 = mul nsw i32 %div3, %div %cmp6 = icmp eq i32 %mul5, %2 %mul8 = mul nsw i32 %div3, %a.024 %cmp9 = icmp eq i32 %mul8, %1 %or.cond = select i1 %cmp6, i1 %cmp9, i1 false br i1 %or.cond, label %for.end.loopexit, label %for.inc for.inc: ; preds = %for.body, %land.lhs.true %inc = add nuw i32 %a.024, 1 %exitcond.not = icmp eq i32 %a.024, %0 br i1 %exitcond.not, label %for.end.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit: ; preds = %land.lhs.true, %for.inc %a.0.lcssa.ph = phi i32 [ %3, %for.inc ], [ %a.024, %land.lhs.true ] %4 = add nsw i32 %div, %a.0.lcssa.ph %5 = add nsw i32 %4, %div3 %6 = shl nsw i32 %5, 2 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %add10 = phi i32 [ 0, %entry ], [ %6, %for.end.loopexit ] %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ca) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %bc) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ab) #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) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 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 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> #define SIZE 11 int main(void) { char s1[SIZE], s2[SIZE], s3[SIZE]; int a, b; scanf("%s %s %s", s1, s2, s3); a = strlen(s1); b = strlen(s2); if (s1[a-1] == s2[0] && s2[b-1] == s3[0]) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136832/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136832/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s %s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s1 = alloca [11 x i8], align 1 %s2 = alloca [11 x i8], align 1 %s3 = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s1) #4 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s2) #4 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s3) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s1, ptr noundef nonnull %s2, ptr noundef nonnull %s3) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s1) #5 %sub = shl i64 %call4, 32 %sext = add i64 %sub, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr %s2, align 1, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s2) #5 %sub12 = shl i64 %call6, 32 %sext22 = add i64 %sub12, -4294967296 %idxprom13 = ashr exact i64 %sext22, 32 %arrayidx14 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 %idxprom13 %2 = load i8, ptr %arrayidx14, align 1, !tbaa !5 %3 = load i8, ptr %s3, align 1, !tbaa !5 %cmp18 = icmp eq i8 %2, %3 br i1 %cmp18, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s3) #4 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s2) #4 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s1) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress 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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int i = 0, j = 0; char s1[11], s2[11], s3[11], a, b; scanf("%s %s %s", s1, s2, s3); while (i < 10 && s1[i] != '\0') a = s1[i++]; while (j < 10 && s2[j] != '\0') b = s2[j++]; if (a == s2[0] && b == s3[0]) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136876/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136876/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s %s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s1 = alloca [11 x i8], align 1 %s2 = alloca [11 x i8], align 1 %s3 = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s1) #4 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s2) #4 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %s3) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s1, ptr noundef nonnull %s2, ptr noundef nonnull %s3) %0 = load i8, ptr %s1, align 1, !tbaa !5 %cmp3.not = icmp eq i8 %0, 0 br i1 %cmp3.not, label %while.end, label %while.cond while.cond: ; preds = %entry %arrayidx.1 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 1 %1 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %cmp3.not.1 = icmp eq i8 %1, 0 br i1 %cmp3.not.1, label %while.end, label %while.cond.1 while.cond.1: ; preds = %while.cond %arrayidx.2 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 2 %2 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %cmp3.not.2 = icmp eq i8 %2, 0 br i1 %cmp3.not.2, label %while.end, label %while.cond.2 while.cond.2: ; preds = %while.cond.1 %arrayidx.3 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 3 %3 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %cmp3.not.3 = icmp eq i8 %3, 0 br i1 %cmp3.not.3, label %while.end, label %while.cond.3 while.cond.3: ; preds = %while.cond.2 %arrayidx.4 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 4 %4 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 %cmp3.not.4 = icmp eq i8 %4, 0 br i1 %cmp3.not.4, label %while.end, label %while.cond.4 while.cond.4: ; preds = %while.cond.3 %arrayidx.5 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 5 %5 = load i8, ptr %arrayidx.5, align 1, !tbaa !5 %cmp3.not.5 = icmp eq i8 %5, 0 br i1 %cmp3.not.5, label %while.end, label %while.cond.5 while.cond.5: ; preds = %while.cond.4 %arrayidx.6 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 6 %6 = load i8, ptr %arrayidx.6, align 1, !tbaa !5 %cmp3.not.6 = icmp eq i8 %6, 0 br i1 %cmp3.not.6, label %while.end, label %while.cond.6 while.cond.6: ; preds = %while.cond.5 %arrayidx.7 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 7 %7 = load i8, ptr %arrayidx.7, align 1, !tbaa !5 %cmp3.not.7 = icmp eq i8 %7, 0 br i1 %cmp3.not.7, label %while.end, label %while.cond.7 while.cond.7: ; preds = %while.cond.6 %arrayidx.8 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 8 %8 = load i8, ptr %arrayidx.8, align 1, !tbaa !5 %cmp3.not.8 = icmp eq i8 %8, 0 br i1 %cmp3.not.8, label %while.end, label %while.cond.8 while.cond.8: ; preds = %while.cond.7 %arrayidx.9 = getelementptr inbounds [11 x i8], ptr %s1, i64 0, i64 9 %9 = load i8, ptr %arrayidx.9, align 1, !tbaa !5 %cmp3.not.9 = icmp eq i8 %9, 0 %spec.select = select i1 %cmp3.not.9, i8 %8, i8 %9 br label %while.end while.end: ; preds = %while.cond.8, %while.cond.7, %while.cond.6, %while.cond.5, %while.cond.4, %while.cond.3, %while.cond.2, %while.cond.1, %while.cond, %entry %a.0.lcssa = phi i8 [ undef, %entry ], [ %0, %while.cond ], [ %1, %while.cond.1 ], [ %2, %while.cond.2 ], [ %3, %while.cond.3 ], [ %4, %while.cond.4 ], [ %5, %while.cond.5 ], [ %6, %while.cond.6 ], [ %7, %while.cond.7 ], [ %spec.select, %while.cond.8 ] %10 = load i8, ptr %s2, align 1, !tbaa !5 %cmp14.not = icmp eq i8 %10, 0 br i1 %cmp14.not, label %if.else, label %while.cond7 while.cond7: ; preds = %while.end %arrayidx12.1 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 1 %11 = load i8, ptr %arrayidx12.1, align 1, !tbaa !5 %cmp14.not.1 = icmp eq i8 %11, 0 br i1 %cmp14.not.1, label %while.end21, label %while.cond7.1 while.cond7.1: ; preds = %while.cond7 %arrayidx12.2 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 2 %12 = load i8, ptr %arrayidx12.2, align 1, !tbaa !5 %cmp14.not.2 = icmp eq i8 %12, 0 br i1 %cmp14.not.2, label %while.end21, label %while.cond7.2 while.cond7.2: ; preds = %while.cond7.1 %arrayidx12.3 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 3 %13 = load i8, ptr %arrayidx12.3, align 1, !tbaa !5 %cmp14.not.3 = icmp eq i8 %13, 0 br i1 %cmp14.not.3, label %while.end21, label %while.cond7.3 while.cond7.3: ; preds = %while.cond7.2 %arrayidx12.4 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 4 %14 = load i8, ptr %arrayidx12.4, align 1, !tbaa !5 %cmp14.not.4 = icmp eq i8 %14, 0 br i1 %cmp14.not.4, label %while.end21, label %while.cond7.4 while.cond7.4: ; preds = %while.cond7.3 %arrayidx12.5 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 5 %15 = load i8, ptr %arrayidx12.5, align 1, !tbaa !5 %cmp14.not.5 = icmp eq i8 %15, 0 br i1 %cmp14.not.5, label %while.end21, label %while.cond7.5 while.cond7.5: ; preds = %while.cond7.4 %arrayidx12.6 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 6 %16 = load i8, ptr %arrayidx12.6, align 1, !tbaa !5 %cmp14.not.6 = icmp eq i8 %16, 0 br i1 %cmp14.not.6, label %while.end21, label %while.cond7.6 while.cond7.6: ; preds = %while.cond7.5 %arrayidx12.7 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 7 %17 = load i8, ptr %arrayidx12.7, align 1, !tbaa !5 %cmp14.not.7 = icmp eq i8 %17, 0 br i1 %cmp14.not.7, label %while.end21, label %while.cond7.7 while.cond7.7: ; preds = %while.cond7.6 %arrayidx12.8 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 8 %18 = load i8, ptr %arrayidx12.8, align 1, !tbaa !5 %cmp14.not.8 = icmp eq i8 %18, 0 br i1 %cmp14.not.8, label %while.end21, label %while.cond7.8 while.cond7.8: ; preds = %while.cond7.7 %arrayidx12.9 = getelementptr inbounds [11 x i8], ptr %s2, i64 0, i64 9 %19 = load i8, ptr %arrayidx12.9, align 1, !tbaa !5 %cmp14.not.9 = icmp eq i8 %19, 0 %spec.select47 = select i1 %cmp14.not.9, i8 %18, i8 %19 br label %while.end21 while.end21: ; preds = %while.cond7.8, %while.cond7.7, %while.cond7.6, %while.cond7.5, %while.cond7.4, %while.cond7.3, %while.cond7.2, %while.cond7.1, %while.cond7 %b.0.lcssa = phi i8 [ %10, %while.cond7 ], [ %11, %while.cond7.1 ], [ %12, %while.cond7.2 ], [ %13, %while.cond7.3 ], [ %14, %while.cond7.4 ], [ %15, %while.cond7.5 ], [ %16, %while.cond7.6 ], [ %17, %while.cond7.7 ], [ %spec.select47, %while.cond7.8 ] %cmp25 = icmp eq i8 %a.0.lcssa, %10 %20 = load i8, ptr %s3, align 1 %cmp30 = icmp eq i8 %b.0.lcssa, %20 %or.cond = select i1 %cmp25, i1 %cmp30, i1 false br i1 %or.cond, label %if.end, label %if.else if.else: ; preds = %while.end, %while.end21 br label %if.end if.end: ; preds = %while.end21, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %while.end21 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s3) #4 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s2) #4 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %s1) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> int main() { char a[105], b[105], c[105]; int len_a, len_b, len_c; scanf("%s %s %s", a, b, c); len_a = strlen(a); len_b = strlen(b); //len_c = strlen(c); if ((a[len_a - 1] == b[0]) && b[len_b - 1] == c[0]) puts("YES"); else puts("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136919/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136919/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s %s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [105 x i8], align 16 %b = alloca [105 x i8], align 16 %c = alloca [105 x i8], align 16 call void @llvm.lifetime.start.p0(i64 105, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 105, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 105, 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 %c) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %a) #5 %sub = shl i64 %call4, 32 %sext = add i64 %sub, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx = getelementptr inbounds [105 x i8], ptr %a, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr %b, align 16, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %b) #5 %sub12 = shl i64 %call6, 32 %sext22 = add i64 %sub12, -4294967296 %idxprom13 = ashr exact i64 %sext22, 32 %arrayidx14 = getelementptr inbounds [105 x i8], ptr %b, i64 0, i64 %idxprom13 %2 = load i8, ptr %arrayidx14, align 1, !tbaa !5 %3 = load i8, ptr %c, align 16, !tbaa !5 %cmp18 = icmp eq i8 %2, %3 br i1 %cmp18, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call21 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 105, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 105, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 105, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(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 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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> #include<string.h> //絶対値 long long int change_plus(long long int a) { if (a < 0) { return -a; } if (a >= 0) { return a; } } //大小比較(大) long long int big(long long int a, long long int b) { if (a >= b) { return a; } else { return b; } } //大小比較(小) long long int small(long long int a, long long int b) { if (a >= b) { return b; } else { return a; } } int main() { long long int n, m, k = 0; char str[15],str2[15],str3[15]; scanf("%s%s%s",str,str2,str3); if (str[strlen(str)-1]== str2[0] && str2[strlen(str2) - 1] == str3[0]) { printf("YES"); return 0; } printf("NO"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_136962/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_136962/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%s%s%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @change_plus(i64 noundef %a) local_unnamed_addr #0 { entry: %retval.0 = tail call i64 @llvm.abs.i64(i64 %a, i1 true) ret i64 %retval.0 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @big(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %b.a = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %b.a } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @small(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: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %str = alloca [15 x i8], align 1 %str2 = alloca [15 x i8], align 1 %str3 = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %str) #6 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %str2) #6 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %str3) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str, ptr noundef nonnull %str2, ptr noundef nonnull %str3) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #7 %sub = add i64 %call4, -1 %arrayidx = getelementptr inbounds [15 x i8], ptr %str, i64 0, i64 %sub %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr %str2, align 1, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %entry %call9 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str2) #7 %sub10 = add i64 %call9, -1 %arrayidx11 = getelementptr inbounds [15 x i8], ptr %str2, i64 0, i64 %sub10 %2 = load i8, ptr %arrayidx11, align 1, !tbaa !5 %3 = load i8, ptr %str3, align 1, !tbaa !5 %cmp15 = icmp eq i8 %2, %3 br i1 %cmp15, label %cleanup, label %if.end if.end: ; preds = %land.lhs.true, %entry br label %cleanup cleanup: ; preds = %land.lhs.true, %if.end %.str.2.sink = phi ptr [ @.str.2, %if.end ], [ @.str.1, %land.lhs.true ] %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink) call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %str3) #6 call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %str2) #6 call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %str) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #5 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { char a[100], b[100], c[100]; int i, j; scanf("%s %s %s", a, b, c); for(i=0; a[i]!='\0'; i++); for(j=0; b[j]!='\0'; j++); if(a[i-1]==b[0] && b[j-1]==c[0]) printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137004/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137004/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s %s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [100 x i8], align 16 %b = alloca [100 x i8], align 16 %c = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 100, 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 %c) 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 %a, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i8 %0, 0 %indvars.iv.next = add nuw i64 %indvars.iv, 1 br i1 %cmp.not, label %for.cond4, label %for.cond, !llvm.loop !8 for.cond4: ; preds = %for.cond, %for.cond4 %indvars.iv37 = phi i64 [ %indvars.iv.next38, %for.cond4 ], [ 0, %for.cond ] %arrayidx6 = getelementptr inbounds [100 x i8], ptr %b, i64 0, i64 %indvars.iv37 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !5 %cmp8.not = icmp eq i8 %1, 0 %indvars.iv.next38 = add nuw i64 %indvars.iv37, 1 br i1 %cmp8.not, label %for.end13, label %for.cond4, !llvm.loop !10 for.end13: ; preds = %for.cond4 %sub = shl i64 %indvars.iv, 32 %sext = add i64 %sub, -4294967296 %idxprom14 = ashr exact i64 %sext, 32 %arrayidx15 = getelementptr inbounds [100 x i8], ptr %a, i64 0, i64 %idxprom14 %2 = load i8, ptr %arrayidx15, align 1, !tbaa !5 %3 = load i8, ptr %b, align 16, !tbaa !5 %cmp19 = icmp eq i8 %2, %3 br i1 %cmp19, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %for.end13 %sub21 = shl i64 %indvars.iv37, 32 %sext40 = add i64 %sub21, -4294967296 %idxprom22 = ashr exact i64 %sext40, 32 %arrayidx23 = getelementptr inbounds [100 x i8], ptr %b, i64 0, i64 %idxprom22 %4 = load i8, ptr %arrayidx23, align 1, !tbaa !5 %5 = load i8, ptr %c, align 16, !tbaa !5 %cmp27 = icmp eq i8 %4, %5 br i1 %cmp27, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %for.end13 br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include<stdio.h> int main(void) { char A[11], B[11], C[11]; int i,j; scanf("%s", A); scanf("%s", B); scanf("%s", C); for (i = 0; A[i] != '\0';i++) { } for (j = 0; B[j] != '\0'; j++) { } if (A[i-1]==B[0]) { if (B[j - 1] == C[0]) { printf("YES"); } else { printf("NO"); } } else { printf("NO"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %A = alloca [11 x i8], align 1 %B = alloca [11 x i8], align 1 %C = alloca [11 x i8], align 1 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 11, ptr nonnull %C) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %B) %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %C) br label %for.cond for.cond: ; preds = %for.cond, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ 0, %entry ] %arrayidx = getelementptr inbounds [11 x i8], ptr %A, 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.cond6, label %for.cond, !llvm.loop !8 for.cond6: ; preds = %for.cond, %for.cond6 %indvars.iv42 = phi i64 [ %indvars.iv.next43, %for.cond6 ], [ 0, %for.cond ] %arrayidx8 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 %indvars.iv42 %1 = load i8, ptr %arrayidx8, align 1, !tbaa !5 %cmp10.not = icmp eq i8 %1, 0 %indvars.iv.next43 = add nuw i64 %indvars.iv42, 1 br i1 %cmp10.not, label %for.end15, label %for.cond6, !llvm.loop !10 for.end15: ; preds = %for.cond6 %sub = shl i64 %indvars.iv, 32 %sext = add i64 %sub, -4294967296 %idxprom16 = ashr exact i64 %sext, 32 %arrayidx17 = getelementptr inbounds [11 x i8], ptr %A, i64 0, i64 %idxprom16 %2 = load i8, ptr %arrayidx17, align 1, !tbaa !5 %3 = load i8, ptr %B, align 1, !tbaa !5 %cmp21 = icmp eq i8 %2, %3 br i1 %cmp21, label %if.then, label %if.end36 if.then: ; preds = %for.end15 %sub23 = shl i64 %indvars.iv42, 32 %sext45 = add i64 %sub23, -4294967296 %idxprom24 = ashr exact i64 %sext45, 32 %arrayidx25 = getelementptr inbounds [11 x i8], ptr %B, i64 0, i64 %idxprom24 %4 = load i8, ptr %arrayidx25, align 1, !tbaa !5 %5 = load i8, ptr %C, align 1, !tbaa !5 %cmp29 = icmp eq i8 %4, %5 %.str.1..str.2 = select i1 %cmp29, ptr @.str.1, ptr @.str.2 br label %if.end36 if.end36: ; preds = %for.end15, %if.then %.str.1.sink = phi ptr [ %.str.1..str.2, %if.then ], [ @.str.2, %for.end15 ] %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %C) #3 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 11, ptr nonnull %A) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include <stdio.h> #include <string.h> int main() { char A[20], B[20], C[20]; scanf("%s %s %s", A, B, C); int la = strlen(A), lb = strlen(B); if (A[la - 1] == B[0] && B[lb - 1] == C[0]) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137099/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137099/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %s %s\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca [20 x i8], align 16 %B = alloca [20 x i8], align 16 %C = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %A) #5 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %B) #5 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %C) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B, ptr noundef nonnull %C) %call4 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %A) #6 %sub = shl i64 %call4, 32 %sext = add i64 %sub, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx = getelementptr inbounds [20 x i8], ptr %A, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 %1 = load i8, ptr %B, align 16, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call6 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %B) #6 %sub12 = shl i64 %call6, 32 %sext22 = add i64 %sub12, -4294967296 %idxprom13 = ashr exact i64 %sext22, 32 %arrayidx14 = getelementptr inbounds [20 x i8], ptr %B, i64 0, i64 %idxprom13 %2 = load i8, ptr %arrayidx14, align 1, !tbaa !5 %3 = load i8, ptr %C, align 16, !tbaa !5 %cmp18 = icmp eq i8 %2, %3 br i1 %cmp18, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %C) #5 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %B) #5 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %A) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> char str[3][15]; int main() { int i; for (i = 0; i < 3; i++) { scanf(" %s",str[i]); } if (str[0][strlen(str[0]) - 1] == str[1][0] && str[1][strlen(str[1]) - 1] == str[2][0]) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137141/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137141/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c" %s\00", align 1 @str = dso_local global [3 x [15 x i8]] zeroinitializer, align 16 @str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @str) %call.1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([3 x [15 x i8]], ptr @str, i64 0, i64 1)) %call.2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([3 x [15 x i8]], ptr @str, i64 0, i64 2)) %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) @str) #4 %sub = add i64 %call1, -1 %arrayidx2 = getelementptr inbounds [15 x i8], ptr @str, i64 0, i64 %sub %0 = load i8, ptr %arrayidx2, align 1, !tbaa !5 %1 = load i8, ptr getelementptr inbounds ([3 x [15 x i8]], ptr @str, i64 0, i64 1), align 1, !tbaa !5 %cmp4 = icmp eq i8 %0, %1 br i1 %cmp4, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %call6 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([3 x [15 x i8]], ptr @str, i64 0, i64 1)) #4 %sub7 = add i64 %call6, -1 %arrayidx8 = getelementptr inbounds [3 x [15 x i8]], ptr @str, i64 0, i64 1, i64 %sub7 %2 = load i8, ptr %arrayidx8, align 1, !tbaa !5 %3 = load i8, ptr getelementptr inbounds ([3 x [15 x i8]], ptr @str, i64 0, i64 2), align 2, !tbaa !5 %cmp11 = icmp eq i8 %2, %3 br i1 %cmp11, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.3.sink = phi ptr [ @str.3, %if.else ], [ @str.4, %land.lhs.true ] %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> int main() { int num; while(~scanf("%d",&num)) { int c; c=num/3; if(c>0) printf("%d\n",c); else printf("0\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137228/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137228/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"0\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 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %tobool.not6 = icmp eq i32 %call5, -1 br i1 %tobool.not6, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %0 = load i32, ptr %num, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 2 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %while.body %div4 = udiv i32 %0, 3 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div4) br label %if.end if.else: ; preds = %while.body %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %if.then %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %tobool.not = icmp eq i32 %call, -1 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int N; scanf("%d", &N); if(N % 3 == 0) printf("%d\n", N/3); if(N % 3 == 1) printf("%d\n", (N-1)/3); if(N % 3 == 2) printf("%d\n", (N-2)/3); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137365/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137365/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) %0 = load i32, ptr %N, align 4, !tbaa !5 %rem = srem i32 %0, 3 %div = sdiv i32 %0, 3 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) %.pre = load i32, ptr %N, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %1 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %rem2 = srem i32 %1, 3 %cmp3 = icmp eq i32 %rem2, 1 br i1 %cmp3, label %if.then4, label %if.end7 if.then4: ; preds = %if.end %sub = add nsw i32 %1, -1 %div5 = sdiv i32 %sub, 3 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div5) %.pre15 = load i32, ptr %N, align 4, !tbaa !5 br label %if.end7 if.end7: ; preds = %if.then4, %if.end %2 = phi i32 [ %.pre15, %if.then4 ], [ %1, %if.end ] %rem8 = srem i32 %2, 3 %cmp9 = icmp eq i32 %rem8, 2 br i1 %cmp9, label %if.then10, label %if.end14 if.then10: ; preds = %if.end7 %sub11 = add nsw i32 %2, -2 %div12 = sdiv i32 %sub11, 3 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div12) br label %if.end14 if.end14: ; preds = %if.then10, %if.end7 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 #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 fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int 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 main(void){ int i,j,n,m,k,a[262144],b,c,w,r=0,l,t; double d; char s[262144]; scanf("%d",&n); //l=strlen(s); //for(i=0;i<n;i++){scanf("%d",&a[i]);} //qsort(a,n,sizeof(int),sortfncsj); printf("%d\n",n/3); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137451/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137451/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @zt(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i32 %a, %b %sub = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true) ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @round(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %mul = shl nsw i32 %rem, 1 %cmp.not = icmp sge i32 %mul, %b %div1 = sdiv i32 %a, %b %add = zext i1 %cmp.not to i32 %retval.0 = add nsw i32 %div1, %add ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @ceil(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %cmp = icmp ne i32 %rem, 0 %div = sdiv i32 %a, %b %add = zext i1 %cmp to i32 %retval.0 = add nsw i32 %div, %add ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i32 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i32 %b, 0 br i1 %cmp.not4.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i32 %a, %a.addr.0.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nCr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i32 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i32 %a, 1 %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i32 %add, %i.07 %mul = mul nsw i32 %r.08, %sub %div = sdiv i32 %mul, %i.07 %inc = add nuw i32 %i.07, 1 %sub.1 = sub i32 %add, %inc %mul.1 = mul nsw i32 %div, %sub.1 %div.1 = sdiv i32 %mul.1, %inc %inc.1 = add nuw i32 %i.07, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i32 %add, %i.07.unr %mul.epil = mul nsw i32 %r.08.unr, %sub.epil %div.epil = sdiv i32 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @fact(i32 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i32 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %a, 8 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %a, -8 %ind.end = or i32 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi7 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = mul <4 x i32> %vec.phi, %vec.ind %1 = mul <4 x i32> %vec.phi7, %step.add %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !8 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %a br i1 %cmp.n, label %for.end, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %r.06.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.05.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader9, %for.body %r.06 = phi i32 [ %mul, %for.body ], [ %r.06.ph, %for.body.preheader9 ] %i.05 = phi i32 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader9 ] %mul = mul nsw i32 %r.06, %i.05 %inc = add nuw i32 %i.05, 1 %exitcond.not = icmp eq i32 %i.05, %a br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @pow(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i32 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %b, 8 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %b, -8 %ind.end = or i32 %n.vec, 1 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %a, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi6 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %0 = mul <4 x i32> %vec.phi, %broadcast.splat %1 = mul <4 x i32> %vec.phi6, %broadcast.splat %index.next = add nuw i32 %index, 8 %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %b br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %r.05.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.04.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %r.05 = phi i32 [ %mul, %for.body ], [ %r.05.ph, %for.body.preheader7 ] %i.04 = phi i32 [ %inc, %for.body ], [ %i.04.ph, %for.body.preheader7 ] %mul = mul nsw i32 %r.05, %a %inc = add nuw i32 %i.04, 1 %exitcond.not = icmp eq i32 %i.04, %b br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llzt(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i64 %a, %b %sub = tail call i64 @llvm.abs.i64(i64 %sub5, i1 true) ret i64 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llround(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %mul = shl nsw i64 %rem, 1 %cmp.not = icmp sge i64 %mul, %b %div1 = sdiv i64 %a, %b %add = zext i1 %cmp.not to i64 %retval.0 = add nsw i64 %div1, %add ret i64 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llceil(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %cmp = icmp ne i64 %rem, 0 %div = sdiv i64 %a, %b %add = zext i1 %cmp to i64 %retval.0 = add nsw i64 %div, %add ret i64 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llgcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i64 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i64 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i64 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i64 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i64 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i64 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i64 %a.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lllcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i64 %b, 0 br i1 %cmp.not4.i, label %llgcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i64 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i64 %rem.i, 0 br i1 %cmp.not.i, label %llgcd.exit, label %while.body.i, !llvm.loop !14 llgcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i64 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i64 %a, %a.addr.0.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnCr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i64 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i64 %a, 1 %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i64 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i64 %add, %i.07 %mul = mul nsw i64 %r.08, %sub %div = sdiv i64 %mul, %i.07 %inc = add nuw i64 %i.07, 1 %sub.1 = sub i64 %add, %inc %mul.1 = mul nsw i64 %div, %sub.1 %div.1 = sdiv i64 %mul.1, %inc %inc.1 = add nuw i64 %i.07, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !15 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i64 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i64 %add, %i.07.unr %mul.epil = mul nsw i64 %r.08.unr, %sub.epil %div.epil = sdiv i64 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llfact(i64 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i64 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %a, 7 %0 = icmp ult i64 %a, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %a, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %i.05 = phi i64 [ 1, %for.body.preheader.new ], [ %inc.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.06, %i.05 %inc = add nuw nsw i64 %i.05, 1 %mul.1 = mul nsw i64 %mul, %inc %inc.1 = add nuw nsw i64 %i.05, 2 %mul.2 = mul nsw i64 %mul.1, %inc.1 %inc.2 = add nuw nsw i64 %i.05, 3 %mul.3 = mul nsw i64 %mul.2, %inc.2 %inc.3 = add nuw nsw i64 %i.05, 4 %mul.4 = mul nsw i64 %mul.3, %inc.3 %inc.4 = add nuw nsw i64 %i.05, 5 %mul.5 = mul nsw i64 %mul.4, %inc.4 %inc.5 = add nuw nsw i64 %i.05, 6 %mul.6 = mul nsw i64 %mul.5, %inc.5 %inc.6 = add nuw i64 %i.05, 7 %mul.7 = mul nsw i64 %mul.6, %inc.6 %inc.7 = add nuw i64 %i.05, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !16 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %i.05.unr = phi i64 [ 1, %for.body.preheader ], [ %inc.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.06.unr, %for.end.loopexit.unr-lcssa ] %i.05.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.06.epil, %i.05.epil %inc.epil = add nuw i64 %i.05.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !17 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llpow(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i64 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.05 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.05, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !19 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.05.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.05.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.05.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !20 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmax(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp ogt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmin(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp olt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbzt(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp.i = fcmp ogt double %a, %b %a.b.i = select i1 %cmp.i, double %a, double %b %cmp.i4 = fcmp olt double %a, %b %a.b.i5 = select i1 %cmp.i4, double %a, double %b %sub = fsub double %a.b.i, %a.b.i5 ret double %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !21 %1 = load i32, ptr %b, align 4, !tbaa !21 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !21 %1 = load i32, ptr %b, align 4, !tbaa !21 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !25 %1 = load i64, ptr %b, align 8, !tbaa !25 %cmp = icmp sgt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !25 %1 = load i64, ptr %b, align 8, !tbaa !25 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !27 %1 = load double, ptr %b, align 8, !tbaa !27 %cmp = fcmp ogt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !27 %1 = load double, ptr %b, align 8, !tbaa !27 %cmp = fcmp olt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: 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) #10 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) #10 ret i32 %call } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #7 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #11 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !21 %div = sdiv i32 %0, 3 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #11 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #9 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 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #10 = { nounwind willreturn memory(read) } attributes #11 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = distinct !{!8, !6, !9, !10} !9 = !{!"llvm.loop.isvectorized", i32 1} !10 = !{!"llvm.loop.unroll.runtime.disable"} !11 = distinct !{!11, !6, !10, !9} !12 = distinct !{!12, !6, !9, !10} !13 = distinct !{!13, !6, !10, !9} !14 = distinct !{!14, !6} !15 = distinct !{!15, !6} !16 = distinct !{!16, !6} !17 = distinct !{!17, !18} !18 = !{!"llvm.loop.unroll.disable"} !19 = distinct !{!19, !6} !20 = distinct !{!20, !18} !21 = !{!22, !22, i64 0} !22 = !{!"int", !23, i64 0} !23 = !{!"omnipotent char", !24, i64 0} !24 = !{!"Simple C/C++ TBAA"} !25 = !{!26, !26, i64 0} !26 = !{!"long long", !23, i64 0} !27 = !{!28, !28, i64 0} !28 = !{!"double", !23, i64 0}
#include <stdio.h> int main(void){ int n,i; scanf("%d %d", &n, &i); printf("%d\n", n-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137509/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137509/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> //scanf("%d",&x); //printf("%d",x); //for(i=0;i<N;i++){ } //if( == ){ }else{ } //while( ){ } /* int N, i; int H[100]; scanf("%d", &N); for (i = 0; i < N; i++) scanf("%s", &H[i]); */ int main() { int i, N; scanf("%d", &N); scanf("%d", &i); printf("%d", N - i + 1); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137552/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137552/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %i = alloca i32, align 4 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int n, i; if(scanf("%d %d", &n, &i) == 1); printf("%d", n - i + 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137596/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137596/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int n,i; scanf("%d%d",&n,&i); printf("%d",n-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137639/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137639/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int N,i; scanf("%d %d",&N,&i); printf("%d\n",N-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137682/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137682/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int n,i; scanf("%d", &n); scanf("%d", &i); printf("%d\n", n-i+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137732/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137732/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %i) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int N, i; scanf("%d %d", &N, &i); printf("%d\n", N - i + 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137776/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137776/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %i) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = load i32, ptr %i, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int a,b; scanf("%d %d",&a,&b); printf("%d",a-b+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137819/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137819/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = add i32 %0, 1 %add = sub i32 %sub, %1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int N,i,f,g,best,point=0; char moji[100]={0}; int count[100]={0}; int flag; scanf("%d",&N); char M[100][100]; for(i=0;i<3;i++){ scanf("%s",&M[i]); } /* for(i=0;i<3;i++){ printf("%c\n",M[i][3]); } */ for(i=0;i<N;i++){//N文字を1文字ずつ char moji[100]={0}; int count[100]={0}; for(f=0;f<3;f++){//何段目 //探索M[i][f]について //printf("%c\n",M[f][i]); for(g=0;g<N;g++){//gはmojiとcountの番号 if(moji[g]==0){ moji[g]=M[f][i]; count[g]=1; break; }else if(moji[g]==M[f][i]){ count[g]+=1; break; } } } //1文字目を整理し終わった best=0; for(f=0;f<100;f++){ if(count[best]<=count[f])best=f; } //printf("kosuu %d\n",count[best]); //printf("point %d\n",3-count[best]); point+=3-count[best]; for(f=0;f<10;f++){ //printf("%c",moji[i]); } //printf("\n"); for(f=0;f<10;f++){ //printf("%d",count[i]); } //printf("\n"); } printf("%d",point); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137862/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137862/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca [100 x [100 x i8]], align 16 %moji5 = alloca [100 x i8], align 16 %count6 = alloca [100 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 10000, ptr nonnull %M) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %M) %arrayidx.1 = getelementptr inbounds [100 x [100 x i8]], ptr %M, i64 0, i64 1 %call1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [100 x [100 x i8]], ptr %M, i64 0, i64 2 %call1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx.2) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp3116 = icmp sgt i32 %0, 0 br i1 %cmp3116, label %for.body4.us.preheader, label %for.end79 for.body4.us.preheader: ; preds = %entry %wide.trip.count134 = zext i32 %0 to i64 br label %for.body4.us for.body4.us: ; preds = %for.body4.us.preheader, %for.end59.us %indvars.iv131 = phi i64 [ 0, %for.body4.us.preheader ], [ %indvars.iv.next132, %for.end59.us ] %point.0117.us = phi i32 [ 0, %for.body4.us.preheader ], [ %add62.us, %for.end59.us ] call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %moji5) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(100) %moji5, i8 0, i64 100, i1 false) call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %count6) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %count6, i8 0, i64 400, i1 false) %arrayidx31.us.us = getelementptr inbounds [100 x [100 x i8]], ptr %M, i64 0, i64 0, i64 %indvars.iv131 br label %for.body12.us.us for.end59.us: ; preds = %for.body48.us %idxprom60.us = sext i32 %spec.select.us.3 to i64 %arrayidx61.us = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %idxprom60.us %1 = load i32, ptr %arrayidx61.us, align 4, !tbaa !5 %reass.sub.us = add i32 %point.0117.us, 3 %add62.us = sub i32 %reass.sub.us, %1 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %count6) #4 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %moji5) #4 %indvars.iv.next132 = add nuw nsw i64 %indvars.iv131, 1 %exitcond135.not = icmp eq i64 %indvars.iv.next132, %wide.trip.count134 br i1 %exitcond135.not, label %for.end79, label %for.body4.us, !llvm.loop !9 for.body48.us: ; preds = %for.body48.us, %for.body48.us.preheader %indvars.iv127 = phi i64 [ 0, %for.body48.us.preheader ], [ %indvars.iv.next128.3, %for.body48.us ] %best.0115.us = phi i32 [ 0, %for.body48.us.preheader ], [ %spec.select.us.3, %for.body48.us ] %idxprom49.us = sext i32 %best.0115.us to i64 %arrayidx50.us = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %idxprom49.us %2 = load i32, ptr %arrayidx50.us, align 4, !tbaa !5 %arrayidx52.us = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv127 %3 = load i32, ptr %arrayidx52.us, align 16, !tbaa !5 %cmp53.not.us = icmp sgt i32 %2, %3 %4 = trunc i64 %indvars.iv127 to i32 %spec.select.us = select i1 %cmp53.not.us, i32 %best.0115.us, i32 %4 %indvars.iv.next128 = or i64 %indvars.iv127, 1 %idxprom49.us.1 = sext i32 %spec.select.us to i64 %arrayidx50.us.1 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %idxprom49.us.1 %5 = load i32, ptr %arrayidx50.us.1, align 4, !tbaa !5 %arrayidx52.us.1 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.next128 %6 = load i32, ptr %arrayidx52.us.1, align 4, !tbaa !5 %cmp53.not.us.1 = icmp sgt i32 %5, %6 %7 = trunc i64 %indvars.iv.next128 to i32 %spec.select.us.1 = select i1 %cmp53.not.us.1, i32 %spec.select.us, i32 %7 %indvars.iv.next128.1 = or i64 %indvars.iv127, 2 %idxprom49.us.2 = sext i32 %spec.select.us.1 to i64 %arrayidx50.us.2 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %idxprom49.us.2 %8 = load i32, ptr %arrayidx50.us.2, align 4, !tbaa !5 %arrayidx52.us.2 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.next128.1 %9 = load i32, ptr %arrayidx52.us.2, align 8, !tbaa !5 %cmp53.not.us.2 = icmp sgt i32 %8, %9 %10 = trunc i64 %indvars.iv.next128.1 to i32 %spec.select.us.2 = select i1 %cmp53.not.us.2, i32 %spec.select.us.1, i32 %10 %indvars.iv.next128.2 = or i64 %indvars.iv127, 3 %idxprom49.us.3 = sext i32 %spec.select.us.2 to i64 %arrayidx50.us.3 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %idxprom49.us.3 %11 = load i32, ptr %arrayidx50.us.3, align 4, !tbaa !5 %arrayidx52.us.3 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.next128.2 %12 = load i32, ptr %arrayidx52.us.3, align 4, !tbaa !5 %cmp53.not.us.3 = icmp sgt i32 %11, %12 %13 = trunc i64 %indvars.iv.next128.2 to i32 %spec.select.us.3 = select i1 %cmp53.not.us.3, i32 %spec.select.us.2, i32 %13 %indvars.iv.next128.3 = add nuw nsw i64 %indvars.iv127, 4 %exitcond130.not.3 = icmp eq i64 %indvars.iv.next128.3, 100 br i1 %exitcond130.not.3, label %for.end59.us, label %for.body48.us, !llvm.loop !11 for.cond10.us.us: ; preds = %if.else.us.us %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count134 br i1 %exitcond.not, label %for.inc42.us.us, label %for.body12.us.us, !llvm.loop !12 for.body12.us.us: ; preds = %for.cond10.us.us, %for.body4.us %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond10.us.us ], [ 0, %for.body4.us ] %arrayidx14.us.us = getelementptr inbounds [100 x i8], ptr %moji5, i64 0, i64 %indvars.iv %14 = load i8, ptr %arrayidx14.us.us, align 1, !tbaa !13 %cmp15.us.us = icmp eq i8 %14, 0 br i1 %cmp15.us.us, label %if.then.us.us, label %if.else.us.us if.else.us.us: ; preds = %for.body12.us.us %15 = load i8, ptr %arrayidx31.us.us, align 1, !tbaa !13 %cmp33.us.us = icmp eq i8 %14, %15 br i1 %cmp33.us.us, label %if.then35.us.us, label %for.cond10.us.us if.then35.us.us: ; preds = %if.else.us.us %arrayidx37.us.us = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv %16 = load i32, ptr %arrayidx37.us.us, align 4, !tbaa !5 %add.us.us = add nsw i32 %16, 1 store i32 %add.us.us, ptr %arrayidx37.us.us, align 4, !tbaa !5 br label %for.inc42.us.us if.then.us.us: ; preds = %for.body12.us.us %arrayidx14.us.us.le = getelementptr inbounds [100 x i8], ptr %moji5, i64 0, i64 %indvars.iv %17 = load i8, ptr %arrayidx31.us.us, align 1, !tbaa !13 store i8 %17, ptr %arrayidx14.us.us.le, align 1, !tbaa !13 %arrayidx24.us.us = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv store i32 1, ptr %arrayidx24.us.us, align 4, !tbaa !5 br label %for.inc42.us.us for.inc42.us.us: ; preds = %for.cond10.us.us, %if.then.us.us, %if.then35.us.us %arrayidx31.us.us.1 = getelementptr inbounds [100 x [100 x i8]], ptr %M, i64 0, i64 1, i64 %indvars.iv131 br label %for.body12.us.us.1 for.body12.us.us.1: ; preds = %for.cond10.us.us.1, %for.inc42.us.us %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %for.cond10.us.us.1 ], [ 0, %for.inc42.us.us ] %arrayidx14.us.us.1 = getelementptr inbounds [100 x i8], ptr %moji5, i64 0, i64 %indvars.iv.1 %18 = load i8, ptr %arrayidx14.us.us.1, align 1, !tbaa !13 %cmp15.us.us.1 = icmp eq i8 %18, 0 br i1 %cmp15.us.us.1, label %if.then.us.us.1, label %if.else.us.us.1 if.else.us.us.1: ; preds = %for.body12.us.us.1 %19 = load i8, ptr %arrayidx31.us.us.1, align 1, !tbaa !13 %cmp33.us.us.1 = icmp eq i8 %18, %19 br i1 %cmp33.us.us.1, label %if.then35.us.us.1, label %for.cond10.us.us.1 for.cond10.us.us.1: ; preds = %if.else.us.us.1 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %exitcond.1.not = icmp eq i64 %indvars.iv.next.1, %wide.trip.count134 br i1 %exitcond.1.not, label %for.inc42.us.us.1, label %for.body12.us.us.1, !llvm.loop !12 if.then35.us.us.1: ; preds = %if.else.us.us.1 %arrayidx37.us.us.1 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.1 %20 = load i32, ptr %arrayidx37.us.us.1, align 4, !tbaa !5 %add.us.us.1 = add nsw i32 %20, 1 store i32 %add.us.us.1, ptr %arrayidx37.us.us.1, align 4, !tbaa !5 br label %for.inc42.us.us.1 if.then.us.us.1: ; preds = %for.body12.us.us.1 %arrayidx14.us.us.1.le = getelementptr inbounds [100 x i8], ptr %moji5, i64 0, i64 %indvars.iv.1 %21 = load i8, ptr %arrayidx31.us.us.1, align 1, !tbaa !13 store i8 %21, ptr %arrayidx14.us.us.1.le, align 1, !tbaa !13 %arrayidx24.us.us.1 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.1 store i32 1, ptr %arrayidx24.us.us.1, align 4, !tbaa !5 br label %for.inc42.us.us.1 for.inc42.us.us.1: ; preds = %for.cond10.us.us.1, %if.then.us.us.1, %if.then35.us.us.1 %arrayidx31.us.us.2 = getelementptr inbounds [100 x [100 x i8]], ptr %M, i64 0, i64 2, i64 %indvars.iv131 br label %for.body12.us.us.2 for.body12.us.us.2: ; preds = %for.cond10.us.us.2, %for.inc42.us.us.1 %indvars.iv.2 = phi i64 [ %indvars.iv.next.2, %for.cond10.us.us.2 ], [ 0, %for.inc42.us.us.1 ] %arrayidx14.us.us.2 = getelementptr inbounds [100 x i8], ptr %moji5, i64 0, i64 %indvars.iv.2 %22 = load i8, ptr %arrayidx14.us.us.2, align 1, !tbaa !13 %cmp15.us.us.2 = icmp eq i8 %22, 0 br i1 %cmp15.us.us.2, label %if.then.us.us.2, label %if.else.us.us.2 if.else.us.us.2: ; preds = %for.body12.us.us.2 %23 = load i8, ptr %arrayidx31.us.us.2, align 1, !tbaa !13 %cmp33.us.us.2 = icmp eq i8 %22, %23 br i1 %cmp33.us.us.2, label %if.then35.us.us.2, label %for.cond10.us.us.2 for.cond10.us.us.2: ; preds = %if.else.us.us.2 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1 %exitcond.2.not = icmp eq i64 %indvars.iv.next.2, %wide.trip.count134 br i1 %exitcond.2.not, label %for.body48.us.preheader, label %for.body12.us.us.2, !llvm.loop !12 if.then35.us.us.2: ; preds = %if.else.us.us.2 %arrayidx37.us.us.2 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.2 %24 = load i32, ptr %arrayidx37.us.us.2, align 4, !tbaa !5 %add.us.us.2 = add nsw i32 %24, 1 store i32 %add.us.us.2, ptr %arrayidx37.us.us.2, align 4, !tbaa !5 br label %for.body48.us.preheader for.body48.us.preheader: ; preds = %for.cond10.us.us.2, %if.then.us.us.2, %if.then35.us.us.2 br label %for.body48.us if.then.us.us.2: ; preds = %for.body12.us.us.2 %arrayidx24.us.us.2 = getelementptr inbounds [100 x i32], ptr %count6, i64 0, i64 %indvars.iv.2 store i32 1, ptr %arrayidx24.us.us.2, align 4, !tbaa !5 br label %for.body48.us.preheader for.end79: ; preds = %for.end59.us, %entry %point.0.lcssa = phi i32 [ 0, %entry ], [ %add62.us, %for.end59.us ] %call80 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %point.0.lcssa) call void @llvm.lifetime.end.p0(i64 10000, ptr nonnull %M) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(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 = { 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 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = !{!7, !7, i64 0}
#include<stdio.h> #include<stdlib.h> #define NEW(p,n){p=malloc((n)*sizeof(p[0]));if(p==NULL){printf("not enough memory\n");exit(1);};} //pの型の変数n個の要素分のメモリを確保し、そのアドレスをpに代入するマクロ #define INFTY 999999 //char型のポインタ(=配列と意味は同じ)をString型と定義 typedef char* String; //文字列の長さを求める関数 int string_len(String str){ int len=0; while(str[len]!=0){ len++; } return len; } //str[0]~str[n-1]まで //文字列を標準入力から読み込み、それをString型のメモリを確保し直してくれる関数 String string_input(void){ int i,len; char buf[200]; String str; scanf("%s",buf);//buf=入力した文字列が入るchar型の配列 //ここまでは文字列の長さがわからなかったから、一旦1000個分のメモリを用意しそこに入力させる len=string_len(buf);//len=文字列の長さを表すint型変数 NEW(str,len+1);//strはただのポインタだから、ここでNEWを使ってメモリを確保しなくちゃいけない for(i=0;i<len;i++){ str[i]=buf[i]; } str[len]=0; return str; } int count_match(char a, char b, char c){ int ans; if(a==b){ if(b==c){ ans=0; } else{ ans=1; } } else{ if(a==c){ ans=1; } else if(b==c){ ans=1; } else{ ans=2; } } return ans; } int main(void){ int N; String A,B,C; scanf("%d", &N); A=string_input(); B=string_input(); C=string_input(); int ans=0; for(int i=0;i<N;i++){ ans+=count_match(A[i],B[i],C[i]); } printf("%d\n",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137905/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137905/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [18 x i8] c"not enough memory\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @string_len(ptr nocapture noundef readonly %str) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ 0, %entry ] %arrayidx = getelementptr inbounds i8, ptr %str, 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 %while.end, label %while.cond, !llvm.loop !8 while.end: ; preds = %while.cond %1 = trunc i64 %indvars.iv to i32 ret i32 %1 } ; 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: nounwind uwtable define dso_local noalias ptr @string_input() local_unnamed_addr #2 { entry: %buf = alloca [200 x i8], align 16 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %buf) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %buf) br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %while.cond.i ], [ 0, %entry ] %arrayidx.i = getelementptr inbounds i8, ptr %buf, i64 %indvars.iv.i %0 = load i8, ptr %arrayidx.i, align 1, !tbaa !5 %cmp.not.i = icmp eq i8 %0, 0 %indvars.iv.next.i = add nuw i64 %indvars.iv.i, 1 br i1 %cmp.not.i, label %string_len.exit, label %while.cond.i, !llvm.loop !8 string_len.exit: ; preds = %while.cond.i %add = shl i64 %indvars.iv.i, 32 %sext = add i64 %add, 4294967296 %conv = ashr exact i64 %sext, 32 %call3 = call noalias ptr @malloc(i64 noundef %conv) #11 %cmp = icmp eq ptr %call3, null br i1 %cmp, label %if.then, label %for.cond.preheader for.cond.preheader: ; preds = %string_len.exit %1 = trunc i64 %indvars.iv.i to i32 %cmp621 = icmp sgt i32 %1, 0 br i1 %cmp621, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %for.cond.preheader %2 = and i64 %indvars.iv.i, 4294967295 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %call3, ptr nonnull align 16 %buf, i64 %2, i1 false), !tbaa !5 br label %for.end if.then: ; preds = %string_len.exit %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #12 unreachable for.end: ; preds = %for.body.preheader, %for.cond.preheader %idxprom10 = ashr exact i64 %add, 32 %arrayidx11 = getelementptr inbounds i8, ptr %call3, i64 %idxprom10 store i8 0, ptr %arrayidx11, align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %buf) #10 ret ptr %call3 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @count_match(i8 noundef signext %a, i8 noundef signext %b, i8 noundef signext %c) local_unnamed_addr #6 { entry: %cmp = icmp eq i8 %a, %b br i1 %cmp, label %if.then, label %if.else8 if.then: ; preds = %entry %cmp5 = icmp ne i8 %a, %c %. = zext i1 %cmp5 to i32 br label %if.end23 if.else8: ; preds = %entry %cmp11 = icmp eq i8 %a, %c br i1 %cmp11, label %if.end23, label %if.else14 if.else14: ; preds = %if.else8 %cmp17 = icmp eq i8 %b, %c %.29 = select i1 %cmp17, i32 1, i32 2 br label %if.end23 if.end23: ; preds = %if.else14, %if.else8, %if.then %ans.0 = phi i32 [ %., %if.then ], [ 1, %if.else8 ], [ %.29, %if.else14 ] ret i32 %ans.0 } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %buf.i36 = alloca [200 x i8], align 16 %buf.i15 = alloca [200 x i8], align 16 %buf.i = alloca [200 x i8], align 16 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #10 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %N) call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %buf.i) #10 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %buf.i) br label %while.cond.i.i while.cond.i.i: ; preds = %while.cond.i.i, %entry %indvars.iv.i.i = phi i64 [ %indvars.iv.next.i.i, %while.cond.i.i ], [ 0, %entry ] %arrayidx.i.i = getelementptr inbounds i8, ptr %buf.i, i64 %indvars.iv.i.i %0 = load i8, ptr %arrayidx.i.i, align 1, !tbaa !5 %cmp.not.i.i = icmp eq i8 %0, 0 %indvars.iv.next.i.i = add nuw i64 %indvars.iv.i.i, 1 br i1 %cmp.not.i.i, label %string_len.exit.i, label %while.cond.i.i, !llvm.loop !8 string_len.exit.i: ; preds = %while.cond.i.i %add.i = shl i64 %indvars.iv.i.i, 32 %sext.i = add i64 %add.i, 4294967296 %conv.i = ashr exact i64 %sext.i, 32 %call3.i = call noalias ptr @malloc(i64 noundef %conv.i) #11 %cmp.i = icmp eq ptr %call3.i, null br i1 %cmp.i, label %if.then.i, label %for.cond.preheader.i for.cond.preheader.i: ; preds = %string_len.exit.i %1 = trunc i64 %indvars.iv.i.i to i32 %cmp621.i = icmp sgt i32 %1, 0 br i1 %cmp621.i, label %for.body.preheader.i, label %string_input.exit for.body.preheader.i: ; preds = %for.cond.preheader.i %2 = and i64 %indvars.iv.i.i, 4294967295 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %call3.i, ptr nonnull align 16 %buf.i, i64 %2, i1 false), !tbaa !5 br label %string_input.exit if.then.i: ; preds = %string_len.exit.i %puts.i = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #12 unreachable string_input.exit: ; preds = %for.cond.preheader.i, %for.body.preheader.i %idxprom10.i = ashr exact i64 %add.i, 32 %arrayidx11.i = getelementptr inbounds i8, ptr %call3.i, i64 %idxprom10.i store i8 0, ptr %arrayidx11.i, align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %buf.i) #10 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %buf.i15) #10 %call.i16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %buf.i15) br label %while.cond.i.i17 while.cond.i.i17: ; preds = %while.cond.i.i17, %string_input.exit %indvars.iv.i.i18 = phi i64 [ %indvars.iv.next.i.i21, %while.cond.i.i17 ], [ 0, %string_input.exit ] %arrayidx.i.i19 = getelementptr inbounds i8, ptr %buf.i15, i64 %indvars.iv.i.i18 %3 = load i8, ptr %arrayidx.i.i19, align 1, !tbaa !5 %cmp.not.i.i20 = icmp eq i8 %3, 0 %indvars.iv.next.i.i21 = add nuw i64 %indvars.iv.i.i18, 1 br i1 %cmp.not.i.i20, label %string_len.exit.i22, label %while.cond.i.i17, !llvm.loop !8 string_len.exit.i22: ; preds = %while.cond.i.i17 %add.i23 = shl i64 %indvars.iv.i.i18, 32 %sext.i24 = add i64 %add.i23, 4294967296 %conv.i25 = ashr exact i64 %sext.i24, 32 %call3.i26 = call noalias ptr @malloc(i64 noundef %conv.i25) #11 %cmp.i27 = icmp eq ptr %call3.i26, null br i1 %cmp.i27, label %if.then.i33, label %for.cond.preheader.i28 for.cond.preheader.i28: ; preds = %string_len.exit.i22 %4 = trunc i64 %indvars.iv.i.i18 to i32 %cmp621.i29 = icmp sgt i32 %4, 0 br i1 %cmp621.i29, label %for.body.preheader.i32, label %string_input.exit35 for.body.preheader.i32: ; preds = %for.cond.preheader.i28 %5 = and i64 %indvars.iv.i.i18, 4294967295 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %call3.i26, ptr nonnull align 16 %buf.i15, i64 %5, i1 false), !tbaa !5 br label %string_input.exit35 if.then.i33: ; preds = %string_len.exit.i22 %puts.i34 = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #12 unreachable string_input.exit35: ; preds = %for.cond.preheader.i28, %for.body.preheader.i32 %idxprom10.i30 = ashr exact i64 %add.i23, 32 %arrayidx11.i31 = getelementptr inbounds i8, ptr %call3.i26, i64 %idxprom10.i30 store i8 0, ptr %arrayidx11.i31, align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %buf.i15) #10 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %buf.i36) #10 %call.i37 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %buf.i36) br label %while.cond.i.i38 while.cond.i.i38: ; preds = %while.cond.i.i38, %string_input.exit35 %indvars.iv.i.i39 = phi i64 [ %indvars.iv.next.i.i42, %while.cond.i.i38 ], [ 0, %string_input.exit35 ] %arrayidx.i.i40 = getelementptr inbounds i8, ptr %buf.i36, i64 %indvars.iv.i.i39 %6 = load i8, ptr %arrayidx.i.i40, align 1, !tbaa !5 %cmp.not.i.i41 = icmp eq i8 %6, 0 %indvars.iv.next.i.i42 = add nuw i64 %indvars.iv.i.i39, 1 br i1 %cmp.not.i.i41, label %string_len.exit.i43, label %while.cond.i.i38, !llvm.loop !8 string_len.exit.i43: ; preds = %while.cond.i.i38 %add.i44 = shl i64 %indvars.iv.i.i39, 32 %sext.i45 = add i64 %add.i44, 4294967296 %conv.i46 = ashr exact i64 %sext.i45, 32 %call3.i47 = call noalias ptr @malloc(i64 noundef %conv.i46) #11 %cmp.i48 = icmp eq ptr %call3.i47, null br i1 %cmp.i48, label %if.then.i54, label %for.cond.preheader.i49 for.cond.preheader.i49: ; preds = %string_len.exit.i43 %7 = trunc i64 %indvars.iv.i.i39 to i32 %cmp621.i50 = icmp sgt i32 %7, 0 br i1 %cmp621.i50, label %for.body.preheader.i53, label %string_input.exit56 for.body.preheader.i53: ; preds = %for.cond.preheader.i49 %8 = and i64 %indvars.iv.i.i39, 4294967295 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %call3.i47, ptr nonnull align 16 %buf.i36, i64 %8, i1 false), !tbaa !5 br label %string_input.exit56 if.then.i54: ; preds = %string_len.exit.i43 %puts.i55 = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #12 unreachable string_input.exit56: ; preds = %for.cond.preheader.i49, %for.body.preheader.i53 %idxprom10.i51 = ashr exact i64 %add.i44, 32 %arrayidx11.i52 = getelementptr inbounds i8, ptr %call3.i47, i64 %idxprom10.i51 store i8 0, ptr %arrayidx11.i52, align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %buf.i36) #10 %9 = load i32, ptr %N, align 4, !tbaa !10 %cmp59 = icmp sgt i32 %9, 0 br i1 %cmp59, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %string_input.exit56 %wide.trip.count = zext i32 %9 to i64 %min.iters.check = icmp ult i32 %9, 8 br i1 %min.iters.check, label %for.body.preheader73, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %28, %vector.body ] %vec.phi63 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %29, %vector.body ] %10 = getelementptr inbounds i8, ptr %call3.i, i64 %index %wide.load = load <4 x i8>, ptr %10, align 1, !tbaa !5 %11 = getelementptr inbounds i8, ptr %10, i64 4 %wide.load64 = load <4 x i8>, ptr %11, align 1, !tbaa !5 %12 = getelementptr inbounds i8, ptr %call3.i26, i64 %index %wide.load65 = load <4 x i8>, ptr %12, align 1, !tbaa !5 %13 = getelementptr inbounds i8, ptr %12, i64 4 %wide.load66 = load <4 x i8>, ptr %13, align 1, !tbaa !5 %14 = getelementptr inbounds i8, ptr %call3.i47, i64 %index %wide.load67 = load <4 x i8>, ptr %14, align 1, !tbaa !5 %15 = getelementptr inbounds i8, ptr %14, i64 4 %wide.load68 = load <4 x i8>, ptr %15, align 1, !tbaa !5 %16 = icmp ne <4 x i8> %wide.load, %wide.load65 %17 = icmp ne <4 x i8> %wide.load64, %wide.load66 %18 = icmp ne <4 x i8> %wide.load, %wide.load67 %19 = icmp ne <4 x i8> %wide.load64, %wide.load68 %20 = icmp eq <4 x i8> %wide.load65, %wide.load67 %21 = icmp eq <4 x i8> %wide.load66, %wide.load68 %22 = select <4 x i1> %20, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %23 = select <4 x i1> %21, <4 x i32> <i32 1, i32 1, i32 1, i32 1>, <4 x i32> <i32 2, i32 2, i32 2, i32 2> %24 = icmp ne <4 x i8> %wide.load, %wide.load67 %25 = icmp ne <4 x i8> %wide.load64, %wide.load68 %26 = select <4 x i1> %16, <4 x i1> %18, <4 x i1> zeroinitializer %27 = select <4 x i1> %17, <4 x i1> %19, <4 x i1> zeroinitializer %narrow = select <4 x i1> %16, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %24 %predphi = zext <4 x i1> %narrow to <4 x i32> %narrow72 = select <4 x i1> %17, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %25 %predphi69 = zext <4 x i1> %narrow72 to <4 x i32> %predphi70 = select <4 x i1> %26, <4 x i32> %22, <4 x i32> %predphi %predphi71 = select <4 x i1> %27, <4 x i32> %23, <4 x i32> %predphi69 %28 = add <4 x i32> %predphi70, %vec.phi %29 = add <4 x i32> %predphi71, %vec.phi63 %index.next = add nuw i64 %index, 8 %30 = icmp eq i64 %index.next, %n.vec br i1 %30, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %29, %28 %31 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader73 for.body.preheader73: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] %ans.060.ph = phi i32 [ 0, %for.body.preheader ], [ %31, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %count_match.exit, %middle.block, %string_input.exit56 %ans.0.lcssa = phi i32 [ 0, %string_input.exit56 ], [ %31, %middle.block ], [ %add, %count_match.exit ] %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #10 ret i32 0 for.body: ; preds = %for.body.preheader73, %count_match.exit %indvars.iv = phi i64 [ %indvars.iv.next, %count_match.exit ], [ %indvars.iv.ph, %for.body.preheader73 ] %ans.060 = phi i32 [ %add, %count_match.exit ], [ %ans.060.ph, %for.body.preheader73 ] %arrayidx = getelementptr inbounds i8, ptr %call3.i, i64 %indvars.iv %32 = load i8, ptr %arrayidx, align 1, !tbaa !5 %arrayidx5 = getelementptr inbounds i8, ptr %call3.i26, i64 %indvars.iv %33 = load i8, ptr %arrayidx5, align 1, !tbaa !5 %arrayidx7 = getelementptr inbounds i8, ptr %call3.i47, i64 %indvars.iv %34 = load i8, ptr %arrayidx7, align 1, !tbaa !5 %cmp.i57 = icmp eq i8 %32, %33 br i1 %cmp.i57, label %if.then.i58, label %if.else8.i if.then.i58: ; preds = %for.body %cmp5.i = icmp ne i8 %32, %34 %..i = zext i1 %cmp5.i to i32 br label %count_match.exit if.else8.i: ; preds = %for.body %cmp11.i = icmp eq i8 %32, %34 br i1 %cmp11.i, label %count_match.exit, label %if.else14.i if.else14.i: ; preds = %if.else8.i %cmp17.i = icmp eq i8 %33, %34 %.29.i = select i1 %cmp17.i, i32 1, i32 2 br label %count_match.exit count_match.exit: ; preds = %if.then.i58, %if.else8.i, %if.else14.i %ans.0.i = phi i32 [ %..i, %if.then.i58 ], [ 1, %if.else8.i ], [ %.29.i, %if.else14.i ] %add = add nuw nsw i32 %ans.0.i, %ans.060 %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 !15 } ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #7 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #9 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 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="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 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 #5 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { 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 #7 = { nofree nounwind } attributes #8 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #9 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #10 = { nounwind } attributes #11 = { nounwind allocsize(0) } attributes #12 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = !{!11, !11, i64 0} !11 = !{!"int", !6, i64 0} !12 = distinct !{!12, !9, !13, !14} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !9, !14, !13}
#include <stdio.h> #define swap(type, x, y) do{ type t = x; x = y; y = t; }while(0) int main(){ int n; scanf("%d", &n); int v[55]; for(int i=1; i<=n; i++) scanf("%d", v+i); for(int i=1; i<n; i++) for(int j=i+1; j<=n; j++){ if(v[i] > v[j]) swap(int, v[i], v[j]); } double ans = (double)v[1]; for(int i=2; i<=n; i++) ans = (ans + (double)v[i]) / 2.0; printf("%lf\n", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_137949/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_137949/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %v = alloca [55 x i32], align 16 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) call void @llvm.lifetime.start.p0(i64 220, ptr nonnull %v) #3 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not58 = icmp slt i32 %0, 1 br i1 %cmp.not58, label %for.cond.cleanup5.thread, label %for.body for.cond3.preheader: ; preds = %for.body %cmp462 = icmp sgt i32 %2, 1 br i1 %cmp462, label %for.body6.preheader, label %for.cond.cleanup5.thread for.body6.preheader: ; preds = %for.cond3.preheader %1 = add i32 %2, 1 %wide.trip.count78 = zext i32 %2 to i64 %wide.trip.count = zext i32 %1 to i64 br label %for.body10.lr.ph for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %add.ptr = getelementptr inbounds i32, ptr %v, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %3 br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.cond3.loopexit: ; preds = %for.inc22 %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1 %exitcond79.not = icmp eq i64 %indvars.iv.next76, %wide.trip.count78 br i1 %exitcond79.not, label %for.cond.cleanup5, label %for.body10.lr.ph, !llvm.loop !11 for.cond.cleanup5.thread: ; preds = %for.cond3.preheader, %entry %arrayidx2889 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 1 %4 = load i32, ptr %arrayidx2889, align 4, !tbaa !5 %conv90 = sitofp i32 %4 to double br label %for.cond.cleanup33 for.cond.cleanup5: ; preds = %for.cond3.loopexit %arrayidx28 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 1 %5 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %conv = sitofp i32 %5 to double %cmp31.not64 = icmp slt i32 %2, 2 br i1 %cmp31.not64, label %for.cond.cleanup33, label %for.body34.preheader for.body34.preheader: ; preds = %for.cond.cleanup5 %6 = add nsw i64 %wide.trip.count, -2 %7 = add nsw i64 %wide.trip.count, -3 %xtraiter = and i64 %6, 3 %8 = icmp ult i64 %7, 3 br i1 %8, label %for.cond.cleanup33.loopexit.unr-lcssa, label %for.body34.preheader.new for.body34.preheader.new: ; preds = %for.body34.preheader %unroll_iter = and i64 %6, -4 br label %for.body34 for.body10.lr.ph: ; preds = %for.cond3.loopexit, %for.body6.preheader %indvars.iv75 = phi i64 [ 1, %for.body6.preheader ], [ %indvars.iv.next76, %for.cond3.loopexit ] %indvars.iv70 = phi i64 [ 2, %for.body6.preheader ], [ %indvars.iv.next71, %for.cond3.loopexit ] %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %arrayidx = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv75 br label %for.body10 for.body10: ; preds = %for.body10.lr.ph, %for.inc22 %indvars.iv72 = phi i64 [ %indvars.iv70, %for.body10.lr.ph ], [ %indvars.iv.next73, %for.inc22 ] %9 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx12 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv72 %10 = load i32, ptr %arrayidx12, align 4, !tbaa !5 %cmp13 = icmp sgt i32 %9, %10 br i1 %cmp13, label %do.body, label %for.inc22 do.body: ; preds = %for.body10 store i32 %10, ptr %arrayidx, align 4, !tbaa !5 store i32 %9, ptr %arrayidx12, align 4, !tbaa !5 br label %for.inc22 for.inc22: ; preds = %for.body10, %do.body %indvars.iv.next73 = add nuw nsw i64 %indvars.iv72, 1 %exitcond.not = icmp eq i64 %indvars.iv.next73, %wide.trip.count br i1 %exitcond.not, label %for.cond3.loopexit, label %for.body10, !llvm.loop !12 for.cond.cleanup33.loopexit.unr-lcssa: ; preds = %for.body34, %for.body34.preheader %div.lcssa.ph = phi double [ undef, %for.body34.preheader ], [ %div.3, %for.body34 ] %indvars.iv80.unr = phi i64 [ 2, %for.body34.preheader ], [ %indvars.iv.next81.3, %for.body34 ] %ans.065.unr = phi double [ %conv, %for.body34.preheader ], [ %div.3, %for.body34 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup33, label %for.body34.epil for.body34.epil: ; preds = %for.cond.cleanup33.loopexit.unr-lcssa, %for.body34.epil %indvars.iv80.epil = phi i64 [ %indvars.iv.next81.epil, %for.body34.epil ], [ %indvars.iv80.unr, %for.cond.cleanup33.loopexit.unr-lcssa ] %ans.065.epil = phi double [ %div.epil, %for.body34.epil ], [ %ans.065.unr, %for.cond.cleanup33.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body34.epil ], [ 0, %for.cond.cleanup33.loopexit.unr-lcssa ] %arrayidx36.epil = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv80.epil %11 = load i32, ptr %arrayidx36.epil, align 4, !tbaa !5 %conv37.epil = sitofp i32 %11 to double %add38.epil = fadd double %ans.065.epil, %conv37.epil %div.epil = fmul double %add38.epil, 5.000000e-01 %indvars.iv.next81.epil = add nuw nsw i64 %indvars.iv80.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup33, label %for.body34.epil, !llvm.loop !13 for.cond.cleanup33: ; preds = %for.cond.cleanup33.loopexit.unr-lcssa, %for.body34.epil, %for.cond.cleanup5.thread, %for.cond.cleanup5 %ans.0.lcssa = phi double [ %conv, %for.cond.cleanup5 ], [ %conv90, %for.cond.cleanup5.thread ], [ %div.lcssa.ph, %for.cond.cleanup33.loopexit.unr-lcssa ], [ %div.epil, %for.body34.epil ] %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 220, ptr nonnull %v) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 for.body34: ; preds = %for.body34, %for.body34.preheader.new %indvars.iv80 = phi i64 [ 2, %for.body34.preheader.new ], [ %indvars.iv.next81.3, %for.body34 ] %ans.065 = phi double [ %conv, %for.body34.preheader.new ], [ %div.3, %for.body34 ] %niter = phi i64 [ 0, %for.body34.preheader.new ], [ %niter.next.3, %for.body34 ] %arrayidx36 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv80 %12 = load i32, ptr %arrayidx36, align 8, !tbaa !5 %conv37 = sitofp i32 %12 to double %add38 = fadd double %ans.065, %conv37 %div = fmul double %add38, 5.000000e-01 %indvars.iv.next81 = or i64 %indvars.iv80, 1 %arrayidx36.1 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv.next81 %13 = load i32, ptr %arrayidx36.1, align 4, !tbaa !5 %conv37.1 = sitofp i32 %13 to double %add38.1 = fadd double %div, %conv37.1 %div.1 = fmul double %add38.1, 5.000000e-01 %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80, 2 %arrayidx36.2 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv.next81.1 %14 = load i32, ptr %arrayidx36.2, align 8, !tbaa !5 %conv37.2 = sitofp i32 %14 to double %add38.2 = fadd double %div.1, %conv37.2 %div.2 = fmul double %add38.2, 5.000000e-01 %indvars.iv.next81.2 = add nuw nsw i64 %indvars.iv80, 3 %arrayidx36.3 = getelementptr inbounds [55 x i32], ptr %v, i64 0, i64 %indvars.iv.next81.2 %15 = load i32, ptr %arrayidx36.3, align 4, !tbaa !5 %conv37.3 = sitofp i32 %15 to double %add38.3 = fadd double %div.2, %conv37.3 %div.3 = fmul double %add38.3, 5.000000e-01 %indvars.iv.next81.3 = add nuw nsw i64 %indvars.iv80, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup33.loopexit.unr-lcssa, label %for.body34, !llvm.loop !15 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.unroll.disable"} !15 = distinct !{!15, !10}
#include <stdio.h> #include <stdlib.h> int main() { int a,b,c,p[6],i,l; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); p[0]=a+b*c; p[1]=a*(b+c); p[2]=a*b*c; p[3]=(a+b)*c; p[4]=(a*b)+c; p[5]=a+b+c; l=p[0]; for(i=0;i<6;i++) { if(p[i]>=l) l=p[i]; } printf("%d\n",l); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %2 = load i32, ptr %c, align 4, !tbaa !5 %mul = mul nsw i32 %2, %1 %add = add nsw i32 %mul, %0 %add3 = add nsw i32 %2, %1 %mul4 = mul nsw i32 %add3, %0 %mul6 = mul nsw i32 %1, %0 %mul7 = mul nsw i32 %mul6, %2 %add9 = add nsw i32 %1, %0 %mul10 = mul nsw i32 %add9, %2 %add13 = add nsw i32 %mul6, %2 %add16 = add nsw i32 %add9, %2 %spec.select.1 = call i32 @llvm.smax.i32(i32 %mul4, i32 %add) %spec.select.2 = call i32 @llvm.smax.i32(i32 %mul7, i32 %spec.select.1) %spec.select.3 = call i32 @llvm.smax.i32(i32 %mul10, i32 %spec.select.2) %spec.select.4 = call i32 @llvm.smax.i32(i32 %add13, i32 %spec.select.3) %spec.select.5 = call i32 @llvm.smax.i32(i32 %add16, i32 %spec.select.4) %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %spec.select.5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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"}
//#define _CRT_SECURE_NO_WARNINGS = false //#include <stdlib.h>; #include <stdio.h>; //#include "Main.h" void bubbleSort1(int arr[], int len) // { int temp; int i, j; for (i = 0; i < len - 1; i++) {/* 外循环为排序趟数,len个数进行len-1趟 */ for (j = 0; j < len - 1 - i; j++) { /* 内循环为每趟比较的次数,第i趟比较len-i次 */ if (arr[j] > arr[j + 1]) { /* 相邻元素比较,若逆序则交换(升序为左大于右,降序反之) */ temp = arr[j]; arr[j] = arr[j + 1]; arr[j + 1] = temp; } } } } int main(void) { // Your code here! int n; int a[1000]; double ans ; scanf("%d", &n); for (int i = 0; i<n; i++) { scanf("%d", &a[i]); } bubbleSort1(a ,n); ans = (double)a[0]; //printf("%d", ans); for (int i = 0; i<n; i++) { ans = (ans + (double)a[i]) / 2.0; //printf("%f", ans); //printf("%d ", a[i]); } printf("%f", ans); //system("pause"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138041/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138041/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @bubbleSort1(ptr nocapture noundef %arr, i32 noundef %len) local_unnamed_addr #0 { entry: %sub = add i32 %len, -1 %cmp40 = icmp sgt i32 %len, 1 br i1 %cmp40, label %for.cond1.preheader.preheader, label %for.end21 for.cond1.preheader.preheader: ; preds = %entry %invariant.gep = getelementptr i32, ptr %arr, i64 1 br label %for.cond1.preheader for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc19 %indvars.iv43 = phi i32 [ %indvars.iv.next44, %for.inc19 ], [ %sub, %for.cond1.preheader.preheader ] %i.041 = phi i32 [ %inc20, %for.inc19 ], [ 0, %for.cond1.preheader.preheader ] %0 = zext i32 %indvars.iv43 to i64 %cmp438 = icmp sgt i32 %sub, %i.041 br i1 %cmp438, label %for.body5.preheader, label %for.inc19 for.body5.preheader: ; preds = %for.cond1.preheader %.pre = load i32, ptr %arr, align 4, !tbaa !5 %xtraiter = and i64 %0, 1 %1 = icmp eq i32 %indvars.iv43, 1 br i1 %1, label %for.inc19.loopexit.unr-lcssa, label %for.body5.preheader.new for.body5.preheader.new: ; preds = %for.body5.preheader %unroll_iter = and i64 %0, 4294967294 br label %for.body5 for.body5: ; preds = %for.inc.1, %for.body5.preheader.new %2 = phi i32 [ %.pre, %for.body5.preheader.new ], [ %6, %for.inc.1 ] %indvars.iv = phi i64 [ 0, %for.body5.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %niter = phi i64 [ 0, %for.body5.preheader.new ], [ %niter.next.1, %for.inc.1 ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx7 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.next %3 = load i32, ptr %arrayidx7, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %2, %3 br i1 %cmp8, label %if.then, label %for.inc if.then: ; preds = %for.body5 %arrayidx = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv store i32 %3, ptr %arrayidx, align 4, !tbaa !5 store i32 %2, ptr %arrayidx7, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body5, %if.then %4 = phi i32 [ %3, %for.body5 ], [ %2, %if.then ] %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %arrayidx7.1 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.next.1 %5 = load i32, ptr %arrayidx7.1, align 4, !tbaa !5 %cmp8.1 = icmp sgt i32 %4, %5 br i1 %cmp8.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %arrayidx.1 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.next store i32 %5, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %4, ptr %arrayidx7.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %6 = phi i32 [ %5, %for.inc ], [ %4, %if.then.1 ] %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.inc19.loopexit.unr-lcssa, label %for.body5, !llvm.loop !9 for.inc19.loopexit.unr-lcssa: ; preds = %for.inc.1, %for.body5.preheader %.unr = phi i32 [ %.pre, %for.body5.preheader ], [ %6, %for.inc.1 ] %indvars.iv.unr = phi i64 [ 0, %for.body5.preheader ], [ %indvars.iv.next.1, %for.inc.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.inc19, label %for.body5.epil for.body5.epil: ; preds = %for.inc19.loopexit.unr-lcssa %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.unr %7 = load i32, ptr %gep, align 4, !tbaa !5 %cmp8.epil = icmp sgt i32 %.unr, %7 br i1 %cmp8.epil, label %if.then.epil, label %for.inc19 if.then.epil: ; preds = %for.body5.epil %arrayidx.epil = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.unr store i32 %7, ptr %arrayidx.epil, align 4, !tbaa !5 store i32 %.unr, ptr %gep, align 4, !tbaa !5 br label %for.inc19 for.inc19: ; preds = %for.inc19.loopexit.unr-lcssa, %if.then.epil, %for.body5.epil, %for.cond1.preheader %inc20 = add nuw nsw i32 %i.041, 1 %indvars.iv.next44 = add i32 %indvars.iv43, -1 %exitcond45.not = icmp eq i32 %inc20, %sub br i1 %exitcond45.not, label %for.end21, label %for.cond1.preheader, !llvm.loop !11 for.end21: ; preds = %for.inc19, %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: %n = alloca i32, align 4 %a = alloca [1000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4000, 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 %cmp21 = icmp sgt i32 %0, 0 br i1 %cmp21, label %for.body, label %bubbleSort1.exit.thread bubbleSort1.exit.thread: ; preds = %entry %1 = load i32, ptr %a, align 16, !tbaa !5 %conv37 = sitofp i32 %1 to double br label %for.cond.cleanup7 for.cond.cleanup: ; preds = %for.body %sub.i = add i32 %12, -1 %cmp40.i = icmp sgt i32 %12, 1 br i1 %cmp40.i, label %for.cond1.preheader.i.preheader, label %bubbleSort1.exit for.cond1.preheader.i.preheader: ; preds = %for.cond.cleanup %invariant.gep = getelementptr i32, ptr %a, i64 1 br label %for.cond1.preheader.i for.cond1.preheader.i: ; preds = %for.cond1.preheader.i.preheader, %for.inc19.i %indvars.iv43.i = phi i32 [ %indvars.iv.next44.i, %for.inc19.i ], [ %sub.i, %for.cond1.preheader.i.preheader ] %i.041.i = phi i32 [ %inc20.i, %for.inc19.i ], [ 0, %for.cond1.preheader.i.preheader ] %2 = zext i32 %indvars.iv43.i to i64 %cmp438.i = icmp sgt i32 %sub.i, %i.041.i br i1 %cmp438.i, label %for.body5.preheader.i, label %for.inc19.i for.body5.preheader.i: ; preds = %for.cond1.preheader.i %.pre.i = load i32, ptr %a, align 16, !tbaa !5 %xtraiter = and i64 %2, 1 %3 = icmp eq i32 %indvars.iv43.i, 1 br i1 %3, label %for.inc19.i.loopexit.unr-lcssa, label %for.body5.preheader.i.new for.body5.preheader.i.new: ; preds = %for.body5.preheader.i %unroll_iter = and i64 %2, 4294967294 br label %for.body5.i for.body5.i: ; preds = %for.inc.i.1, %for.body5.preheader.i.new %4 = phi i32 [ %.pre.i, %for.body5.preheader.i.new ], [ %8, %for.inc.i.1 ] %indvars.iv.i = phi i64 [ 0, %for.body5.preheader.i.new ], [ %indvars.iv.next.i.1, %for.inc.i.1 ] %niter = phi i64 [ 0, %for.body5.preheader.i.new ], [ %niter.next.1, %for.inc.i.1 ] %indvars.iv.next.i = or i64 %indvars.iv.i, 1 %arrayidx7.i = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.i %5 = load i32, ptr %arrayidx7.i, align 4, !tbaa !5 %cmp8.i = icmp sgt i32 %4, %5 br i1 %cmp8.i, label %if.then.i, label %for.inc.i if.then.i: ; preds = %for.body5.i %arrayidx.i = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.i store i32 %5, ptr %arrayidx.i, align 8, !tbaa !5 store i32 %4, ptr %arrayidx7.i, align 4, !tbaa !5 br label %for.inc.i for.inc.i: ; preds = %if.then.i, %for.body5.i %6 = phi i32 [ %5, %for.body5.i ], [ %4, %if.then.i ] %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %arrayidx7.i.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.i.1 %7 = load i32, ptr %arrayidx7.i.1, align 8, !tbaa !5 %cmp8.i.1 = icmp sgt i32 %6, %7 br i1 %cmp8.i.1, label %if.then.i.1, label %for.inc.i.1 if.then.i.1: ; preds = %for.inc.i %arrayidx.i.1 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.next.i store i32 %7, ptr %arrayidx.i.1, align 4, !tbaa !5 store i32 %6, ptr %arrayidx7.i.1, align 8, !tbaa !5 br label %for.inc.i.1 for.inc.i.1: ; preds = %if.then.i.1, %for.inc.i %8 = phi i32 [ %7, %for.inc.i ], [ %6, %if.then.i.1 ] %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.inc19.i.loopexit.unr-lcssa, label %for.body5.i, !llvm.loop !9 for.inc19.i.loopexit.unr-lcssa: ; preds = %for.inc.i.1, %for.body5.preheader.i %.unr = phi i32 [ %.pre.i, %for.body5.preheader.i ], [ %8, %for.inc.i.1 ] %indvars.iv.i.unr = phi i64 [ 0, %for.body5.preheader.i ], [ %indvars.iv.next.i.1, %for.inc.i.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.inc19.i, label %for.body5.i.epil for.body5.i.epil: ; preds = %for.inc19.i.loopexit.unr-lcssa %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.i.unr %9 = load i32, ptr %gep, align 4, !tbaa !5 %cmp8.i.epil = icmp sgt i32 %.unr, %9 br i1 %cmp8.i.epil, label %if.then.i.epil, label %for.inc19.i if.then.i.epil: ; preds = %for.body5.i.epil %arrayidx.i.epil = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.i.unr store i32 %9, ptr %arrayidx.i.epil, align 4, !tbaa !5 store i32 %.unr, ptr %gep, align 4, !tbaa !5 br label %for.inc19.i for.inc19.i: ; preds = %for.inc19.i.loopexit.unr-lcssa, %if.then.i.epil, %for.body5.i.epil, %for.cond1.preheader.i %inc20.i = add nuw nsw i32 %i.041.i, 1 %indvars.iv.next44.i = add i32 %indvars.iv43.i, -1 %exitcond45.not.i = icmp eq i32 %inc20.i, %sub.i br i1 %exitcond45.not.i, label %bubbleSort1.exit, label %for.cond1.preheader.i, !llvm.loop !11 bubbleSort1.exit: ; preds = %for.inc19.i, %for.cond.cleanup %10 = load i32, ptr %a, align 16, !tbaa !5 %conv = sitofp i32 %10 to double %cmp523 = icmp sgt i32 %12, 0 br i1 %cmp523, label %for.body8.preheader, label %for.cond.cleanup7 for.body8.preheader: ; preds = %bubbleSort1.exit %wide.trip.count = zext i32 %12 to i64 %xtraiter39 = and i64 %wide.trip.count, 3 %11 = icmp ult i32 %12, 4 br i1 %11, label %for.cond.cleanup7.loopexit.unr-lcssa, label %for.body8.preheader.new for.body8.preheader.new: ; preds = %for.body8.preheader %unroll_iter42 = and i64 %wide.trip.count, 4294967292 br label %for.body8 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %12 = load i32, ptr %n, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp = icmp slt i64 %indvars.iv.next, %13 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !12 for.cond.cleanup7.loopexit.unr-lcssa: ; preds = %for.body8, %for.body8.preheader %div.lcssa.ph = phi double [ undef, %for.body8.preheader ], [ %div.3, %for.body8 ] %indvars.iv29.unr = phi i64 [ 0, %for.body8.preheader ], [ %indvars.iv.next30.3, %for.body8 ] %ans.024.unr = phi double [ %conv, %for.body8.preheader ], [ %div.3, %for.body8 ] %lcmp.mod40.not = icmp eq i64 %xtraiter39, 0 br i1 %lcmp.mod40.not, label %for.cond.cleanup7, label %for.body8.epil for.body8.epil: ; preds = %for.cond.cleanup7.loopexit.unr-lcssa, %for.body8.epil %indvars.iv29.epil = phi i64 [ %indvars.iv.next30.epil, %for.body8.epil ], [ %indvars.iv29.unr, %for.cond.cleanup7.loopexit.unr-lcssa ] %ans.024.epil = phi double [ %div.epil, %for.body8.epil ], [ %ans.024.unr, %for.cond.cleanup7.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body8.epil ], [ 0, %for.cond.cleanup7.loopexit.unr-lcssa ] %arrayidx10.epil = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv29.epil %14 = load i32, ptr %arrayidx10.epil, align 4, !tbaa !5 %conv11.epil = sitofp i32 %14 to double %add.epil = fadd double %ans.024.epil, %conv11.epil %div.epil = fmul double %add.epil, 5.000000e-01 %indvars.iv.next30.epil = add nuw nsw i64 %indvars.iv29.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter39 br i1 %epil.iter.cmp.not, label %for.cond.cleanup7, label %for.body8.epil, !llvm.loop !13 for.cond.cleanup7: ; preds = %for.cond.cleanup7.loopexit.unr-lcssa, %for.body8.epil, %bubbleSort1.exit.thread, %bubbleSort1.exit %ans.0.lcssa = phi double [ %conv, %bubbleSort1.exit ], [ %conv37, %bubbleSort1.exit.thread ], [ %div.lcssa.ph, %for.cond.cleanup7.loopexit.unr-lcssa ], [ %div.epil, %for.body8.epil ] %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body8: ; preds = %for.body8, %for.body8.preheader.new %indvars.iv29 = phi i64 [ 0, %for.body8.preheader.new ], [ %indvars.iv.next30.3, %for.body8 ] %ans.024 = phi double [ %conv, %for.body8.preheader.new ], [ %div.3, %for.body8 ] %niter43 = phi i64 [ 0, %for.body8.preheader.new ], [ %niter43.next.3, %for.body8 ] %arrayidx10 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv29 %15 = load i32, ptr %arrayidx10, align 16, !tbaa !5 %conv11 = sitofp i32 %15 to double %add = fadd double %ans.024, %conv11 %div = fmul double %add, 5.000000e-01 %indvars.iv.next30 = or i64 %indvars.iv29, 1 %arrayidx10.1 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv.next30 %16 = load i32, ptr %arrayidx10.1, align 4, !tbaa !5 %conv11.1 = sitofp i32 %16 to double %add.1 = fadd double %div, %conv11.1 %div.1 = fmul double %add.1, 5.000000e-01 %indvars.iv.next30.1 = or i64 %indvars.iv29, 2 %arrayidx10.2 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv.next30.1 %17 = load i32, ptr %arrayidx10.2, align 8, !tbaa !5 %conv11.2 = sitofp i32 %17 to double %add.2 = fadd double %div.1, %conv11.2 %div.2 = fmul double %add.2, 5.000000e-01 %indvars.iv.next30.2 = or i64 %indvars.iv29, 3 %arrayidx10.3 = getelementptr inbounds [1000 x i32], ptr %a, i64 0, i64 %indvars.iv.next30.2 %18 = load i32, ptr %arrayidx10.3, align 4, !tbaa !5 %conv11.3 = sitofp i32 %18 to double %add.3 = fadd double %div.2, %conv11.3 %div.3 = fmul double %add.3, 5.000000e-01 %indvars.iv.next30.3 = add nuw nsw i64 %indvars.iv29, 4 %niter43.next.3 = add i64 %niter43, 4 %niter43.ncmp.3 = icmp eq i64 %niter43.next.3, %unroll_iter42 br i1 %niter43.ncmp.3, label %for.cond.cleanup7.loopexit.unr-lcssa, label %for.body8, !llvm.loop !15 } ; 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 = distinct !{!12, !10} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.unroll.disable"} !15 = distinct !{!15, !10}
#include <stdio.h> #include <stdlib.h> int compare(const void*a,const void *b){ if(*(int *)a>*(int *)b)return 1; return -1; } int main() { int n; scanf("%d",&n); int v[n]; for(int i=0;i<n;i++) scanf("%d",&v[i]); qsort(v,n,sizeof(int),compare); double ans=v[0]; for(int i=1;i<n;i++){ ans=(ans+(float)v[i])/2; } printf("%lf",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_138085/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_138085/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 %. = 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) #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 %cmp23 = icmp sgt i32 %3, 0 br i1 %cmp23, label %for.body, label %entry.for.cond.cleanup_crit_edge entry.for.cond.cleanup_crit_edge: ; preds = %entry %.pre = sext i32 %3 to i64 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry.for.cond.cleanup_crit_edge %conv.pre-phi = phi i64 [ %.pre, %entry.for.cond.cleanup_crit_edge ], [ %10, %for.body ] call void @qsort(ptr noundef nonnull %vla, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @compare) #6 %4 = load i32, ptr %vla, align 16, !tbaa !5 %conv3 = sitofp i32 %4 to double %5 = load i32, ptr %n, align 4, !tbaa !5 %cmp625 = icmp sgt i32 %5, 1 br i1 %cmp625, label %for.body9.preheader, label %for.cond.cleanup8 for.body9.preheader: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %5 to i64 %6 = add nsw i64 %wide.trip.count, -1 %7 = add nsw i64 %wide.trip.count, -2 %xtraiter = and i64 %6, 3 %8 = icmp ult i64 %7, 3 br i1 %8, label %for.cond.cleanup8.loopexit.unr-lcssa, label %for.body9.preheader.new for.body9.preheader.new: ; preds = %for.body9.preheader %unroll_iter = and i64 %6, -4 %invariant.gep = getelementptr i32, ptr %vla, i64 1 %invariant.gep35 = getelementptr i32, ptr %vla, i64 2 %invariant.gep37 = getelementptr i32, ptr %vla, i64 3 br label %for.body9 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 %9 = load i32, ptr %n, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp = icmp slt i64 %indvars.iv.next, %10 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 for.cond.cleanup8.loopexit.unr-lcssa: ; preds = %for.body9, %for.body9.preheader %div.lcssa.ph = phi double [ undef, %for.body9.preheader ], [ %div.3, %for.body9 ] %indvars.iv31.unr = phi i64 [ 1, %for.body9.preheader ], [ %indvars.iv.next32.3, %for.body9 ] %ans.026.unr = phi double [ %conv3, %for.body9.preheader ], [ %div.3, %for.body9 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup8, label %for.body9.epil for.body9.epil: ; preds = %for.cond.cleanup8.loopexit.unr-lcssa, %for.body9.epil %indvars.iv31.epil = phi i64 [ %indvars.iv.next32.epil, %for.body9.epil ], [ %indvars.iv31.unr, %for.cond.cleanup8.loopexit.unr-lcssa ] %ans.026.epil = phi double [ %div.epil, %for.body9.epil ], [ %ans.026.unr, %for.cond.cleanup8.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body9.epil ], [ 0, %for.cond.cleanup8.loopexit.unr-lcssa ] %arrayidx11.epil = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv31.epil %11 = load i32, ptr %arrayidx11.epil, align 4, !tbaa !5 %conv12.epil = sitofp i32 %11 to float %conv13.epil = fpext float %conv12.epil to double %add.epil = fadd double %ans.026.epil, %conv13.epil %div.epil = fmul double %add.epil, 5.000000e-01 %indvars.iv.next32.epil = add nuw nsw i64 %indvars.iv31.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup8, label %for.body9.epil, !llvm.loop !11 for.cond.cleanup8: ; preds = %for.cond.cleanup8.loopexit.unr-lcssa, %for.body9.epil, %for.cond.cleanup %ans.0.lcssa = phi double [ %conv3, %for.cond.cleanup ], [ %div.lcssa.ph, %for.cond.cleanup8.loopexit.unr-lcssa ], [ %div.epil, %for.body9.epil ] %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %ans.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 for.body9: ; preds = %for.body9, %for.body9.preheader.new %indvars.iv31 = phi i64 [ 1, %for.body9.preheader.new ], [ %indvars.iv.next32.3, %for.body9 ] %ans.026 = phi double [ %conv3, %for.body9.preheader.new ], [ %div.3, %for.body9 ] %niter = phi i64 [ 0, %for.body9.preheader.new ], [ %niter.next.3, %for.body9 ] %arrayidx11 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv31 %12 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %conv12 = sitofp i32 %12 to float %conv13 = fpext float %conv12 to double %add = fadd double %ans.026, %conv13 %div = fmul double %add, 5.000000e-01 %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv31 %13 = load i32, ptr %gep, align 4, !tbaa !5 %conv12.1 = sitofp i32 %13 to float %conv13.1 = fpext float %conv12.1 to double %add.1 = fadd double %div, %conv13.1 %div.1 = fmul double %add.1, 5.000000e-01 %gep36 = getelementptr i32, ptr %invariant.gep35, i64 %indvars.iv31 %14 = load i32, ptr %gep36, align 4, !tbaa !5 %conv12.2 = sitofp i32 %14 to float %conv13.2 = fpext float %conv12.2 to double %add.2 = fadd double %div.1, %conv13.2 %div.2 = fmul double %add.2, 5.000000e-01 %gep38 = getelementptr i32, ptr %invariant.gep37, i64 %indvars.iv31 %15 = load i32, ptr %gep38, align 4, !tbaa !5 %conv12.3 = sitofp i32 %15 to float %conv13.3 = fpext float %conv12.3 to double %add.3 = fadd double %div.2, %conv13.3 %div.3 = fmul double %add.3, 5.000000e-01 %indvars.iv.next32.3 = add nuw nsw i64 %indvars.iv31, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup8.loopexit.unr-lcssa, label %for.body9, !llvm.loop !13 } ; 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 declare ptr @llvm.stacksave.p0() #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #4 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.unroll.disable"} !13 = distinct !{!13, !10}