Datasets:

Modalities:
Text
Formats:
parquet
Tags:
code
DOI:
Libraries:
Datasets
Dask
License:
Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int A[102]; char C(int v) { int t; char r; for (t = 2; t * t <= v; t++) { if (v % t == 0) { break; } } if (t * t <= v) { r = 1; } else { r = 0; } return r; } int main() { int i; int T; int t; int n; int c; int V; scanf("%d", &T); while (T--) { scanf("%d", &n); for (i = 1; i <= n; i++) { scanf("%d", &A[i]); } V = 0; for (i = 1; i <= n; i++) { V += A[i]; } if (C(V)) { printf("%d\n", n); for (t = 1; t <= n; t++) { printf("%d ", t); } printf("\n"); } else { c = 0; for (t = 1; t <= n; t++) { if (A[t] & 1) { c++; } } printf("%d\n", n - 1); for (t = 1; t <= n; t++) { if (c <= 1) { break; } if (A[t] & 1) { printf("%d ", t); c--; } } for (t = 1; t <= n; t++) { if (A[t] % 2 == 0) { printf("%d ", t); } } printf("\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_0/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_0/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @A = dso_local global [102 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local signext i8 @C(i32 noundef %v) local_unnamed_addr #0 { entry: %cmp.not13 = icmp sgt i32 %v, 3 br i1 %cmp.not13, label %for.body, label %for.end for.cond: ; preds = %for.body %inc = add nuw nsw i32 %t.014, 1 %mul = mul nsw i32 %inc, %inc %cmp.not.not = icmp sgt i32 %mul, %v br i1 %cmp.not.not, label %for.end.loopexit, label %for.body, !llvm.loop !5 for.body: ; preds = %entry, %for.cond %t.014 = phi i32 [ %inc, %for.cond ], [ 2, %entry ] %rem = srem i32 %v, %t.014 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %for.end.loopexit, label %for.cond for.end.loopexit: ; preds = %for.body, %for.cond %0 = zext i1 %cmp1 to i8 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %cmp.not.lcssa = phi i8 [ 0, %entry ], [ %0, %for.end.loopexit ] ret i8 %cmp.not.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %T = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %T) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !7 %dec106 = add nsw i32 %0, -1 store i32 %dec106, ptr %T, align 4, !tbaa !7 %tobool.not107 = icmp eq i32 %0, 0 br i1 %tobool.not107, label %while.end, label %while.body while.body: ; preds = %entry, %if.end64 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !7 %cmp.not87 = icmp slt i32 %1, 1 br i1 %cmp.not87, label %for.end32, label %for.body for.cond3.preheader: ; preds = %for.body %cmp4.not89 = icmp slt i32 %10, 1 br i1 %cmp4.not89, label %for.end32, label %for.body5.preheader for.body5.preheader: ; preds = %for.cond3.preheader %2 = add nuw i32 %10, 1 %wide.trip.count = zext i32 %2 to i64 %3 = add nsw i64 %wide.trip.count, -1 %min.iters.check154 = icmp ult i32 %10, 8 br i1 %min.iters.check154, label %for.body5.preheader173, label %vector.ph155 vector.ph155: ; preds = %for.body5.preheader %n.vec157 = and i64 %3, -8 %ind.end158 = or i64 %n.vec157, 1 br label %vector.body161 vector.body161: ; preds = %vector.body161, %vector.ph155 %index162 = phi i64 [ 0, %vector.ph155 ], [ %index.next168, %vector.body161 ] %vec.phi163 = phi <4 x i32> [ zeroinitializer, %vector.ph155 ], [ %6, %vector.body161 ] %vec.phi164 = phi <4 x i32> [ zeroinitializer, %vector.ph155 ], [ %7, %vector.body161 ] %offset.idx165 = or i64 %index162, 1 %4 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %offset.idx165 %wide.load166 = load <4 x i32>, ptr %4, align 4, !tbaa !7 %5 = getelementptr inbounds i32, ptr %4, i64 4 %wide.load167 = load <4 x i32>, ptr %5, align 4, !tbaa !7 %6 = add <4 x i32> %wide.load166, %vec.phi163 %7 = add <4 x i32> %wide.load167, %vec.phi164 %index.next168 = add nuw i64 %index162, 8 %8 = icmp eq i64 %index.next168, %n.vec157 br i1 %8, label %middle.block152, label %vector.body161, !llvm.loop !11 middle.block152: ; preds = %vector.body161 %bin.rdx169 = add <4 x i32> %7, %6 %9 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx169) %cmp.n160 = icmp eq i64 %3, %n.vec157 br i1 %cmp.n160, label %for.end10, label %for.body5.preheader173 for.body5.preheader173: ; preds = %for.body5.preheader, %middle.block152 %indvars.iv110.ph = phi i64 [ 1, %for.body5.preheader ], [ %ind.end158, %middle.block152 ] %V.091.ph = phi i32 [ 0, %for.body5.preheader ], [ %9, %middle.block152 ] br label %for.body5 for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %while.body ] %arrayidx = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %n, align 4, !tbaa !7 %11 = sext i32 %10 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %11 br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !14 for.body5: ; preds = %for.body5.preheader173, %for.body5 %indvars.iv110 = phi i64 [ %indvars.iv.next111, %for.body5 ], [ %indvars.iv110.ph, %for.body5.preheader173 ] %V.091 = phi i32 [ %add, %for.body5 ], [ %V.091.ph, %for.body5.preheader173 ] %arrayidx7 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %indvars.iv110 %12 = load i32, ptr %arrayidx7, align 4, !tbaa !7 %add = add nsw i32 %12, %V.091 %indvars.iv.next111 = add nuw nsw i64 %indvars.iv110, 1 %exitcond.not = icmp eq i64 %indvars.iv.next111, %wide.trip.count br i1 %exitcond.not, label %for.end10, label %for.body5, !llvm.loop !15 for.end10: ; preds = %for.body5, %middle.block152 %add.lcssa = phi i32 [ %9, %middle.block152 ], [ %add, %for.body5 ] %cmp.not13.i = icmp sgt i32 %add.lcssa, 3 br i1 %cmp.not13.i, label %for.body.i, label %C.exit.thread for.cond.i: ; preds = %for.body.i %inc.i = add nuw nsw i32 %t.014.i, 1 %mul.i = mul nsw i32 %inc.i, %inc.i %cmp.not.not.i = icmp sgt i32 %mul.i, %add.lcssa br i1 %cmp.not.not.i, label %for.cond22.preheader, label %for.body.i, !llvm.loop !5 for.body.i: ; preds = %for.end10, %for.cond.i %t.014.i = phi i32 [ %inc.i, %for.cond.i ], [ 2, %for.end10 ] %rem.i = srem i32 %add.lcssa, %t.014.i %cmp1.i = icmp eq i32 %rem.i, 0 br i1 %cmp1.i, label %if.then, label %for.cond.i C.exit.thread: ; preds = %for.end10 br i1 %cmp4.not89, label %for.end32, label %for.body24.preheader for.cond22.preheader: ; preds = %for.cond.i br i1 %cmp4.not89, label %for.end32, label %for.body24.preheader for.body24.preheader: ; preds = %C.exit.thread, %for.cond22.preheader %13 = add i32 %10, 1 %wide.trip.count116 = zext i32 %13 to i64 %14 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %10, 8 br i1 %min.iters.check, label %for.body24.preheader172, label %vector.ph vector.ph: ; preds = %for.body24.preheader %n.vec = and i64 %14, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %19, %vector.body ] %vec.phi150 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %20, %vector.body ] %offset.idx = or i64 %index, 1 %15 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %15, align 4, !tbaa !7 %16 = getelementptr inbounds i32, ptr %15, i64 4 %wide.load151 = load <4 x i32>, ptr %16, align 4, !tbaa !7 %17 = and <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1> %18 = and <4 x i32> %wide.load151, <i32 1, i32 1, i32 1, i32 1> %19 = add <4 x i32> %17, %vec.phi %20 = add <4 x i32> %18, %vec.phi150 %index.next = add nuw i64 %index, 8 %21 = icmp eq i64 %index.next, %n.vec br i1 %21, label %middle.block, label %vector.body, !llvm.loop !16 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %20, %19 %22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %14, %n.vec br i1 %cmp.n, label %for.end32, label %for.body24.preheader172 for.body24.preheader172: ; preds = %for.body24.preheader, %middle.block %indvars.iv113.ph = phi i64 [ 1, %for.body24.preheader ], [ %ind.end, %middle.block ] %c.097.ph = phi i32 [ 0, %for.body24.preheader ], [ %22, %middle.block ] br label %for.body24 if.then: ; preds = %for.body.i %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %10) %23 = load i32, ptr %n, align 4, !tbaa !7 %cmp15.not93 = icmp slt i32 %23, 1 br i1 %cmp15.not93, label %if.end64, label %for.body16 for.body16: ; preds = %if.then, %for.body16 %t.094 = phi i32 [ %inc19, %for.body16 ], [ 1, %if.then ] %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %t.094) %inc19 = add nuw nsw i32 %t.094, 1 %24 = load i32, ptr %n, align 4, !tbaa !7 %cmp15.not.not = icmp slt i32 %t.094, %24 br i1 %cmp15.not.not, label %for.body16, label %if.end64, !llvm.loop !17 for.body24: ; preds = %for.body24.preheader172, %for.body24 %indvars.iv113 = phi i64 [ %indvars.iv.next114, %for.body24 ], [ %indvars.iv113.ph, %for.body24.preheader172 ] %c.097 = phi i32 [ %spec.select, %for.body24 ], [ %c.097.ph, %for.body24.preheader172 ] %arrayidx26 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %indvars.iv113 %25 = load i32, ptr %arrayidx26, align 4, !tbaa !7 %and = and i32 %25, 1 %spec.select = add i32 %and, %c.097 %indvars.iv.next114 = add nuw nsw i64 %indvars.iv113, 1 %exitcond117.not = icmp eq i64 %indvars.iv.next114, %wide.trip.count116 br i1 %exitcond117.not, label %for.end32, label %for.body24, !llvm.loop !18 for.end32: ; preds = %for.body24, %middle.block, %while.body, %for.cond3.preheader, %C.exit.thread, %for.cond22.preheader %.lcssa127134139144 = phi i32 [ %10, %for.cond22.preheader ], [ %10, %C.exit.thread ], [ %1, %while.body ], [ %10, %for.cond3.preheader ], [ %10, %middle.block ], [ %10, %for.body24 ] %c.0.lcssa = phi i32 [ 0, %for.cond22.preheader ], [ 0, %C.exit.thread ], [ 0, %while.body ], [ 0, %for.cond3.preheader ], [ %22, %middle.block ], [ %spec.select, %for.body24 ] %sub = add nsw i32 %.lcssa127134139144, -1 %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) %26 = load i32, ptr %n, align 4, !tbaa !7 %cmp3599 = icmp slt i32 %26, 1 %cmp37100 = icmp slt i32 %c.0.lcssa, 2 %or.cond101 = select i1 %cmp3599, i1 true, i1 %cmp37100 br i1 %or.cond101, label %for.cond51.preheader, label %if.end39 for.cond51.preheader: ; preds = %for.inc48, %for.end32 %27 = phi i32 [ %26, %for.end32 ], [ %31, %for.inc48 ] %cmp52.not104 = icmp slt i32 %27, 1 br i1 %cmp52.not104, label %if.end64, label %for.body53 if.end39: ; preds = %for.end32, %for.inc48 %28 = phi i32 [ %31, %for.inc48 ], [ %26, %for.end32 ] %indvars.iv118 = phi i64 [ %indvars.iv.next119, %for.inc48 ], [ 1, %for.end32 ] %c.2103 = phi i32 [ %c.3, %for.inc48 ], [ %c.0.lcssa, %for.end32 ] %arrayidx41 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %indvars.iv118 %29 = load i32, ptr %arrayidx41, align 4, !tbaa !7 %and42 = and i32 %29, 1 %tobool43.not = icmp eq i32 %and42, 0 br i1 %tobool43.not, label %for.inc48, label %if.then44 if.then44: ; preds = %if.end39 %30 = trunc i64 %indvars.iv118 to i32 %call45 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %30) %dec46 = add nsw i32 %c.2103, -1 %.pre = load i32, ptr %n, align 4, !tbaa !7 br label %for.inc48 for.inc48: ; preds = %if.end39, %if.then44 %31 = phi i32 [ %.pre, %if.then44 ], [ %28, %if.end39 ] %c.3 = phi i32 [ %dec46, %if.then44 ], [ %c.2103, %if.end39 ] %indvars.iv.next119 = add nuw nsw i64 %indvars.iv118, 1 %32 = sext i32 %31 to i64 %cmp35 = icmp sge i64 %indvars.iv118, %32 %cmp37 = icmp slt i32 %c.3, 2 %or.cond = select i1 %cmp35, i1 true, i1 %cmp37 br i1 %or.cond, label %for.cond51.preheader, label %if.end39, !llvm.loop !19 for.body53: ; preds = %for.cond51.preheader, %for.inc60 %33 = phi i32 [ %37, %for.inc60 ], [ %27, %for.cond51.preheader ] %indvars.iv121 = phi i64 [ %indvars.iv.next122, %for.inc60 ], [ 1, %for.cond51.preheader ] %arrayidx55 = getelementptr inbounds [102 x i32], ptr @A, i64 0, i64 %indvars.iv121 %34 = load i32, ptr %arrayidx55, align 4, !tbaa !7 %35 = and i32 %34, 1 %cmp56 = icmp eq i32 %35, 0 br i1 %cmp56, label %if.then57, label %for.inc60 if.then57: ; preds = %for.body53 %36 = trunc i64 %indvars.iv121 to i32 %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %36) %.pre124 = load i32, ptr %n, align 4, !tbaa !7 br label %for.inc60 for.inc60: ; preds = %for.body53, %if.then57 %37 = phi i32 [ %33, %for.body53 ], [ %.pre124, %if.then57 ] %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1 %38 = sext i32 %37 to i64 %cmp52.not.not = icmp slt i64 %indvars.iv121, %38 br i1 %cmp52.not.not, label %for.body53, label %if.end64, !llvm.loop !20 if.end64: ; preds = %for.body16, %for.inc60, %for.cond51.preheader, %if.then %putchar = call i32 @putchar(i32 10) %39 = load i32, ptr %T, align 4, !tbaa !7 %dec = add nsw i32 %39, -1 store i32 %dec, ptr %T, align 4, !tbaa !7 %tobool.not = icmp eq i32 %39, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !21 while.end: ; preds = %if.end64, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { 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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!8, !8, i64 0} !8 = !{!"int", !9, i64 0} !9 = !{!"omnipotent char", !10, i64 0} !10 = !{!"Simple C/C++ TBAA"} !11 = distinct !{!11, !6, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !6} !15 = distinct !{!15, !6, !13, !12} !16 = distinct !{!16, !6, !12, !13} !17 = distinct !{!17, !6} !18 = distinct !{!18, !6, !13, !12} !19 = distinct !{!19, !6} !20 = distinct !{!20, !6} !21 = distinct !{!21, !6}
#define _CRT_SECURE_NO_WARNINGS #include<stdio.h> int main() { int i, j, k, ip; int h_array[300], w_array[300]; for (i = 0; i < 300; i++) { scanf("%d %d", &h_array[i], &w_array[i]); if (h_array[i] == 0 && w_array[i] == 0) { ip = i; break; } } for (k = 0; k < ip; k++) { for (i = 0; i < h_array[k]; i++) { for (j = 0; j < w_array[k]; j++) { if (i == 0 || i == (h_array[k]-1)) { printf("#"); } else if (j == 0 || j == (w_array[k]-1)) { printf("#"); } else { printf("."); } } printf("\n"); if (h_array[k] == 0 && w_array[k] == 0) { break; } } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100039/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100039/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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_array = alloca [300 x i32], align 16 %w_array = alloca [300 x i32], align 16 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %h_array) #4 call void @llvm.lifetime.start.p0(i64 1200, ptr nonnull %w_array) #4 br label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.inc ] %arrayidx = getelementptr inbounds [300 x i32], ptr %h_array, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [300 x i32], ptr %w_array, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp5 = icmp eq i32 %0, 0 br i1 %cmp5, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp8 = icmp eq i32 %1, 0 br i1 %cmp8, label %for.end, label %for.inc for.inc: ; preds = %for.body, %land.lhs.true %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 300 br i1 %exitcond.not, label %for.cond12.preheader.preheader, label %for.body, !llvm.loop !9 for.end: ; preds = %land.lhs.true %2 = and i64 %indvars.iv, 4294967295 %cmp1091.not = icmp eq i64 %2, 0 br i1 %cmp1091.not, label %for.end59, label %for.cond12.preheader.preheader for.cond12.preheader.preheader: ; preds = %for.inc, %for.end %i.0.lcssa102 = phi i64 [ %indvars.iv, %for.end ], [ 300, %for.inc ] %wide.trip.count = and i64 %i.0.lcssa102, 4294967295 br label %for.cond12.preheader for.cond12.preheader: ; preds = %for.cond12.preheader.preheader, %for.end55 %indvars.iv96 = phi i64 [ 0, %for.cond12.preheader.preheader ], [ %indvars.iv.next97, %for.end55 ] %arrayidx14 = getelementptr inbounds [300 x i32], ptr %h_array, i64 0, i64 %indvars.iv96 %3 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %cmp1588 = icmp sgt i32 %3, 0 br i1 %cmp1588, label %for.cond17.preheader.lr.ph, label %for.end55 for.cond17.preheader.lr.ph: ; preds = %for.cond12.preheader %arrayidx19 = getelementptr inbounds [300 x i32], ptr %w_array, i64 0, i64 %indvars.iv96 br label %for.cond17.preheader for.cond17.preheader: ; preds = %for.cond17.preheader.backedge, %for.cond17.preheader.lr.ph %i.189 = phi i32 [ 0, %for.cond17.preheader.lr.ph ], [ %i.189.be, %for.cond17.preheader.backedge ] %4 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp2085 = icmp sgt i32 %4, 0 br i1 %cmp2085, label %for.body21.lr.ph, label %for.end42 for.body21.lr.ph: ; preds = %for.cond17.preheader %cmp22 = icmp eq i32 %i.189, 0 br i1 %cmp22, label %for.body21.us, label %for.body21.preheader for.body21.preheader: ; preds = %for.body21.lr.ph %putchar83.peel = call i32 @putchar(i32 35) %5 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp20.peel = icmp sgt i32 %5, 1 br i1 %cmp20.peel, label %for.body21, label %for.end42 for.body21.us: ; preds = %for.body21.lr.ph, %for.body21.us %j.086.us = phi i32 [ %inc41.us, %for.body21.us ], [ 0, %for.body21.lr.ph ] %putchar83.us = call i32 @putchar(i32 35) %inc41.us = add nuw nsw i32 %j.086.us, 1 %6 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp20.us = icmp slt i32 %inc41.us, %6 br i1 %cmp20.us, label %for.body21.us, label %for.end42, !llvm.loop !11 for.body21: ; preds = %for.body21.preheader, %for.body21 %7 = phi i32 [ %10, %for.body21 ], [ %5, %for.body21.preheader ] %j.086 = phi i32 [ %inc41, %for.body21 ], [ 1, %for.body21.preheader ] %8 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %sub = add nsw i32 %8, -1 %cmp25 = icmp eq i32 %i.189, %sub %sub32 = add nsw i32 %7, -1 %cmp33 = icmp eq i32 %j.086, %sub32 %9 = select i1 %cmp25, i1 true, i1 %cmp33 %.sink = select i1 %9, i32 35, i32 46 %putchar83 = call i32 @putchar(i32 %.sink) %inc41 = add nuw nsw i32 %j.086, 1 %10 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp20 = icmp slt i32 %inc41, %10 br i1 %cmp20, label %for.body21, label %for.end42, !llvm.loop !12 for.end42: ; preds = %for.body21, %for.body21.us, %for.body21.preheader, %for.cond17.preheader %putchar = call i32 @putchar(i32 10) %11 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %cmp46 = icmp eq i32 %11, 0 br i1 %cmp46, label %land.lhs.true47, label %for.inc53 land.lhs.true47: ; preds = %for.end42 %12 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %cmp50 = icmp ne i32 %12, 0 %inc54 = add nuw nsw i32 %i.189, 1 %cmp15 = icmp slt i32 %inc54, %11 %or.cond = select i1 %cmp50, i1 %cmp15, i1 false br i1 %or.cond, label %for.cond17.preheader.backedge, label %for.end55 for.inc53: ; preds = %for.end42 %inc54.old = add nuw nsw i32 %i.189, 1 %cmp15.old = icmp slt i32 %inc54.old, %11 br i1 %cmp15.old, label %for.cond17.preheader.backedge, label %for.end55 for.cond17.preheader.backedge: ; preds = %for.inc53, %land.lhs.true47 %i.189.be = phi i32 [ %inc54.old, %for.inc53 ], [ %inc54, %land.lhs.true47 ] br label %for.cond17.preheader, !llvm.loop !14 for.end55: ; preds = %for.inc53, %land.lhs.true47, %for.cond12.preheader %putchar80 = call i32 @putchar(i32 10) %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1 %exitcond99.not = icmp eq i64 %indvars.iv.next97, %wide.trip.count br i1 %exitcond99.not, label %for.end59, label %for.cond12.preheader, !llvm.loop !15 for.end59: ; preds = %for.end55, %for.end call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %w_array) #4 call void @llvm.lifetime.end.p0(i64 1200, ptr nonnull %h_array) #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} !13 = !{!"llvm.loop.peeled.count", i32 1} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10}
#include<stdio.h> int main (void) { int H,W,i,j; while(1) { scanf("%d %d",&H,&W); if (H==0 && W==0) break; for(i=0;i<H;i++) { for(j=0;j<W;j++) { if(i==0||i==H-1||j==0||j==W-1) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100082/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100082/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call39 = 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 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end20 %2 = phi i32 [ %9, %for.end20 ], [ %0, %entry ] %cmp236 = icmp sgt i32 %2, 0 br i1 %cmp236, label %for.cond3.preheader, label %for.end20 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.037 = phi i32 [ %inc19, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp433 = icmp sgt i32 %3, 0 br i1 %cmp433, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %i.037, 0 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.034.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %putchar31.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.034.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %4 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %3, %for.body5.lr.ph ] %j.034 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %6 = load i32, ptr %H, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %cmp7 = icmp eq i32 %i.037, %sub %cmp9 = icmp eq i32 %j.034, 0 %or.cond22 = or i1 %cmp9, %cmp7 %sub11 = add nsw i32 %5, -1 %cmp12 = icmp eq i32 %j.034, %sub11 %or.cond32 = select i1 %or.cond22, i1 true, i1 %cmp12 %. = select i1 %or.cond32, i32 35, i32 46 %putchar31 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.034, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc19 = add nuw nsw i32 %i.037, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc19, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.end20, !llvm.loop !11 for.end20: ; 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) %9 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end20, %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=1,W=1; 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++) if(h == 0 || w == 0 || h == H-1 || w == W-1) printf("#"); else printf("."); printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100132/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100132/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 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 %call39 = 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 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end20 %2 = phi i32 [ %9, %for.end20 ], [ %0, %entry ] %cmp236 = icmp sgt i32 %2, 0 br i1 %cmp236, label %for.cond3.preheader, label %for.end20 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %h.037 = phi i32 [ %inc19, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp433 = icmp sgt i32 %3, 0 br i1 %cmp433, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %h.037, 0 br i1 %cmp6, label %for.body5.us, label %for.inc.peel for.inc.peel: ; preds = %for.body5.lr.ph %putchar31.peel = call i32 @putchar(i32 35) %.pre = load i32, ptr %W, align 4, !tbaa !5 %cmp4.peel = icmp sgt i32 %.pre, 1 br i1 %cmp4.peel, label %lor.lhs.false8, label %for.end for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %w.034.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %putchar31.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %w.034.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %4 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 lor.lhs.false8: ; preds = %for.inc.peel, %lor.lhs.false8 %5 = phi i32 [ %7, %lor.lhs.false8 ], [ %.pre, %for.inc.peel ] %w.034 = phi i32 [ %inc, %lor.lhs.false8 ], [ 1, %for.inc.peel ] %6 = load i32, ptr %H, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %cmp9 = icmp eq i32 %h.037, %sub %sub11 = add nsw i32 %5, -1 %cmp12 = icmp eq i32 %w.034, %sub11 %or.cond32 = select i1 %cmp9, i1 true, i1 %cmp12 %. = select i1 %or.cond32, i32 35, i32 46 %putchar31 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %w.034, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %lor.lhs.false8, label %for.end, !llvm.loop !11 for.end: ; preds = %lor.lhs.false8, %for.body5.us, %for.inc.peel, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc19 = add nuw nsw i32 %h.037, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc19, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.end20, !llvm.loop !13 for.end20: ; 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) %9 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end20, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10}
#include<stdio.h> int main(){ int H,W,a,b; while(1){ scanf("%d %d",&H,&W); if(H==0&&W==0) break; for(a=1;a<=H;a++){ for(b=1;b<=W;b++){ if(a==1||a==H||b==1||b==W){ printf("#"); } else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100183/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100183/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call38 = 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 %cmp39 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp140 = icmp eq i32 %1, 0 %or.cond41 = select i1 %cmp39, i1 %cmp140, i1 false br i1 %or.cond41, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end19 %2 = phi i32 [ %9, %for.end19 ], [ %0, %entry ] %cmp2.not35 = icmp slt i32 %2, 1 br i1 %cmp2.not35, label %for.end19, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %a.036 = phi i32 [ %inc18, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not32 = icmp slt i32 %3, 1 br i1 %cmp4.not32, label %for.end, label %for.body5.lr.ph for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %a.036, 1 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %b.033.us = phi i32 [ %inc.us, %for.body5.us ], [ 1, %for.body5.lr.ph ] %putchar30.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %b.033.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.us.not = icmp slt i32 %b.033.us, %4 br i1 %cmp4.not.us.not, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %3, %for.body5.lr.ph ] %b.033 = phi i32 [ %inc, %for.body5 ], [ 1, %for.body5.lr.ph ] %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp7 = icmp eq i32 %a.036, %6 %cmp9 = icmp eq i32 %b.033, 1 %or.cond21 = or i1 %cmp9, %cmp7 %cmp11 = icmp eq i32 %b.033, %5 %or.cond31 = or i1 %cmp11, %or.cond21 %. = select i1 %or.cond31, i32 35, i32 46 %putchar30 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %b.033, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %b.033, %7 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar28 = call i32 @putchar(i32 10) %inc18 = add nuw nsw i32 %a.036, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp2.not.not = icmp slt i32 %a.036, %8 br i1 %cmp2.not.not, label %for.cond3.preheader, label %for.end19, !llvm.loop !11 for.end19: ; 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) %9 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end19, %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> #include<string.h> //#include<iostream> //#include<algorithm> int main() { char str[1010],c1,c2; int A[100]={0}; //scanf("%s",str); int i=1,count1=0; while((c1=getchar())!='}') { //printf(" 14 %d %c\n",i,c1); if(c1>='a' && c1<='z') { // printf(" 16 %c\n",c1); A[c1-97]++; //printf(" 18 %c %d %d\n",c1,(c1-97),A[(c1-97)]); } } for(i=0;i<26;i++) { if(A[i]>0) count1++; } printf("%d",count1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %A = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %A) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %A, i8 0, i64 400, i1 false) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i26 = tail call i32 @getc(ptr noundef %0) %sext27 = shl i32 %call.i26, 24 %cmp.not29 = icmp eq i32 %sext27, 2097152000 br i1 %cmp.not29, label %for.cond.preheader, label %while.body for.cond.preheader.loopexit: ; preds = %if.end %arrayidx13.16.phi.trans.insert = getelementptr inbounds [100 x i32], ptr %A, i64 0, i64 16 %arrayidx13.20.phi.trans.insert = getelementptr inbounds [100 x i32], ptr %A, i64 0, i64 20 %.pre54 = load i32, ptr %arrayidx13.20.phi.trans.insert, align 16, !tbaa !9 %1 = load <16 x i32>, ptr %A, align 16, !tbaa !9 %2 = icmp sgt <16 x i32> %1, zeroinitializer %3 = load <4 x i32>, ptr %arrayidx13.16.phi.trans.insert, align 16, !tbaa !9 %4 = icmp sgt <4 x i32> %3, zeroinitializer %5 = icmp sgt i32 %.pre54, 0 %6 = zext i1 %5 to i32 %7 = bitcast <16 x i1> %2 to i16 %8 = tail call i16 @llvm.ctpop.i16(i16 %7), !range !11 %9 = zext i16 %8 to i32 %10 = bitcast <4 x i1> %4 to i4 %11 = tail call i4 @llvm.ctpop.i4(i4 %10), !range !12 %12 = zext i4 %11 to i32 %op.rdx = add nuw nsw i32 %9, %12 %op.rdx55 = add nuw nsw i32 %op.rdx, %6 br label %for.cond.preheader for.cond.preheader: ; preds = %for.cond.preheader.loopexit, %entry %spec.select.20 = phi i32 [ %op.rdx55, %for.cond.preheader.loopexit ], [ 0, %entry ] %arrayidx13.21 = getelementptr inbounds [100 x i32], ptr %A, i64 0, i64 21 %13 = load <4 x i32>, ptr %arrayidx13.21, align 4, !tbaa !9 %14 = icmp sgt <4 x i32> %13, zeroinitializer %arrayidx13.25 = getelementptr inbounds [100 x i32], ptr %A, i64 0, i64 25 %15 = load i32, ptr %arrayidx13.25, align 4, !tbaa !9 %cmp14.25 = icmp sgt i32 %15, 0 %inc17.25 = zext i1 %cmp14.25 to i32 %16 = bitcast <4 x i1> %14 to i4 %17 = tail call i4 @llvm.ctpop.i4(i4 %16), !range !12 %18 = zext i4 %17 to i32 %op.rdx56 = add nuw nsw i32 %18, %inc17.25 %op.rdx57 = add nsw i32 %op.rdx56, %spec.select.20 %call20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %op.rdx57) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %A) #5 ret i32 0 while.body: ; preds = %entry, %if.end %sext30 = phi i32 [ %sext, %if.end ], [ %sext27, %entry ] %19 = add i32 %sext30, -1610612737 %or.cond = icmp ult i32 %19, 452984831 br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %while.body %conv131 = lshr exact i32 %sext30, 24 %sub = add nsw i32 %conv131, -97 %idxprom = zext i32 %sub to i64 %arrayidx = getelementptr inbounds [100 x i32], ptr %A, i64 0, i64 %idxprom %20 = load i32, ptr %arrayidx, align 4, !tbaa !9 %inc = add nsw i32 %20, 1 store i32 %inc, ptr %arrayidx, align 4, !tbaa !9 br label %if.end if.end: ; preds = %if.then, %while.body %21 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %21) %sext = shl i32 %call.i, 24 %cmp.not = icmp eq i32 %sext, 2097152000 br i1 %cmp.not, label %for.cond.preheader.loopexit, label %while.body, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i16 @llvm.ctpop.i16(i16) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i4 @llvm.ctpop.i4(i4) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { 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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = !{i16 0, i16 17} !12 = !{i4 0, i4 5} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int H,W,a,b; while(1){ scanf("%d %d",&H,&W); if(H==0&&W==0){ break; } for(a=1;a<W;a++){ printf("#"); } printf("#\n"); for(b=2;b<H;b++){ printf("#"); for(a=2;a<W;a++){ printf("."); } printf("#\n"); } for(a=1;a<W;a++){ printf("#"); } printf("#\n\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.5 = private unnamed_addr constant [3 x i8] c"#\0A\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"#\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %call47 = 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 %cmp48 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp149 = icmp eq i32 %1, 0 %or.cond50 = select i1 %cmp48, i1 %cmp149, i1 false br i1 %or.cond50, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end26 %2 = phi i32 [ %11, %for.end26 ], [ %1, %entry ] %cmp239 = icmp sgt i32 %2, 1 br i1 %cmp239, label %for.body, label %for.end for.body: ; preds = %for.cond.preheader, %for.body %a.040 = phi i32 [ %inc, %for.body ], [ 1, %for.cond.preheader ] %putchar38 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %a.040, 1 %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %3 br i1 %cmp2, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %for.cond.preheader %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %4 = load i32, ptr %H, align 4, !tbaa !5 %cmp643 = icmp sgt i32 %4, 2 br i1 %cmp643, label %for.body7, label %for.cond20.preheader for.cond20.preheader: ; preds = %for.end15, %for.end %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp2145 = icmp sgt i32 %5, 1 br i1 %cmp2145, label %for.body22, label %for.end26 for.body7: ; preds = %for.end, %for.end15 %b.044 = phi i32 [ %inc18, %for.end15 ], [ 2, %for.end ] %putchar35 = call i32 @putchar(i32 35) %6 = load i32, ptr %W, align 4, !tbaa !5 %cmp1041 = icmp sgt i32 %6, 2 br i1 %cmp1041, label %for.body11, label %for.end15 for.body11: ; preds = %for.body7, %for.body11 %a.142 = phi i32 [ %inc14, %for.body11 ], [ 2, %for.body7 ] %putchar37 = call i32 @putchar(i32 46) %inc14 = add nuw nsw i32 %a.142, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc14, %7 br i1 %cmp10, label %for.body11, label %for.end15, !llvm.loop !11 for.end15: ; preds = %for.body11, %for.body7 %puts36 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %inc18 = add nuw nsw i32 %b.044, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc18, %8 br i1 %cmp6, label %for.body7, label %for.cond20.preheader, !llvm.loop !12 for.body22: ; preds = %for.cond20.preheader, %for.body22 %a.246 = phi i32 [ %inc25, %for.body22 ], [ 1, %for.cond20.preheader ] %putchar = call i32 @putchar(i32 35) %inc25 = add nuw nsw i32 %a.246, 1 %9 = load i32, ptr %W, align 4, !tbaa !5 %cmp21 = icmp slt i32 %inc25, %9 br i1 %cmp21, label %for.body22, label %for.end26, !llvm.loop !13 for.end26: ; preds = %for.body22, %for.cond20.preheader %puts34 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %10 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %10, 0 %11 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %11, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end26, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main( void ) { int H, W, H_Cou, W_Cou; while(1) { scanf( "%d %d", &H, &W ); if( H == 0 && W == 0 ) { break; } else { for( H_Cou = 0; H_Cou < H; H_Cou++ ) { if( H_Cou == 0 || H_Cou == H - 1 ) { for( W_Cou = 0; W_Cou < W; W_Cou++ ) { printf( "#" ); } } else { for( W_Cou = 0; W_Cou < W; W_Cou++ ) { if( W_Cou == 0 || W_Cou == W - 1 ) { printf( "#" ); } else { printf( "." ); } } } printf( "\n" ); } printf( "\n" ); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100363/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100363/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %H = alloca i32, align 4 %W = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 %call54 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp55 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp156 = icmp eq i32 %1, 0 %or.cond57 = select i1 %cmp55, i1 %cmp156, i1 false br i1 %or.cond57, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end29 %2 = phi i32 [ %9, %for.end29 ], [ %0, %entry ] %cmp252 = icmp sgt i32 %2, 0 br i1 %cmp252, label %for.body, label %for.end29 for.body: ; preds = %for.cond.preheader, %if.end25 %3 = phi i32 [ %8, %if.end25 ], [ %2, %for.cond.preheader ] %H_Cou.053 = phi i32 [ %inc28, %if.end25 ], [ 0, %for.cond.preheader ] %cmp3 = icmp eq i32 %H_Cou.053, 0 %sub = add nsw i32 %3, -1 %cmp4 = icmp eq i32 %H_Cou.053, %sub %or.cond45 = select i1 %cmp3, i1 true, i1 %cmp4 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp750 = icmp sgt i32 %4, 0 br i1 %or.cond45, label %for.cond6.preheader, label %for.cond11.preheader for.cond11.preheader: ; preds = %for.body br i1 %cmp750, label %for.inc22.peel, label %if.end25 for.inc22.peel: ; preds = %for.cond11.preheader %putchar42.peel = call i32 @putchar(i32 35) %.pre = load i32, ptr %W, align 4, !tbaa !5 %cmp12.peel = icmp sgt i32 %.pre, 1 br i1 %cmp12.peel, label %for.body13, label %if.end25 for.cond6.preheader: ; preds = %for.body br i1 %cmp750, label %for.body8, label %if.end25 for.body8: ; preds = %for.cond6.preheader, %for.body8 %W_Cou.051 = phi i32 [ %inc, %for.body8 ], [ 0, %for.cond6.preheader ] %putchar44 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %W_Cou.051, 1 %5 = load i32, ptr %W, align 4, !tbaa !5 %cmp7 = icmp slt i32 %inc, %5 br i1 %cmp7, label %for.body8, label %if.end25, !llvm.loop !9 for.body13: ; preds = %for.inc22.peel, %for.body13 %6 = phi i32 [ %7, %for.body13 ], [ %.pre, %for.inc22.peel ] %W_Cou.149 = phi i32 [ %inc23, %for.body13 ], [ 1, %for.inc22.peel ] %sub16 = add nsw i32 %6, -1 %cmp17 = icmp eq i32 %W_Cou.149, %sub16 %. = select i1 %cmp17, i32 35, i32 46 %putchar42 = call i32 @putchar(i32 %.) %inc23 = add nuw nsw i32 %W_Cou.149, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc23, %7 br i1 %cmp12, label %for.body13, label %if.end25, !llvm.loop !11 if.end25: ; preds = %for.body13, %for.body8, %for.inc22.peel, %for.cond11.preheader, %for.cond6.preheader %putchar43 = call i32 @putchar(i32 10) %inc28 = add nuw nsw i32 %H_Cou.053, 1 %8 = load i32, ptr %H, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc28, %8 br i1 %cmp2, label %for.body, label %for.end29, !llvm.loop !13 for.end29: ; preds = %if.end25, %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) %9 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end29, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10}
#include <stdio.h> int main(void) { int i,j,h,w; while(1){ scanf("%d %d",&h,&w); if(h==0 && w==0) break; else if(h>2 && w>2){ for(j=0;j<w;j++) printf("#"); printf("\n"); for(i=0;i<(h-2);i++){ printf("#"); for(j=0;j<(w-2);j++){ printf("."); } printf("#\n"); } for(j=0;j<w;j++) printf("#"); printf("\n\n"); } else{ 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_100406/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100406/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [2 x i8] c"\0A\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"#\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %call83 = 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 %cmp84 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp185 = icmp eq i32 %1, 0 %or.cond86 = select i1 %cmp84, i1 %cmp185, i1 false br i1 %or.cond86, label %while.end, label %if.else if.else: ; preds = %entry, %if.end49 %2 = phi i32 [ %15, %if.end49 ], [ %1, %entry ] %3 = phi i32 [ %14, %if.end49 ], [ %0, %entry ] %cmp2 = icmp sgt i32 %3, 2 %cmp4 = icmp sgt i32 %2, 2 %or.cond50 = select i1 %cmp2, i1 %cmp4, i1 false br i1 %or.cond50, label %for.body, label %for.cond34.preheader for.cond34.preheader: ; preds = %if.else %cmp3571 = icmp sgt i32 %3, 0 br i1 %cmp3571, label %for.cond37.preheader, label %for.end47 for.body: ; preds = %if.else, %for.body %j.074 = phi i32 [ %inc, %for.body ], [ 0, %if.else ] %putchar68 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %j.074, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp6 = icmp slt i32 %inc, %4 br i1 %cmp6, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body %putchar63 = call i32 @putchar(i32 10) %5 = load i32, ptr %h, align 4, !tbaa !5 %cmp1079 = icmp sgt i32 %5, 2 br i1 %cmp1079, label %for.body11, label %for.cond25.preheader for.cond25.preheader: ; preds = %for.end20, %for.end %6 = load i32, ptr %w, align 4, !tbaa !5 %cmp2681 = icmp sgt i32 %6, 0 br i1 %cmp2681, label %for.body27, label %for.end31 for.body11: ; preds = %for.end, %for.end20 %i.080 = phi i32 [ %inc23, %for.end20 ], [ 0, %for.end ] %putchar65 = call i32 @putchar(i32 35) %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp1576 = icmp sgt i32 %7, 2 br i1 %cmp1576, label %for.body16, label %for.end20 for.body16: ; preds = %for.body11, %for.body16 %j.177 = phi i32 [ %inc19, %for.body16 ], [ 0, %for.body11 ] %putchar67 = call i32 @putchar(i32 46) %inc19 = add nuw nsw i32 %j.177, 1 %8 = load i32, ptr %w, align 4, !tbaa !5 %sub14 = add nsw i32 %8, -2 %cmp15 = icmp slt i32 %inc19, %sub14 br i1 %cmp15, label %for.body16, label %for.end20, !llvm.loop !11 for.end20: ; preds = %for.body16, %for.body11 %puts66 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %inc23 = add nuw nsw i32 %i.080, 1 %9 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %9, -2 %cmp10 = icmp slt i32 %inc23, %sub br i1 %cmp10, label %for.body11, label %for.cond25.preheader, !llvm.loop !12 for.body27: ; preds = %for.cond25.preheader, %for.body27 %j.282 = phi i32 [ %inc30, %for.body27 ], [ 0, %for.cond25.preheader ] %putchar64 = call i32 @putchar(i32 35) %inc30 = add nuw nsw i32 %j.282, 1 %10 = load i32, ptr %w, align 4, !tbaa !5 %cmp26 = icmp slt i32 %inc30, %10 br i1 %cmp26, label %for.body27, label %for.end31, !llvm.loop !13 for.end31: ; preds = %for.body27, %for.cond25.preheader %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end49 for.cond37.preheader: ; preds = %for.cond34.preheader, %for.end43 %i.172 = phi i32 [ %inc46, %for.end43 ], [ 0, %for.cond34.preheader ] %11 = load i32, ptr %w, align 4, !tbaa !5 %cmp3869 = icmp sgt i32 %11, 0 br i1 %cmp3869, label %for.body39, label %for.end43 for.body39: ; preds = %for.cond37.preheader, %for.body39 %j.370 = phi i32 [ %inc42, %for.body39 ], [ 0, %for.cond37.preheader ] %putchar62 = call i32 @putchar(i32 35) %inc42 = add nuw nsw i32 %j.370, 1 %12 = load i32, ptr %w, align 4, !tbaa !5 %cmp38 = icmp slt i32 %inc42, %12 br i1 %cmp38, label %for.body39, label %for.end43, !llvm.loop !14 for.end43: ; preds = %for.body39, %for.cond37.preheader %putchar61 = call i32 @putchar(i32 10) %inc46 = add nuw nsw i32 %i.172, 1 %13 = load i32, ptr %h, align 4, !tbaa !5 %cmp35 = icmp slt i32 %inc46, %13 br i1 %cmp35, label %for.cond37.preheader, label %for.end47, !llvm.loop !15 for.end47: ; preds = %for.end43, %for.cond34.preheader %putchar = call i32 @putchar(i32 10) br label %if.end49 if.end49: ; preds = %for.end31, %for.end47 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %14 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %14, 0 %15 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %15, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %if.else while.end: ; preds = %if.end49, %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 ; 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} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10}
#include <stdio.h> #include <string.h> char g[1001][1001]; int main() { int k,z,n=2,i,j,b3[30],len=0,from,prev,y; scanf("%d",&k); memset(g,'N',sizeof(g)); z=k; while(z) b3[len++]=z%3,z/=3; for(i=0;i<len;i++) if(b3[i]) { /* create path of length len with b3*3^i possibilities */ from=0; prev=1; for(j=0;j<i;j++) { for(z=0;z<prev;z++) for(y=0;y<3;y++) g[from+z][n+y]='Y'; from=n; prev=3; n+=3; } for(z=0;z<prev;z++) for(y=0;y<b3[i];y++) g[from+z][n+y]='Y'; from=n; prev=b3[i]; n+=b3[i]; for(;j<len-1;j++) { for(z=0;z<prev;z++) g[from+z][n]='Y'; from=n; n++; prev=1; } for(z=0;z<prev;z++) g[from+z][1]='Y'; } for(i=0;i<n;i++) for(j=0;j<n;j++) if(g[i][j]=='Y') g[j][i]='Y'; printf("%d\n",n); for(i=0;i<n;i++) { g[i][n]=0; puts(g[i]); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_10045/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_10045/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @g = dso_local global [1001 x [1001 x i8]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i32, align 4 %b3 = alloca [30 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.start.p0(i64 120, ptr nonnull %b3) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1002001) @g, i8 78, i64 1002001, i1 false) %0 = load i32, ptr %k, align 4, !tbaa !5 %tobool.not182 = icmp eq i32 %0, 0 br i1 %tobool.not182, label %for.cond85.preheader.us.preheader, label %while.body for.cond.preheader: ; preds = %while.body %1 = trunc i64 %indvars.iv.next to i32 %cmp211.not = icmp eq i32 %1, 0 br i1 %cmp211.not, label %for.cond85.preheader.us.preheader, label %for.body.lr.ph for.body.lr.ph: ; preds = %for.cond.preheader %sub = add i32 %1, -1 %2 = sext i32 %sub to i64 %wide.trip.count263 = and i64 %indvars.iv.next, 4294967295 br label %for.body while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %z.0183 = phi i32 [ %div, %while.body ], [ %0, %entry ] %rem = srem i32 %z.0183, 3 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [30 x i32], ptr %b3, i64 0, i64 %indvars.iv store i32 %rem, ptr %arrayidx, align 4, !tbaa !5 %div = sdiv i32 %z.0183, 3 %z.0183.off = add i32 %z.0183, 2 %tobool.not = icmp ult i32 %z.0183.off, 5 br i1 %tobool.not, label %for.cond.preheader, label %while.body, !llvm.loop !9 for.cond82.preheader: ; preds = %for.inc79 %cmp83218 = icmp sgt i32 %n.3, 0 br i1 %cmp83218, label %for.cond85.preheader.us.preheader, label %for.end105.thread for.end105.thread: ; preds = %for.cond82.preheader %call106297 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.3) br label %for.end120 for.cond85.preheader.us.preheader: ; preds = %entry, %for.cond.preheader, %for.cond82.preheader %n.0.lcssa285 = phi i32 [ %n.3, %for.cond82.preheader ], [ 2, %for.cond.preheader ], [ 2, %entry ] %wide.trip.count273 = zext i32 %n.0.lcssa285 to i64 %xtraiter304 = and i64 %wide.trip.count273, 1 %3 = icmp eq i32 %n.0.lcssa285, 1 %unroll_iter307 = and i64 %wide.trip.count273, 2147483646 %lcmp.mod306.not = icmp eq i64 %xtraiter304, 0 br label %for.cond85.preheader.us for.cond85.preheader.us: ; preds = %for.cond85.preheader.us.preheader, %for.cond85.for.inc103_crit_edge.us %indvars.iv270 = phi i64 [ 0, %for.cond85.preheader.us.preheader ], [ %indvars.iv.next271, %for.cond85.for.inc103_crit_edge.us ] br i1 %3, label %for.cond85.for.inc103_crit_edge.us.unr-lcssa, label %for.body87.us for.body87.us: ; preds = %for.cond85.preheader.us, %for.inc100.us.1 %indvars.iv265 = phi i64 [ %indvars.iv.next266.1, %for.inc100.us.1 ], [ 0, %for.cond85.preheader.us ] %niter308 = phi i64 [ %niter308.next.1, %for.inc100.us.1 ], [ 0, %for.cond85.preheader.us ] %arrayidx91.us = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv270, i64 %indvars.iv265 %4 = load i8, ptr %arrayidx91.us, align 1, !tbaa !11 %cmp92.us = icmp eq i8 %4, 89 br i1 %cmp92.us, label %if.then94.us, label %for.inc100.us if.then94.us: ; preds = %for.body87.us %arrayidx98.us = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv265, i64 %indvars.iv270 store i8 89, ptr %arrayidx98.us, align 1, !tbaa !11 br label %for.inc100.us for.inc100.us: ; preds = %if.then94.us, %for.body87.us %indvars.iv.next266 = or i64 %indvars.iv265, 1 %arrayidx91.us.1 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv270, i64 %indvars.iv.next266 %5 = load i8, ptr %arrayidx91.us.1, align 1, !tbaa !11 %cmp92.us.1 = icmp eq i8 %5, 89 br i1 %cmp92.us.1, label %if.then94.us.1, label %for.inc100.us.1 if.then94.us.1: ; preds = %for.inc100.us %arrayidx98.us.1 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv.next266, i64 %indvars.iv270 store i8 89, ptr %arrayidx98.us.1, align 1, !tbaa !11 br label %for.inc100.us.1 for.inc100.us.1: ; preds = %if.then94.us.1, %for.inc100.us %indvars.iv.next266.1 = add nuw nsw i64 %indvars.iv265, 2 %niter308.next.1 = add i64 %niter308, 2 %niter308.ncmp.1 = icmp eq i64 %niter308.next.1, %unroll_iter307 br i1 %niter308.ncmp.1, label %for.cond85.for.inc103_crit_edge.us.unr-lcssa, label %for.body87.us, !llvm.loop !12 for.cond85.for.inc103_crit_edge.us.unr-lcssa: ; preds = %for.inc100.us.1, %for.cond85.preheader.us %indvars.iv265.unr = phi i64 [ 0, %for.cond85.preheader.us ], [ %indvars.iv.next266.1, %for.inc100.us.1 ] br i1 %lcmp.mod306.not, label %for.cond85.for.inc103_crit_edge.us, label %for.body87.us.epil for.body87.us.epil: ; preds = %for.cond85.for.inc103_crit_edge.us.unr-lcssa %arrayidx91.us.epil = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv270, i64 %indvars.iv265.unr %6 = load i8, ptr %arrayidx91.us.epil, align 1, !tbaa !11 %cmp92.us.epil = icmp eq i8 %6, 89 br i1 %cmp92.us.epil, label %if.then94.us.epil, label %for.cond85.for.inc103_crit_edge.us if.then94.us.epil: ; preds = %for.body87.us.epil %arrayidx98.us.epil = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv265.unr, i64 %indvars.iv270 store i8 89, ptr %arrayidx98.us.epil, align 1, !tbaa !11 br label %for.cond85.for.inc103_crit_edge.us for.cond85.for.inc103_crit_edge.us: ; preds = %for.body87.us.epil, %if.then94.us.epil, %for.cond85.for.inc103_crit_edge.us.unr-lcssa %indvars.iv.next271 = add nuw nsw i64 %indvars.iv270, 1 %exitcond274.not = icmp eq i64 %indvars.iv.next271, %wide.trip.count273 br i1 %exitcond274.not, label %for.end105, label %for.cond85.preheader.us, !llvm.loop !13 for.body: ; preds = %for.body.lr.ph, %for.inc79 %indvars.iv260 = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next261, %for.inc79 ] %n.0212 = phi i32 [ 2, %for.body.lr.ph ], [ %n.3, %for.inc79 ] %arrayidx2 = getelementptr inbounds [30 x i32], ptr %b3, i64 0, i64 %indvars.iv260 %7 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %tobool3.not = icmp eq i32 %7, 0 br i1 %tobool3.not, label %for.inc79, label %for.cond4.preheader for.cond4.preheader: ; preds = %for.body %cmp5187.not = icmp eq i64 %indvars.iv260, 0 br i1 %cmp5187.not, label %for.cond26.preheader, label %for.cond7.preheader.preheader for.cond7.preheader.preheader: ; preds = %for.cond4.preheader %8 = sext i32 %n.0212 to i64 %invariant.gep = getelementptr i8, ptr @g, i64 %8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %invariant.gep, i8 89, i64 3, i1 false), !tbaa !11 %add22.peel = add nsw i32 %n.0212, 3 %exitcond233.not.peel = icmp eq i64 %indvars.iv260, 1 br i1 %exitcond233.not.peel, label %for.cond26.preheader, label %for.cond7.preheader for.cond26.preheader: ; preds = %for.cond7.preheader.preheader, %for.cond7.preheader, %for.cond4.preheader %n.1.lcssa = phi i32 [ %n.0212, %for.cond4.preheader ], [ %add22.peel, %for.cond7.preheader.preheader ], [ %add22, %for.cond7.preheader ] %from.0.lcssa = phi i32 [ 0, %for.cond4.preheader ], [ %n.0212, %for.cond7.preheader.preheader ], [ %n.1188, %for.cond7.preheader ] %cmp32196 = icmp sgt i32 %7, 0 br i1 %cmp32196, label %for.cond29.preheader.us.preheader, label %for.end45 for.cond29.preheader.us.preheader: ; preds = %for.cond26.preheader %9 = sext i32 %from.0.lcssa to i64 %10 = mul nsw i64 %9, 1001 %11 = sext i32 %n.1.lcssa to i64 %12 = zext i32 %7 to i64 %13 = getelementptr i8, ptr @g, i64 %10 %14 = getelementptr i8, ptr %13, i64 %11 call void @llvm.memset.p0.i64(ptr align 1 %14, i8 89, i64 %12, i1 false), !tbaa !11 br i1 %cmp5187.not, label %for.end45, label %for.cond29.preheader.us.1, !llvm.loop !14 for.cond29.preheader.us.1: ; preds = %for.cond29.preheader.us.preheader %scevgep236.1 = getelementptr i8, ptr %14, i64 1001 call void @llvm.memset.p0.i64(ptr align 1 %scevgep236.1, i8 89, i64 %12, i1 false), !tbaa !11 %scevgep236.2 = getelementptr i8, ptr %14, i64 2002 call void @llvm.memset.p0.i64(ptr align 1 %scevgep236.2, i8 89, i64 %12, i1 false), !tbaa !11 br label %for.end45 for.cond7.preheader: ; preds = %for.cond7.preheader.preheader, %for.cond7.preheader %indvar = phi i64 [ %indvar.next, %for.cond7.preheader ], [ 1, %for.cond7.preheader.preheader ] %from.0190 = phi i32 [ %n.1188, %for.cond7.preheader ], [ %n.0212, %for.cond7.preheader.preheader ] %n.1188 = phi i32 [ %add22, %for.cond7.preheader ], [ %add22.peel, %for.cond7.preheader.preheader ] %15 = mul nuw nsw i64 %indvar, 3 %16 = sext i32 %from.0190 to i64 %17 = mul nsw i64 %16, 1001 %gep = getelementptr i8, ptr %invariant.gep, i64 %15 %18 = getelementptr i8, ptr %gep, i64 %17 call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %18, i8 89, i64 3, i1 false), !tbaa !11 %scevgep.1 = getelementptr i8, ptr %18, i64 1001 call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %scevgep.1, i8 89, i64 3, i1 false), !tbaa !11 %scevgep.2 = getelementptr i8, ptr %18, i64 2002 call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(3) %scevgep.2, i8 89, i64 3, i1 false), !tbaa !11 %add22 = add nsw i32 %n.1188, 3 %indvar.next = add nuw nsw i64 %indvar, 1 %exitcond233.not = icmp eq i64 %indvar.next, %indvars.iv260 br i1 %exitcond233.not, label %for.cond26.preheader, label %for.cond7.preheader, !llvm.loop !15 for.end45: ; preds = %for.cond29.preheader.us.preheader, %for.cond29.preheader.us.1, %for.cond26.preheader %add50 = add i32 %n.1.lcssa, %7 %cmp52201 = icmp slt i64 %indvars.iv260, %2 br i1 %cmp52201, label %for.cond54.preheader.preheader, label %for.cond69.preheader for.cond54.preheader.preheader: ; preds = %for.end45 %19 = sext i32 %add50 to i64 %20 = trunc i64 %indvars.iv260 to i32 br label %for.cond54.preheader for.cond69.preheader.thread: ; preds = %for.end64 %21 = trunc i64 %indvars.iv.next251 to i32 br label %for.body71.preheader for.cond69.preheader: ; preds = %for.end45 %cmp70209 = icmp sgt i32 %7, 0 br i1 %cmp70209, label %for.body71.preheader, label %for.inc79 for.body71.preheader: ; preds = %for.cond69.preheader.thread, %for.cond69.preheader %prev.1.lcssa294 = phi i32 [ 1, %for.cond69.preheader.thread ], [ %7, %for.cond69.preheader ] %from.1.lcssa293 = phi i32 [ %31, %for.cond69.preheader.thread ], [ %n.1.lcssa, %for.cond69.preheader ] %n.2.lcssa292 = phi i32 [ %21, %for.cond69.preheader.thread ], [ %add50, %for.cond69.preheader ] %22 = sext i32 %from.1.lcssa293 to i64 %wide.trip.count258 = zext i32 %prev.1.lcssa294 to i64 %xtraiter299 = and i64 %wide.trip.count258, 3 %23 = icmp ult i32 %prev.1.lcssa294, 4 br i1 %23, label %for.inc79.loopexit.unr-lcssa, label %for.body71.preheader.new for.body71.preheader.new: ; preds = %for.body71.preheader %unroll_iter302 = and i64 %wide.trip.count258, 2147483644 br label %for.body71 for.cond54.preheader: ; preds = %for.cond54.preheader.preheader, %for.end64 %indvars.iv250 = phi i64 [ %19, %for.cond54.preheader.preheader ], [ %indvars.iv.next251, %for.end64 ] %prev.1205 = phi i32 [ %7, %for.cond54.preheader.preheader ], [ 1, %for.end64 ] %from.1204 = phi i32 [ %n.1.lcssa, %for.cond54.preheader.preheader ], [ %31, %for.end64 ] %j.1203 = phi i32 [ %20, %for.cond54.preheader.preheader ], [ %inc67, %for.end64 ] %cmp55199 = icmp sgt i32 %prev.1205, 0 br i1 %cmp55199, label %for.body56.lr.ph, label %for.end64 for.body56.lr.ph: ; preds = %for.cond54.preheader %24 = sext i32 %from.1204 to i64 %wide.trip.count248 = zext i32 %prev.1205 to i64 %xtraiter = and i64 %wide.trip.count248, 3 %25 = icmp ult i32 %prev.1205, 4 br i1 %25, label %for.end64.loopexit.unr-lcssa, label %for.body56.lr.ph.new for.body56.lr.ph.new: ; preds = %for.body56.lr.ph %unroll_iter = and i64 %wide.trip.count248, 4294967292 br label %for.body56 for.body56: ; preds = %for.body56, %for.body56.lr.ph.new %indvars.iv244 = phi i64 [ 0, %for.body56.lr.ph.new ], [ %indvars.iv.next245.3, %for.body56 ] %niter = phi i64 [ 0, %for.body56.lr.ph.new ], [ %niter.next.3, %for.body56 ] %26 = add nsw i64 %indvars.iv244, %24 %arrayidx61 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %26, i64 %indvars.iv250 store i8 89, ptr %arrayidx61, align 1, !tbaa !11 %indvars.iv.next245 = or i64 %indvars.iv244, 1 %27 = add nsw i64 %indvars.iv.next245, %24 %arrayidx61.1 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %27, i64 %indvars.iv250 store i8 89, ptr %arrayidx61.1, align 1, !tbaa !11 %indvars.iv.next245.1 = or i64 %indvars.iv244, 2 %28 = add nsw i64 %indvars.iv.next245.1, %24 %arrayidx61.2 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %28, i64 %indvars.iv250 store i8 89, ptr %arrayidx61.2, align 1, !tbaa !11 %indvars.iv.next245.2 = or i64 %indvars.iv244, 3 %29 = add nsw i64 %indvars.iv.next245.2, %24 %arrayidx61.3 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %29, i64 %indvars.iv250 store i8 89, ptr %arrayidx61.3, align 1, !tbaa !11 %indvars.iv.next245.3 = add nuw nsw i64 %indvars.iv244, 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.end64.loopexit.unr-lcssa, label %for.body56, !llvm.loop !17 for.end64.loopexit.unr-lcssa: ; preds = %for.body56, %for.body56.lr.ph %indvars.iv244.unr = phi i64 [ 0, %for.body56.lr.ph ], [ %indvars.iv.next245.3, %for.body56 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end64, label %for.body56.epil for.body56.epil: ; preds = %for.end64.loopexit.unr-lcssa, %for.body56.epil %indvars.iv244.epil = phi i64 [ %indvars.iv.next245.epil, %for.body56.epil ], [ %indvars.iv244.unr, %for.end64.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body56.epil ], [ 0, %for.end64.loopexit.unr-lcssa ] %30 = add nsw i64 %indvars.iv244.epil, %24 %arrayidx61.epil = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %30, i64 %indvars.iv250 store i8 89, ptr %arrayidx61.epil, align 1, !tbaa !11 %indvars.iv.next245.epil = add nuw nsw i64 %indvars.iv244.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.end64, label %for.body56.epil, !llvm.loop !18 for.end64: ; preds = %for.end64.loopexit.unr-lcssa, %for.body56.epil, %for.cond54.preheader %indvars.iv.next251 = add nsw i64 %indvars.iv250, 1 %inc67 = add nuw nsw i32 %j.1203, 1 %31 = trunc i64 %indvars.iv250 to i32 %exitcond253.not = icmp eq i32 %inc67, %sub br i1 %exitcond253.not, label %for.cond69.preheader.thread, label %for.cond54.preheader, !llvm.loop !20 for.body71: ; preds = %for.body71, %for.body71.preheader.new %indvars.iv254 = phi i64 [ 0, %for.body71.preheader.new ], [ %indvars.iv.next255.3, %for.body71 ] %niter303 = phi i64 [ 0, %for.body71.preheader.new ], [ %niter303.next.3, %for.body71 ] %32 = add nsw i64 %indvars.iv254, %22 %arrayidx75 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %32, i64 1 store i8 89, ptr %arrayidx75, align 1, !tbaa !11 %indvars.iv.next255 = or i64 %indvars.iv254, 1 %33 = add nsw i64 %indvars.iv.next255, %22 %arrayidx75.1 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %33, i64 1 store i8 89, ptr %arrayidx75.1, align 1, !tbaa !11 %indvars.iv.next255.1 = or i64 %indvars.iv254, 2 %34 = add nsw i64 %indvars.iv.next255.1, %22 %arrayidx75.2 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %34, i64 1 store i8 89, ptr %arrayidx75.2, align 1, !tbaa !11 %indvars.iv.next255.2 = or i64 %indvars.iv254, 3 %35 = add nsw i64 %indvars.iv.next255.2, %22 %arrayidx75.3 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %35, i64 1 store i8 89, ptr %arrayidx75.3, align 1, !tbaa !11 %indvars.iv.next255.3 = add nuw nsw i64 %indvars.iv254, 4 %niter303.next.3 = add i64 %niter303, 4 %niter303.ncmp.3 = icmp eq i64 %niter303.next.3, %unroll_iter302 br i1 %niter303.ncmp.3, label %for.inc79.loopexit.unr-lcssa, label %for.body71, !llvm.loop !21 for.inc79.loopexit.unr-lcssa: ; preds = %for.body71, %for.body71.preheader %indvars.iv254.unr = phi i64 [ 0, %for.body71.preheader ], [ %indvars.iv.next255.3, %for.body71 ] %lcmp.mod301.not = icmp eq i64 %xtraiter299, 0 br i1 %lcmp.mod301.not, label %for.inc79, label %for.body71.epil for.body71.epil: ; preds = %for.inc79.loopexit.unr-lcssa, %for.body71.epil %indvars.iv254.epil = phi i64 [ %indvars.iv.next255.epil, %for.body71.epil ], [ %indvars.iv254.unr, %for.inc79.loopexit.unr-lcssa ] %epil.iter300 = phi i64 [ %epil.iter300.next, %for.body71.epil ], [ 0, %for.inc79.loopexit.unr-lcssa ] %36 = add nsw i64 %indvars.iv254.epil, %22 %arrayidx75.epil = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %36, i64 1 store i8 89, ptr %arrayidx75.epil, align 1, !tbaa !11 %indvars.iv.next255.epil = add nuw nsw i64 %indvars.iv254.epil, 1 %epil.iter300.next = add i64 %epil.iter300, 1 %epil.iter300.cmp.not = icmp eq i64 %epil.iter300.next, %xtraiter299 br i1 %epil.iter300.cmp.not, label %for.inc79, label %for.body71.epil, !llvm.loop !22 for.inc79: ; preds = %for.inc79.loopexit.unr-lcssa, %for.body71.epil, %for.cond69.preheader, %for.body %n.3 = phi i32 [ %n.0212, %for.body ], [ %add50, %for.cond69.preheader ], [ %n.2.lcssa292, %for.body71.epil ], [ %n.2.lcssa292, %for.inc79.loopexit.unr-lcssa ] %indvars.iv.next261 = add nuw nsw i64 %indvars.iv260, 1 %exitcond264.not = icmp eq i64 %indvars.iv.next261, %wide.trip.count263 br i1 %exitcond264.not, label %for.cond82.preheader, label %for.body, !llvm.loop !23 for.end105: ; preds = %for.cond85.for.inc103_crit_edge.us %call106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %n.0.lcssa285) %idxprom113 = zext i32 %n.0.lcssa285 to i64 %wide.trip.count278 = zext i32 %n.0.lcssa285 to i64 br label %for.body110 for.body110: ; preds = %for.end105, %for.body110 %indvars.iv275 = phi i64 [ 0, %for.end105 ], [ %indvars.iv.next276, %for.body110 ] %arrayidx112 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv275 %arrayidx114 = getelementptr inbounds [1001 x [1001 x i8]], ptr @g, i64 0, i64 %indvars.iv275, i64 %idxprom113 store i8 0, ptr %arrayidx114, align 1, !tbaa !11 %call117 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %arrayidx112) %indvars.iv.next276 = add nuw nsw i64 %indvars.iv275, 1 %exitcond279.not = icmp eq i64 %indvars.iv.next276, %wide.trip.count278 br i1 %exitcond279.not, label %for.end120, label %for.body110, !llvm.loop !24 for.end120: ; preds = %for.body110, %for.end105.thread call void @llvm.lifetime.end.p0(i64 120, ptr nonnull %b3) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10, !16} !16 = !{!"llvm.loop.peeled.count", i32 1} !17 = distinct !{!17, !10} !18 = distinct !{!18, !19} !19 = !{!"llvm.loop.unroll.disable"} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10} !22 = distinct !{!22, !19} !23 = distinct !{!23, !10} !24 = distinct !{!24, !10}
#include <stdio.h> int main ( int argc, char *argv[ ] ) { int i, j; for ( ; ; ) { int h, w; scanf ( "%d%d", &h, &w ); if ( h == 0 && w == 0 ) break ; for ( i = 0; i < h; ++i ) { for ( j = 0; j < w; ++j ) { if ( i == 0 || i == h - 1 || j == 0 || j == w - 1 ) { putchar ( '#' ); } else { putchar ( '.' ); } } puts ( "" ); } puts ( "" ); } return ( 0 ); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100536/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100536/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(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) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3 %call47 = 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 %cmp48 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp149 = icmp eq i32 %1, 0 %or.cond50 = select i1 %cmp48, i1 %cmp149, i1 false br i1 %or.cond50, label %for.end24, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %cleanup %2 = phi i32 [ %13, %cleanup ], [ %0, %entry ] %cmp344 = icmp sgt i32 %2, 0 br i1 %cmp344, label %for.cond4.preheader, label %cleanup for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end %i.045 = phi i32 [ %inc20, %for.end ], [ 0, %for.cond2.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp541 = icmp sgt i32 %3, 0 br i1 %cmp541, label %for.body6.lr.ph, label %for.end for.body6.lr.ph: ; preds = %for.cond4.preheader %cmp7 = icmp eq i32 %i.045, 0 br i1 %cmp7, label %for.body6.us, label %for.body6 for.body6.us: ; preds = %for.body6.lr.ph, %for.body6.us %j.042.us = phi i32 [ %inc.us, %for.body6.us ], [ 0, %for.body6.lr.ph ] %4 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i.us = call noundef i32 @putc(i32 noundef 35, ptr noundef %4) %inc.us = add nuw nsw i32 %j.042.us, 1 %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp5.us = icmp slt i32 %inc.us, %5 br i1 %cmp5.us, label %for.body6.us, label %for.end, !llvm.loop !11 for.body6: ; preds = %for.body6.lr.ph, %for.body6 %6 = phi i32 [ %9, %for.body6 ], [ %3, %for.body6.lr.ph ] %j.042 = phi i32 [ %inc, %for.body6 ], [ 0, %for.body6.lr.ph ] %7 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %7, -1 %cmp8 = icmp eq i32 %i.045, %sub %cmp10 = icmp eq i32 %j.042, 0 %or.cond27 = or i1 %cmp10, %cmp8 %sub12 = add nsw i32 %6, -1 %cmp13 = icmp eq i32 %j.042, %sub12 %or.cond35 = select i1 %or.cond27, i1 true, i1 %cmp13 %8 = load ptr, ptr @stdout, align 8, !tbaa !9 %. = select i1 %or.cond35, i32 35, i32 46 %call.i = call noundef i32 @putc(i32 noundef %., ptr noundef %8) %inc = add nuw nsw i32 %j.042, 1 %9 = load i32, ptr %w, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %9 br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body6, %for.body6.us, %for.cond4.preheader %10 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i37 = call noundef i32 @putc(i32 noundef 10, ptr noundef %10) %inc20 = add nuw nsw i32 %i.045, 1 %11 = load i32, ptr %h, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc20, %11 br i1 %cmp3, label %for.cond4.preheader, label %cleanup, !llvm.loop !13 cleanup: ; preds = %for.end, %for.cond2.preheader %12 = load ptr, ptr @stdout, align 8, !tbaa !9 %call.i38 = call noundef i32 @putc(i32 noundef 10, ptr noundef %12) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %13 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %13, 0 %14 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %14, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end24, label %for.cond2.preheader for.end24: ; preds = %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() { int h,w; int i,j; while(1) { scanf("%d %d",&h,&w); if(h==0&&w==0) { break; } for(i=0;i<h;i++) { for(j=0;j<w;j++) { if(( i==0 )||( i==h-1 )||( j==0 )||( j==w-1 )) { printf("#"); } else { printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100587/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100587/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call39 = 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 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end20 %2 = phi i32 [ %9, %for.end20 ], [ %0, %entry ] %cmp236 = icmp sgt i32 %2, 0 br i1 %cmp236, label %for.cond3.preheader, label %for.end20 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.037 = phi i32 [ %inc19, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp433 = icmp sgt i32 %3, 0 br i1 %cmp433, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %i.037, 0 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.034.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %putchar31.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.034.us, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %4 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %3, %for.body5.lr.ph ] %j.034 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %6 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %cmp7 = icmp eq i32 %i.037, %sub %cmp9 = icmp eq i32 %j.034, 0 %or.cond22 = or i1 %cmp9, %cmp7 %sub11 = add nsw i32 %5, -1 %cmp12 = icmp eq i32 %j.034, %sub11 %or.cond32 = select i1 %or.cond22, i1 true, i1 %cmp12 %. = select i1 %or.cond32, i32 35, i32 46 %putchar31 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.034, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc19 = add nuw nsw i32 %i.037, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc19, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.end20, !llvm.loop !11 for.end20: ; 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) %9 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end20, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(){ int w,h; int i,j,k; while(1){ scanf("%d %d",&h,&w); if(h == 0 && w == 0) break; for(i = 0;i < w;i++){ printf("#"); } printf("\n"); for(i = 0;i < h - 2;i++){ printf("#"); for(j = 0;j < w - 2;j++){ printf("."); } printf("#\n"); } if(h - 1 > 0){ for(i = 0; i < w;i++){ printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100637/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100637/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [2 x i8] c"#\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 %call56 = 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 %cmp57 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp158 = icmp eq i32 %1, 0 %or.cond59 = select i1 %cmp57, i1 %cmp158, i1 false br i1 %or.cond59, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %if.end32 %2 = phi i32 [ %11, %if.end32 ], [ %1, %entry ] %cmp246 = icmp sgt i32 %2, 0 br i1 %cmp246, label %for.body, label %for.end for.body: ; preds = %for.cond.preheader, %for.body %i.047 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %putchar45 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %i.047, 1 %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc, %3 br i1 %cmp2, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp652 = icmp sgt i32 %4, 2 br i1 %cmp652, label %for.body7, label %for.end20 for.body7: ; preds = %for.end, %for.end16 %i.153 = phi i32 [ %inc19, %for.end16 ], [ 0, %for.end ] %putchar43 = call i32 @putchar(i32 35) %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp1149 = icmp sgt i32 %5, 2 br i1 %cmp1149, label %for.body12, label %for.end16 for.body12: ; preds = %for.body7, %for.body12 %j.050 = phi i32 [ %inc15, %for.body12 ], [ 0, %for.body7 ] %putchar44 = call i32 @putchar(i32 46) %inc15 = add nuw nsw i32 %j.050, 1 %6 = load i32, ptr %w, align 4, !tbaa !5 %sub10 = add nsw i32 %6, -2 %cmp11 = icmp slt i32 %inc15, %sub10 br i1 %cmp11, label %for.body12, label %for.end16, !llvm.loop !11 for.end16: ; preds = %for.body12, %for.body7 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %inc19 = add nuw nsw i32 %i.153, 1 %7 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %7, -2 %cmp6 = icmp slt i32 %inc19, %sub br i1 %cmp6, label %for.body7, label %for.end20, !llvm.loop !12 for.end20: ; preds = %for.end16, %for.end %.lcssa = phi i32 [ %4, %for.end ], [ %7, %for.end16 ] %cmp22 = icmp sgt i32 %.lcssa, 1 br i1 %cmp22, label %for.cond24.preheader, label %if.end32 for.cond24.preheader: ; preds = %for.end20 %8 = load i32, ptr %w, align 4, !tbaa !5 %cmp2554 = icmp sgt i32 %8, 0 br i1 %cmp2554, label %for.body26, label %for.end30 for.body26: ; preds = %for.cond24.preheader, %for.body26 %i.255 = phi i32 [ %inc29, %for.body26 ], [ 0, %for.cond24.preheader ] %putchar42 = call i32 @putchar(i32 35) %inc29 = add nuw nsw i32 %i.255, 1 %9 = load i32, ptr %w, align 4, !tbaa !5 %cmp25 = icmp slt i32 %inc29, %9 br i1 %cmp25, label %for.body26, label %for.end30, !llvm.loop !13 for.end30: ; preds = %for.body26, %for.cond24.preheader %putchar40 = call i32 @putchar(i32 10) br label %if.end32 if.end32: ; preds = %for.end30, %for.end20 %putchar41 = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %10 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %10, 0 %11 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %11, 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.end32, %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 ; 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} !13 = distinct !{!13, !10}
#include<stdio.h> int main(void){ int h,w,i,j,k; for(i = 0;;i++){ scanf("%d%d",&h,&w); if(h==0 && w==0)break; for(j = 0;j < h;j++){ for(k = 0;k < w;k++){ if(j == 0 || j == h-1) printf("#"); else if(k == 0 || k == w-1) printf("#"); else printf("."); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100695/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100695/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call46 = 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 %cmp47 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp148 = icmp eq i32 %1, 0 %or.cond49 = select i1 %cmp47, i1 %cmp148, i1 false br i1 %or.cond49, label %for.end28, label %for.cond2.preheader for.cond2.preheader: ; preds = %entry, %for.end24 %2 = phi i32 [ %11, %for.end24 ], [ %0, %entry ] %cmp343 = icmp sgt i32 %2, 0 br i1 %cmp343, label %for.cond4.preheader, label %for.end24 for.cond4.preheader: ; preds = %for.cond2.preheader, %for.end %j.044 = phi i32 [ %inc23, %for.end ], [ 0, %for.cond2.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp540 = icmp sgt i32 %3, 0 br i1 %cmp540, label %for.body6.lr.ph, label %for.end for.body6.lr.ph: ; preds = %for.cond4.preheader %cmp7 = icmp eq i32 %j.044, 0 br i1 %cmp7, label %for.body6.us, label %for.body6.preheader for.body6.preheader: ; preds = %for.body6.lr.ph %putchar38.peel = call i32 @putchar(i32 35) %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp5.peel = icmp sgt i32 %4, 1 br i1 %cmp5.peel, label %for.body6, label %for.end for.body6.us: ; preds = %for.body6.lr.ph, %for.body6.us %k.041.us = phi i32 [ %inc.us, %for.body6.us ], [ 0, %for.body6.lr.ph ] %putchar38.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %k.041.us, 1 %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp5.us = icmp slt i32 %inc.us, %5 br i1 %cmp5.us, label %for.body6.us, label %for.end, !llvm.loop !9 for.body6: ; preds = %for.body6.preheader, %for.body6 %6 = phi i32 [ %9, %for.body6 ], [ %4, %for.body6.preheader ] %k.041 = phi i32 [ %inc, %for.body6 ], [ 1, %for.body6.preheader ] %7 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %7, -1 %cmp8 = icmp eq i32 %j.044, %sub %sub13 = add nsw i32 %6, -1 %cmp14 = icmp eq i32 %k.041, %sub13 %8 = select i1 %cmp8, i1 true, i1 %cmp14 %.sink = select i1 %8, i32 35, i32 46 %putchar38 = call i32 @putchar(i32 %.sink) %inc = add nuw nsw i32 %k.041, 1 %9 = load i32, ptr %w, align 4, !tbaa !5 %cmp5 = icmp slt i32 %inc, %9 br i1 %cmp5, label %for.body6, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body6, %for.body6.us, %for.body6.preheader, %for.cond4.preheader %putchar35 = call i32 @putchar(i32 10) %inc23 = add nuw nsw i32 %j.044, 1 %10 = load i32, ptr %h, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc23, %10 br i1 %cmp3, label %for.cond4.preheader, label %for.end24, !llvm.loop !13 for.end24: ; preds = %for.end, %for.cond2.preheader %putchar = call i32 @putchar(i32 10) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %11 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %11, 0 %12 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %12, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %for.end28, label %for.cond2.preheader for.end28: ; preds = %for.end24, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10}
#include <stdio.h> void mid(int w) { int i; for (i=0; i<w; i++) { if (i == 0) { printf("#"); continue; } if (i == w-1) { printf("#\n"); continue; } printf("."); } } void draw(int h, int w) { int i, j; for (i=0; i<h; i++) { if (i == 0 || i == h-1) { for (j=0; j<w; j++) printf("#"); printf("\n"); } else { mid(w); } } } void process() { int h, w; do { scanf("%d %d", &h, &w); if (h == 0 && w == 0) break; draw(h, w); printf("\n"); } while (h != 0 || w != 0); } int main(void) { process(); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100738/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100738/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.4 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @str = private unnamed_addr constant [2 x i8] c"#\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @mid(i32 noundef %w) local_unnamed_addr #0 { entry: %cmp12 = icmp sgt i32 %w, 0 br i1 %cmp12, label %for.inc.peel, label %for.end for.inc.peel: ; preds = %entry %sub = add nsw i32 %w, -1 %putchar11.peel = tail call i32 @putchar(i32 35) %exitcond.peel.not = icmp eq i32 %w, 1 br i1 %exitcond.peel.not, label %for.end, label %if.end if.end: ; preds = %for.inc.peel, %for.inc %i.013 = phi i32 [ %inc, %for.inc ], [ 1, %for.inc.peel ] %cmp2 = icmp eq i32 %i.013, %sub br i1 %cmp2, label %if.then3, label %if.end5 if.then3: ; preds = %if.end %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc if.end5: ; preds = %if.end %putchar = tail call i32 @putchar(i32 46) br label %for.inc for.inc: ; preds = %if.end5, %if.then3 %inc = add nuw nsw i32 %i.013, 1 %exitcond.not = icmp eq i32 %inc, %w br i1 %exitcond.not, label %for.end, label %if.end, !llvm.loop !5 for.end: ; preds = %for.inc, %for.inc.peel, %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 void @draw(i32 noundef %h, i32 noundef %w) local_unnamed_addr #0 { entry: %cmp19 = icmp sgt i32 %h, 0 br i1 %cmp19, label %for.body.lr.ph, label %for.end9 for.body.lr.ph: ; preds = %entry %sub = add nsw i32 %h, -1 %cmp12.i = icmp sgt i32 %w, 0 %sub.i = add nsw i32 %w, -1 br i1 %cmp12.i, label %for.body.lr.ph.split.us, label %for.inc7.peel for.inc7.peel: ; preds = %for.body.lr.ph %putchar.peel = tail call i32 @putchar(i32 10) %exitcond.peel.not = icmp eq i32 %h, 1 br i1 %exitcond.peel.not, label %for.end9, label %for.body for.body.lr.ph.split.us: ; preds = %for.body.lr.ph %exitcond.peel.not.i = icmp eq i32 %w, 1 br i1 %exitcond.peel.not.i, label %for.body.us.us.us.peel, label %for.body.us for.body.us.us.us.peel: ; preds = %for.body.lr.ph.split.us %putchar16.us.us.us.peel = tail call i32 @putchar(i32 35) %putchar.us.us.us.peel = tail call i32 @putchar(i32 10) %exitcond48.not.peel = icmp eq i32 %h, 1 br i1 %exitcond48.not.peel, label %for.end9, label %for.body.us.us.us for.body.us.us.us: ; preds = %for.body.us.us.us.peel, %for.inc7.us.us.us %i.020.us.us.us = phi i32 [ %inc8.us.us.us, %for.inc7.us.us.us ], [ 1, %for.body.us.us.us.peel ] %cmp2.us.us.us = icmp eq i32 %i.020.us.us.us, %sub %putchar16.us.us.us = tail call i32 @putchar(i32 35) br i1 %cmp2.us.us.us, label %for.cond3.for.end_crit_edge.us.us.us, label %for.inc7.us.us.us for.inc7.us.us.us: ; preds = %for.body.us.us.us, %for.cond3.for.end_crit_edge.us.us.us %inc8.us.us.us = add nuw nsw i32 %i.020.us.us.us, 1 %exitcond48.not = icmp eq i32 %inc8.us.us.us, %h br i1 %exitcond48.not, label %for.end9, label %for.body.us.us.us, !llvm.loop !8 for.cond3.for.end_crit_edge.us.us.us: ; preds = %for.body.us.us.us %putchar.us.us.us = tail call i32 @putchar(i32 10) br label %for.inc7.us.us.us for.body.us: ; preds = %for.body.lr.ph.split.us, %for.inc7.us %i.020.us = phi i32 [ %inc8.us, %for.inc7.us ], [ 0, %for.body.lr.ph.split.us ] %cmp1.us = icmp eq i32 %i.020.us, 0 %cmp2.us = icmp eq i32 %i.020.us, %sub %or.cond.us = select i1 %cmp1.us, i1 true, i1 %cmp2.us br i1 %or.cond.us, label %for.body5.us, label %if.else.us if.else.us: ; preds = %for.body.us %putchar11.peel.i.us = tail call i32 @putchar(i32 35) br label %if.end.i.us if.end.i.us: ; preds = %if.else.us, %for.inc.i.us %i.013.i.us = phi i32 [ %inc.i.us, %for.inc.i.us ], [ 1, %if.else.us ] %cmp2.i.us = icmp eq i32 %i.013.i.us, %sub.i br i1 %cmp2.i.us, label %if.then3.i.us, label %if.end5.i.us if.end5.i.us: ; preds = %if.end.i.us %putchar.i.us = tail call i32 @putchar(i32 46) br label %for.inc.i.us if.then3.i.us: ; preds = %if.end.i.us %puts.i.us = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %for.inc.i.us for.inc.i.us: ; preds = %if.then3.i.us, %if.end5.i.us %inc.i.us = add nuw nsw i32 %i.013.i.us, 1 %exitcond.not.i.us = icmp eq i32 %inc.i.us, %w br i1 %exitcond.not.i.us, label %for.inc7.us, label %if.end.i.us, !llvm.loop !5 for.end.us: ; preds = %for.body5.us %putchar.us = tail call i32 @putchar(i32 10) br label %for.inc7.us for.inc7.us: ; preds = %for.inc.i.us, %for.end.us %inc8.us = add nuw nsw i32 %i.020.us, 1 %exitcond45.not = icmp eq i32 %inc8.us, %h br i1 %exitcond45.not, label %for.end9, label %for.body.us, !llvm.loop !9 for.body5.us: ; preds = %for.body.us, %for.body5.us %j.018.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body.us ] %putchar16.us = tail call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.018.us, 1 %exitcond44.not = icmp eq i32 %inc.us, %w br i1 %exitcond44.not, label %for.end.us, label %for.body5.us, !llvm.loop !10 for.body: ; preds = %for.inc7.peel, %for.inc7 %i.020 = phi i32 [ %inc8, %for.inc7 ], [ 1, %for.inc7.peel ] %cmp2 = icmp eq i32 %i.020, %sub br i1 %cmp2, label %for.cond3.preheader, label %for.inc7 for.cond3.preheader: ; preds = %for.body %putchar = tail call i32 @putchar(i32 10) br label %for.inc7 for.inc7: ; preds = %for.body, %for.cond3.preheader %inc8 = add nuw nsw i32 %i.020, 1 %exitcond.not = icmp eq i32 %inc8, %h br i1 %exitcond.not, label %for.end9, label %for.body, !llvm.loop !11 for.end9: ; preds = %for.inc7, %for.inc7.us, %for.body.us.us.us.peel, %for.inc7.us.us.us, %for.inc7.peel, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @process() 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 = %if.end, %entry %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !12 %cmp = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %1, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %do.end, label %if.end if.end: ; preds = %do.body call void @draw(i32 noundef %0, i32 noundef %1) %putchar = call i32 @putchar(i32 10) %2 = load i32, ptr %h, align 4, !tbaa !12 %cmp3 = icmp ne i32 %2, 0 %3 = load i32, ptr %w, align 4 %cmp4 = icmp ne i32 %3, 0 %4 = select i1 %cmp3, i1 true, i1 %cmp4 br i1 %4, label %do.body, label %do.end, !llvm.loop !16 do.end: ; preds = %do.body, %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h.i = alloca i32, align 4 %w.i = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h.i) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w.i) #4 br label %do.body.i do.body.i: ; preds = %if.end.i, %entry %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %h.i, ptr noundef nonnull %w.i) %0 = load i32, ptr %h.i, align 4, !tbaa !12 %cmp.i = icmp eq i32 %0, 0 %1 = load i32, ptr %w.i, align 4 %cmp1.i = icmp eq i32 %1, 0 %or.cond.i = select i1 %cmp.i, i1 %cmp1.i, i1 false br i1 %or.cond.i, label %process.exit, label %if.end.i if.end.i: ; preds = %do.body.i call void @draw(i32 noundef %0, i32 noundef %1) %putchar.i = call i32 @putchar(i32 10) %2 = load i32, ptr %h.i, align 4, !tbaa !12 %cmp3.i = icmp ne i32 %2, 0 %3 = load i32, ptr %w.i, align 4 %cmp4.i = icmp ne i32 %3, 0 %4 = select i1 %cmp3.i, i1 true, i1 %cmp4.i br i1 %4, label %do.body.i, label %process.exit, !llvm.loop !16 process.exit: ; preds = %do.body.i, %if.end.i call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w.i) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h.i) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; 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 = distinct !{!5, !6, !7} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!"llvm.loop.peeled.count", i32 1} !8 = distinct !{!8, !6, !7} !9 = distinct !{!9, !6} !10 = distinct !{!10, !6} !11 = distinct !{!11, !6, !7} !12 = !{!13, !13, i64 0} !13 = !{!"int", !14, i64 0} !14 = !{!"omnipotent char", !15, i64 0} !15 = !{!"Simple C/C++ TBAA"} !16 = distinct !{!16, !6}
#include<stdio.h> int rectangle(int tate,int yoko); int main(void){ int H[1000],W[1000],a,j; j=0; while(1){ scanf("%d %d",&H[j] ,&W[j]); if((H[j]==0)&&(W[j]==0)){ break; } j++; } for(a=0;a<j;a++){ rectangle(H[a],W[a]); printf("\n"); } return 0; } int rectangle(int tate,int yoko){ int h,i; for(h=0;h<tate;h++){ for(i=0;i<yoko;i++){ if((h>0)&&(h<tate-1)&&(i>0)&&(i<yoko-1)){ printf("."); } else{ printf("#"); } } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100781/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100781/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [1000 x i32], align 16 %W = alloca [1000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %W) #4 br label %while.cond while.cond: ; preds = %if.end, %entry %indvars.iv30 = phi i32 [ %indvars.iv.next31, %if.end ], [ 0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000 x i32], ptr %H, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [1000 x i32], ptr %W, i64 0, i64 %indvars.iv %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 0 br i1 %cmp, label %land.lhs.true, label %if.end land.lhs.true: ; preds = %while.cond %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp7 = icmp eq i32 %1, 0 br i1 %cmp7, label %for.cond.preheader, label %if.end for.cond.preheader: ; preds = %land.lhs.true %2 = and i64 %indvars.iv, 4294967295 %cmp824.not = icmp eq i64 %2, 0 br i1 %cmp824.not, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %for.cond.preheader %wide.trip.count = zext i32 %indvars.iv30 to i64 br label %for.body if.end: ; preds = %land.lhs.true, %while.cond %indvars.iv.next = add nuw i64 %indvars.iv, 1 %indvars.iv.next31 = add nuw i32 %indvars.iv30, 1 br label %while.cond for.body: ; preds = %for.body.preheader, %for.body %indvars.iv27 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next28, %for.body ] %arrayidx10 = getelementptr inbounds [1000 x i32], ptr %H, i64 0, i64 %indvars.iv27 %3 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %arrayidx12 = getelementptr inbounds [1000 x i32], ptr %W, i64 0, i64 %indvars.iv27 %4 = load i32, ptr %arrayidx12, align 4, !tbaa !5 %call13 = call i32 @rectangle(i32 noundef %3, i32 noundef %4) %putchar = call i32 @putchar(i32 10) %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1 %exitcond.not = icmp eq i64 %indvars.iv.next28, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @rectangle(i32 noundef %tate, i32 noundef %yoko) local_unnamed_addr #0 { entry: %cmp37 = icmp sgt i32 %tate, 0 br i1 %cmp37, label %for.cond1.preheader.lr.ph, label %for.end15 for.cond1.preheader.lr.ph: ; preds = %entry %cmp227 = icmp sgt i32 %yoko, 0 %sub = add nsw i32 %tate, -1 %sub9 = add nsw i32 %yoko, -1 br i1 %cmp227, label %for.cond1.preheader.us.preheader, label %for.cond1.preheader for.cond1.preheader.us.preheader: ; preds = %for.cond1.preheader.lr.ph %exitcond52.peel.not = icmp eq i32 %yoko, 1 br label %for.cond1.preheader.us for.cond1.preheader.us: ; preds = %for.cond1.preheader.us.preheader, %for.cond1.for.end_crit_edge.us %h.038.us = phi i32 [ %inc14.us, %for.cond1.for.end_crit_edge.us ], [ 0, %for.cond1.preheader.us.preheader ] %cmp4.not.us = icmp eq i32 %h.038.us, 0 br i1 %cmp4.not.us, label %for.body3.us.us, label %for.body3.lr.ph.split.us45 for.body3.us39: ; preds = %for.inc.us.peel, %for.body3.us39 %i.028.us40 = phi i32 [ %inc.us42, %for.body3.us39 ], [ 1, %for.inc.us.peel ] %cmp10.us = icmp slt i32 %i.028.us40, %sub9 %. = select i1 %cmp10.us, i32 46, i32 35 %putchar24.us41 = tail call i32 @putchar(i32 %.) %inc.us42 = add nuw nsw i32 %i.028.us40, 1 %exitcond52.not = icmp eq i32 %inc.us42, %yoko br i1 %exitcond52.not, label %for.cond1.for.end_crit_edge.us, label %for.body3.us39, !llvm.loop !11 for.body3.lr.ph.split.us45: ; preds = %for.cond1.preheader.us %cmp5.us = icmp slt i32 %h.038.us, %sub %cmp5.fr.us = freeze i1 %cmp5.us br i1 %cmp5.fr.us, label %for.inc.us.peel, label %for.body3.us30.us for.inc.us.peel: ; preds = %for.body3.lr.ph.split.us45 %putchar24.us41.peel = tail call i32 @putchar(i32 35) br i1 %exitcond52.peel.not, label %for.cond1.for.end_crit_edge.us, label %for.body3.us39 for.cond1.for.end_crit_edge.us: ; preds = %for.body3.us30.us, %for.body3.us39, %for.body3.us.us, %for.inc.us.peel %putchar.us = tail call i32 @putchar(i32 10) %inc14.us = add nuw nsw i32 %h.038.us, 1 %exitcond55.not = icmp eq i32 %inc14.us, %tate br i1 %exitcond55.not, label %for.end15, label %for.cond1.preheader.us, !llvm.loop !13 for.body3.us.us: ; preds = %for.cond1.preheader.us, %for.body3.us.us %i.028.us.us = phi i32 [ %inc.us.us, %for.body3.us.us ], [ 0, %for.cond1.preheader.us ] %putchar24.us.us = tail call i32 @putchar(i32 35) %inc.us.us = add nuw nsw i32 %i.028.us.us, 1 %exitcond54.not = icmp eq i32 %inc.us.us, %yoko br i1 %exitcond54.not, label %for.cond1.for.end_crit_edge.us, label %for.body3.us.us, !llvm.loop !14 for.body3.us30.us: ; preds = %for.body3.lr.ph.split.us45, %for.body3.us30.us %i.028.us31.us = phi i32 [ %inc.us35.us, %for.body3.us30.us ], [ 0, %for.body3.lr.ph.split.us45 ] %putchar24.us33.us = tail call i32 @putchar(i32 35) %inc.us35.us = add nuw nsw i32 %i.028.us31.us, 1 %exitcond51.not = icmp eq i32 %inc.us35.us, %yoko br i1 %exitcond51.not, label %for.cond1.for.end_crit_edge.us, label %for.body3.us30.us, !llvm.loop !14 for.cond1.preheader: ; preds = %for.cond1.preheader.lr.ph, %for.cond1.preheader %h.038 = phi i32 [ %inc14, %for.cond1.preheader ], [ 0, %for.cond1.preheader.lr.ph ] %putchar = tail call i32 @putchar(i32 10) %inc14 = add nuw nsw i32 %h.038, 1 %exitcond.not = icmp eq i32 %inc14, %tate br i1 %exitcond.not, label %for.end15, label %for.cond1.preheader, !llvm.loop !13 for.end15: ; preds = %for.cond1.preheader, %for.cond1.for.end_crit_edge.us, %entry ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#include <stdio.h> int main(){ while(1){ int h,w; int i,j; scanf("%d %d",&h,&w); if(h==0 && w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(i==0 || i==h-1 || j==0 || j==w-1){ printf("#"); }else{ printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100824/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100824/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call44 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp45 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp146 = icmp eq i32 %1, 0 %or.cond47 = select i1 %cmp45, i1 %cmp146, i1 false br i1 %or.cond47, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %cleanup %2 = phi i32 [ %9, %cleanup ], [ %0, %entry ] %cmp241 = icmp sgt i32 %2, 0 br i1 %cmp241, label %for.cond3.preheader, label %cleanup for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.042 = phi i32 [ %inc19, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp438 = icmp sgt i32 %3, 0 br i1 %cmp438, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %i.042, 0 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.039.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %putchar34.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.039.us, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %4 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %3, %for.body5.lr.ph ] %j.039 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %6 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %cmp7 = icmp eq i32 %i.042, %sub %cmp9 = icmp eq i32 %j.039, 0 %or.cond25 = or i1 %cmp9, %cmp7 %sub11 = add nsw i32 %5, -1 %cmp12 = icmp eq i32 %j.039, %sub11 %or.cond35 = select i1 %or.cond25, i1 true, i1 %cmp12 %. = select i1 %or.cond35, i32 35, i32 46 %putchar34 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.039, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar32 = call i32 @putchar(i32 10) %inc19 = add nuw nsw i32 %i.042, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc19, %8 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) %9 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %cleanup, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include<stdio.h> int main() { int a,b,i,j; while(1) { scanf("%d%d",&a,&b); if(a==0&&b==0){break;} for(i=1;i<=a;i++) { for(j=1;j<=b;j++) { if(i>1&&i<a&&j<b&&j>1)printf("."); else printf("#"); } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100868/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100868/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call39 = 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 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %b, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end20 %2 = phi i32 [ %9, %for.end20 ], [ %0, %entry ] %cmp2.not36 = icmp slt i32 %2, 1 br i1 %cmp2.not36, label %for.end20, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.037 = phi i32 [ %inc19, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %b, align 4, !tbaa !5 %cmp4.not33 = icmp slt i32 %3, 1 br i1 %cmp4.not33, label %for.end, label %for.body5.lr.ph for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp ugt i32 %i.037, 1 br i1 %cmp6, label %for.body5, label %for.body5.us for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.034.us = phi i32 [ %inc.us, %for.body5.us ], [ 1, %for.body5.lr.ph ] %putchar30.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.034.us, 1 %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp4.not.us.not = icmp slt i32 %j.034.us, %4 br i1 %cmp4.not.us.not, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.inc %5 = phi i32 [ %7, %for.inc ], [ %3, %for.body5.lr.ph ] %j.034 = phi i32 [ %inc, %for.inc ], [ 1, %for.body5.lr.ph ] %6 = load i32, ptr %a, align 4 %cmp8 = icmp slt i32 %i.037, %6 br i1 %cmp8, label %land.lhs.true9, label %if.else land.lhs.true9: ; preds = %for.body5 %cmp10 = icmp slt i32 %j.034, %5 %cmp12 = icmp ugt i32 %j.034, 1 %or.cond22 = and i1 %cmp12, %cmp10 br i1 %or.cond22, label %for.inc, label %if.else if.else: ; preds = %land.lhs.true9, %for.body5 br label %for.inc for.inc: ; preds = %land.lhs.true9, %if.else %.sink = phi i32 [ 35, %if.else ], [ 46, %land.lhs.true9 ] %putchar31 = call i32 @putchar(i32 %.sink) %inc = add nuw nsw i32 %j.034, 1 %7 = load i32, ptr %b, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.034, %7 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5.us, %for.inc, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc19 = add i32 %i.037, 1 %8 = load i32, ptr %a, align 4, !tbaa !5 %cmp2.not = icmp sgt i32 %inc19, %8 br i1 %cmp2.not, label %for.end20, label %for.cond3.preheader, !llvm.loop !11 for.end20: ; 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) %9 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %b, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end20, %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() { int h,w; int i,j; scanf("%d",&h); scanf("%d",&w); while(!((h==0) && (w==0))){ for(i=0;i<w;i++){ printf("#"); } printf("\n"); for(i=0;i<h-2;i++){ printf("#"); for(j=0;j<w-2;j++){ printf("."); } printf("#\n"); } for(i=0;i<w;i++){ printf("#"); } printf("\n\n"); scanf("%d",&h); scanf("%d",&w); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100918/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100918/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [2 x i8] c"\0A\00", align 1 @str.6 = private unnamed_addr constant [2 x i8] c"#\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %cmp53 = icmp ne i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp254 = icmp ne i32 %1, 0 %.not55 = select i1 %cmp53, i1 true, i1 %cmp254 br i1 %.not55, label %for.cond.preheader, label %while.end for.cond.preheader: ; preds = %entry, %for.end28 %2 = phi i32 [ %11, %for.end28 ], [ %1, %entry ] %cmp343 = icmp sgt i32 %2, 0 br i1 %cmp343, label %for.body, label %for.end for.body: ; preds = %for.cond.preheader, %for.body %i.044 = phi i32 [ %inc, %for.body ], [ 0, %for.cond.preheader ] %putchar42 = call i32 @putchar(i32 35) %inc = add nuw nsw i32 %i.044, 1 %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp3 = icmp slt i32 %inc, %3 br i1 %cmp3, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %for.cond.preheader %putchar = call i32 @putchar(i32 10) %4 = load i32, ptr %h, align 4, !tbaa !5 %cmp749 = icmp sgt i32 %4, 2 br i1 %cmp749, label %for.body8, label %for.cond22.preheader for.cond22.preheader: ; preds = %for.end17, %for.end %5 = load i32, ptr %w, align 4, !tbaa !5 %cmp2351 = icmp sgt i32 %5, 0 br i1 %cmp2351, label %for.body24, label %for.end28 for.body8: ; preds = %for.end, %for.end17 %i.150 = phi i32 [ %inc20, %for.end17 ], [ 0, %for.end ] %putchar39 = call i32 @putchar(i32 35) %6 = load i32, ptr %w, align 4, !tbaa !5 %cmp1246 = icmp sgt i32 %6, 2 br i1 %cmp1246, label %for.body13, label %for.end17 for.body13: ; preds = %for.body8, %for.body13 %j.047 = phi i32 [ %inc16, %for.body13 ], [ 0, %for.body8 ] %putchar41 = call i32 @putchar(i32 46) %inc16 = add nuw nsw i32 %j.047, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %sub11 = add nsw i32 %7, -2 %cmp12 = icmp slt i32 %inc16, %sub11 br i1 %cmp12, label %for.body13, label %for.end17, !llvm.loop !11 for.end17: ; preds = %for.body13, %for.body8 %puts40 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %inc20 = add nuw nsw i32 %i.150, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %8, -2 %cmp7 = icmp slt i32 %inc20, %sub br i1 %cmp7, label %for.body8, label %for.cond22.preheader, !llvm.loop !12 for.body24: ; preds = %for.cond22.preheader, %for.body24 %i.252 = phi i32 [ %inc27, %for.body24 ], [ 0, %for.cond22.preheader ] %putchar38 = call i32 @putchar(i32 35) %inc27 = add nuw nsw i32 %i.252, 1 %9 = load i32, ptr %w, align 4, !tbaa !5 %cmp23 = icmp slt i32 %inc27, %9 br i1 %cmp23, label %for.body24, label %for.end28, !llvm.loop !13 for.end28: ; preds = %for.body24, %for.cond22.preheader %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %call30 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h) %call31 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %w) %10 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp ne i32 %10, 0 %11 = load i32, ptr %w, align 4 %cmp2 = icmp ne i32 %11, 0 %.not = select i1 %cmp, i1 true, i1 %cmp2 br i1 %.not, label %for.cond.preheader, label %while.end, !llvm.loop !14 while.end: ; preds = %for.end28, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; 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} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#include<stdio.h> int main(void) { int i,j; int H,W; while(1){ scanf("%d %d",&H,&W); if(H == 0 && W == 0)break; else for(i=1;i<=H;i++){ for(j=1;j<=W;j++){ if(i == 1||j == 1||i == H||j == W){ printf("#"); } else { printf("."); } } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_100969/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_100969/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call39 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %if.end20 %2 = phi i32 [ %9, %if.end20 ], [ %0, %entry ] %cmp2.not36 = icmp slt i32 %2, 1 br i1 %cmp2.not36, label %if.end20, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.037 = phi i32 [ %inc18, %for.end ], [ 1, %for.cond.preheader ] %3 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not34 = icmp slt i32 %3, 1 br i1 %cmp4.not34, label %for.end, label %for.body5.lr.ph for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %i.037, 1 br i1 %cmp6, label %for.body5.us, label %for.inc.peel for.inc.peel: ; preds = %for.body5.lr.ph %putchar31.peel = call i32 @putchar(i32 35) %.pre = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not.peel = icmp sgt i32 %.pre, 1 br i1 %cmp4.not.not.peel, label %for.body5, label %for.end for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.035.us = phi i32 [ %inc.us, %for.body5.us ], [ 1, %for.body5.lr.ph ] %putchar31.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.035.us, 1 %4 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.us.not = icmp slt i32 %j.035.us, %4 br i1 %cmp4.not.us.not, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.inc.peel, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %.pre, %for.inc.peel ] %j.035 = phi i32 [ %inc, %for.body5 ], [ 2, %for.inc.peel ] %6 = load i32, ptr %H, align 4 %cmp9 = icmp eq i32 %i.037, %6 %cmp11 = icmp eq i32 %j.035, %5 %or.cond33 = or i1 %cmp11, %cmp9 %. = select i1 %or.cond33, i32 35, i32 46 %putchar31 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.035, 1 %7 = load i32, ptr %W, align 4, !tbaa !5 %cmp4.not.not = icmp slt i32 %j.035, %7 br i1 %cmp4.not.not, label %for.body5, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body5, %for.body5.us, %for.inc.peel, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc18 = add i32 %i.037, 1 %8 = load i32, ptr %H, align 4 %cmp2.not = icmp sgt i32 %inc18, %8 br i1 %cmp2.not, label %if.end20, label %for.cond3.preheader, !llvm.loop !13 if.end20: ; 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) %9 = load i32, ptr %H, align 4 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %W, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %if.end20, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10}
#include <stdio.h> int main(){ int h,w; int i,j; while(1){ scanf("%d %d",&h,&w); if(h==0 && w==0) break; for(i=0;i<h;i++){ for(j=0;j<w;j++){ if(i==0 || i==h-1 || j==0 || j==w-1) printf("#"); else{printf(".");} } printf("\n"); } printf("\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101010/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101010/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call39 = 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 %cmp40 = icmp eq i32 %0, 0 %1 = load i32, ptr %w, align 4 %cmp141 = icmp eq i32 %1, 0 %or.cond42 = select i1 %cmp40, i1 %cmp141, i1 false br i1 %or.cond42, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end20 %2 = phi i32 [ %9, %for.end20 ], [ %0, %entry ] %cmp236 = icmp sgt i32 %2, 0 br i1 %cmp236, label %for.cond3.preheader, label %for.end20 for.cond3.preheader: ; preds = %for.cond.preheader, %for.end %i.037 = phi i32 [ %inc19, %for.end ], [ 0, %for.cond.preheader ] %3 = load i32, ptr %w, align 4, !tbaa !5 %cmp433 = icmp sgt i32 %3, 0 br i1 %cmp433, label %for.body5.lr.ph, label %for.end for.body5.lr.ph: ; preds = %for.cond3.preheader %cmp6 = icmp eq i32 %i.037, 0 br i1 %cmp6, label %for.body5.us, label %for.body5 for.body5.us: ; preds = %for.body5.lr.ph, %for.body5.us %j.034.us = phi i32 [ %inc.us, %for.body5.us ], [ 0, %for.body5.lr.ph ] %putchar31.us = call i32 @putchar(i32 35) %inc.us = add nuw nsw i32 %j.034.us, 1 %4 = load i32, ptr %w, align 4, !tbaa !5 %cmp4.us = icmp slt i32 %inc.us, %4 br i1 %cmp4.us, label %for.body5.us, label %for.end, !llvm.loop !9 for.body5: ; preds = %for.body5.lr.ph, %for.body5 %5 = phi i32 [ %7, %for.body5 ], [ %3, %for.body5.lr.ph ] %j.034 = phi i32 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ] %6 = load i32, ptr %h, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %cmp7 = icmp eq i32 %i.037, %sub %cmp9 = icmp eq i32 %j.034, 0 %or.cond22 = or i1 %cmp9, %cmp7 %sub11 = add nsw i32 %5, -1 %cmp12 = icmp eq i32 %j.034, %sub11 %or.cond32 = select i1 %or.cond22, i1 true, i1 %cmp12 %. = select i1 %or.cond32, i32 35, i32 46 %putchar31 = call i32 @putchar(i32 %.) %inc = add nuw nsw i32 %j.034, 1 %7 = load i32, ptr %w, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc, %7 br i1 %cmp4, label %for.body5, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body5, %for.body5.us, %for.cond3.preheader %putchar29 = call i32 @putchar(i32 10) %inc19 = add nuw nsw i32 %i.037, 1 %8 = load i32, ptr %h, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc19, %8 br i1 %cmp2, label %for.cond3.preheader, label %for.end20, !llvm.loop !11 for.end20: ; 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) %9 = load i32, ptr %h, align 4, !tbaa !5 %cmp = icmp eq i32 %9, 0 %10 = load i32, ptr %w, align 4 %cmp1 = icmp eq i32 %10, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %while.end, label %for.cond.preheader while.end: ; preds = %for.end20, %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; int W; int iCount; int iCount1; int iCount2; int iPutNum = 0; int iH[1000]; int iW[1000]; //Hの入力 scanf("%d", &H); //Wの入力 scanf("%d", &W); while (H != 0 || W != 0) { iH[iPutNum] = H; iW[iPutNum] = W; //Hの入力 scanf("%d", &H); //Wの入力 scanf("%d", &W); iPutNum++; } //長方形を書く部分 for (iCount = 0; iCount < iPutNum; iCount++) { //縦のループ for (iCount1 = 0; iCount1 < iH[iCount]; iCount1++) { //フレーム部分 if (iCount1 == 0 || iCount1 == iH[iCount]-1) { //横のループ for (iCount2 = 0; iCount2 < iW[iCount]; iCount2++) { printf("#"); } printf("\n"); } //フレームの中身 else { //横のループ for (iCount2 = 0; iCount2 < iW[iCount]; iCount2++) { if (iCount2 == 0 || iCount2 == iW[iCount] - 1) { printf("#"); } else { printf("."); } } printf("\n"); } } printf("\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_101054/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_101054/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %H = alloca i32, align 4 %W = alloca i32, align 4 %iH = alloca [1000 x i32], align 16 %iW = alloca [1000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %H) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %iH) #4 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %iW) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W) %0 = load i32, ptr %H, align 4, !tbaa !5 %cmp76 = icmp ne i32 %0, 0 %1 = load i32, ptr %W, align 4 %cmp277 = icmp ne i32 %1, 0 %2 = select i1 %cmp76, i1 true, i1 %cmp277 br i1 %2, label %while.body, label %for.end51 for.cond.preheader: ; preds = %while.body %3 = and i64 %indvars.iv.next, 4294967295 %cmp785.not = icmp eq i64 %3, 0 br i1 %cmp785.not, label %for.end51, label %for.cond8.preheader.preheader for.cond8.preheader.preheader: ; preds = %for.cond.preheader %wide.trip.count = and i64 %indvars.iv.next, 4294967295 br label %for.cond8.preheader while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %4 = phi i32 [ %7, %while.body ], [ %1, %entry ] %5 = phi i32 [ %6, %while.body ], [ %0, %entry ] %arrayidx = getelementptr inbounds [1000 x i32], ptr %iH, i64 0, i64 %indvars.iv store i32 %5, ptr %arrayidx, align 4, !tbaa !5 %arrayidx4 = getelementptr inbounds [1000 x i32], ptr %iW, i64 0, i64 %indvars.iv store i32 %4, ptr %arrayidx4, align 4, !tbaa !5 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %H) %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %W) %indvars.iv.next = add nuw i64 %indvars.iv, 1 %6 = load i32, ptr %H, align 4, !tbaa !5 %cmp = icmp ne i32 %6, 0 %7 = load i32, ptr %W, align 4 %cmp2 = icmp ne i32 %7, 0 %8 = select i1 %cmp, i1 true, i1 %cmp2 br i1 %8, label %while.body, label %for.cond.preheader, !llvm.loop !9 for.cond8.preheader: ; preds = %for.cond8.preheader.preheader, %for.end47 %indvars.iv91 = phi i64 [ 0, %for.cond8.preheader.preheader ], [ %indvars.iv.next92, %for.end47 ] %arrayidx10 = getelementptr inbounds [1000 x i32], ptr %iH, i64 0, i64 %indvars.iv91 %9 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %cmp1183 = icmp sgt i32 %9, 0 br i1 %cmp1183, label %for.body12.lr.ph, label %for.end47 for.body12.lr.ph: ; preds = %for.cond8.preheader %sub = add nsw i32 %9, -1 %arrayidx27 = getelementptr inbounds [1000 x i32], ptr %iW, i64 0, i64 %indvars.iv91 %10 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %cmp2081 = icmp sgt i32 %10, 0 %sub34 = add nsw i32 %10, -1 %exitcond.peel.not = icmp eq i32 %10, 1 br label %for.body12 for.body12: ; preds = %for.body12.lr.ph, %for.inc45 %iCount1.084 = phi i32 [ 0, %for.body12.lr.ph ], [ %inc46, %for.inc45 ] %cmp13 = icmp eq i32 %iCount1.084, 0 %cmp16 = icmp eq i32 %iCount1.084, %sub %or.cond = select i1 %cmp13, i1 true, i1 %cmp16 br i1 %or.cond, label %for.cond17.preheader, label %for.cond25.preheader for.cond25.preheader: ; preds = %for.body12 br i1 %cmp2081, label %for.inc40.peel, label %for.inc45 for.inc40.peel: ; preds = %for.cond25.preheader %putchar72.peel = call i32 @putchar(i32 35) br i1 %exitcond.peel.not, label %for.inc45, label %for.body29 for.cond17.preheader: ; preds = %for.body12 br i1 %cmp2081, label %for.body21, label %for.inc45 for.body21: ; preds = %for.cond17.preheader, %for.body21 %iCount2.082 = phi i32 [ %inc23, %for.body21 ], [ 0, %for.cond17.preheader ] %putchar74 = call i32 @putchar(i32 35) %inc23 = add nuw nsw i32 %iCount2.082, 1 %exitcond89.not = icmp eq i32 %inc23, %10 br i1 %exitcond89.not, label %for.inc45, label %for.body21, !llvm.loop !11 for.body29: ; preds = %for.inc40.peel, %for.body29 %iCount2.180 = phi i32 [ %inc41, %for.body29 ], [ 1, %for.inc40.peel ] %cmp35 = icmp eq i32 %iCount2.180, %sub34 %. = select i1 %cmp35, i32 35, i32 46 %putchar72 = call i32 @putchar(i32 %.) %inc41 = add nuw nsw i32 %iCount2.180, 1 %exitcond.not = icmp eq i32 %inc41, %10 br i1 %exitcond.not, label %for.inc45, label %for.body29, !llvm.loop !12 for.inc45: ; preds = %for.body29, %for.body21, %for.cond25.preheader, %for.inc40.peel, %for.cond17.preheader %putchar73 = call i32 @putchar(i32 10) %inc46 = add nuw nsw i32 %iCount1.084, 1 %exitcond90.not = icmp eq i32 %inc46, %9 br i1 %exitcond90.not, label %for.end47, label %for.body12, !llvm.loop !14 for.end47: ; preds = %for.inc45, %for.cond8.preheader %putchar = call i32 @putchar(i32 10) %indvars.iv.next92 = add nuw nsw i64 %indvars.iv91, 1 %exitcond94.not = icmp eq i64 %indvars.iv.next92, %wide.trip.count br i1 %exitcond94.not, label %for.end51, label %for.cond8.preheader, !llvm.loop !15 for.end51: ; preds = %for.end47, %entry, %for.cond.preheader call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %iW) #4 call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %iH) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %W) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %H) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10, !13} !13 = !{!"llvm.loop.peeled.count", i32 1} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10}

The dataset consists of source code and LLVM IR pairs generated from accepted and de-duped programming contest solutions. The dataset is divided into language configs and mode splits. The language can be one of C, C++, D, Fortran, Go, Haskell, Nim, Objective-C, Python, Rust and Swift, indicating the source files' languages. The mode split indicates the compilation mode, which can be wither Size_Optimized or Perf_Optimized.

Once you have submitted an access request which has been approved, loading the dataset can be done as follows:

from datasets import load_dataset

dataset = load_dataset("UKPLab/SLTrans", "C", split="Size_Optimized")
Downloads last month
585
Edit dataset card