Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> void test(); int main() { /*#ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif*/ int t; scanf("%d", &t); while (t--) { test(); } } void test() { int s, i = 1, p = 0, count = 0, m = 0; scanf("%d", &s); count++; while (p <= s) { p = p + i; if (p >= s) { break; } count++; i = i + 2; } printf("%d\n", count); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1659/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1659/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s.i = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec5 = add nsw i32 %0, -1 store i32 %dec5, ptr %t, align 4, !tbaa !5 %tobool.not6 = icmp eq i32 %0, 0 br i1 %tobool.not6, label %while.end, label %while.body while.body: ; preds = %entry, %test.exit call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s.i) #3 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s.i) %1 = load i32, ptr %s.i, align 4, !tbaa !5 %cmp1.not.i1 = icmp sgt i32 %1, 1 br i1 %cmp1.not.i1, label %if.end.i, label %test.exit if.end.i: ; preds = %while.body, %if.end.i %add.i4 = phi i32 [ %add.i, %if.end.i ], [ 1, %while.body ] %count.012.i3 = phi i32 [ %inc2.i, %if.end.i ], [ 1, %while.body ] %i.013.i2 = phi i32 [ %add3.i, %if.end.i ], [ 1, %while.body ] %inc2.i = add nuw nsw i32 %count.012.i3, 1 %add3.i = add nuw nsw i32 %i.013.i2, 2 %add.i = add nuw nsw i32 %add.i4, %add3.i %cmp1.not.i = icmp slt i32 %add.i, %1 br i1 %cmp1.not.i, label %if.end.i, label %test.exit, !llvm.loop !9 test.exit: ; preds = %if.end.i, %while.body %count.0.lcssa.i = phi i32 [ 1, %while.body ], [ %inc2.i, %if.end.i ] %call4.i = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %count.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s.i) #3 %2 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %test.exit, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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 uwtable define dso_local void @test() local_unnamed_addr #0 { entry: %s = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i32, ptr %s, align 4, !tbaa !5 %cmp1.not15 = icmp sgt i32 %0, 1 br i1 %cmp1.not15, label %if.end, label %while.end if.end: ; preds = %entry, %if.end %add18 = phi i32 [ %add, %if.end ], [ 1, %entry ] %count.01217 = phi i32 [ %inc2, %if.end ], [ 1, %entry ] %i.01316 = phi i32 [ %add3, %if.end ], [ 1, %entry ] %inc2 = add nuw nsw i32 %count.01217, 1 %add3 = add nuw nsw i32 %i.01316, 2 %add = add nuw nsw i32 %add3, %add18 %cmp1.not = icmp slt i32 %add, %0 br i1 %cmp1.not, label %if.end, label %while.end, !llvm.loop !9 while.end: ; preds = %if.end, %entry %count.0.lcssa = phi i32 [ 1, %entry ], [ %inc2, %if.end ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %count.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #3 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main() { int a, b, c, d; int t; scanf("%d%d%d%d",&a,&b, &c, &d); if(b <= c || d <=a ){ t = 0; } else { if(a <=c){ if(b <=d){ t = b - c; } else{ t = d-c; } } else{ if(b <=d){ t = b - a; } else{ t = d-a; } } } printf("%d\n", t); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165942/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %d = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %d) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %c, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %lor.lhs.false, label %if.end16 lor.lhs.false: ; preds = %entry %2 = load i32, ptr %d, align 4, !tbaa !5 %3 = load i32, ptr %a, align 4, !tbaa !5 %cmp1.not = icmp sgt i32 %2, %3 br i1 %cmp1.not, label %if.else, label %if.end16 if.else: ; preds = %lor.lhs.false %cmp2.not = icmp sgt i32 %3, %1 %cmp9.not = icmp sgt i32 %0, %2 br i1 %cmp2.not, label %if.else8, label %if.then3 if.then3: ; preds = %if.else br i1 %cmp9.not, label %if.else6, label %if.then5 if.then5: ; preds = %if.then3 %sub = sub nsw i32 %0, %1 br label %if.end16 if.else6: ; preds = %if.then3 %sub7 = sub nsw i32 %2, %1 br label %if.end16 if.else8: ; preds = %if.else br i1 %cmp9.not, label %if.else12, label %if.then10 if.then10: ; preds = %if.else8 %sub11 = sub nsw i32 %0, %3 br label %if.end16 if.else12: ; preds = %if.else8 %sub13 = sub nsw i32 %2, %3 br label %if.end16 if.end16: ; preds = %entry, %lor.lhs.false, %if.else6, %if.then5, %if.else12, %if.then10 %t.0 = phi i32 [ %sub, %if.then5 ], [ %sub7, %if.else6 ], [ %sub11, %if.then10 ], [ %sub13, %if.else12 ], [ 0, %lor.lhs.false ], [ 0, %entry ] %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %t.0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int i,j,n,k=1; i=100000; scanf("%d",&n); if(n==0){ printf("%d\n",i); return 0;} do{ j=i*0.05; i+=j; if(i%1000!=0)i=i+1000-(i%1000); k++; }while(k<=n); printf("%d\n",i); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_165986/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_165986/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp eq i32 %0, 0 br i1 %cmp, label %cleanup, label %do.body.preheader do.body.preheader: ; preds = %entry %smax = call i32 @llvm.smax.i32(i32 %0, i32 1) %xtraiter = and i32 %smax, 1 %1 = icmp slt i32 %0, 2 br i1 %1, label %cleanup.loopexit.unr-lcssa, label %do.body.preheader.new do.body.preheader.new: ; preds = %do.body.preheader %unroll_iter = and i32 %smax, 2147483646 br label %do.body do.body: ; preds = %do.body, %do.body.preheader.new %i.0 = phi i32 [ 100000, %do.body.preheader.new ], [ %i.1.1, %do.body ] %niter = phi i32 [ 0, %do.body.preheader.new ], [ %niter.next.1, %do.body ] %conv = sitofp i32 %i.0 to double %mul = fmul double %conv, 5.000000e-02 %conv2 = fptosi double %mul to i32 %add = add nsw i32 %i.0, %conv2 %rem = srem i32 %add, 1000 %cmp3.not = icmp eq i32 %rem, 0 %add6 = add nsw i32 %add, 1000 %sub = sub i32 %add6, %rem %i.1 = select i1 %cmp3.not, i32 %add, i32 %sub %conv.1 = sitofp i32 %i.1 to double %mul.1 = fmul double %conv.1, 5.000000e-02 %conv2.1 = fptosi double %mul.1 to i32 %add.1 = add nsw i32 %i.1, %conv2.1 %rem.1 = srem i32 %add.1, 1000 %cmp3.not.1 = icmp eq i32 %rem.1, 0 %add6.1 = add nsw i32 %add.1, 1000 %sub.1 = sub i32 %add6.1, %rem.1 %i.1.1 = select i1 %cmp3.not.1, i32 %add.1, i32 %sub.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %cleanup.loopexit.unr-lcssa, label %do.body, !llvm.loop !9 cleanup.loopexit.unr-lcssa: ; preds = %do.body, %do.body.preheader %i.1.lcssa.ph = phi i32 [ undef, %do.body.preheader ], [ %i.1.1, %do.body ] %i.0.unr = phi i32 [ 100000, %do.body.preheader ], [ %i.1.1, %do.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %cleanup, label %do.body.epil do.body.epil: ; preds = %cleanup.loopexit.unr-lcssa %conv.epil = sitofp i32 %i.0.unr to double %mul.epil = fmul double %conv.epil, 5.000000e-02 %conv2.epil = fptosi double %mul.epil to i32 %add.epil = add nsw i32 %i.0.unr, %conv2.epil %rem.epil = srem i32 %add.epil, 1000 %cmp3.not.epil = icmp eq i32 %rem.epil, 0 %add6.epil = add nsw i32 %add.epil, 1000 %sub.epil = sub i32 %add6.epil, %rem.epil %i.1.epil = select i1 %cmp3.not.epil, i32 %add.epil, i32 %sub.epil br label %cleanup cleanup: ; preds = %do.body.epil, %cleanup.loopexit.unr-lcssa, %entry %i.1.lcssa.sink = phi i32 [ 100000, %entry ], [ %i.1.lcssa.ph, %cleanup.loopexit.unr-lcssa ], [ %i.1.epil, %do.body.epil ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.1.lcssa.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int kiriage( int x ) { return x%1000==0 ? x : x+1000-(x%1000); } int main(){ int i,n; int sum=100000; scanf("%d",&n); for(i=0;i<n;i++){ sum=kiriage(sum*1.05); } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166028/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166028/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @kiriage(i32 noundef %x) local_unnamed_addr #0 { entry: %rem = srem i32 %x, 1000 %cmp = icmp eq i32 %rem, 0 %add = add nsw i32 %x, 1000 %sub = sub i32 %add, %rem %cond = select i1 %cmp, i32 %x, i32 %sub ret i32 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp6 = icmp sgt i32 %0, 0 br i1 %cmp6, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %sum.08 = phi i32 [ 100000, %for.body.preheader.new ], [ %cond.i.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %sum.08 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %rem.i = srem i32 %conv1, 1000 %cmp.i = icmp eq i32 %rem.i, 0 %add.i = add nsw i32 %conv1, 1000 %sub.i = sub i32 %add.i, %rem.i %cond.i = select i1 %cmp.i, i32 %conv1, i32 %sub.i %conv.1 = sitofp i32 %cond.i to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %rem.i.1 = srem i32 %conv1.1, 1000 %cmp.i.1 = icmp eq i32 %rem.i.1, 0 %add.i.1 = add nsw i32 %conv1.1, 1000 %sub.i.1 = sub i32 %add.i.1, %rem.i.1 %cond.i.1 = select i1 %cmp.i.1, i32 %conv1.1, i32 %sub.i.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %2 = sitofp i32 %cond.i.1 to double %3 = fmul double %2, 1.050000e+00 %4 = fptosi double %3 to i32 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %cond.i.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %cond.i.1, %for.end.loopexit.unr-lcssa.loopexit ] %sum.08.unr = phi i32 [ 105000, %for.body.preheader ], [ %4, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.i.epil = srem i32 %sum.08.unr, 1000 %cmp.i.epil = icmp eq i32 %rem.i.epil, 0 %add.i.epil = add nsw i32 %sum.08.unr, 1000 %sub.i.epil = sub i32 %add.i.epil, %rem.i.epil %cond.i.epil = select i1 %cmp.i.epil, i32 %sum.08.unr, i32 %sub.i.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %sum.0.lcssa = phi i32 [ 100000, %entry ], [ %cond.i.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %cond.i.epil, %for.body.epil ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int i,n; int x = 100000; scanf("%d",&n); for(i=0;i<n;i++){ x=x*1.05; if(x%1000!=0){ x=(x/1000+1)*1000; } } printf("%d\n",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp sgt i32 %0, 0 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %x.012 = phi i32 [ 100000, %for.body.preheader.new ], [ %x.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %x.012 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %conv1.fr = freeze i32 %conv1 %rem = srem i32 %conv1.fr, 1000 %cmp2.not = icmp eq i32 %rem, 0 %2 = add i32 %conv1.fr, 1000 %mul4 = sub i32 %2, %rem %x.1 = select i1 %cmp2.not, i32 %conv1.fr, i32 %mul4 %conv.1 = sitofp i32 %x.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %conv1.fr.1 = freeze i32 %conv1.1 %rem.1 = srem i32 %conv1.fr.1, 1000 %cmp2.not.1 = icmp eq i32 %rem.1, 0 %3 = add i32 %conv1.fr.1, 1000 %mul4.1 = sub i32 %3, %rem.1 %x.1.1 = select i1 %cmp2.not.1, i32 %conv1.fr.1, i32 %mul4.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %4 = sitofp i32 %x.1.1 to double %5 = fmul double %4, 1.050000e+00 %6 = fptosi double %5 to i32 %7 = freeze i32 %6 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %x.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %x.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %x.012.unr = phi i32 [ 105000, %for.body.preheader ], [ %7, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %x.012.unr, 1000 %cmp2.not.epil = icmp eq i32 %rem.epil, 0 %8 = add i32 %x.012.unr, 1000 %mul4.epil = sub i32 %8, %rem.epil %x.1.epil = select i1 %cmp2.not.epil, i32 %x.012.unr, i32 %mul4.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %x.0.lcssa = phi i32 [ 100000, %entry ], [ %x.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %x.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %x.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int n,i; int j=100000; scanf("%d",&n); for(i=0;i<n;i++){ j*=1.05; if(j%1000!=0){ j=(j/1000+1)*1000; } } printf("%d\n",j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166129/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166129/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp sgt i32 %0, 0 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %j.012 = phi i32 [ 100000, %for.body.preheader.new ], [ %j.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %j.012 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %conv1.fr = freeze i32 %conv1 %rem = srem i32 %conv1.fr, 1000 %cmp2.not = icmp eq i32 %rem, 0 %2 = add i32 %conv1.fr, 1000 %mul4 = sub i32 %2, %rem %j.1 = select i1 %cmp2.not, i32 %conv1.fr, i32 %mul4 %conv.1 = sitofp i32 %j.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %conv1.fr.1 = freeze i32 %conv1.1 %rem.1 = srem i32 %conv1.fr.1, 1000 %cmp2.not.1 = icmp eq i32 %rem.1, 0 %3 = add i32 %conv1.fr.1, 1000 %mul4.1 = sub i32 %3, %rem.1 %j.1.1 = select i1 %cmp2.not.1, i32 %conv1.fr.1, i32 %mul4.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %4 = sitofp i32 %j.1.1 to double %5 = fmul double %4, 1.050000e+00 %6 = fptosi double %5 to i32 %7 = freeze i32 %6 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %j.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %j.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %j.012.unr = phi i32 [ 105000, %for.body.preheader ], [ %7, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %j.012.unr, 1000 %cmp2.not.epil = icmp eq i32 %rem.epil, 0 %8 = add i32 %j.012.unr, 1000 %mul4.epil = sub i32 %8, %rem.epil %j.1.epil = select i1 %cmp2.not.epil, i32 %j.012.unr, i32 %mul4.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %j.0.lcssa = phi i32 [ 100000, %entry ], [ %j.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %j.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %j.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int n; double debt=100000; scanf("%d", &n); for (int i = 0; i < n; i++) { debt = debt + debt*0.05; if ((int)debt % 1000 > 0) { debt = debt - (int)debt % 1000; debt += 1000; } } printf("%d\n", (int)debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166237/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166237/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp15 = icmp sgt i32 %0, 0 br i1 %cmp15, label %for.body, label %for.cond.cleanup for.cond.cleanup.loopexit: ; preds = %for.body %1 = fptosi double %debt.1 to i32 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %entry %debt.0.lcssa = phi i32 [ 100000, %entry ], [ %1, %for.cond.cleanup.loopexit ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %debt.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body: ; preds = %entry, %for.body %i.017 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %debt.016 = phi double [ %debt.1, %for.body ], [ 1.000000e+05, %entry ] %2 = call double @llvm.fmuladd.f64(double %debt.016, double 5.000000e-02, double %debt.016) %conv = fptosi double %2 to i32 %rem = srem i32 %conv, 1000 %cmp1 = icmp sgt i32 %rem, 0 %conv5 = sitofp i32 %rem to double %sub = fsub double %2, %conv5 %add = fadd double %sub, 1.000000e+03 %debt.1 = select i1 %cmp1, double %add, double %2 %inc = add nuw nsw i32 %i.017, 1 %exitcond.not = icmp eq i32 %inc, %0 br i1 %exitcond.not, label %for.cond.cleanup.loopexit, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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 speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int x, i, sum; sum = 100000; scanf("%d",&x); for(i = 0; i < x; i++){ sum *= 1.05; if(sum % 1000 != 0){ sum /= 1000; sum += 1; sum *= 1000; } } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166301/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166301/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %0, 0 br i1 %cmp12, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %sum.014 = phi i32 [ 100000, %for.body.preheader.new ], [ %sum.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %sum.014 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %conv1.fr = freeze i32 %conv1 %rem = srem i32 %conv1.fr, 1000 %cmp2.not = icmp eq i32 %rem, 0 %2 = add i32 %conv1.fr, 1000 %mul4 = sub i32 %2, %rem %sum.1 = select i1 %cmp2.not, i32 %conv1.fr, i32 %mul4 %conv.1 = sitofp i32 %sum.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %conv1.fr.1 = freeze i32 %conv1.1 %rem.1 = srem i32 %conv1.fr.1, 1000 %cmp2.not.1 = icmp eq i32 %rem.1, 0 %3 = add i32 %conv1.fr.1, 1000 %mul4.1 = sub i32 %3, %rem.1 %sum.1.1 = select i1 %cmp2.not.1, i32 %conv1.fr.1, i32 %mul4.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %4 = sitofp i32 %sum.1.1 to double %5 = fmul double %4, 1.050000e+00 %6 = fptosi double %5 to i32 %7 = freeze i32 %6 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %sum.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %sum.014.unr = phi i32 [ 105000, %for.body.preheader ], [ %7, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %sum.014.unr, 1000 %cmp2.not.epil = icmp eq i32 %rem.epil, 0 %8 = add i32 %sum.014.unr, 1000 %mul4.epil = sub i32 %8, %rem.epil %sum.1.epil = select i1 %cmp2.not.epil, i32 %sum.014.unr, i32 %mul4.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %sum.0.lcssa = phi i32 [ 100000, %entry ], [ %sum.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %sum.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(){ int n; int i; int debt; debt = 100000; scanf("%d",&n); for(i=0;i<n;i++){ debt *= 1.05; if(debt%1000>0){ debt = (debt/1000 + 1) * 1000; } } printf("%d\n",debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166345/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166345/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp sgt i32 %0, 0 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %debt.012 = phi i32 [ 100000, %for.body.preheader.new ], [ %debt.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %debt.012 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %conv1.fr = freeze i32 %conv1 %rem = srem i32 %conv1.fr, 1000 %cmp2 = icmp sgt i32 %rem, 0 %2 = add i32 %conv1.fr, 1000 %mul4 = sub i32 %2, %rem %debt.1 = select i1 %cmp2, i32 %mul4, i32 %conv1.fr %conv.1 = sitofp i32 %debt.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %conv1.fr.1 = freeze i32 %conv1.1 %rem.1 = srem i32 %conv1.fr.1, 1000 %cmp2.1 = icmp sgt i32 %rem.1, 0 %3 = add i32 %conv1.fr.1, 1000 %mul4.1 = sub i32 %3, %rem.1 %debt.1.1 = select i1 %cmp2.1, i32 %mul4.1, i32 %conv1.fr.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %4 = sitofp i32 %debt.1.1 to double %5 = fmul double %4, 1.050000e+00 %6 = fptosi double %5 to i32 %7 = freeze i32 %6 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %debt.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %debt.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %debt.012.unr = phi i32 [ 105000, %for.body.preheader ], [ %7, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %debt.012.unr, 1000 %cmp2.epil = icmp sgt i32 %rem.epil, 0 %8 = add i32 %debt.012.unr, 1000 %mul4.epil = sub i32 %8, %rem.epil %debt.1.epil = select i1 %cmp2.epil, i32 %mul4.epil, i32 %debt.012.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %debt.0.lcssa = phi i32 [ 100000, %entry ], [ %debt.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %debt.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %debt.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int i,n,m; m=100000; scanf("%d",&n); for (i=0;i<n;i++){ m*=1.05; int a=m%1000; if (a!=0){ m+=1000-a; } } printf("%d\n",(int)m); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166396/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166396/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp sgt i32 %0, 0 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %m.011 = phi i32 [ 100000, %for.body.preheader.new ], [ %m.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %m.011 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %rem = srem i32 %conv1, 1000 %cmp2.not = icmp eq i32 %rem, 0 %reass.sub = add i32 %conv1, 1000 %add = sub i32 %reass.sub, %rem %m.1 = select i1 %cmp2.not, i32 %conv1, i32 %add %conv.1 = sitofp i32 %m.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %rem.1 = srem i32 %conv1.1, 1000 %cmp2.not.1 = icmp eq i32 %rem.1, 0 %reass.sub.1 = add i32 %conv1.1, 1000 %add.1 = sub i32 %reass.sub.1, %rem.1 %m.1.1 = select i1 %cmp2.not.1, i32 %conv1.1, i32 %add.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %2 = sitofp i32 %m.1.1 to double %3 = fmul double %2, 1.050000e+00 %4 = fptosi double %3 to i32 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %m.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %m.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %m.011.unr = phi i32 [ 105000, %for.body.preheader ], [ %4, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %m.011.unr, 1000 %cmp2.not.epil = icmp eq i32 %rem.epil, 0 %reass.sub.epil = add i32 %m.011.unr, 1000 %add.epil = sub i32 %reass.sub.epil, %rem.epil %m.1.epil = select i1 %cmp2.not.epil, i32 %m.011.unr, i32 %add.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %m.0.lcssa = phi i32 [ 100000, %entry ], [ %m.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %m.1.epil, %for.body.epil ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %m.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int n, i; long debt = 100000; scanf("%d",&n); for(i = 0; i < n; i++){ debt *= 1.05; if(debt % 1000 != 0){ debt -= (debt % 1000); debt += 1000; } } printf("%ld\n",debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166446/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166446/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %0, 0 br i1 %cmp12, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %debt.014 = phi i64 [ 100000, %for.body.preheader.new ], [ %debt.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i64 %debt.014 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i64 %rem = srem i64 %conv1, 1000 %cmp2.not = icmp eq i64 %rem, 0 %sub = add i64 %conv1, 1000 %add = sub i64 %sub, %rem %debt.1 = select i1 %cmp2.not, i64 %conv1, i64 %add %conv.1 = sitofp i64 %debt.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i64 %rem.1 = srem i64 %conv1.1, 1000 %cmp2.not.1 = icmp eq i64 %rem.1, 0 %sub.1 = add i64 %conv1.1, 1000 %add.1 = sub i64 %sub.1, %rem.1 %debt.1.1 = select i1 %cmp2.not.1, i64 %conv1.1, i64 %add.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %2 = sitofp i64 %debt.1.1 to double %3 = fmul double %2, 1.050000e+00 %4 = fptosi double %3 to i64 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %debt.1.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %debt.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %debt.014.unr = phi i64 [ 105000, %for.body.preheader ], [ %4, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i64 %debt.014.unr, 1000 %cmp2.not.epil = icmp eq i64 %rem.epil, 0 %sub.epil = add i64 %debt.014.unr, 1000 %add.epil = sub i64 %sub.epil, %rem.epil %debt.1.epil = select i1 %cmp2.not.epil, i64 %debt.014.unr, i64 %add.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %debt.0.lcssa = phi i64 [ 100000, %entry ], [ %debt.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %debt.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %debt.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int max(int a, int b) { if (a > b) return a; return b; } int max_time(int arr[], int k, int n) { int l_m = (arr[1] - 1) + 1; int r_m = (n - arr[k]) + 1; int b_m = 1, val; for (int i = 2; i <= k; i++) { val = ((arr[i] - arr[i-1]) / 2) + 1; if (val > b_m) b_m = val; } return max(l_m, max(r_m, b_m)); } int main(void) { int t, n, k, arr[201]; scanf("%d", &t); for (int i = 0; i < t; i++) { scanf("%d", &n); scanf("%d", &k); for (int j = 0; j <= k; j++) arr[j] = 0; for (int j = 1; j <= k; j++) scanf("%d", &arr[j]); printf("%d\n", max_time(arr, k, n)); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16649/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16649/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i32 @max_time(ptr nocapture noundef readonly %arr, i32 noundef %k, i32 noundef %n) local_unnamed_addr #1 { entry: %arrayidx = getelementptr inbounds i32, ptr %arr, i64 1 %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %idxprom = sext i32 %k to i64 %arrayidx1 = getelementptr inbounds i32, ptr %arr, i64 %idxprom %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %cmp.not23 = icmp slt i32 %k, 2 br i1 %cmp.not23, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %entry %2 = add nuw i32 %k, 1 %wide.trip.count = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count, 1 %3 = icmp eq i32 %2, 3 br i1 %3, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %4 = and i64 %wide.trip.count, 4294967294 %5 = add nsw i64 %4, -4 br label %for.body for.cond.cleanup.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %spec.select.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %spec.select.1, %for.body ] %.unr = phi i32 [ %0, %for.body.preheader ], [ %9, %for.body ] %indvars.iv.unr = phi i64 [ 2, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %b_m.024.unr = phi i32 [ 1, %for.body.preheader ], [ %spec.select.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil for.body.epil: ; preds = %for.cond.cleanup.loopexit.unr-lcssa %arrayidx5.epil = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.unr %6 = load i32, ptr %arrayidx5.epil, align 4, !tbaa !5 %sub9.epil = sub nsw i32 %6, %.unr %div.epil = sdiv i32 %sub9.epil, 2 %cmp11.not.epil = icmp slt i32 %div.epil, %b_m.024.unr %add10.epil = add nsw i32 %div.epil, 1 %spec.select.epil = select i1 %cmp11.not.epil, i32 %b_m.024.unr, i32 %add10.epil br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body.epil, %for.cond.cleanup.loopexit.unr-lcssa, %entry %b_m.0.lcssa = phi i32 [ 1, %entry ], [ %spec.select.lcssa.ph, %for.cond.cleanup.loopexit.unr-lcssa ], [ %spec.select.epil, %for.body.epil ] %sub2 = add i32 %n, 1 %add3 = sub i32 %sub2, %1 %a.b.i = tail call i32 @llvm.smax.i32(i32 %add3, i32 %b_m.0.lcssa) %a.b.i22 = tail call i32 @llvm.smax.i32(i32 %0, i32 %a.b.i) ret i32 %a.b.i22 for.body: ; preds = %for.body, %for.body.preheader.new %7 = phi i32 [ %0, %for.body.preheader.new ], [ %9, %for.body ] %indvars.iv = phi i64 [ 2, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %b_m.024 = phi i32 [ 1, %for.body.preheader.new ], [ %spec.select.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx5 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv %8 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %sub9 = sub nsw i32 %8, %7 %div = sdiv i32 %sub9, 2 %cmp11.not = icmp slt i32 %div, %b_m.024 %add10 = add nsw i32 %div, 1 %spec.select = select i1 %cmp11.not, i32 %b_m.024, i32 %add10 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx5.1 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.next %9 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5 %sub9.1 = sub nsw i32 %9, %8 %div.1 = sdiv i32 %sub9.1, 2 %cmp11.not.1 = icmp slt i32 %div.1, %spec.select %add10.1 = add nsw i32 %div.1, 1 %spec.select.1 = select i1 %cmp11.not.1, i32 %spec.select, i32 %add10.1 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter, %5 br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 %k = alloca i32, align 4 %arr = alloca [201 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #7 call void @llvm.lifetime.start.p0(i64 804, ptr nonnull %arr) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp34 = icmp sgt i32 %0, 0 br i1 %cmp34, label %for.body.lr.ph, label %for.cond.cleanup for.body.lr.ph: ; preds = %entry %arrayidx.i = getelementptr inbounds i32, ptr %arr, i64 1 br label %for.body for.cond.cleanup: ; preds = %max_time.exit, %entry call void @llvm.lifetime.end.p0(i64 804, ptr nonnull %arr) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #7 ret i32 0 for.body: ; preds = %for.body.lr.ph, %max_time.exit %i.035 = phi i32 [ 0, %for.body.lr.ph ], [ %inc21, %max_time.exit ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %1 = load i32, ptr %k, align 4, !tbaa !5 %cmp4.not29 = icmp slt i32 %1, 0 br i1 %cmp4.not29, label %for.cond.cleanup10.thread, label %for.cond8.preheader for.cond8.preheader: ; preds = %for.body %2 = add nuw i32 %1, 1 %3 = zext i32 %2 to i64 %4 = shl nuw nsw i64 %3, 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %arr, i8 0, i64 %4, i1 false), !tbaa !5 %cmp9.not31 = icmp eq i32 %1, 0 br i1 %cmp9.not31, label %for.cond.cleanup10.thread, label %for.body11 for.cond.cleanup10.thread: ; preds = %for.cond8.preheader, %for.body %.pre = sext i32 %1 to i64 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %arrayidx1.i41 = getelementptr inbounds i32, ptr %arr, i64 %.pre %7 = load i32, ptr %arrayidx1.i41, align 4, !tbaa !5 br label %max_time.exit for.cond.cleanup10: ; preds = %for.body11 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %arrayidx1.i = getelementptr inbounds i32, ptr %arr, i64 %23 %10 = load i32, ptr %arrayidx1.i, align 4, !tbaa !5 %cmp.not23.i = icmp slt i32 %.pr, 2 br i1 %cmp.not23.i, label %max_time.exit, label %for.body.preheader.i for.body.preheader.i: ; preds = %for.cond.cleanup10 %11 = add nuw nsw i32 %.pr, 1 %wide.trip.count.i = zext i32 %11 to i64 %xtraiter = and i64 %wide.trip.count.i, 1 %12 = icmp eq i32 %11, 3 br i1 %12, label %max_time.exit.loopexit.unr-lcssa, label %for.body.preheader.i.new for.body.preheader.i.new: ; preds = %for.body.preheader.i %13 = and i64 %wide.trip.count.i, 4294967294 %14 = add nsw i64 %13, -4 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.preheader.i.new %15 = phi i32 [ %9, %for.body.preheader.i.new ], [ %17, %for.body.i ] %indvars.iv.i = phi i64 [ 2, %for.body.preheader.i.new ], [ %indvars.iv.next.i.1, %for.body.i ] %b_m.024.i = phi i32 [ 1, %for.body.preheader.i.new ], [ %spec.select.i.1, %for.body.i ] %niter = phi i64 [ 0, %for.body.preheader.i.new ], [ %niter.next.1, %for.body.i ] %arrayidx5.i = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.i %16 = load i32, ptr %arrayidx5.i, align 8, !tbaa !5 %sub9.i = sub nsw i32 %16, %15 %div.i = sdiv i32 %sub9.i, 2 %cmp11.not.i = icmp slt i32 %div.i, %b_m.024.i %add10.i = add nsw i32 %div.i, 1 %spec.select.i = select i1 %cmp11.not.i, i32 %b_m.024.i, i32 %add10.i %indvars.iv.next.i = or i64 %indvars.iv.i, 1 %arrayidx5.i.1 = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.next.i %17 = load i32, ptr %arrayidx5.i.1, align 4, !tbaa !5 %sub9.i.1 = sub nsw i32 %17, %16 %div.i.1 = sdiv i32 %sub9.i.1, 2 %cmp11.not.i.1 = icmp slt i32 %div.i.1, %spec.select.i %add10.i.1 = add nsw i32 %div.i.1, 1 %spec.select.i.1 = select i1 %cmp11.not.i.1, i32 %spec.select.i, i32 %add10.i.1 %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter, %14 br i1 %niter.ncmp.1, label %max_time.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !9 max_time.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.preheader.i %spec.select.i.lcssa.ph = phi i32 [ undef, %for.body.preheader.i ], [ %spec.select.i.1, %for.body.i ] %.unr = phi i32 [ %9, %for.body.preheader.i ], [ %17, %for.body.i ] %indvars.iv.i.unr = phi i64 [ 2, %for.body.preheader.i ], [ %indvars.iv.next.i.1, %for.body.i ] %b_m.024.i.unr = phi i32 [ 1, %for.body.preheader.i ], [ %spec.select.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %max_time.exit, label %for.body.i.epil for.body.i.epil: ; preds = %max_time.exit.loopexit.unr-lcssa %arrayidx5.i.epil = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv.i.unr %18 = load i32, ptr %arrayidx5.i.epil, align 4, !tbaa !5 %sub9.i.epil = sub nsw i32 %18, %.unr %div.i.epil = sdiv i32 %sub9.i.epil, 2 %cmp11.not.i.epil = icmp slt i32 %div.i.epil, %b_m.024.i.unr %add10.i.epil = add nsw i32 %div.i.epil, 1 %spec.select.i.epil = select i1 %cmp11.not.i.epil, i32 %b_m.024.i.unr, i32 %add10.i.epil br label %max_time.exit max_time.exit: ; preds = %for.body.i.epil, %max_time.exit.loopexit.unr-lcssa, %for.cond.cleanup10.thread, %for.cond.cleanup10 %19 = phi i32 [ %10, %for.cond.cleanup10 ], [ %7, %for.cond.cleanup10.thread ], [ %10, %max_time.exit.loopexit.unr-lcssa ], [ %10, %for.body.i.epil ] %20 = phi i32 [ %9, %for.cond.cleanup10 ], [ %6, %for.cond.cleanup10.thread ], [ %9, %max_time.exit.loopexit.unr-lcssa ], [ %9, %for.body.i.epil ] %21 = phi i32 [ %8, %for.cond.cleanup10 ], [ %5, %for.cond.cleanup10.thread ], [ %8, %max_time.exit.loopexit.unr-lcssa ], [ %8, %for.body.i.epil ] %b_m.0.lcssa.i = phi i32 [ 1, %for.cond.cleanup10 ], [ 1, %for.cond.cleanup10.thread ], [ %spec.select.i.lcssa.ph, %max_time.exit.loopexit.unr-lcssa ], [ %spec.select.i.epil, %for.body.i.epil ] %sub2.i = add i32 %21, 1 %add3.i = sub i32 %sub2.i, %19 %a.b.i.i = call i32 @llvm.smax.i32(i32 %add3.i, i32 %b_m.0.lcssa.i) %a.b.i22.i = call i32 @llvm.smax.i32(i32 %20, i32 %a.b.i.i) %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %a.b.i22.i) %inc21 = add nuw nsw i32 %i.035, 1 %22 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc21, %22 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !11 for.body11: ; preds = %for.cond8.preheader, %for.body11 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body11 ], [ 1, %for.cond8.preheader ] %arrayidx13 = getelementptr inbounds [201 x i32], ptr %arr, i64 0, i64 %indvars.iv %call14 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx13) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %.pr = load i32, ptr %k, align 4, !tbaa !5 %23 = sext i32 %.pr to i64 %cmp9.not.not = icmp slt i64 %indvars.iv, %23 br i1 %cmp9.not.not, label %for.body11, label %for.cond.cleanup10, !llvm.loop !12 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main() { long long int i,c,t,n,h,p,k,x[2000],a[2000]; scanf("%lld",&t); while(t--) { scanf("%lld%lld",&n,&k); for(i=0;i<k;++i) {scanf("%lld",&x[i]); x[i]--; } p=0; c=0; h=0; for(i=0;i<n;++i) a[i]=0; while(c<n) { for(i=0;i<k;++i) { if(x[i]>=p&&(x[i]-p)<=n-1&&a[x[i]-p]==0) {a[x[i]-p]=-1; c++;} if(x[i]+p<=n-1&&a[x[i]+p]==0) { a[x[i]+p]=-1; c++; } } p++; h++; } printf("%lld\n",h); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16654/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16654/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i64, align 8 %n = alloca i64, align 8 %k = alloca i64, align 8 %x = alloca [2000 x i64], align 16 %a = alloca [2000 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %t) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.start.p0(i64 16000, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 16000, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i64, ptr %t, align 8, !tbaa !5 %dec98 = add nsw i64 %0, -1 store i64 %dec98, ptr %t, align 8, !tbaa !5 %tobool.not99 = icmp eq i64 %0, 0 br i1 %tobool.not99, label %while.end52, label %while.body while.body: ; preds = %entry, %while.end %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n, ptr noundef nonnull %k) %1 = load i64, ptr %k, align 8, !tbaa !5 %cmp79 = icmp sgt i64 %1, 0 br i1 %cmp79, label %for.body, label %for.cond5.preheader for.cond5.preheader: ; preds = %for.body, %while.body %.lcssa = phi i64 [ %1, %while.body ], [ %4, %for.body ] %2 = load i64, ptr %n, align 8, !tbaa !5 %cmp681 = icmp sgt i64 %2, 0 br i1 %cmp681, label %for.cond15.preheader.lr.ph, label %while.end for.body: ; preds = %while.body, %for.body %i.080 = phi i64 [ %inc, %for.body ], [ 0, %while.body ] %arrayidx = getelementptr inbounds [2000 x i64], ptr %x, i64 0, i64 %i.080 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %3 = load i64, ptr %arrayidx, align 8, !tbaa !5 %dec4 = add nsw i64 %3, -1 store i64 %dec4, ptr %arrayidx, align 8, !tbaa !5 %inc = add nuw nsw i64 %i.080, 1 %4 = load i64, ptr %k, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %4 br i1 %cmp, label %for.body, label %for.cond5.preheader, !llvm.loop !9 for.cond15.preheader.lr.ph: ; preds = %for.cond5.preheader %5 = shl nuw i64 %2, 3 call void @llvm.memset.p0.i64(ptr nonnull align 16 %a, i8 0, i64 %5, i1 false), !tbaa !5 %cmp1684 = icmp sgt i64 %.lcssa, 0 br i1 %cmp1684, label %for.cond15.preheader.us, label %for.cond15.preheader.us93 for.cond15.preheader.us: ; preds = %for.cond15.preheader.lr.ph, %for.cond15.for.end48_crit_edge.us %p.091.us = phi i64 [ %inc49.us, %for.cond15.for.end48_crit_edge.us ], [ 0, %for.cond15.preheader.lr.ph ] %c.089.us = phi i64 [ %c.3.us, %for.cond15.for.end48_crit_edge.us ], [ 0, %for.cond15.preheader.lr.ph ] br label %for.body17.us for.body17.us: ; preds = %for.cond15.preheader.us, %for.inc46.us %c.186.us = phi i64 [ %c.089.us, %for.cond15.preheader.us ], [ %c.3.us, %for.inc46.us ] %i.285.us = phi i64 [ 0, %for.cond15.preheader.us ], [ %inc47.us, %for.inc46.us ] %arrayidx18.us = getelementptr inbounds [2000 x i64], ptr %x, i64 0, i64 %i.285.us %6 = load i64, ptr %arrayidx18.us, align 8, !tbaa !5 %cmp19.not.us = icmp slt i64 %6, %p.091.us br i1 %cmp19.not.us, label %if.end.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body17.us %sub.us = sub nsw i64 %6, %p.091.us %cmp22.not.not.us = icmp slt i64 %sub.us, %2 br i1 %cmp22.not.not.us, label %land.lhs.true23.us, label %if.end.us land.lhs.true23.us: ; preds = %land.lhs.true.us %arrayidx26.us = getelementptr inbounds [2000 x i64], ptr %a, i64 0, i64 %sub.us %7 = load i64, ptr %arrayidx26.us, align 8, !tbaa !5 %cmp27.us = icmp eq i64 %7, 0 br i1 %cmp27.us, label %if.then.us, label %if.end.us if.then.us: ; preds = %land.lhs.true23.us store i64 -1, ptr %arrayidx26.us, align 8, !tbaa !5 %inc31.us = add nsw i64 %c.186.us, 1 br label %if.end.us if.end.us: ; preds = %if.then.us, %land.lhs.true23.us, %land.lhs.true.us, %for.body17.us %c.2.us = phi i64 [ %inc31.us, %if.then.us ], [ %c.186.us, %land.lhs.true23.us ], [ %c.186.us, %land.lhs.true.us ], [ %c.186.us, %for.body17.us ] %add.us = add nsw i64 %6, %p.091.us %cmp34.not.not.us = icmp slt i64 %add.us, %2 br i1 %cmp34.not.not.us, label %land.lhs.true35.us, label %for.inc46.us land.lhs.true35.us: ; preds = %if.end.us %arrayidx38.us = getelementptr inbounds [2000 x i64], ptr %a, i64 0, i64 %add.us %8 = load i64, ptr %arrayidx38.us, align 8, !tbaa !5 %cmp39.us = icmp eq i64 %8, 0 br i1 %cmp39.us, label %if.then40.us, label %for.inc46.us if.then40.us: ; preds = %land.lhs.true35.us store i64 -1, ptr %arrayidx38.us, align 8, !tbaa !5 %inc44.us = add nsw i64 %c.2.us, 1 br label %for.inc46.us for.inc46.us: ; preds = %if.then40.us, %land.lhs.true35.us, %if.end.us %c.3.us = phi i64 [ %inc44.us, %if.then40.us ], [ %c.2.us, %land.lhs.true35.us ], [ %c.2.us, %if.end.us ] %inc47.us = add nuw nsw i64 %i.285.us, 1 %exitcond.not = icmp eq i64 %inc47.us, %.lcssa br i1 %exitcond.not, label %for.cond15.for.end48_crit_edge.us, label %for.body17.us, !llvm.loop !11 for.cond15.for.end48_crit_edge.us: ; preds = %for.inc46.us %inc49.us = add nuw i64 %p.091.us, 1 %cmp13.us = icmp slt i64 %c.3.us, %2 br i1 %cmp13.us, label %for.cond15.preheader.us, label %while.end, !llvm.loop !12 for.cond15.preheader.us93: ; preds = %for.cond15.preheader.lr.ph, %for.cond15.preheader.us93 br label %for.cond15.preheader.us93 while.end: ; preds = %for.cond15.for.end48_crit_edge.us, %for.cond5.preheader %h.0.lcssa = phi i64 [ 0, %for.cond5.preheader ], [ %inc49.us, %for.cond15.for.end48_crit_edge.us ] %call51 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %h.0.lcssa) %9 = load i64, ptr %t, align 8, !tbaa !5 %dec = add nsw i64 %9, -1 store i64 %dec, ptr %t, align 8, !tbaa !5 %tobool.not = icmp eq i64 %9, 0 br i1 %tobool.not, label %while.end52, label %while.body, !llvm.loop !13 while.end52: ; preds = %while.end, %entry call void @llvm.lifetime.end.p0(i64 16000, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 16000, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main(){ int debt=100000; int n,i,rs=0,tmp=0,ans=0; scanf("%d",&n); for(i=0;i<n;i++){ debt=debt*1.05; if(debt%1000!=0){ debt=(debt/1000+1)*1000; } } printf("%d\n",debt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166583/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166583/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp sgt i32 %0, 0 br i1 %cmp10, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %xtraiter = and i32 %0, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %0, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %debt.012 = phi i32 [ 100000, %for.body.preheader.new ], [ %debt.1.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %conv = sitofp i32 %debt.012 to double %mul = fmul double %conv, 1.050000e+00 %conv1 = fptosi double %mul to i32 %conv1.fr = freeze i32 %conv1 %rem = srem i32 %conv1.fr, 1000 %cmp2.not = icmp eq i32 %rem, 0 %2 = add i32 %conv1.fr, 1000 %mul4 = sub i32 %2, %rem %debt.1 = select i1 %cmp2.not, i32 %conv1.fr, i32 %mul4 %conv.1 = sitofp i32 %debt.1 to double %mul.1 = fmul double %conv.1, 1.050000e+00 %conv1.1 = fptosi double %mul.1 to i32 %conv1.fr.1 = freeze i32 %conv1.1 %rem.1 = srem i32 %conv1.fr.1, 1000 %cmp2.not.1 = icmp eq i32 %rem.1, 0 %3 = add i32 %conv1.fr.1, 1000 %mul4.1 = sub i32 %3, %rem.1 %debt.1.1 = select i1 %cmp2.not.1, i32 %conv1.fr.1, i32 %mul4.1 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %4 = sitofp i32 %debt.1.1 to double %5 = fmul double %4, 1.050000e+00 %6 = fptosi double %5 to i32 %7 = freeze i32 %6 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %debt.1.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %debt.1.1, %for.end.loopexit.unr-lcssa.loopexit ] %debt.012.unr = phi i32 [ 105000, %for.body.preheader ], [ %7, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %rem.epil = srem i32 %debt.012.unr, 1000 %cmp2.not.epil = icmp eq i32 %rem.epil, 0 %8 = add i32 %debt.012.unr, 1000 %mul4.epil = sub i32 %8, %rem.epil %debt.1.epil = select i1 %cmp2.not.epil, i32 %debt.012.unr, i32 %mul4.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %debt.0.lcssa = phi i32 [ 100000, %entry ], [ %debt.1.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %debt.1.epil, %for.body.epil ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %debt.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int func(char s[]){ int h=strlen(s),i=0,j; j=h-1; while(s[i]==s[j]){ i++; j--; if(i>j) break; } if(h%2==1&&i==h/2+1) return 1; else if(h%2==0&&i==h/2) return 1; else return 0; } int main(){ int x,k=0; char s[1000]; while(scanf("%s",s)!=EOF){ if(func(s)) k++; } printf("%d\n",k); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166626/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166626/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i32 @func(ptr nocapture noundef readonly %s) local_unnamed_addr #0 { entry: %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %conv = trunc i64 %call to i32 %sub = shl i64 %call, 32 %sext = add i64 %sub, -4294967296 %0 = ashr exact i64 %sext, 32 br label %while.cond while.cond: ; preds = %while.body, %entry %indvars.iv36 = phi i64 [ %indvars.iv.next37, %while.body ], [ %0, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i8, ptr %s, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !5 %arrayidx3 = getelementptr inbounds i8, ptr %s, i64 %indvars.iv36 %2 = load i8, ptr %arrayidx3, align 1, !tbaa !5 %cmp = icmp eq i8 %1, %2 br i1 %cmp, label %while.body, label %while.end while.body: ; preds = %while.cond %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %indvars.iv.next37 = add nsw i64 %indvars.iv36, -1 %cmp6.not = icmp slt i64 %indvars.iv, %indvars.iv.next37 br i1 %cmp6.not, label %while.cond, label %while.end, !llvm.loop !8 while.end: ; preds = %while.body, %while.cond %i.1.in = phi i64 [ %indvars.iv.next, %while.body ], [ %indvars.iv, %while.cond ] %i.1 = trunc i64 %i.1.in to i32 %rem = srem i32 %conv, 2 %div17.old = sdiv i32 %conv, 2 switch i32 %rem, label %if.else21 [ i32 1, label %land.lhs.true i32 0, label %land.lhs.true16 ] land.lhs.true: ; preds = %while.end %div = sdiv i32 %conv, 2 %add = add nsw i32 %div, 1 %cmp10 = icmp eq i32 %add, %i.1 br i1 %cmp10, label %cleanup, label %if.else21 land.lhs.true16: ; preds = %while.end %cmp18.old = icmp eq i32 %div17.old, %i.1 br i1 %cmp18.old, label %cleanup, label %if.else21 if.else21: ; preds = %land.lhs.true, %while.end, %land.lhs.true16 br label %cleanup cleanup: ; preds = %land.lhs.true16, %land.lhs.true, %if.else21 %retval.0 = phi i32 [ 0, %if.else21 ], [ 1, %land.lhs.true ], [ 1, %land.lhs.true16 ] ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %s = alloca [1000 x i8], align 16 call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %s) #6 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %cmp.not9 = icmp eq i32 %call8, -1 br i1 %cmp.not9, label %while.end, label %while.body while.body: ; preds = %entry, %while.cond %k.010 = phi i32 [ %3, %while.cond ], [ 0, %entry ] %call.i = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %conv.i = trunc i64 %call.i to i32 %sub.i = shl i64 %call.i, 32 %sext.i = add i64 %sub.i, -4294967296 %0 = ashr exact i64 %sext.i, 32 br label %while.cond.i while.cond.i: ; preds = %while.body.i, %while.body %indvars.iv36.i = phi i64 [ %indvars.iv.next37.i, %while.body.i ], [ %0, %while.body ] %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %while.body.i ], [ 0, %while.body ] %arrayidx.i = getelementptr inbounds i8, ptr %s, i64 %indvars.iv.i %1 = load i8, ptr %arrayidx.i, align 1, !tbaa !5 %arrayidx3.i = getelementptr inbounds i8, ptr %s, i64 %indvars.iv36.i %2 = load i8, ptr %arrayidx3.i, align 1, !tbaa !5 %cmp.i = icmp eq i8 %1, %2 br i1 %cmp.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %while.cond.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %indvars.iv.next37.i = add nsw i64 %indvars.iv36.i, -1 %cmp6.not.i = icmp slt i64 %indvars.iv.i, %indvars.iv.next37.i br i1 %cmp6.not.i, label %while.cond.i, label %while.end.i, !llvm.loop !8 while.end.i: ; preds = %while.body.i, %while.cond.i %i.1.in.i = phi i64 [ %indvars.iv.next.i, %while.body.i ], [ %indvars.iv.i, %while.cond.i ] %i.1.i = trunc i64 %i.1.in.i to i32 %rem.i = srem i32 %conv.i, 2 %div17.old.i = sdiv i32 %conv.i, 2 switch i32 %rem.i, label %while.cond [ i32 1, label %land.lhs.true.i i32 0, label %land.lhs.true16.i ] land.lhs.true.i: ; preds = %while.end.i %div.i = sdiv i32 %conv.i, 2 %add.i = add nsw i32 %div.i, 1 %cmp10.i = icmp eq i32 %add.i, %i.1.i br i1 %cmp10.i, label %func.exit.thread, label %while.cond land.lhs.true16.i: ; preds = %while.end.i %cmp18.old.i = icmp eq i32 %div17.old.i, %i.1.i br i1 %cmp18.old.i, label %func.exit.thread, label %while.cond func.exit.thread: ; preds = %land.lhs.true.i, %land.lhs.true16.i %inc7 = add nsw i32 %k.010, 1 br label %while.cond while.cond: ; preds = %while.end.i, %land.lhs.true.i, %land.lhs.true16.i, %func.exit.thread %3 = phi i32 [ %inc7, %func.exit.thread ], [ %k.010, %land.lhs.true16.i ], [ %k.010, %land.lhs.true.i ], [ %k.010, %while.end.i ] %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !10 while.end: ; preds = %while.cond, %entry %k.0.lcssa = phi i32 [ 0, %entry ], [ %3, %while.cond ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %k.0.lcssa) call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %s) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 attributes #0 = { nofree nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind willreturn memory(read) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include<stdio.h> #include<string.h> int fact(int a[1002],int n) { int i,s=0; for(i=1;i<=n;i++) { s+=a[i]; } return s; } int main() { int t,i; scanf("%d\n",&t); for(i=1;i<=t;i++) { int n,m,j,k; scanf("%d %d\n",&n,&m); int a[1002],b[1002],c[1002]; memset(a,0,sizeof(a)); memset(b,0,sizeof(b)); memset(c,0,sizeof(c)); for(j=1;j<=n;j++) { a[j]=1; } for(j=1;j<=m;j++) { scanf("%d",&b[j]); c[j]=b[j]; } for(j=1;;j++) { for(k=1;k<=m;k++) { a[b[k]]=0; a[c[k]]=0; b[k]++; c[k]--; if(c[k]<=0) { c[k]=0; } } if(fact(a,n)==0) { break; } } printf("%d\n",j); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @fact(ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #0 { entry: %cmp.not4 = icmp slt i32 %n, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = add nuw i32 %n, 1 %wide.trip.count = zext i32 %0 to i64 %1 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader10, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, -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 ], [ %4, %vector.body ] %vec.phi8 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %5, %vector.body ] %offset.idx = or i64 %index, 1 %2 = getelementptr inbounds i32, ptr %a, i64 %offset.idx %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 %wide.load9 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = add <4 x i32> %wide.load, %vec.phi %5 = add <4 x i32> %wide.load9, %vec.phi8 %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %5, %4 %7 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader10 for.body.preheader10: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] %s.06.ph = phi i32 [ 0, %for.body.preheader ], [ %7, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader10, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader10 ] %s.06 = phi i32 [ %add, %for.body ], [ %s.06.ph, %for.body.preheader10 ] %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %8 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %8, %s.06 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %s.0.lcssa = phi i32 [ 0, %entry ], [ %7, %middle.block ], [ %add, %for.body ] ret i32 %s.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 %m = alloca i32, align 4 %a = alloca [1002 x i32], align 16 %b = alloca [1002 x i32], align 16 %c = alloca [1002 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp.not87 = icmp slt i32 %0, 1 br i1 %cmp.not87, label %for.end56, label %for.body for.body: ; preds = %entry, %for.end52 %i.088 = phi i32 [ %inc55, %for.end52 ], [ 1, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #6 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n, ptr noundef nonnull %m) call void @llvm.lifetime.start.p0(i64 4008, ptr nonnull %a) #6 call void @llvm.lifetime.start.p0(i64 4008, ptr nonnull %b) #6 call void @llvm.lifetime.start.p0(i64 4008, ptr nonnull %c) #6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4008) %a, i8 0, i64 4008, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4008) %b, i8 0, i64 4008, i1 false) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4008) %c, i8 0, i64 4008, i1 false) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp5.not76 = icmp slt i32 %1, 1 br i1 %cmp5.not76, label %for.cond7.preheader, label %for.body6.preheader for.body6.preheader: ; preds = %for.body %2 = add nuw i32 %1, 1 %wide.trip.count = zext i32 %2 to i64 %3 = add nsw i64 %wide.trip.count, -1 %min.iters.check136 = icmp ult i32 %1, 8 br i1 %min.iters.check136, label %for.body6.preheader150, label %vector.ph137 vector.ph137: ; preds = %for.body6.preheader %n.vec139 = and i64 %3, -8 %ind.end140 = or i64 %n.vec139, 1 br label %vector.body143 vector.body143: ; preds = %vector.body143, %vector.ph137 %index144 = phi i64 [ 0, %vector.ph137 ], [ %index.next146, %vector.body143 ] %offset.idx145 = or i64 %index144, 1 %4 = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %offset.idx145 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %4, align 4, !tbaa !5 %5 = getelementptr inbounds i32, ptr %4, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %5, align 4, !tbaa !5 %index.next146 = add nuw i64 %index144, 8 %6 = icmp eq i64 %index.next146, %n.vec139 br i1 %6, label %middle.block134, label %vector.body143, !llvm.loop !14 middle.block134: ; preds = %vector.body143 %cmp.n142 = icmp eq i64 %3, %n.vec139 br i1 %cmp.n142, label %for.cond7.preheader, label %for.body6.preheader150 for.body6.preheader150: ; preds = %for.body6.preheader, %middle.block134 %indvars.iv.ph = phi i64 [ 1, %for.body6.preheader ], [ %ind.end140, %middle.block134 ] br label %for.body6 for.cond7.preheader: ; preds = %for.body6, %middle.block134, %for.body %7 = load i32, ptr %m, align 4, !tbaa !5 %cmp8.not78 = icmp slt i32 %7, 1 br i1 %cmp8.not78, label %for.cond20.preheader, label %for.body9 for.body6: ; preds = %for.body6.preheader150, %for.body6 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body6 ], [ %indvars.iv.ph, %for.body6.preheader150 ] %arrayidx = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %indvars.iv store i32 1, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond7.preheader, label %for.body6, !llvm.loop !15 for.cond20.preheader.loopexit: ; preds = %for.body9 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond20.preheader for.cond20.preheader: ; preds = %for.cond20.preheader.loopexit, %for.cond7.preheader %8 = phi i32 [ %1, %for.cond7.preheader ], [ %.pre, %for.cond20.preheader.loopexit ] %.lcssa = phi i32 [ %7, %for.cond7.preheader ], [ %24, %for.cond20.preheader.loopexit ] %cmp22.not80 = icmp slt i32 %.lcssa, 1 %cmp.not4.i = icmp slt i32 %8, 1 %9 = add i32 %8, 1 %wide.trip.count.i = zext i32 %9 to i64 br i1 %cmp.not4.i, label %for.cond20.preheader.split.us, label %for.cond20.preheader.split for.cond20.preheader.split.us: ; preds = %for.cond20.preheader br i1 %cmp22.not80, label %for.end52, label %for.body23.us.preheader for.body23.us.preheader: ; preds = %for.cond20.preheader.split.us %10 = add nuw i32 %.lcssa, 1 %wide.trip.count105 = zext i32 %10 to i64 br label %for.body23.us for.body23.us: ; preds = %for.body23.us.preheader, %for.body23.us %indvars.iv102 = phi i64 [ 1, %for.body23.us.preheader ], [ %indvars.iv.next103, %for.body23.us ] %arrayidx25.us = getelementptr inbounds [1002 x i32], ptr %b, i64 0, i64 %indvars.iv102 %11 = load i32, ptr %arrayidx25.us, align 4, !tbaa !5 %idxprom26.us = sext i32 %11 to i64 %arrayidx27.us = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %idxprom26.us store i32 0, ptr %arrayidx27.us, align 4, !tbaa !5 %arrayidx29.us = getelementptr inbounds [1002 x i32], ptr %c, i64 0, i64 %indvars.iv102 %12 = load i32, ptr %arrayidx29.us, align 4, !tbaa !5 %idxprom30.us = sext i32 %12 to i64 %arrayidx31.us = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %idxprom30.us store i32 0, ptr %arrayidx31.us, align 4, !tbaa !5 %inc34.us = add nsw i32 %11, 1 store i32 %inc34.us, ptr %arrayidx25.us, align 4, !tbaa !5 %dec.us = add nsw i32 %12, -1 %cmp39.us = icmp slt i32 %12, 2 %spec.select.us = select i1 %cmp39.us, i32 0, i32 %dec.us store i32 %spec.select.us, ptr %arrayidx29.us, align 4, !tbaa !5 %indvars.iv.next103 = add nuw nsw i64 %indvars.iv102, 1 %exitcond106.not = icmp eq i64 %indvars.iv.next103, %wide.trip.count105 br i1 %exitcond106.not, label %for.end52, label %for.body23.us, !llvm.loop !16 for.cond20.preheader.split: ; preds = %for.cond20.preheader br i1 %cmp22.not80, label %for.cond20.us82.preheader, label %for.cond20.preheader90 for.cond20.us82.preheader: ; preds = %for.cond20.preheader.split %13 = add nsw i64 %wide.trip.count.i, -1 %min.iters.check = icmp ult i64 %13, 8 %n.vec = and i64 %13, -8 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %13, %n.vec br label %for.cond20.us82 for.cond20.preheader90: ; preds = %for.cond20.preheader.split %14 = add nuw i32 %.lcssa, 1 %wide.trip.count100 = zext i32 %14 to i64 %15 = add nsw i64 %wide.trip.count.i, -1 %min.iters.check117 = icmp ult i64 %15, 8 %n.vec120 = and i64 %15, -8 %ind.end121 = or i64 %n.vec120, 1 %cmp.n123 = icmp eq i64 %15, %n.vec120 br label %for.cond20 for.cond20.us82: ; preds = %for.cond20.us82.preheader, %fact.exit.us %j.2.us83 = phi i32 [ %inc51.us, %fact.exit.us ], [ 1, %for.cond20.us82.preheader ] br i1 %min.iters.check, label %for.body.i.us.preheader, label %vector.body vector.body: ; preds = %for.cond20.us82, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %for.cond20.us82 ] %vec.phi = phi <4 x i32> [ %18, %vector.body ], [ zeroinitializer, %for.cond20.us82 ] %vec.phi113 = phi <4 x i32> [ %19, %vector.body ], [ zeroinitializer, %for.cond20.us82 ] %offset.idx = or i64 %index, 1 %16 = getelementptr inbounds i32, ptr %a, i64 %offset.idx %wide.load = load <4 x i32>, ptr %16, align 4, !tbaa !5 %17 = getelementptr inbounds i32, ptr %16, i64 4 %wide.load114 = load <4 x i32>, ptr %17, align 4, !tbaa !5 %18 = add <4 x i32> %wide.load, %vec.phi %19 = add <4 x i32> %wide.load114, %vec.phi113 %index.next = add nuw i64 %index, 8 %20 = icmp eq i64 %index.next, %n.vec br i1 %20, label %middle.block, label %vector.body, !llvm.loop !17 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %19, %18 %21 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) br i1 %cmp.n, label %fact.exit.us, label %for.body.i.us.preheader for.body.i.us.preheader: ; preds = %for.cond20.us82, %middle.block %indvars.iv.i.us.ph = phi i64 [ 1, %for.cond20.us82 ], [ %ind.end, %middle.block ] %s.06.i.us.ph = phi i32 [ 0, %for.cond20.us82 ], [ %21, %middle.block ] br label %for.body.i.us for.body.i.us: ; preds = %for.body.i.us.preheader, %for.body.i.us %indvars.iv.i.us = phi i64 [ %indvars.iv.next.i.us, %for.body.i.us ], [ %indvars.iv.i.us.ph, %for.body.i.us.preheader ] %s.06.i.us = phi i32 [ %add.i.us, %for.body.i.us ], [ %s.06.i.us.ph, %for.body.i.us.preheader ] %arrayidx.i.us = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.i.us %22 = load i32, ptr %arrayidx.i.us, align 4, !tbaa !5 %add.i.us = add nsw i32 %22, %s.06.i.us %indvars.iv.next.i.us = add nuw nsw i64 %indvars.iv.i.us, 1 %exitcond.not.i.us = icmp eq i64 %indvars.iv.next.i.us, %wide.trip.count.i br i1 %exitcond.not.i.us, label %fact.exit.us, label %for.body.i.us, !llvm.loop !18 fact.exit.us: ; preds = %for.body.i.us, %middle.block %add.i.us.lcssa = phi i32 [ %21, %middle.block ], [ %add.i.us, %for.body.i.us ] %cmp47.us = icmp eq i32 %add.i.us.lcssa, 0 %inc51.us = add nuw nsw i32 %j.2.us83, 1 br i1 %cmp47.us, label %for.end52, label %for.cond20.us82 for.body9: ; preds = %for.cond7.preheader, %for.body9 %indvars.iv94 = phi i64 [ %indvars.iv.next95, %for.body9 ], [ 1, %for.cond7.preheader ] %arrayidx11 = getelementptr inbounds [1002 x i32], ptr %b, i64 0, i64 %indvars.iv94 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %arrayidx11) %23 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [1002 x i32], ptr %c, i64 0, i64 %indvars.iv94 store i32 %23, ptr %arrayidx16, align 4, !tbaa !5 %indvars.iv.next95 = add nuw nsw i64 %indvars.iv94, 1 %24 = load i32, ptr %m, align 4, !tbaa !5 %25 = sext i32 %24 to i64 %cmp8.not.not = icmp slt i64 %indvars.iv94, %25 br i1 %cmp8.not.not, label %for.body9, label %for.cond20.preheader.loopexit, !llvm.loop !19 for.cond20: ; preds = %for.cond20.preheader90, %fact.exit %j.2 = phi i32 [ %inc51, %fact.exit ], [ 1, %for.cond20.preheader90 ] br label %for.body23 for.body23: ; preds = %for.cond20, %for.body23 %indvars.iv97 = phi i64 [ 1, %for.cond20 ], [ %indvars.iv.next98, %for.body23 ] %arrayidx25 = getelementptr inbounds [1002 x i32], ptr %b, i64 0, i64 %indvars.iv97 %26 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %idxprom26 = sext i32 %26 to i64 %arrayidx27 = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %idxprom26 store i32 0, ptr %arrayidx27, align 4, !tbaa !5 %arrayidx29 = getelementptr inbounds [1002 x i32], ptr %c, i64 0, i64 %indvars.iv97 %27 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %idxprom30 = sext i32 %27 to i64 %arrayidx31 = getelementptr inbounds [1002 x i32], ptr %a, i64 0, i64 %idxprom30 store i32 0, ptr %arrayidx31, align 4, !tbaa !5 %inc34 = add nsw i32 %26, 1 store i32 %inc34, ptr %arrayidx25, align 4, !tbaa !5 %dec = add nsw i32 %27, -1 %cmp39 = icmp slt i32 %27, 2 %spec.select = select i1 %cmp39, i32 0, i32 %dec store i32 %spec.select, ptr %arrayidx29, align 4, !tbaa !5 %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1 %exitcond101.not = icmp eq i64 %indvars.iv.next98, %wide.trip.count100 br i1 %exitcond101.not, label %for.body.i.preheader, label %for.body23, !llvm.loop !16 for.body.i.preheader: ; preds = %for.body23 br i1 %min.iters.check117, label %for.body.i.preheader147, label %vector.body124 vector.body124: ; preds = %for.body.i.preheader, %vector.body124 %index125 = phi i64 [ %index.next131, %vector.body124 ], [ 0, %for.body.i.preheader ] %vec.phi126 = phi <4 x i32> [ %30, %vector.body124 ], [ zeroinitializer, %for.body.i.preheader ] %vec.phi127 = phi <4 x i32> [ %31, %vector.body124 ], [ zeroinitializer, %for.body.i.preheader ] %offset.idx128 = or i64 %index125, 1 %28 = getelementptr inbounds i32, ptr %a, i64 %offset.idx128 %wide.load129 = load <4 x i32>, ptr %28, align 4, !tbaa !5 %29 = getelementptr inbounds i32, ptr %28, i64 4 %wide.load130 = load <4 x i32>, ptr %29, align 4, !tbaa !5 %30 = add <4 x i32> %wide.load129, %vec.phi126 %31 = add <4 x i32> %wide.load130, %vec.phi127 %index.next131 = add nuw i64 %index125, 8 %32 = icmp eq i64 %index.next131, %n.vec120 br i1 %32, label %middle.block115, label %vector.body124, !llvm.loop !20 middle.block115: ; preds = %vector.body124 %bin.rdx132 = add <4 x i32> %31, %30 %33 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx132) br i1 %cmp.n123, label %fact.exit, label %for.body.i.preheader147 for.body.i.preheader147: ; preds = %for.body.i.preheader, %middle.block115 %indvars.iv.i.ph = phi i64 [ 1, %for.body.i.preheader ], [ %ind.end121, %middle.block115 ] %s.06.i.ph = phi i32 [ 0, %for.body.i.preheader ], [ %33, %middle.block115 ] br label %for.body.i for.body.i: ; preds = %for.body.i.preheader147, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader147 ] %s.06.i = phi i32 [ %add.i, %for.body.i ], [ %s.06.i.ph, %for.body.i.preheader147 ] %arrayidx.i = getelementptr inbounds i32, ptr %a, i64 %indvars.iv.i %34 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %add.i = add nsw i32 %34, %s.06.i %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %fact.exit, label %for.body.i, !llvm.loop !21 fact.exit: ; preds = %for.body.i, %middle.block115 %add.i.lcssa = phi i32 [ %33, %middle.block115 ], [ %add.i, %for.body.i ] %cmp47 = icmp eq i32 %add.i.lcssa, 0 %inc51 = add nuw nsw i32 %j.2, 1 br i1 %cmp47, label %for.end52, label %for.cond20 for.end52: ; preds = %fact.exit, %fact.exit.us, %for.body23.us, %for.cond20.preheader.split.us %.us-phi = phi i32 [ 1, %for.cond20.preheader.split.us ], [ 1, %for.body23.us ], [ %j.2.us83, %fact.exit.us ], [ %j.2, %fact.exit ] %call53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.us-phi) call void @llvm.lifetime.end.p0(i64 4008, ptr nonnull %c) #6 call void @llvm.lifetime.end.p0(i64 4008, ptr nonnull %b) #6 call void @llvm.lifetime.end.p0(i64 4008, ptr nonnull %a) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 %inc55 = add nuw nsw i32 %i.088, 1 %35 = load i32, ptr %t, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %i.088, %35 br i1 %cmp.not.not, label %for.body, label %for.end56, !llvm.loop !22 for.end56: ; preds = %for.end52, %entry 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; 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(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11} !14 = distinct !{!14, !10, !11, !12} !15 = distinct !{!15, !10, !12, !11} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !11, !12} !18 = distinct !{!18, !10, !12, !11} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10, !11, !12} !21 = distinct !{!21, !10, !12, !11} !22 = distinct !{!22, !10}
#include <stdio.h> int main() { int N; scanf("%d", &N); printf("%d", N * N * N); fflush(stdout); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166712/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166712/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %mul1) %1 = load ptr, ptr @stdout, align 8, !tbaa !9 %call3 = call i32 @fflush(ptr noundef %1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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}
#include<stdio.h> int main(void) { int N; scanf("%d",&N); printf("%d\n",N*N*N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166756/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { unsigned long long int n,x,y; scanf("%I64d %I64d %I64d", &n,&x,&y); if (x + y <= n + 1) { printf("White"); } else { printf("Black"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1668/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1668/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [18 x i8] c"%I64d %I64d %I64d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"White\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"Black\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %x = alloca i64, align 8 %y = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i64, ptr %x, align 8, !tbaa !5 %1 = load i64, ptr %y, align 8, !tbaa !5 %add = add i64 %1, %0 %2 = load i64, ptr %n, align 8, !tbaa !5 %add1 = add i64 %2, 1 %cmp.not = icmp ugt i64 %add, %add1 %.str.2..str.1 = select i1 %cmp.not, ptr @.str.2, ptr @.str.1 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2..str.1) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int N; scanf("%d",&N); printf("%d\n",N*N*N); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166842/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166842/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int main() { int a; while(~scanf("%d",&a)) { printf("%d\n",a*a*a); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166886/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166886/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %tobool.not4 = icmp eq i32 %call3, -1 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %tobool.not = icmp eq i32 %call, -1 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <math.h> int main (){ int N,sum; scanf("%d",&N); sum = pow(N,3); printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166929/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166929/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %conv = sitofp i32 %0 to double %call1 = call double @pow(double noundef %conv, double noundef 3.000000e+00) #4 %conv2 = fptosi double %call1 to i32 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int N,A; scanf("%d", &N); A = N * N * N; printf("%d", A); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_166972/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_166972/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <stdlib.h> int main() { int n; scanf("%d", &n); printf("%d",n*n*n); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167014/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167014/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int n; scanf("%d",&n); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167058/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167058/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int n; scanf("%d",&n); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167100/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167100/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int n; scanf("%d",&n); printf("%d\n",n*n*n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167144/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167144/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %mul1 = mul nsw i32 %mul, %0 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define FOR(n) for(int i=0;i<n;i++) #define FORJ(n) for(int j=0;j<n;j++) #define PRN(n) printf("%d\n",n) #define PRF(n) printf("%lf\n",n) #define PRL(n) printf("%lld\n",n) #define PRS(s) printf("%s\n",s) #define PRC(c) printf("%c",c) #define mod 1000000007 typedef long long int ll; int u(const void *a, const void *b){ return *(ll*)a-*(ll*)b; } int d(const void *a, const void *b){ return *(ll*)b-*(ll*)a; } int z(int a){ if(a<1)a*=-1; return a; } int min(int a,int b){ if(a>b)return b; return a; } int max(int a,int b){ if(a>b)return a; return b; } int gcd(int a,int b){ if(!b)return a; return gcd(b,a%b); } int kt(ll a){ int sum=0; while(a){ a/=10; sum++; } return sum; } int ks(ll a){ int sum=0; while(a){ sum+=a%10; a/=10; } return sum; } int main(void){ int a,j=1; scanf("%d",&a); FOR(3)j*=a; PRN(j); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167188/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167188/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @u(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %a, align 8, !tbaa !5 %1 = load i64, ptr %b, align 8, !tbaa !5 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @d(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %0 = load i64, ptr %b, align 8, !tbaa !5 %1 = load i64, ptr %a, align 8, !tbaa !5 %sub = sub nsw i64 %0, %1 %conv = trunc i64 %sub to i32 ret i32 %conv } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @z(i32 noundef %a) local_unnamed_addr #1 { entry: %spec.select = tail call i32 @llvm.abs.i32(i32 %a, i1 true) ret i32 %spec.select } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %b.a = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %b.a } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i32 %b, 0 br i1 %tobool.not4, label %return, label %if.end if.end: ; preds = %entry, %if.end %b.tr6 = phi i32 [ %rem, %if.end ], [ %b, %entry ] %a.tr5 = phi i32 [ %b.tr6, %if.end ], [ %a, %entry ] %rem = srem i32 %a.tr5, %b.tr6 %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %return, label %if.end return: ; preds = %if.end, %entry %a.tr.lcssa = phi i32 [ %a, %entry ], [ %b.tr6, %if.end ] ret i32 %a.tr.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @kt(i64 noundef %a) local_unnamed_addr #2 { entry: %tobool.not3 = icmp eq i64 %a, 0 br i1 %tobool.not3, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %sum.05 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %a.addr.04 = phi i64 [ %div, %while.body ], [ %a, %entry ] %div = sdiv i64 %a.addr.04, 10 %inc = add nuw nsw i32 %sum.05, 1 %a.addr.04.off = add i64 %a.addr.04, 9 %tobool.not = icmp ult i64 %a.addr.04.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] ret i32 %sum.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @ks(i64 noundef %a) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i64 %a, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %sum.07 = phi i32 [ %conv1, %while.body ], [ 0, %entry ] %a.addr.06 = phi i64 [ %div, %while.body ], [ %a, %entry ] %rem = srem i64 %a.addr.06, 10 %0 = trunc i64 %rem to i32 %conv1 = add i32 %sum.07, %0 %div = sdiv i64 %a.addr.06, 10 %a.addr.06.off = add i64 %a.addr.06, 9 %tobool.not = icmp ult i64 %a.addr.06.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %while.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %conv1, %while.body ] ret i32 %sum.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %a = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %0 = load i32, ptr %a, align 4, !tbaa !12 %mul.1 = mul nsw i32 %0, %0 %mul.2 = mul nsw i32 %0, %mul.1 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #7 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!13, !13, i64 0} !13 = !{!"int", !7, i64 0}
#include <stdio.h> #include <math.h> #include <stdlib.h> #include <string.h> //prototype declaration //gloval variable double PI = 3.1415926535897932384626433; int MOD = 10007; int main(void){ char s[101]; scanf("%s", s); int l = strlen(s); printf("%c%d%c\n", s[0], l-2, s[l-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167230/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167230/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @PI = dso_local local_unnamed_addr global double 0x400921FB54442D18, align 8 @MOD = dso_local local_unnamed_addr global i32 10007, align 4 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%c%d%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %conv = trunc i64 %call2 to i32 %0 = load i8, ptr %s, align 16, !tbaa !5 %conv3 = sext i8 %0 to i32 %sub = add nsw i32 %conv, -2 %sub4 = shl i64 %call2, 32 %sext = add i64 %sub4, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx5 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %idxprom %1 = load i8, ptr %arrayidx5, align 1, !tbaa !5 %conv6 = sext i8 %1 to i32 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv3, i32 noundef %sub, i32 noundef %conv6) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
/* ex6_2 bonbonc */ #include<stdio.h> #include<string.h> int main(void){ char str[101];/*文字列を格納する配列*/ int length;/*文字列の長さ*/ scanf("%s",str);/*文字列を受け取る*/ length = (int)strlen(str);/*lengthに文字列の長さを格納する*/ printf("%c",str[0]);/*先頭の文字を出力*/ printf("%d",length-2)/*文字列の長さ-2を出力*/; printf("%c\n",str[length-1])/*最後の文字を出力して改行*/; return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167274/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %str) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #6 %conv = trunc i64 %call2 to i32 %0 = load i8, ptr %str, align 16, !tbaa !5 %conv3 = sext i8 %0 to i32 %putchar = call i32 @putchar(i32 %conv3) %sub = add nsw i32 %conv, -2 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) %sub6 = shl i64 %call2, 32 %sext = add i64 %sub6, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx7 = getelementptr inbounds [101 x i8], ptr %str, i64 0, i64 %idxprom %1 = load i8, ptr %arrayidx7, align 1, !tbaa !5 %conv8 = sext i8 %1 to i32 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %conv8) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %str) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
/*6_2 hightierra*/ #include <stdio.h> #include <string.h> #define SIZE 101 int main(void){ char sentence[SIZE]; int wordcount; // 標準入力で文字列を取得 scanf("%s",sentence); // 文字数の取得 wordcount = strlen(sentence); printf("%c%d%c\n",sentence[0],wordcount-2,sentence[wordcount-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167317/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167317/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%c%d%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %sentence = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %sentence) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %sentence) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %sentence) #5 %conv = trunc i64 %call2 to i32 %0 = load i8, ptr %sentence, align 16, !tbaa !5 %conv3 = sext i8 %0 to i32 %sub = add nsw i32 %conv, -2 %sub4 = shl i64 %call2, 32 %sext = add i64 %sub4, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx5 = getelementptr inbounds [101 x i8], ptr %sentence, i64 0, i64 %idxprom %1 = load i8, ptr %arrayidx5, align 1, !tbaa !5 %conv6 = sext i8 %1 to i32 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv3, i32 noundef %sub, i32 noundef %conv6) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %sentence) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { char s[101]; int i; i = 0; scanf("%s",&s); printf("%c",s[0]); while (s[i]) { i++; } printf("%d",i-2); printf("%c",s[i-1]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167360/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167360/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 16, !tbaa !5 %conv = sext i8 %0 to i32 %putchar = call i32 @putchar(i32 %conv) br label %while.cond while.cond: ; preds = %while.cond, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ 0, %entry ] %arrayidx2 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx2, align 1, !tbaa !5 %tobool.not = icmp eq i8 %1, 0 %indvars.iv.next = add nuw i64 %indvars.iv, 1 br i1 %tobool.not, label %while.end, label %while.cond, !llvm.loop !8 while.end: ; preds = %while.cond %2 = trunc i64 %indvars.iv to i32 %sub = add nsw i32 %2, -2 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) %sub4 = shl i64 %indvars.iv, 32 %sext = add i64 %sub4, -4294967296 %idxprom5 = ashr exact i64 %sext, 32 %arrayidx6 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %idxprom5 %3 = load i8, ptr %arrayidx6, align 1, !tbaa !5 %conv7 = sext i8 %3 to i32 %putchar12 = call i32 @putchar(i32 %conv7) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <stdbool.h> #include <string.h> /*以下便利なマクロを定義する。*/ #define rep(i, min, max) for(i=min; i<=max; i=i+1) #define if_forall(i, min, max, prop)\ \ rep(i, min, max)\ {\ if(!(prop))\ {\ break;\ }\ }\ \ if(i==max+1)\ #define if_exists(i, min, max, prop)\ \ rep(i, min, max)\ {\ if(prop)\ {\ break;\ }\ }\ \ if(i<max+1)\ #define sum(i, min, max, sequence, answer)\ {\ answer=0;\ rep(i, min, max)\ {\ answer=answer+sequence;\ }\ }\ #define prod(i, min, max, sequence, answer)\ {\ answer=1;\ rep(i, min, max)\ {\ answer=answer*sequence;\ }\ }\ /*以下便利な関数を定義する。*/ void fill_int(int array[], int min, int max, int element) { int i=min; rep(i, min, max) { array[i]=element; } } void fill_char(char array[], int min, int max, char element) { int i=min; rep(i, min, max) { array[i]=element; } } void swap_int(int* x, int* y) { int tmp; tmp = *x; *x = *y; *y = tmp; } void swap_int_array(int x[], int y[], int min, int max) { int i; rep(i, min, max) { swap_int(&x[i], &y[i]); } } void swap_char(char* x, char* y) { char tmp; tmp = *x; *x = *y; *y = tmp; } void swap_char_array(char x[], char y[], int min, int max) { int i; rep(i, min, max) { swap_char(&x[i], &y[i]); } } void reverse_char(char array[], int min, int max) { int i; rep(i, min, (min+max)/2) { swap_char(&array[i], &array[min+max-i]); } } int max_int(int var1, int var2) { int answer=var1; if(answer<var2) { answer=var2; } return answer; } int min_int(int var1, int var2) { int answer=var1; if(answer>var2) { answer=var2; } return answer; } long int pow_int(int base, unsigned int exponent) { long int answer=1; answer=(long int)pow((double)base, (double)exponent); return answer; } long int pow_int_mod(int base, unsigned int exponent, int mod) { long int answer=1; while (exponent>0) { if (exponent&1) { answer=(answer*(base%mod))%mod; if(answer==0) { break; } } base=(base*base)%mod; exponent=exponent>>1; } return answer; } unsigned long int factorial(unsigned int num) { unsigned int i=0; unsigned long int answer=1; rep(i, 2, num) { answer=answer*i; } return answer; } unsigned long int factorial_mod(unsigned int num, int mod) { unsigned int i=0; unsigned long int answer=1; rep(i, 2, num) { answer=(answer*(i%mod))%mod; if(answer==0) { break; } } return answer; } unsigned long int combination(unsigned int n, unsigned int k) { unsigned int i=0; unsigned long int numerator=1; unsigned long int denominator=1; k=min_int(k, n-k); rep(i, 2, k) { numerator=numerator*(n+1-i); denominator=denominator*i; } return numerator/denominator; } double combination_general(double alpha, unsigned int k) { unsigned int i; double numerator=1; unsigned long int denominator=1; rep(i, 1, k) { numerator=numerator*(alpha+1-i); denominator=denominator*i; } return numerator/denominator; } int gcd(int a, int b) { if(a<b) { swap_int(&a, &b); } int r=a%b; while(r!=0) { a=b; b=r; r=a%b; } return b; } int lcm(int a, int b) { return (a/gcd(a, b))*b; } int order(long int num) { int answer=-1; while(num!=0) { num=num/10; answer=answer+1; } return answer; } long int convert_adic_int(char num[], unsigned int p_adic, unsigned int q_adic) { int i=0; long int answer=0; bool sgn=0; long int tmp=strtol(num, NULL, p_adic); if(tmp<0) { sgn=1; tmp=-tmp; } while(tmp>0) { answer=answer+(tmp%q_adic)*pow_int(10, i); tmp=tmp/q_adic; i=i+1; } if(sgn==0) { return answer; } else { return -answer; } } void convert_adic_char(char num[], unsigned int p_adic, unsigned int q_adic) { int i=0; int mod[32]={0}; bool sgn=0; int digit=0; long int tmp=strtol(num, NULL, p_adic); if(tmp<0) { sgn=1; tmp=-tmp; } while(tmp>0) { mod[i]=tmp%q_adic; digit=i; tmp=tmp/q_adic; i=i+1; } fill_char(num, 0, strlen(num)-1, '\0'); if(sgn==1) { num[0]='-'; } rep(i, 0, digit) { if(mod[i]<10) { num[sgn+digit-i]='0'+mod[i]; } else if(mod[i]<q_adic) { num[sgn+digit-i]='a'+(mod[i]-10); } } } int count_mod(int min, int max, int num) { if(min>0) { return max/num-(min-1)/num; } else if(min==0) { return max/num+1; } else { return -1; } } void shift_char(char array[], int min, int max, int num) { int i; for(i=max; i>=min; i=i-1) { array[i+num]=array[i]; } rep(i, min, min+num-1) { array[i]='\0'; } } void convert_char(char array[], int min, int max, char pre, char post) { int i=min; rep(i, min, max) { if(array[i]==pre) { array[i]=post; } } } void sort_asc_int(int array[], int min, int max) { int i, j; rep(i, min, max) { rep(j, i+1, max) { if(array[i]>array[j]) { swap_int(&array[i], &array[j]); } } } } void sort_des_int(int array[], int min, int max) { int i, j; rep(i, min, max) { rep(j, i+1, max) { if(array[i]<array[j]) { swap_int(&array[i], &array[j]); } } } } void sort_asc_char_dic(int size, char array[][size], int min, int max) { int i, j; rep(i, min, max) { rep(j, i+1, max) { if(strcmp(array[i], array[j])>0) { swap_char_array(array[i], array[j], 0, size-1); } } } } void sort_des_char_dic(int size, char array[][size], int min, int max) { int i, j; rep(i, min, max) { rep(j, i+1, max) { if(strcmp(array[i], array[j])<0) { swap_char_array(array[i], array[j], 0, size-1); } } } } int max_int_array(int array[], int min, int max) { int i; int answer; answer=array[min]; for(i=min+1; i<=max; i=i+1) { answer=max_int(answer, array[i]); } return answer; } void max_int_array_num(int array[], int min, int max, int answer[]) { int i=min; int count=0; int max_value=max_int_array(array, min, max); fill_int(answer, 0, max-min, -1); rep(i, min, max) { if(array[i]==max_value) { answer[count]=i; count=count+1; } } } int min_int_array(int array[], int min, int max) { int i; int answer; answer=array[min]; for(i=min+1; i<=max; i=i+1) { answer=min_int(answer, array[i]); } return answer; } void min_int_array_num(int array[], int min, int max, int answer[]) { int i=min; int count=0; int min_value=min_int_array(array, min, max); fill_int(answer, 0, max-min, -1); rep(i, min, max) { if(array[i]==min_value) { answer[count]=i; count=count+1; } } } int max_char_dic(int size, char array[][size], int min, int max) { int i; int answer=min; rep(i, min+1, max) { if(strcmp(array[answer], array[i])<0) { answer=i; } } return answer; } int min_char_dic(int size, char array[][size], int min, int max) { int i; int answer=min; rep(i, min+1, max) { if(strcmp(array[answer], array[i])>0) { answer=i; } } return answer; } int sum_array(int array[], int min, int max) { int i=min; int answer=0; rep(i, min, max) { answer=answer+array[i]; } return answer; } bool detect_int(int array[], int min, int max, int element) { int i; bool answer=0; if_exists(i, min, max, array[i]==element) { answer=1; } return answer; } bool detect_char(char array[], int min, int max, char element[], int start, int goal) { int i, j; bool answer=0; if(goal-start<=max-min) { for(i=min; i<=max-(goal-start); i=i+1) { if_forall(j, start, goal, array[i+j-start]==element[j]) { answer=1; break; } } } return answer; } int count_differentelement_int(int array[], int min, int max) { int i=min; int pickup[max]; fill_int(pickup, 0, max, 0); int answer=0; rep(i, min, max) { if(detect_int(pickup, 0, answer-1, array[i])==0) { pickup[answer]=array[i]; answer=answer+1; } } return answer; } int count_differentelement_char(char array[], int min, int max) { int i=min; char pickup[max]; fill_char(pickup, 0, max, '\0'); int answer=0; rep(i, min, max) { if(detect_char(pickup, 0, answer-1, array, i, i)==0) { pickup[answer]=array[i]; answer=answer+1; } } return answer; } int count_equalelement_int(int array[], int min, int max, int element) { int i; int answer=0; rep(i, min, max) { if(array[i]==element) { answer=answer+1; } } return answer; } int count_equalelement_char(char array[], int min, int max, char element) { int i; int answer=0; rep(i, min, max) { if(array[i]==element) { answer=answer+1; } } return answer; } void scanf_int_array(int array[], int min, int max) { int i; rep(i, min, max) { scanf("%d", &array[i]); } } void scanf_int_array_2(int array1[], int array2[], int min, int max) { int i; rep(i, min, max) { scanf("%d %d", &array1[i], &array2[i]); } } void scanf_int_array_3(int array1[], int array2[], int array3[], int min, int max) { int i; rep(i, min, max) { scanf("%d %d %d", &array1[i], &array2[i], &array3[i]); } } void scanf_char_array(char array[], int num) { scanf("%s", array); shift_char(array, 0, strlen(array)-1, num); } void printf_int_array(int array[], int min, int max) { int i; rep(i, min, max) { printf("%d\n", array[i]); } } void printf_char_array(char array[], int min, int max) { int i; for(i=min; i<=max; i=i+1) { printf("%c", array[i]); } } int main() { int i=0; char s[101]={}; scanf("%s", s); printf("%c%lu%c\n", s[0], strlen(s)-2, s[strlen(s)-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167410/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167410/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.6 = private unnamed_addr constant [9 x i8] c"%c%lu%c\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write) uwtable define dso_local void @fill_int(ptr nocapture noundef writeonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #0 { entry: %cmp.not4 = icmp sgt i32 %min, %max br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec, %0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %element, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %0 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index store <4 x i32> %broadcast.splat, ptr %gep, align 4, !tbaa !5 %5 = getelementptr inbounds i32, ptr %gep, i64 4 store <4 x i32> %broadcast.splat, ptr %5, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader7 ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv store i32 %element, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %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: mustprogress nofree nosync nounwind willreturn memory(argmem: write) uwtable define dso_local void @fill_char(ptr nocapture noundef writeonly %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %element) local_unnamed_addr #2 { entry: %cmp.not4 = icmp sgt i32 %min, %max br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %scevgep = getelementptr i8, ptr %array, i64 %0 %1 = sub i32 %max, %min %2 = zext i32 %1 to i64 %3 = add nuw nsw i64 %2, 1 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 %element, i64 %3, i1 false), !tbaa !14 br label %for.end for.end: ; preds = %for.body.preheader, %entry ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap_int(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #3 { entry: %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 store i32 %1, ptr %x, align 4, !tbaa !5 store i32 %0, ptr %y, align 4, !tbaa !5 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @swap_int_array(ptr nocapture noundef %x, ptr nocapture noundef %y, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 { entry: %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 15 br i1 %min.iters.check, label %for.body.preheader15, label %vector.memcheck vector.memcheck: ; preds = %for.body.preheader %5 = shl nsw i64 %0, 2 %scevgep = getelementptr i8, ptr %x, i64 %5 %6 = sub i32 %max, %min %7 = zext i32 %6 to i64 %8 = add nsw i64 %0, %7 %9 = shl nsw i64 %8, 2 %10 = add nsw i64 %9, 4 %scevgep9 = getelementptr i8, ptr %x, i64 %10 %scevgep10 = getelementptr i8, ptr %y, i64 %5 %scevgep11 = getelementptr i8, ptr %y, i64 %10 %bound0 = icmp ult ptr %scevgep, %scevgep11 %bound1 = icmp ult ptr %scevgep10, %scevgep9 %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %for.body.preheader15, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec, %0 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = add i64 %index, %0 %11 = getelementptr inbounds i32, ptr %x, i64 %offset.idx %12 = getelementptr inbounds i32, ptr %y, i64 %offset.idx %wide.load = load <4 x i32>, ptr %11, align 4, !tbaa !5, !alias.scope !15, !noalias !18 %13 = getelementptr inbounds i32, ptr %11, i64 4 %wide.load12 = load <4 x i32>, ptr %13, align 4, !tbaa !5, !alias.scope !15, !noalias !18 %wide.load13 = load <4 x i32>, ptr %12, align 4, !tbaa !5, !alias.scope !18 %14 = getelementptr inbounds i32, ptr %12, i64 4 %wide.load14 = load <4 x i32>, ptr %14, align 4, !tbaa !5, !alias.scope !18 store <4 x i32> %wide.load13, ptr %11, align 4, !tbaa !5, !alias.scope !15, !noalias !18 store <4 x i32> %wide.load14, ptr %13, align 4, !tbaa !5, !alias.scope !15, !noalias !18 store <4 x i32> %wide.load, ptr %12, align 4, !tbaa !5, !alias.scope !18 store <4 x i32> %wide.load12, ptr %14, align 4, !tbaa !5, !alias.scope !18 %index.next = add nuw i64 %index, 8 %15 = icmp eq i64 %index.next, %n.vec br i1 %15, label %middle.block, label %vector.body, !llvm.loop !20 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader15 for.body.preheader15: ; preds = %vector.memcheck, %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %0, %vector.memcheck ], [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] %16 = add i32 %max, 1 %17 = trunc i64 %indvars.iv.ph to i32 %18 = sub i32 %16, %17 %xtraiter = and i32 %18, 1 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader15 %arrayidx.prol = getelementptr inbounds i32, ptr %x, i64 %indvars.iv.ph %arrayidx2.prol = getelementptr inbounds i32, ptr %y, i64 %indvars.iv.ph %19 = load i32, ptr %arrayidx.prol, align 4, !tbaa !5 %20 = load i32, ptr %arrayidx2.prol, align 4, !tbaa !5 store i32 %20, ptr %arrayidx.prol, align 4, !tbaa !5 store i32 %19, ptr %arrayidx2.prol, align 4, !tbaa !5 %indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, 1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader15 %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader15 ], [ %indvars.iv.next.prol, %for.body.prol ] %21 = icmp eq i32 %17, %max br i1 %21, label %for.end, label %for.body for.body: ; preds = %for.body.prol.loopexit, %for.body %indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ] %arrayidx = getelementptr inbounds i32, ptr %x, i64 %indvars.iv %arrayidx2 = getelementptr inbounds i32, ptr %y, i64 %indvars.iv %22 = load i32, ptr %arrayidx, align 4, !tbaa !5 %23 = load i32, ptr %arrayidx2, align 4, !tbaa !5 store i32 %23, ptr %arrayidx, align 4, !tbaa !5 store i32 %22, ptr %arrayidx2, align 4, !tbaa !5 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i32, ptr %x, i64 %indvars.iv.next %arrayidx2.1 = getelementptr inbounds i32, ptr %y, i64 %indvars.iv.next %24 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %25 = load i32, ptr %arrayidx2.1, align 4, !tbaa !5 store i32 %25, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %24, ptr %arrayidx2.1, align 4, !tbaa !5 %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32 %exitcond.not.1 = icmp eq i32 %1, %lftr.wideiv.1 br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !21 for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %entry ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap_char(ptr nocapture noundef %x, ptr nocapture noundef %y) local_unnamed_addr #3 { entry: %0 = load i8, ptr %x, align 1, !tbaa !14 %1 = load i8, ptr %y, align 1, !tbaa !14 store i8 %1, ptr %x, align 1, !tbaa !14 store i8 %0, ptr %y, align 1, !tbaa !14 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @swap_char_array(ptr nocapture noundef %x, ptr nocapture noundef %y, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 { entry: %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %iter.check iter.check: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader, label %vector.memcheck vector.memcheck: ; preds = %iter.check %scevgep = getelementptr i8, ptr %x, i64 %0 %5 = sub i32 %max, %min %6 = zext i32 %5 to i64 %7 = add nsw i64 %0, %6 %8 = add nsw i64 %7, 1 %scevgep9 = getelementptr i8, ptr %x, i64 %8 %scevgep10 = getelementptr i8, ptr %y, i64 %0 %scevgep11 = getelementptr i8, ptr %y, i64 %8 %bound0 = icmp ult ptr %scevgep, %scevgep11 %bound1 = icmp ult ptr %scevgep10, %scevgep9 %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %for.body.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck %min.iters.check12 = icmp ult i32 %2, 31 br i1 %min.iters.check12, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %4, 8589934560 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = add i64 %index, %0 %9 = getelementptr inbounds i8, ptr %x, i64 %offset.idx %10 = getelementptr inbounds i8, ptr %y, i64 %offset.idx %wide.load = load <16 x i8>, ptr %9, align 1, !tbaa !14, !alias.scope !22, !noalias !25 %11 = getelementptr inbounds i8, ptr %9, i64 16 %wide.load13 = load <16 x i8>, ptr %11, align 1, !tbaa !14, !alias.scope !22, !noalias !25 %wide.load14 = load <16 x i8>, ptr %10, align 1, !tbaa !14, !alias.scope !25 %12 = getelementptr inbounds i8, ptr %10, i64 16 %wide.load15 = load <16 x i8>, ptr %12, align 1, !tbaa !14, !alias.scope !25 store <16 x i8> %wide.load14, ptr %9, align 1, !tbaa !14, !alias.scope !22, !noalias !25 store <16 x i8> %wide.load15, ptr %11, align 1, !tbaa !14, !alias.scope !22, !noalias !25 store <16 x i8> %wide.load, ptr %10, align 1, !tbaa !14, !alias.scope !25 store <16 x i8> %wide.load13, ptr %12, align 1, !tbaa !14, !alias.scope !25 %index.next = add nuw i64 %index, 32 %13 = icmp eq i64 %index.next, %n.vec br i1 %13, label %middle.block, label %vector.body, !llvm.loop !27 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end18 = add nsw i64 %n.vec, %0 %n.vec.remaining = and i64 %4, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %n.vec17 = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec17, %0 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index20 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next24, %vec.epilog.vector.body ] %offset.idx21 = add i64 %index20, %0 %14 = getelementptr inbounds i8, ptr %x, i64 %offset.idx21 %15 = getelementptr inbounds i8, ptr %y, i64 %offset.idx21 %wide.load22 = load <8 x i8>, ptr %14, align 1, !tbaa !14, !alias.scope !28, !noalias !31 %wide.load23 = load <8 x i8>, ptr %15, align 1, !tbaa !14, !alias.scope !31 store <8 x i8> %wide.load23, ptr %14, align 1, !tbaa !14, !alias.scope !28, !noalias !31 store <8 x i8> %wide.load22, ptr %15, align 1, !tbaa !14, !alias.scope !31 %index.next24 = add nuw i64 %index20, 8 %16 = icmp eq i64 %index.next24, %n.vec17 br i1 %16, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !33 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body %cmp.n19 = icmp eq i64 %4, %n.vec17 br i1 %cmp.n19, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %0, %vector.memcheck ], [ %ind.end18, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ] %17 = add i32 %max, 1 %18 = trunc i64 %indvars.iv.ph to i32 %19 = sub i32 %17, %18 %xtraiter = and i32 %19, 1 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader %arrayidx.prol = getelementptr inbounds i8, ptr %x, i64 %indvars.iv.ph %arrayidx2.prol = getelementptr inbounds i8, ptr %y, i64 %indvars.iv.ph %20 = load i8, ptr %arrayidx.prol, align 1, !tbaa !14 %21 = load i8, ptr %arrayidx2.prol, align 1, !tbaa !14 store i8 %21, ptr %arrayidx.prol, align 1, !tbaa !14 store i8 %20, ptr %arrayidx2.prol, align 1, !tbaa !14 %indvars.iv.next.prol = add nsw i64 %indvars.iv.ph, 1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader %indvars.iv.unr = phi i64 [ %indvars.iv.ph, %for.body.preheader ], [ %indvars.iv.next.prol, %for.body.prol ] %22 = icmp eq i32 %18, %max br i1 %22, label %for.end, label %for.body for.body: ; preds = %for.body.prol.loopexit, %for.body %indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ] %arrayidx = getelementptr inbounds i8, ptr %x, i64 %indvars.iv %arrayidx2 = getelementptr inbounds i8, ptr %y, i64 %indvars.iv %23 = load i8, ptr %arrayidx, align 1, !tbaa !14 %24 = load i8, ptr %arrayidx2, align 1, !tbaa !14 store i8 %24, ptr %arrayidx, align 1, !tbaa !14 store i8 %23, ptr %arrayidx2, align 1, !tbaa !14 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i8, ptr %x, i64 %indvars.iv.next %arrayidx2.1 = getelementptr inbounds i8, ptr %y, i64 %indvars.iv.next %25 = load i8, ptr %arrayidx.1, align 1, !tbaa !14 %26 = load i8, ptr %arrayidx2.1, align 1, !tbaa !14 store i8 %26, ptr %arrayidx.1, align 1, !tbaa !14 store i8 %25, ptr %arrayidx2.1, align 1, !tbaa !14 %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32 %exitcond.not.1 = icmp eq i32 %1, %lftr.wideiv.1 br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !34 for.end: ; preds = %for.body.prol.loopexit, %for.body, %middle.block, %vec.epilog.middle.block, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @reverse_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 { entry: %add = add nsw i32 %max, %min %div = sdiv i32 %add, 2 %cmp.not12 = icmp slt i32 %div, %min br i1 %cmp.not12, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = sext i32 %add to i64 %2 = add nsw i32 %div, 1 %3 = add nsw i32 %div, 1 %4 = sub i32 %3, %min %xtraiter = and i32 %4, 1 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader %arrayidx.prol = getelementptr inbounds i8, ptr %array, i64 %0 %5 = sub nsw i64 %1, %0 %arrayidx3.prol = getelementptr inbounds i8, ptr %array, i64 %5 %6 = load i8, ptr %arrayidx.prol, align 1, !tbaa !14 %7 = load i8, ptr %arrayidx3.prol, align 1, !tbaa !14 store i8 %7, ptr %arrayidx.prol, align 1, !tbaa !14 store i8 %6, ptr %arrayidx3.prol, align 1, !tbaa !14 %indvars.iv.next.prol = add nsw i64 %0, 1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.body.prol, %for.body.preheader %indvars.iv.unr = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next.prol, %for.body.prol ] %8 = icmp eq i32 %div, %min br i1 %8, label %for.end, label %for.body for.body: ; preds = %for.body.prol.loopexit, %for.body %indvars.iv = phi i64 [ %indvars.iv.next.1, %for.body ], [ %indvars.iv.unr, %for.body.prol.loopexit ] %arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv %9 = sub nsw i64 %1, %indvars.iv %arrayidx3 = getelementptr inbounds i8, ptr %array, i64 %9 %10 = load i8, ptr %arrayidx, align 1, !tbaa !14 %11 = load i8, ptr %arrayidx3, align 1, !tbaa !14 store i8 %11, ptr %arrayidx, align 1, !tbaa !14 store i8 %10, ptr %arrayidx3, align 1, !tbaa !14 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next %12 = sub nsw i64 %1, %indvars.iv.next %arrayidx3.1 = getelementptr inbounds i8, ptr %array, i64 %12 %13 = load i8, ptr %arrayidx.1, align 1, !tbaa !14 %14 = load i8, ptr %arrayidx3.1, align 1, !tbaa !14 store i8 %14, ptr %arrayidx.1, align 1, !tbaa !14 store i8 %13, ptr %arrayidx3.1, align 1, !tbaa !14 %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %lftr.wideiv.1 = trunc i64 %indvars.iv.next.1 to i32 %exitcond.not.1 = icmp eq i32 %2, %lftr.wideiv.1 br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !35 for.end: ; preds = %for.body.prol.loopexit, %for.body, %entry ret void } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max_int(i32 noundef %var1, i32 noundef %var2) local_unnamed_addr #5 { entry: %spec.select = tail call i32 @llvm.smax.i32(i32 %var1, i32 %var2) ret i32 %spec.select } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min_int(i32 noundef %var1, i32 noundef %var2) local_unnamed_addr #5 { entry: %spec.select = tail call i32 @llvm.smin.i32(i32 %var1, i32 %var2) ret i32 %spec.select } ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) uwtable define dso_local i64 @pow_int(i32 noundef %base, i32 noundef %exponent) local_unnamed_addr #6 { entry: %conv = sitofp i32 %base to double %conv1 = uitofp i32 %exponent to double %call = tail call double @pow(double noundef %conv, double noundef %conv1) #23 %conv2 = fptosi double %call to i64 ret i64 %conv2 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @pow(double noundef, double noundef) local_unnamed_addr #7 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @pow_int_mod(i32 noundef %base, i32 noundef %exponent, i32 noundef %mod) local_unnamed_addr #8 { entry: %cmp.not17 = icmp eq i32 %exponent, 0 br i1 %cmp.not17, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %conv1 = sext i32 %mod to i64 br label %while.body while.body: ; preds = %while.body.lr.ph, %if.end6 %answer.020 = phi i64 [ 1, %while.body.lr.ph ], [ %answer.1, %if.end6 ] %base.addr.019 = phi i32 [ %base, %while.body.lr.ph ], [ %rem8, %if.end6 ] %exponent.addr.018 = phi i32 [ %exponent, %while.body.lr.ph ], [ %shr, %if.end6 ] %and = and i32 %exponent.addr.018, 1 %tobool.not = icmp eq i32 %and, 0 br i1 %tobool.not, label %if.end6, label %if.then if.then: ; preds = %while.body %rem = srem i32 %base.addr.019, %mod %conv = sext i32 %rem to i64 %mul = mul nsw i64 %answer.020, %conv %rem2 = srem i64 %mul, %conv1 %cmp3 = icmp eq i64 %rem2, 0 br i1 %cmp3, label %while.end, label %if.end6 if.end6: ; preds = %if.then, %while.body %answer.1 = phi i64 [ %rem2, %if.then ], [ %answer.020, %while.body ] %mul7 = mul nsw i32 %base.addr.019, %base.addr.019 %rem8 = srem i32 %mul7, %mod %shr = lshr i32 %exponent.addr.018, 1 %cmp.not = icmp ult i32 %exponent.addr.018, 2 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !36 while.end: ; preds = %if.end6, %if.then, %entry %answer.2 = phi i64 [ 1, %entry ], [ 0, %if.then ], [ %answer.1, %if.end6 ] ret i64 %answer.2 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @factorial(i32 noundef %num) local_unnamed_addr #9 { entry: %cmp.not4 = icmp ult i32 %num, 2 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = add i32 %num, 1 %umax = tail call i32 @llvm.umax.i32(i32 %0, i32 3) %wide.trip.count = zext i32 %umax to i64 %1 = add nsw i64 %wide.trip.count, -2 %2 = add nsw i64 %wide.trip.count, -3 %xtraiter = and i64 %1, 7 %3 = icmp ult i64 %2, 7 br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %1, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 2, %for.body.preheader.new ], [ %indvars.iv.next.7, %for.body ] %answer.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul i64 %answer.06, %indvars.iv %indvars.iv.next = or i64 %indvars.iv, 1 %mul.1 = mul i64 %mul, %indvars.iv.next %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %mul.2 = mul i64 %mul.1, %indvars.iv.next.1 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %mul.3 = mul i64 %mul.2, %indvars.iv.next.2 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %mul.4 = mul i64 %mul.3, %indvars.iv.next.3 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5 %mul.5 = mul i64 %mul.4, %indvars.iv.next.4 %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv, 6 %mul.6 = mul i64 %mul.5, %indvars.iv.next.5 %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv, 7 %mul.7 = mul i64 %mul.6, %indvars.iv.next.6 %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !37 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %indvars.iv.unr = phi i64 [ 2, %for.body.preheader ], [ %indvars.iv.next.7, %for.body ] %answer.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ] %answer.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %answer.06.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul i64 %answer.06.epil, %indvars.iv.epil %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !38 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %answer.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @factorial_mod(i32 noundef %num, i32 noundef %mod) local_unnamed_addr #8 { entry: %cmp.not10 = icmp ult i32 %num, 2 br i1 %cmp.not10, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %conv1 = sext i32 %mod to i64 br label %for.body for.cond: ; preds = %for.body %add = add i32 %i.011, 1 %cmp.not = icmp ugt i32 %add, %num br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !40 for.body: ; preds = %for.body.lr.ph, %for.cond %answer.012 = phi i64 [ 1, %for.body.lr.ph ], [ %rem2, %for.cond ] %i.011 = phi i32 [ 2, %for.body.lr.ph ], [ %add, %for.cond ] %rem = urem i32 %i.011, %mod %conv = zext i32 %rem to i64 %mul = mul i64 %answer.012, %conv %rem2 = urem i64 %mul, %conv1 %cmp3 = icmp eq i64 %rem2, 0 br i1 %cmp3, label %for.end, label %for.cond for.end: ; preds = %for.cond, %for.body, %entry %answer.1 = phi i64 [ 1, %entry ], [ 0, %for.body ], [ %rem2, %for.cond ] ret i64 %answer.1 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @combination(i32 noundef %n, i32 noundef %k) local_unnamed_addr #9 { entry: %sub = sub i32 %n, %k %spec.select.i = tail call i32 @llvm.smin.i32(i32 %k, i32 %sub) %cmp.not13 = icmp ult i32 %spec.select.i, 2 br i1 %cmp.not13, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add i32 %n, 1 %0 = add i32 %spec.select.i, 1 %umax = tail call i32 @llvm.umax.i32(i32 %0, i32 3) %wide.trip.count = zext i32 %umax to i64 %1 = add nsw i64 %wide.trip.count, -2 %2 = add nsw i64 %wide.trip.count, -3 %xtraiter = and i64 %1, 3 %3 = icmp ult i64 %2, 3 br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %1, -4 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %indvars.iv = phi i64 [ 2, %for.body.lr.ph.new ], [ %indvars.iv.next.3, %for.body ] %denominator.016 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul3.3, %for.body ] %numerator.015 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul.3, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.3, %for.body ] %4 = trunc i64 %indvars.iv to i32 %sub1 = sub i32 %add, %4 %conv = zext i32 %sub1 to i64 %mul = mul i64 %numerator.015, %conv %mul3 = mul i64 %denominator.016, %indvars.iv %indvars.iv.next = or i64 %indvars.iv, 1 %5 = trunc i64 %indvars.iv.next to i32 %sub1.1 = sub i32 %add, %5 %conv.1 = zext i32 %sub1.1 to i64 %mul.1 = mul i64 %mul, %conv.1 %mul3.1 = mul i64 %mul3, %indvars.iv.next %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %6 = trunc i64 %indvars.iv.next.1 to i32 %sub1.2 = sub i32 %add, %6 %conv.2 = zext i32 %sub1.2 to i64 %mul.2 = mul i64 %mul.1, %conv.2 %mul3.2 = mul i64 %mul3.1, %indvars.iv.next.1 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %7 = trunc i64 %indvars.iv.next.2 to i32 %sub1.3 = sub i32 %add, %7 %conv.3 = zext i32 %sub1.3 to i64 %mul.3 = mul i64 %mul.2, %conv.3 %mul3.3 = mul i64 %mul3.2, %indvars.iv.next.2 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !41 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %mul.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul.3, %for.body ] %mul3.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul3.3, %for.body ] %indvars.iv.unr = phi i64 [ 2, %for.body.lr.ph ], [ %indvars.iv.next.3, %for.body ] %denominator.016.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul3.3, %for.body ] %numerator.015.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end.loopexit, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ] %denominator.016.epil = phi i64 [ %mul3.epil, %for.body.epil ], [ %denominator.016.unr, %for.end.loopexit.unr-lcssa ] %numerator.015.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %numerator.015.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %8 = trunc i64 %indvars.iv.epil to i32 %sub1.epil = sub i32 %add, %8 %conv.epil = zext i32 %sub1.epil to i64 %mul.epil = mul i64 %numerator.015.epil, %conv.epil %mul3.epil = mul i64 %denominator.016.epil, %indvars.iv.epil %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end.loopexit, label %for.body.epil, !llvm.loop !42 for.end.loopexit: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa %mul.lcssa = phi i64 [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] %mul3.lcssa = phi i64 [ %mul3.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul3.epil, %for.body.epil ] %9 = udiv i64 %mul.lcssa, %mul3.lcssa br label %for.end for.end: ; preds = %for.end.loopexit, %entry %div = phi i64 [ 1, %entry ], [ %9, %for.end.loopexit ] ret i64 %div } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local double @combination_general(double noundef %alpha, i32 noundef %k) local_unnamed_addr #9 { entry: %cmp.not10 = icmp eq i32 %k, 0 br i1 %cmp.not10, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = fadd double %alpha, 1.000000e+00 %0 = add i32 %k, 1 %umax = tail call i32 @llvm.umax.i32(i32 %0, i32 2) %wide.trip.count = zext i32 %umax to i64 %1 = add nsw i64 %wide.trip.count, -1 %2 = add nsw i64 %wide.trip.count, -2 %xtraiter = and i64 %1, 3 %3 = icmp ult i64 %2, 3 br i1 %3, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %1, -4 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %indvars.iv = phi i64 [ 1, %for.body.lr.ph.new ], [ %indvars.iv.next.3, %for.body ] %denominator.013 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul2.3, %for.body ] %numerator.012 = phi double [ 1.000000e+00, %for.body.lr.ph.new ], [ %mul.3, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.3, %for.body ] %4 = trunc i64 %indvars.iv to i32 %conv = uitofp i32 %4 to double %sub = fsub double %add, %conv %mul = fmul double %numerator.012, %sub %mul2 = mul i64 %denominator.013, %indvars.iv %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = trunc i64 %indvars.iv.next to i32 %conv.1 = uitofp i32 %5 to double %sub.1 = fsub double %add, %conv.1 %mul.1 = fmul double %mul, %sub.1 %mul2.1 = mul i64 %mul2, %indvars.iv.next %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %6 = trunc i64 %indvars.iv.next.1 to i32 %conv.2 = uitofp i32 %6 to double %sub.2 = fsub double %add, %conv.2 %mul.2 = fmul double %mul.1, %sub.2 %mul2.2 = mul i64 %mul2.1, %indvars.iv.next.1 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %7 = trunc i64 %indvars.iv.next.2 to i32 %conv.3 = uitofp i32 %7 to double %sub.3 = fsub double %add, %conv.3 %mul.3 = fmul double %mul.2, %sub.3 %mul2.3 = mul i64 %mul2.2, %indvars.iv.next.2 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 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.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !43 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %mul.lcssa.ph = phi double [ undef, %for.body.lr.ph ], [ %mul.3, %for.body ] %mul2.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul2.3, %for.body ] %indvars.iv.unr = phi i64 [ 1, %for.body.lr.ph ], [ %indvars.iv.next.3, %for.body ] %denominator.013.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul2.3, %for.body ] %numerator.012.unr = phi double [ 1.000000e+00, %for.body.lr.ph ], [ %mul.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end.loopexit, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.end.loopexit.unr-lcssa ] %denominator.013.epil = phi i64 [ %mul2.epil, %for.body.epil ], [ %denominator.013.unr, %for.end.loopexit.unr-lcssa ] %numerator.012.epil = phi double [ %mul.epil, %for.body.epil ], [ %numerator.012.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %8 = trunc i64 %indvars.iv.epil to i32 %conv.epil = uitofp i32 %8 to double %sub.epil = fsub double %add, %conv.epil %mul.epil = fmul double %numerator.012.epil, %sub.epil %mul2.epil = mul i64 %denominator.013.epil, %indvars.iv.epil %indvars.iv.next.epil = add nuw nsw i64 %indvars.iv.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end.loopexit, label %for.body.epil, !llvm.loop !44 for.end.loopexit: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa %mul.lcssa = phi double [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] %mul2.lcssa = phi i64 [ %mul2.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul2.epil, %for.body.epil ] %9 = uitofp i64 %mul2.lcssa to double %10 = fdiv double %mul.lcssa, %9 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %div = phi double [ 1.000000e+00, %entry ], [ %10, %for.end.loopexit ] ret double %div } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #9 { entry: %spec.select = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %spec.select8 = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) %rem = srem i32 %spec.select, %spec.select8 %cmp1.not9 = icmp eq i32 %rem, 0 br i1 %cmp1.not9, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.011 = phi i32 [ %rem2, %while.body ], [ %rem, %entry ] %b.addr.110 = phi i32 [ %r.011, %while.body ], [ %spec.select8, %entry ] %rem2 = srem i32 %b.addr.110, %r.011 %cmp1.not = icmp eq i32 %rem2, 0 br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !45 while.end: ; preds = %while.body, %entry %b.addr.1.lcssa = phi i32 [ %spec.select8, %entry ], [ %r.011, %while.body ] ret i32 %b.addr.1.lcssa } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #9 { entry: %spec.select.i = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) %spec.select8.i = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) %rem.i = srem i32 %spec.select.i, %spec.select8.i %cmp1.not9.i = icmp eq i32 %rem.i, 0 br i1 %cmp1.not9.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %r.011.i = phi i32 [ %rem2.i, %while.body.i ], [ %rem.i, %entry ] %b.addr.110.i = phi i32 [ %r.011.i, %while.body.i ], [ %spec.select8.i, %entry ] %rem2.i = srem i32 %b.addr.110.i, %r.011.i %cmp1.not.i = icmp eq i32 %rem2.i, 0 br i1 %cmp1.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !45 gcd.exit: ; preds = %while.body.i, %entry %b.addr.1.lcssa.i = phi i32 [ %spec.select8.i, %entry ], [ %r.011.i, %while.body.i ] %div = sdiv i32 %a, %b.addr.1.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @order(i64 noundef %num) local_unnamed_addr #8 { entry: %cmp.not3 = icmp eq i64 %num, 0 br i1 %cmp.not3, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %answer.05 = phi i32 [ %add, %while.body ], [ -1, %entry ] %num.addr.04 = phi i64 [ %div, %while.body ], [ %num, %entry ] %div = sdiv i64 %num.addr.04, 10 %add = add nsw i32 %answer.05, 1 %num.addr.04.off = add i64 %num.addr.04, 9 %cmp.not = icmp ult i64 %num.addr.04.off, 19 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !46 while.end: ; preds = %while.body, %entry %answer.0.lcssa = phi i32 [ -1, %entry ], [ %add, %while.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i64 @convert_adic_int(ptr nocapture noundef readonly %num, i32 noundef %p_adic, i32 noundef %q_adic) local_unnamed_addr #10 { entry: %call = tail call i64 @strtol(ptr nocapture noundef %num, ptr noundef null, i32 noundef %p_adic) #23 %cmp122.not = icmp eq i64 %call, 0 br i1 %cmp122.not, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %spec.select = tail call i64 @llvm.abs.i64(i64 %call, i1 true) %conv = zext i32 %q_adic to i64 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %tmp.125 = phi i64 [ %spec.select, %while.body.lr.ph ], [ %div, %while.body ] %answer.024 = phi i64 [ 0, %while.body.lr.ph ], [ %add, %while.body ] %i.023 = phi i32 [ 0, %while.body.lr.ph ], [ %add4, %while.body ] %rem = urem i64 %tmp.125, %conv %conv1.i = uitofp i32 %i.023 to double %call.i = tail call double @pow(double noundef 1.000000e+01, double noundef %conv1.i) #23 %conv2.i = fptosi double %call.i to i64 %mul = mul nsw i64 %rem, %conv2.i %add = add nsw i64 %mul, %answer.024 %div = udiv i64 %tmp.125, %conv %add4 = add nuw nsw i32 %i.023, 1 %cmp1.not = icmp ult i64 %tmp.125, %conv br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !47 while.end: ; preds = %while.body, %entry %answer.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] %sub9 = sub nsw i64 0, %answer.0.lcssa %cmp621 = icmp slt i64 %call, 0 %retval.0 = select i1 %cmp621, i64 %sub9, i64 %answer.0.lcssa ret i64 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #11 ; Function Attrs: nofree nounwind uwtable define dso_local void @convert_adic_char(ptr nocapture noundef %num, i32 noundef %p_adic, i32 noundef %q_adic) local_unnamed_addr #10 { entry: %mod = alloca [32 x i32], align 16 call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %mod) #23 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(128) %mod, i8 0, i64 128, i1 false) %call = tail call i64 @strtol(ptr nocapture noundef %num, ptr noundef null, i32 noundef %p_adic) #23 %cmp = icmp slt i64 %call, 0 %cmp174.not = icmp eq i64 %call, 0 br i1 %cmp174.not, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %spec.select = tail call i64 @llvm.abs.i64(i64 %call, i1 true) %conv = zext i32 %q_adic to i64 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %indvars.iv = phi i64 [ 0, %while.body.lr.ph ], [ %indvars.iv.next, %while.body ] %tmp.176 = phi i64 [ %spec.select, %while.body.lr.ph ], [ %div, %while.body ] %rem = urem i64 %tmp.176, %conv %conv2 = trunc i64 %rem to i32 %arrayidx = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv store i32 %conv2, ptr %arrayidx, align 4, !tbaa !5 %div = udiv i64 %tmp.176, %conv %indvars.iv.next = add nuw i64 %indvars.iv, 1 %cmp1.not = icmp ult i64 %tmp.176, %conv br i1 %cmp1.not, label %while.end.loopexit, label %while.body, !llvm.loop !48 while.end.loopexit: ; preds = %while.body %0 = trunc i64 %indvars.iv to i32 br label %while.end while.end: ; preds = %while.end.loopexit, %entry %digit.0.lcssa = phi i32 [ 0, %entry ], [ %0, %while.end.loopexit ] %call4 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %num) #24 %1 = trunc i64 %call4 to i32 %conv6 = add i32 %1, -1 %cmp.not4.i = icmp slt i32 %conv6, 0 br i1 %cmp.not4.i, label %fill_char.exit, label %for.body.preheader.i for.body.preheader.i: ; preds = %while.end %2 = zext i32 %conv6 to i64 %3 = add nuw nsw i64 %2, 1 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %num, i8 0, i64 %3, i1 false), !tbaa !14 br label %fill_char.exit fill_char.exit: ; preds = %while.end, %for.body.preheader.i %call.lobit = lshr i64 %call, 63 %conv7 = trunc i64 %call.lobit to i32 br i1 %cmp, label %if.then10, label %if.end12 if.then10: ; preds = %fill_char.exit store i8 45, ptr %num, align 1, !tbaa !14 br label %if.end12 if.end12: ; preds = %if.then10, %fill_char.exit %add42 = add nuw nsw i32 %digit.0.lcssa, %conv7 %4 = add i32 %digit.0.lcssa, 1 %wide.trip.count = zext i32 %4 to i64 %min.iters.check = icmp ult i32 %4, 16 br i1 %min.iters.check, label %for.body.preheader, label %vector.scevcheck vector.scevcheck: ; preds = %if.end12 %5 = add nsw i64 %wide.trip.count, -1 %6 = add i32 %digit.0.lcssa, %conv7 %7 = trunc i64 %5 to i32 %8 = sub i32 %6, %7 %9 = icmp sgt i32 %8, %6 %10 = icmp ugt i64 %5, 4294967295 %11 = or i1 %9, %10 br i1 %11, label %for.body.preheader, label %vector.ph vector.ph: ; preds = %vector.scevcheck %n.vec = and i64 %wide.trip.count, 4294967292 %ind.end = sub nsw i64 0, %n.vec %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %q_adic, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %pred.store.continue95, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue95 ] %12 = trunc i64 %index to i32 %13 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %13, align 16, !tbaa !5 %14 = icmp slt <4 x i32> %wide.load, <i32 10, i32 10, i32 10, i32 10> %15 = icmp ult <4 x i32> %wide.load, %broadcast.splat %16 = xor <4 x i1> %14, <i1 true, i1 true, i1 true, i1 true> %17 = select <4 x i1> %16, <4 x i1> %15, <4 x i1> zeroinitializer %predphi = select <4 x i1> %17, <4 x i8> <i8 87, i8 87, i8 87, i8 87>, <4 x i8> <i8 48, i8 48, i8 48, i8 48> %18 = or <4 x i1> %17, %14 %19 = extractelement <4 x i1> %18, i64 0 br i1 %19, label %pred.store.if, label %pred.store.continue pred.store.if: ; preds = %vector.body %20 = sub i32 %add42, %12 %21 = sext i32 %20 to i64 %22 = bitcast <4 x i32> %wide.load to <16 x i8> %23 = extractelement <16 x i8> %22, i64 0 %24 = getelementptr inbounds i8, ptr %num, i64 %21 %25 = extractelement <4 x i8> %predphi, i64 0 %26 = add i8 %25, %23 store i8 %26, ptr %24, align 1, !tbaa !14 br label %pred.store.continue pred.store.continue: ; preds = %pred.store.if, %vector.body %27 = extractelement <4 x i1> %18, i64 1 br i1 %27, label %pred.store.if90, label %pred.store.continue91 pred.store.if90: ; preds = %pred.store.continue %28 = xor i32 %12, -1 %29 = add i32 %add42, %28 %30 = sext i32 %29 to i64 %31 = bitcast <4 x i32> %wide.load to <16 x i8> %32 = extractelement <16 x i8> %31, i64 4 %33 = getelementptr inbounds i8, ptr %num, i64 %30 %34 = extractelement <4 x i8> %predphi, i64 1 %35 = add i8 %34, %32 store i8 %35, ptr %33, align 1, !tbaa !14 br label %pred.store.continue91 pred.store.continue91: ; preds = %pred.store.if90, %pred.store.continue %36 = extractelement <4 x i1> %18, i64 2 br i1 %36, label %pred.store.if92, label %pred.store.continue93 pred.store.if92: ; preds = %pred.store.continue91 %reass.sub = sub i32 %add42, %12 %37 = add i32 %reass.sub, -2 %38 = sext i32 %37 to i64 %39 = bitcast <4 x i32> %wide.load to <16 x i8> %40 = extractelement <16 x i8> %39, i64 8 %41 = getelementptr inbounds i8, ptr %num, i64 %38 %42 = extractelement <4 x i8> %predphi, i64 2 %43 = add i8 %42, %40 store i8 %43, ptr %41, align 1, !tbaa !14 br label %pred.store.continue93 pred.store.continue93: ; preds = %pred.store.if92, %pred.store.continue91 %44 = extractelement <4 x i1> %18, i64 3 br i1 %44, label %pred.store.if94, label %pred.store.continue95 pred.store.if94: ; preds = %pred.store.continue93 %reass.sub96 = sub i32 %add42, %12 %45 = add i32 %reass.sub96, -3 %46 = sext i32 %45 to i64 %47 = bitcast <4 x i32> %wide.load to <16 x i8> %48 = extractelement <16 x i8> %47, i64 12 %49 = getelementptr inbounds i8, ptr %num, i64 %46 %50 = extractelement <4 x i8> %predphi, i64 3 %51 = add i8 %50, %48 store i8 %51, ptr %49, align 1, !tbaa !14 br label %pred.store.continue95 pred.store.continue95: ; preds = %pred.store.if94, %pred.store.continue93 %index.next = add nuw i64 %index, 4 %52 = icmp eq i64 %index.next, %n.vec br i1 %52, label %middle.block, label %vector.body, !llvm.loop !49 middle.block: ; preds = %pred.store.continue95 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %vector.scevcheck, %if.end12, %middle.block %indvars.iv82.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %if.end12 ], [ %n.vec, %middle.block ] %indvars.iv80.ph = phi i64 [ 0, %vector.scevcheck ], [ 0, %if.end12 ], [ %ind.end, %middle.block ] %xtraiter = and i64 %wide.trip.count, 1 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.prol.loopexit, label %for.body.prol for.body.prol: ; preds = %for.body.preheader %arrayidx16.prol = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv82.ph %53 = load i32, ptr %arrayidx16.prol, align 16, !tbaa !5 %cmp17.prol = icmp slt i32 %53, 10 br i1 %cmp17.prol, label %for.inc.sink.split.prol, label %if.else.prol if.else.prol: ; preds = %for.body.prol %cmp32.prol = icmp ult i32 %53, %q_adic br i1 %cmp32.prol, label %for.inc.sink.split.prol, label %for.inc.prol for.inc.sink.split.prol: ; preds = %if.else.prol, %for.body.prol %.sink88.prol = phi i8 [ 48, %for.body.prol ], [ 87, %if.else.prol ] %54 = trunc i32 %53 to i8 %conv23.prol = add i8 %.sink88.prol, %54 %55 = trunc i64 %indvars.iv80.ph to i32 %sub27.prol = add i32 %add42, %55 %idxprom28.prol = sext i32 %sub27.prol to i64 %arrayidx29.prol = getelementptr inbounds i8, ptr %num, i64 %idxprom28.prol store i8 %conv23.prol, ptr %arrayidx29.prol, align 1, !tbaa !14 br label %for.inc.prol for.inc.prol: ; preds = %for.inc.sink.split.prol, %if.else.prol %indvars.iv.next83.prol = or i64 %indvars.iv82.ph, 1 %indvars.iv.next81.prol = add nsw i64 %indvars.iv80.ph, -1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.inc.prol, %for.body.preheader %indvars.iv82.unr = phi i64 [ %indvars.iv82.ph, %for.body.preheader ], [ %indvars.iv.next83.prol, %for.inc.prol ] %indvars.iv80.unr = phi i64 [ %indvars.iv80.ph, %for.body.preheader ], [ %indvars.iv.next81.prol, %for.inc.prol ] %56 = sub nsw i64 0, %wide.trip.count %57 = xor i64 %indvars.iv82.ph, %56 %58 = icmp eq i64 %57, -1 br i1 %58, label %for.end, label %for.body for.body: ; preds = %for.body.prol.loopexit, %for.inc.1 %indvars.iv82 = phi i64 [ %indvars.iv.next83.1, %for.inc.1 ], [ %indvars.iv82.unr, %for.body.prol.loopexit ] %indvars.iv80 = phi i64 [ %indvars.iv.next81.1, %for.inc.1 ], [ %indvars.iv80.unr, %for.body.prol.loopexit ] %arrayidx16 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv82 %59 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %cmp17 = icmp slt i32 %59, 10 br i1 %cmp17, label %for.inc.sink.split, label %if.else if.else: ; preds = %for.body %cmp32 = icmp ult i32 %59, %q_adic br i1 %cmp32, label %for.inc.sink.split, label %for.inc for.inc.sink.split: ; preds = %if.else, %for.body %.sink88 = phi i8 [ 48, %for.body ], [ 87, %if.else ] %60 = trunc i32 %59 to i8 %conv23 = add i8 %.sink88, %60 %61 = trunc i64 %indvars.iv80 to i32 %sub27 = add i32 %add42, %61 %idxprom28 = sext i32 %sub27 to i64 %arrayidx29 = getelementptr inbounds i8, ptr %num, i64 %idxprom28 store i8 %conv23, ptr %arrayidx29, align 1, !tbaa !14 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %if.else %indvars.iv.next83 = add nuw nsw i64 %indvars.iv82, 1 %arrayidx16.1 = getelementptr inbounds [32 x i32], ptr %mod, i64 0, i64 %indvars.iv.next83 %62 = load i32, ptr %arrayidx16.1, align 4, !tbaa !5 %cmp17.1 = icmp slt i32 %62, 10 br i1 %cmp17.1, label %for.inc.sink.split.1, label %if.else.1 if.else.1: ; preds = %for.inc %cmp32.1 = icmp ult i32 %62, %q_adic br i1 %cmp32.1, label %for.inc.sink.split.1, label %for.inc.1 for.inc.sink.split.1: ; preds = %if.else.1, %for.inc %.sink88.1 = phi i8 [ 48, %for.inc ], [ 87, %if.else.1 ] %63 = trunc i32 %62 to i8 %conv23.1 = add i8 %.sink88.1, %63 %64 = trunc i64 %indvars.iv80 to i32 %65 = add i32 %64, -1 %sub27.1 = add i32 %add42, %65 %idxprom28.1 = sext i32 %sub27.1 to i64 %arrayidx29.1 = getelementptr inbounds i8, ptr %num, i64 %idxprom28.1 store i8 %conv23.1, ptr %arrayidx29.1, align 1, !tbaa !14 br label %for.inc.1 for.inc.1: ; preds = %for.inc.sink.split.1, %if.else.1 %indvars.iv.next83.1 = add nuw nsw i64 %indvars.iv82, 2 %indvars.iv.next81.1 = add nsw i64 %indvars.iv80, -2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next83.1, %wide.trip.count br i1 %exitcond.not.1, label %for.end, label %for.body, !llvm.loop !50 for.end: ; preds = %for.body.prol.loopexit, %for.inc.1, %middle.block call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %mod) #23 ret void } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #12 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #13 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @count_mod(i32 noundef %min, i32 noundef %max, i32 noundef %num) local_unnamed_addr #14 { entry: %cmp = icmp sgt i32 %min, 0 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %div = sdiv i32 %max, %num %sub = add nsw i32 %min, -1 %div1 = sdiv i32 %sub, %num %sub2 = sub nsw i32 %div, %div1 br label %return if.else: ; preds = %entry %cmp3 = icmp eq i32 %min, 0 br i1 %cmp3, label %if.then4, label %return if.then4: ; preds = %if.else %div5 = sdiv i32 %max, %num %add = add nsw i32 %div5, 1 br label %return return: ; preds = %if.else, %if.then4, %if.then %retval.0 = phi i32 [ %sub2, %if.then ], [ %add, %if.then4 ], [ -1, %if.else ] ret i32 %retval.0 } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @shift_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max, i32 noundef %num) local_unnamed_addr #15 { entry: %array39 = ptrtoint ptr %array to i64 %cmp.not24 = icmp slt i32 %max, %min br i1 %cmp.not24, label %for.cond3.preheader, label %iter.check iter.check: ; preds = %entry %0 = sext i32 %max to i64 %1 = sext i32 %num to i64 %2 = sext i32 %min to i64 %invariant.gep = getelementptr i8, ptr %array, i64 %1 %3 = add nsw i64 %0, 1 %4 = sub nsw i64 %3, %2 %min.iters.check = icmp ult i64 %4, 4 br i1 %min.iters.check, label %for.body.preheader, label %vector.scevcheck vector.scevcheck: ; preds = %iter.check %5 = sub nsw i64 %0, %2 %6 = getelementptr i8, ptr %array, i64 %1 %scevgep34 = getelementptr i8, ptr %6, i64 %0 %7 = sub nsw i64 0, %5 %8 = getelementptr i8, ptr %scevgep34, i64 %7 %9 = icmp ugt ptr %8, %scevgep34 %scevgep35 = getelementptr i8, ptr %array, i64 %0 %10 = sub nsw i64 0, %5 %11 = getelementptr i8, ptr %scevgep35, i64 %10 %12 = icmp ugt ptr %11, %scevgep35 %13 = or i1 %9, %12 br i1 %13, label %for.body.preheader, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %14 = add i64 %array39, %0 %15 = add i64 %array39, %1 %16 = add i64 %15, %0 %17 = sub i64 %14, %16 %diff.check = icmp ult i64 %17, 16 br i1 %diff.check, label %for.body.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck %min.iters.check40 = icmp ult i64 %4, 16 br i1 %min.iters.check40, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %4, -16 %invariant.gep52 = getelementptr i8, ptr %array, i64 -15 %invariant.gep54 = getelementptr i8, ptr %invariant.gep, i64 -15 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = sub i64 %0, %index %gep53 = getelementptr i8, ptr %invariant.gep52, i64 %offset.idx %wide.load = load <16 x i8>, ptr %gep53, align 1, !tbaa !14 %gep55 = getelementptr i8, ptr %invariant.gep54, i64 %offset.idx store <16 x i8> %wide.load, ptr %gep55, align 1, !tbaa !14 %index.next = add nuw i64 %index, 16 %18 = icmp eq i64 %index.next, %n.vec br i1 %18, label %middle.block, label %vector.body, !llvm.loop !51 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.cond3.preheader, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end44 = sub nsw i64 %0, %n.vec %n.vec.remaining = and i64 %4, 12 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %n.vec43 = and i64 %4, -4 %ind.end = sub nsw i64 %0, %n.vec43 %invariant.gep56 = getelementptr i8, ptr %array, i64 -3 %invariant.gep58 = getelementptr i8, ptr %invariant.gep, i64 -3 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index46 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next51, %vec.epilog.vector.body ] %offset.idx47 = sub i64 %0, %index46 %gep57 = getelementptr i8, ptr %invariant.gep56, i64 %offset.idx47 %wide.load48 = load <4 x i8>, ptr %gep57, align 1, !tbaa !14 %gep59 = getelementptr i8, ptr %invariant.gep58, i64 %offset.idx47 store <4 x i8> %wide.load48, ptr %gep59, align 1, !tbaa !14 %index.next51 = add nuw i64 %index46, 4 %19 = icmp eq i64 %index.next51, %n.vec43 br i1 %19, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !52 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body %cmp.n45 = icmp eq i64 %4, %n.vec43 br i1 %cmp.n45, label %for.cond3.preheader, label %for.body.preheader for.body.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %0, %vector.memcheck ], [ %0, %vector.scevcheck ], [ %ind.end44, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ] br label %for.body for.cond3.preheader: ; preds = %for.body, %middle.block, %vec.epilog.middle.block, %entry %cmp6.not.not26 = icmp sgt i32 %num, 0 br i1 %cmp6.not.not26, label %for.body7.preheader, label %for.end12 for.body7.preheader: ; preds = %for.cond3.preheader %add4 = add i32 %num, %min %20 = sext i32 %min to i64 %scevgep = getelementptr i8, ptr %array, i64 %20 %21 = add i32 %min, 1 %smax = tail call i32 @llvm.smax.i32(i32 %add4, i32 %21) %22 = xor i32 %min, -1 %23 = add i32 %smax, %22 %24 = zext i32 %23 to i64 %25 = add nuw nsw i64 %24, 1 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %scevgep, i8 0, i64 %25, i1 false), !tbaa !14 br label %for.end12 for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader ] %arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv %26 = load i8, ptr %arrayidx, align 1, !tbaa !14 %gep = getelementptr i8, ptr %invariant.gep, i64 %indvars.iv store i8 %26, ptr %gep, align 1, !tbaa !14 %indvars.iv.next = add nsw i64 %indvars.iv, -1 %cmp.not.not = icmp sgt i64 %indvars.iv, %2 br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !53 for.end12: ; preds = %for.body7.preheader, %for.cond3.preheader ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @convert_char(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %pre, i8 noundef signext %post) local_unnamed_addr #4 { entry: %cmp.not11 = icmp sgt i32 %min, %max br i1 %cmp.not11, label %for.end, label %iter.check iter.check: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %iter.check %min.iters.check14 = icmp ult i32 %2, 31 br i1 %min.iters.check14, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %4, 8589934560 %broadcast.splatinsert = insertelement <16 x i8> poison, i8 %pre, i64 0 %broadcast.splat = shufflevector <16 x i8> %broadcast.splatinsert, <16 x i8> poison, <16 x i32> zeroinitializer %invariant.gep = getelementptr i8, ptr %array, i64 1 %invariant.gep104 = getelementptr i8, ptr %array, i64 2 %invariant.gep106 = getelementptr i8, ptr %array, i64 3 %invariant.gep108 = getelementptr i8, ptr %array, i64 4 %invariant.gep110 = getelementptr i8, ptr %array, i64 5 %invariant.gep112 = getelementptr i8, ptr %array, i64 6 %invariant.gep114 = getelementptr i8, ptr %array, i64 7 %invariant.gep116 = getelementptr i8, ptr %array, i64 8 %invariant.gep118 = getelementptr i8, ptr %array, i64 9 %invariant.gep120 = getelementptr i8, ptr %array, i64 10 %invariant.gep122 = getelementptr i8, ptr %array, i64 11 %invariant.gep124 = getelementptr i8, ptr %array, i64 12 %invariant.gep126 = getelementptr i8, ptr %array, i64 13 %invariant.gep128 = getelementptr i8, ptr %array, i64 14 %invariant.gep130 = getelementptr i8, ptr %array, i64 15 %invariant.gep132 = getelementptr i8, ptr %array, i64 16 %invariant.gep134 = getelementptr i8, ptr %array, i64 17 %invariant.gep136 = getelementptr i8, ptr %array, i64 18 %invariant.gep138 = getelementptr i8, ptr %array, i64 19 %invariant.gep140 = getelementptr i8, ptr %array, i64 20 %invariant.gep142 = getelementptr i8, ptr %array, i64 21 %invariant.gep144 = getelementptr i8, ptr %array, i64 22 %invariant.gep146 = getelementptr i8, ptr %array, i64 23 %invariant.gep148 = getelementptr i8, ptr %array, i64 24 %invariant.gep150 = getelementptr i8, ptr %array, i64 25 %invariant.gep152 = getelementptr i8, ptr %array, i64 26 %invariant.gep154 = getelementptr i8, ptr %array, i64 27 %invariant.gep156 = getelementptr i8, ptr %array, i64 28 %invariant.gep158 = getelementptr i8, ptr %array, i64 29 %invariant.gep160 = getelementptr i8, ptr %array, i64 30 %invariant.gep162 = getelementptr i8, ptr %array, i64 31 br label %vector.body vector.body: ; preds = %pred.store.continue77, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %pred.store.continue77 ] %offset.idx = add i64 %index, %0 %5 = getelementptr inbounds i8, ptr %array, i64 %offset.idx %wide.load = load <16 x i8>, ptr %5, align 1, !tbaa !14 %6 = getelementptr inbounds i8, ptr %5, i64 16 %wide.load15 = load <16 x i8>, ptr %6, align 1, !tbaa !14 %7 = icmp eq <16 x i8> %wide.load, %broadcast.splat %8 = icmp eq <16 x i8> %wide.load15, %broadcast.splat %9 = extractelement <16 x i1> %7, i64 0 br i1 %9, label %pred.store.if, label %pred.store.continue pred.store.if: ; preds = %vector.body %10 = getelementptr inbounds i8, ptr %array, i64 %offset.idx store i8 %post, ptr %10, align 1, !tbaa !14 br label %pred.store.continue pred.store.continue: ; preds = %pred.store.if, %vector.body %11 = extractelement <16 x i1> %7, i64 1 br i1 %11, label %pred.store.if16, label %pred.store.continue17 pred.store.if16: ; preds = %pred.store.continue %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx store i8 %post, ptr %gep, align 1, !tbaa !14 br label %pred.store.continue17 pred.store.continue17: ; preds = %pred.store.if16, %pred.store.continue %12 = extractelement <16 x i1> %7, i64 2 br i1 %12, label %pred.store.if18, label %pred.store.continue19 pred.store.if18: ; preds = %pred.store.continue17 %gep105 = getelementptr i8, ptr %invariant.gep104, i64 %offset.idx store i8 %post, ptr %gep105, align 1, !tbaa !14 br label %pred.store.continue19 pred.store.continue19: ; preds = %pred.store.if18, %pred.store.continue17 %13 = extractelement <16 x i1> %7, i64 3 br i1 %13, label %pred.store.if20, label %pred.store.continue21 pred.store.if20: ; preds = %pred.store.continue19 %gep107 = getelementptr i8, ptr %invariant.gep106, i64 %offset.idx store i8 %post, ptr %gep107, align 1, !tbaa !14 br label %pred.store.continue21 pred.store.continue21: ; preds = %pred.store.if20, %pred.store.continue19 %14 = extractelement <16 x i1> %7, i64 4 br i1 %14, label %pred.store.if22, label %pred.store.continue23 pred.store.if22: ; preds = %pred.store.continue21 %gep109 = getelementptr i8, ptr %invariant.gep108, i64 %offset.idx store i8 %post, ptr %gep109, align 1, !tbaa !14 br label %pred.store.continue23 pred.store.continue23: ; preds = %pred.store.if22, %pred.store.continue21 %15 = extractelement <16 x i1> %7, i64 5 br i1 %15, label %pred.store.if24, label %pred.store.continue25 pred.store.if24: ; preds = %pred.store.continue23 %gep111 = getelementptr i8, ptr %invariant.gep110, i64 %offset.idx store i8 %post, ptr %gep111, align 1, !tbaa !14 br label %pred.store.continue25 pred.store.continue25: ; preds = %pred.store.if24, %pred.store.continue23 %16 = extractelement <16 x i1> %7, i64 6 br i1 %16, label %pred.store.if26, label %pred.store.continue27 pred.store.if26: ; preds = %pred.store.continue25 %gep113 = getelementptr i8, ptr %invariant.gep112, i64 %offset.idx store i8 %post, ptr %gep113, align 1, !tbaa !14 br label %pred.store.continue27 pred.store.continue27: ; preds = %pred.store.if26, %pred.store.continue25 %17 = extractelement <16 x i1> %7, i64 7 br i1 %17, label %pred.store.if28, label %pred.store.continue29 pred.store.if28: ; preds = %pred.store.continue27 %gep115 = getelementptr i8, ptr %invariant.gep114, i64 %offset.idx store i8 %post, ptr %gep115, align 1, !tbaa !14 br label %pred.store.continue29 pred.store.continue29: ; preds = %pred.store.if28, %pred.store.continue27 %18 = extractelement <16 x i1> %7, i64 8 br i1 %18, label %pred.store.if30, label %pred.store.continue31 pred.store.if30: ; preds = %pred.store.continue29 %gep117 = getelementptr i8, ptr %invariant.gep116, i64 %offset.idx store i8 %post, ptr %gep117, align 1, !tbaa !14 br label %pred.store.continue31 pred.store.continue31: ; preds = %pred.store.if30, %pred.store.continue29 %19 = extractelement <16 x i1> %7, i64 9 br i1 %19, label %pred.store.if32, label %pred.store.continue33 pred.store.if32: ; preds = %pred.store.continue31 %gep119 = getelementptr i8, ptr %invariant.gep118, i64 %offset.idx store i8 %post, ptr %gep119, align 1, !tbaa !14 br label %pred.store.continue33 pred.store.continue33: ; preds = %pred.store.if32, %pred.store.continue31 %20 = extractelement <16 x i1> %7, i64 10 br i1 %20, label %pred.store.if34, label %pred.store.continue35 pred.store.if34: ; preds = %pred.store.continue33 %gep121 = getelementptr i8, ptr %invariant.gep120, i64 %offset.idx store i8 %post, ptr %gep121, align 1, !tbaa !14 br label %pred.store.continue35 pred.store.continue35: ; preds = %pred.store.if34, %pred.store.continue33 %21 = extractelement <16 x i1> %7, i64 11 br i1 %21, label %pred.store.if36, label %pred.store.continue37 pred.store.if36: ; preds = %pred.store.continue35 %gep123 = getelementptr i8, ptr %invariant.gep122, i64 %offset.idx store i8 %post, ptr %gep123, align 1, !tbaa !14 br label %pred.store.continue37 pred.store.continue37: ; preds = %pred.store.if36, %pred.store.continue35 %22 = extractelement <16 x i1> %7, i64 12 br i1 %22, label %pred.store.if38, label %pred.store.continue39 pred.store.if38: ; preds = %pred.store.continue37 %gep125 = getelementptr i8, ptr %invariant.gep124, i64 %offset.idx store i8 %post, ptr %gep125, align 1, !tbaa !14 br label %pred.store.continue39 pred.store.continue39: ; preds = %pred.store.if38, %pred.store.continue37 %23 = extractelement <16 x i1> %7, i64 13 br i1 %23, label %pred.store.if40, label %pred.store.continue41 pred.store.if40: ; preds = %pred.store.continue39 %gep127 = getelementptr i8, ptr %invariant.gep126, i64 %offset.idx store i8 %post, ptr %gep127, align 1, !tbaa !14 br label %pred.store.continue41 pred.store.continue41: ; preds = %pred.store.if40, %pred.store.continue39 %24 = extractelement <16 x i1> %7, i64 14 br i1 %24, label %pred.store.if42, label %pred.store.continue43 pred.store.if42: ; preds = %pred.store.continue41 %gep129 = getelementptr i8, ptr %invariant.gep128, i64 %offset.idx store i8 %post, ptr %gep129, align 1, !tbaa !14 br label %pred.store.continue43 pred.store.continue43: ; preds = %pred.store.if42, %pred.store.continue41 %25 = extractelement <16 x i1> %7, i64 15 br i1 %25, label %pred.store.if44, label %pred.store.continue45 pred.store.if44: ; preds = %pred.store.continue43 %gep131 = getelementptr i8, ptr %invariant.gep130, i64 %offset.idx store i8 %post, ptr %gep131, align 1, !tbaa !14 br label %pred.store.continue45 pred.store.continue45: ; preds = %pred.store.if44, %pred.store.continue43 %26 = extractelement <16 x i1> %8, i64 0 br i1 %26, label %pred.store.if46, label %pred.store.continue47 pred.store.if46: ; preds = %pred.store.continue45 %gep133 = getelementptr i8, ptr %invariant.gep132, i64 %offset.idx store i8 %post, ptr %gep133, align 1, !tbaa !14 br label %pred.store.continue47 pred.store.continue47: ; preds = %pred.store.if46, %pred.store.continue45 %27 = extractelement <16 x i1> %8, i64 1 br i1 %27, label %pred.store.if48, label %pred.store.continue49 pred.store.if48: ; preds = %pred.store.continue47 %gep135 = getelementptr i8, ptr %invariant.gep134, i64 %offset.idx store i8 %post, ptr %gep135, align 1, !tbaa !14 br label %pred.store.continue49 pred.store.continue49: ; preds = %pred.store.if48, %pred.store.continue47 %28 = extractelement <16 x i1> %8, i64 2 br i1 %28, label %pred.store.if50, label %pred.store.continue51 pred.store.if50: ; preds = %pred.store.continue49 %gep137 = getelementptr i8, ptr %invariant.gep136, i64 %offset.idx store i8 %post, ptr %gep137, align 1, !tbaa !14 br label %pred.store.continue51 pred.store.continue51: ; preds = %pred.store.if50, %pred.store.continue49 %29 = extractelement <16 x i1> %8, i64 3 br i1 %29, label %pred.store.if52, label %pred.store.continue53 pred.store.if52: ; preds = %pred.store.continue51 %gep139 = getelementptr i8, ptr %invariant.gep138, i64 %offset.idx store i8 %post, ptr %gep139, align 1, !tbaa !14 br label %pred.store.continue53 pred.store.continue53: ; preds = %pred.store.if52, %pred.store.continue51 %30 = extractelement <16 x i1> %8, i64 4 br i1 %30, label %pred.store.if54, label %pred.store.continue55 pred.store.if54: ; preds = %pred.store.continue53 %gep141 = getelementptr i8, ptr %invariant.gep140, i64 %offset.idx store i8 %post, ptr %gep141, align 1, !tbaa !14 br label %pred.store.continue55 pred.store.continue55: ; preds = %pred.store.if54, %pred.store.continue53 %31 = extractelement <16 x i1> %8, i64 5 br i1 %31, label %pred.store.if56, label %pred.store.continue57 pred.store.if56: ; preds = %pred.store.continue55 %gep143 = getelementptr i8, ptr %invariant.gep142, i64 %offset.idx store i8 %post, ptr %gep143, align 1, !tbaa !14 br label %pred.store.continue57 pred.store.continue57: ; preds = %pred.store.if56, %pred.store.continue55 %32 = extractelement <16 x i1> %8, i64 6 br i1 %32, label %pred.store.if58, label %pred.store.continue59 pred.store.if58: ; preds = %pred.store.continue57 %gep145 = getelementptr i8, ptr %invariant.gep144, i64 %offset.idx store i8 %post, ptr %gep145, align 1, !tbaa !14 br label %pred.store.continue59 pred.store.continue59: ; preds = %pred.store.if58, %pred.store.continue57 %33 = extractelement <16 x i1> %8, i64 7 br i1 %33, label %pred.store.if60, label %pred.store.continue61 pred.store.if60: ; preds = %pred.store.continue59 %gep147 = getelementptr i8, ptr %invariant.gep146, i64 %offset.idx store i8 %post, ptr %gep147, align 1, !tbaa !14 br label %pred.store.continue61 pred.store.continue61: ; preds = %pred.store.if60, %pred.store.continue59 %34 = extractelement <16 x i1> %8, i64 8 br i1 %34, label %pred.store.if62, label %pred.store.continue63 pred.store.if62: ; preds = %pred.store.continue61 %gep149 = getelementptr i8, ptr %invariant.gep148, i64 %offset.idx store i8 %post, ptr %gep149, align 1, !tbaa !14 br label %pred.store.continue63 pred.store.continue63: ; preds = %pred.store.if62, %pred.store.continue61 %35 = extractelement <16 x i1> %8, i64 9 br i1 %35, label %pred.store.if64, label %pred.store.continue65 pred.store.if64: ; preds = %pred.store.continue63 %gep151 = getelementptr i8, ptr %invariant.gep150, i64 %offset.idx store i8 %post, ptr %gep151, align 1, !tbaa !14 br label %pred.store.continue65 pred.store.continue65: ; preds = %pred.store.if64, %pred.store.continue63 %36 = extractelement <16 x i1> %8, i64 10 br i1 %36, label %pred.store.if66, label %pred.store.continue67 pred.store.if66: ; preds = %pred.store.continue65 %gep153 = getelementptr i8, ptr %invariant.gep152, i64 %offset.idx store i8 %post, ptr %gep153, align 1, !tbaa !14 br label %pred.store.continue67 pred.store.continue67: ; preds = %pred.store.if66, %pred.store.continue65 %37 = extractelement <16 x i1> %8, i64 11 br i1 %37, label %pred.store.if68, label %pred.store.continue69 pred.store.if68: ; preds = %pred.store.continue67 %gep155 = getelementptr i8, ptr %invariant.gep154, i64 %offset.idx store i8 %post, ptr %gep155, align 1, !tbaa !14 br label %pred.store.continue69 pred.store.continue69: ; preds = %pred.store.if68, %pred.store.continue67 %38 = extractelement <16 x i1> %8, i64 12 br i1 %38, label %pred.store.if70, label %pred.store.continue71 pred.store.if70: ; preds = %pred.store.continue69 %gep157 = getelementptr i8, ptr %invariant.gep156, i64 %offset.idx store i8 %post, ptr %gep157, align 1, !tbaa !14 br label %pred.store.continue71 pred.store.continue71: ; preds = %pred.store.if70, %pred.store.continue69 %39 = extractelement <16 x i1> %8, i64 13 br i1 %39, label %pred.store.if72, label %pred.store.continue73 pred.store.if72: ; preds = %pred.store.continue71 %gep159 = getelementptr i8, ptr %invariant.gep158, i64 %offset.idx store i8 %post, ptr %gep159, align 1, !tbaa !14 br label %pred.store.continue73 pred.store.continue73: ; preds = %pred.store.if72, %pred.store.continue71 %40 = extractelement <16 x i1> %8, i64 14 br i1 %40, label %pred.store.if74, label %pred.store.continue75 pred.store.if74: ; preds = %pred.store.continue73 %gep161 = getelementptr i8, ptr %invariant.gep160, i64 %offset.idx store i8 %post, ptr %gep161, align 1, !tbaa !14 br label %pred.store.continue75 pred.store.continue75: ; preds = %pred.store.if74, %pred.store.continue73 %41 = extractelement <16 x i1> %8, i64 15 br i1 %41, label %pred.store.if76, label %pred.store.continue77 pred.store.if76: ; preds = %pred.store.continue75 %gep163 = getelementptr i8, ptr %invariant.gep162, i64 %offset.idx store i8 %post, ptr %gep163, align 1, !tbaa !14 br label %pred.store.continue77 pred.store.continue77: ; preds = %pred.store.if76, %pred.store.continue75 %index.next = add nuw i64 %index, 32 %42 = icmp eq i64 %index.next, %n.vec br i1 %42, label %middle.block, label %vector.body, !llvm.loop !54 middle.block: ; preds = %pred.store.continue77 %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end80 = add nsw i64 %n.vec, %0 %n.vec.remaining = and i64 %4, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.body.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %n.vec79 = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec79, %0 %broadcast.splatinsert85 = insertelement <8 x i8> poison, i8 %pre, i64 0 %broadcast.splat86 = shufflevector <8 x i8> %broadcast.splatinsert85, <8 x i8> poison, <8 x i32> zeroinitializer %invariant.gep164 = getelementptr i8, ptr %array, i64 1 %invariant.gep166 = getelementptr i8, ptr %array, i64 2 %invariant.gep168 = getelementptr i8, ptr %array, i64 3 %invariant.gep170 = getelementptr i8, ptr %array, i64 4 %invariant.gep172 = getelementptr i8, ptr %array, i64 5 %invariant.gep174 = getelementptr i8, ptr %array, i64 6 %invariant.gep176 = getelementptr i8, ptr %array, i64 7 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %pred.store.continue102, %vec.epilog.ph %index82 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next103, %pred.store.continue102 ] %offset.idx83 = add i64 %index82, %0 %43 = getelementptr inbounds i8, ptr %array, i64 %offset.idx83 %wide.load84 = load <8 x i8>, ptr %43, align 1, !tbaa !14 %44 = icmp eq <8 x i8> %wide.load84, %broadcast.splat86 %45 = extractelement <8 x i1> %44, i64 0 br i1 %45, label %pred.store.if87, label %pred.store.continue88 pred.store.if87: ; preds = %vec.epilog.vector.body %46 = getelementptr inbounds i8, ptr %array, i64 %offset.idx83 store i8 %post, ptr %46, align 1, !tbaa !14 br label %pred.store.continue88 pred.store.continue88: ; preds = %pred.store.if87, %vec.epilog.vector.body %47 = extractelement <8 x i1> %44, i64 1 br i1 %47, label %pred.store.if89, label %pred.store.continue90 pred.store.if89: ; preds = %pred.store.continue88 %gep165 = getelementptr i8, ptr %invariant.gep164, i64 %offset.idx83 store i8 %post, ptr %gep165, align 1, !tbaa !14 br label %pred.store.continue90 pred.store.continue90: ; preds = %pred.store.if89, %pred.store.continue88 %48 = extractelement <8 x i1> %44, i64 2 br i1 %48, label %pred.store.if91, label %pred.store.continue92 pred.store.if91: ; preds = %pred.store.continue90 %gep167 = getelementptr i8, ptr %invariant.gep166, i64 %offset.idx83 store i8 %post, ptr %gep167, align 1, !tbaa !14 br label %pred.store.continue92 pred.store.continue92: ; preds = %pred.store.if91, %pred.store.continue90 %49 = extractelement <8 x i1> %44, i64 3 br i1 %49, label %pred.store.if93, label %pred.store.continue94 pred.store.if93: ; preds = %pred.store.continue92 %gep169 = getelementptr i8, ptr %invariant.gep168, i64 %offset.idx83 store i8 %post, ptr %gep169, align 1, !tbaa !14 br label %pred.store.continue94 pred.store.continue94: ; preds = %pred.store.if93, %pred.store.continue92 %50 = extractelement <8 x i1> %44, i64 4 br i1 %50, label %pred.store.if95, label %pred.store.continue96 pred.store.if95: ; preds = %pred.store.continue94 %gep171 = getelementptr i8, ptr %invariant.gep170, i64 %offset.idx83 store i8 %post, ptr %gep171, align 1, !tbaa !14 br label %pred.store.continue96 pred.store.continue96: ; preds = %pred.store.if95, %pred.store.continue94 %51 = extractelement <8 x i1> %44, i64 5 br i1 %51, label %pred.store.if97, label %pred.store.continue98 pred.store.if97: ; preds = %pred.store.continue96 %gep173 = getelementptr i8, ptr %invariant.gep172, i64 %offset.idx83 store i8 %post, ptr %gep173, align 1, !tbaa !14 br label %pred.store.continue98 pred.store.continue98: ; preds = %pred.store.if97, %pred.store.continue96 %52 = extractelement <8 x i1> %44, i64 6 br i1 %52, label %pred.store.if99, label %pred.store.continue100 pred.store.if99: ; preds = %pred.store.continue98 %gep175 = getelementptr i8, ptr %invariant.gep174, i64 %offset.idx83 store i8 %post, ptr %gep175, align 1, !tbaa !14 br label %pred.store.continue100 pred.store.continue100: ; preds = %pred.store.if99, %pred.store.continue98 %53 = extractelement <8 x i1> %44, i64 7 br i1 %53, label %pred.store.if101, label %pred.store.continue102 pred.store.if101: ; preds = %pred.store.continue100 %gep177 = getelementptr i8, ptr %invariant.gep176, i64 %offset.idx83 store i8 %post, ptr %gep177, align 1, !tbaa !14 br label %pred.store.continue102 pred.store.continue102: ; preds = %pred.store.if101, %pred.store.continue100 %index.next103 = add nuw i64 %index82, 8 %54 = icmp eq i64 %index.next103, %n.vec79 br i1 %54, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !55 vec.epilog.middle.block: ; preds = %pred.store.continue102 %cmp.n81 = icmp eq i64 %4, %n.vec79 br i1 %cmp.n81, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.ph = phi i64 [ %0, %iter.check ], [ %ind.end80, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ] br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ %indvars.iv.ph, %for.body.preheader ] %arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv %55 = load i8, ptr %arrayidx, align 1, !tbaa !14 %cmp2 = icmp eq i8 %55, %pre br i1 %cmp2, label %if.then, label %for.inc if.then: ; preds = %for.body store i8 %post, ptr %arrayidx, align 1, !tbaa !14 br label %for.inc for.inc: ; preds = %for.body, %if.then %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !56 for.end: ; preds = %for.inc, %middle.block, %vec.epilog.middle.block, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_asc_int(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 { entry: %cmp.not28 = icmp sgt i32 %min, %max br i1 %cmp.not28, label %for.end14, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %max to i64 %1 = sext i32 %min to i64 %2 = add i32 %max, 1 br label %for.body for.cond.loopexit: ; preds = %for.inc, %for.body %lftr.wideiv = trunc i64 %indvars.iv.next34 to i32 %exitcond.not = icmp eq i32 %2, %lftr.wideiv br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !57 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ] %indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ] %indvars.iv = add i32 %indvars.iv.in, 1 %indvars.iv.next34 = add nsw i64 %indvars.iv33, 1 %cmp2.not26.not = icmp slt i64 %indvars.iv33, %0 br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit for.body3.lr.ph: ; preds = %for.body %3 = sext i32 %indvars.iv to i64 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv33 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ] %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx5 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv30 %5 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %cmp6 = icmp sgt i32 %4, %5 br i1 %cmp6, label %if.then, label %for.inc if.then: ; preds = %for.body3 store i32 %5, ptr %arrayidx, align 4, !tbaa !5 store i32 %4, ptr %arrayidx5, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next31 = add nsw i64 %indvars.iv30, 1 %cmp2.not.not = icmp slt i64 %indvars.iv30, %0 br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !58 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_des_int(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #4 { entry: %cmp.not28 = icmp sgt i32 %min, %max br i1 %cmp.not28, label %for.end14, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %max to i64 %1 = sext i32 %min to i64 %2 = add i32 %max, 1 br label %for.body for.cond.loopexit: ; preds = %for.inc, %for.body %lftr.wideiv = trunc i64 %indvars.iv.next34 to i32 %exitcond.not = icmp eq i32 %2, %lftr.wideiv br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !59 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvars.iv33 = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ] %indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ] %indvars.iv = add i32 %indvars.iv.in, 1 %indvars.iv.next34 = add nsw i64 %indvars.iv33, 1 %cmp2.not26.not = icmp slt i64 %indvars.iv33, %0 br i1 %cmp2.not26.not, label %for.body3.lr.ph, label %for.cond.loopexit for.body3.lr.ph: ; preds = %for.body %3 = sext i32 %indvars.iv to i64 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv33 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvars.iv30 = phi i64 [ %3, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ] %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx5 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv30 %5 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %cmp6 = icmp slt i32 %4, %5 br i1 %cmp6, label %if.then, label %for.inc if.then: ; preds = %for.body3 store i32 %5, ptr %arrayidx, align 4, !tbaa !5 store i32 %4, ptr %arrayidx5, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next31 = add nsw i64 %indvars.iv30, 1 %cmp2.not.not = icmp slt i64 %indvars.iv30, %0 br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !60 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_asc_char_dic(i32 noundef %size, ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #16 { entry: %0 = zext i32 %size to i64 %cmp.not29 = icmp sgt i32 %min, %max %cmp.not6.i = icmp slt i32 %size, 1 %or.cond = or i1 %cmp.not29, %cmp.not6.i br i1 %or.cond, label %for.end14, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = sext i32 %max to i64 %2 = sext i32 %min to i64 %3 = add i32 %max, 1 %4 = add nsw i64 %2, 1 %5 = add i32 %min, 1 %min.iters.check = icmp ult i32 %size, 8 %min.iters.check45 = icmp ult i32 %size, 32 %n.vec = and i64 %0, 4294967264 %cmp.n = icmp eq i64 %n.vec, %0 %n.vec.remaining = and i64 %0, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 %n.vec50 = and i64 %0, 4294967288 %cmp.n51 = icmp eq i64 %n.vec50, %0 %xtraiter = and i64 %0, 1 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 %6 = sub nsw i64 0, %0 br label %for.body for.cond.loopexit: ; preds = %for.inc, %for.body %lftr.wideiv = trunc i64 %indvars.iv.next38 to i32 %exitcond.not = icmp eq i32 %3, %lftr.wideiv %indvar.next = add i64 %indvar, 1 br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !61 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvar = phi i64 [ 0, %for.body.preheader ], [ %indvar.next, %for.cond.loopexit ] %indvars.iv37 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next38, %for.cond.loopexit ] %indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ] %7 = add i64 %indvar, %2 %8 = mul i64 %7, %0 %scevgep = getelementptr i8, ptr %array, i64 %8 %9 = add i64 %4, %indvar %10 = mul i64 %9, %0 %scevgep40 = getelementptr i8, ptr %array, i64 %10 %11 = trunc i64 %indvar to i32 %12 = add i32 %5, %11 %13 = sext i32 %12 to i64 %14 = add nsw i64 %13, 1 %indvars.iv = add i32 %indvars.iv.in, 1 %indvars.iv.next38 = add nsw i64 %indvars.iv37, 1 %cmp2.not27.not = icmp slt i64 %indvars.iv37, %1 br i1 %cmp2.not27.not, label %for.body3.lr.ph, label %for.cond.loopexit for.body3.lr.ph: ; preds = %for.body %15 = sext i32 %indvars.iv to i64 %16 = mul nsw i64 %indvars.iv37, %0 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %16 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvar41 = phi i64 [ 0, %for.body3.lr.ph ], [ %indvar.next42, %for.inc ] %indvars.iv34 = phi i64 [ %15, %for.body3.lr.ph ], [ %indvars.iv.next35, %for.inc ] %17 = add i64 %indvar41, %13 %18 = mul i64 %17, %0 %scevgep43 = getelementptr i8, ptr %array, i64 %18 %19 = add i64 %14, %indvar41 %20 = mul i64 %19, %0 %scevgep44 = getelementptr i8, ptr %array, i64 %20 %21 = mul nsw i64 %indvars.iv34, %0 %arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %21 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #24 %cmp6 = icmp slt i32 %call, 1 br i1 %cmp6, label %for.inc, label %iter.check iter.check: ; preds = %for.body3 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.memcheck vector.memcheck: ; preds = %iter.check %bound0 = icmp ult ptr %scevgep, %scevgep44 %bound1 = icmp ult ptr %scevgep43, %scevgep40 %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %for.body.i.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck br i1 %min.iters.check45, label %vec.epilog.ph, label %vector.body vector.body: ; preds = %vector.main.loop.iter.check, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ] %22 = getelementptr inbounds i8, ptr %arrayidx, i64 %index %23 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index %wide.load = load <16 x i8>, ptr %22, align 1, !tbaa !14, !alias.scope !62, !noalias !65 %24 = getelementptr inbounds i8, ptr %22, i64 16 %wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !62, !noalias !65 %wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !65 %25 = getelementptr inbounds i8, ptr %23, i64 16 %wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !65 store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !62, !noalias !65 store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !62, !noalias !65 store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !65 store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !65 %index.next = add nuw i64 %index, 32 %26 = icmp eq i64 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !67 middle.block: ; preds = %vector.body br i1 %cmp.n, label %for.inc, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index52 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next55, %vec.epilog.vector.body ] %27 = getelementptr inbounds i8, ptr %arrayidx, i64 %index52 %28 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index52 %wide.load53 = load <8 x i8>, ptr %27, align 1, !tbaa !14, !alias.scope !68, !noalias !71 %wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !71 store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !68, !noalias !71 store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !71 %index.next55 = add nuw i64 %index52, 8 %29 = icmp eq i64 %index.next55, %n.vec50 br i1 %29, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !73 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body br i1 %cmp.n51, label %for.inc, label %for.body.i.preheader for.body.i.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.i.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec50, %vec.epilog.middle.block ] br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol for.body.i.prol: ; preds = %for.body.i.preheader %arrayidx.i.prol = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.ph %arrayidx2.i.prol = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i.ph %30 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14 %31 = load i8, ptr %arrayidx2.i.prol, align 1, !tbaa !14 store i8 %31, ptr %arrayidx.i.prol, align 1, !tbaa !14 store i8 %30, ptr %arrayidx2.i.prol, align 1, !tbaa !14 %indvars.iv.next.i.prol = or i64 %indvars.iv.i.ph, 1 br label %for.body.i.prol.loopexit for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader %indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ] %32 = xor i64 %indvars.iv.i.ph, %6 %33 = icmp eq i64 %32, -1 br i1 %33, label %for.inc, label %for.body.i for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ] %arrayidx.i = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i %arrayidx2.i = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i %34 = load i8, ptr %arrayidx.i, align 1, !tbaa !14 %35 = load i8, ptr %arrayidx2.i, align 1, !tbaa !14 store i8 %35, ptr %arrayidx.i, align 1, !tbaa !14 store i8 %34, ptr %arrayidx2.i, align 1, !tbaa !14 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %arrayidx.i.1 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i %arrayidx2.i.1 = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.next.i %36 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14 %37 = load i8, ptr %arrayidx2.i.1, align 1, !tbaa !14 store i8 %37, ptr %arrayidx.i.1, align 1, !tbaa !14 store i8 %36, ptr %arrayidx2.i.1, align 1, !tbaa !14 %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %38 = icmp eq i64 %indvars.iv.next.i.1, %0 br i1 %38, label %for.inc, label %for.body.i, !llvm.loop !74 for.inc: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %for.body3 %indvars.iv.next35 = add nsw i64 %indvars.iv34, 1 %cmp2.not.not = icmp slt i64 %indvars.iv34, %1 %indvar.next42 = add i64 %indvar41, 1 br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !75 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #13 ; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_des_char_dic(i32 noundef %size, ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #16 { entry: %0 = zext i32 %size to i64 %cmp.not29 = icmp sgt i32 %min, %max %cmp.not6.i = icmp slt i32 %size, 1 %or.cond = or i1 %cmp.not29, %cmp.not6.i br i1 %or.cond, label %for.end14, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = sext i32 %max to i64 %2 = sext i32 %min to i64 %3 = add i32 %max, 1 %4 = add nsw i64 %2, 1 %5 = add i32 %min, 1 %min.iters.check = icmp ult i32 %size, 8 %min.iters.check45 = icmp ult i32 %size, 32 %n.vec = and i64 %0, 4294967264 %cmp.n = icmp eq i64 %n.vec, %0 %n.vec.remaining = and i64 %0, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 %n.vec50 = and i64 %0, 4294967288 %cmp.n51 = icmp eq i64 %n.vec50, %0 %xtraiter = and i64 %0, 1 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 %6 = sub nsw i64 0, %0 br label %for.body for.cond.loopexit: ; preds = %for.inc, %for.body %lftr.wideiv = trunc i64 %indvars.iv.next38 to i32 %exitcond.not = icmp eq i32 %3, %lftr.wideiv %indvar.next = add i64 %indvar, 1 br i1 %exitcond.not, label %for.end14, label %for.body, !llvm.loop !76 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvar = phi i64 [ 0, %for.body.preheader ], [ %indvar.next, %for.cond.loopexit ] %indvars.iv37 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next38, %for.cond.loopexit ] %indvars.iv.in = phi i32 [ %min, %for.body.preheader ], [ %indvars.iv, %for.cond.loopexit ] %7 = add i64 %indvar, %2 %8 = mul i64 %7, %0 %scevgep = getelementptr i8, ptr %array, i64 %8 %9 = add i64 %4, %indvar %10 = mul i64 %9, %0 %scevgep40 = getelementptr i8, ptr %array, i64 %10 %11 = trunc i64 %indvar to i32 %12 = add i32 %5, %11 %13 = sext i32 %12 to i64 %14 = add nsw i64 %13, 1 %indvars.iv = add i32 %indvars.iv.in, 1 %indvars.iv.next38 = add nsw i64 %indvars.iv37, 1 %cmp2.not27.not = icmp slt i64 %indvars.iv37, %1 br i1 %cmp2.not27.not, label %for.body3.lr.ph, label %for.cond.loopexit for.body3.lr.ph: ; preds = %for.body %15 = sext i32 %indvars.iv to i64 %16 = mul nsw i64 %indvars.iv37, %0 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %16 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvar41 = phi i64 [ 0, %for.body3.lr.ph ], [ %indvar.next42, %for.inc ] %indvars.iv34 = phi i64 [ %15, %for.body3.lr.ph ], [ %indvars.iv.next35, %for.inc ] %17 = add i64 %indvar41, %13 %18 = mul i64 %17, %0 %scevgep43 = getelementptr i8, ptr %array, i64 %18 %19 = add i64 %14, %indvar41 %20 = mul i64 %19, %0 %scevgep44 = getelementptr i8, ptr %array, i64 %20 %21 = mul nsw i64 %indvars.iv34, %0 %arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %21 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #24 %cmp6 = icmp sgt i32 %call, -1 br i1 %cmp6, label %for.inc, label %iter.check iter.check: ; preds = %for.body3 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.memcheck vector.memcheck: ; preds = %iter.check %bound0 = icmp ult ptr %scevgep, %scevgep44 %bound1 = icmp ult ptr %scevgep43, %scevgep40 %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %for.body.i.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck br i1 %min.iters.check45, label %vec.epilog.ph, label %vector.body vector.body: ; preds = %vector.main.loop.iter.check, %vector.body %index = phi i64 [ %index.next, %vector.body ], [ 0, %vector.main.loop.iter.check ] %22 = getelementptr inbounds i8, ptr %arrayidx, i64 %index %23 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index %wide.load = load <16 x i8>, ptr %22, align 1, !tbaa !14, !alias.scope !77, !noalias !80 %24 = getelementptr inbounds i8, ptr %22, i64 16 %wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !77, !noalias !80 %wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !80 %25 = getelementptr inbounds i8, ptr %23, i64 16 %wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !80 store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !77, !noalias !80 store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !77, !noalias !80 store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !80 store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !80 %index.next = add nuw i64 %index, 32 %26 = icmp eq i64 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !82 middle.block: ; preds = %vector.body br i1 %cmp.n, label %for.inc, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index52 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next55, %vec.epilog.vector.body ] %27 = getelementptr inbounds i8, ptr %arrayidx, i64 %index52 %28 = getelementptr inbounds i8, ptr %arrayidx5, i64 %index52 %wide.load53 = load <8 x i8>, ptr %27, align 1, !tbaa !14, !alias.scope !83, !noalias !86 %wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !86 store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !83, !noalias !86 store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !86 %index.next55 = add nuw i64 %index52, 8 %29 = icmp eq i64 %index.next55, %n.vec50 br i1 %29, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !88 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body br i1 %cmp.n51, label %for.inc, label %for.body.i.preheader for.body.i.preheader: ; preds = %vector.memcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.i.ph = phi i64 [ 0, %iter.check ], [ 0, %vector.memcheck ], [ %n.vec, %vec.epilog.iter.check ], [ %n.vec50, %vec.epilog.middle.block ] br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol for.body.i.prol: ; preds = %for.body.i.preheader %arrayidx.i.prol = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i.ph %arrayidx2.i.prol = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i.ph %30 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14 %31 = load i8, ptr %arrayidx2.i.prol, align 1, !tbaa !14 store i8 %31, ptr %arrayidx.i.prol, align 1, !tbaa !14 store i8 %30, ptr %arrayidx2.i.prol, align 1, !tbaa !14 %indvars.iv.next.i.prol = or i64 %indvars.iv.i.ph, 1 br label %for.body.i.prol.loopexit for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader %indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ] %32 = xor i64 %indvars.iv.i.ph, %6 %33 = icmp eq i64 %32, -1 br i1 %33, label %for.inc, label %for.body.i for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ] %arrayidx.i = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.i %arrayidx2.i = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.i %34 = load i8, ptr %arrayidx.i, align 1, !tbaa !14 %35 = load i8, ptr %arrayidx2.i, align 1, !tbaa !14 store i8 %35, ptr %arrayidx.i, align 1, !tbaa !14 store i8 %34, ptr %arrayidx2.i, align 1, !tbaa !14 %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %arrayidx.i.1 = getelementptr inbounds i8, ptr %arrayidx, i64 %indvars.iv.next.i %arrayidx2.i.1 = getelementptr inbounds i8, ptr %arrayidx5, i64 %indvars.iv.next.i %36 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14 %37 = load i8, ptr %arrayidx2.i.1, align 1, !tbaa !14 store i8 %37, ptr %arrayidx.i.1, align 1, !tbaa !14 store i8 %36, ptr %arrayidx2.i.1, align 1, !tbaa !14 %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %38 = icmp eq i64 %indvars.iv.next.i.1, %0 br i1 %38, label %for.inc, label %for.body.i, !llvm.loop !89 for.inc: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %for.body3 %indvars.iv.next35 = add nsw i64 %indvars.iv34, 1 %cmp2.not.not = icmp slt i64 %indvars.iv34, %1 %indvar.next42 = add i64 %indvar41, 1 br i1 %cmp2.not.not, label %for.body3, label %for.cond.loopexit, !llvm.loop !90 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i32 @max_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 { entry: %idxprom = sext i32 %min to i64 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp.not.not9 = icmp slt i32 %min, %max br i1 %cmp.not.not9, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %wide.trip.count = sext i32 %max to i64 %1 = sub nsw i64 %wide.trip.count, %idxprom %min.iters.check = icmp ult i64 %1, 8 br i1 %min.iters.check, label %for.body.preheader15, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, -8 %ind.end = add nsw i64 %n.vec, %idxprom %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %idxprom br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ] %vec.phi13 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %2 = getelementptr i32, ptr %gep, i64 1 %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr i32, ptr %gep, i64 5 %wide.load14 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load) %5 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi13, <4 x i32> %wide.load14) %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !91 middle.block: ; preds = %vector.body %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %4, <4 x i32> %5) %7 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader15 for.body.preheader15: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %idxprom, %for.body.preheader ], [ %ind.end, %middle.block ] %answer.011.ph = phi i32 [ %0, %for.body.preheader ], [ %7, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader15, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader15 ] %answer.011 = phi i32 [ %spec.select.i, %for.body ], [ %answer.011.ph, %for.body.preheader15 ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx2 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %8 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %spec.select.i = tail call i32 @llvm.smax.i32(i32 %answer.011, i32 %8) %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !92 for.end: ; preds = %for.body, %middle.block, %entry %answer.0.lcssa = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @max_int_array_num(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef writeonly %answer) local_unnamed_addr #15 { entry: %idxprom.i = sext i32 %min to i64 %arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %idxprom.i %0 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %cmp.not.not9.i = icmp slt i32 %min, %max br i1 %cmp.not.not9.i, label %for.body.preheader.i, label %max_int_array.exit for.body.preheader.i: ; preds = %entry %wide.trip.count.i = sext i32 %max to i64 %1 = sub nsw i64 %wide.trip.count.i, %idxprom.i %min.iters.check = icmp ult i64 %1, 8 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.ph vector.ph: ; preds = %for.body.preheader.i %n.vec = and i64 %1, -8 %ind.end = add nsw i64 %n.vec, %idxprom.i %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %idxprom.i br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ] %vec.phi26 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %2 = getelementptr i32, ptr %gep, i64 1 %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr i32, ptr %gep, i64 5 %wide.load27 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load) %5 = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %vec.phi26, <4 x i32> %wide.load27) %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !93 middle.block: ; preds = %vector.body %rdx.minmax = tail call <4 x i32> @llvm.smax.v4i32(<4 x i32> %4, <4 x i32> %5) %7 = tail call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %max_int_array.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ %idxprom.i, %for.body.preheader.i ], [ %ind.end, %middle.block ] %answer.011.i.ph = phi i32 [ %0, %for.body.preheader.i ], [ %7, %middle.block ] br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ] %answer.011.i = phi i32 [ %spec.select.i.i, %for.body.i ], [ %answer.011.i.ph, %for.body.i.preheader ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %arrayidx2.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %8 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %spec.select.i.i = tail call i32 @llvm.smax.i32(i32 %answer.011.i, i32 %8) %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %max_int_array.exit, label %for.body.i, !llvm.loop !94 max_int_array.exit: ; preds = %for.body.i, %middle.block, %entry %answer.0.lcssa.i = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i.i, %for.body.i ] %sub = sub nsw i32 %max, %min %cmp.not4.i = icmp slt i32 %sub, 0 br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i16 for.body.preheader.i16: ; preds = %max_int_array.exit %9 = add nuw i32 %sub, 1 %10 = zext i32 %9 to i64 %11 = shl nuw nsw i64 %10, 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %answer, i8 -1, i64 %11, i1 false), !tbaa !5 br label %fill_int.exit fill_int.exit: ; preds = %for.body.preheader.i16, %max_int_array.exit %cmp.not22 = icmp sgt i32 %min, %max br i1 %cmp.not22, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %fill_int.exit %12 = add i32 %max, 1 %13 = sub i32 %12, %min %xtraiter = and i32 %13, 1 %14 = icmp eq i32 %max, %min br i1 %14, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %13, -2 br label %for.body for.body: ; preds = %for.inc.1, %for.body.preheader.new %indvars.iv = phi i64 [ %idxprom.i, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %count.023 = phi i32 [ 0, %for.body.preheader.new ], [ %count.1.1, %for.inc.1 ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %15 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %15, %answer.0.lcssa.i br i1 %cmp1, label %if.then, label %for.inc if.then: ; preds = %for.body %idxprom2 = sext i32 %count.023 to i64 %arrayidx3 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2 %16 = trunc i64 %indvars.iv to i32 store i32 %16, ptr %arrayidx3, align 4, !tbaa !5 %add = add nsw i32 %count.023, 1 br label %for.inc for.inc: ; preds = %for.body, %if.then %count.1 = phi i32 [ %add, %if.then ], [ %count.023, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %17 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp1.1 = icmp eq i32 %17, %answer.0.lcssa.i br i1 %cmp1.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %idxprom2.1 = sext i32 %count.1 to i64 %arrayidx3.1 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2.1 %18 = trunc i64 %indvars.iv.next to i32 store i32 %18, ptr %arrayidx3.1, align 4, !tbaa !5 %add.1 = add nsw i32 %count.1, 1 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %count.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %count.1, %for.inc ] %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !95 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.inc.1 %19 = sext i32 %count.1.1 to i64 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %indvars.iv.unr = phi i64 [ %idxprom.i, %for.body.preheader ], [ %indvars.iv.next.1, %for.end.loopexit.unr-lcssa.loopexit ] %count.023.unr = phi i64 [ 0, %for.body.preheader ], [ %19, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.unr %20 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5 %cmp1.epil = icmp eq i32 %20, %answer.0.lcssa.i br i1 %cmp1.epil, label %if.then.epil, label %for.end if.then.epil: ; preds = %for.body.epil %arrayidx3.epil = getelementptr inbounds i32, ptr %answer, i64 %count.023.unr %21 = trunc i64 %indvars.iv.unr to i32 store i32 %21, ptr %arrayidx3.epil, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit.unr-lcssa, %if.then.epil, %for.body.epil, %fill_int.exit ret void } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i32 @min_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 { entry: %idxprom = sext i32 %min to i64 %arrayidx = getelementptr inbounds i32, ptr %array, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp.not.not9 = icmp slt i32 %min, %max br i1 %cmp.not.not9, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %wide.trip.count = sext i32 %max to i64 %1 = sub nsw i64 %wide.trip.count, %idxprom %min.iters.check = icmp ult i64 %1, 8 br i1 %min.iters.check, label %for.body.preheader15, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, -8 %ind.end = add nsw i64 %n.vec, %idxprom %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %idxprom br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ] %vec.phi13 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %2 = getelementptr i32, ptr %gep, i64 1 %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr i32, ptr %gep, i64 5 %wide.load14 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load) %5 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi13, <4 x i32> %wide.load14) %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !96 middle.block: ; preds = %vector.body %rdx.minmax = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %4, <4 x i32> %5) %7 = tail call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader15 for.body.preheader15: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %idxprom, %for.body.preheader ], [ %ind.end, %middle.block ] %answer.011.ph = phi i32 [ %0, %for.body.preheader ], [ %7, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader15, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader15 ] %answer.011 = phi i32 [ %spec.select.i, %for.body ], [ %answer.011.ph, %for.body.preheader15 ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx2 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %8 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %spec.select.i = tail call i32 @llvm.smin.i32(i32 %answer.011, i32 %8) %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !97 for.end: ; preds = %for.body, %middle.block, %entry %answer.0.lcssa = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @min_int_array_num(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef writeonly %answer) local_unnamed_addr #15 { entry: %idxprom.i = sext i32 %min to i64 %arrayidx.i = getelementptr inbounds i32, ptr %array, i64 %idxprom.i %0 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %cmp.not.not9.i = icmp slt i32 %min, %max br i1 %cmp.not.not9.i, label %for.body.preheader.i, label %min_int_array.exit for.body.preheader.i: ; preds = %entry %wide.trip.count.i = sext i32 %max to i64 %1 = sub nsw i64 %wide.trip.count.i, %idxprom.i %min.iters.check = icmp ult i64 %1, 8 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.ph vector.ph: ; preds = %for.body.preheader.i %n.vec = and i64 %1, -8 %ind.end = add nsw i64 %n.vec, %idxprom.i %minmax.ident.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %minmax.ident.splat = shufflevector <4 x i32> %minmax.ident.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %idxprom.i br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %4, %vector.body ] %vec.phi26 = phi <4 x i32> [ %minmax.ident.splat, %vector.ph ], [ %5, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %2 = getelementptr i32, ptr %gep, i64 1 %wide.load = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = getelementptr i32, ptr %gep, i64 5 %wide.load27 = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi, <4 x i32> %wide.load) %5 = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %vec.phi26, <4 x i32> %wide.load27) %index.next = add nuw i64 %index, 8 %6 = icmp eq i64 %index.next, %n.vec br i1 %6, label %middle.block, label %vector.body, !llvm.loop !98 middle.block: ; preds = %vector.body %rdx.minmax = tail call <4 x i32> @llvm.smin.v4i32(<4 x i32> %4, <4 x i32> %5) %7 = tail call i32 @llvm.vector.reduce.smin.v4i32(<4 x i32> %rdx.minmax) %cmp.n = icmp eq i64 %1, %n.vec br i1 %cmp.n, label %min_int_array.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ %idxprom.i, %for.body.preheader.i ], [ %ind.end, %middle.block ] %answer.011.i.ph = phi i32 [ %0, %for.body.preheader.i ], [ %7, %middle.block ] br label %for.body.i for.body.i: ; preds = %for.body.i.preheader, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %for.body.i ], [ %indvars.iv.i.ph, %for.body.i.preheader ] %answer.011.i = phi i32 [ %spec.select.i.i, %for.body.i ], [ %answer.011.i.ph, %for.body.i.preheader ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, 1 %arrayidx2.i = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next.i %8 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %spec.select.i.i = tail call i32 @llvm.smin.i32(i32 %answer.011.i, i32 %8) %exitcond.not.i = icmp eq i64 %indvars.iv.next.i, %wide.trip.count.i br i1 %exitcond.not.i, label %min_int_array.exit, label %for.body.i, !llvm.loop !99 min_int_array.exit: ; preds = %for.body.i, %middle.block, %entry %answer.0.lcssa.i = phi i32 [ %0, %entry ], [ %7, %middle.block ], [ %spec.select.i.i, %for.body.i ] %sub = sub nsw i32 %max, %min %cmp.not4.i = icmp slt i32 %sub, 0 br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i16 for.body.preheader.i16: ; preds = %min_int_array.exit %9 = add nuw i32 %sub, 1 %10 = zext i32 %9 to i64 %11 = shl nuw nsw i64 %10, 2 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(1) %answer, i8 -1, i64 %11, i1 false), !tbaa !5 br label %fill_int.exit fill_int.exit: ; preds = %for.body.preheader.i16, %min_int_array.exit %cmp.not22 = icmp sgt i32 %min, %max br i1 %cmp.not22, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %fill_int.exit %12 = add i32 %max, 1 %13 = sub i32 %12, %min %xtraiter = and i32 %13, 1 %14 = icmp eq i32 %max, %min br i1 %14, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %13, -2 br label %for.body for.body: ; preds = %for.inc.1, %for.body.preheader.new %indvars.iv = phi i64 [ %idxprom.i, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %count.023 = phi i32 [ 0, %for.body.preheader.new ], [ %count.1.1, %for.inc.1 ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.inc.1 ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %15 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %15, %answer.0.lcssa.i br i1 %cmp1, label %if.then, label %for.inc if.then: ; preds = %for.body %idxprom2 = sext i32 %count.023 to i64 %arrayidx3 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2 %16 = trunc i64 %indvars.iv to i32 store i32 %16, ptr %arrayidx3, align 4, !tbaa !5 %add = add nsw i32 %count.023, 1 br label %for.inc for.inc: ; preds = %for.body, %if.then %count.1 = phi i32 [ %add, %if.then ], [ %count.023, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.next %17 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp1.1 = icmp eq i32 %17, %answer.0.lcssa.i br i1 %cmp1.1, label %if.then.1, label %for.inc.1 if.then.1: ; preds = %for.inc %idxprom2.1 = sext i32 %count.1 to i64 %arrayidx3.1 = getelementptr inbounds i32, ptr %answer, i64 %idxprom2.1 %18 = trunc i64 %indvars.iv.next to i32 store i32 %18, ptr %arrayidx3.1, align 4, !tbaa !5 %add.1 = add nsw i32 %count.1, 1 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %count.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %count.1, %for.inc ] %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !100 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.inc.1 %19 = sext i32 %count.1.1 to i64 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.preheader %indvars.iv.unr = phi i64 [ %idxprom.i, %for.body.preheader ], [ %indvars.iv.next.1, %for.end.loopexit.unr-lcssa.loopexit ] %count.023.unr = phi i64 [ 0, %for.body.preheader ], [ %19, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds i32, ptr %array, i64 %indvars.iv.unr %20 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5 %cmp1.epil = icmp eq i32 %20, %answer.0.lcssa.i br i1 %cmp1.epil, label %if.then.epil, label %for.end if.then.epil: ; preds = %for.body.epil %arrayidx3.epil = getelementptr inbounds i32, ptr %answer, i64 %count.023.unr %21 = trunc i64 %indvars.iv.unr to i32 store i32 %21, ptr %arrayidx3.epil, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.end.loopexit.unr-lcssa, %if.then.epil, %for.body.epil, %fill_int.exit ret void } ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i32 @max_char_dic(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 { entry: %0 = zext i32 %size to i64 %cmp.not.not11 = icmp slt i32 %min, %max br i1 %cmp.not.not11, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %1 = sext i32 %min to i64 %wide.trip.count = sext i32 %max to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %answer.013 = phi i32 [ %min, %for.body.preheader ], [ %spec.select, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %idxprom = sext i32 %answer.013 to i64 %2 = mul nsw i64 %idxprom, %0 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %2 %3 = mul nsw i64 %indvars.iv.next, %0 %arrayidx2 = getelementptr inbounds i8, ptr %array, i64 %3 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx2) #24 %cmp3 = icmp slt i32 %call, 0 %4 = trunc i64 %indvars.iv.next to i32 %spec.select = select i1 %cmp3, i32 %4, i32 %answer.013 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !101 for.end: ; preds = %for.body, %entry %answer.0.lcssa = phi i32 [ %min, %entry ], [ %spec.select, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i32 @min_char_dic(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #18 { entry: %0 = zext i32 %size to i64 %cmp.not.not11 = icmp slt i32 %min, %max br i1 %cmp.not.not11, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %1 = sext i32 %min to i64 %wide.trip.count = sext i32 %max to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %answer.013 = phi i32 [ %min, %for.body.preheader ], [ %spec.select, %for.body ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %idxprom = sext i32 %answer.013 to i64 %2 = mul nsw i64 %idxprom, %0 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %2 %3 = mul nsw i64 %indvars.iv.next, %0 %arrayidx2 = getelementptr inbounds i8, ptr %array, i64 %3 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx2) #24 %cmp3 = icmp sgt i32 %call, 0 %4 = trunc i64 %indvars.iv.next to i32 %spec.select = select i1 %cmp3, i32 %4, i32 %answer.013 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !102 for.end: ; preds = %for.body, %entry %answer.0.lcssa = phi i32 [ %min, %entry ], [ %spec.select, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @sum_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #19 { entry: %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader12, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec, %0 %invariant.gep = getelementptr i32, ptr %array, i64 %0 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 ], [ %6, %vector.body ] %vec.phi10 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !5 %5 = getelementptr inbounds i32, ptr %gep, i64 4 %wide.load11 = load <4 x i32>, ptr %5, align 4, !tbaa !5 %6 = add <4 x i32> %wide.load, %vec.phi %7 = add <4 x i32> %wide.load11, %vec.phi10 %index.next = add nuw i64 %index, 8 %8 = icmp eq i64 %index.next, %n.vec br i1 %8, label %middle.block, label %vector.body, !llvm.loop !103 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %7, %6 %9 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader12 for.body.preheader12: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] %answer.08.ph = phi i32 [ 0, %for.body.preheader ], [ %9, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader12, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader12 ] %answer.08 = phi i32 [ %add, %for.body ], [ %answer.08.ph, %for.body.preheader12 ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %10 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %10, %answer.08 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !104 for.end: ; preds = %for.body, %middle.block, %entry %answer.0.lcssa = phi i32 [ 0, %entry ], [ %9, %middle.block ], [ %add, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local zeroext i1 @detect_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #19 { entry: %cmp.not10 = icmp sgt i32 %min, %max br i1 %cmp.not10, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.inc ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %2, %element br i1 %cmp1, label %for.end.loopexit.split.loop.exit, label %for.inc for.inc: ; preds = %for.body %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !105 for.end.loopexit.split.loop.exit: ; preds = %for.body %3 = trunc i64 %indvars.iv to i32 br label %for.end for.end: ; preds = %for.inc, %for.end.loopexit.split.loop.exit, %entry %i.0.lcssa = phi i32 [ %min, %entry ], [ %3, %for.end.loopexit.split.loop.exit ], [ %1, %for.inc ] %cmp3.not = icmp sle i32 %i.0.lcssa, %max ret i1 %cmp3.not } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local zeroext i1 @detect_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef readonly %element, i32 noundef %start, i32 noundef %goal) local_unnamed_addr #19 { entry: %sub = sub nsw i32 %goal, %start %sub1 = sub nsw i32 %max, %min %cmp.not = icmp sgt i32 %sub, %sub1 br i1 %cmp.not, label %if.end24, label %for.cond.preheader for.cond.preheader: ; preds = %entry %sub3 = sub nsw i32 %max, %sub %cmp4.not42 = icmp slt i32 %sub3, %min br i1 %cmp4.not42, label %if.end24, label %for.cond5.preheader.lr.ph for.cond5.preheader.lr.ph: ; preds = %for.cond.preheader %cmp6.not39 = icmp sgt i32 %start, %goal %add16 = add i32 %goal, 1 br i1 %cmp6.not39, label %for.cond5.preheader.lr.ph.split.us, label %for.cond5.preheader.preheader for.cond5.preheader.preheader: ; preds = %for.cond5.preheader.lr.ph %0 = sext i32 %start to i64 br label %for.cond5.preheader for.cond5.preheader.lr.ph.split.us: ; preds = %for.cond5.preheader.lr.ph %cmp17.us = icmp eq i32 %add16, %start br label %if.end24 for.cond5.preheader: ; preds = %for.end, %for.cond5.preheader.preheader %i.043 = phi i32 [ %min, %for.cond5.preheader.preheader ], [ %add22, %for.end ] %add = sub i32 %i.043, %start br label %for.body7 for.body7: ; preds = %for.cond5.preheader, %for.inc %indvars.iv = phi i64 [ %0, %for.cond5.preheader ], [ %indvars.iv.next, %for.inc ] %1 = trunc i64 %indvars.iv to i32 %sub8 = add i32 %add, %1 %idxprom = sext i32 %sub8 to i64 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %idxprom %2 = load i8, ptr %arrayidx, align 1, !tbaa !14 %arrayidx10 = getelementptr inbounds i8, ptr %element, i64 %indvars.iv %3 = load i8, ptr %arrayidx10, align 1, !tbaa !14 %cmp12 = icmp eq i8 %2, %3 br i1 %cmp12, label %for.inc, label %for.end for.inc: ; preds = %for.body7 %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %add16, %lftr.wideiv br i1 %exitcond.not, label %if.end24, label %for.body7, !llvm.loop !106 for.end: ; preds = %for.body7 %cmp17 = icmp eq i32 %add16, %1 %add22 = add nsw i32 %i.043, 1 %cmp4.not.not = icmp sge i32 %i.043, %sub3 %or.cond.not = or i1 %cmp4.not.not, %cmp17 br i1 %or.cond.not, label %if.end24, label %for.cond5.preheader, !llvm.loop !107 if.end24: ; preds = %for.end, %for.inc, %for.cond5.preheader.lr.ph.split.us, %for.cond.preheader, %entry %answer.0 = phi i1 [ false, %entry ], [ false, %for.cond.preheader ], [ %cmp17.us, %for.cond5.preheader.lr.ph.split.us ], [ true, %for.inc ], [ %cmp17, %for.end ] ret i1 %answer.0 } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i32 @count_differentelement_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 { entry: %0 = zext i32 %max to i64 %vla = alloca i32, i64 %0, align 16 %cmp.not4.i = icmp slt i32 %max, 0 br i1 %cmp.not4.i, label %fill_int.exit, label %for.body.preheader.i for.body.preheader.i: ; preds = %entry %1 = add nuw i32 %max, 1 %2 = zext i32 %1 to i64 %3 = shl nuw nsw i64 %2, 2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %vla, i8 0, i64 %3, i1 false), !tbaa !5 br label %fill_int.exit fill_int.exit: ; preds = %for.body.preheader.i, %entry %cmp.not28 = icmp sgt i32 %min, %max br i1 %cmp.not28, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %fill_int.exit %4 = sext i32 %min to i64 %5 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv = phi i64 [ %4, %for.body.preheader ], [ %indvars.iv.next, %for.inc ] %answer.030 = phi i32 [ 0, %for.body.preheader ], [ %answer.1, %for.inc ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %6 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp.not10.i = icmp slt i32 %answer.030, 1 br i1 %cmp.not10.i, label %detect_int.exit, label %for.body.i19.preheader for.body.i19.preheader: ; preds = %for.body %zext = zext i32 %answer.030 to i64 br label %for.body.i19 for.body.i19: ; preds = %for.body.i19.preheader, %for.inc.i %indvars.iv.i20 = phi i64 [ %indvars.iv.next.i22, %for.inc.i ], [ 0, %for.body.i19.preheader ] %arrayidx.i21 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.i20 %7 = load i32, ptr %arrayidx.i21, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %7, %6 br i1 %cmp1.i, label %for.end.loopexit.split.loop.exit.i, label %for.inc.i for.inc.i: ; preds = %for.body.i19 %indvars.iv.next.i22 = add nuw nsw i64 %indvars.iv.i20, 1 %8 = icmp eq i64 %indvars.iv.next.i22, %zext br i1 %8, label %if.then, label %for.body.i19, !llvm.loop !105 for.end.loopexit.split.loop.exit.i: ; preds = %for.body.i19 %9 = trunc i64 %indvars.iv.i20 to i32 br label %detect_int.exit detect_int.exit: ; preds = %for.body, %for.end.loopexit.split.loop.exit.i %i.0.lcssa.i = phi i32 [ 0, %for.body ], [ %9, %for.end.loopexit.split.loop.exit.i ] %cmp3.not.i.not.not = icmp slt i32 %i.0.lcssa.i, %answer.030 br i1 %cmp3.not.i.not.not, label %for.inc, label %if.then if.then: ; preds = %for.inc.i, %detect_int.exit %idxprom5 = sext i32 %answer.030 to i64 %arrayidx6 = getelementptr inbounds i32, ptr %vla, i64 %idxprom5 store i32 %6, ptr %arrayidx6, align 4, !tbaa !5 %add = add nsw i32 %answer.030, 1 br label %for.inc for.inc: ; preds = %detect_int.exit, %if.then %answer.1 = phi i32 [ %add, %if.then ], [ %answer.030, %detect_int.exit ] %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %5, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !108 for.end: ; preds = %for.inc, %fill_int.exit %answer.0.lcssa = phi i32 [ 0, %fill_int.exit ], [ %answer.1, %for.inc ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nosync nounwind memory(argmem: read) uwtable define dso_local i32 @count_differentelement_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #17 { entry: %0 = zext i32 %max to i64 %vla = alloca i8, i64 %0, align 16 %cmp.not4.i = icmp slt i32 %max, 0 br i1 %cmp.not4.i, label %fill_char.exit, label %for.body.preheader.i for.body.preheader.i: ; preds = %entry %1 = add nuw nsw i64 %0, 1 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1) %vla, i8 0, i64 %1, i1 false), !tbaa !14 br label %fill_char.exit fill_char.exit: ; preds = %entry, %for.body.preheader.i %cmp.not20 = icmp sgt i32 %min, %max br i1 %cmp.not20, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %fill_char.exit %2 = sext i32 %min to i64 %3 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv26 = phi i64 [ %2, %for.body.preheader ], [ %indvars.iv.next27, %for.inc ] %answer.022 = phi i32 [ 0, %for.body.preheader ], [ %answer.1, %for.inc ] %cmp.not.i = icmp slt i32 %answer.022, 1 br i1 %cmp.not.i, label %for.body.if.then_crit_edge, label %for.cond5.preheader.lr.ph.i for.body.if.then_crit_edge: ; preds = %for.body %arrayidx.phi.trans.insert = getelementptr inbounds i8, ptr %array, i64 %indvars.iv26 %.pre30 = load i8, ptr %arrayidx.phi.trans.insert, align 1, !tbaa !14 br label %if.then for.cond5.preheader.lr.ph.i: ; preds = %for.body %4 = zext i32 %answer.022 to i64 %arrayidx10.i.phi.trans.insert = getelementptr inbounds i8, ptr %array, i64 %indvars.iv26 %.pre = load i8, ptr %arrayidx10.i.phi.trans.insert, align 1, !tbaa !14 br label %for.cond5.preheader.i for.cond.i: ; preds = %for.cond5.preheader.i %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %4 br i1 %exitcond.not, label %if.then, label %for.cond5.preheader.i, !llvm.loop !107 for.cond5.preheader.i: ; preds = %for.cond.i, %for.cond5.preheader.lr.ph.i %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond.i ], [ 0, %for.cond5.preheader.lr.ph.i ] %arrayidx.i = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv %5 = load i8, ptr %arrayidx.i, align 1, !tbaa !14 %cmp12.i = icmp eq i8 %5, %.pre br i1 %cmp12.i, label %for.inc, label %for.cond.i if.then: ; preds = %for.cond.i, %for.body.if.then_crit_edge %6 = phi i8 [ %.pre30, %for.body.if.then_crit_edge ], [ %.pre, %for.cond.i ] %idxprom3 = sext i32 %answer.022 to i64 %arrayidx4 = getelementptr inbounds i8, ptr %vla, i64 %idxprom3 store i8 %6, ptr %arrayidx4, align 1, !tbaa !14 %add = add nsw i32 %answer.022, 1 br label %for.inc for.inc: ; preds = %for.cond5.preheader.i, %if.then %answer.1 = phi i32 [ %add, %if.then ], [ %answer.022, %for.cond5.preheader.i ] %indvars.iv.next27 = add nsw i64 %indvars.iv26, 1 %lftr.wideiv = trunc i64 %indvars.iv.next27 to i32 %exitcond29.not = icmp eq i32 %3, %lftr.wideiv br i1 %exitcond29.not, label %for.end, label %for.body, !llvm.loop !109 for.end: ; preds = %for.inc, %fill_char.exit %answer.0.lcssa = phi i32 [ 0, %fill_char.exit ], [ %answer.1, %for.inc ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @count_equalelement_int(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i32 noundef %element) local_unnamed_addr #19 { entry: %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader12, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec, %0 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %element, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i32, ptr %array, i64 %0 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ] %vec.phi10 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %index %wide.load = load <4 x i32>, ptr %gep, align 4, !tbaa !5 %5 = getelementptr inbounds i32, ptr %gep, i64 4 %wide.load11 = load <4 x i32>, ptr %5, align 4, !tbaa !5 %6 = icmp eq <4 x i32> %wide.load, %broadcast.splat %7 = icmp eq <4 x i32> %wide.load11, %broadcast.splat %8 = zext <4 x i1> %6 to <4 x i32> %9 = zext <4 x i1> %7 to <4 x i32> %10 = add <4 x i32> %vec.phi, %8 %11 = add <4 x i32> %vec.phi10, %9 %index.next = add nuw i64 %index, 8 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !110 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %11, %10 %13 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader12 for.body.preheader12: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] %answer.08.ph = phi i32 [ 0, %for.body.preheader ], [ %13, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader12, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader12 ] %answer.08 = phi i32 [ %spec.select, %for.body ], [ %answer.08.ph, %for.body.preheader12 ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %14 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %14, %element %add = zext i1 %cmp1 to i32 %spec.select = add nuw nsw i32 %answer.08, %add %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !111 for.end: ; preds = %for.body, %middle.block, %entry %answer.0.lcssa = phi i32 [ 0, %entry ], [ %13, %middle.block ], [ %spec.select, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @count_equalelement_char(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, i8 noundef signext %element) local_unnamed_addr #19 { entry: %cmp.not8 = icmp sgt i32 %min, %max br i1 %cmp.not8, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 %2 = sub i32 %max, %min %3 = zext i32 %2 to i64 %4 = add nuw nsw i64 %3, 1 %min.iters.check = icmp ult i32 %2, 7 br i1 %min.iters.check, label %for.body.preheader14, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %4, 8589934584 %ind.end = add nsw i64 %n.vec, %0 %broadcast.splatinsert = insertelement <4 x i8> poison, i8 %element, i64 0 %broadcast.splat = shufflevector <4 x i8> %broadcast.splatinsert, <4 x i8> poison, <4 x i32> zeroinitializer %invariant.gep = getelementptr i8, ptr %array, i64 %0 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %10, %vector.body ] %vec.phi12 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %11, %vector.body ] %gep = getelementptr i8, ptr %invariant.gep, i64 %index %wide.load = load <4 x i8>, ptr %gep, align 1, !tbaa !14 %5 = getelementptr inbounds i8, ptr %gep, i64 4 %wide.load13 = load <4 x i8>, ptr %5, align 1, !tbaa !14 %6 = icmp eq <4 x i8> %wide.load, %broadcast.splat %7 = icmp eq <4 x i8> %wide.load13, %broadcast.splat %8 = zext <4 x i1> %6 to <4 x i32> %9 = zext <4 x i1> %7 to <4 x i32> %10 = add <4 x i32> %vec.phi, %8 %11 = add <4 x i32> %vec.phi12, %9 %index.next = add nuw i64 %index, 8 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !112 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %11, %10 %13 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %4, %n.vec br i1 %cmp.n, label %for.end, label %for.body.preheader14 for.body.preheader14: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] %answer.010.ph = phi i32 [ 0, %for.body.preheader ], [ %13, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader14, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader14 ] %answer.010 = phi i32 [ %spec.select, %for.body ], [ %answer.010.ph, %for.body.preheader14 ] %arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv %14 = load i8, ptr %arrayidx, align 1, !tbaa !14 %cmp2 = icmp eq i8 %14, %element %add = zext i1 %cmp2 to i32 %spec.select = add nuw nsw i32 %answer.010, %add %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !113 for.end: ; preds = %for.body, %middle.block, %entry %answer.0.lcssa = phi i32 [ 0, %entry ], [ %13, %middle.block ], [ %spec.select, %for.body ] ret i32 %answer.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local void @scanf_int_array(ptr noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 { entry: %cmp.not3 = icmp sgt i32 %min, %max br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !114 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #20 ; Function Attrs: nofree nounwind uwtable define dso_local void @scanf_int_array_2(ptr noundef %array1, ptr noundef %array2, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 { entry: %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %array1, i64 %indvars.iv %arrayidx2 = getelementptr inbounds i32, ptr %array2, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx, ptr noundef %arrayidx2) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !115 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @scanf_int_array_3(ptr noundef %array1, ptr noundef %array2, ptr noundef %array3, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 { entry: %cmp.not9 = icmp sgt i32 %min, %max br i1 %cmp.not9, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %array1, i64 %indvars.iv %arrayidx2 = getelementptr inbounds i32, ptr %array2, i64 %indvars.iv %arrayidx4 = getelementptr inbounds i32, ptr %array3, i64 %indvars.iv %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef %arrayidx, ptr noundef %arrayidx2, ptr noundef %arrayidx4) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !116 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @scanf_char_array(ptr noundef %array, i32 noundef %num) local_unnamed_addr #10 { entry: %array8 = ptrtoint ptr %array to i64 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef %array) %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %array) #24 %0 = trunc i64 %call1 to i32 %conv = add i32 %0, -1 %cmp.not24.i = icmp slt i32 %conv, 0 br i1 %cmp.not24.i, label %for.cond3.preheader.i, label %iter.check iter.check: ; preds = %entry %1 = zext i32 %conv to i64 %2 = sext i32 %num to i64 %invariant.gep.i = getelementptr i8, ptr %array, i64 %2 %3 = add nuw nsw i64 %1, 1 %min.iters.check = icmp ult i32 %conv, 3 br i1 %min.iters.check, label %for.body.i.preheader, label %vector.scevcheck vector.scevcheck: ; preds = %iter.check %4 = getelementptr i8, ptr %array, i64 %2 %scevgep = getelementptr i8, ptr %4, i64 %1 %5 = icmp ugt ptr %4, %scevgep %scevgep4 = getelementptr i8, ptr %array, i64 %1 %6 = icmp ult ptr %scevgep4, %array %7 = or i1 %5, %6 br i1 %7, label %for.body.i.preheader, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %8 = add i64 %array8, %1 %9 = add i64 %array8, %2 %10 = add i64 %9, %1 %11 = sub i64 %8, %10 %diff.check = icmp ult i64 %11, 16 br i1 %diff.check, label %for.body.i.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %vector.memcheck %min.iters.check9 = icmp ult i32 %conv, 15 br i1 %min.iters.check9, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %3, 8589934576 %invariant.gep = getelementptr i8, ptr %array, i64 -15 %invariant.gep21 = getelementptr i8, ptr %invariant.gep.i, i64 -15 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = sub i64 %1, %index %gep = getelementptr i8, ptr %invariant.gep, i64 %offset.idx %wide.load = load <16 x i8>, ptr %gep, align 1, !tbaa !14 %gep22 = getelementptr i8, ptr %invariant.gep21, i64 %offset.idx store <16 x i8> %wide.load, ptr %gep22, align 1, !tbaa !14 %index.next = add nuw i64 %index, 16 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !117 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %3, %n.vec br i1 %cmp.n, label %for.cond3.preheader.i, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end13 = sub nsw i64 %1, %n.vec %n.vec.remaining = and i64 %3, 12 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.body.i.preheader, label %vec.epilog.ph vec.epilog.ph: ; preds = %vector.main.loop.iter.check, %vec.epilog.iter.check %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ] %n.vec12 = and i64 %3, 8589934588 %ind.end = sub nsw i64 %1, %n.vec12 %invariant.gep23 = getelementptr i8, ptr %array, i64 -3 %invariant.gep25 = getelementptr i8, ptr %invariant.gep.i, i64 -3 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index15 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next20, %vec.epilog.vector.body ] %offset.idx16 = sub i64 %1, %index15 %gep24 = getelementptr i8, ptr %invariant.gep23, i64 %offset.idx16 %wide.load17 = load <4 x i8>, ptr %gep24, align 1, !tbaa !14 %gep26 = getelementptr i8, ptr %invariant.gep25, i64 %offset.idx16 store <4 x i8> %wide.load17, ptr %gep26, align 1, !tbaa !14 %index.next20 = add nuw i64 %index15, 4 %13 = icmp eq i64 %index.next20, %n.vec12 br i1 %13, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !118 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body %cmp.n14 = icmp eq i64 %3, %n.vec12 br i1 %cmp.n14, label %for.cond3.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %vector.memcheck, %vector.scevcheck, %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %indvars.iv.i.ph = phi i64 [ %1, %iter.check ], [ %1, %vector.memcheck ], [ %1, %vector.scevcheck ], [ %ind.end13, %vec.epilog.iter.check ], [ %ind.end, %vec.epilog.middle.block ] %14 = add nsw i64 %indvars.iv.i.ph, 1 %xtraiter = and i64 %14, 3 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.body.i.prol.loopexit, label %for.body.i.prol for.body.i.prol: ; preds = %for.body.i.preheader, %for.body.i.prol %indvars.iv.i.prol = phi i64 [ %indvars.iv.next.i.prol, %for.body.i.prol ], [ %indvars.iv.i.ph, %for.body.i.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %for.body.i.prol ], [ 0, %for.body.i.preheader ] %arrayidx.i.prol = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.i.prol %15 = load i8, ptr %arrayidx.i.prol, align 1, !tbaa !14 %gep.i.prol = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i.prol store i8 %15, ptr %gep.i.prol, align 1, !tbaa !14 %indvars.iv.next.i.prol = add nsw i64 %indvars.iv.i.prol, -1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter br i1 %prol.iter.cmp.not, label %for.body.i.prol.loopexit, label %for.body.i.prol, !llvm.loop !119 for.body.i.prol.loopexit: ; preds = %for.body.i.prol, %for.body.i.preheader %indvars.iv.i.unr = phi i64 [ %indvars.iv.i.ph, %for.body.i.preheader ], [ %indvars.iv.next.i.prol, %for.body.i.prol ] %16 = icmp ult i64 %indvars.iv.i.ph, 3 br i1 %16, label %for.cond3.preheader.i, label %for.body.i for.cond3.preheader.i: ; preds = %for.body.i.prol.loopexit, %for.body.i, %middle.block, %vec.epilog.middle.block, %entry %cmp6.not.not26.i = icmp sgt i32 %num, 0 br i1 %cmp6.not.not26.i, label %for.body7.preheader.i, label %shift_char.exit for.body7.preheader.i: ; preds = %for.cond3.preheader.i %17 = zext i32 %num to i64 tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 1 dereferenceable(1) %array, i8 0, i64 %17, i1 false), !tbaa !14 br label %shift_char.exit for.body.i: ; preds = %for.body.i.prol.loopexit, %for.body.i %indvars.iv.i = phi i64 [ %indvars.iv.next.i.3, %for.body.i ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ] %arrayidx.i = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.i %18 = load i8, ptr %arrayidx.i, align 1, !tbaa !14 %gep.i = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.i store i8 %18, ptr %gep.i, align 1, !tbaa !14 %indvars.iv.next.i = add nsw i64 %indvars.iv.i, -1 %arrayidx.i.1 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i %19 = load i8, ptr %arrayidx.i.1, align 1, !tbaa !14 %gep.i.1 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i store i8 %19, ptr %gep.i.1, align 1, !tbaa !14 %indvars.iv.next.i.1 = add nsw i64 %indvars.iv.i, -2 %arrayidx.i.2 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i.1 %20 = load i8, ptr %arrayidx.i.2, align 1, !tbaa !14 %gep.i.2 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i.1 store i8 %20, ptr %gep.i.2, align 1, !tbaa !14 %indvars.iv.next.i.2 = add nsw i64 %indvars.iv.i, -3 %arrayidx.i.3 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv.next.i.2 %21 = load i8, ptr %arrayidx.i.3, align 1, !tbaa !14 %gep.i.3 = getelementptr i8, ptr %invariant.gep.i, i64 %indvars.iv.next.i.2 store i8 %21, ptr %gep.i.3, align 1, !tbaa !14 %indvars.iv.next.i.3 = add nsw i64 %indvars.iv.i, -4 %cmp.not.not.i.not.3 = icmp eq i64 %indvars.iv.next.i.2, 0 br i1 %cmp.not.not.i.not.3, label %for.cond3.preheader.i, label %for.body.i, !llvm.loop !120 shift_char.exit: ; preds = %for.cond3.preheader.i, %for.body7.preheader.i ret void } ; Function Attrs: nofree nounwind uwtable define dso_local void @printf_int_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 { entry: %cmp.not3 = icmp sgt i32 %min, %max br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %array, i64 %indvars.iv %2 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %2) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !121 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #20 ; Function Attrs: nofree nounwind uwtable define dso_local void @printf_char_array(ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #10 { entry: %cmp.not3 = icmp sgt i32 %min, %max br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %0 = sext i32 %min to i64 %1 = add i32 %max, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %indvars.iv = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds i8, ptr %array, i64 %indvars.iv %2 = load i8, ptr %arrayidx, align 1, !tbaa !14 %conv = sext i8 %2 to i32 %putchar = tail call i32 @putchar(i32 %conv) %indvars.iv.next = add nsw i64 %indvars.iv, 1 %lftr.wideiv = trunc i64 %indvars.iv.next to i32 %exitcond.not = icmp eq i32 %1, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !122 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #10 { entry: %s = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #23 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(101) %s, i8 0, i64 101, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 16, !tbaa !14 %conv = sext i8 %0 to i32 %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #24 %sub = add i64 %call2, -2 %sub5 = add i64 %call2, -1 %arrayidx6 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %sub5 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !14 %conv7 = sext i8 %1 to i32 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv, i64 noundef %sub, i32 noundef %conv7) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #23 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #21 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #22 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nosync nounwind willreturn memory(argmem: write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree nounwind willreturn memory(write) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { 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 #9 = { nofree nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #13 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #14 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #15 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #16 = { nofree nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #17 = { nofree nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #18 = { nofree nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #19 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #20 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #21 = { nofree nounwind } attributes #22 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #23 = { nounwind } attributes #24 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11} !14 = !{!7, !7, i64 0} !15 = !{!16} !16 = distinct !{!16, !17} !17 = distinct !{!17, !"LVerDomain"} !18 = !{!19} !19 = distinct !{!19, !17} !20 = distinct !{!20, !10, !11, !12} !21 = distinct !{!21, !10, !11} !22 = !{!23} !23 = distinct !{!23, !24} !24 = distinct !{!24, !"LVerDomain"} !25 = !{!26} !26 = distinct !{!26, !24} !27 = distinct !{!27, !10, !11, !12} !28 = !{!29} !29 = distinct !{!29, !30} !30 = distinct !{!30, !"LVerDomain"} !31 = !{!32} !32 = distinct !{!32, !30} !33 = distinct !{!33, !10, !11, !12} !34 = distinct !{!34, !10, !11} !35 = distinct !{!35, !10} !36 = distinct !{!36, !10} !37 = distinct !{!37, !10} !38 = distinct !{!38, !39} !39 = !{!"llvm.loop.unroll.disable"} !40 = distinct !{!40, !10} !41 = distinct !{!41, !10} !42 = distinct !{!42, !39} !43 = distinct !{!43, !10} !44 = distinct !{!44, !39} !45 = distinct !{!45, !10} !46 = distinct !{!46, !10} !47 = distinct !{!47, !10} !48 = distinct !{!48, !10} !49 = distinct !{!49, !10, !11, !12} !50 = distinct !{!50, !10, !11} !51 = distinct !{!51, !10, !11, !12} !52 = distinct !{!52, !10, !11, !12} !53 = distinct !{!53, !10, !11} !54 = distinct !{!54, !10, !11, !12} !55 = distinct !{!55, !10, !11, !12} !56 = distinct !{!56, !10, !12, !11} !57 = distinct !{!57, !10} !58 = distinct !{!58, !10} !59 = distinct !{!59, !10} !60 = distinct !{!60, !10} !61 = distinct !{!61, !10} !62 = !{!63} !63 = distinct !{!63, !64} !64 = distinct !{!64, !"LVerDomain"} !65 = !{!66} !66 = distinct !{!66, !64} !67 = distinct !{!67, !10, !11, !12} !68 = !{!69} !69 = distinct !{!69, !70} !70 = distinct !{!70, !"LVerDomain"} !71 = !{!72} !72 = distinct !{!72, !70} !73 = distinct !{!73, !10, !11, !12} !74 = distinct !{!74, !10, !11} !75 = distinct !{!75, !10} !76 = distinct !{!76, !10} !77 = !{!78} !78 = distinct !{!78, !79} !79 = distinct !{!79, !"LVerDomain"} !80 = !{!81} !81 = distinct !{!81, !79} !82 = distinct !{!82, !10, !11, !12} !83 = !{!84} !84 = distinct !{!84, !85} !85 = distinct !{!85, !"LVerDomain"} !86 = !{!87} !87 = distinct !{!87, !85} !88 = distinct !{!88, !10, !11, !12} !89 = distinct !{!89, !10, !11} !90 = distinct !{!90, !10} !91 = distinct !{!91, !10, !11, !12} !92 = distinct !{!92, !10, !12, !11} !93 = distinct !{!93, !10, !11, !12} !94 = distinct !{!94, !10, !12, !11} !95 = distinct !{!95, !10} !96 = distinct !{!96, !10, !11, !12} !97 = distinct !{!97, !10, !12, !11} !98 = distinct !{!98, !10, !11, !12} !99 = distinct !{!99, !10, !12, !11} !100 = distinct !{!100, !10} !101 = distinct !{!101, !10} !102 = distinct !{!102, !10} !103 = distinct !{!103, !10, !11, !12} !104 = distinct !{!104, !10, !12, !11} !105 = distinct !{!105, !10} !106 = distinct !{!106, !10} !107 = distinct !{!107, !10} !108 = distinct !{!108, !10} !109 = distinct !{!109, !10} !110 = distinct !{!110, !10, !11, !12} !111 = distinct !{!111, !10, !12, !11} !112 = distinct !{!112, !10, !11, !12} !113 = distinct !{!113, !10, !12, !11} !114 = distinct !{!114, !10} !115 = distinct !{!115, !10} !116 = distinct !{!116, !10} !117 = distinct !{!117, !10, !11, !12} !118 = distinct !{!118, !10, !11, !12} !119 = distinct !{!119, !39} !120 = distinct !{!120, !10, !11} !121 = distinct !{!121, !10} !122 = distinct !{!122, !10}
#include <stdio.h> int main(void) { char str[103]; scanf("%s", str); int i = 0, cnt = 0; while(str[i] != '\0') { if(str[i] == '\n') { break; } cnt++; i++; } printf("%c%d%c\n", str[0], cnt-2, str[i-1] ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167461/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167461/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%c%d%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str = alloca [103 x i8], align 16 call void @llvm.lifetime.start.p0(i64 103, ptr nonnull %str) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %str) br label %while.cond while.cond: ; preds = %if.end, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ] %arrayidx = getelementptr inbounds [103 x i8], ptr %str, i64 0, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !5 switch i8 %0, label %if.end [ i8 0, label %while.end i8 10, label %while.end ] if.end: ; preds = %while.cond %indvars.iv.next = add nuw i64 %indvars.iv, 1 br label %while.cond, !llvm.loop !8 while.end: ; preds = %while.cond, %while.cond %indvars21 = trunc i64 %indvars.iv to i32 %1 = load i8, ptr %str, align 16, !tbaa !5 %conv9 = sext i8 %1 to i32 %sub = add nsw i32 %indvars21, -2 %sub10 = shl i64 %indvars.iv, 32 %sext = add i64 %sub10, -4294967296 %idxprom11 = ashr exact i64 %sext, 32 %arrayidx12 = getelementptr inbounds [103 x i8], ptr %str, i64 0, i64 %idxprom11 %2 = load i8, ptr %arrayidx12, align 1, !tbaa !5 %conv13 = sext i8 %2 to i32 %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv9, i32 noundef %sub, i32 noundef %conv13) call void @llvm.lifetime.end.p0(i64 103, ptr nonnull %str) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main() { char s[101]; scanf("%s",s); printf("%c%d%c\n",s[0],strlen(s)-2,s[strlen(s)-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167504/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167504/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%c%d%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %0 = load i8, ptr %s, align 16, !tbaa !5 %conv = sext i8 %0 to i32 %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %sub = add i64 %call2, -2 %sub5 = add i64 %call2, -1 %arrayidx6 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %sub5 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !5 %conv7 = sext i8 %1 to i32 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv, i64 noundef %sub, i32 noundef %conv7) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include <string.h> int main(){ char s[101]; int x; scanf("%s",s); x=strlen(s); printf("%c%d%c\n",s[0],x-2,s[x-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167577/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167577/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [8 x i8] c"%c%d%c\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %conv = trunc i64 %call2 to i32 %0 = load i8, ptr %s, align 16, !tbaa !5 %conv3 = sext i8 %0 to i32 %sub = add nsw i32 %conv, -2 %sub4 = shl i64 %call2, 32 %sext = add i64 %sub4, -4294967296 %idxprom = ashr exact i64 %sext, 32 %arrayidx5 = getelementptr inbounds [101 x i8], ptr %s, i64 0, i64 %idxprom %1 = load i8, ptr %arrayidx5, align 1, !tbaa !5 %conv6 = sext i8 %1 to i32 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv3, i32 noundef %sub, i32 noundef %conv6) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %s) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int a[100005],b[100005]; int main(){ int t; scanf("%d",&t); while(t--){ int n,l = 0,r = 0,dif = 0,flag = 1; scanf("%d",&n); for(int i = 1; i <= n; i++){ scanf("%d",&a[i]); } for(int i = 1; i <= n; i++){ scanf("%d",&b[i]); if(a[i] != b[i] && flag == 1) { l = i; //标记左端点 dif = b[i] - a[i]; //纪录左端点的差 flag = 0; } } for(int i = n; i >= l; i--){ if(a[i] != b[i]){ r = i; //标记右端点(左右端点可重合) break; } } if(flag == 1){ printf("YES\n"); }else if(dif < 0) { printf("NO\n"); }else{ for(int i = l; i <= r; i++){ a[i] += dif; if(a[i] != b[i]){ printf("NO\n"); flag = 1; break; } } if(!flag){ printf("YES\n"); } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16762/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16762/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [100005 x i32] zeroinitializer, align 16 @b = dso_local global [100005 x i32] zeroinitializer, align 16 @str.4 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.5 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec113 = add nsw i32 %0, -1 store i32 %dec113, ptr %t, align 4, !tbaa !5 %tobool.not114 = icmp eq i32 %0, 0 br i1 %tobool.not114, label %while.end, label %while.body while.body: ; preds = %entry, %if.end70 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not97 = icmp slt i32 %1, 1 br i1 %cmp.not97, label %for.cond25.preheader, label %for.body for.cond4.preheader: ; preds = %for.body %cmp5.not99 = icmp slt i32 %2, 1 br i1 %cmp5.not99, label %for.cond25.preheader, label %for.body7 for.body: ; preds = %while.body, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %while.body ] %arrayidx = getelementptr inbounds [100005 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 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %3 br i1 %cmp.not.not, label %for.body, label %for.cond4.preheader, !llvm.loop !9 for.cond25.preheader: ; preds = %for.body7, %while.body, %for.cond4.preheader %l.0.lcssa = phi i32 [ 0, %for.cond4.preheader ], [ 0, %while.body ], [ %l.1, %for.body7 ] %dif.0.lcssa = phi i32 [ 0, %for.cond4.preheader ], [ 0, %while.body ], [ %dif.1, %for.body7 ] %flag.0.lcssa = phi i32 [ 1, %for.cond4.preheader ], [ 1, %while.body ], [ %flag.1, %for.body7 ] %.lcssa = phi i32 [ %2, %for.cond4.preheader ], [ %1, %while.body ], [ %9, %for.body7 ] %cmp26.not107 = icmp slt i32 %.lcssa, %l.0.lcssa br i1 %cmp26.not107, label %cleanup, label %for.body28.preheader for.body28.preheader: ; preds = %for.cond25.preheader %4 = sext i32 %.lcssa to i64 %5 = sext i32 %l.0.lcssa to i64 br label %for.body28 for.body7: ; preds = %for.cond4.preheader, %for.body7 %indvars.iv117 = phi i64 [ %indvars.iv.next118, %for.body7 ], [ 1, %for.cond4.preheader ] %flag.0102 = phi i32 [ %flag.1, %for.body7 ], [ 1, %for.cond4.preheader ] %dif.0101 = phi i32 [ %dif.1, %for.body7 ], [ 0, %for.cond4.preheader ] %l.0100 = phi i32 [ %l.1, %for.body7 ], [ 0, %for.cond4.preheader ] %arrayidx9 = getelementptr inbounds [100005 x i32], ptr @b, i64 0, i64 %indvars.iv117 %call10 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx9) %arrayidx12 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %indvars.iv117 %6 = load i32, ptr %arrayidx12, align 4, !tbaa !5 %7 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %cmp15 = icmp ne i32 %6, %7 %cmp16 = icmp eq i32 %flag.0102, 1 %or.cond = select i1 %cmp15, i1 %cmp16, i1 false %sub = sub nsw i32 %7, %6 %8 = trunc i64 %indvars.iv117 to i32 %l.1 = select i1 %or.cond, i32 %8, i32 %l.0100 %dif.1 = select i1 %or.cond, i32 %sub, i32 %dif.0101 %flag.1 = select i1 %or.cond, i32 0, i32 %flag.0102 %indvars.iv.next118 = add nuw nsw i64 %indvars.iv117, 1 %9 = load i32, ptr %n, align 4, !tbaa !5 %10 = sext i32 %9 to i64 %cmp5.not.not = icmp slt i64 %indvars.iv117, %10 br i1 %cmp5.not.not, label %for.body7, label %for.cond25.preheader, !llvm.loop !11 for.body28: ; preds = %for.body28.preheader, %for.inc36 %indvars.iv120 = phi i64 [ %4, %for.body28.preheader ], [ %indvars.iv.next121, %for.inc36 ] %arrayidx30 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %indvars.iv120 %11 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %arrayidx32 = getelementptr inbounds [100005 x i32], ptr @b, i64 0, i64 %indvars.iv120 %12 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %cmp33.not = icmp eq i32 %11, %12 br i1 %cmp33.not, label %for.inc36, label %cleanup.loopexit.split.loop.exit for.inc36: ; preds = %for.body28 %indvars.iv.next121 = add nsw i64 %indvars.iv120, -1 %cmp26.not.not = icmp sgt i64 %indvars.iv120, %5 br i1 %cmp26.not.not, label %for.body28, label %cleanup, !llvm.loop !12 cleanup.loopexit.split.loop.exit: ; preds = %for.body28 %13 = trunc i64 %indvars.iv120 to i32 br label %cleanup cleanup: ; preds = %for.inc36, %cleanup.loopexit.split.loop.exit, %for.cond25.preheader %r.0 = phi i32 [ 0, %for.cond25.preheader ], [ %13, %cleanup.loopexit.split.loop.exit ], [ 0, %for.inc36 ] %cmp39 = icmp eq i32 %flag.0.lcssa, 1 br i1 %cmp39, label %if.end70, label %if.else if.else: ; preds = %cleanup %cmp42 = icmp slt i32 %dif.0.lcssa, 0 br i1 %cmp42, label %if.end70, label %for.cond47.preheader for.cond47.preheader: ; preds = %if.else %cmp48.not111 = icmp sgt i32 %l.0.lcssa, %r.0 br i1 %cmp48.not111, label %if.end70, label %for.body50.preheader for.body50.preheader: ; preds = %for.cond47.preheader %14 = sext i32 %l.0.lcssa to i64 %15 = add i32 %r.0, 1 br label %for.body50 for.cond47: ; preds = %for.body50 %indvars.iv.next124 = add nsw i64 %indvars.iv123, 1 %lftr.wideiv = trunc i64 %indvars.iv.next124 to i32 %exitcond.not = icmp eq i32 %15, %lftr.wideiv br i1 %exitcond.not, label %if.end70, label %for.body50, !llvm.loop !13 for.body50: ; preds = %for.body50.preheader, %for.cond47 %indvars.iv123 = phi i64 [ %14, %for.body50.preheader ], [ %indvars.iv.next124, %for.cond47 ] %arrayidx52 = getelementptr inbounds [100005 x i32], ptr @a, i64 0, i64 %indvars.iv123 %16 = load i32, ptr %arrayidx52, align 4, !tbaa !5 %add = add nsw i32 %16, %dif.0.lcssa store i32 %add, ptr %arrayidx52, align 4, !tbaa !5 %arrayidx56 = getelementptr inbounds [100005 x i32], ptr @b, i64 0, i64 %indvars.iv123 %17 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %cmp57.not = icmp eq i32 %add, %17 br i1 %cmp57.not, label %for.cond47, label %if.end70 if.end70: ; preds = %for.cond47, %for.body50, %for.cond47.preheader, %if.else, %cleanup %str.sink = phi ptr [ @str.5, %cleanup ], [ @str.4, %if.else ], [ @str.5, %for.cond47.preheader ], [ @str.4, %for.body50 ], [ @str.5, %for.cond47 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 %18 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %18, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %18, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %if.end70, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#include<stdio.h> int main(void) { int a,b,c,d; scanf("%d %d %d",&a,&b,&c); if(b < a){ d=a; a=b; b=d; } else{ } if(c < b){ d=c; c=b; b=d; } else{ } if(b < a){ d=a; a=b; b=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167663/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167663/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %a, align 4, !tbaa !5 store i32 %1, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %entry, %if.then %2 = phi i32 [ %1, %entry ], [ %0, %if.then ] %3 = phi i32 [ %0, %entry ], [ %1, %if.then ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp slt i32 %4, %3 br i1 %cmp1, label %if.then2, label %if.end4 if.then2: ; preds = %if.end store i32 %3, ptr %c, align 4, !tbaa !5 store i32 %4, ptr %b, align 4, !tbaa !5 br label %if.end4 if.end4: ; preds = %if.end, %if.then2 %5 = phi i32 [ %4, %if.end ], [ %3, %if.then2 ] %6 = phi i32 [ %3, %if.end ], [ %4, %if.then2 ] %cmp5 = icmp slt i32 %6, %2 br i1 %cmp5, label %if.then6, label %if.end7 if.then6: ; preds = %if.end4 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end7 if.end7: ; preds = %if.then6, %if.end4 %7 = phi i32 [ %2, %if.then6 ], [ %6, %if.end4 ] %8 = phi i32 [ %6, %if.then6 ], [ %2, %if.end4 ] %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a[3],b,c,d,e; int flag=1; for(b=0;b<3;b++){ scanf("%d",&a[b]); } while(flag){ flag=0; for(c=0;c<2;c++){ if(a[c]>a[c+1]){ d=a[c]; a[c]=a[c+1]; a[c+1]=d; flag=1; } } } for(e=0;e<3;e++){ printf("%d",a[e]); if(e==2){ printf("\n"); }else{ printf(" "); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167706/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167706/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [3 x i32], align 4 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %arrayidx.1 = getelementptr inbounds [3 x i32], ptr %a, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [3 x i32], ptr %a, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2) %.pre = load i32, ptr %a, align 4, !tbaa !5 %.pre57 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %arrayidx.2.promoted = load i32, ptr %arrayidx.2, align 4, !tbaa !5 br label %for.cond1.preheader for.cond1.preheader: ; preds = %entry, %for.inc19.1 %0 = phi i32 [ %arrayidx.2.promoted, %entry ], [ %5, %for.inc19.1 ] %1 = phi i32 [ %.pre57, %entry ], [ %6, %for.inc19.1 ] %2 = phi i32 [ %.pre, %entry ], [ %4, %for.inc19.1 ] %cmp8 = icmp sgt i32 %2, %1 br i1 %cmp8, label %if.then, label %for.inc19 if.then: ; preds = %for.cond1.preheader store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.inc19 for.inc19: ; preds = %for.cond1.preheader, %if.then %3 = phi i32 [ %2, %if.then ], [ %1, %for.cond1.preheader ] %4 = phi i32 [ %1, %if.then ], [ %2, %for.cond1.preheader ] %flag.2 = phi i32 [ 1, %if.then ], [ 0, %for.cond1.preheader ] %cmp8.1 = icmp sgt i32 %3, %0 br i1 %cmp8.1, label %if.then.1, label %for.inc19.1 if.then.1: ; preds = %for.inc19 store i32 %0, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %3, ptr %arrayidx.2, align 4, !tbaa !5 br label %for.inc19.1 for.inc19.1: ; preds = %if.then.1, %for.inc19 %5 = phi i32 [ %3, %if.then.1 ], [ %0, %for.inc19 ] %6 = phi i32 [ %0, %if.then.1 ], [ %3, %for.inc19 ] %flag.2.1 = phi i32 [ 1, %if.then.1 ], [ %flag.2, %for.inc19 ] %tobool.not = icmp eq i32 %flag.2.1, 0 br i1 %tobool.not, label %for.inc33.2, label %for.cond1.preheader, !llvm.loop !9 for.inc33.2: ; preds = %for.inc19.1 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %4) %putchar = call i32 @putchar(i32 32) %.pre58 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %call27.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre58) %putchar.1 = call i32 @putchar(i32 32) %.pre59 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %call27.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre59) %putchar49.2 = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int a, b, c, d; scanf("%d %d %d", &a, &b, &c); if(b<a) { d=a; a=b; b=d; } if(c<b) { d=b; b=c; c=d; } if(b<a) { d=a; a=b; b=d; } printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167757/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167757/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %a, align 4, !tbaa !5 store i32 %1, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp slt i32 %4, %3 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp slt i32 %6, %2 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int t; scanf("%d", &t); for (int i=0;i<t;i++) { int n; scanf("%d", &n); int a[n], b[n]; for (int j=0;j<n;j++) { scanf("%d", &a[j]); } int diff[n], di=0, pos[n], po=0, flag=0; for (int j=0;j<n;j++) { scanf("%d", &b[j]); if (a[j]!=b[j]) { diff[di]=b[j]-a[j]; if (diff[di]<0) { flag=1; } if (di!=0) { if (diff[di]!=diff[di-1]) { flag=1; } } di++; pos[po]=j; if (po!=0) { if (pos[po]-pos[po-1]!=1) { flag=1; } } po++; } } if (flag) { printf("NO\n"); } else { printf("YES\n"); } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16780/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16780/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp104 = icmp sgt i32 %0, 0 br i1 %cmp104, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %if.end67, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5 ret i32 0 for.body: ; preds = %entry, %if.end67 %i.0105 = phi i32 [ %inc69, %if.end67 ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = zext i32 %1 to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = zext i32 %4 to i64 %vla2 = alloca i32, i64 %5, align 16 %cmp495 = icmp sgt i32 %4, 0 br i1 %cmp495, label %for.body6, label %if.else for.cond.cleanup5: ; preds = %for.body6 %.pre = zext i32 %6 to i64 %vla8 = alloca i32, i64 %.pre, align 16 %vla9 = alloca i32, i64 %.pre, align 16 %cmp1297 = icmp sgt i32 %6, 0 br i1 %cmp1297, label %for.body14, label %if.else for.body6: ; preds = %for.body, %for.body6 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body6 ], [ 0, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp4 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp4, label %for.body6, label %for.cond.cleanup5, !llvm.loop !9 for.cond.cleanup13: ; preds = %for.inc61 %tobool.not = icmp eq i32 %flag.4, 0 br i1 %tobool.not, label %if.else, label %if.end67 for.body14: ; preds = %for.cond.cleanup5, %for.inc61 %indvars.iv108 = phi i64 [ %indvars.iv.next109, %for.inc61 ], [ 0, %for.cond.cleanup5 ] %flag.0100 = phi i32 [ %flag.4, %for.inc61 ], [ 0, %for.cond.cleanup5 ] %po.099 = phi i32 [ %po.1, %for.inc61 ], [ 0, %for.cond.cleanup5 ] %di.098 = phi i32 [ %di.1, %for.inc61 ], [ 0, %for.cond.cleanup5 ] %indvars110 = trunc i64 %indvars.iv108 to i32 %arrayidx16 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv108 %call17 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx16) %arrayidx19 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv108 %8 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %cmp22.not = icmp eq i32 %8, %9 br i1 %cmp22.not, label %for.inc61, label %if.then if.then: ; preds = %for.body14 %sub = sub nsw i32 %9, %8 %idxprom27 = sext i32 %di.098 to i64 %arrayidx28 = getelementptr inbounds i32, ptr %vla8, i64 %idxprom27 store i32 %sub, ptr %arrayidx28, align 4, !tbaa !5 %cmp31 = icmp slt i32 %sub, 0 %spec.select = select i1 %cmp31, i32 1, i32 %flag.0100 %cmp33.not = icmp eq i32 %di.098, 0 br i1 %cmp33.not, label %if.end43, label %if.then34 if.then34: ; preds = %if.then %sub37 = add nsw i32 %di.098, -1 %idxprom38 = sext i32 %sub37 to i64 %arrayidx39 = getelementptr inbounds i32, ptr %vla8, i64 %idxprom38 %10 = load i32, ptr %arrayidx39, align 4, !tbaa !5 %cmp40.not = icmp eq i32 %sub, %10 %spec.select93 = select i1 %cmp40.not, i32 %spec.select, i32 1 br label %if.end43 if.end43: ; preds = %if.then34, %if.then %flag.2 = phi i32 [ %spec.select, %if.then ], [ %spec.select93, %if.then34 ] %inc44 = add nsw i32 %di.098, 1 %idxprom45 = sext i32 %po.099 to i64 %arrayidx46 = getelementptr inbounds i32, ptr %vla9, i64 %idxprom45 store i32 %indvars110, ptr %arrayidx46, align 4, !tbaa !5 %cmp47.not = icmp eq i32 %po.099, 0 br i1 %cmp47.not, label %if.end58, label %if.then48 if.then48: ; preds = %if.end43 %sub51 = add nsw i32 %po.099, -1 %idxprom52 = sext i32 %sub51 to i64 %arrayidx53 = getelementptr inbounds i32, ptr %vla9, i64 %idxprom52 %11 = load i32, ptr %arrayidx53, align 4, !tbaa !5 %sub54 = sub nsw i32 %indvars110, %11 %cmp55.not = icmp eq i32 %sub54, 1 %spec.select94 = select i1 %cmp55.not, i32 %flag.2, i32 1 br label %if.end58 if.end58: ; preds = %if.then48, %if.end43 %flag.3 = phi i32 [ %flag.2, %if.end43 ], [ %spec.select94, %if.then48 ] %inc59 = add nsw i32 %po.099, 1 br label %for.inc61 for.inc61: ; preds = %for.body14, %if.end58 %di.1 = phi i32 [ %inc44, %if.end58 ], [ %di.098, %for.body14 ] %po.1 = phi i32 [ %inc59, %if.end58 ], [ %po.099, %for.body14 ] %flag.4 = phi i32 [ %flag.3, %if.end58 ], [ %flag.0100, %for.body14 ] %indvars.iv.next109 = add nuw nsw i64 %indvars.iv108, 1 %12 = load i32, ptr %n, align 4, !tbaa !5 %13 = sext i32 %12 to i64 %cmp12 = icmp slt i64 %indvars.iv.next109, %13 br i1 %cmp12, label %for.body14, label %for.cond.cleanup13, !llvm.loop !11 if.else: ; preds = %for.body, %for.cond.cleanup5, %for.cond.cleanup13 br label %if.end67 if.end67: ; preds = %for.cond.cleanup13, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %for.cond.cleanup13 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 %inc69 = add nuw nsw i32 %i.0105, 1 %14 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc69, %14 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !12 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main(){ int a,b,c,ex; scanf("%d %d %d",&a,&b,&c); if (a>b){ ex=a; a=b; b=ex; } if (b>c){ ex=b; b=c; c=ex; } if (a>b){ ex=a; a=b; b=ex; } printf ("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167843/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167843/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int a,b,c,t; scanf("%d %d %d", &a,&b,&c); if(a>b){ t=a; a=b; b=t; } if(b>c){ t=b; b=c; c=t; } if(a>b){ t=a; a=b; b=t; } printf("%d %d %d\n", a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167887/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167887/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int a,b,c; scanf("%d %d %d", &a, &b, &c); if (a <= b){ if (a <= c){ if (c <= b){ printf("%d %d %d\n",a,c,b); } else{ printf("%d %d %d\n",a,b,c); } } else{ printf("%d %d %d\n",a,b,c); } } else{ if (c<=a){ if(b<=c){ printf("%d %d %d\n",b,c,a); } else{ printf("%d %d %d\n",c,b,a); } } else{ printf("%d %d %d\n",b,a,c ); } } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167944/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167944/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 %2 = load i32, ptr %c, align 4, !tbaa !5 br i1 %cmp.not, label %if.else10, label %if.then if.then: ; preds = %entry %cmp1.not = icmp sgt i32 %0, %2 br i1 %cmp1.not, label %if.else7, label %if.then2 if.then2: ; preds = %if.then %cmp3.not = icmp sgt i32 %2, %1 br i1 %cmp3.not, label %if.else, label %if.then4 if.then4: ; preds = %if.then2 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %2, i32 noundef %1) br label %if.end22 if.else: ; preds = %if.then2 %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %2) br label %if.end22 if.else7: ; preds = %if.then %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %2) br label %if.end22 if.else10: ; preds = %entry %cmp11.not = icmp sgt i32 %2, %0 br i1 %cmp11.not, label %if.else19, label %if.then12 if.then12: ; preds = %if.else10 %cmp13.not = icmp sgt i32 %1, %2 br i1 %cmp13.not, label %if.else16, label %if.then14 if.then14: ; preds = %if.then12 %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %2, i32 noundef %0) br label %if.end22 if.else16: ; preds = %if.then12 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2, i32 noundef %1, i32 noundef %0) br label %if.end22 if.else19: ; preds = %if.else10 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %2) br label %if.end22 if.end22: ; preds = %if.else19, %if.else16, %if.then14, %if.else7, %if.else, %if.then4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int a,b,c,t; scanf("%d %d %d",&a,&b,&c); if(a>b){ t=a; a=b; b=t; } if(a>c){ t=a; a=c; c=t; } if(b>c){ t=b; b=c; c=t; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_167988/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_167988/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %6 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %b, align 4, !tbaa !5 store i32 %2, ptr %c, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %8, i32 noundef %7) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int t, x, n, i, k, h; scanf("%d", &t); while(t--) { scanf("%d", &n); int a[2*n], b[2*n], r=0, c=0; for(i=0; i<2*n; i++) { scanf("%d", &x); if(x%2==0) { a[r]=i+1; r++; } else { b[c]=i+1; c++; } } if(r%2==0) { if(c>1){ c-=2; } else{ r-=2; } } else { r--; c--; } for(k=0; k<r; k++) { printf("%d ", a[k]); if(k%2!=0){ printf("\n"); } } for(h=0; h<c; h++) { printf("%d ", b[h]); if(h%2!=0){ printf("\n"); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16803/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16803/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %x = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec82 = add nsw i32 %0, -1 store i32 %dec82, ptr %t, align 4, !tbaa !5 %tobool.not83 = icmp eq i32 %0, 0 br i1 %tobool.not83, label %while.end, label %while.body while.body: ; preds = %entry, %for.end51 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %mul = shl nsw i32 %1, 1 %2 = zext i32 %mul to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !5 %mul2 = shl nsw i32 %4, 1 %5 = zext i32 %mul2 to i64 %vla3 = alloca i32, i64 %5, align 16 %cmp73 = icmp sgt i32 %4, 0 br i1 %cmp73, label %for.body, label %if.else17 for.body: ; preds = %while.body, %for.inc %c.076 = phi i32 [ %c.1, %for.inc ], [ 0, %while.body ] %r.075 = phi i32 [ %r.1, %for.inc ], [ 0, %while.body ] %i.074 = phi i32 [ %add, %for.inc ], [ 0, %while.body ] %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %6 = load i32, ptr %x, align 4, !tbaa !5 %7 = and i32 %6, 1 %cmp6 = icmp eq i32 %7, 0 %add = add nuw nsw i32 %i.074, 1 br i1 %cmp6, label %if.then, label %if.else if.then: ; preds = %for.body %idxprom = sext i32 %r.075 to i64 %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %idxprom store i32 %add, ptr %arrayidx, align 4, !tbaa !5 %inc = add nsw i32 %r.075, 1 br label %for.inc if.else: ; preds = %for.body %idxprom8 = sext i32 %c.076 to i64 %arrayidx9 = getelementptr inbounds i32, ptr %vla3, i64 %idxprom8 store i32 %add, ptr %arrayidx9, align 4, !tbaa !5 %inc10 = add nsw i32 %c.076, 1 br label %for.inc for.inc: ; preds = %if.then, %if.else %r.1 = phi i32 [ %inc, %if.then ], [ %r.075, %if.else ] %c.1 = phi i32 [ %c.076, %if.then ], [ %inc10, %if.else ] %8 = load i32, ptr %n, align 4, !tbaa !5 %mul4 = shl nsw i32 %8, 1 %cmp = icmp slt i32 %add, %mul4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc %9 = and i32 %r.1, 1 %cmp13 = icmp eq i32 %9, 0 br i1 %cmp13, label %if.then14, label %if.else20 if.then14: ; preds = %for.end %cmp15 = icmp sgt i32 %c.1, 1 br i1 %cmp15, label %if.then16, label %if.else17 if.then16: ; preds = %if.then14 %sub = add nsw i32 %c.1, -2 br label %if.end23 if.else17: ; preds = %while.body, %if.then14 %r.0.lcssa95101 = phi i32 [ %r.1, %if.then14 ], [ 0, %while.body ] %c.0.lcssa96100 = phi i32 [ %c.1, %if.then14 ], [ 0, %while.body ] %sub18 = add nsw i32 %r.0.lcssa95101, -2 br label %if.end23 if.else20: ; preds = %for.end %dec21 = add nsw i32 %r.1, -1 %dec22 = add nsw i32 %c.1, -1 br label %if.end23 if.end23: ; preds = %if.then16, %if.else17, %if.else20 %r.2 = phi i32 [ %r.1, %if.then16 ], [ %sub18, %if.else17 ], [ %dec21, %if.else20 ] %c.2 = phi i32 [ %sub, %if.then16 ], [ %c.0.lcssa96100, %if.else17 ], [ %dec22, %if.else20 ] %cmp2578 = icmp sgt i32 %r.2, 0 br i1 %cmp2578, label %for.body26.preheader, label %for.cond38.preheader for.body26.preheader: ; preds = %if.end23 %wide.trip.count = zext i32 %r.2 to i64 br label %for.body26 for.cond38.preheader: ; preds = %for.inc35, %if.end23 %cmp3980 = icmp sgt i32 %c.2, 0 br i1 %cmp3980, label %for.body40.preheader, label %for.end51 for.body40.preheader: ; preds = %for.cond38.preheader %wide.trip.count88 = zext i32 %c.2 to i64 br label %for.body40 for.body26: ; preds = %for.body26.preheader, %for.inc35 %indvars.iv = phi i64 [ 0, %for.body26.preheader ], [ %indvars.iv.next, %for.inc35 ] %arrayidx28 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %10 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %10) %rem3090 = and i64 %indvars.iv, 1 %cmp31.not = icmp eq i64 %rem3090, 0 br i1 %cmp31.not, label %for.inc35, label %if.then32 if.then32: ; preds = %for.body26 %putchar71 = call i32 @putchar(i32 10) br label %for.inc35 for.inc35: ; preds = %for.body26, %if.then32 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond38.preheader, label %for.body26, !llvm.loop !11 for.body40: ; preds = %for.body40.preheader, %for.inc49 %indvars.iv85 = phi i64 [ 0, %for.body40.preheader ], [ %indvars.iv.next86, %for.inc49 ] %arrayidx42 = getelementptr inbounds i32, ptr %vla3, i64 %indvars.iv85 %11 = load i32, ptr %arrayidx42, align 4, !tbaa !5 %call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %11) %rem4491 = and i64 %indvars.iv85, 1 %cmp45.not = icmp eq i64 %rem4491, 0 br i1 %cmp45.not, label %for.inc49, label %if.then46 if.then46: ; preds = %for.body40 %putchar = call i32 @putchar(i32 10) br label %for.inc49 for.inc49: ; preds = %for.body40, %if.then46 %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %exitcond89.not = icmp eq i64 %indvars.iv.next86, %wide.trip.count88 br i1 %exitcond89.not, label %for.end51, label %for.body40, !llvm.loop !12 for.end51: ; preds = %for.inc49, %for.cond38.preheader call void @llvm.stackrestore.p0(ptr %3) %12 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %12, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %12, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %for.end51, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if (a<=b && b<=c){ printf("%d %d %d\n",a,b,c); }else if (a<=c && c<=b){ printf("%d %d %d\n",a,c,b); }else if (b<=a && a<=c){ printf("%d %d %d\n",b,a,c); }else if (b<=c && c<=a){ printf("%d %d %d\n",b,c,a); }else if (c<=a && a<=b){ printf("%d %d %d\n",c,a,b); }else if (c<=b && b<=a){ printf("%d %d %d\n",c,b,a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168080/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168080/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 %.pre = load i32, ptr %c, align 4, !tbaa !5 %cmp1.not = icmp sgt i32 %1, %.pre %or.cond59 = select i1 %cmp.not, i1 true, i1 %cmp1.not br i1 %or.cond59, label %if.else, label %if.then if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %.pre) br label %if.end36 if.else: ; preds = %entry %cmp3.not = icmp sgt i32 %0, %.pre br i1 %cmp3.not, label %if.else8, label %land.lhs.true4 land.lhs.true4: ; preds = %if.else %cmp5.not = icmp sgt i32 %.pre, %1 br i1 %cmp5.not, label %if.else8.thread, label %if.then6 if.then6: ; preds = %land.lhs.true4 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %.pre, i32 noundef %1) br label %if.end36 if.else8: ; preds = %if.else %cmp9.not = icmp sgt i32 %1, %0 br label %if.else14 if.else8.thread: ; preds = %land.lhs.true4 %cmp9.not54 = icmp sgt i32 %1, %0 br i1 %cmp9.not54, label %if.else14, label %if.then12 if.then12: ; preds = %if.else8.thread %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %.pre) br label %if.end36 if.else14: ; preds = %if.else8, %if.else8.thread %cmp9.not56 = phi i1 [ true, %if.else8.thread ], [ %cmp9.not, %if.else8 ] %cmp15.not = icmp sgt i32 %1, %.pre %cmp17.not = icmp sgt i32 %.pre, %0 %or.cond = or i1 %cmp15.not, %cmp17.not br i1 %or.cond, label %if.else20, label %if.then18 if.then18: ; preds = %if.else14 %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %.pre, i32 noundef %0) br label %if.end36 if.else20: ; preds = %if.else14 %brmerge = or i1 %cmp.not, %cmp17.not br i1 %brmerge, label %if.else26, label %if.then24 if.then24: ; preds = %if.else20 %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre, i32 noundef %0, i32 noundef %1) br label %if.end36 if.else26: ; preds = %if.else20 %cmp27.not = icmp sgt i32 %.pre, %1 %brmerge58 = or i1 %cmp27.not, %cmp9.not56 br i1 %brmerge58, label %if.end36, label %if.then30 if.then30: ; preds = %if.else26 %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre, i32 noundef %1, i32 noundef %0) br label %if.end36 if.end36: ; preds = %if.else26, %if.then6, %if.then18, %if.then30, %if.then24, %if.then12, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int x,y,z; scanf("%d %d %d",&x,&y,&z); if(x<y&&y<z){ printf("%d %d %d\n",x,y,z); } else if(x<z&&z<y){ printf("%d %d %d\n",x,z,y); }else if(y<x&&x<z){ printf("%d %d %d\n",y,x,z); }else if(y<z&&z<x){ printf("%d %d %d\n",y,z,x); }else if(z<x&&x<y){ printf("%d %d %d\n",z,x,y); }else if(z<y&&y<x){ printf("%d %d %d\n",z,y,x); }else if(x==y&&y<z){ printf("%d %d %d\n",x,y,z); }else if(x==y&&y>z){ printf("%d %d %d\n",z,x,y); }else if(x==z&&z<y){ printf("%d %d %d\n",x,z,y); }else if(x==z&&z>y){ printf("%d %d %d\n",y,x,z); }else if(y==z&&z<x){ printf("%d %d %d\n",y,z,x); }else if(y==z&&z>x){ printf("%d %d %d\n",x,y,z); }else if(x==y&&y==z){ printf("%d %d %d\n",x,y,z); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168123/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168123/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %y = alloca i32, align 4 %z = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %z) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y, ptr noundef nonnull %z) %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp sge i32 %0, %1 %.pre = load i32, ptr %z, align 4, !tbaa !5 %cmp1 = icmp sge i32 %1, %.pre %or.cond135.not = select i1 %cmp, i1 true, i1 %cmp1 br i1 %or.cond135.not, label %if.else, label %if.then if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %.pre) br label %if.end85 if.else: ; preds = %entry %cmp3 = icmp slt i32 %0, %.pre br i1 %cmp3, label %land.lhs.true4, label %if.else8.thread land.lhs.true4: ; preds = %if.else %cmp5 = icmp slt i32 %.pre, %1 br i1 %cmp5, label %if.then6, label %if.else8 if.then6: ; preds = %land.lhs.true4 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %.pre, i32 noundef %1) br label %if.end85 if.else8: ; preds = %land.lhs.true4 %cmp9 = icmp slt i32 %1, %0 br i1 %cmp9, label %if.then12, label %if.else14 if.else8.thread: ; preds = %if.else %cmp9124 = icmp sge i32 %1, %0 br label %if.else14 if.then12: ; preds = %if.else8 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %.pre) br label %if.end85 if.else14: ; preds = %if.else8.thread, %if.else8 %cmp9125 = phi i1 [ true, %if.else8 ], [ %cmp9124, %if.else8.thread ] %cmp15 = icmp slt i32 %1, %.pre %cmp17 = icmp slt i32 %.pre, %0 %or.cond = and i1 %cmp15, %cmp17 br i1 %or.cond, label %if.then18, label %if.else20 if.then18: ; preds = %if.else14 %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %.pre, i32 noundef %0) br label %if.end85 if.else20: ; preds = %if.else14 %cmp21 = icmp sge i32 %.pre, %0 %brmerge = or i1 %cmp, %cmp21 br i1 %brmerge, label %if.else26, label %if.then24 if.then24: ; preds = %if.else20 %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre, i32 noundef %0, i32 noundef %1) br label %if.end85 if.else26: ; preds = %if.else20 %cmp27 = icmp sge i32 %.pre, %1 %brmerge133 = or i1 %cmp27, %cmp9125 br i1 %brmerge133, label %if.else32, label %if.then30 if.then30: ; preds = %if.else26 %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre, i32 noundef %1, i32 noundef %0) br label %if.end85 if.else32: ; preds = %if.else26 %cmp33.not = icmp eq i32 %0, %1 br i1 %cmp33.not, label %land.lhs.true34, label %if.else44 land.lhs.true34: ; preds = %if.else32 br i1 %cmp15, label %if.then36, label %land.lhs.true40 if.then36: ; preds = %land.lhs.true34 %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %0, i32 noundef %.pre) br label %if.end85 land.lhs.true40: ; preds = %land.lhs.true34 br i1 %cmp27, label %if.else56, label %if.then42 if.then42: ; preds = %land.lhs.true40 %call43 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre, i32 noundef %0, i32 noundef %0) br label %if.end85 if.else44: ; preds = %if.else32 %cmp45 = icmp eq i32 %0, %.pre br i1 %cmp45, label %land.lhs.true46, label %if.else56 land.lhs.true46: ; preds = %if.else44 br i1 %cmp27, label %land.lhs.true52, label %if.then48 if.then48: ; preds = %land.lhs.true46 %call49 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %0, i32 noundef %1) br label %if.end85 land.lhs.true52: ; preds = %land.lhs.true46 br i1 %cmp15, label %if.then54, label %if.else56 if.then54: ; preds = %land.lhs.true52 %call55 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %0) br label %if.end85 if.else56: ; preds = %land.lhs.true40, %if.else44, %land.lhs.true52 %cmp57.not = icmp eq i32 %1, %.pre br i1 %cmp57.not, label %land.lhs.true58, label %if.end85 land.lhs.true58: ; preds = %if.else56 br i1 %cmp21, label %land.lhs.true64, label %if.then60 if.then60: ; preds = %land.lhs.true58 %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %1, i32 noundef %0) br label %if.end85 land.lhs.true64: ; preds = %land.lhs.true58 br i1 %cmp3, label %if.then66, label %if.else68 if.then66: ; preds = %land.lhs.true64 %call67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %1) br label %if.end85 if.else68: ; preds = %land.lhs.true64 br i1 %cmp33.not, label %if.then72, label %if.end85 if.then72: ; preds = %if.else68 %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %0, i32 noundef %0) br label %if.end85 if.end85: ; preds = %if.else68, %if.else56, %if.then6, %if.then18, %if.then30, %if.then42, %if.then54, %if.then66, %if.then72, %if.then60, %if.then48, %if.then36, %if.then24, %if.then12, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %z) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main (void) { int a,b,c,d; scanf("%d %d %d",&a,&b,&c); if(a>b){ d=a; a=b; b=d; } if(a>c){ d=a; a=c; c=d; } if(b>c){ d=b; b=c; c=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168167/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168167/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %6 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %b, align 4, !tbaa !5 store i32 %2, ptr %c, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %8, i32 noundef %7) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <float.h> #include <inttypes.h> #include <limits.h> #include <stdbool.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #include <math.h> #ifdef __cplusplus #include <bits/stdc++.h> #endif #define getchar getchar #define putchar putchar int32_t nextint(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); bool s=false; if(c=='-'){s=true;c=getchar();} uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; } int64_t nextlong(void){ char c=getchar(); while(c!='-'&&(c<'0'||'9'<c)) c=getchar(); int s=0; if(c=='-'){s=1;c=getchar();} uint64_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar(); } return s?-x:x; } uint32_t nextstr(char *s){ char c=getchar(); while(c==' '||c=='\n') c=getchar(); uint32_t len=0; while(c!=' '&&c!='\n'){ *s++=c; len++; c=getchar(); } *s='\0'; return len; } char a[2000]; int main(void){ int q=nextint(); while(q-->0){ int n=nextint(); int b[2]={0,0}; for(int i=0; i<n*2; i++){ a[i]=nextint()&1; b[a[i]]++; } int c[2]={-1,-1}; for(int i=(b[0]%2==0); i<n*2; i++){ if(c[a[i]]<0){ c[a[i]]=i; }else{ printf("%d %d\n", c[a[i]]+1, i+1); c[a[i]]=-1; } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16821/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16821/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local local_unnamed_addr global [2000 x i8] zeroinitializer, align 16 @.str = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @nextint() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %0) %sext45 = shl i32 %call.i, 24 %cmp.not46 = icmp ne i32 %sext45, 754974720 %1 = add i32 %sext45, -956301313 %2 = icmp ult i32 %1, -150994945 %or.cond47 = and i1 %cmp.not46, %2 br i1 %or.cond47, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i42 = tail call i32 @getc(ptr noundef %3) %sext = shl i32 %call.i42, 24 %cmp.not = icmp ne i32 %sext, 754974720 %4 = add i32 %sext, -956301313 %5 = icmp ult i32 %4, -150994945 %or.cond = and i1 %cmp.not, %5 br i1 %or.cond, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %c.0.in.lcssa = phi i32 [ %call.i, %entry ], [ %call.i42, %while.body ] %sext.lcssa = phi i32 [ %sext45, %entry ], [ %sext, %while.body ] %cmp12 = icmp eq i32 %sext.lcssa, 754974720 br i1 %cmp12, label %if.then, label %if.end if.then: ; preds = %while.end %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i43 = tail call i32 @getc(ptr noundef %6) br label %if.end if.end: ; preds = %if.then, %while.end %c.1.in = phi i32 [ %call.i43, %if.then ], [ %c.0.in.lcssa, %while.end ] %sext4049 = shl i32 %c.1.in, 24 %7 = add i32 %sext4049, -788529153 %8 = icmp ult i32 %7, 184549375 br i1 %8, label %while.body25, label %while.end29 while.body25: ; preds = %if.end, %while.body25 %x.051 = phi i32 [ %sub, %while.body25 ], [ 0, %if.end ] %c.2.in50 = phi i32 [ %call.i44, %while.body25 ], [ %c.1.in, %if.end ] %conv17 = and i32 %c.2.in50, 255 %mul = mul i32 %x.051, 10 %add = add nsw i32 %conv17, -48 %sub = add i32 %add, %mul %9 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i44 = tail call i32 @getc(ptr noundef %9) %sext40 = shl i32 %call.i44, 24 %10 = add i32 %sext40, -788529153 %11 = icmp ult i32 %10, 184549375 br i1 %11, label %while.body25, label %while.end29, !llvm.loop !11 while.end29: ; preds = %while.body25, %if.end %x.0.lcssa = phi i32 [ 0, %if.end ], [ %sub, %while.body25 ] %sub31 = sub i32 0, %x.0.lcssa %cond = select i1 %cmp12, i32 %sub31, i32 %x.0.lcssa ret i32 %cond } ; Function Attrs: 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 i64 @nextlong() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %0) %sext45 = shl i32 %call.i, 24 %cmp.not46 = icmp ne i32 %sext45, 754974720 %1 = add i32 %sext45, -956301313 %2 = icmp ult i32 %1, -150994945 %or.cond47 = and i1 %cmp.not46, %2 br i1 %or.cond47, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i42 = tail call i32 @getc(ptr noundef %3) %sext = shl i32 %call.i42, 24 %cmp.not = icmp ne i32 %sext, 754974720 %4 = add i32 %sext, -956301313 %5 = icmp ult i32 %4, -150994945 %or.cond = and i1 %cmp.not, %5 br i1 %or.cond, label %while.body, label %while.end, !llvm.loop !12 while.end: ; preds = %while.body, %entry %c.0.in.lcssa = phi i32 [ %call.i, %entry ], [ %call.i42, %while.body ] %sext.lcssa = phi i32 [ %sext45, %entry ], [ %sext, %while.body ] %cmp12.not = icmp eq i32 %sext.lcssa, 754974720 br i1 %cmp12.not, label %if.then, label %if.end if.then: ; preds = %while.end %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i43 = tail call i32 @getc(ptr noundef %6) br label %if.end if.end: ; preds = %if.then, %while.end %c.1.in = phi i32 [ %call.i43, %if.then ], [ %c.0.in.lcssa, %while.end ] %sext3949 = shl i32 %c.1.in, 24 %7 = add i32 %sext3949, -788529153 %8 = icmp ult i32 %7, 184549375 br i1 %8, label %while.body25, label %while.end29 while.body25: ; preds = %if.end, %while.body25 %x.051 = phi i64 [ %sub, %while.body25 ], [ 0, %if.end ] %c.2.in50 = phi i32 [ %call.i44, %while.body25 ], [ %c.1.in, %if.end ] %c.2 = zext i32 %c.2.in50 to i64 %mul = mul i64 %x.051, 10 %sext40 = shl i64 %c.2, 56 %conv26 = ashr exact i64 %sext40, 56 %add = add i64 %mul, -48 %sub = add i64 %add, %conv26 %9 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i44 = tail call i32 @getc(ptr noundef %9) %sext39 = shl i32 %call.i44, 24 %10 = add i32 %sext39, -788529153 %11 = icmp ult i32 %10, 184549375 br i1 %11, label %while.body25, label %while.end29, !llvm.loop !13 while.end29: ; preds = %while.body25, %if.end %x.0.lcssa = phi i64 [ 0, %if.end ], [ %sub, %while.body25 ] %sub30 = sub i64 0, %x.0.lcssa %cond = select i1 %cmp12.not, i64 %sub30, i64 %x.0.lcssa ret i64 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @nextstr(ptr nocapture noundef writeonly %s) local_unnamed_addr #0 { entry: br label %while.cond while.cond: ; preds = %while.cond.backedge, %entry %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i26 = tail call i32 @getc(ptr noundef %0) %sext = shl i32 %call.i26, 24 switch i32 %sext, label %while.cond8 [ i32 536870912, label %while.cond.backedge i32 167772160, label %while.cond.backedge ] while.cond.backedge: ; preds = %while.cond, %while.cond br label %while.cond, !llvm.loop !14 while.cond8: ; preds = %while.cond, %while.body15 %s.addr.0 = phi ptr [ %incdec.ptr, %while.body15 ], [ %s, %while.cond ] %c.1.in = phi i32 [ %call.i27, %while.body15 ], [ %call.i26, %while.cond ] %len.0 = phi i32 [ %inc, %while.body15 ], [ 0, %while.cond ] %sext25 = shl i32 %c.1.in, 24 switch i32 %sext25, label %while.body15 [ i32 536870912, label %while.end18 i32 167772160, label %while.end18 ] while.body15: ; preds = %while.cond8 %c.1 = trunc i32 %c.1.in to i8 %incdec.ptr = getelementptr inbounds i8, ptr %s.addr.0, i64 1 store i8 %c.1, ptr %s.addr.0, align 1, !tbaa !15 %inc = add i32 %len.0, 1 %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i27 = tail call i32 @getc(ptr noundef %1) br label %while.cond8, !llvm.loop !16 while.end18: ; preds = %while.cond8, %while.cond8 store i8 0, ptr %s.addr.0, align 1, !tbaa !15 ret i32 %len.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %b = alloca [2 x i32], align 8 %c = alloca [2 x i32], align 8 %call = tail call i32 @nextint() %cmp58 = icmp sgt i32 %call, 0 br i1 %cmp58, label %while.body, label %while.end while.body: ; preds = %entry, %for.cond.cleanup17 %dec59.in = phi i32 [ %dec59, %for.cond.cleanup17 ], [ %call, %entry ] %dec59 = add nsw i32 %dec59.in, -1 %call1 = tail call i32 @nextint() call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #4 store i64 0, ptr %b, align 8 %mul = shl i32 %call1, 1 %cmp253 = icmp sgt i32 %call1, 0 br i1 %cmp253, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %while.body %smax = tail call i32 @llvm.smax.i32(i32 %mul, i32 1) %wide.trip.count = zext i32 %smax to i64 br label %for.body for.cond.cleanup.loopexit: ; preds = %nextint.exit %.pre = load i32, ptr %b, align 8, !tbaa !17 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.cond.cleanup.loopexit, %while.body %0 = phi i32 [ %.pre, %for.cond.cleanup.loopexit ], [ 0, %while.body ] call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %c) #4 store i64 -1, ptr %c, align 8 %1 = and i32 %0, 1 %conv12 = xor i32 %1, 1 %cmp1555 = icmp slt i32 %conv12, %mul br i1 %cmp1555, label %for.body18.preheader, label %for.cond.cleanup17 for.body18.preheader: ; preds = %for.cond.cleanup %2 = and i32 %0, 1 %.not = icmp eq i32 %2, 0 %3 = zext i1 %.not to i64 %wide.trip.count65 = zext i32 %mul to i64 br label %for.body18 for.body: ; preds = %for.body.preheader, %nextint.exit %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %nextint.exit ] %4 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i.i = tail call i32 @getc(ptr noundef %4) %sext45.i = shl i32 %call.i.i, 24 %cmp.not46.i = icmp ne i32 %sext45.i, 754974720 %5 = add i32 %sext45.i, -956301313 %6 = icmp ult i32 %5, -150994945 %or.cond47.i = and i1 %cmp.not46.i, %6 br i1 %or.cond47.i, label %while.body.i, label %while.end.i while.body.i: ; preds = %for.body, %while.body.i %7 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i42.i = tail call i32 @getc(ptr noundef %7) %sext.i = shl i32 %call.i42.i, 24 %cmp.not.i = icmp ne i32 %sext.i, 754974720 %8 = add i32 %sext.i, -956301313 %9 = icmp ult i32 %8, -150994945 %or.cond.i = and i1 %cmp.not.i, %9 br i1 %or.cond.i, label %while.body.i, label %while.end.i, !llvm.loop !9 while.end.i: ; preds = %while.body.i, %for.body %c.0.in.lcssa.i = phi i32 [ %call.i.i, %for.body ], [ %call.i42.i, %while.body.i ] %sext.lcssa.i = phi i32 [ %sext45.i, %for.body ], [ %sext.i, %while.body.i ] %cmp12.i = icmp eq i32 %sext.lcssa.i, 754974720 br i1 %cmp12.i, label %if.then.i, label %if.end.i if.then.i: ; preds = %while.end.i %10 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i43.i = tail call i32 @getc(ptr noundef %10) br label %if.end.i if.end.i: ; preds = %if.then.i, %while.end.i %c.1.in.i = phi i32 [ %call.i43.i, %if.then.i ], [ %c.0.in.lcssa.i, %while.end.i ] %sext4049.i = shl i32 %c.1.in.i, 24 %11 = add i32 %sext4049.i, -788529153 %12 = icmp ult i32 %11, 184549375 br i1 %12, label %while.body25.i, label %nextint.exit while.body25.i: ; preds = %if.end.i, %while.body25.i %x.051.i = phi i32 [ %sub.i, %while.body25.i ], [ 0, %if.end.i ] %c.2.in50.i = phi i32 [ %call.i44.i, %while.body25.i ], [ %c.1.in.i, %if.end.i ] %conv17.i = and i32 %c.2.in50.i, 255 %mul.i = mul i32 %x.051.i, 10 %add.i = add i32 %mul.i, -48 %sub.i = add i32 %add.i, %conv17.i %13 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i44.i = tail call i32 @getc(ptr noundef %13) %sext40.i = shl i32 %call.i44.i, 24 %14 = add i32 %sext40.i, -788529153 %15 = icmp ult i32 %14, 184549375 br i1 %15, label %while.body25.i, label %nextint.exit, !llvm.loop !11 nextint.exit: ; preds = %while.body25.i, %if.end.i %x.0.lcssa.i = phi i32 [ 0, %if.end.i ], [ %sub.i, %while.body25.i ] %16 = trunc i32 %x.0.lcssa.i to i8 %conv = and i8 %16, 1 %arrayidx = getelementptr inbounds [2000 x i8], ptr @a, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx, align 1, !tbaa !15 %idxprom6 = zext i8 %conv to i64 %arrayidx7 = getelementptr inbounds [2 x i32], ptr %b, i64 0, i64 %idxprom6 %17 = load i32, ptr %arrayidx7, align 4, !tbaa !17 %inc = add nsw i32 %17, 1 store i32 %inc, ptr %arrayidx7, align 4, !tbaa !17 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup.loopexit, label %for.body, !llvm.loop !19 for.cond.cleanup17: ; preds = %for.inc39, %for.cond.cleanup call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #4 %cmp = icmp sgt i32 %dec59.in, 1 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !20 for.body18: ; preds = %for.body18.preheader, %for.inc39 %indvars.iv61 = phi i64 [ %3, %for.body18.preheader ], [ %indvars.iv.next62.pre-phi, %for.inc39 ] %arrayidx20 = getelementptr inbounds [2000 x i8], ptr @a, i64 0, i64 %indvars.iv61 %18 = load i8, ptr %arrayidx20, align 1, !tbaa !15 %idxprom21 = sext i8 %18 to i64 %arrayidx22 = getelementptr inbounds [2 x i32], ptr %c, i64 0, i64 %idxprom21 %19 = load i32, ptr %arrayidx22, align 4, !tbaa !17 %cmp23 = icmp slt i32 %19, 0 br i1 %cmp23, label %if.then, label %if.else if.then: ; preds = %for.body18 %20 = trunc i64 %indvars.iv61 to i32 store i32 %20, ptr %arrayidx22, align 4, !tbaa !17 %.pre67 = add nuw nsw i64 %indvars.iv61, 1 br label %for.inc39 if.else: ; preds = %for.body18 %add = add nuw nsw i32 %19, 1 %21 = add nuw nsw i64 %indvars.iv61, 1 %22 = trunc i64 %21 to i32 %call34 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %add, i32 noundef %22) %23 = load i8, ptr %arrayidx20, align 1, !tbaa !15 %idxprom37 = sext i8 %23 to i64 %arrayidx38 = getelementptr inbounds [2 x i32], ptr %c, i64 0, i64 %idxprom37 store i32 -1, ptr %arrayidx38, align 4, !tbaa !17 br label %for.inc39 for.inc39: ; preds = %if.then, %if.else %indvars.iv.next62.pre-phi = phi i64 [ %.pre67, %if.then ], [ %21, %if.else ] %exitcond66.not = icmp eq i64 %indvars.iv.next62.pre-phi, %wide.trip.count65 br i1 %exitcond66.not, label %for.cond.cleanup17, label %for.body18, !llvm.loop !21 while.end: ; preds = %for.cond.cleanup17, %entry ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = !{!7, !7, i64 0} !16 = distinct !{!16, !10} !17 = !{!18, !18, i64 0} !18 = !{!"int", !7, i64 0} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10} !21 = distinct !{!21, !10}
#include <stdio.h> int main (void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b) { if(b<c) { printf("%d %d %d\n",a,b,c); } else { if(a<c) { printf("%d %d %d\n",a,c,b); } else { printf("%d %d %d\n",c,a,b); } } } else { if(c<b) { printf("%d %d %d\n",c,b,a); } else { if(a<c) { printf("%d %d %d\n",b,a,c); } else { printf("%d %d %d\n",b,c,a); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168253/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168253/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4, !tbaa !5 br i1 %cmp, label %if.then, label %if.else10 if.then: ; preds = %entry %cmp1 = icmp slt i32 %1, %2 br i1 %cmp1, label %if.then2, label %if.else if.then2: ; preds = %if.then %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %2) br label %if.end22 if.else: ; preds = %if.then %cmp4 = icmp slt i32 %0, %2 br i1 %cmp4, label %if.then5, label %if.else7 if.then5: ; preds = %if.else %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %2, i32 noundef %1) br label %if.end22 if.else7: ; preds = %if.else %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2, i32 noundef %0, i32 noundef %1) br label %if.end22 if.else10: ; preds = %entry %cmp11 = icmp slt i32 %2, %1 br i1 %cmp11, label %if.then12, label %if.else14 if.then12: ; preds = %if.else10 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2, i32 noundef %1, i32 noundef %0) br label %if.end22 if.else14: ; preds = %if.else10 %cmp15 = icmp slt i32 %0, %2 br i1 %cmp15, label %if.then16, label %if.else18 if.then16: ; preds = %if.else14 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %2) br label %if.end22 if.else18: ; preds = %if.else14 %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %2, i32 noundef %0) br label %if.end22 if.end22: ; preds = %if.then12, %if.else18, %if.then16, %if.then2, %if.else7, %if.then5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int a,b,c,d=0; scanf("%d %d %d",&a,&b,&c); if(a>b){ d=a; a=b; b=d; } if(a>c){ d=a; a=c; c=d; } if(b>c){ d=b; b=c; c=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168310/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168310/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %6 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %b, align 4, !tbaa !5 store i32 %2, ptr %c, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %8, i32 noundef %7) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int a=0; int b=0; int c=0; int temp; printf(""); scanf("%d %d %d",&a,&b,&c); while(1){ if(a>=1 && a<=10000 && b>=1 && b<=10000 && c>=1 && c<=10000){ break; }else{ printf(""); scanf("%d %d %d",&a,&b,&c); continue; } } if(a>b){ temp=a; a=b; b=temp; } if(a>c){ temp=a; a=c; c=temp; } if(b>c){ temp=b; b=c; c=temp; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168354/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168354/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str.1 = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 store i32 0, ptr %a, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 store i32 0, ptr %b, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 store i32 0, ptr %c, align 4, !tbaa !5 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4 %1 = add i32 %0, -1 %or.cond35 = icmp ult i32 %1, 10000 %2 = load i32, ptr %b, align 4 %cmp436 = icmp sgt i32 %2, 0 %or.cond2237 = select i1 %or.cond35, i1 %cmp436, i1 false %cmp638 = icmp slt i32 %2, 10001 %or.cond2339 = select i1 %or.cond2237, i1 %cmp638, i1 false %3 = load i32, ptr %c, align 4 %cmp840 = icmp sgt i32 %3, 0 %or.cond2441 = select i1 %or.cond2339, i1 %cmp840, i1 false %cmp1042 = icmp slt i32 %3, 10001 %or.cond2543 = select i1 %or.cond2441, i1 %cmp1042, i1 false br i1 %or.cond2543, label %while.end, label %if.else if.else: ; preds = %entry, %if.else %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %4 = load i32, ptr %a, align 4 %5 = add i32 %4, -1 %or.cond = icmp ult i32 %5, 10000 %6 = load i32, ptr %b, align 4 %cmp4 = icmp sgt i32 %6, 0 %or.cond22 = select i1 %or.cond, i1 %cmp4, i1 false %cmp6 = icmp slt i32 %6, 10001 %or.cond23 = select i1 %or.cond22, i1 %cmp6, i1 false %7 = load i32, ptr %c, align 4 %cmp8 = icmp sgt i32 %7, 0 %or.cond24 = select i1 %or.cond23, i1 %cmp8, i1 false %cmp10 = icmp slt i32 %7, 10001 %or.cond25 = select i1 %or.cond24, i1 %cmp10, i1 false br i1 %or.cond25, label %while.end, label %if.else while.end: ; preds = %if.else, %entry %.lcssa34 = phi i32 [ %0, %entry ], [ %4, %if.else ] %.lcssa33 = phi i32 [ %2, %entry ], [ %6, %if.else ] %.lcssa = phi i32 [ %3, %entry ], [ %7, %if.else ] %cmp13 = icmp ugt i32 %.lcssa34, %.lcssa33 br i1 %cmp13, label %if.then14, label %if.end if.then14: ; preds = %while.end store i32 %.lcssa33, ptr %a, align 4, !tbaa !5 store i32 %.lcssa34, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then14, %while.end %8 = phi i32 [ %.lcssa34, %if.then14 ], [ %.lcssa33, %while.end ] %9 = phi i32 [ %.lcssa33, %if.then14 ], [ %.lcssa34, %while.end ] %cmp15 = icmp ugt i32 %9, %.lcssa br i1 %cmp15, label %if.then16, label %if.end17 if.then16: ; preds = %if.end store i32 %.lcssa, ptr %a, align 4, !tbaa !5 store i32 %9, ptr %c, align 4, !tbaa !5 br label %if.end17 if.end17: ; preds = %if.then16, %if.end %10 = phi i32 [ %.lcssa, %if.then16 ], [ %9, %if.end ] %11 = phi i32 [ %9, %if.then16 ], [ %.lcssa, %if.end ] %cmp18 = icmp ugt i32 %8, %11 br i1 %cmp18, label %if.then19, label %if.end20 if.then19: ; preds = %if.end17 store i32 %11, ptr %b, align 4, !tbaa !5 store i32 %8, ptr %c, align 4, !tbaa !5 br label %if.end20 if.end20: ; preds = %if.then19, %if.end17 %12 = phi i32 [ %8, %if.then19 ], [ %11, %if.end17 ] %13 = phi i32 [ %11, %if.then19 ], [ %8, %if.end17 ] %call21 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %10, i32 noundef %13, i32 noundef %12) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; 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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a<=b && b<=c) { printf("%d %d %d\n", a, b, c); } else if(b<=a && a<=c) { printf("%d %d %d\n", b, a, c); } else if(c<=a && a<=b) { printf("%d %d %d\n", c, a, b); } else if(b<=c && c<=a) { printf("%d %d %d\n", b, c, a); } else if(a<=c && c<=b) { printf("%d %d %d\n", a, c, b); } else if(b<=a && c<=b) { printf("%d %d %d\n", c, b, a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168398/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168398/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 %.pre.pre = load i32, ptr %c, align 4, !tbaa !5 %cmp1.not = icmp sgt i32 %1, %.pre.pre %or.cond56 = select i1 %cmp.not, i1 true, i1 %cmp1.not br i1 %or.cond56, label %if.else, label %if.then if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %.pre.pre) br label %if.end36 if.else: ; preds = %entry %cmp3.not = icmp sgt i32 %1, %0 %cmp5.not = icmp sgt i32 %0, %.pre.pre %or.cond57 = select i1 %cmp3.not, i1 true, i1 %cmp5.not br i1 %or.cond57, label %if.else8, label %if.then6 if.then6: ; preds = %if.else %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %.pre.pre) br label %if.end36 if.else8: ; preds = %if.else %cmp9.not = icmp sgt i32 %.pre.pre, %0 br i1 %cmp9.not, label %if.else20, label %land.lhs.true10 land.lhs.true10: ; preds = %if.else8 br i1 %cmp.not, label %if.else14.thread, label %if.then12 if.then12: ; preds = %land.lhs.true10 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre.pre, i32 noundef %0, i32 noundef %1) br label %if.end36 if.else14.thread: ; preds = %land.lhs.true10 %cmp15.not54 = icmp sgt i32 %1, %.pre.pre br i1 %cmp15.not54, label %if.else20, label %if.then18 if.then18: ; preds = %if.else14.thread %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %.pre.pre, i32 noundef %0) br label %if.end36 if.else20: ; preds = %if.else8, %if.else14.thread %cmp21.not = icmp sgt i32 %0, %.pre.pre %cmp23.not = icmp sgt i32 %.pre.pre, %1 %or.cond = or i1 %cmp21.not, %cmp23.not br i1 %or.cond, label %if.else26, label %if.then24 if.then24: ; preds = %if.else20 %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %.pre.pre, i32 noundef %1) br label %if.end36 if.else26: ; preds = %if.else20 %or.cond55 = or i1 %cmp3.not, %cmp23.not br i1 %or.cond55, label %if.end36, label %if.then30 if.then30: ; preds = %if.else26 %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre.pre, i32 noundef %1, i32 noundef %0) br label %if.end36 if.end36: ; preds = %if.then6, %if.then18, %if.else26, %if.then30, %if.then24, %if.then12, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a,b,c,d; scanf("%d %d %d",&a,&b,&c); if(a>c){ d=a; a=c; c=d; } if(a>b){ d=a; a=b; b=d; } if(b>c){ d=b; b=c; c=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168440/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168440/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %c, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %c, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %b, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %3, ptr %b, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %6 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %cmp4 = icmp sgt i32 %6, %2 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %2, ptr %b, align 4, !tbaa !5 store i32 %6, ptr %c, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %8 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %8, i32 noundef %7) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> void swap(int *a, int *b); /* a??¨b??\????????? */ int main(void){ int a, b, c; scanf("%d%d%d", &a, &b, &c); if(a > b){ swap(&a, &b); } if(b > c){ swap(&b, &c); } if(a > b){ swap(&a, &b); } printf("%d %d %d\n", a, b, c); return 0; } void swap(int *a, int *b){ int x; x = *a; *a = *b; *b = x; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168484/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168484/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #3 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int a,b,c,x,y,z; scanf("%d%d%d",&a,&b,&c); if(a>b){ x=a; a=b; b=x; } if(b>c){ y=b; b=c; c=y; } if(a>b){ z=a; a=b; b=z; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168527/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168527/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int d[3],i,t,j; for(i=0; i<3; i++){ scanf("%d",&d[i]); } for(i=0; i<2; i++){ for(j=2; j>i; j--){ if(d[j] < d[j-1]){ t = d[j]; d[j] = d[j-1]; d[j-1] = t; } } } for(i=0; i<3; i++){ printf("%d",d[i]); if(i != 2) printf(" "); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168585/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168585/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { for.body6.preheader: %d = alloca [3 x i32], align 4 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %d) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %d) %arrayidx.1 = getelementptr inbounds [3 x i32], ptr %d, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [3 x i32], ptr %d, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2) %0 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp11 = icmp slt i32 %0, %1 br i1 %cmp11, label %if.then, label %for.inc22 if.then: ; preds = %for.body6.preheader store i32 %1, ptr %arrayidx.2, align 4, !tbaa !5 store i32 %0, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.inc22 for.inc22: ; preds = %for.body6.preheader, %if.then %2 = phi i32 [ %1, %for.body6.preheader ], [ %0, %if.then ] %3 = load i32, ptr %d, align 4, !tbaa !5 %cmp11.171 = icmp slt i32 %2, %3 br i1 %cmp11.171, label %if.then.173, label %for.body6.preheader.1 if.then.173: ; preds = %for.inc22 store i32 %3, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %2, ptr %d, align 4, !tbaa !5 br label %for.body6.preheader.1 for.body6.preheader.1: ; preds = %if.then.173, %for.inc22 %4 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp11.1 = icmp slt i32 %4, %5 br i1 %cmp11.1, label %if.then.1, label %for.inc37.2 if.then.1: ; preds = %for.body6.preheader.1 store i32 %5, ptr %arrayidx.2, align 4, !tbaa !5 store i32 %4, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.inc37.2 for.inc37.2: ; preds = %if.then.1, %for.body6.preheader.1 %6 = load i32, ptr %d, align 4, !tbaa !5 %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %6) %putchar58 = call i32 @putchar(i32 32) %7 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %call32.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %7) %putchar58.1 = call i32 @putchar(i32 32) %8 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %call32.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %8) %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %d) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int a,b,c,x,y,z; scanf("%d %d %d",&a,&b,&c); if(a > b){ x = a; a = b; b = x; }if(b > c){ y = b; b = c; c = y; }if(a >b){ z = a; a = b; b = z; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168635/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168635/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(int argc, const char * argv[]) { int a,b,c,x; scanf("%d %d %d",&a,&b,&c); if (a > b){ x=a; a=b; b=x; } if (b > c){ x=b; b=c; c=x; } if (a > b) { x=a; a=b; b=x; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168686/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168686/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int a,b,c; int x,y,z; scanf("%d %d %d",&a,&b,&c); if(a>b){ x=a; a=b; b=x; } if(b>c){ y=b; b=c; c=y; } if(a>b){ z=a; a=b; b=z; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168736/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168736/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a,b,c,x,y,z; scanf("%d%d%d",&a,&b,&c); if(a>=b){ x=a; a=b; b=x; } if(b>=c){ y=b; b=c; c=y; } if(a>=b){ z=a; a=b; b=z; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168787/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168787/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp slt i32 %0, %1 br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1.not = icmp slt i32 %3, %4 br i1 %cmp1.not, label %if.end3, label %if.then2 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4.not = icmp slt i32 %2, %6 br i1 %cmp4.not, label %if.end6, label %if.then5 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { long int t,n; scanf("%ld",&t); while(t--) { scanf("%ld",&n); printf("%ld\n",n/2); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i64, align 8 %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %t) #3 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i64, ptr %t, align 8, !tbaa !5 %dec3 = add nsw i64 %0, -1 store i64 %dec3, ptr %t, align 8, !tbaa !5 %tobool.not4 = icmp eq i64 %0, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i64, ptr %n, align 8, !tbaa !5 %div = sdiv i64 %1, 2 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div) %2 = load i64, ptr %t, align 8, !tbaa !5 %dec = add nsw i64 %2, -1 store i64 %dec, ptr %t, align 8, !tbaa !5 %tobool.not = icmp eq i64 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int a,b,c,x; scanf("%d%d%d%d",&a,&b,&c,&x); if(a>b){ x=a; a=b; b=x; } if(b>c){ x=b; b=c; c=x; } if(a>b){ x=a; a=b; b=x; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168873/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168873/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c, ptr noundef nonnull %x) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %x, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %3, ptr %x, align 4, !tbaa !5 store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %2, ptr %x, align 4, !tbaa !5 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int a,b,c,tmp; scanf("%d %d %d",&a,&b,&c); if(a > b) { tmp = a; a = b; b = tmp; } if(b > c) { tmp = b; b = c; c = tmp; } if(a > b) { tmp = a; a = b; b = tmp; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168923/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168923/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int a,b,c,d; scanf("%d %d %d",&a,&b,&c); if(a > b){ d = a; a = b; b = d; } if (b > c) { d = b; b = c; c = d; } if(a > b){ d = a; a = b; b = d; } printf("%d %d %d\n",a ,b ,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_168974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_168974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int a, b, c, min, mid, max; scanf("%d %d %d", &a, &b, &c); if(a <= b && a <= c) { printf("%d ", a); if (b <= c) printf("%d %d\n", b, c); else printf("%d %d\n", c, b); } else if(b <= a && b <= c) { printf("%d ", b); if (a <= c) printf("%d %d\n", a, c); else printf("%d %d\n", c, a); } else if (c <= a && c <= b) { printf("%d ", c); if (a <= b) printf("%d %d\n", a, b); else printf("%d %d\n", b, a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169016/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169016/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4 %cmp.not = icmp sgt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1.not = icmp sgt i32 %0, %2 %or.cond = select i1 %cmp.not, i1 true, i1 %cmp1.not br i1 %or.cond, label %if.else7, label %if.then if.then: ; preds = %entry %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0) %3 = load i32, ptr %b, align 4, !tbaa !5 %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp3.not = icmp sgt i32 %3, %4 br i1 %cmp3.not, label %if.else, label %if.then4 if.then4: ; preds = %if.then %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %3, i32 noundef %4) br label %if.end33 if.else: ; preds = %if.then %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %4, i32 noundef %3) br label %if.end33 if.else7: ; preds = %entry %cmp8.not = icmp sgt i32 %1, %0 %cmp10.not = icmp sgt i32 %1, %2 %or.cond47 = select i1 %cmp8.not, i1 true, i1 %cmp10.not br i1 %or.cond47, label %if.else19, label %if.then11 if.then11: ; preds = %if.else7 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1) %5 = load i32, ptr %a, align 4, !tbaa !5 %6 = load i32, ptr %c, align 4, !tbaa !5 %cmp13.not = icmp sgt i32 %5, %6 br i1 %cmp13.not, label %if.else16, label %if.then14 if.then14: ; preds = %if.then11 %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %5, i32 noundef %6) br label %if.end33 if.else16: ; preds = %if.then11 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %6, i32 noundef %5) br label %if.end33 if.else19: ; preds = %if.else7 %cmp20.not = icmp sgt i32 %2, %0 %cmp22.not = icmp sgt i32 %2, %1 %or.cond48 = or i1 %cmp20.not, %cmp22.not br i1 %or.cond48, label %if.end33, label %if.then23 if.then23: ; preds = %if.else19 %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2) %7 = load i32, ptr %a, align 4, !tbaa !5 %8 = load i32, ptr %b, align 4, !tbaa !5 %cmp25.not = icmp sgt i32 %7, %8 br i1 %cmp25.not, label %if.else28, label %if.then26 if.then26: ; preds = %if.then23 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %7, i32 noundef %8) br label %if.end33 if.else28: ; preds = %if.then23 %call29 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %8, i32 noundef %7) br label %if.end33 if.end33: ; preds = %if.else16, %if.then14, %if.then26, %if.else28, %if.else19, %if.then4, %if.else call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <math.h> void gcd (int a, int b); int main(){ int testcases; scanf("%d\n", &testcases); while(testcases--){ int n,ans; scanf("%d\n", &n); ans = ceil(n/2); printf("%d\n", ans); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16906/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16906/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %testcases = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %testcases) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %testcases) %0 = load i32, ptr %testcases, align 4, !tbaa !5 %dec4 = add nsw i32 %0, -1 store i32 %dec4, ptr %testcases, align 4, !tbaa !5 %tobool.not5 = icmp eq i32 %0, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %div = sdiv i32 %1, 2 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %div) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 %2 = load i32, ptr %testcases, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %testcases, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %testcases) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int gcd(long long int n){ if(n%2==0){ return (long long)(n/2);} return (long long)((n-1)/2);} int main(){ int t; scanf("%d",&t); while(t--){ long long int n,s; scanf("%lld",&n); s=gcd(n); printf("%lld\n",s);} return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16911/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16911/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @gcd(i64 noundef %n) local_unnamed_addr #0 { entry: %retval.0.in.in = lshr i64 %n, 1 %retval.0 = trunc i64 %retval.0.in.in to i32 ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %t = alloca i32, align 4 %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec4 = add nsw i32 %0, -1 store i32 %dec4, ptr %t, align 4, !tbaa !5 %tobool.not5 = icmp eq i32 %0, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %1 = load i64, ptr %n, align 8, !tbaa !9 %2 = shl i64 %1, 31 %conv = ashr i64 %2, 32 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %conv) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 %3 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %3, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %3, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #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) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> int compare(const void *a, const void *b) { return (*(int *)a - *(int *)b); } int main(void) { int x[3]; while(1) { char buffer[256]; fgets(buffer, 256, stdin); sscanf(buffer, "%d %d %d", &x[0], &x[1], &x[2]); if((1<=x[0] && x[0]<=10000) && (1<=x[1] && x[1] <= 10000) && (1<=x[2] && x[2] <= 10000)) break; } qsort(x, 3, sizeof(int), compare); printf("%d %d %d\n", x[0], x[1], x[2]); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169153/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169153/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %x = alloca [3 x i32], align 4 %buffer = alloca [256 x i8], align 16 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %x) #5 %arrayidx2 = getelementptr inbounds [3 x i32], ptr %x, i64 0, i64 1 %arrayidx3 = getelementptr inbounds [3 x i32], ptr %x, i64 0, i64 2 br label %while.cond while.cond: ; preds = %while.cond, %entry call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %buffer) #5 %0 = load ptr, ptr @stdin, align 8, !tbaa !9 %call = call ptr @fgets(ptr noundef nonnull %buffer, i32 noundef 256, ptr noundef %0) %call4 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buffer, ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx3) #5 %1 = load i32, ptr %x, align 4 %2 = add i32 %1, -1 %or.cond = icmp ult i32 %2, 10000 %3 = load <2 x i32>, ptr %arrayidx2, align 4 %4 = shufflevector <2 x i32> %3, <2 x i32> poison, <4 x i32> <i32 0, i32 1, i32 0, i32 1> %5 = icmp slt <4 x i32> %4, <i32 10001, i32 10001, i32 0, i32 0> %6 = icmp sgt <4 x i32> %4, <i32 10001, i32 10001, i32 0, i32 0> %7 = shufflevector <4 x i1> %5, <4 x i1> %6, <4 x i32> <i32 0, i32 1, i32 6, i32 7> %8 = freeze <4 x i1> %7 %9 = bitcast <4 x i1> %8 to i4 %10 = icmp eq i4 %9, -1 %op.rdx = and i1 %or.cond, %10 call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %buffer) #5 br i1 %op.rdx, label %while.end, label %while.cond while.end: ; preds = %while.cond call void @qsort(ptr noundef nonnull %x, i64 noundef 3, i64 noundef 4, ptr noundef nonnull @compare) #5 %11 = load i32, ptr %x, align 4, !tbaa !5 %12 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %13 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %11, i32 noundef %12, i32 noundef %13) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %x) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0}
#include<stdio.h> int main(void) { int a,b,c; int sort = 0; scanf("%d %d %d",&a,&b,&c); if(a>b){ sort=b; b=a; a=sort; }else if(a>c){ sort=c; c=a; a=sort; } if(b>c){ sort=c; c=b; b=sort; } if(a>b){ sort=b; b=a; a=sort; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169210/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169210/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry store i32 %0, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 %.pre = load i32, ptr %c, align 4, !tbaa !5 br label %if.end3 if.else: ; preds = %entry %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %0, %2 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.else store i32 %0, ptr %c, align 4, !tbaa !5 store i32 %2, ptr %a, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.else, %if.then2, %if.then %3 = phi i32 [ %0, %if.else ], [ %2, %if.then2 ], [ %1, %if.then ] %4 = phi i32 [ %2, %if.else ], [ %0, %if.then2 ], [ %.pre, %if.then ] %5 = phi i32 [ %1, %if.else ], [ %1, %if.then2 ], [ %0, %if.then ] %cmp4 = icmp sgt i32 %5, %4 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %5, ptr %c, align 4, !tbaa !5 store i32 %4, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %6 = phi i32 [ %5, %if.then5 ], [ %4, %if.end3 ] %7 = phi i32 [ %4, %if.then5 ], [ %5, %if.end3 ] %cmp7 = icmp sgt i32 %3, %7 br i1 %cmp7, label %if.then8, label %if.end9 if.then8: ; preds = %if.end6 store i32 %3, ptr %b, align 4, !tbaa !5 store i32 %7, ptr %a, align 4, !tbaa !5 br label %if.end9 if.end9: ; preds = %if.then8, %if.end6 %8 = phi i32 [ %3, %if.then8 ], [ %7, %if.end6 ] %9 = phi i32 [ %7, %if.then8 ], [ %3, %if.end6 ] %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %9, i32 noundef %8, i32 noundef %6) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> void sort(int nums[3]) { int i, j, tmp; for (i = 1; i < 3; ++i) { tmp = nums[i]; if (tmp < nums[i - 1]) { j = i; do { nums[j] = nums[j - 1]; --j; } while(j > 0 && tmp < nums[j - 1]); nums[j] = tmp; } } } int main(void) { int nums[3]; char buf[256]; fgets(buf, 256, stdin); buf[255] = '\0'; sscanf(buf, "%d %d %d", nums, nums + 1, nums + 2); sort(nums); printf("%d %d %d\n", nums[0], nums[1], nums[2]); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @sort(ptr nocapture noundef %nums) local_unnamed_addr #0 { entry: %arrayidx = getelementptr inbounds i32, ptr %nums, i64 1 %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %1 = load i32, ptr %nums, align 4, !tbaa !5 %cmp3 = icmp slt i32 %0, %1 br i1 %cmp3, label %do.end, label %for.inc do.end: ; preds = %entry store i32 %1, ptr %arrayidx, align 4, !tbaa !5 store i32 %0, ptr %nums, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %entry, %do.end %2 = phi i32 [ %1, %entry ], [ %0, %do.end ] %3 = phi i32 [ %0, %entry ], [ %1, %do.end ] %arrayidx.1 = getelementptr inbounds i32, ptr %nums, i64 2 %4 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp3.1 = icmp slt i32 %4, %3 br i1 %cmp3.1, label %land.rhs.peel.1, label %for.inc.1 land.rhs.peel.1: ; preds = %for.inc store i32 %3, ptr %arrayidx.1, align 4, !tbaa !5 %cmp13.peel.1 = icmp slt i32 %4, %2 br i1 %cmp13.peel.1, label %do.end.loopexit.1, label %do.end.1 do.end.loopexit.1: ; preds = %land.rhs.peel.1 store i32 %2, ptr %arrayidx, align 4, !tbaa !5 br label %do.end.1 do.end.1: ; preds = %do.end.loopexit.1, %land.rhs.peel.1 %idxprom5.lcssa.1 = phi i64 [ 1, %land.rhs.peel.1 ], [ 0, %do.end.loopexit.1 ] %arrayidx6.le.1 = getelementptr inbounds i32, ptr %nums, i64 %idxprom5.lcssa.1 store i32 %4, ptr %arrayidx6.le.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %do.end.1, %for.inc ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %nums = alloca [3 x i32], align 4 %buf = alloca [256 x i8], align 16 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %nums) #4 call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %buf) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !9 %call = call ptr @fgets(ptr noundef nonnull %buf, i32 noundef 256, ptr noundef %0) %arrayidx = getelementptr inbounds [256 x i8], ptr %buf, i64 0, i64 255 store i8 0, ptr %arrayidx, align 1, !tbaa !11 %add.ptr = getelementptr inbounds i32, ptr %nums, i64 1 %add.ptr5 = getelementptr inbounds i32, ptr %nums, i64 2 %call6 = call i32 (ptr, ptr, ...) @__isoc99_sscanf(ptr noundef nonnull %buf, ptr noundef nonnull @.str, ptr noundef nonnull %nums, ptr noundef nonnull %add.ptr, ptr noundef nonnull %add.ptr5) #4 %1 = load i32, ptr %add.ptr, align 4, !tbaa !5 %2 = load i32, ptr %nums, align 4, !tbaa !5 %cmp3.i = icmp slt i32 %1, %2 br i1 %cmp3.i, label %do.end.i, label %for.inc.i do.end.i: ; preds = %entry store i32 %2, ptr %add.ptr, align 4, !tbaa !5 store i32 %1, ptr %nums, align 4, !tbaa !5 br label %for.inc.i for.inc.i: ; preds = %do.end.i, %entry %3 = phi i32 [ %2, %entry ], [ %1, %do.end.i ] %4 = phi i32 [ %1, %entry ], [ %2, %do.end.i ] %5 = load i32, ptr %add.ptr5, align 4, !tbaa !5 %cmp3.1.i = icmp slt i32 %5, %4 br i1 %cmp3.1.i, label %land.rhs.peel.1.i, label %sort.exit land.rhs.peel.1.i: ; preds = %for.inc.i store i32 %4, ptr %add.ptr5, align 4, !tbaa !5 %cmp13.peel.1.i = icmp slt i32 %5, %3 br i1 %cmp13.peel.1.i, label %do.end.loopexit.1.i, label %do.end.1.i do.end.loopexit.1.i: ; preds = %land.rhs.peel.1.i store i32 %3, ptr %add.ptr, align 4, !tbaa !5 br label %do.end.1.i do.end.1.i: ; preds = %do.end.loopexit.1.i, %land.rhs.peel.1.i %idxprom5.lcssa.1.i = phi i64 [ 1, %land.rhs.peel.1.i ], [ 0, %do.end.loopexit.1.i ] %arrayidx6.le.1.i = getelementptr inbounds i32, ptr %nums, i64 %idxprom5.lcssa.1.i store i32 %5, ptr %arrayidx6.le.1.i, align 4, !tbaa !5 %.pre = load i32, ptr %nums, align 4, !tbaa !5 %.pre12 = load i32, ptr %add.ptr, align 4, !tbaa !5 br label %sort.exit sort.exit: ; preds = %for.inc.i, %do.end.1.i %6 = phi i32 [ %5, %for.inc.i ], [ %4, %do.end.1.i ] %7 = phi i32 [ %4, %for.inc.i ], [ %.pre12, %do.end.1.i ] %8 = phi i32 [ %3, %for.inc.i ], [ %.pre, %do.end.1.i ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %6) call void @llvm.lifetime.end.p0(i64 256, ptr nonnull %buf) #4 call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %nums) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_sscanf(ptr nocapture noundef readonly, ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = !{!7, !7, i64 0}
#include <stdio.h> #include <stdlib.h> int main() { int a, b, c; int tmp; scanf("%d%d%d", &a, &b, &c); if (a > b) tmp = a, a = b, b = tmp; if (b > c) { tmp = b, b = c, c = tmp; if (a > b) tmp = a, a = b, b = tmp; } printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169326/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169326/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end6 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 %cmp3 = icmp sgt i32 %2, %4 br i1 %cmp3, label %if.then4, label %if.end6 if.then4: ; preds = %if.then2 store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then2, %if.then4, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %3, %if.then4 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %2, %if.then4 ], [ %3, %if.end ] %7 = phi i32 [ %2, %if.then2 ], [ %4, %if.then4 ], [ %2, %if.end ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %7, i32 noundef %6, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { int t,n; scanf("%d",&t); while(t--) { scanf("%d",&n); printf("%d\n",n/2); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16937/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16937/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %t = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %dec3 = add nsw i32 %0, -1 store i32 %dec3, ptr %t, align 4, !tbaa !5 %tobool.not4 = icmp eq i32 %0, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %div = sdiv i32 %1, 2 %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %div) %2 = load i32, ptr %t, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %t, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { int a,b,c,d; scanf("%d %d %d",&a,&b,&c); if(a>b){ d=b;b=a;a=d; } if(b>c){ d=c;c=b;b=d; } if(a>b){ d=b;b=a;a=d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169412/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169412/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %0, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %3, ptr %c, align 4, !tbaa !5 store i32 %4, ptr %b, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %2, ptr %b, align 4, !tbaa !5 store i32 %6, ptr %a, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> void swap(int *a, int *b){ int tmp = *a; *a = *b; *b = tmp; } int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a > b){ swap(&a, &b); } if(a > c){ swap(&a, &c); } if(b > c){ swap(&b, &c); } printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169456/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169456/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %0, %if.then ], [ %1, %entry ] %3 = phi i32 [ %1, %if.then ], [ %0, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %a, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %6 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %b, align 4, !tbaa !5 store i32 %2, ptr %c, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %5, i32 noundef %8, i32 noundef %7) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ int a, b, c, tmp; scanf("%d %d %d", &a, &b, &c); if(a > b){ tmp = a; a = b; b = tmp; } if(b > c){ tmp = b; b = c; c = tmp; } if(a > b){ tmp = a; a = b; b = tmp; } printf("%d %d %d\n", a, b, c); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169520/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169520/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
//3つの整数を読み込み、それらを値が小さい順に並べて出力するプログラム #include <stdio.h> #define INPUT_COUNT 3 int main(void) { //変数定義 int aiInput[INPUT_COUNT]; int iTmp; int iCount; int iBubleCount; //変数の初期化 for (iCount = 0; iCount < INPUT_COUNT; iCount++) { aiInput[iCount] = 0; } iTmp = 0; scanf ("%d %d %d",&aiInput[0],&aiInput[1],&aiInput[2]); for (iCount = 0; iCount < INPUT_COUNT; iCount++) { for (iBubleCount = iCount; iBubleCount < INPUT_COUNT; iBubleCount++) { if (aiInput[iCount] > aiInput[iBubleCount]) { iTmp = aiInput[iCount]; aiInput[iCount] = aiInput[iBubleCount]; aiInput[iBubleCount] = iTmp; } else { //何もしない } } } for (iCount = 0; iCount < INPUT_COUNT; iCount++) { if (iCount == INPUT_COUNT - 1) { printf("%d",aiInput[iCount]); } else { printf("%d ",aiInput[iCount]); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169579/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169579/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { for.inc23: %aiInput = alloca [3 x i32], align 4 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %aiInput) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %aiInput, i8 0, i64 12, i1 false), !tbaa !5 %arrayidx2 = getelementptr inbounds [3 x i32], ptr %aiInput, i64 0, i64 1 %arrayidx3 = getelementptr inbounds [3 x i32], ptr %aiInput, i64 0, i64 2 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %aiInput, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx3) %0 = load i32, ptr %aiInput, align 4, !tbaa !5 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp14.175 = icmp sgt i32 %0, %1 br i1 %cmp14.175, label %if.then.177, label %for.inc23.178 if.then.177: ; preds = %for.inc23 store i32 %1, ptr %aiInput, align 4, !tbaa !5 store i32 %0, ptr %arrayidx2, align 4, !tbaa !5 br label %for.inc23.178 for.inc23.178: ; preds = %if.then.177, %for.inc23 %2 = phi i32 [ %0, %if.then.177 ], [ %1, %for.inc23 ] %3 = phi i32 [ %1, %if.then.177 ], [ %0, %for.inc23 ] %4 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %cmp14.280 = icmp sgt i32 %3, %4 br i1 %cmp14.280, label %if.then.282, label %for.inc23.1 if.then.282: ; preds = %for.inc23.178 store i32 %4, ptr %aiInput, align 4, !tbaa !5 store i32 %3, ptr %arrayidx3, align 4, !tbaa !5 br label %for.inc23.1 for.inc23.1: ; preds = %for.inc23.178, %if.then.282 %5 = phi i32 [ %4, %if.then.282 ], [ %3, %for.inc23.178 ] %6 = phi i32 [ %3, %if.then.282 ], [ %4, %for.inc23.178 ] %cmp14.1.1 = icmp sgt i32 %2, %6 br i1 %cmp14.1.1, label %if.then.1.1, label %for.inc42.2 if.then.1.1: ; preds = %for.inc23.1 store i32 %6, ptr %arrayidx2, align 4, !tbaa !5 store i32 %2, ptr %arrayidx3, align 4, !tbaa !5 br label %for.inc42.2 for.inc42.2: ; preds = %for.inc23.1, %if.then.1.1 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %5) %7 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %call40.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %7) %8 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %call36.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8) %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %aiInput) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a[100]={},i,j,m; for(i=0;i<3;i++){ scanf("%d",&a[i]); } for(m=0;m<2;m++){ for(i=0;i<2;i++){ if(a[i]>a[i+1]){ j=a[i]; a[i]=a[i+1]; a[i+1]=j; } } } printf("%d %d %d\n",a[0],a[1],a[2]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169621/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169621/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; 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) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400) %a, i8 0, i64 400, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %arrayidx.1 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2) %0 = load i32, ptr %a, align 16, !tbaa !5 %1 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp11 = icmp sgt i32 %0, %1 br i1 %cmp11, label %if.then, label %for.inc22 if.then: ; preds = %entry store i32 %1, ptr %a, align 16, !tbaa !5 store i32 %0, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.inc22 for.inc22: ; preds = %entry, %if.then %2 = phi i32 [ %0, %entry ], [ %1, %if.then ] %3 = phi i32 [ %1, %entry ], [ %0, %if.then ] %4 = load i32, ptr %arrayidx.2, align 8, !tbaa !5 %cmp11.1 = icmp sgt i32 %3, %4 br i1 %cmp11.1, label %if.then.1, label %for.inc22.1 if.then.1: ; preds = %for.inc22 store i32 %4, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %3, ptr %arrayidx.2, align 8, !tbaa !5 br label %for.inc22.1 for.inc22.1: ; preds = %if.then.1, %for.inc22 %5 = phi i32 [ %3, %if.then.1 ], [ %4, %for.inc22 ] %6 = phi i32 [ %4, %if.then.1 ], [ %3, %for.inc22 ] %cmp11.150 = icmp sgt i32 %2, %6 br i1 %cmp11.150, label %if.then.151, label %for.inc22.152 if.then.151: ; preds = %for.inc22.1 store i32 %6, ptr %a, align 16, !tbaa !5 store i32 %2, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.inc22.152 for.inc22.152: ; preds = %if.then.151, %for.inc22.1 %7 = phi i32 [ %6, %if.then.151 ], [ %2, %for.inc22.1 ] %8 = phi i32 [ %2, %if.then.151 ], [ %6, %for.inc22.1 ] %cmp11.1.1 = icmp sgt i32 %8, %5 br i1 %cmp11.1.1, label %if.then.1.1, label %for.inc22.1.1 if.then.1.1: ; preds = %for.inc22.152 store i32 %5, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %8, ptr %arrayidx.2, align 8, !tbaa !5 br label %for.inc22.1.1 for.inc22.1.1: ; preds = %if.then.1.1, %for.inc22.152 %9 = phi i32 [ %8, %if.then.1.1 ], [ %5, %for.inc22.152 ] %10 = phi i32 [ %5, %if.then.1.1 ], [ %8, %for.inc22.152 ] %call31 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %7, i32 noundef %10, i32 noundef %9) call void @llvm.lifetime.end.p0(i64 400, 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: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> void cmp(int *a, int *b) { int s; if (*a >*b) { s = *a; *a = *b; *b = s; } return; } int main(void) { int a, b, c; scanf("%d%d%d", &a, &b, &c); cmp(&a, &b); cmp(&b, &c); cmp(&a, &b); printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169672/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169672/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @cmp(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.i = icmp sgt i32 %0, %1 br i1 %cmp.i, label %if.then.i, label %cmp.exit if.then.i: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %cmp.exit cmp.exit: ; preds = %entry, %if.then.i %2 = phi i32 [ %0, %entry ], [ %1, %if.then.i ] %3 = phi i32 [ %1, %entry ], [ %0, %if.then.i ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp.i2 = icmp sgt i32 %3, %4 br i1 %cmp.i2, label %if.then.i3, label %cmp.exit4 if.then.i3: ; preds = %cmp.exit store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %cmp.exit4 cmp.exit4: ; preds = %cmp.exit, %if.then.i3 %5 = phi i32 [ %4, %cmp.exit ], [ %3, %if.then.i3 ] %6 = phi i32 [ %3, %cmp.exit ], [ %4, %if.then.i3 ] %cmp.i5 = icmp sgt i32 %2, %6 br i1 %cmp.i5, label %if.then.i6, label %cmp.exit7 if.then.i6: ; preds = %cmp.exit4 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %cmp.exit7 cmp.exit7: ; preds = %cmp.exit4, %if.then.i6 %7 = phi i32 [ %6, %cmp.exit4 ], [ %2, %if.then.i6 ] %8 = phi i32 [ %2, %cmp.exit4 ], [ %6, %if.then.i6 ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> int main(){ char texto[30], x[30], y[30]; while (scanf("%s %s %s", texto, x, y) != EOF) { printf("NO\n"); fflush(stdout); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_16973/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_16973/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%s %s %s\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %texto = alloca [30 x i8], align 16 %x = alloca [30 x i8], align 16 %y = alloca [30 x i8], align 16 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %texto) #4 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %y) #4 %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %texto, ptr noundef nonnull %x, ptr noundef nonnull %y) %cmp.not6 = icmp eq i32 %call5, -1 br i1 %cmp.not6, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %0 = load ptr, ptr @stdout, align 8, !tbaa !5 %call4 = call i32 @fflush(ptr noundef %0) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %texto, ptr noundef nonnull %x, ptr noundef nonnull %y) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %texto) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @fflush(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main() { int a, b, c, temp; scanf("%d %d %d", &a, &b, &c); if (a > b) { temp = a; a = b; b = temp;} if (b > c) {temp = b; b = c; c = temp;} if (a > b) {temp = a; a = b; b = temp;} printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169780/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169780/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a <= b){ if(b <= c) printf("%d %d %d\n", a, b, c);//a<b<c else if(b >= c && a <= c) printf("%d %d %d\n", a, c, b);//a<c<b else printf("%d %d %d\n", c, a, b);//c<a<b } else if (b <= a){ if(a <= c) printf("%d %d %d\n", b, a, c);//b<a<c else if(a >= c && b <= c) printf("%d %d %d\n", b, c, a);//b<c<a else printf("%d %d %d\n", c, b, a);//c<b<a } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169823/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169823/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 %2 = load i32, ptr %c, align 4, !tbaa !5 br i1 %cmp.not, label %if.then13, label %if.then if.then: ; preds = %entry %cmp1.not = icmp sgt i32 %1, %2 br i1 %cmp1.not, label %land.lhs.true, label %if.then2 if.then2: ; preds = %if.then %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %1, i32 noundef %2) br label %if.end28 land.lhs.true: ; preds = %if.then %cmp5.not = icmp sgt i32 %0, %2 br i1 %cmp5.not, label %if.else8, label %if.then6 if.then6: ; preds = %land.lhs.true %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0, i32 noundef %2, i32 noundef %1) br label %if.end28 if.else8: ; preds = %land.lhs.true %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2, i32 noundef %0, i32 noundef %1) br label %if.end28 if.then13: ; preds = %entry %cmp14.not = icmp sgt i32 %0, %2 br i1 %cmp14.not, label %land.lhs.true19, label %if.then15 if.then15: ; preds = %if.then13 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %0, i32 noundef %2) br label %if.end28 land.lhs.true19: ; preds = %if.then13 %cmp20.not = icmp sgt i32 %1, %2 br i1 %cmp20.not, label %if.else23, label %if.then21 if.then21: ; preds = %land.lhs.true19 %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %1, i32 noundef %2, i32 noundef %0) br label %if.end28 if.else23: ; preds = %land.lhs.true19 %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %2, i32 noundef %1, i32 noundef %0) br label %if.end28 if.end28: ; preds = %if.then21, %if.else23, %if.then15, %if.then2, %if.else8, %if.then6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int array[3] = { 0 }, a = 0,i,j; for (int l = 0; l < 3; l++) { scanf("%d",&array[l]); } for (i = 0; i < 2; i++) { for (j = 2; j > i; j--) { if (array[i] > array[j]) { a=array[j]; array[j] = array[i]; array[i] = a; } } } for (int l = 1,i=0; l < 6,i<3; l++) { if (l % 2 == 0) printf(" "); else { printf("%d", array[i]); i++; } } printf("\n"); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169924/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169924/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 { for.body6.lr.ph: %array = alloca [3 x i32], align 4 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %array) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(12) %array, i8 0, i64 12, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %array) %arrayidx.1 = getelementptr inbounds [3 x i32], ptr %array, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1) %arrayidx.2 = getelementptr inbounds [3 x i32], ptr %array, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2) %0 = load i32, ptr %array, align 4, !tbaa !5 %1 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %cmp11 = icmp sgt i32 %0, %1 br i1 %cmp11, label %if.then, label %for.inc20 if.then: ; preds = %for.body6.lr.ph store i32 %0, ptr %arrayidx.2, align 4, !tbaa !5 store i32 %1, ptr %array, align 4, !tbaa !5 br label %for.inc20 for.inc20: ; preds = %for.body6.lr.ph, %if.then %2 = phi i32 [ %0, %for.body6.lr.ph ], [ %1, %if.then ] %3 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %cmp11.175 = icmp sgt i32 %2, %3 br i1 %cmp11.175, label %if.then.177, label %for.body6.lr.ph.1 if.then.177: ; preds = %for.inc20 store i32 %2, ptr %arrayidx.1, align 4, !tbaa !5 store i32 %3, ptr %array, align 4, !tbaa !5 br label %for.body6.lr.ph.1 for.body6.lr.ph.1: ; preds = %if.then.177, %for.inc20 %4 = load i32, ptr %arrayidx.1, align 4, !tbaa !5 %5 = load i32, ptr %arrayidx.2, align 4, !tbaa !5 %cmp11.1 = icmp sgt i32 %4, %5 br i1 %cmp11.1, label %if.then.1, label %for.body32.preheader if.then.1: ; preds = %for.body6.lr.ph.1 store i32 %4, ptr %arrayidx.2, align 4, !tbaa !5 store i32 %5, ptr %arrayidx.1, align 4, !tbaa !5 br label %for.body32.preheader for.body32.preheader: ; preds = %for.body6.lr.ph.1, %if.then.1 br label %for.body32 for.cond.cleanup31: ; preds = %for.inc42 %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %array) #5 ret i32 0 for.body32: ; preds = %for.body32.preheader, %for.inc42 %i26.068 = phi i32 [ %i26.1, %for.inc42 ], [ 0, %for.body32.preheader ] %l25.067 = phi i32 [ %inc43, %for.inc42 ], [ 1, %for.body32.preheader ] %rem = and i32 %l25.067, 1 %cmp33 = icmp eq i32 %rem, 0 br i1 %cmp33, label %if.then35, label %if.else if.then35: ; preds = %for.body32 %putchar62 = call i32 @putchar(i32 32) br label %for.inc42 if.else: ; preds = %for.body32 %idxprom37 = sext i32 %i26.068 to i64 %arrayidx38 = getelementptr inbounds [3 x i32], ptr %array, i64 0, i64 %idxprom37 %6 = load i32, ptr %arrayidx38, align 4, !tbaa !5 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %6) %inc40 = add nsw i32 %i26.068, 1 br label %for.inc42 for.inc42: ; preds = %if.then35, %if.else %i26.1 = phi i32 [ %i26.068, %if.then35 ], [ %inc40, %if.else ] %inc43 = add nuw nsw i32 %l25.067, 1 %cmp29 = icmp slt i32 %i26.1, 3 br i1 %cmp29, label %for.body32, label %for.cond.cleanup31, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void) { int a, b, c, i; scanf("%d %d %d\n", &a, &b, &c); if(a>b){ i=a; a=b; b=i; } if(b>c) { i=b; b=c; c=i; } if(a>b){ i=a; a=b; b=i; } printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_169968/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_169968/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int a, b, c, num; scanf("%d %d %d", &a, &b, &c); if(a > b){ num = a; a = b; b = num; } if(b > c){ num = b; b = c; c = num; } if(a > b){ num = a; a = b; b = num; } printf("%d %d %d\n", a, b, c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170009/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170009/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int a,b,c,d; scanf("%d %d %d", &a,&b,&c); if(a>b) { d = a; a = b; b = d; } if(b>c) { d = b; b = c; c = d; } if(a>b) { d = a; a = b; b = d; } printf("%d %d %d\n",a,b,c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170052/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170052/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i32 %1, ptr %a, align 4, !tbaa !5 store i32 %0, ptr %b, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %entry %2 = phi i32 [ %1, %if.then ], [ %0, %entry ] %3 = phi i32 [ %0, %if.then ], [ %1, %entry ] %4 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp sgt i32 %3, %4 br i1 %cmp1, label %if.then2, label %if.end3 if.then2: ; preds = %if.end store i32 %4, ptr %b, align 4, !tbaa !5 store i32 %3, ptr %c, align 4, !tbaa !5 br label %if.end3 if.end3: ; preds = %if.then2, %if.end %5 = phi i32 [ %3, %if.then2 ], [ %4, %if.end ] %6 = phi i32 [ %4, %if.then2 ], [ %3, %if.end ] %cmp4 = icmp sgt i32 %2, %6 br i1 %cmp4, label %if.then5, label %if.end6 if.then5: ; preds = %if.end3 store i32 %6, ptr %a, align 4, !tbaa !5 store i32 %2, ptr %b, align 4, !tbaa !5 br label %if.end6 if.end6: ; preds = %if.then5, %if.end3 %7 = phi i32 [ %2, %if.then5 ], [ %6, %if.end3 ] %8 = phi i32 [ %6, %if.then5 ], [ %2, %if.end3 ] %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %8, i32 noundef %7, i32 noundef %5) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #define N 3 void Insert_Sort(int *data); int main(void) { int i,data[N]; char c; for(i=0;i<N;i++){ scanf("%d",&data[i]); c=getchar(); } Insert_Sort(data); for(i=0;i<N;i++){ printf("%d",data[i]); if(i!=N-1){ printf(" "); } } printf("\n"); return 0; } void Insert_Sort(int *data) { int i,x,t; for(i=1;i<N;i++){ t=i; x=data[i]; while(x<data[t-1] && t>0){ data[t]=data[t-1]; t--; } data[t]=x; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170096/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170096/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %data = alloca [3 x i32], align 4 call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %data) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %data) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = call i32 @getc(ptr noundef %0) %arrayidx.1 = getelementptr inbounds [3 x i32], ptr %data, i64 0, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.1) %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i.1 = call i32 @getc(ptr noundef %1) %arrayidx.2 = getelementptr inbounds [3 x i32], ptr %data, i64 0, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.2) %2 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i.2 = call i32 @getc(ptr noundef %2) %3 = load i32, ptr %arrayidx.1, align 4, !tbaa !9 %4 = load i32, ptr %data, align 4, !tbaa !9 %cmp328.i = icmp slt i32 %3, %4 br i1 %cmp328.i, label %while.body.preheader.i, label %while.end.i while.body.preheader.i: ; preds = %entry store i32 %4, ptr %arrayidx.1, align 4, !tbaa !9 br label %while.end.i while.end.i: ; preds = %while.body.preheader.i, %entry %t.0.lcssa.i = phi i64 [ 1, %entry ], [ 0, %while.body.preheader.i ] %arrayidx11.i = getelementptr inbounds i32, ptr %data, i64 %t.0.lcssa.i store i32 %3, ptr %arrayidx11.i, align 4, !tbaa !9 %5 = load i32, ptr %arrayidx.2, align 4, !tbaa !9 %6 = load i32, ptr %arrayidx.1, align 4, !tbaa !9 %cmp328.1.i = icmp slt i32 %5, %6 br i1 %cmp328.1.i, label %while.body.1.i, label %for.inc12.2 while.body.1.i: ; preds = %while.end.i %arrayidx9.1.i = getelementptr inbounds i32, ptr %data, i64 2 store i32 %6, ptr %arrayidx9.1.i, align 4, !tbaa !9 %7 = load i32, ptr %data, align 4, !tbaa !9 %cmp3.1.i = icmp slt i32 %5, %7 br i1 %cmp3.1.i, label %while.body.1.i.1, label %for.inc12.2, !llvm.loop !11 while.body.1.i.1: ; preds = %while.body.1.i %arrayidx9.1.i.1 = getelementptr inbounds i32, ptr %data, i64 1 store i32 %7, ptr %arrayidx9.1.i.1, align 4, !tbaa !9 br label %for.inc12.2 for.inc12.2: ; preds = %while.body.1.i, %while.body.1.i.1, %while.end.i %t.0.lcssa.1.i = phi i64 [ 2, %while.end.i ], [ 1, %while.body.1.i ], [ 0, %while.body.1.i.1 ] %arrayidx11.1.i = getelementptr inbounds i32, ptr %data, i64 %t.0.lcssa.1.i store i32 %5, ptr %arrayidx11.1.i, align 4, !tbaa !9 %8 = load i32, ptr %data, align 4, !tbaa !9 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %8) %putchar22 = call i32 @putchar(i32 32) %9 = load i32, ptr %arrayidx.1, align 4, !tbaa !9 %call8.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %9) %putchar22.1 = call i32 @putchar(i32 32) %10 = load i32, ptr %arrayidx.2, align 4, !tbaa !9 %call8.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %10) %putchar = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %data) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @Insert_Sort(ptr nocapture noundef %data) local_unnamed_addr #3 { entry: %arrayidx = getelementptr inbounds i32, ptr %data, i64 1 %0 = load i32, ptr %arrayidx, align 4, !tbaa !9 %1 = load i32, ptr %data, align 4, !tbaa !9 %cmp328 = icmp slt i32 %0, %1 br i1 %cmp328, label %while.body.preheader, label %while.end while.body.preheader: ; preds = %entry store i32 %1, ptr %arrayidx, align 4, !tbaa !9 br label %while.end while.end: ; preds = %while.body.preheader, %entry %t.0.lcssa = phi i64 [ 1, %entry ], [ 0, %while.body.preheader ] %arrayidx11 = getelementptr inbounds i32, ptr %data, i64 %t.0.lcssa store i32 %0, ptr %arrayidx11, align 4, !tbaa !9 %arrayidx.1 = getelementptr inbounds i32, ptr %data, i64 2 %2 = load i32, ptr %arrayidx.1, align 4, !tbaa !9 %3 = load i32, ptr %arrayidx, align 4, !tbaa !9 %cmp328.1 = icmp slt i32 %2, %3 br i1 %cmp328.1, label %while.body.1, label %while.end.1 while.body.1: ; preds = %while.end %arrayidx9.1 = getelementptr inbounds i32, ptr %data, i64 2 store i32 %3, ptr %arrayidx9.1, align 4, !tbaa !9 %4 = load i32, ptr %data, align 4, !tbaa !9 %cmp3.1 = icmp slt i32 %2, %4 br i1 %cmp3.1, label %while.body.1.1, label %while.end.1, !llvm.loop !11 while.body.1.1: ; preds = %while.body.1 %arrayidx9.1.1 = getelementptr inbounds i32, ptr %data, i64 1 store i32 %4, ptr %arrayidx9.1.1, align 4, !tbaa !9 br label %while.end.1 while.end.1: ; preds = %while.body.1, %while.body.1.1, %while.end %t.0.lcssa.1 = phi i64 [ 2, %while.end ], [ 1, %while.body.1 ], [ 0, %while.body.1.1 ] %arrayidx11.1 = getelementptr inbounds i32, ptr %data, i64 %t.0.lcssa.1 store i32 %2, ptr %arrayidx11.1, align 4, !tbaa !9 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } 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 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<stdlib.h> #define ll long long #define rep(i,l,r)for(ll i=(l);i<(r);i++) int a[100010]; int main(){ int n,m; scanf("%d%d",&n,&m); rep(i,0,2*m){ int t; scanf("%d",&t); a[t]^=1; } int ans=1; rep(i,1,n+1)ans&=!a[i]; puts(ans?"YES":"NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170153/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170153/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @a = dso_local local_unnamed_addr global [100010 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 %t = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp22 = icmp sgt i32 %0, 0 br i1 %cmp22, label %for.body, label %for.cond4.preheader for.cond4.preheader: ; preds = %for.body, %entry %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp624 = icmp sgt i32 %1, 0 br i1 %cmp624, label %for.body9.preheader, label %for.cond.cleanup8 for.body9.preheader: ; preds = %for.cond4.preheader %add = add nuw i32 %1, 1 %2 = call i32 @llvm.smax.i32(i32 %add, i32 2) %smax = zext i32 %2 to i64 %3 = add nsw i64 %smax, -1 %min.iters.check = icmp ult i32 %2, 9 br i1 %min.iters.check, label %for.body9.preheader32, label %vector.ph vector.ph: ; preds = %for.body9.preheader %n.vec = and i64 %3, -8 %ind.end = or i64 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %8, %vector.body ] %vec.phi27 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %9, %vector.body ] %offset.idx = or i64 %index, 1 %4 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %offset.idx %wide.load = load <4 x i32>, ptr %4, align 4, !tbaa !5 %5 = getelementptr inbounds i32, ptr %4, i64 4 %wide.load28 = load <4 x i32>, ptr %5, align 4, !tbaa !5 %6 = icmp eq <4 x i32> %wide.load, zeroinitializer %7 = icmp eq <4 x i32> %wide.load28, zeroinitializer %8 = select <4 x i1> %6, <4 x i32> %vec.phi, <4 x i32> zeroinitializer %9 = select <4 x i1> %7, <4 x i32> %vec.phi27, <4 x i32> zeroinitializer %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %rdx.select.cmp.not = icmp ne <4 x i32> %8, <i32 1, i32 1, i32 1, i32 1> %rdx.select.cmp2931 = icmp ne <4 x i32> %9, <i32 1, i32 1, i32 1, i32 1> %rdx.select.cmp29 = select <4 x i1> %rdx.select.cmp.not, <4 x i1> <i1 true, i1 true, i1 true, i1 true>, <4 x i1> %rdx.select.cmp2931 %11 = bitcast <4 x i1> %rdx.select.cmp29 to i4 %.not = icmp eq i4 %11, 0 %rdx.select30 = zext i1 %.not to i32 %cmp.n = icmp eq i64 %3, %n.vec br i1 %cmp.n, label %for.cond.cleanup8.loopexit, label %for.body9.preheader32 for.body9.preheader32: ; preds = %for.body9.preheader, %middle.block %i3.026.ph = phi i64 [ 1, %for.body9.preheader ], [ %ind.end, %middle.block ] %ans.025.ph = phi i32 [ 1, %for.body9.preheader ], [ %rdx.select30, %middle.block ] br label %for.body9 for.body: ; preds = %entry, %for.body %i.023 = phi i64 [ %inc, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %t) #4 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %t) %12 = load i32, ptr %t, align 4, !tbaa !5 %idxprom = sext i32 %12 to i64 %arrayidx = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %idxprom %13 = load i32, ptr %arrayidx, align 4, !tbaa !5 %xor = xor i32 %13, 1 store i32 %xor, ptr %arrayidx, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %t) #4 %inc = add nuw nsw i64 %i.023, 1 %14 = load i32, ptr %m, align 4, !tbaa !5 %mul = shl nsw i32 %14, 1 %conv = sext i32 %mul to i64 %cmp = icmp slt i64 %inc, %conv br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !13 for.cond.cleanup8.loopexit: ; preds = %for.body9, %middle.block %and.lcssa = phi i32 [ %rdx.select30, %middle.block ], [ %and, %for.body9 ] %15 = icmp eq i32 %and.lcssa, 0 %16 = select i1 %15, ptr @.str.3, ptr @.str.2 br label %for.cond.cleanup8 for.cond.cleanup8: ; preds = %for.cond.cleanup8.loopexit, %for.cond4.preheader %ans.0.lcssa = phi ptr [ @.str.2, %for.cond4.preheader ], [ %16, %for.cond.cleanup8.loopexit ] %call15 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body9: ; preds = %for.body9.preheader32, %for.body9 %i3.026 = phi i64 [ %inc12, %for.body9 ], [ %i3.026.ph, %for.body9.preheader32 ] %ans.025 = phi i32 [ %and, %for.body9 ], [ %ans.025.ph, %for.body9.preheader32 ] %arrayidx10 = getelementptr inbounds [100010 x i32], ptr @a, i64 0, i64 %i3.026 %17 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %tobool.not = icmp eq i32 %17, 0 %and = select i1 %tobool.not, i32 %ans.025, i32 0 %inc12 = add nuw nsw i64 %i3.026, 1 %exitcond.not = icmp eq i64 %inc12, %smax br i1 %exitcond.not, label %for.cond.cleanup8.loopexit, label %for.body9, !llvm.loop !14 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
//set many funcs template //Ver.20180717 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #define inf 1072114514 #define llinf 4154118101919364364 #define mod 1000000007 #define pi 3.1415926535897932384 int max(int a,int b){if(a>b){return a;}return b;} int min(int a,int b){if(a<b){return a;}return b;} int zt(int a,int b){return max(a,b)-min(a,b);} int round(int a,int b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} int ceil(int a,int b){if(a%b==0){return a/b;}return (a/b)+1;} int gcd(int a,int b){int c;while(b!=0){c=a%b;a=b;b=c;}return a;} int lcm(int a,int b){int c=gcd(a,b);a/=c;return a*b;} int nCr(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} int nHr(int a,int b){return nCr(a+b-1,b);} int fact(int a){int i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} int pow(int a,int b){int i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} int dsum(int x){int r=0;while(x){r+=(x%10);x/=10;}return r;} int dsumb(int x,int b){int r=0;while(x){r+=(x%b);x/=b;}return r;} int sankaku(int x){return ((1+x)*x)/2;} long long llmax(long long a,long long b){if(a>b){return a;}return b;} long long llmin(long long a,long long b){if(a<b){return a;}return b;} long long llzt(long long a,long long b){return llmax(a,b)-llmin(a,b);} long long llround(long long a,long long b){if((a%b)*2 >= b){return (a/b)+1;}return a/b;} long long llceil(long long a,long long b){if(a%b==0){return a/b;}return (a/b)+1;} long long llgcd(long long a,long long b){long long c;while(b!=0){c=a%b;a=b;b=c;}return a;} long long lllcm(long long a,long long b){long long c=llgcd(a,b);a/=c;return a*b;} long long llnCr(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=(a+1-i);r/=i;}return r;} long long llnHr(long long a,long long b){return llnCr(a+b-1,b);} long long llfact(long long a){long long i,r=1;for(i=1;i<=a;i++){r*=i;}return r;} long long llpow(long long a,long long b){long long i,r=1;for(i=1;i<=b;i++){r*=a;}return r;} long long lldsum(long long x){long long r=0;while(x){r+=(x%10);x/=10;}return r;} long long lldsumb(long long x,long long b){long long r=0;while(x){r+=(x%b);x/=b;}return r;} long long llsankaku(long long x){return ((1+x)*x)/2;} double dbmax(double a,double b){if(a>b){return a;}return b;} double dbmin(double a,double b){if(a<b){return a;}return b;} double dbzt(double a,double b){return dbmax(a,b)-dbmin(a,b);} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);} int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);} void shuffledget(int x[],int n){ srand(time(0)); int i,b[524288],p,c; for(i=0;i<n;i++){ b[i]=i; } for(i=n;i>=1;i--){ p=rand()%i; c=b[i-1];b[i-1]=b[p];b[p]=c; } for(i=0;i<n;i++){ scanf("%d",&x[b[i]]); } } int dx4[4]={1,-1,0,0}; int dy4[4]={0,0,1,-1}; int dx8[8]={-1,-1,-1,0,0,1,1,1}; int dy8[8]={-1,0,1,-1,1,-1,0,1}; int search(int x,int a[],int n){ int st=0,fi=n-1,te; while(st<=fi){ te=(st+fi)/2; if(a[te]<x){st=te+1;}else{fi=te-1;} } return st; } typedef struct{ int val; int node; }sd; int sdsortfnc(const void *a,const void *b){ if(((sd*)a)->val < ((sd*)b)->val){return -1;} if(((sd*)a)->val > ((sd*)b)->val){return 1;} return 0; } int main(void){ long long i,j,n,m,k,a,b,c,h,w,r=0,l,t; double d; char s[524288]; scanf("%lld%lld",&n,&k); a=n/k; if((n%k)*2>=k){ b=n/k+1; } else{ b=n/k; } r+=(a*a*a); if(k%2==0){ r+=(b*b*b); } printf("%lld\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170197/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170197/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @dx4 = dso_local local_unnamed_addr global [4 x i32] [i32 1, i32 -1, i32 0, i32 0], align 16 @dy4 = dso_local local_unnamed_addr global [4 x i32] [i32 0, i32 0, i32 1, i32 -1], align 16 @dx8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 -1, i32 -1, i32 0, i32 0, i32 1, i32 1, i32 1], align 16 @dy8 = dso_local local_unnamed_addr global [8 x i32] [i32 -1, i32 0, i32 1, i32 -1, i32 1, i32 -1, i32 0, i32 1], align 16 @.str.1 = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @max(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smax.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @zt(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i32 %a, %b %sub = tail call i32 @llvm.abs.i32(i32 %sub5, i1 true) ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @round(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %mul = shl nsw i32 %rem, 1 %cmp.not = icmp sge i32 %mul, %b %div1 = sdiv i32 %a, %b %add = zext i1 %cmp.not to i32 %retval.0 = add nsw i32 %div1, %add ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @ceil(i32 noundef %a, i32 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i32 %a, %b %cmp = icmp ne i32 %rem, 0 %div = sdiv i32 %a, %b %add = zext i1 %cmp to i32 %retval.0 = add nsw i32 %div, %add ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i32 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i32 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i32 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i32 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i32 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i32 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i32 %a.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i32 %b, 0 br i1 %cmp.not4.i, label %gcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i32 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i32 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i32 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i32 %rem.i, 0 br i1 %cmp.not.i, label %gcd.exit, label %while.body.i, !llvm.loop !5 gcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i32 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i32 %a, %a.addr.0.lcssa.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nCr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i32 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i32 %a, 1 %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i32 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i32 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i32 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i32 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i32 %add, %i.07 %mul = mul nsw i32 %r.08, %sub %div = sdiv i32 %mul, %i.07 %inc = add nuw i32 %i.07, 1 %sub.1 = sub i32 %add, %inc %mul.1 = mul nsw i32 %div, %sub.1 %div.1 = sdiv i32 %mul.1, %inc %inc.1 = add nuw i32 %i.07, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !7 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i32 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i32 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i32 %add, %i.07.unr %mul.epil = mul nsw i32 %r.08.unr, %sub.epil %div.epil = sdiv i32 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @nHr(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i32 %b, %a %cmp.not6.i = icmp slt i32 %b, 1 br i1 %cmp.not6.i, label %nCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i32 %b, 1 %0 = icmp eq i32 %b, 1 br i1 %0, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i32 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i32 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i32 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i32 %add, %i.07.i %mul.i = mul nsw i32 %sub.i, %r.08.i %div.i = sdiv i32 %mul.i, %i.07.i %inc.i = add nuw i32 %i.07.i, 1 %sub.i.1 = sub i32 %add, %inc.i %mul.i.1 = mul nsw i32 %sub.i.1, %div.i %div.i.1 = sdiv i32 %mul.i.1, %inc.i %inc.i.1 = add nuw i32 %i.07.i, 2 %niter.next.1 = add i32 %niter, 2 %niter.ncmp.1 = icmp eq i32 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %nCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !7 nCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i32 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i32 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %nCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %nCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i32 %add, %i.07.i.unr %mul.i.epil = mul nsw i32 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i32 %mul.i.epil, %i.07.i.unr br label %nCr.exit nCr.exit: ; preds = %for.body.i.epil, %nCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i32 [ 1, %entry ], [ %div.i.lcssa.ph, %nCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i32 %r.0.lcssa.i } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @fact(i32 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i32 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %a, 8 br i1 %min.iters.check, label %for.body.preheader9, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %a, -8 %ind.end = or i32 %n.vec, 1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi7 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 1, i32 2, i32 3, i32 4>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = mul <4 x i32> %vec.phi, %vec.ind %1 = mul <4 x i32> %vec.phi7, %step.add %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !8 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %a br i1 %cmp.n, label %for.end, label %for.body.preheader9 for.body.preheader9: ; preds = %for.body.preheader, %middle.block %r.06.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.05.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader9, %for.body %r.06 = phi i32 [ %mul, %for.body ], [ %r.06.ph, %for.body.preheader9 ] %i.05 = phi i32 [ %inc, %for.body ], [ %i.05.ph, %for.body.preheader9 ] %mul = mul nsw i32 %r.06, %i.05 %inc = add nuw i32 %i.05, 1 %exitcond.not = icmp eq i32 %i.05, %a br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !11 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @pow(i32 noundef %a, i32 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i32 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %b, 8 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %b, -8 %ind.end = or i32 %n.vec, 1 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %a, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %0, %vector.body ] %vec.phi6 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph ], [ %1, %vector.body ] %0 = mul <4 x i32> %vec.phi, %broadcast.splat %1 = mul <4 x i32> %vec.phi6, %broadcast.splat %index.next = add nuw i32 %index, 8 %2 = icmp eq i32 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !12 middle.block: ; preds = %vector.body %bin.rdx = mul <4 x i32> %1, %0 %3 = tail call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %n.vec, %b br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %r.05.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.04.ph = phi i32 [ 1, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %r.05 = phi i32 [ %mul, %for.body ], [ %r.05.ph, %for.body.preheader7 ] %i.04 = phi i32 [ %inc, %for.body ], [ %i.04.ph, %for.body.preheader7 ] %mul = mul nsw i32 %r.05, %a %inc = add nuw i32 %i.04, 1 %exitcond.not = icmp eq i32 %i.04, %b br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block, %entry %r.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsum(i32 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i32 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.05, 10 %add = add nsw i32 %r.06, %rem %div = sdiv i32 %x.addr.05, 10 %x.addr.05.off = add i32 %x.addr.05, 9 %tobool.not = icmp ult i32 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @dsumb(i32 noundef %x, i32 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i32 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i32 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i32 [ %div, %while.body ], [ %x, %entry ] %rem = srem i32 %x.addr.06, %b %add = add nsw i32 %rem, %r.07 %div = sdiv i32 %x.addr.06, %b %tobool.not = icmp eq i32 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !15 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @sankaku(i32 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i32 %x, 1 %mul = mul nsw i32 %add, %x %div = sdiv i32 %mul, 2 ret i32 %div } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmax(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smax.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llmin(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %a.b = tail call i64 @llvm.smin.i64(i64 %a, i64 %b) ret i64 %a.b } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llzt(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %sub5 = sub nsw i64 %a, %b %sub = tail call i64 @llvm.abs.i64(i64 %sub5, i1 true) ret i64 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llround(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %mul = shl nsw i64 %rem, 1 %cmp.not = icmp sge i64 %mul, %b %div1 = sdiv i64 %a, %b %add = zext i1 %cmp.not to i64 %retval.0 = add nsw i64 %div1, %add ret i64 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llceil(i64 noundef %a, i64 noundef %b) local_unnamed_addr #1 { entry: %rem = srem i64 %a, %b %cmp = icmp ne i64 %rem, 0 %div = sdiv i64 %a, %b %add = zext i1 %cmp to i64 %retval.0 = add nsw i64 %div, %add ret i64 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llgcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4 = icmp eq i64 %b, 0 br i1 %cmp.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %a.addr.06 = phi i64 [ %b.addr.05, %while.body ], [ %a, %entry ] %b.addr.05 = phi i64 [ %rem, %while.body ], [ %b, %entry ] %rem = srem i64 %a.addr.06, %b.addr.05 %cmp.not = icmp eq i64 %rem, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !16 while.end: ; preds = %while.body, %entry %a.addr.0.lcssa = phi i64 [ %a, %entry ], [ %b.addr.05, %while.body ] ret i64 %a.addr.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lllcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not4.i = icmp eq i64 %b, 0 br i1 %cmp.not4.i, label %llgcd.exit, label %while.body.i while.body.i: ; preds = %entry, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %a, %entry ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %b, %entry ] %rem.i = srem i64 %a.addr.06.i, %b.addr.05.i %cmp.not.i = icmp eq i64 %rem.i, 0 br i1 %cmp.not.i, label %llgcd.exit, label %while.body.i, !llvm.loop !16 llgcd.exit: ; preds = %while.body.i, %entry %a.addr.0.lcssa.i = phi i64 [ %a, %entry ], [ %b.addr.05.i, %while.body.i ] %div = sdiv i64 %a, %a.addr.0.lcssa.i %mul = mul nsw i64 %div, %b ret i64 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnCr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not6 = icmp slt i64 %b, 1 br i1 %cmp.not6, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %add = add nsw i64 %a, 1 %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.lr.ph.new for.body.lr.ph.new: ; preds = %for.body.lr.ph %unroll_iter = and i64 %b, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %r.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.07 = phi i64 [ 1, %for.body.lr.ph.new ], [ %inc.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub = sub i64 %add, %i.07 %mul = mul nsw i64 %r.08, %sub %div = sdiv i64 %mul, %i.07 %inc = add nuw i64 %i.07, 1 %sub.1 = sub i64 %add, %inc %mul.1 = mul nsw i64 %div, %sub.1 %div.1 = sdiv i64 %mul.1, %inc %inc.1 = add nuw i64 %i.07, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !17 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %div.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %div.1, %for.body ] %r.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.07.unr = phi i64 [ 1, %for.body.lr.ph ], [ %inc.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %sub.epil = sub i64 %add, %i.07.unr %mul.epil = mul nsw i64 %r.08.unr, %sub.epil %div.epil = sdiv i64 %mul.epil, %i.07.unr br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llnHr(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %add = add nsw i64 %b, %a %cmp.not6.i = icmp slt i64 %b, 1 br i1 %cmp.not6.i, label %llnCr.exit, label %for.body.i.preheader for.body.i.preheader: ; preds = %entry %xtraiter = and i64 %b, 1 %0 = icmp eq i64 %b, 1 br i1 %0, label %llnCr.exit.loopexit.unr-lcssa, label %for.body.i.preheader.new for.body.i.preheader.new: ; preds = %for.body.i.preheader %unroll_iter = and i64 %b, -2 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.i.preheader.new %r.08.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %div.i.1, %for.body.i ] %i.07.i = phi i64 [ 1, %for.body.i.preheader.new ], [ %inc.i.1, %for.body.i ] %niter = phi i64 [ 0, %for.body.i.preheader.new ], [ %niter.next.1, %for.body.i ] %sub.i = sub i64 %add, %i.07.i %mul.i = mul nsw i64 %sub.i, %r.08.i %div.i = sdiv i64 %mul.i, %i.07.i %inc.i = add nuw i64 %i.07.i, 1 %sub.i.1 = sub i64 %add, %inc.i %mul.i.1 = mul nsw i64 %sub.i.1, %div.i %div.i.1 = sdiv i64 %mul.i.1, %inc.i %inc.i.1 = add nuw i64 %i.07.i, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %llnCr.exit.loopexit.unr-lcssa, label %for.body.i, !llvm.loop !17 llnCr.exit.loopexit.unr-lcssa: ; preds = %for.body.i, %for.body.i.preheader %div.i.lcssa.ph = phi i64 [ undef, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %r.08.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %div.i.1, %for.body.i ] %i.07.i.unr = phi i64 [ 1, %for.body.i.preheader ], [ %inc.i.1, %for.body.i ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %llnCr.exit, label %for.body.i.epil for.body.i.epil: ; preds = %llnCr.exit.loopexit.unr-lcssa %sub.i.epil = sub i64 %add, %i.07.i.unr %mul.i.epil = mul nsw i64 %sub.i.epil, %r.08.i.unr %div.i.epil = sdiv i64 %mul.i.epil, %i.07.i.unr br label %llnCr.exit llnCr.exit: ; preds = %for.body.i.epil, %llnCr.exit.loopexit.unr-lcssa, %entry %r.0.lcssa.i = phi i64 [ 1, %entry ], [ %div.i.lcssa.ph, %llnCr.exit.loopexit.unr-lcssa ], [ %div.i.epil, %for.body.i.epil ] ret i64 %r.0.lcssa.i } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llfact(i64 noundef %a) local_unnamed_addr #2 { entry: %cmp.not4 = icmp slt i64 %a, 1 br i1 %cmp.not4, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %a, 7 %0 = icmp ult i64 %a, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %a, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.06 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %i.05 = phi i64 [ 1, %for.body.preheader.new ], [ %inc.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.06, %i.05 %inc = add nuw nsw i64 %i.05, 1 %mul.1 = mul nsw i64 %mul, %inc %inc.1 = add nuw nsw i64 %i.05, 2 %mul.2 = mul nsw i64 %mul.1, %inc.1 %inc.2 = add nuw nsw i64 %i.05, 3 %mul.3 = mul nsw i64 %mul.2, %inc.2 %inc.3 = add nuw nsw i64 %i.05, 4 %mul.4 = mul nsw i64 %mul.3, %inc.3 %inc.4 = add nuw nsw i64 %i.05, 5 %mul.5 = mul nsw i64 %mul.4, %inc.4 %inc.5 = add nuw nsw i64 %i.05, 6 %mul.6 = mul nsw i64 %mul.5, %inc.5 %inc.6 = add nuw i64 %i.05, 7 %mul.7 = mul nsw i64 %mul.6, %inc.6 %inc.7 = add nuw i64 %i.05, 8 %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !18 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.06.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %i.05.unr = phi i64 [ 1, %for.body.preheader ], [ %inc.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.06.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.06.unr, %for.end.loopexit.unr-lcssa ] %i.05.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.06.epil, %i.05.epil %inc.epil = add nuw i64 %i.05.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !19 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @llpow(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp.not3 = icmp slt i64 %b, 1 br i1 %cmp.not3, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %xtraiter = and i64 %b, 7 %0 = icmp ult i64 %b, 8 br i1 %0, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %b, -8 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %r.05 = phi i64 [ 1, %for.body.preheader.new ], [ %mul.7, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.7, %for.body ] %mul = mul nsw i64 %r.05, %a %mul.1 = mul nsw i64 %mul, %a %mul.2 = mul nsw i64 %mul.1, %a %mul.3 = mul nsw i64 %mul.2, %a %mul.4 = mul nsw i64 %mul.3, %a %mul.5 = mul nsw i64 %mul.4, %a %mul.6 = mul nsw i64 %mul.5, %a %mul.7 = mul nsw i64 %mul.6, %a %niter.next.7 = add i64 %niter, 8 %niter.ncmp.7 = icmp eq i64 %niter.next.7, %unroll_iter br i1 %niter.ncmp.7, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !21 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %mul.lcssa.ph = phi i64 [ undef, %for.body.preheader ], [ %mul.7, %for.body ] %r.05.unr = phi i64 [ 1, %for.body.preheader ], [ %mul.7, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %r.05.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %r.05.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %mul.epil = mul nsw i64 %r.05.epil, %a %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end, label %for.body.epil, !llvm.loop !22 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %r.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lldsum(i64 noundef %x) local_unnamed_addr #2 { entry: %tobool.not4 = icmp eq i64 %x, 0 br i1 %tobool.not4, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.06 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.05 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.05, 10 %add = add nsw i64 %r.06, %rem %div = sdiv i64 %x.addr.05, 10 %x.addr.05.off = add i64 %x.addr.05, 9 %tobool.not = icmp ult i64 %x.addr.05.off, 19 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !23 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @lldsumb(i64 noundef %x, i64 noundef %b) local_unnamed_addr #2 { entry: %tobool.not5 = icmp eq i64 %x, 0 br i1 %tobool.not5, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %r.07 = phi i64 [ %add, %while.body ], [ 0, %entry ] %x.addr.06 = phi i64 [ %div, %while.body ], [ %x, %entry ] %rem = srem i64 %x.addr.06, %b %add = add nsw i64 %rem, %r.07 %div = sdiv i64 %x.addr.06, %b %tobool.not = icmp eq i64 %div, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !24 while.end: ; preds = %while.body, %entry %r.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %r.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i64 @llsankaku(i64 noundef %x) local_unnamed_addr #1 { entry: %add = add nsw i64 %x, 1 %mul = mul nsw i64 %add, %x %div = sdiv i64 %mul, 2 ret i64 %div } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmax(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp ogt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbmin(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp = fcmp olt double %a, %b %a.b = select i1 %cmp, double %a, double %b ret double %a.b } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local double @dbzt(double noundef %a, double noundef %b) local_unnamed_addr #1 { entry: %cmp.i = fcmp ogt double %a, %b %a.b.i = select i1 %cmp.i, double %a, double %b %cmp.i4 = fcmp olt double %a, %b %a.b.i5 = select i1 %cmp.i4, double %a, double %b %sub = fsub double %a.b.i, %a.b.i5 ret double %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !25 %1 = load i32, ptr %b, align 4, !tbaa !25 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !25 %1 = load i32, ptr %b, align 4, !tbaa !25 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp ne i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %cmp = icmp sgt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @llsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 %cmp = icmp slt i64 %0, %1 %cmp1 = icmp ne i64 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 %cmp = fcmp ogt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @dbsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 %cmp = fcmp olt double %0, %1 %cmp1 = fcmp une double %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #13 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #6 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @strsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #13 ret i32 %call } ; Function Attrs: nounwind uwtable define dso_local void @shuffledget(ptr noundef %x, i32 noundef %n) local_unnamed_addr #7 { entry: %b = alloca [524288 x i32], align 16 %call = tail call i64 @time(ptr noundef null) #14 %conv = trunc i64 %call to i32 tail call void @srand(i32 noundef %conv) #14 call void @llvm.lifetime.start.p0(i64 2097152, ptr nonnull %b) #14 %cmp44 = icmp sgt i32 %n, 0 br i1 %cmp44, label %for.body.preheader, label %for.end29 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader61, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %0, align 16, !tbaa !25 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 16, !tbaa !25 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i64 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !33 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond2.preheader, label %for.body.preheader61 for.body.preheader61: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond2.preheader: ; preds = %for.body, %middle.block br i1 %cmp44, label %for.body5.preheader, label %for.end29 for.body5.preheader: ; preds = %for.cond2.preheader %3 = zext i32 %n to i64 br label %for.body5 for.body: ; preds = %for.body.preheader61, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader61 ] %arrayidx = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 4, !tbaa !25 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond2.preheader, label %for.body, !llvm.loop !34 for.cond18.preheader: ; preds = %for.body5 br i1 %cmp44, label %for.body21.preheader, label %for.end29 for.body21.preheader: ; preds = %for.cond18.preheader %wide.trip.count58 = zext i32 %n to i64 br label %for.body21 for.body5: ; preds = %for.body5.preheader, %for.body5 %indvars.iv51 = phi i64 [ %3, %for.body5.preheader ], [ %indvars.iv.next52, %for.body5 ] %call6 = tail call i32 @rand() #14 %5 = trunc i64 %indvars.iv51 to i32 %rem = srem i32 %call6, %5 %indvars.iv.next52 = add nsw i64 %indvars.iv51, -1 %idxprom7 = and i64 %indvars.iv.next52, 4294967295 %arrayidx8 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom7 %6 = load i32, ptr %arrayidx8, align 4, !tbaa !25 %idxprom9 = sext i32 %rem to i64 %arrayidx10 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom9 %7 = load i32, ptr %arrayidx10, align 4, !tbaa !25 store i32 %7, ptr %arrayidx8, align 4, !tbaa !25 store i32 %6, ptr %arrayidx10, align 4, !tbaa !25 %cmp3 = icmp ugt i64 %indvars.iv51, 1 br i1 %cmp3, label %for.body5, label %for.cond18.preheader, !llvm.loop !35 for.body21: ; preds = %for.body21.preheader, %for.body21 %indvars.iv54 = phi i64 [ 0, %for.body21.preheader ], [ %indvars.iv.next55, %for.body21 ] %arrayidx23 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv54 %8 = load i32, ptr %arrayidx23, align 4, !tbaa !25 %idxprom24 = sext i32 %8 to i64 %arrayidx25 = getelementptr inbounds i32, ptr %x, i64 %idxprom24 %call26 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx25) %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 %exitcond59.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count58 br i1 %exitcond59.not, label %for.end29, label %for.body21, !llvm.loop !36 for.end29: ; preds = %for.body21, %entry, %for.cond2.preheader, %for.cond18.preheader call void @llvm.lifetime.end.p0(i64 2097152, ptr nonnull %b) #14 ret void } ; Function Attrs: nounwind declare void @srand(i32 noundef) local_unnamed_addr #8 ; Function Attrs: nounwind declare i64 @time(ptr noundef) local_unnamed_addr #8 ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #8 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #9 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @search(i32 noundef %x, ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #10 { entry: %cmp.not9 = icmp slt i32 %n, 1 br i1 %cmp.not9, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %entry %sub = add nsw i32 %n, -1 br label %while.body while.body: ; preds = %while.body.preheader, %while.body %st.011 = phi i32 [ %st.1, %while.body ], [ 0, %while.body.preheader ] %fi.010 = phi i32 [ %fi.1, %while.body ], [ %sub, %while.body.preheader ] %add = add nsw i32 %st.011, %fi.010 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i32, ptr %a, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !25 %cmp1 = icmp slt i32 %0, %x %add2 = add nsw i32 %div, 1 %sub3 = add nsw i32 %div, -1 %fi.1 = select i1 %cmp1, i32 %fi.010, i32 %sub3 %st.1 = select i1 %cmp1, i32 %add2, i32 %st.011 %cmp.not = icmp sgt i32 %st.1, %fi.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !37 while.end: ; preds = %while.body, %entry %st.0.lcssa = phi i32 [ 0, %entry ], [ %st.1, %while.body ] ret i32 %st.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @sdsortfnc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !38 %1 = load i32, ptr %b, align 4, !tbaa !38 %cmp = icmp slt i32 %0, %1 %cmp4 = icmp sgt i32 %0, %1 %. = zext i1 %cmp4 to i32 %retval.0 = select i1 %cmp, i32 -1, i32 %. ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #11 { entry: %n = alloca i64, align 8 %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #14 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #14 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i64, ptr %n, align 8, !tbaa !29 %1 = load i64, ptr %k, align 8, !tbaa !29 %div = sdiv i64 %0, %1 %rem = srem i64 %0, %1 %mul3 = mul nsw i64 %div, %div %mul4 = mul nsw i64 %mul3, %div %2 = and i64 %1, 1 %cmp7 = icmp eq i64 %2, 0 br i1 %cmp7, label %if.then8, label %if.end12 if.then8: ; preds = %entry %mul = shl nsw i64 %rem, 1 %cmp.not = icmp sge i64 %mul, %1 %add = zext i1 %cmp.not to i64 %b.0 = add nsw i64 %div, %add %mul9 = mul nsw i64 %b.0, %b.0 %mul10 = mul nsw i64 %mul9, %b.0 %add11 = add nsw i64 %mul10, %mul4 br label %if.end12 if.end12: ; preds = %if.then8, %entry %r.0 = phi i64 [ %add11, %if.then8 ], [ %mul4, %entry ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %r.0) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #14 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #14 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #9 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #12 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #12 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #13 = { nounwind willreturn memory(read) } attributes #14 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = distinct !{!8, !6, !9, !10} !9 = !{!"llvm.loop.isvectorized", i32 1} !10 = !{!"llvm.loop.unroll.runtime.disable"} !11 = distinct !{!11, !6, !10, !9} !12 = distinct !{!12, !6, !9, !10} !13 = distinct !{!13, !6, !10, !9} !14 = distinct !{!14, !6} !15 = distinct !{!15, !6} !16 = distinct !{!16, !6} !17 = distinct !{!17, !6} !18 = distinct !{!18, !6} !19 = distinct !{!19, !20} !20 = !{!"llvm.loop.unroll.disable"} !21 = distinct !{!21, !6} !22 = distinct !{!22, !20} !23 = distinct !{!23, !6} !24 = distinct !{!24, !6} !25 = !{!26, !26, i64 0} !26 = !{!"int", !27, i64 0} !27 = !{!"omnipotent char", !28, i64 0} !28 = !{!"Simple C/C++ TBAA"} !29 = !{!30, !30, i64 0} !30 = !{!"long long", !27, i64 0} !31 = !{!32, !32, i64 0} !32 = !{!"double", !27, i64 0} !33 = distinct !{!33, !6, !9, !10} !34 = distinct !{!34, !6, !10, !9} !35 = distinct !{!35, !6} !36 = distinct !{!36, !6} !37 = distinct !{!37, !6} !38 = !{!39, !26, i64 0} !39 = !{!"", !26, i64 0, !26, i64 4}
#include <stdio.h> int main(){ long long n,m,x; scanf("%lld%lld",&n,&m); x=n<m/2?n:m/2; printf("%lld\n", x + ((m-(x*2))/4)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %m = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i64, ptr %n, align 8, !tbaa !5 %1 = load i64, ptr %m, align 8, !tbaa !5 %div = sdiv i64 %1, 2 %.div = call i64 @llvm.smin.i64(i64 %0, i64 %div) %mul = shl nsw i64 %.div, 1 %sub = sub nsw i64 %1, %mul %div2 = sdiv i64 %sub, 4 %add = add nsw i64 %div2, %.div %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %add) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(){ long int n, m, count; count = 0; scanf("%ld %ld", &n, &m); if(n >= m/2){ printf("%ld\n", m/2); return 0; }else{ count = n; m = m - 2*n; while(m >= 4){ m = m - 4; count++; } printf("%ld\n", count); return 0; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [8 x i8] c"%ld %ld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 %m = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i64, ptr %n, align 8, !tbaa !5 %1 = load i64, ptr %m, align 8, !tbaa !5 %div = sdiv i64 %1, 2 %cmp.not = icmp slt i64 %0, %div br i1 %cmp.not, label %if.else, label %cleanup if.else: ; preds = %entry %mul = shl nsw i64 %0, 1 %sub = sub nsw i64 %1, %mul %cmp310 = icmp sgt i64 %sub, 3 br i1 %cmp310, label %while.body.preheader, label %while.end while.body.preheader: ; preds = %if.else %2 = add i64 %1, -4 %3 = add i64 %1, 3 %smin = call i64 @llvm.smin.i64(i64 %sub, i64 7) %4 = add i64 %smin, %mul %5 = sub i64 %3, %4 %6 = lshr i64 %5, 2 %7 = and i64 %5, -4 %8 = add i64 %0, %6 %9 = add i64 %mul, %7 %10 = sub i64 %2, %9 %11 = add i64 %8, 1 br label %while.end while.end: ; preds = %while.body.preheader, %if.else %storemerge = phi i64 [ %10, %while.body.preheader ], [ %sub, %if.else ] %count.0.lcssa = phi i64 [ %11, %while.body.preheader ], [ %0, %if.else ] store i64 %storemerge, ptr %m, align 8, !tbaa !5 br label %cleanup cleanup: ; preds = %entry, %while.end %count.0.lcssa.sink = phi i64 [ %count.0.lcssa, %while.end ], [ %div, %entry ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %count.0.lcssa.sink) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #include<stdlib.h> #include<string.h> long long int henkan(char*); int main(){ long long int s,c; char* str; char* data; int i = 0; int j = 0; data = (char*)calloc(100,sizeof(char)); str = (char*)calloc(100,sizeof(char)); fgets(str,100,stdin); while( str[i] != ' ' ){ data[i] = str[i]; i++; } data[i] = '\0'; s = henkan(data); i++; while( str[i] != '\0' && str[i] != '\n' ){ data[j] = str[i]; i++; j++; } data[j] = '\0'; c = henkan(data); c /= 2; if( s >= c ){ printf("%lld\n",c); }else{ c -= s; c /= 2; printf("%lld\n",s+c); } return 0; } long long int henkan( char* str ){ int i; long long int data = 0; long long int keta = 1; char* tmp; tmp = (char*)calloc(2,sizeof(char)); tmp[1] = '\0'; i = strlen(str) - 1; while( i >= 0 ){ tmp[0] = str[i]; data += (long long int)atoi(tmp)*keta; keta *= 10; i--; } return data; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170333/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170333/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(100) ptr @calloc(i64 noundef 100, i64 noundef 1) #5 %call1 = tail call noalias dereferenceable_or_null(100) ptr @calloc(i64 noundef 100, i64 noundef 1) #5 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call2 = tail call ptr @fgets(ptr noundef %call1, i32 noundef 100, ptr noundef %0) %1 = load i8, ptr %call1, align 1, !tbaa !9 %cmp.not87 = icmp eq i8 %1, 32 br i1 %cmp.not87, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %indvars.iv = phi i64 [ %indvars.iv.next, %while.body ], [ 0, %entry ] %2 = phi i8 [ %3, %while.body ], [ %1, %entry ] %arrayidx7 = getelementptr inbounds i8, ptr %call, i64 %indvars.iv store i8 %2, ptr %arrayidx7, align 1, !tbaa !9 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds i8, ptr %call1, i64 %indvars.iv.next %3 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp.not = icmp eq i8 %3, 32 br i1 %cmp.not, label %while.end.loopexit, label %while.body, !llvm.loop !10 while.end.loopexit: ; preds = %while.body %4 = and i64 %indvars.iv.next, 4294967295 br label %while.end while.end: ; preds = %while.end.loopexit, %entry %i.0.lcssa = phi i64 [ 0, %entry ], [ %4, %while.end.loopexit ] %idxprom.lcssa = phi i64 [ 0, %entry ], [ %indvars.iv.next, %while.end.loopexit ] %arrayidx9 = getelementptr inbounds i8, ptr %call, i64 %idxprom.lcssa store i8 0, ptr %arrayidx9, align 1, !tbaa !9 %call.i = tail call noalias dereferenceable_or_null(2) ptr @calloc(i64 noundef 2, i64 noundef 1) #5 %call1.i = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %call) #6 %5 = trunc i64 %call1.i to i32 %i.015.i = add i32 %5, -1 %cmp16.i = icmp sgt i32 %i.015.i, -1 br i1 %cmp16.i, label %while.body.i.preheader, label %henkan.exit while.body.i.preheader: ; preds = %while.end %6 = zext i32 %i.015.i to i64 br label %while.body.i while.body.i: ; preds = %while.body.i.preheader, %while.body.i %indvars.iv92 = phi i64 [ %6, %while.body.i.preheader ], [ %indvars.iv.next93, %while.body.i ] %keta.018.i = phi i64 [ 1, %while.body.i.preheader ], [ %mul7.i, %while.body.i ] %data.017.i = phi i64 [ 0, %while.body.i.preheader ], [ %add.i, %while.body.i ] %arrayidx3.i = getelementptr inbounds i8, ptr %call, i64 %indvars.iv92 %7 = load i8, ptr %arrayidx3.i, align 1, !tbaa !9 store i8 %7, ptr %call.i, align 1, !tbaa !9 %call.i.i = tail call i64 @strtol(ptr nocapture noundef nonnull %call.i, ptr noundef null, i32 noundef 10) #7 %sext.i = shl i64 %call.i.i, 32 %conv6.i = ashr exact i64 %sext.i, 32 %mul.i = mul nsw i64 %conv6.i, %keta.018.i %add.i = add nsw i64 %mul.i, %data.017.i %mul7.i = mul nsw i64 %keta.018.i, 10 %indvars.iv.next93 = add nsw i64 %indvars.iv92, -1 %cmp.not.i = icmp eq i64 %indvars.iv92, 0 br i1 %cmp.not.i, label %henkan.exit, label %while.body.i, !llvm.loop !12 henkan.exit: ; preds = %while.body.i, %while.end %data.0.lcssa.i = phi i64 [ 0, %while.end ], [ %add.i, %while.body.i ] br label %while.cond12 while.cond12: ; preds = %while.body23, %henkan.exit %indvars.iv97 = phi i64 [ %indvars.iv.next98, %while.body23 ], [ 0, %henkan.exit ] %indvars.iv95 = phi i64 [ %indvars.iv.next96, %while.body23 ], [ %i.0.lcssa, %henkan.exit ] %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1 %arrayidx14 = getelementptr inbounds i8, ptr %call1, i64 %indvars.iv.next96 %8 = load i8, ptr %arrayidx14, align 1, !tbaa !9 switch i8 %8, label %while.body23 [ i8 0, label %while.end30 i8 10, label %while.end30 ] while.body23: ; preds = %while.cond12 %arrayidx27 = getelementptr inbounds i8, ptr %call, i64 %indvars.iv97 store i8 %8, ptr %arrayidx27, align 1, !tbaa !9 %indvars.iv.next98 = add nuw i64 %indvars.iv97, 1 br label %while.cond12, !llvm.loop !13 while.end30: ; preds = %while.cond12, %while.cond12 %idxprom31 = and i64 %indvars.iv97, 4294967295 %arrayidx32 = getelementptr inbounds i8, ptr %call, i64 %idxprom31 store i8 0, ptr %arrayidx32, align 1, !tbaa !9 %call.i67 = tail call noalias dereferenceable_or_null(2) ptr @calloc(i64 noundef 2, i64 noundef 1) #5 %call1.i68 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %call) #6 %9 = trunc i64 %call1.i68 to i32 %i.015.i69 = add i32 %9, -1 %cmp16.i70 = icmp sgt i32 %i.015.i69, -1 br i1 %cmp16.i70, label %while.body.i72.preheader, label %henkan.exit86 while.body.i72.preheader: ; preds = %while.end30 %10 = zext i32 %i.015.i69 to i64 br label %while.body.i72 while.body.i72: ; preds = %while.body.i72.preheader, %while.body.i72 %indvars.iv102 = phi i64 [ %10, %while.body.i72.preheader ], [ %indvars.iv.next103, %while.body.i72 ] %keta.018.i74 = phi i64 [ 1, %while.body.i72.preheader ], [ %mul7.i83, %while.body.i72 ] %data.017.i75 = phi i64 [ 0, %while.body.i72.preheader ], [ %add.i82, %while.body.i72 ] %arrayidx3.i77 = getelementptr inbounds i8, ptr %call, i64 %indvars.iv102 %11 = load i8, ptr %arrayidx3.i77, align 1, !tbaa !9 store i8 %11, ptr %call.i67, align 1, !tbaa !9 %call.i.i78 = tail call i64 @strtol(ptr nocapture noundef nonnull %call.i67, ptr noundef null, i32 noundef 10) #7 %sext.i79 = shl i64 %call.i.i78, 32 %conv6.i80 = ashr exact i64 %sext.i79, 32 %mul.i81 = mul nsw i64 %conv6.i80, %keta.018.i74 %add.i82 = add nsw i64 %mul.i81, %data.017.i75 %mul7.i83 = mul nsw i64 %keta.018.i74, 10 %indvars.iv.next103 = add nsw i64 %indvars.iv102, -1 %cmp.not.i85 = icmp eq i64 %indvars.iv102, 0 br i1 %cmp.not.i85, label %henkan.exit86.loopexit, label %while.body.i72, !llvm.loop !12 henkan.exit86.loopexit: ; preds = %while.body.i72 %12 = sdiv i64 %add.i82, 2 br label %henkan.exit86 henkan.exit86: ; preds = %henkan.exit86.loopexit, %while.end30 %data.0.lcssa.i71 = phi i64 [ 0, %while.end30 ], [ %12, %henkan.exit86.loopexit ] %cmp34.not = icmp slt i64 %data.0.lcssa.i, %data.0.lcssa.i71 br i1 %cmp34.not, label %if.else, label %if.end if.else: ; preds = %henkan.exit86 %sub = sub nsw i64 %data.0.lcssa.i71, %data.0.lcssa.i %div37 = sdiv i64 %sub, 2 %add = add nsw i64 %div37, %data.0.lcssa.i br label %if.end if.end: ; preds = %henkan.exit86, %if.else %add.sink = phi i64 [ %add, %if.else ], [ %data.0.lcssa.i71, %henkan.exit86 ] %call38 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %add.sink) ret i32 0 } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define dso_local i64 @henkan(ptr nocapture noundef readonly %str) local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(2) ptr @calloc(i64 noundef 2, i64 noundef 1) #5 %call1 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %str) #6 %0 = trunc i64 %call1 to i32 %i.015 = add i32 %0, -1 %cmp16 = icmp sgt i32 %i.015, -1 br i1 %cmp16, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %i.019 = phi i32 [ %i.0, %while.body ], [ %i.015, %entry ] %keta.018 = phi i64 [ %mul7, %while.body ], [ 1, %entry ] %data.017 = phi i64 [ %add, %while.body ], [ 0, %entry ] %idxprom = zext i32 %i.019 to i64 %arrayidx3 = getelementptr inbounds i8, ptr %str, i64 %idxprom %1 = load i8, ptr %arrayidx3, align 1, !tbaa !9 store i8 %1, ptr %call, align 1, !tbaa !9 %call.i = tail call i64 @strtol(ptr nocapture noundef nonnull %call, ptr noundef null, i32 noundef 10) #7 %sext = shl i64 %call.i, 32 %conv6 = ashr exact i64 %sext, 32 %mul = mul nsw i64 %conv6, %keta.018 %add = add nsw i64 %mul, %data.017 %mul7 = mul nsw i64 %keta.018, 10 %i.0 = add nsw i32 %i.019, -1 %cmp.not = icmp eq i32 %i.019, 0 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !12 while.end: ; preds = %while.body, %entry %data.0.lcssa = phi i64 [ 0, %entry ], [ %add, %while.body ] ret i64 %data.0.lcssa } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nounwind allocsize(0,1) } attributes #6 = { nounwind willreturn memory(read) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = distinct !{!13, !11}
/* * ID: 0619 * Problem: Selecting subjdects */ #include <stdio.h> int main(void) { int point[6]; for (int i = 0; i < 6; i++) scanf("%d", point + i); int sum = point[0]; int min = sum; for (int i = 1; i < 4; i++) { sum += point[i]; min = min < point[i] ? min : point[i]; } sum -= min; sum += point[4] > point[5] ? point[4] : point[5]; printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170377/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170377/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %point = alloca [6 x i32], align 16 call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %point) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %point) %add.ptr.1 = getelementptr inbounds i32, ptr %point, i64 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr.1) %add.ptr.2 = getelementptr inbounds i32, ptr %point, i64 2 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr.2) %add.ptr.3 = getelementptr inbounds i32, ptr %point, i64 3 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr.3) %add.ptr.4 = getelementptr inbounds i32, ptr %point, i64 4 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr.4) %add.ptr.5 = getelementptr inbounds i32, ptr %point, i64 5 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr.5) %0 = load i32, ptr %point, align 16, !tbaa !5 %1 = load i32, ptr %add.ptr.1, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %min.0. = call i32 @llvm.smin.i32(i32 %0, i32 %1) %2 = load i32, ptr %add.ptr.2, align 8, !tbaa !5 %add.1 = add nsw i32 %2, %add %min.0..1 = call i32 @llvm.smin.i32(i32 %min.0., i32 %2) %3 = load i32, ptr %add.ptr.3, align 4, !tbaa !5 %add.2 = add nsw i32 %3, %add.1 %min.0..2 = call i32 @llvm.smin.i32(i32 %min.0..1, i32 %3) %sub = sub i32 %add.2, %min.0..2 %4 = load i32, ptr %add.ptr.4, align 16 %5 = load i32, ptr %add.ptr.5, align 4 %cond23 = call i32 @llvm.smax.i32(i32 %4, i32 %5) %add24 = add nsw i32 %sub, %cond23 %call25 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add24) call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %point) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main() { long int n; scanf("%ld",&n); if(n%2==0) { long int i,j,k,l; printf("%ld\n",n/2); i=n/2; for(j=1;j<=i;j++) printf("2 "); } else { long int i,j,k,l; l=n-3; i=(l/2)+1; printf("%ld\n",i); k=l/2; for(j=1;j<=k;j++) printf("2 "); printf("3 "); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_17042/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_17042/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%ld\0A\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"2 \00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"3 \00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %1 = and i64 %0, 1 %cmp = icmp eq i64 %1, 0 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %div = sdiv i64 %0, 2 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %div) %2 = load i64, ptr %n, align 8, !tbaa !5 %cmp3.not25 = icmp slt i64 %2, 2 br i1 %cmp3.not25, label %if.end, label %for.body.preheader for.body.preheader: ; preds = %if.then %div22829 = lshr i64 %2, 1 br label %for.body for.body: ; preds = %for.body.preheader, %for.body %j.026 = phi i64 [ %inc, %for.body ], [ 1, %for.body.preheader ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) %inc = add nuw nsw i64 %j.026, 1 %exitcond27.not = icmp eq i64 %j.026, %div22829 br i1 %exitcond27.not, label %if.end, label %for.body, !llvm.loop !9 if.else: ; preds = %entry %sub = add nsw i64 %0, -3 %div9 = sdiv i64 %sub, 2 %add = add nsw i64 %div9, 1 %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %add) %cmp13.not23 = icmp slt i64 %0, 5 br i1 %cmp13.not23, label %for.end18, label %for.body14.preheader for.body14.preheader: ; preds = %if.else %smax = call i64 @llvm.smax.i64(i64 %div9, i64 1) br label %for.body14 for.body14: ; preds = %for.body14.preheader, %for.body14 %j6.024 = phi i64 [ %inc17, %for.body14 ], [ 1, %for.body14.preheader ] %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) %inc17 = add nuw nsw i64 %j6.024, 1 %exitcond.not = icmp eq i64 %j6.024, %smax br i1 %exitcond.not, label %for.end18, label %for.body14, !llvm.loop !11 for.end18: ; preds = %for.body14, %if.else %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3) br label %if.end if.end: ; preds = %for.body, %if.then, %for.end18 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !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> int main(void){ char N[51]; int i; scanf("%s" ,N); if( N[0] == N[strlen(N)-1] ){ printf("%c\n",N[0]); } else{ printf("o\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170470/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%c\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"o\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca [51 x i8], align 16 call void @llvm.lifetime.start.p0(i64 51, ptr nonnull %N) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i8, ptr %N, align 16, !tbaa !5 %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %N) #6 %sub = add i64 %call2, -1 %arrayidx3 = getelementptr inbounds [51 x i8], ptr %N, i64 0, i64 %sub %1 = load i8, ptr %arrayidx3, align 1, !tbaa !5 %cmp = icmp eq i8 %0, %1 br i1 %cmp, label %if.then, label %if.else if.then: ; preds = %entry %conv = sext i8 %0 to i32 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %conv) br label %if.end if.else: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 51, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
#define dbg(fmt,...) fprintf(stderr,fmt,__VA_ARGS__) #define dpri(x) dbg(#x ": %d\n", x) #define dprs(x) dbg(#x ": %s\n", x) #include <stdio.h> #include <stdlib.h> typedef long long ll; const int MYINF = 1e9+7; typedef int bool; const bool true = 1; const bool false = 0; #define MAX_N 1000010 typedef struct node_st { int v; struct node_st *next; } node_t; node_t *G[MAX_N]; int n; int connected[MAX_N]; int color; node_t *add_node(node_t *node, int v) { node_t *new = malloc(sizeof(node_t)); new->v = v; new->next = node; return new; } void add(int u, int v) { G[u] = add_node(G[u], v); G[v] = add_node(G[v], u); } void dfs(int v) { node_t *p; if (connected[v]) return; connected[v] = color; for (p = G[v]; p != NULL; p = p->next) { dfs(p->v); } } int main(int argc, char **argv) { int i, m, q, u, v; scanf("%d %d", &n, &m); for (i = 0; i < m; i++) { scanf("%d %d", &u, &v); add(u, v); } for (i = 0; i < n; i++) { color = i + 1; dfs(i); } scanf("%d", &q); for (i = 0; i < q; i++) { scanf("%d %d", &u, &v); if (connected[u] == connected[v]) puts("yes"); else puts("no"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170513/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170513/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.node_st = type { i32, ptr } @MYINF = dso_local local_unnamed_addr constant i32 1000000007, align 4 @true = dso_local local_unnamed_addr constant i32 1, align 4 @false = dso_local local_unnamed_addr constant i32 0, align 4 @G = dso_local local_unnamed_addr global [1000010 x ptr] zeroinitializer, align 16 @connected = dso_local local_unnamed_addr global [1000010 x i32] zeroinitializer, align 16 @color = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @n = dso_local global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"no\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable define dso_local noalias ptr @add_node(ptr noundef %node, i32 noundef %v) local_unnamed_addr #0 { entry: %call = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 store i32 %v, ptr %call, align 8, !tbaa !5 %next = getelementptr inbounds %struct.node_st, ptr %call, i64 0, i32 1 store ptr %node, ptr %next, align 8, !tbaa !11 ret ptr %call } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(readwrite, argmem: none) uwtable define dso_local void @add(i32 noundef %u, i32 noundef %v) local_unnamed_addr #3 { entry: %idxprom = sext i32 %u to i64 %arrayidx = getelementptr inbounds [1000010 x ptr], ptr @G, i64 0, i64 %idxprom %0 = load ptr, ptr %arrayidx, align 8, !tbaa !12 %call.i = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 store i32 %v, ptr %call.i, align 8, !tbaa !5 %next.i = getelementptr inbounds %struct.node_st, ptr %call.i, i64 0, i32 1 store ptr %0, ptr %next.i, align 8, !tbaa !11 store ptr %call.i, ptr %arrayidx, align 8, !tbaa !12 %idxprom3 = sext i32 %v to i64 %arrayidx4 = getelementptr inbounds [1000010 x ptr], ptr @G, i64 0, i64 %idxprom3 %1 = load ptr, ptr %arrayidx4, align 8, !tbaa !12 %call.i12 = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 store i32 %u, ptr %call.i12, align 8, !tbaa !5 %next.i13 = getelementptr inbounds %struct.node_st, ptr %call.i12, i64 0, i32 1 store ptr %1, ptr %next.i13, align 8, !tbaa !11 store ptr %call.i12, ptr %arrayidx4, align 8, !tbaa !12 ret void } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable define dso_local void @dfs(i32 noundef %v) local_unnamed_addr #4 { entry: %idxprom = sext i32 %v to i64 %arrayidx = getelementptr inbounds [1000010 x i32], ptr @connected, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !13 %tobool.not = icmp eq i32 %0, 0 br i1 %tobool.not, label %if.end, label %cleanup if.end: ; preds = %entry %1 = load i32, ptr @color, align 4, !tbaa !13 store i32 %1, ptr %arrayidx, align 4, !tbaa !13 %arrayidx4 = getelementptr inbounds [1000010 x ptr], ptr @G, i64 0, i64 %idxprom %p.010 = load ptr, ptr %arrayidx4, align 8, !tbaa !12 %cmp.not11 = icmp eq ptr %p.010, null br i1 %cmp.not11, label %cleanup, label %for.body for.body: ; preds = %if.end, %for.body %p.012 = phi ptr [ %p.0, %for.body ], [ %p.010, %if.end ] %2 = load i32, ptr %p.012, align 8, !tbaa !5 tail call void @dfs(i32 noundef %2) %next = getelementptr inbounds %struct.node_st, ptr %p.012, i64 0, i32 1 %p.0 = load ptr, ptr %next, align 8, !tbaa !12 %cmp.not = icmp eq ptr %p.0, null br i1 %cmp.not, label %cleanup, label %for.body, !llvm.loop !14 cleanup: ; preds = %for.body, %if.end, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #5 { entry: %m = alloca i32, align 4 %q = alloca i32, align 4 %u = alloca i32, align 4 %v = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %u) #8 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %v) #8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !13 %cmp28 = icmp sgt i32 %0, 0 br i1 %cmp28, label %for.body, label %for.cond2.preheader for.cond2.preheader: ; preds = %for.body, %entry %1 = load i32, ptr @n, align 4, !tbaa !13 %cmp330 = icmp sgt i32 %1, 0 br i1 %cmp330, label %for.body4, label %for.end7 for.body: ; preds = %entry, %for.body %i.029 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %u, ptr noundef nonnull %v) %2 = load i32, ptr %u, align 4, !tbaa !13 %3 = load i32, ptr %v, align 4, !tbaa !13 %idxprom.i = sext i32 %2 to i64 %arrayidx.i = getelementptr inbounds [1000010 x ptr], ptr @G, i64 0, i64 %idxprom.i %4 = load ptr, ptr %arrayidx.i, align 8, !tbaa !12 %call.i.i = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 store i32 %3, ptr %call.i.i, align 8, !tbaa !5 %next.i.i = getelementptr inbounds %struct.node_st, ptr %call.i.i, i64 0, i32 1 store ptr %4, ptr %next.i.i, align 8, !tbaa !11 store ptr %call.i.i, ptr %arrayidx.i, align 8, !tbaa !12 %idxprom3.i = sext i32 %3 to i64 %arrayidx4.i = getelementptr inbounds [1000010 x ptr], ptr @G, i64 0, i64 %idxprom3.i %5 = load ptr, ptr %arrayidx4.i, align 8, !tbaa !12 %call.i12.i = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 store i32 %2, ptr %call.i12.i, align 8, !tbaa !5 %next.i13.i = getelementptr inbounds %struct.node_st, ptr %call.i12.i, i64 0, i32 1 store ptr %5, ptr %next.i13.i, align 8, !tbaa !11 store ptr %call.i12.i, ptr %arrayidx4.i, align 8, !tbaa !12 %inc = add nuw nsw i32 %i.029, 1 %6 = load i32, ptr %m, align 4, !tbaa !13 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !16 for.body4: ; preds = %for.cond2.preheader, %for.body4 %i.131 = phi i32 [ %add, %for.body4 ], [ 0, %for.cond2.preheader ] %add = add nuw nsw i32 %i.131, 1 store i32 %add, ptr @color, align 4, !tbaa !13 call void @dfs(i32 noundef %i.131) %7 = load i32, ptr @n, align 4, !tbaa !13 %cmp3 = icmp slt i32 %add, %7 br i1 %cmp3, label %for.body4, label %for.end7, !llvm.loop !17 for.end7: ; preds = %for.body4, %for.cond2.preheader %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %q) %8 = load i32, ptr %q, align 4, !tbaa !13 %cmp1032 = icmp sgt i32 %8, 0 br i1 %cmp1032, label %for.body11, label %for.end20 for.body11: ; preds = %for.end7, %for.body11 %i.233 = phi i32 [ %inc19, %for.body11 ], [ 0, %for.end7 ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %u, ptr noundef nonnull %v) %9 = load i32, ptr %u, align 4, !tbaa !13 %idxprom = sext i32 %9 to i64 %arrayidx = getelementptr inbounds [1000010 x i32], ptr @connected, i64 0, i64 %idxprom %10 = load i32, ptr %arrayidx, align 4, !tbaa !13 %11 = load i32, ptr %v, align 4, !tbaa !13 %idxprom13 = sext i32 %11 to i64 %arrayidx14 = getelementptr inbounds [1000010 x i32], ptr @connected, i64 0, i64 %idxprom13 %12 = load i32, ptr %arrayidx14, align 4, !tbaa !13 %cmp15 = icmp eq i32 %10, %12 %.str.2..str.3 = select i1 %cmp15, ptr @.str.2, ptr @.str.3 %call16 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2..str.3) %inc19 = add nuw nsw i32 %i.233, 1 %13 = load i32, ptr %q, align 4, !tbaa !13 %cmp10 = icmp slt i32 %inc19, %13 br i1 %cmp10, label %for.body11, label %for.end20, !llvm.loop !18 for.end20: ; preds = %for.body11, %for.end7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %u) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #8 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #6 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 attributes #0 = { mustprogress nofree nounwind willreturn memory(write, argmem: none, inaccessiblemem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(readwrite, argmem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nounwind allocsize(0) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"node_st", !7, i64 0, !10, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"any pointer", !8, i64 0} !11 = !{!6, !10, i64 8} !12 = !{!10, !10, i64 0} !13 = !{!7, !7, i64 0} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.mustprogress"} !16 = distinct !{!16, !15} !17 = distinct !{!17, !15} !18 = distinct !{!18, !15}
#include <stdio.h> #include <stdlib.h> typedef struct link_t{ int id; struct link_t *next; }LINK_T; typedef struct{ int color; struct link_t *next; }USER_T; void Bfs(USER_T *user, int id, int color) { LINK_T *p; if(user[id].color != -1) return; user[id].color = color; for(p = user[id].next; p != NULL; p = p->next) Bfs(user, p->id, color); } LINK_T *my_alloc() { LINK_T *p; if( (p = (LINK_T *)malloc(sizeof(LINK_T))) == NULL){ printf("malloc error\n"); exit(1); } return p; } int main() { int users, relation_n; int q_n; USER_T *user; LINK_T *p; int id, sub_id, r_id; // relation_id int i, j; scanf("%d %d", &users, &relation_n); user = (USER_T *)malloc(sizeof(USER_T) * users); for(i = 0; i < users; i++){ user[i].color = -1; user[i].next = NULL; } for(i = 0; i < relation_n; i++){ scanf("%d %d", &id, &r_id); p = my_alloc(); p->id = r_id; p->next = user[id].next; user[id].next = p; p = my_alloc(); p->id = id; p->next = user[r_id].next; user[r_id].next = p; } /* for(i = 0; i < users; i++){ printf("<%d>\n", i); for(p = user[i].next; p != NULL; p = p->next){ printf(" %d", p->id); } printf("\n"); } */ // BFS(グループ分け) for(i = 0; i < users; i++) Bfs(user, i, i + 1); scanf("%d", &q_n); for(i = 0; i < q_n; i++){ scanf("%d %d", &id, &sub_id); if(user[id].color == user[sub_id].color) printf("yes\n"); else printf("no\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170557/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170557/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct.USER_T = type { i32, ptr } %struct.link_t = type { i32, ptr } @.str.1 = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [13 x i8] c"malloc error\00", align 1 @str.5 = private unnamed_addr constant [3 x i8] c"no\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"yes\00", align 1 ; Function Attrs: nofree nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable define dso_local void @Bfs(ptr nocapture noundef %user, i32 noundef %id, i32 noundef %color) local_unnamed_addr #0 { entry: %idxprom = sext i32 %id to i64 %arrayidx = getelementptr inbounds %struct.USER_T, ptr %user, i64 %idxprom %0 = load i32, ptr %arrayidx, align 8, !tbaa !5 %cmp.not = icmp eq i32 %0, -1 br i1 %cmp.not, label %if.end, label %cleanup if.end: ; preds = %entry store i32 %color, ptr %arrayidx, align 8, !tbaa !5 %next = getelementptr inbounds %struct.USER_T, ptr %user, i64 %idxprom, i32 1 %p.018 = load ptr, ptr %next, align 8, !tbaa !11 %cmp7.not19 = icmp eq ptr %p.018, null br i1 %cmp7.not19, label %cleanup, label %for.body for.body: ; preds = %if.end, %for.body %p.020 = phi ptr [ %p.0, %for.body ], [ %p.018, %if.end ] %1 = load i32, ptr %p.020, align 8, !tbaa !12 tail call void @Bfs(ptr noundef %user, i32 noundef %1, i32 noundef %color) %next9 = getelementptr inbounds %struct.link_t, ptr %p.020, i64 0, i32 1 %p.0 = load ptr, ptr %next9, align 8, !tbaa !11 %cmp7.not = icmp eq ptr %p.0, null br i1 %cmp7.not, label %cleanup, label %for.body, !llvm.loop !14 cleanup: ; preds = %for.body, %if.end, %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: nounwind uwtable define dso_local noalias ptr @my_alloc() local_unnamed_addr #2 { entry: %call = tail call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 %cmp = icmp eq ptr %call, null br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) tail call void @exit(i32 noundef 1) #8 unreachable if.end: ; preds = %entry ret ptr %call } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #3 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %users = alloca i32, align 4 %relation_n = alloca i32, align 4 %q_n = alloca i32, align 4 %id = alloca i32, align 4 %sub_id = alloca i32, align 4 %r_id = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %users) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %relation_n) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q_n) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %id) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %sub_id) #9 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r_id) #9 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %users, ptr noundef nonnull %relation_n) %0 = load i32, ptr %users, align 4, !tbaa !16 %conv = sext i32 %0 to i64 %mul = shl nsw i64 %conv, 4 %call1 = call noalias ptr @malloc(i64 noundef %mul) #7 %cmp87 = icmp sgt i32 %0, 0 br i1 %cmp87, label %for.body.preheader, label %for.cond5.preheader for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %0 to i64 %xtraiter = and i64 %wide.trip.count, 1 %1 = icmp eq i32 %0, 1 br i1 %1, label %for.cond5.preheader.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body for.cond5.preheader.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond5.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond5.preheader.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv.unr store i32 -1, ptr %arrayidx.epil, align 8, !tbaa !5 %next.epil = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv.unr, i32 1 store ptr null, ptr %next.epil, align 8, !tbaa !17 br label %for.cond5.preheader for.cond5.preheader: ; preds = %for.body.epil, %for.cond5.preheader.loopexit.unr-lcssa, %entry %2 = load i32, ptr %relation_n, align 4, !tbaa !16 %cmp689 = icmp sgt i32 %2, 0 br i1 %cmp689, label %for.body8, label %for.cond31.preheader for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %arrayidx = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv store i32 -1, ptr %arrayidx, align 8, !tbaa !5 %next = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv, i32 1 store ptr null, ptr %next, align 8, !tbaa !17 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv.next store i32 -1, ptr %arrayidx.1, align 8, !tbaa !5 %next.1 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %indvars.iv.next, i32 1 store ptr null, ptr %next.1, align 8, !tbaa !17 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond5.preheader.loopexit.unr-lcssa, label %for.body, !llvm.loop !18 for.cond31.preheader.loopexit: ; preds = %my_alloc.exit86 %.pre = load i32, ptr %users, align 4, !tbaa !16 br label %for.cond31.preheader for.cond31.preheader: ; preds = %for.cond31.preheader.loopexit, %for.cond5.preheader %3 = phi i32 [ %.pre, %for.cond31.preheader.loopexit ], [ %0, %for.cond5.preheader ] %cmp3291 = icmp sgt i32 %3, 0 br i1 %cmp3291, label %for.body34, label %for.end37 for.body8: ; preds = %for.cond5.preheader, %my_alloc.exit86 %i.190 = phi i32 [ %inc29, %my_alloc.exit86 ], [ 0, %for.cond5.preheader ] %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %id, ptr noundef nonnull %r_id) %call.i = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 %cmp.i = icmp eq ptr %call.i, null br i1 %cmp.i, label %if.then.i, label %my_alloc.exit if.then.i: ; preds = %for.body8 %puts.i = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #8 unreachable my_alloc.exit: ; preds = %for.body8 %4 = load i32, ptr %r_id, align 4, !tbaa !16 store i32 %4, ptr %call.i, align 8, !tbaa !12 %5 = load i32, ptr %id, align 4, !tbaa !16 %idxprom12 = sext i32 %5 to i64 %next14 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %idxprom12, i32 1 %6 = load ptr, ptr %next14, align 8, !tbaa !17 %next15 = getelementptr inbounds %struct.link_t, ptr %call.i, i64 0, i32 1 store ptr %6, ptr %next15, align 8, !tbaa !19 store ptr %call.i, ptr %next14, align 8, !tbaa !17 %call.i82 = call noalias dereferenceable_or_null(16) ptr @malloc(i64 noundef 16) #7 %cmp.i83 = icmp eq ptr %call.i82, null br i1 %cmp.i83, label %if.then.i84, label %my_alloc.exit86 if.then.i84: ; preds = %my_alloc.exit %puts.i85 = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @exit(i32 noundef 1) #8 unreachable my_alloc.exit86: ; preds = %my_alloc.exit store i32 %5, ptr %call.i82, align 8, !tbaa !12 %idxprom21 = sext i32 %4 to i64 %next23 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %idxprom21, i32 1 %7 = load ptr, ptr %next23, align 8, !tbaa !17 %next24 = getelementptr inbounds %struct.link_t, ptr %call.i82, i64 0, i32 1 store ptr %7, ptr %next24, align 8, !tbaa !19 store ptr %call.i82, ptr %next23, align 8, !tbaa !17 %inc29 = add nuw nsw i32 %i.190, 1 %8 = load i32, ptr %relation_n, align 4, !tbaa !16 %cmp6 = icmp slt i32 %inc29, %8 br i1 %cmp6, label %for.body8, label %for.cond31.preheader.loopexit, !llvm.loop !20 for.body34: ; preds = %for.cond31.preheader, %for.body34 %i.292 = phi i32 [ %add, %for.body34 ], [ 0, %for.cond31.preheader ] %add = add nuw nsw i32 %i.292, 1 call void @Bfs(ptr noundef %call1, i32 noundef %i.292, i32 noundef %add) %exitcond96.not = icmp eq i32 %add, %3 br i1 %exitcond96.not, label %for.end37, label %for.body34, !llvm.loop !21 for.end37: ; preds = %for.body34, %for.cond31.preheader %call38 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %q_n) %9 = load i32, ptr %q_n, align 4, !tbaa !16 %cmp4093 = icmp sgt i32 %9, 0 br i1 %cmp4093, label %for.body42, label %for.end56 for.body42: ; preds = %for.end37, %for.body42 %i.394 = phi i32 [ %inc55, %for.body42 ], [ 0, %for.end37 ] %call43 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %id, ptr noundef nonnull %sub_id) %10 = load i32, ptr %id, align 4, !tbaa !16 %idxprom44 = sext i32 %10 to i64 %arrayidx45 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %idxprom44 %11 = load i32, ptr %arrayidx45, align 8, !tbaa !5 %12 = load i32, ptr %sub_id, align 4, !tbaa !16 %idxprom47 = sext i32 %12 to i64 %arrayidx48 = getelementptr inbounds %struct.USER_T, ptr %call1, i64 %idxprom47 %13 = load i32, ptr %arrayidx48, align 8, !tbaa !5 %cmp50 = icmp eq i32 %11, %13 %str.6.str.5 = select i1 %cmp50, ptr @str.6, ptr @str.5 %puts81 = call i32 @puts(ptr nonnull dereferenceable(1) %str.6.str.5) %inc55 = add nuw nsw i32 %i.394, 1 %14 = load i32, ptr %q_n, align 4, !tbaa !16 %cmp40 = icmp slt i32 %inc55, %14 br i1 %cmp40, label %for.body42, label %for.end56, !llvm.loop !22 for.end56: ; preds = %for.body42, %for.end37 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r_id) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %sub_id) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %id) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q_n) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %relation_n) #9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %users) #9 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 attributes #0 = { nofree nosync nounwind memory(read, argmem: readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nofree nounwind } attributes #7 = { nounwind allocsize(0) } attributes #8 = { noreturn nounwind } attributes #9 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !7, i64 0} !6 = !{!"", !7, i64 0, !10, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"any pointer", !8, i64 0} !11 = !{!10, !10, i64 0} !12 = !{!13, !7, i64 0} !13 = !{!"link_t", !7, i64 0, !10, i64 8} !14 = distinct !{!14, !15} !15 = !{!"llvm.loop.mustprogress"} !16 = !{!7, !7, i64 0} !17 = !{!6, !10, i64 8} !18 = distinct !{!18, !15} !19 = !{!13, !10, i64 8} !20 = distinct !{!20, !15} !21 = distinct !{!21, !15} !22 = distinct !{!22, !15}
#include<stdio.h> int main() { int a,b,c,x,y,z; scanf("%d%d%d",&a,&b,&c); if(1<=a && a<=10000 && 1<=b && b<=10000 && 1<=c && c<=10000) { if(a>b && a>c || a==c && a>c){ x=b+c; printf("%d",x); } if(b>a && b>c || a==b && b>c){ y=a+c; printf("%d",y); } if(c>a && c>b || a==b && c>b || a==b && a==c){ z=a+b; printf("%d",z); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170607/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170607/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4 %1 = add i32 %0, -1 %or.cond = icmp ult i32 %1, 10000 %2 = load i32, ptr %b, align 4 %cmp3 = icmp sgt i32 %2, 0 %or.cond45 = select i1 %or.cond, i1 %cmp3, i1 false %cmp5 = icmp slt i32 %2, 10001 %or.cond46 = select i1 %or.cond45, i1 %cmp5, i1 false %3 = load i32, ptr %c, align 4 %cmp7 = icmp sgt i32 %3, 0 %or.cond47 = select i1 %or.cond46, i1 %cmp7, i1 false %cmp9 = icmp slt i32 %3, 10001 %or.cond48 = select i1 %or.cond47, i1 %cmp9, i1 false br i1 %or.cond48, label %if.then, label %if.end44 if.then: ; preds = %entry %cmp10 = icmp ugt i32 %0, %2 %cmp12 = icmp ugt i32 %0, %3 %or.cond55 = select i1 %cmp10, i1 %cmp12, i1 false br i1 %or.cond55, label %if.then16, label %if.end if.then16: ; preds = %if.then %add = add nuw nsw i32 %3, %2 %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) %.pre = load i32, ptr %b, align 4 %.pre64 = load i32, ptr %a, align 4, !tbaa !5 %.pre65 = load i32, ptr %c, align 4 br label %if.end if.end: ; preds = %if.then, %if.then16 %4 = phi i32 [ %3, %if.then ], [ %.pre65, %if.then16 ] %5 = phi i32 [ %0, %if.then ], [ %.pre64, %if.then16 ] %6 = phi i32 [ %2, %if.then ], [ %.pre, %if.then16 ] %cmp20 = icmp sgt i32 %6, %4 %7 = icmp sle i32 %5, %6 %or.cond61 = select i1 %7, i1 %cmp20, i1 false br i1 %or.cond61, label %if.then25, label %if.end28 if.then25: ; preds = %if.end %add26 = add nsw i32 %4, %5 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add26) %.pre66 = load i32, ptr %c, align 4 %.pre67 = load i32, ptr %a, align 4, !tbaa !5 %.pre68 = load i32, ptr %b, align 4 br label %if.end28 if.end28: ; preds = %if.end, %if.then25 %8 = phi i32 [ %6, %if.end ], [ %.pre68, %if.then25 ] %9 = phi i32 [ %5, %if.end ], [ %.pre67, %if.then25 ] %10 = phi i32 [ %4, %if.end ], [ %.pre66, %if.then25 ] %cmp29 = icmp sgt i32 %10, %9 %cmp31 = icmp sgt i32 %10, %8 %or.cond58 = select i1 %cmp29, i1 %cmp31, i1 false br i1 %or.cond58, label %if.then40, label %lor.lhs.false32 lor.lhs.false32: ; preds = %if.end28 %cmp33 = icmp eq i32 %9, %8 %cmp39 = icmp eq i32 %9, %10 %or.cond6063 = or i1 %cmp39, %cmp31 %or.cond62 = and i1 %cmp33, %or.cond6063 br i1 %or.cond62, label %if.then40, label %if.end44 if.then40: ; preds = %lor.lhs.false32, %if.end28 %add41 = add nsw i32 %8, %9 %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add41) br label %if.end44 if.end44: ; preds = %lor.lhs.false32, %if.then40, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); printf("%d",b<=a&&c<=a?b+c:a<=b&&c<=b?a+c:a+b); return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_170650/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_170650/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %cmp.not = icmp sgt i32 %0, %1 br i1 %cmp.not, label %cond.false, label %land.lhs.true land.lhs.true: ; preds = %entry %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp1.not = icmp sgt i32 %2, %1 br i1 %cmp1.not, label %cond.false, label %cond.true cond.true: ; preds = %land.lhs.true %add = add nsw i32 %2, %0 br label %cond.end9 cond.false: ; preds = %land.lhs.true, %entry %cmp2.not = icmp sgt i32 %1, %0 br i1 %cmp2.not, label %cond.false7, label %land.lhs.true3 land.lhs.true3: ; preds = %cond.false %3 = load i32, ptr %c, align 4, !tbaa !5 %cmp4.not = icmp sgt i32 %3, %0 br i1 %cmp4.not, label %cond.false7, label %cond.true5 cond.true5: ; preds = %land.lhs.true3 %add6 = add nsw i32 %3, %1 br label %cond.end9 cond.false7: ; preds = %land.lhs.true3, %cond.false %add8 = add nsw i32 %1, %0 br label %cond.end9 cond.end9: ; preds = %cond.true5, %cond.false7, %cond.true %cond10 = phi i32 [ %add, %cond.true ], [ %add6, %cond.true5 ], [ %add8, %cond.false7 ] %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %cond10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}