Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include <stdio.h> int main(void){ char s[1000]; int i,w; scanf("%s",s); scanf("%d",&w); i=0; while(1){ if(i%w==0) printf("%c",s[i]); i++; if(s[i]=='\0') break; } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270219/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270219/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 [1000 x i8], align 16 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %s) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %w) br label %while.cond while.cond: ; preds = %if.end, %entry %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 0, %entry ] %0 = load i32, ptr %w, align 4, !tbaa !5 %1 = trunc i64 %indvars.iv to i32 %rem = srem i32 %1, %0 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %while.cond %arrayidx = getelementptr inbounds [1000 x i8], ptr %s, i64 0, i64 %indvars.iv %2 = load i8, ptr %arrayidx, align 1, !tbaa !9 %conv = sext i8 %2 to i32 %putchar = call i32 @putchar(i32 %conv) br label %if.end if.end: ; preds = %if.then, %while.cond %indvars.iv.next = add nuw i64 %indvars.iv, 1 %arrayidx4 = getelementptr inbounds [1000 x i8], ptr %s, i64 0, i64 %indvars.iv.next %3 = load i8, ptr %arrayidx4, align 1, !tbaa !9 %cmp6 = icmp eq i8 %3, 0 br i1 %cmp6, label %while.end, label %while.cond while.end: ; preds = %if.end call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 1000, 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 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 = !{!7, !7, i64 0}
#include<stdio.h> int main() { int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n); if(n%4==0) printf("Yes\n"); else printf("No\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27027/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27027/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %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, %while.body 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 %2 = and i32 %1, 3 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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 !9 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) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int n, m, x, y, ans, i; int l[100001]; char is[100001]; int main(){ scanf("%d%d", &n, &m); l[1]=1; is[1]=1; for(i=2; i<=n; i++){ l[i]=1; } for(i=0; i<m; i++){ scanf("%d%d", &x, &y); l[x]--; l[y]++; if(is[x]){ is[y]=1; } if(l[x]==0){ is[x]=0; } } for(i=1; i<=n; i++){ ans+=is[i]; } printf("%d\n", ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270312/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270312/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @n = dso_local global i32 0, align 4 @m = dso_local global i32 0, align 4 @l = dso_local local_unnamed_addr global [100001 x i32] zeroinitializer, align 16 @is = dso_local local_unnamed_addr global [100001 x i8] zeroinitializer, align 16 @i = dso_local local_unnamed_addr global i32 0, align 4 @x = dso_local global i32 0, align 4 @y = dso_local global i32 0, align 4 @ans = dso_local local_unnamed_addr global i32 0, align 4 @.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: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @m) store i32 1, ptr getelementptr inbounds ([100001 x i32], ptr @l, i64 0, i64 1), align 4, !tbaa !5 store i8 1, ptr getelementptr inbounds ([100001 x i8], ptr @is, i64 0, i64 1), align 1, !tbaa !9 %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp.not36 = icmp slt i32 %0, 2 br i1 %cmp.not36, label %for.cond1.preheader, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = add nuw i32 %0, 1 %wide.trip.count = zext i32 %1 to i64 %2 = add nsw i64 %wide.trip.count, -2 %min.iters.check = icmp ult i64 %2, 8 br i1 %min.iters.check, label %for.body.preheader68, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %2, -8 %ind.end = or i64 %n.vec, 2 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %offset.idx = or i64 %index, 2 %3 = getelementptr inbounds [100001 x i32], ptr @l, i64 0, i64 %offset.idx store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %3, align 8, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %4, align 8, !tbaa !5 %index.next = add nuw i64 %index, 8 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %2, %n.vec br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader68 for.body.preheader68: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 2, %for.body.preheader ], [ %ind.end, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block, %entry store i32 0, ptr @i, align 4, !tbaa !5 %6 = load i32, ptr @m, align 4, !tbaa !5 %cmp238 = icmp sgt i32 %6, 0 br i1 %cmp238, label %for.body3, label %for.cond24.preheader for.body: ; preds = %for.body.preheader68, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader68 ] %arrayidx = getelementptr inbounds [100001 x i32], ptr @l, 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.cond1.preheader, label %for.body, !llvm.loop !14 for.cond24.preheader.loopexit: ; preds = %for.inc21 %.pre = load i32, ptr @n, align 4, !tbaa !5 br label %for.cond24.preheader for.cond24.preheader: ; preds = %for.cond24.preheader.loopexit, %for.cond1.preheader %7 = phi i32 [ %.pre, %for.cond24.preheader.loopexit ], [ %0, %for.cond1.preheader ] %ans.promoted = load i32, ptr @ans, align 4, !tbaa !5 %cmp25.not40 = icmp slt i32 %7, 1 br i1 %cmp25.not40, label %for.end31, label %for.body26.preheader for.body26.preheader: ; preds = %for.cond24.preheader %8 = add nuw i32 %7, 1 %wide.trip.count48 = zext i32 %8 to i64 %9 = add nsw i64 %wide.trip.count48, -1 %min.iters.check52 = icmp ult i32 %7, 8 br i1 %min.iters.check52, label %for.body26.preheader65, label %vector.ph53 vector.ph53: ; preds = %for.body26.preheader %n.vec55 = and i64 %9, -8 %ind.end56 = or i64 %n.vec55, 1 %10 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %ans.promoted, i64 0 br label %vector.body59 vector.body59: ; preds = %vector.body59, %vector.ph53 %index60 = phi i64 [ 0, %vector.ph53 ], [ %index.next64, %vector.body59 ] %vec.phi = phi <4 x i32> [ %10, %vector.ph53 ], [ %15, %vector.body59 ] %vec.phi61 = phi <4 x i32> [ zeroinitializer, %vector.ph53 ], [ %16, %vector.body59 ] %offset.idx62 = or i64 %index60, 1 %11 = getelementptr inbounds [100001 x i8], ptr @is, i64 0, i64 %offset.idx62 %wide.load = load <4 x i8>, ptr %11, align 1, !tbaa !9 %12 = getelementptr inbounds i8, ptr %11, i64 4 %wide.load63 = load <4 x i8>, ptr %12, align 1, !tbaa !9 %13 = sext <4 x i8> %wide.load to <4 x i32> %14 = sext <4 x i8> %wide.load63 to <4 x i32> %15 = add <4 x i32> %vec.phi, %13 %16 = add <4 x i32> %vec.phi61, %14 %index.next64 = add nuw i64 %index60, 8 %17 = icmp eq i64 %index.next64, %n.vec55 br i1 %17, label %middle.block50, label %vector.body59, !llvm.loop !15 middle.block50: ; preds = %vector.body59 %bin.rdx = add <4 x i32> %16, %15 %18 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n58 = icmp eq i64 %9, %n.vec55 br i1 %cmp.n58, label %for.cond24.for.end31_crit_edge, label %for.body26.preheader65 for.body26.preheader65: ; preds = %for.body26.preheader, %middle.block50 %indvars.iv45.ph = phi i64 [ 1, %for.body26.preheader ], [ %ind.end56, %middle.block50 ] %add3941.ph = phi i32 [ %ans.promoted, %for.body26.preheader ], [ %18, %middle.block50 ] br label %for.body26 for.body3: ; preds = %for.cond1.preheader, %for.inc21 %call4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @x, ptr noundef nonnull @y) %19 = load i32, ptr @x, align 4, !tbaa !5 %idxprom5 = sext i32 %19 to i64 %arrayidx6 = getelementptr inbounds [100001 x i32], ptr @l, i64 0, i64 %idxprom5 %20 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %dec = add nsw i32 %20, -1 store i32 %dec, ptr %arrayidx6, align 4, !tbaa !5 %21 = load i32, ptr @y, align 4, !tbaa !5 %idxprom7 = sext i32 %21 to i64 %arrayidx8 = getelementptr inbounds [100001 x i32], ptr @l, i64 0, i64 %idxprom7 %22 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %inc9 = add nsw i32 %22, 1 store i32 %inc9, ptr %arrayidx8, align 4, !tbaa !5 %arrayidx11 = getelementptr inbounds [100001 x i8], ptr @is, i64 0, i64 %idxprom5 %23 = load i8, ptr %arrayidx11, align 1, !tbaa !9 %tobool.not = icmp eq i8 %23, 0 br i1 %tobool.not, label %if.end, label %if.then if.then: ; preds = %for.body3 %arrayidx13 = getelementptr inbounds [100001 x i8], ptr @is, i64 0, i64 %idxprom7 store i8 1, ptr %arrayidx13, align 1, !tbaa !9 br label %if.end if.end: ; preds = %if.then, %for.body3 %24 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %cmp16 = icmp eq i32 %24, 0 br i1 %cmp16, label %if.then17, label %for.inc21 if.then17: ; preds = %if.end store i8 0, ptr %arrayidx11, align 1, !tbaa !9 br label %for.inc21 for.inc21: ; preds = %if.end, %if.then17 %25 = load i32, ptr @i, align 4, !tbaa !5 %inc22 = add nsw i32 %25, 1 store i32 %inc22, ptr @i, align 4, !tbaa !5 %26 = load i32, ptr @m, align 4, !tbaa !5 %cmp2 = icmp slt i32 %inc22, %26 br i1 %cmp2, label %for.body3, label %for.cond24.preheader.loopexit, !llvm.loop !16 for.body26: ; preds = %for.body26.preheader65, %for.body26 %indvars.iv45 = phi i64 [ %indvars.iv.next46, %for.body26 ], [ %indvars.iv45.ph, %for.body26.preheader65 ] %add3941 = phi i32 [ %add, %for.body26 ], [ %add3941.ph, %for.body26.preheader65 ] %arrayidx28 = getelementptr inbounds [100001 x i8], ptr @is, i64 0, i64 %indvars.iv45 %27 = load i8, ptr %arrayidx28, align 1, !tbaa !9 %conv = sext i8 %27 to i32 %add = add nsw i32 %add3941, %conv %indvars.iv.next46 = add nuw nsw i64 %indvars.iv45, 1 %exitcond49.not = icmp eq i64 %indvars.iv.next46, %wide.trip.count48 br i1 %exitcond49.not, label %for.cond24.for.end31_crit_edge, label %for.body26, !llvm.loop !17 for.cond24.for.end31_crit_edge: ; preds = %for.body26, %middle.block50 %add.lcssa = phi i32 [ %18, %middle.block50 ], [ %add, %for.body26 ] %28 = add i32 %7, 1 store i32 %add.lcssa, ptr @ans, align 4, !tbaa !5 br label %for.end31 for.end31: ; preds = %for.cond24.for.end31_crit_edge, %for.cond24.preheader %29 = phi i32 [ %add.lcssa, %for.cond24.for.end31_crit_edge ], [ %ans.promoted, %for.cond24.preheader ] %storemerge35.lcssa = phi i32 [ %28, %for.cond24.for.end31_crit_edge ], [ 1, %for.cond24.preheader ] store i32 %storemerge35.lcssa, ptr @i, align 4, !tbaa !5 %call32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %29) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11, !12, !13} !16 = distinct !{!16, !11} !17 = distinct !{!17, !11, !13, !12}
#include <stdio.h> int main(void){ long int n,m; scanf("%ld %ld",&n,&m); int a[m]; int hw=0; int i; for(i=0;i<m;i++){ scanf("%d",&a[i]); } long int s=0; for(i=0;i<m;i++){ s=s+a[i]; } if(n-s<0){ printf("-1"); return 0; } printf("%d",n-s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270356/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270356/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [8 x i8] c"%ld %ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\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) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %m) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i64, ptr %m, align 8, !tbaa !5 %1 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %0, align 16 %2 = load i64, ptr %m, align 8, !tbaa !5 %cmp31 = icmp sgt i64 %2, 0 br i1 %cmp31, label %for.body, label %for.end13 for.cond3.preheader: ; preds = %for.body %cmp534 = icmp sgt i64 %11, 0 br i1 %cmp534, label %for.body7.preheader, label %for.end13 for.body7.preheader: ; preds = %for.cond3.preheader %min.iters.check = icmp ult i64 %11, 4 br i1 %min.iters.check, label %for.body7.preheader48, label %vector.ph vector.ph: ; preds = %for.body7.preheader %n.vec = and i64 %11, -4 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ] %vec.phi46 = phi <2 x i64> [ zeroinitializer, %vector.ph ], [ %8, %vector.body ] %3 = getelementptr inbounds i32, ptr %vla, i64 %index %wide.load = load <2 x i32>, ptr %3, align 16, !tbaa !9 %4 = getelementptr inbounds i32, ptr %3, i64 2 %wide.load47 = load <2 x i32>, ptr %4, align 8, !tbaa !9 %5 = sext <2 x i32> %wide.load to <2 x i64> %6 = sext <2 x i32> %wide.load47 to <2 x i64> %7 = add <2 x i64> %vec.phi, %5 %8 = add <2 x i64> %vec.phi46, %6 %index.next = add nuw i64 %index, 4 %9 = icmp eq i64 %index.next, %n.vec br i1 %9, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %bin.rdx = add <2 x i64> %8, %7 %10 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %bin.rdx) %cmp.n = icmp eq i64 %11, %n.vec br i1 %cmp.n, label %for.end13, label %for.body7.preheader48 for.body7.preheader48: ; preds = %for.body7.preheader, %middle.block %indvars.iv41.ph = phi i64 [ 0, %for.body7.preheader ], [ %n.vec, %middle.block ] %s.036.ph = phi i64 [ 0, %for.body7.preheader ], [ %10, %middle.block ] br label %for.body7 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = load i64, ptr %m, align 8, !tbaa !5 %cmp = icmp sgt i64 %11, %indvars.iv.next br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !15 for.body7: ; preds = %for.body7.preheader48, %for.body7 %indvars.iv41 = phi i64 [ %indvars.iv.next42, %for.body7 ], [ %indvars.iv41.ph, %for.body7.preheader48 ] %s.036 = phi i64 [ %add, %for.body7 ], [ %s.036.ph, %for.body7.preheader48 ] %arrayidx9 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv41 %12 = load i32, ptr %arrayidx9, align 4, !tbaa !9 %conv10 = sext i32 %12 to i64 %add = add nsw i64 %s.036, %conv10 %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1 %exitcond.not = icmp eq i64 %indvars.iv.next42, %11 br i1 %exitcond.not, label %for.end13, label %for.body7, !llvm.loop !16 for.end13: ; preds = %for.body7, %middle.block, %entry, %for.cond3.preheader %s.0.lcssa = phi i64 [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %10, %middle.block ], [ %add, %for.body7 ] %13 = load i64, ptr %n, align 8, !tbaa !5 %sub = sub nsw i64 %13, %s.0.lcssa %cmp14 = icmp slt i64 %sub, 0 br i1 %cmp14, label %if.then, label %if.end if.then: ; preds = %for.end13 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %cleanup if.end: ; preds = %for.end13 %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %sub) br label %cleanup cleanup: ; preds = %if.end, %if.then call void @llvm.stackrestore.p0(ptr %1) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.vector.reduce.add.v2i64(<2 x i64>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12, !13, !14} !12 = !{!"llvm.loop.mustprogress"} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !12} !16 = distinct !{!16, !12, !14, !13}
#include<stdio.h> int main() { int a[100000],b[100000]; int d[100000],e[100000]; int n,c; int i,j,l; scanf("%d%d",&n,&c); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++) scanf("%d",&b[i]); long long int c1=0; long long int c2=0; long long int k1=0; long long int k2=0; long long int k,m; for(i=0;i<n;i++) { k1=k1+b[i]; k=a[i]-c*k1; if(k<=0) k=0; //printf("%d k1",k1); c1+=k; k2+=b[n-i-1]; m=a[n-i-1]-c*k2; if(m<=0) m=0; c2+=m; } if(c1>c2) { printf("Limak\n"); } else if(c2>c1) { printf("Radewoosh\n"); } else { printf("Tie"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2704/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2704/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"Tie\00", align 1 @str = private unnamed_addr constant [10 x i8] c"Radewoosh\00", align 1 @str.5 = private unnamed_addr constant [6 x i8] c"Limak\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [100000 x i32], align 16 %b = alloca [100000 x i32], align 16 %n = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %a) #5 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %b) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %c) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp78 = icmp sgt i32 %0, 0 br i1 %cmp78, label %for.body, label %if.else53 for.cond2.preheader: ; preds = %for.body %cmp380 = icmp sgt i32 %1, 0 br i1 %cmp380, label %for.body4, label %if.else53 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond11.preheader: ; preds = %for.body4 %cmp1282 = icmp sgt i32 %4, 0 br i1 %cmp1282, label %for.body13.lr.ph, label %if.else53 for.body13.lr.ph: ; preds = %for.cond11.preheader %3 = load i32, ptr %c, align 4, !tbaa !5 %conv19 = sext i32 %3 to i64 %wide.trip.count = zext i32 %4 to i64 br label %for.body13 for.body4: ; preds = %for.cond2.preheader, %for.body4 %indvars.iv92 = phi i64 [ %indvars.iv.next93, %for.body4 ], [ 0, %for.cond2.preheader ] %arrayidx6 = getelementptr inbounds [100000 x i32], ptr %b, i64 0, i64 %indvars.iv92 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx6) %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp3 = icmp slt i64 %indvars.iv.next93, %5 br i1 %cmp3, label %for.body4, label %for.cond11.preheader, !llvm.loop !11 for.body13: ; preds = %for.body13.lr.ph, %for.body13 %indvars.iv95 = phi i64 [ 0, %for.body13.lr.ph ], [ %indvars.iv.next96, %for.body13 ] %c1.086 = phi i64 [ 0, %for.body13.lr.ph ], [ %add22, %for.body13 ] %k2.085 = phi i64 [ 0, %for.body13.lr.ph ], [ %add28, %for.body13 ] %k1.084 = phi i64 [ 0, %for.body13.lr.ph ], [ %add, %for.body13 ] %c2.083 = phi i64 [ 0, %for.body13.lr.ph ], [ %add41, %for.body13 ] %arrayidx15 = getelementptr inbounds [100000 x i32], ptr %b, i64 0, i64 %indvars.iv95 %6 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %conv = sext i32 %6 to i64 %add = add nsw i64 %k1.084, %conv %arrayidx17 = getelementptr inbounds [100000 x i32], ptr %a, i64 0, i64 %indvars.iv95 %7 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %conv18 = sext i32 %7 to i64 %mul = mul nsw i64 %add, %conv19 %sub = sub nsw i64 %conv18, %mul %spec.store.select = call i64 @llvm.smax.i64(i64 %sub, i64 0) %add22 = add nuw nsw i64 %spec.store.select, %c1.086 %8 = trunc i64 %indvars.iv95 to i32 %9 = xor i32 %8, -1 %sub24 = add i32 %4, %9 %idxprom25 = sext i32 %sub24 to i64 %arrayidx26 = getelementptr inbounds [100000 x i32], ptr %b, i64 0, i64 %idxprom25 %10 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %conv27 = sext i32 %10 to i64 %add28 = add nsw i64 %k2.085, %conv27 %arrayidx32 = getelementptr inbounds [100000 x i32], ptr %a, i64 0, i64 %idxprom25 %11 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %conv33 = sext i32 %11 to i64 %mul35 = mul nsw i64 %add28, %conv19 %sub36 = sub nsw i64 %conv33, %mul35 %spec.store.select57 = call i64 @llvm.smax.i64(i64 %sub36, i64 0) %add41 = add nuw nsw i64 %spec.store.select57, %c2.083 %indvars.iv.next96 = add nuw nsw i64 %indvars.iv95, 1 %exitcond.not = icmp eq i64 %indvars.iv.next96, %wide.trip.count br i1 %exitcond.not, label %for.end44, label %for.body13, !llvm.loop !12 for.end44: ; preds = %for.body13 %cmp45 = icmp ugt i64 %add22, %add41 br i1 %cmp45, label %if.then47, label %if.else if.then47: ; preds = %for.end44 %puts77 = call i32 @puts(ptr nonnull dereferenceable(1) @str.5) br label %if.end56 if.else: ; preds = %for.end44 %cmp49 = icmp ugt i64 %add41, %add22 br i1 %cmp49, label %if.then51, label %if.else53 if.then51: ; preds = %if.else %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end56 if.else53: ; preds = %for.cond11.preheader, %for.cond2.preheader, %entry, %if.else %call54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4) br label %if.end56 if.end56: ; preds = %if.then51, %if.else53, %if.then47 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %a) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include<stdio.h> int main() { int N, M, A, d, sum=0, i; scanf("%d %d", &N, &M); for(i=1; i<=M; i++) { scanf("%d", &A); sum=sum+A; } d=N-sum; if(d<0) { printf("-1\n"); } else { printf("%d\n", d); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270442/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270442/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\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 %A = 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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #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 %cmp.not8 = icmp slt i32 %0, 1 br i1 %cmp.not8, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %i.010 = phi i32 [ %inc, %for.body ], [ 1, %entry ] %sum.09 = phi i32 [ %add, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %A) %1 = load i32, ptr %A, align 4, !tbaa !5 %add = add nsw i32 %1, %sum.09 %inc = add nuw nsw i32 %i.010, 1 %2 = load i32, ptr %M, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %i.010, %2 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %3 = load i32, ptr %N, align 4, !tbaa !5 %sub = sub nsw i32 %3, %sum.0.lcssa %cmp2 = icmp slt i32 %sub, 0 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.else: ; preds = %for.end %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %sub) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int n,m,sum=0; scanf("%d%d",&n,&m); int a[m]; for(int i=0;i<m;i++) scanf("%d",&a[i]); for(int i=0;i<m;i++) sum+=a[i]; if(n-sum>=0) printf("%d",n-sum); else printf("%d",-1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270486/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270486/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp22 = icmp sgt i32 %3, 0 br i1 %cmp22, label %for.body, label %for.cond.cleanup5 for.cond3.preheader: ; preds = %for.body %cmp424 = icmp sgt i32 %10, 0 br i1 %cmp424, label %for.body6.preheader, label %for.cond.cleanup5 for.body6.preheader: ; preds = %for.cond3.preheader %wide.trip.count = zext i32 %10 to i64 %min.iters.check = icmp ult i32 %10, 8 br i1 %min.iters.check, label %for.body6.preheader37, label %vector.ph vector.ph: ; preds = %for.body6.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %6, %vector.body ] %vec.phi35 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %7, %vector.body ] %4 = getelementptr inbounds i32, ptr %vla, i64 %index %wide.load = load <4 x i32>, ptr %4, align 16, !tbaa !5 %5 = getelementptr inbounds i32, ptr %4, i64 4 %wide.load36 = load <4 x i32>, ptr %5, align 16, !tbaa !5 %6 = add <4 x i32> %wide.load, %vec.phi %7 = add <4 x i32> %wide.load36, %vec.phi35 %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 !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %7, %6 %9 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup5, label %for.body6.preheader37 for.body6.preheader37: ; preds = %for.body6.preheader, %middle.block %indvars.iv30.ph = phi i64 [ 0, %for.body6.preheader ], [ %n.vec, %middle.block ] %sum.025.ph = phi i32 [ 0, %for.body6.preheader ], [ %9, %middle.block ] br label %for.body6 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %m, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !13 for.cond.cleanup5: ; preds = %for.body6, %middle.block, %entry, %for.cond3.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %9, %middle.block ], [ %add, %for.body6 ] %12 = load i32, ptr %n, align 4, !tbaa !5 %sub = sub nsw i32 %12, %sum.0.lcssa %sub. = call i32 @llvm.smax.i32(i32 %sub, i32 -1) %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub.) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 for.body6: ; preds = %for.body6.preheader37, %for.body6 %indvars.iv30 = phi i64 [ %indvars.iv.next31, %for.body6 ], [ %indvars.iv30.ph, %for.body6.preheader37 ] %sum.025 = phi i32 [ %add, %for.body6 ], [ %sum.025.ph, %for.body6.preheader37 ] %arrayidx8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv30 %13 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %add = add nsw i32 %13, %sum.025 %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1 %exitcond.not = icmp eq i64 %indvars.iv.next31, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup5, label %for.body6, !llvm.loop !14 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
#include<stdio.h> int main(void) { int n,m; scanf("%d %d",&n,&m); int A[m]; for(int i=0;i<m;i++){ scanf("%d",&A[i]); } for(int i=0;i<m;i++){ n=n-A[i]; if(n<0) { printf("-1\n"); break; } else if(n==0&&i==m-1){ printf("0\n"); break; } else if(i==m-1) printf("%d\n",n); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270529/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270529/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.4 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [2 x i8] c"0\00", align 1 @str.5 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp36 = icmp sgt i32 %3, 0 br i1 %cmp36, label %for.body, label %cleanup for.cond3.preheader: ; preds = %for.body %cmp438 = icmp sgt i32 %4, 0 br i1 %cmp438, label %for.body6, label %cleanup for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %m, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.body6: ; preds = %for.cond3.preheader, %for.inc23 %6 = phi i32 [ %10, %for.inc23 ], [ %4, %for.cond3.preheader ] %indvars.iv41 = phi i64 [ %indvars.iv.next42, %for.inc23 ], [ 0, %for.cond3.preheader ] %7 = load i32, ptr %n, align 4, !tbaa !5 %arrayidx8 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv41 %8 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %sub = sub nsw i32 %7, %8 store i32 %sub, ptr %n, align 4, !tbaa !5 %cmp9 = icmp slt i32 %sub, 0 br i1 %cmp9, label %cleanup.sink.split, label %if.else if.else: ; preds = %for.body6 %cmp11 = icmp eq i32 %7, %8 %sub12 = add nsw i32 %6, -1 %9 = zext i32 %sub12 to i64 %cmp13 = icmp eq i64 %indvars.iv41, %9 %or.cond = select i1 %cmp11, i1 %cmp13, i1 false br i1 %or.cond, label %cleanup.sink.split, label %if.else16 if.else16: ; preds = %if.else br i1 %cmp13, label %if.then19, label %for.inc23 if.then19: ; preds = %if.else16 %call20 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %sub) %.pre = load i32, ptr %m, align 4, !tbaa !5 br label %for.inc23 for.inc23: ; preds = %if.else16, %if.then19 %10 = phi i32 [ %6, %if.else16 ], [ %.pre, %if.then19 ] %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1 %11 = sext i32 %10 to i64 %cmp4 = icmp slt i64 %indvars.iv.next42, %11 br i1 %cmp4, label %for.body6, label %cleanup, !llvm.loop !11 cleanup.sink.split: ; preds = %if.else, %for.body6 %str.sink = phi ptr [ @str.5, %for.body6 ], [ @str, %if.else ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) br label %cleanup cleanup: ; preds = %for.inc23, %cleanup.sink.split, %entry, %for.cond3.preheader call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: 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}
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> #include <stdbool.h> #define M_PI 3.14159265358979323846 int main() { int n, m, i, total = 0; int a[10001]; scanf("%d", &n); scanf("%d", &m); for (i = 0; i < m; i++) { scanf("%d", &a[i]); total += a[i]; } printf("%d\n", (n - total >= 0) ? (n - total) : (-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270572/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270572/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %m = alloca i32, align 4 %a = alloca [10001 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 40004, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %m) %0 = load i32, ptr %m, align 4, !tbaa !5 %cmp13 = icmp sgt i32 %0, 0 br i1 %cmp13, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %total.015 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [10001 x i32], ptr %a, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %1, %total.015 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %m, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %total.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %4 = load i32, ptr %n, align 4 %sub = sub nsw i32 %4, %total.0.lcssa %cond = call i32 @llvm.smax.i32(i32 %sub, i32 -1) %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %cond) call void @llvm.lifetime.end.p0(i64 40004, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind 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 main() { long long int n, m, x, sum=0,i; scanf("%lli %lli", &n, &m); for(i=0;i<m;i++) { scanf("%lli", &x) ; sum+=x; } if(sum<=n) printf("%lli\n", n-sum) ; else printf("-1\n") ; return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270615/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270615/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lli %lli\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lli\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%lli\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\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 %x = 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 void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i64, ptr %m, align 8, !tbaa !5 %cmp8 = icmp sgt i64 %0, 0 br i1 %cmp8, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.010 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %sum.09 = phi i64 [ %add, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %x) %1 = load i64, ptr %x, align 8, !tbaa !5 %add = add nsw i64 %1, %sum.09 %inc = add nuw nsw i64 %i.010, 1 %2 = load i64, ptr %m, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %sum.0.lcssa = phi i64 [ 0, %entry ], [ %add, %for.body ] %3 = load i64, ptr %n, align 8, !tbaa !5 %cmp2.not = icmp sgt i64 %sum.0.lcssa, %3 br i1 %cmp2.not, label %if.else, label %if.then if.then: ; preds = %for.end %sub = sub nsw i64 %3, %sum.0.lcssa %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %sub) br label %if.end if.else: ; preds = %for.end %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 8, ptr nonnull %x) #4 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: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int i; int n; int m; int a; scanf("%d%d",&n, &m); for(i = 0; i < m; i++){ scanf("%d", &a); n -= a; } if (n < 0) printf("-1\n"); else printf("%d\n",n); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270659/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270659/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\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 %a = 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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #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 %cmp6 = icmp sgt i32 %0, 0 br i1 %cmp6, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.end for.body: ; preds = %entry, %for.body %i.07 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %1 = load i32, ptr %a, align 4, !tbaa !5 %2 = load i32, ptr %n, align 4, !tbaa !5 %sub = sub nsw i32 %2, %1 store i32 %sub, ptr %n, align 4, !tbaa !5 %inc = add nuw nsw i32 %i.07, 1 %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry.for.end_crit_edge %4 = phi i32 [ %.pre, %entry.for.end_crit_edge ], [ %sub, %for.body ] %cmp2 = icmp slt i32 %4, 0 br i1 %cmp2, label %if.then, label %if.else if.then: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.else: ; preds = %for.end %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %4) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int cnt,all=0; int N,M; scanf("%d %d",&N,&M); int A[M]; for(cnt=0;cnt<M;cnt++){ scanf("%d",&A[cnt]); all+=A[cnt]; } if(N<all){ printf("-1\n"); return 0; } printf("%d\n",N-all); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270701/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270701/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) %0 = load i32, ptr %M, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %M, align 4, !tbaa !5 %cmp16 = icmp sgt i32 %3, 0 br i1 %cmp16, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %all.017 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %4, %all.017 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %M, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %all.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %7 = load i32, ptr %N, align 4, !tbaa !5 %cmp4 = icmp slt i32 %7, %all.0.lcssa br i1 %cmp4, label %if.then, label %if.end if.then: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %cleanup if.end: ; preds = %for.end %sub = sub nsw i32 %7, %all.0.lcssa %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %sub) br label %cleanup cleanup: ; preds = %if.end, %if.then call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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"}
#include<stdio.h> int main(){ int N,M; scanf("%d %d\n",&N,&M); int A[10000]; int i; for(i = 0 ; i < 10000 ; i++){ scanf("%d",&A[i]); } int sum; for(i = 0 ; i < M ; i++){ sum = sum + A[i]; } if(N-sum >= 0){ printf("%d\n",N - sum); }else{ printf("-1\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270745/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270745/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\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 %A = alloca [10000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %M) call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %A) #5 br label %for.body for.cond2.preheader: ; preds = %for.body %0 = load i32, ptr %M, align 4, !tbaa !5 %cmp322 = icmp sgt i32 %0, 0 br i1 %cmp322, label %for.body4.preheader, label %for.end9 for.body4.preheader: ; preds = %for.cond2.preheader %wide.trip.count = zext i32 %0 to i64 %min.iters.check = icmp ult i32 %0, 8 br i1 %min.iters.check, label %for.body4.preheader32, label %vector.ph vector.ph: ; preds = %for.body4.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ <i32 undef, i32 0, i32 0, i32 0>, %vector.ph ], [ %3, %vector.body ] %vec.phi30 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %4, %vector.body ] %1 = getelementptr inbounds [10000 x i32], ptr %A, i64 0, i64 %index %wide.load = load <4 x i32>, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 %wide.load31 = load <4 x i32>, ptr %2, align 16, !tbaa !5 %3 = add <4 x i32> %wide.load, %vec.phi %4 = add <4 x i32> %wide.load31, %vec.phi30 %index.next = add nuw i64 %index, 8 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %4, %3 %6 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end9, label %for.body4.preheader32 for.body4.preheader32: ; preds = %for.body4.preheader, %middle.block %indvars.iv26.ph = phi i64 [ 0, %for.body4.preheader ], [ %n.vec, %middle.block ] %sum.024.ph = phi i32 [ undef, %for.body4.preheader ], [ %6, %middle.block ] br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ] %arrayidx = getelementptr inbounds [10000 x i32], ptr %A, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 10000 br i1 %exitcond.not, label %for.cond2.preheader, label %for.body, !llvm.loop !13 for.body4: ; preds = %for.body4.preheader32, %for.body4 %indvars.iv26 = phi i64 [ %indvars.iv.next27, %for.body4 ], [ %indvars.iv26.ph, %for.body4.preheader32 ] %sum.024 = phi i32 [ %add, %for.body4 ], [ %sum.024.ph, %for.body4.preheader32 ] %arrayidx6 = getelementptr inbounds [10000 x i32], ptr %A, i64 0, i64 %indvars.iv26 %7 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %add = add nsw i32 %7, %sum.024 %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1 %exitcond29.not = icmp eq i64 %indvars.iv.next27, %wide.trip.count br i1 %exitcond29.not, label %for.end9, label %for.body4, !llvm.loop !14 for.end9: ; preds = %for.body4, %middle.block, %for.cond2.preheader %sum.0.lcssa = phi i32 [ undef, %for.cond2.preheader ], [ %6, %middle.block ], [ %add, %for.body4 ] %8 = load i32, ptr %N, align 4, !tbaa !5 %sub = sub nsw i32 %8, %sum.0.lcssa %cmp10 = icmp sgt i32 %sub, -1 br i1 %cmp10, label %if.then, label %if.else if.then: ; preds = %for.end9 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) br label %if.end if.else: ; preds = %for.end9 %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 40000, ptr nonnull %A) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11}
#include<stdio.h> int main() { int M,N,i,sum=0,temp; scanf("%d %d",&M,&N); int A[N]; for(i=0;i<N;i++){ scanf("%d",&A[i]); sum=sum+A[i]; } temp=M-sum; if(temp>=0){ printf("%d\n",temp); } else{ printf("-1\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270789/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270789/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %M = alloca i32, align 4 %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #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 %M, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %3, 0 br i1 %cmp12, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.013 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %4, %sum.013 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %N, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %7 = load i32, ptr %M, align 4, !tbaa !5 %sub = sub nsw i32 %7, %sum.0.lcssa %cmp4 = icmp sgt i32 %sub, -1 br i1 %cmp4, label %if.then, label %if.else if.then: ; preds = %for.end %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub) br label %if.end if.else: ; preds = %for.end %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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"}
#include <stdio.h> #include <stdlib.h> int main() { int N, M; int *A; int Re, sum=0; A=(int*)malloc(sizeof(int)*M); scanf("%d %d", &N, &M); for (int i=0;i<M;i++) scanf(" %d", &A[i]); for (int i=0;i<M;i++) sum +=A[i]; Re = N - sum; if (Re >= 0) printf("%d\n", Re); else printf("%d\n", -1); fflush(stdout); free(A); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270831/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270831/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c" %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %M) #6 %call = tail call noalias ptr @malloc(i64 noundef 0) #7 %call1 = 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 %cmp28 = icmp sgt i32 %0, 0 br i1 %cmp28, label %for.body, label %for.cond.cleanup8 for.cond5.preheader: ; preds = %for.body %cmp630 = icmp sgt i32 %7, 0 br i1 %cmp630, label %for.body9.preheader, label %for.cond.cleanup8 for.body9.preheader: ; preds = %for.cond5.preheader %wide.trip.count = zext i32 %7 to i64 %min.iters.check = icmp ult i32 %7, 8 br i1 %min.iters.check, label %for.body9.preheader43, label %vector.ph vector.ph: ; preds = %for.body9.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %3, %vector.body ] %vec.phi41 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %4, %vector.body ] %1 = getelementptr inbounds i32, ptr %call, i64 %index %wide.load = load <4 x i32>, ptr %1, align 4, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 %wide.load42 = load <4 x i32>, ptr %2, align 4, !tbaa !5 %3 = add <4 x i32> %wide.load, %vec.phi %4 = add <4 x i32> %wide.load42, %vec.phi41 %index.next = add nuw i64 %index, 8 %5 = icmp eq i64 %index.next, %n.vec br i1 %5, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %4, %3 %6 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup8, label %for.body9.preheader43 for.body9.preheader43: ; preds = %for.body9.preheader, %middle.block %indvars.iv36.ph = phi i64 [ 0, %for.body9.preheader ], [ %n.vec, %middle.block ] %sum.031.ph = phi i32 [ 0, %for.body9.preheader ], [ %6, %middle.block ] br label %for.body9 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %call, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %7 = load i32, ptr %M, align 4, !tbaa !5 %8 = sext i32 %7 to i64 %cmp = icmp slt i64 %indvars.iv.next, %8 br i1 %cmp, label %for.body, label %for.cond5.preheader, !llvm.loop !13 for.cond.cleanup8: ; preds = %for.body9, %middle.block, %entry, %for.cond5.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond5.preheader ], [ 0, %entry ], [ %6, %middle.block ], [ %add, %for.body9 ] %9 = load i32, ptr %N, align 4, !tbaa !5 %sub = sub nsw i32 %9, %sum.0.lcssa %sub. = call i32 @llvm.smax.i32(i32 %sub, i32 -1) %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %sub.) %10 = load ptr, ptr @stdout, align 8, !tbaa !14 %call19 = call i32 @fflush(ptr noundef %10) call void @free(ptr noundef %call) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #6 ret i32 0 for.body9: ; preds = %for.body9.preheader43, %for.body9 %indvars.iv36 = phi i64 [ %indvars.iv.next37, %for.body9 ], [ %indvars.iv36.ph, %for.body9.preheader43 ] %sum.031 = phi i32 [ %add, %for.body9 ], [ %sum.031.ph, %for.body9.preheader43 ] %arrayidx11 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv36 %11 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %add = add nsw i32 %11, %sum.031 %indvars.iv.next37 = add nuw nsw i64 %indvars.iv36, 1 %exitcond.not = icmp eq i64 %indvars.iv.next37, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup8, label %for.body9, !llvm.loop !16 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: 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 @fflush(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } attributes #7 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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 = !{!15, !15, i64 0} !15 = !{!"any pointer", !7, i64 0} !16 = distinct !{!16, !10, !12, !11}
#include<stdio.h> int main(){ int N,M; scanf("%d %d",&N,&M); int sum = 0; int A[M]; for(int i=0; i<M; i++){ scanf("%d",&A[i]); sum += A[i]; } if(N >= sum){ printf("%d",N-sum); }else{ printf("-1"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270875/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270875/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %M = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #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 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %M, align 4, !tbaa !5 %cmp12 = icmp sgt i32 %3, 0 br i1 %cmp12, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %4 = load i32, ptr %N, align 4, !tbaa !5 %cmp4.not = icmp slt i32 %4, %sum.0.lcssa br i1 %cmp4.not, label %if.else, label %if.then for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.013 = phi i32 [ %add, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %5 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %5, %sum.013 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %M, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 if.then: ; preds = %for.cond.cleanup %sub = sub nsw i32 %4, %sum.0.lcssa %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) br label %if.end if.else: ; preds = %for.cond.cleanup %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %M) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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){ // Your code here! int x,y,a,b; a = 0; scanf("%d %d\n", &x,&y); for(int i=0;i<y;i++){ scanf("%d", &b); a+=b; } if(a>x){ printf("-1"); } else{ printf("%d",x-a); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270918/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270918/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\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 %b = 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 %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %y, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %0, 0 br i1 %cmp8, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %a.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %1 = load i32, ptr %x, align 4, !tbaa !5 %cmp2 = icmp sgt i32 %a.0.lcssa, %1 br i1 %cmp2, label %if.then, label %if.else for.body: ; preds = %entry, %for.body %i.010 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %a.09 = phi i32 [ %add, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %2 = load i32, ptr %b, align 4, !tbaa !5 %add = add nsw i32 %2, %a.09 %inc = add nuw nsw i32 %i.010, 1 %3 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 if.then: ; preds = %for.cond.cleanup %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end if.else: ; preds = %for.cond.cleanup %sub = sub nsw i32 %1, %a.0.lcssa %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #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: 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> #include<math.h> int main(){ int a, n, m, sum = 0; scanf("%d %d", &n, &m); for(int i = 0;i < m;i++){ scanf("%d", &a); sum += a; } if(sum <= n){ printf("%d", n - sum); } else{ printf("-1"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_270961/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_270961/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %n = alloca i32, align 4 %m = 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 %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3 %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 %cmp8 = icmp sgt i32 %0, 0 br i1 %cmp8, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %for.body ] %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp2.not = icmp sgt i32 %sum.0.lcssa, %1 br i1 %cmp2.not, label %if.else, label %if.then for.body: ; preds = %entry, %for.body %i.010 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %sum.09 = phi i32 [ %add, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a) %2 = load i32, ptr %a, align 4, !tbaa !5 %add = add nsw i32 %2, %sum.09 %inc = add nuw nsw i32 %i.010, 1 %3 = load i32, ptr %m, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 if.then: ; preds = %for.cond.cleanup %sub = sub nsw i32 %1, %sum.0.lcssa %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub) br label %if.end if.else: ; preds = %for.cond.cleanup %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end if.end: ; preds = %if.else, %if.then call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #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: 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"}
/* とりあえずソースコード見る前に推し見ていってください。 ` ....J&wZTUUWc `...JZY"!~-._<~~~~_d' ` ..-Z"=~`..._~___::~~~_J\ ........ ` ..dY=````..~~__::::::::~_J\ .KY"=<<<<<<<?77"YTXa-.. ` .JY=`````.-<~--::<<~~~~<:<_d^ W,~~~_______<~-..`.. ?7TG+...` ` ` ` ` .... ` .v"~`````.-<~-JT1__........_-d' T,_~:::;:<z+-~~~~<-..``.`._?TSJ.. ..JVYT7TTTTTY"=<<<?7"TQJ=~`.``...?~~__(<~_......... .#` (h_~:<::((+v___._.~~?<.`````.`_?TG-__...___.__....` ..?~```.` .J!~~_..-~<7_......._ .P .W,_~~~_?71-.````` _~~?i..````````.``.```..```````._```.. .J>_~_` ?<<__....... (% ?p _..._._-z., ``` _~_?<- .`.````````````.``.````` _<1>_~~~~._ --(i-......._ .V! .W, ......(>~<~+-....~~~(t<!`.`.`.`.``.```.``.``` ` .<-~~((?1~?=_......_ .J= 7e .........!_.C~-(>(?` ` ```````````````````` ` ?(~_`` ``.... `.-Y .W, .......```` ~(<` ` ` ` `````````` ` ` ?-_. ``` .J" `?h. ` ` .~J! ` ` ` ` ` ` ` ` ` ` ` ` 1__ ..J= 7a, .~_J` ` ` ` ` `` ` ` ` ` ` ` ` 1-_ (d=` ?TGgJ<<_J`` ` ` ` - ` ```` ``` ` `( ` ` ` .wWc<W_ .5g-$` ` > ````` ``` ` ` (- ` ` ` _7HHXb. .@H=` ` `.l` ```` ` ```` `(<-` _ ` ` ` j ?NHm,` `.dHMF ` ` ` . `.$```` ` `` ````(~(.(<J- ` ` ` ( W7HHm, `.@Ht,P` ` ._ (1_. ` ` ` `` .(T!_<-`?W+ ` ````( d, (UHh.` ` .M#! b`` ` ,Sv7TOo. ` ` ` _~. <`` <. ({` `` ` .< h .UH&` `.MD` O-`````vl v.1__ ``` ``````.;.:``` 1 J1 ` ````.i! ` J; ?Mh. .WF .n...``.?- > ->.-`````````..I+.`` ..e:(- . ```.V- `.b UN. ` `(F (C<~(<..l(1c` ?z1---....._jjA.JJadHYW@.> < ``.c(} ` d. ?N. `.@` .@ <((-_vM#HmQmq8?1&-~~~(J!` WHMHMb `.>.> ._J~(!` ``(] ,b ` ,> d!` ` v+(_`.HHMMb. `????```` XxdHMH~` >(iJO!_(> ```_ K ,` . .F` ` ``.c1s..HdMMH~````````````(BXVY=``.O>`.c_(>_````(-W `J{;``` ``(+> `-77"= ```.```````````` ````..+>~~_````.}d H(:```````.3 ..````````.````````````` `.` .>~~~({__ ``.Pd ` Dd_```.....I ``````````_````````````````.v~~:~:(P_~_ ((bK WM{ ...~~~~(o.``````````````` ..````` .?`(<:~(-+#_~~_1dH% dvr-l..~~_s_w7+.``.<(-. ?!``~~..-<1.?!` J<+~:(iWH~::(kWF X_w~~~(jM:Wc_O?42``` ?&+-;+<~``.(:` .4~(D~(Id!H~_(V!! .hdm_~(d?hdNz-_(>``.._(_.(>_..``(:`` (1H%(uV! HV"! 7:?4uD.K~.._?z>`.._(JSjk-__`.`(C<<!_7H#"! .dI:__-.I?&Jv=_+?>?l_?4v?> -< ...?h. ` .JHz?1<:::J<(l ` J?1J<1_ `(:..?_...._Jb `..v"!``(>(1+:(>~~(1.<(1<iJ><..C<_--1(:::+CJN. J=````.` (a+g0Ws:::_:_::(<___<(~___(C~:<z<1>-Ta,` `?e````.z@! X<:::::::<+:::::?1+jdYTYAaZ!``` ?4a.` ` (n.````Oe .D_~~~:::::::::::::(W! ?U, ````.To. ` .4,````?Hka.f_....__~~::~:~:~~~_d; (W,`` `` 7a. ?N, `-_4D..............~.~..._W, ?NJ. ` ` ?4dYBh, ` JD?- +_......................W. _TS&, ` ` TmJN` .UR-...<z+-_-............-__-((dL _Wn. ` .! (t ` ` J8!_.2____<?<<<+(-(--(+<<1<<(_<jL .N..`.J! ?W& d&J?` ~?<+-_(-~(-:(_: <.<(-(<7!_?o ?B9Tn.` (4kdb ` `.dY! ` `./` ` _(????!!~!` ``(_``..?L .4,m,iW. .U, `.! ` ! `` `. `` ` < `...?r Wd?BY` (N&.`.!` ` < ```` _ ` ```(_`..(JV` ` ` `(8-.?=<?1+-..+... ```(.......f<~?r ` ` ...... .K`.?<-. __(K<D__<?TC~~~~__```.-S. ....-&ZY""777?77""9GJ,` ` `J}````` _??<d= J{~~~~~(i.....-<<~`(Y77<~_``.```.```````.`.(XHa. ` ` .K`````````.d^ X~~.~.~~_1. ````.`` I_....```.````.``.`````_dWqHm, `(%``.`.```.Y R~~~.~.~~~<-`````.``(-~~.....`.`````.``.``.(dWqkHh .K_```.``.J^ S_~~~~~.~~~?:``.``.`.l~~~~...``.`.``````.``_zWkqkHb` ` .d'`..```.Y` q{~.~.~~.~.~(i ````.`(/.~~.....```.``.```.`.dWqqqqH[ .d!`~~_-.J^ .b_~.~~.~~~~~_1. ..``?+~~~~....````````.` (WkHHM#H# d!` __?(f` ?n~~~.~~.~~~~~?i_.````?/~~.~..`.``.``.``._jkY"7= ` .D``` `.% ?h,~~~~.~..~~~~1, ``` j_~~....``.``.``.-V=` `(}` (\ Tm,~~~~~.~.~~~?- `` .>~~....``.``..JY` ` ` .g` (' ?W&-~~~~~.~.~(> ` 1_~~....`..JT^ d=< .,Nx THaJ-_~~~~~(l (o.(((JZ"^` ` .@ `?`.H. _"YBHmggk<!`` > W> 4eJ>:1.(t W+.<(. .(D ` ({?<!~db W$<<jY4F` ,h. _`.W` (5..J=.d` ` 7TUY"` 4,...(Y! ~~` ` でかいですね。 更にかわいいときた。 うん。好き。 */ /* include */ #include <assert.h> #include <ctype.h> #include <errno.h> #include <locale.h> #include <limits.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <time.h> #include <setjmp.h> #include <string.h> #include <signal.h> #include <stdarg.h> #include <stdbool.h> /* typedef */ typedef long long ll; typedef char string[100]; typedef int array[100]; /* define */ /* define funcs */ #define sort_d(array,end){int size=end-array;qsort(array,size,sizeof(int),intcmp);} #define sort_c(array,end){int size=end-array;qsort(array,size,sizeof(char),charcmp);} #define rand_range(min,max) (min)+(rand())%((max)-(min)+(1)) #define rep(i,j) for(int i=0;i<j;i++) #define loop(i,j,z) for(int i=j;i<z;i++) #define swap(a,b) ((a!=b)&&(a+=b,b=a-b,a-= b)) #define getarray_d(array,size){array=(int *)malloc(sizeof(int)*size);} #define getarray_c(array,size){array=(char *)malloc(sizeof(char)*size);} #define fill(array,end,val){int size=end-array;rep(i,size)array[i]=val;} #define min(a,b) (a>b)?b:a #define max(a,b) (a<b)?b:a /* otter (Otter) カワウソッ! */ #define intptr int * #define random srand((unsigned)time(NULL)) #define ON 1 #define OFF 0 #define TREE_SIZE 1000 /* prototype Declaration */ int intcmp(const void* a, const void* b); int charcmp(const void* a, const void* b); bool is_sorted(const int* start, const int* end); int count(const int* start, const int* end, int target); void shuffle(int* start, int* end); void tree_init(void); int tree_root(int x); void unite(int x, int y); bool same(int x, int y); /* scan */ #define sd(a) scanf("%d",&a) #define sld(a) scanf("%lld",&a) #define sc(a) scanf("%c",&a), getchar() #define sf(a) scanf("%f",&a) #define ss(a) scanf("%s",a) /* print */ #define odn(a) printf("%lld\n",a) #define ocn(a) printf("%c\n",a) #define ofn(a) printf("%f\n",a) #define osn(a) printf("%s\n",a) #define od(a) printf("%d ",a) #define oc(a) printf("%c ",a) #define of(a) printf("%f ",a) #define olf(a) printf("%lf ",a) #define os(a) printf("%s ",a) /* struct */ typedef struct { int first; int second; }pair; /* local val */ int tree[TREE_SIZE]; int cnts=0; ll B,C,D,E,F,H,I,J,K,L,M,N,O,P,Q,R,U,V,W,X,Y,Z; int A[100000]; string S,T; #define Graph_size 1 ll G[Graph_size][Graph_size]; /* funcs (local)*/ /* main program */ int main(void) { ll sum=0; sld(N),sld(M); for(int i=0;i<M;i++){ sld(B); sum+=B; } printf("%lld", (sum<=N)?N-sum:-1); } /* funcs (global)*/ void sort_first(pair* b, pair* e) { int* dec; int s2 = e - b; int size = e - b; getarray_d(dec, size); rep(i, size) dec[i] = b[i].first; sort_d(dec, dec + s2); rep(i, size) b[i].first = dec[i]; } void sort_second(pair* b, pair* e) { int* dec; int s2 = e - b; int size = e - b; getarray_d(dec, size); rep(i, size) dec[i] = b[i].second; sort_d(dec, dec + s2); rep(i, size) b[i].second = dec[i]; } int intcmp(const void* a, const void* b) { return *(int*)a - *(int*)b; } int charcmp(const void* a, const void* b) { return *(char*)a - *(char*)b; } bool is_sorted(const int* start, const int* end) { while (start != end) { if (*start > * (start + 1)) return false; start++; } return true; } int count(const int* start, const int* end, int target) { int cnt = 0; int* array; int* p; array = (int*)malloc((end - start) * sizeof(int)); if (array == NULL) { printf("Err0r"); exit(-1); } memcpy(array, start, sizeof(int) * (end - start)); sort_d(array, array + (end - start)); p = (int*)bsearch(&target, array, end - start, sizeof(int), intcmp); if (p == NULL) { free(array); return 0; } while (*p == target) p++; p--; while (*p == target) { cnt++; p--; } free(array); return cnt; } void shuffle(int* start, int* end) { random; int a, b; int size = end - start; rep(i, 500) { a = rand_range(0, size - 1); b = rand_range(0, size - 1); swap(start[a], start[b]); } } /* tree */ void tree_init(void) { for (int i = 0; i < TREE_SIZE; i++) tree[i] = i; } int tree_root(int x) { if (tree[x] == x) return x; return tree[x] = tree_root(tree[x]); } void unite(int x, int y) { int rx = tree_root(x); int ry = tree_root(y); if (rx == ry) return; tree[rx] = ry; } bool same(int x, int y) { int rx = tree_root(x); int ry = tree_root(y); return rx == ry; } ll pow_mod(ll n, ll k, ll m) { if (k == 0) return 1; else if (k % 2) return pow_mod(n, k - 1, m) * n % m; else { int t = pow_mod(n, k / 2, m); return t * t % m; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271003/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271003/source.c" target datalayout = "e-m:e-p270: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.pair = type { i32, i32 } @cnts = dso_local local_unnamed_addr global i32 0, align 4 @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @N = dso_local global i64 0, align 8 @M = dso_local global i64 0, align 8 @B = dso_local global i64 0, align 8 @.str.1 = private unnamed_addr constant [6 x i8] c"Err0r\00", align 1 @tree = dso_local local_unnamed_addr global [1000 x i32] zeroinitializer, align 16 @C = dso_local local_unnamed_addr global i64 0, align 8 @D = dso_local local_unnamed_addr global i64 0, align 8 @E = dso_local local_unnamed_addr global i64 0, align 8 @F = dso_local local_unnamed_addr global i64 0, align 8 @H = dso_local local_unnamed_addr global i64 0, align 8 @I = dso_local local_unnamed_addr global i64 0, align 8 @J = dso_local local_unnamed_addr global i64 0, align 8 @K = dso_local local_unnamed_addr global i64 0, align 8 @L = dso_local local_unnamed_addr global i64 0, align 8 @O = dso_local local_unnamed_addr global i64 0, align 8 @P = dso_local local_unnamed_addr global i64 0, align 8 @Q = dso_local local_unnamed_addr global i64 0, align 8 @R = dso_local local_unnamed_addr global i64 0, align 8 @U = dso_local local_unnamed_addr global i64 0, align 8 @V = dso_local local_unnamed_addr global i64 0, align 8 @W = dso_local local_unnamed_addr global i64 0, align 8 @X = dso_local local_unnamed_addr global i64 0, align 8 @Y = dso_local local_unnamed_addr global i64 0, align 8 @Z = dso_local local_unnamed_addr global i64 0, align 8 @A = dso_local local_unnamed_addr global [100000 x i32] zeroinitializer, align 16 @S = dso_local local_unnamed_addr global [100 x i8] zeroinitializer, align 16 @T = dso_local local_unnamed_addr global [100 x i8] zeroinitializer, align 16 @G = dso_local local_unnamed_addr global [1 x [1 x i64]] zeroinitializer, align 8 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N) %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @M) %0 = load i64, ptr @M, align 8, !tbaa !5 %cmp10 = icmp sgt i64 %0, 0 br i1 %cmp10, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %sum.0.lcssa = phi i64 [ 0, %entry ], [ %add, %for.body ] %1 = load i64, ptr @N, align 8 %cmp4.not = icmp sgt i64 %sum.0.lcssa, %1 %sub = sub nsw i64 %1, %sum.0.lcssa %cond = select i1 %cmp4.not, i64 -1, i64 %sub %call6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %cond) ret i32 0 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %sum.011 = phi i64 [ %add, %for.body ], [ 0, %entry ] %call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @B) %2 = load i64, ptr @B, align 8, !tbaa !5 %add = add nsw i64 %2, %sum.011 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i64, ptr @M, align 8, !tbaa !5 %cmp = icmp sgt i64 %3, %indvars.iv.next br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @sort_first(ptr noundef %b, ptr noundef %e) local_unnamed_addr #0 { entry: %sub.ptr.lhs.cast = ptrtoint ptr %e to i64 %sub.ptr.rhs.cast = ptrtoint ptr %b to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %sub.ptr.div = lshr exact i64 %sub.ptr.sub, 3 %conv = trunc i64 %sub.ptr.div to i32 %sext = shl i64 %sub.ptr.sub, 29 %conv6 = ashr i64 %sext, 32 %mul = shl nsw i64 %conv6, 2 %call = tail call noalias ptr @malloc(i64 noundef %mul) #15 %cmp47 = icmp sgt i32 %conv, 0 br i1 %cmp47, label %for.body.preheader, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %entry tail call void @qsort(ptr noundef %call, i64 noundef %conv6, i64 noundef 4, ptr noundef nonnull @intcmp) #16 br label %for.cond.cleanup21 for.body.preheader: ; preds = %entry %wide.trip.count = and i64 %sub.ptr.div, 4294967295 %min.iters.check = icmp ult i64 %wide.trip.count, 9 br i1 %min.iters.check, label %for.body.preheader59, label %vector.ph for.body.preheader59: ; preds = %vector.body, %for.body.preheader %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %vector.body ] br label %for.body vector.ph: ; preds = %for.body.preheader %n.mod.vf = and i64 %sub.ptr.div, 7 %0 = icmp eq i64 %n.mod.vf, 0 %1 = select i1 %0, i64 8, i64 %n.mod.vf %n.vec = sub nsw i64 %wide.trip.count, %1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %2 = or i64 %index, 4 %3 = getelementptr inbounds %struct.pair, ptr %b, i64 %index %4 = getelementptr inbounds %struct.pair, ptr %b, i64 %2 %wide.vec = load <8 x i32>, ptr %3, align 4, !tbaa !11 %wide.vec57 = load <8 x i32>, ptr %4, align 4, !tbaa !11 %strided.vec = shufflevector <8 x i32> %wide.vec, <8 x i32> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6> %strided.vec58 = shufflevector <8 x i32> %wide.vec57, <8 x i32> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6> %5 = getelementptr inbounds i32, ptr %call, i64 %index store <4 x i32> %strided.vec, ptr %5, align 4, !tbaa !14 %6 = getelementptr inbounds i32, ptr %5, i64 4 store <4 x i32> %strided.vec58, ptr %6, align 4, !tbaa !14 %index.next = add nuw i64 %index, 8 %7 = icmp eq i64 %index.next, %n.vec br i1 %7, label %for.body.preheader59, label %vector.body, !llvm.loop !15 for.cond.cleanup: ; preds = %for.body tail call void @qsort(ptr noundef nonnull %call, i64 noundef %conv6, i64 noundef 4, ptr noundef nonnull @intcmp) #16 br i1 %cmp47, label %for.body22.preheader, label %for.cond.cleanup21 for.body22.preheader: ; preds = %for.cond.cleanup %8 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %sub.ptr.div, 3 %9 = icmp ult i64 %8, 3 br i1 %9, label %for.cond.cleanup21.loopexit.unr-lcssa, label %for.body22.preheader.new for.body22.preheader.new: ; preds = %for.body22.preheader %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter br label %for.body22 for.body: ; preds = %for.body.preheader59, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader59 ] %arrayidx = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv %10 = load i32, ptr %arrayidx, align 4, !tbaa !11 %arrayidx9 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv store i32 %10, ptr %arrayidx9, align 4, !tbaa !14 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !18 for.cond.cleanup21.loopexit.unr-lcssa: ; preds = %for.body22, %for.body22.preheader %indvars.iv52.unr = phi i64 [ 0, %for.body22.preheader ], [ %indvars.iv.next53.3, %for.body22 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup21, label %for.body22.epil for.body22.epil: ; preds = %for.cond.cleanup21.loopexit.unr-lcssa, %for.body22.epil %indvars.iv52.epil = phi i64 [ %indvars.iv.next53.epil, %for.body22.epil ], [ %indvars.iv52.unr, %for.cond.cleanup21.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body22.epil ], [ 0, %for.cond.cleanup21.loopexit.unr-lcssa ] %arrayidx24.epil = getelementptr inbounds i32, ptr %call, i64 %indvars.iv52.epil %11 = load i32, ptr %arrayidx24.epil, align 4, !tbaa !14 %arrayidx26.epil = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv52.epil store i32 %11, ptr %arrayidx26.epil, align 4, !tbaa !11 %indvars.iv.next53.epil = add nuw nsw i64 %indvars.iv52.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup21, label %for.body22.epil, !llvm.loop !19 for.cond.cleanup21: ; preds = %for.cond.cleanup21.loopexit.unr-lcssa, %for.body22.epil, %for.cond.cleanup.thread, %for.cond.cleanup ret void for.body22: ; preds = %for.body22, %for.body22.preheader.new %indvars.iv52 = phi i64 [ 0, %for.body22.preheader.new ], [ %indvars.iv.next53.3, %for.body22 ] %niter = phi i64 [ 0, %for.body22.preheader.new ], [ %niter.next.3, %for.body22 ] %arrayidx24 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv52 %12 = load i32, ptr %arrayidx24, align 4, !tbaa !14 %arrayidx26 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv52 store i32 %12, ptr %arrayidx26, align 4, !tbaa !11 %indvars.iv.next53 = or i64 %indvars.iv52, 1 %arrayidx24.1 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53 %13 = load i32, ptr %arrayidx24.1, align 4, !tbaa !14 %arrayidx26.1 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53 store i32 %13, ptr %arrayidx26.1, align 4, !tbaa !11 %indvars.iv.next53.1 = or i64 %indvars.iv52, 2 %arrayidx24.2 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53.1 %14 = load i32, ptr %arrayidx24.2, align 4, !tbaa !14 %arrayidx26.2 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53.1 store i32 %14, ptr %arrayidx26.2, align 4, !tbaa !11 %indvars.iv.next53.2 = or i64 %indvars.iv52, 3 %arrayidx24.3 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53.2 %15 = load i32, ptr %arrayidx24.3, align 4, !tbaa !14 %arrayidx26.3 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53.2 store i32 %15, ptr %arrayidx26.3, align 4, !tbaa !11 %indvars.iv.next53.3 = add nuw nsw i64 %indvars.iv52, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup21.loopexit.unr-lcssa, label %for.body22, !llvm.loop !21 } ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @intcmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !14 %1 = load i32, ptr %b, align 4, !tbaa !14 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local void @sort_second(ptr noundef %b, ptr noundef %e) local_unnamed_addr #0 { entry: %sub.ptr.lhs.cast = ptrtoint ptr %e to i64 %sub.ptr.rhs.cast = ptrtoint ptr %b to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %sub.ptr.div = lshr exact i64 %sub.ptr.sub, 3 %conv = trunc i64 %sub.ptr.div to i32 %sext = shl i64 %sub.ptr.sub, 29 %conv6 = ashr i64 %sext, 32 %mul = shl nsw i64 %conv6, 2 %call = tail call noalias ptr @malloc(i64 noundef %mul) #15 %cmp47 = icmp sgt i32 %conv, 0 br i1 %cmp47, label %for.body.preheader, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %entry tail call void @qsort(ptr noundef %call, i64 noundef %conv6, i64 noundef 4, ptr noundef nonnull @intcmp) #16 br label %for.cond.cleanup21 for.body.preheader: ; preds = %entry %wide.trip.count = and i64 %sub.ptr.div, 4294967295 %min.iters.check = icmp ult i64 %wide.trip.count, 9 br i1 %min.iters.check, label %for.body.preheader59, label %vector.ph for.body.preheader59: ; preds = %vector.body, %for.body.preheader %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %vector.body ] br label %for.body vector.ph: ; preds = %for.body.preheader %n.mod.vf = and i64 %sub.ptr.div, 7 %0 = icmp eq i64 %n.mod.vf, 0 %1 = select i1 %0, i64 8, i64 %n.mod.vf %n.vec = sub nsw i64 %wide.trip.count, %1 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %2 = or i64 %index, 4 %3 = getelementptr inbounds %struct.pair, ptr %b, i64 %index, i32 1 %4 = getelementptr inbounds %struct.pair, ptr %b, i64 %2, i32 1 %wide.vec = load <8 x i32>, ptr %3, align 4, !tbaa !22 %wide.vec57 = load <8 x i32>, ptr %4, align 4, !tbaa !22 %strided.vec = shufflevector <8 x i32> %wide.vec, <8 x i32> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6> %strided.vec58 = shufflevector <8 x i32> %wide.vec57, <8 x i32> poison, <4 x i32> <i32 0, i32 2, i32 4, i32 6> %5 = getelementptr inbounds i32, ptr %call, i64 %index store <4 x i32> %strided.vec, ptr %5, align 4, !tbaa !14 %6 = getelementptr inbounds i32, ptr %5, i64 4 store <4 x i32> %strided.vec58, ptr %6, align 4, !tbaa !14 %index.next = add nuw i64 %index, 8 %7 = icmp eq i64 %index.next, %n.vec br i1 %7, label %for.body.preheader59, label %vector.body, !llvm.loop !23 for.cond.cleanup: ; preds = %for.body tail call void @qsort(ptr noundef nonnull %call, i64 noundef %conv6, i64 noundef 4, ptr noundef nonnull @intcmp) #16 br i1 %cmp47, label %for.body22.preheader, label %for.cond.cleanup21 for.body22.preheader: ; preds = %for.cond.cleanup %8 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %sub.ptr.div, 3 %9 = icmp ult i64 %8, 3 br i1 %9, label %for.cond.cleanup21.loopexit.unr-lcssa, label %for.body22.preheader.new for.body22.preheader.new: ; preds = %for.body22.preheader %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter br label %for.body22 for.body: ; preds = %for.body.preheader59, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader59 ] %second = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv, i32 1 %10 = load i32, ptr %second, align 4, !tbaa !22 %arrayidx9 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv store i32 %10, ptr %arrayidx9, align 4, !tbaa !14 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !24 for.cond.cleanup21.loopexit.unr-lcssa: ; preds = %for.body22, %for.body22.preheader %indvars.iv52.unr = phi i64 [ 0, %for.body22.preheader ], [ %indvars.iv.next53.3, %for.body22 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup21, label %for.body22.epil for.body22.epil: ; preds = %for.cond.cleanup21.loopexit.unr-lcssa, %for.body22.epil %indvars.iv52.epil = phi i64 [ %indvars.iv.next53.epil, %for.body22.epil ], [ %indvars.iv52.unr, %for.cond.cleanup21.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body22.epil ], [ 0, %for.cond.cleanup21.loopexit.unr-lcssa ] %arrayidx24.epil = getelementptr inbounds i32, ptr %call, i64 %indvars.iv52.epil %11 = load i32, ptr %arrayidx24.epil, align 4, !tbaa !14 %second27.epil = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv52.epil, i32 1 store i32 %11, ptr %second27.epil, align 4, !tbaa !22 %indvars.iv.next53.epil = add nuw nsw i64 %indvars.iv52.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.cond.cleanup21, label %for.body22.epil, !llvm.loop !25 for.cond.cleanup21: ; preds = %for.cond.cleanup21.loopexit.unr-lcssa, %for.body22.epil, %for.cond.cleanup.thread, %for.cond.cleanup ret void for.body22: ; preds = %for.body22, %for.body22.preheader.new %indvars.iv52 = phi i64 [ 0, %for.body22.preheader.new ], [ %indvars.iv.next53.3, %for.body22 ] %niter = phi i64 [ 0, %for.body22.preheader.new ], [ %niter.next.3, %for.body22 ] %arrayidx24 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv52 %12 = load i32, ptr %arrayidx24, align 4, !tbaa !14 %second27 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv52, i32 1 store i32 %12, ptr %second27, align 4, !tbaa !22 %indvars.iv.next53 = or i64 %indvars.iv52, 1 %arrayidx24.1 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53 %13 = load i32, ptr %arrayidx24.1, align 4, !tbaa !14 %second27.1 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53, i32 1 store i32 %13, ptr %second27.1, align 4, !tbaa !22 %indvars.iv.next53.1 = or i64 %indvars.iv52, 2 %arrayidx24.2 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53.1 %14 = load i32, ptr %arrayidx24.2, align 4, !tbaa !14 %second27.2 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53.1, i32 1 store i32 %14, ptr %second27.2, align 4, !tbaa !22 %indvars.iv.next53.2 = or i64 %indvars.iv52, 3 %arrayidx24.3 = getelementptr inbounds i32, ptr %call, i64 %indvars.iv.next53.2 %15 = load i32, ptr %arrayidx24.3, align 4, !tbaa !14 %second27.3 = getelementptr inbounds %struct.pair, ptr %b, i64 %indvars.iv.next53.2, i32 1 store i32 %15, ptr %second27.3, align 4, !tbaa !22 %indvars.iv.next53.3 = add nuw nsw i64 %indvars.iv52, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond.cleanup21.loopexit.unr-lcssa, label %for.body22, !llvm.loop !26 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @charcmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #4 { entry: %0 = load i8, ptr %a, align 1, !tbaa !27 %conv = sext i8 %0 to i32 %1 = load i8, ptr %b, align 1, !tbaa !27 %conv1 = sext i8 %1 to i32 %sub = sub nsw i32 %conv, %conv1 ret i32 %sub } ; Function Attrs: nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local zeroext i1 @is_sorted(ptr noundef readonly %start, ptr noundef readnone %end) local_unnamed_addr #5 { entry: br label %while.cond while.cond: ; preds = %while.body, %entry %start.addr.0 = phi ptr [ %start, %entry ], [ %add.ptr, %while.body ] %cmp.not = icmp eq ptr %start.addr.0, %end br i1 %cmp.not, label %return, label %while.body while.body: ; preds = %while.cond %0 = load i32, ptr %start.addr.0, align 4, !tbaa !14 %add.ptr = getelementptr inbounds i32, ptr %start.addr.0, i64 1 %1 = load i32, ptr %add.ptr, align 4, !tbaa !14 %cmp1 = icmp sgt i32 %0, %1 br i1 %cmp1, label %return, label %while.cond, !llvm.loop !28 return: ; preds = %while.cond, %while.body ret i1 %cmp.not } ; Function Attrs: nounwind uwtable define dso_local i32 @count(ptr noundef %start, ptr noundef %end, i32 noundef %target) local_unnamed_addr #6 { entry: %sub.ptr.lhs.cast = ptrtoint ptr %end to i64 %sub.ptr.rhs.cast = ptrtoint ptr %start to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %call = tail call noalias ptr @malloc(i64 noundef %sub.ptr.sub) #15 %cmp = icmp eq ptr %call, null br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) tail call void @exit(i32 noundef -1) #17 unreachable if.end: ; preds = %entry tail call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 4 %call, ptr align 4 %start, i64 %sub.ptr.sub, i1 false) %sext = shl i64 %sub.ptr.sub, 30 %conv15 = ashr i64 %sext, 32 tail call void @qsort(ptr noundef nonnull %call, i64 noundef %conv15, i64 noundef 4, ptr noundef nonnull @intcmp) #16 %cmp18.not.i = icmp eq ptr %end, %start br i1 %cmp18.not.i, label %if.then23, label %while.body.i.preheader while.body.i.preheader: ; preds = %if.end %sub.ptr.div = ashr exact i64 %sub.ptr.sub, 2 br label %while.body.i while.body.i: ; preds = %while.body.i.preheader, %if.end6.i %__l.020.i = phi i64 [ %__l.1.i, %if.end6.i ], [ 0, %while.body.i.preheader ] %__u.019.i = phi i64 [ %__u.1.i, %if.end6.i ], [ %sub.ptr.div, %while.body.i.preheader ] %add.i = add i64 %__u.019.i, %__l.020.i %div17.i = lshr i64 %add.i, 1 %mul.i = shl i64 %div17.i, 2 %add.ptr.i = getelementptr inbounds i8, ptr %call, i64 %mul.i %0 = load i32, ptr %add.ptr.i, align 4, !tbaa !14 %cmp1.i = icmp sgt i32 %0, %target br i1 %cmp1.i, label %if.end6.i, label %if.else.i if.else.i: ; preds = %while.body.i %cmp2.not.i = icmp eq i32 %0, %target br i1 %cmp2.not.i, label %while.cond.preheader, label %if.then3.i while.cond.preheader: ; preds = %if.else.i %add.ptr.i.le = getelementptr inbounds i8, ptr %call, i64 %mul.i br label %while.cond if.then3.i: ; preds = %if.else.i %add4.i = add nuw i64 %div17.i, 1 br label %if.end6.i if.end6.i: ; preds = %if.then3.i, %while.body.i %__u.1.i = phi i64 [ %__u.019.i, %if.then3.i ], [ %div17.i, %while.body.i ] %__l.1.i = phi i64 [ %add4.i, %if.then3.i ], [ %__l.020.i, %while.body.i ] %cmp.i = icmp ult i64 %__l.1.i, %__u.1.i br i1 %cmp.i, label %while.body.i, label %if.then23, !llvm.loop !29 if.then23: ; preds = %if.end6.i, %if.end tail call void @free(ptr noundef nonnull %call) #16 br label %cleanup while.cond: ; preds = %while.cond, %while.cond.preheader %p.0 = phi ptr [ %incdec.ptr, %while.cond ], [ %add.ptr.i.le, %while.cond.preheader ] %1 = load i32, ptr %p.0, align 4, !tbaa !14 %cmp25 = icmp eq i32 %1, %target %incdec.ptr = getelementptr inbounds i32, ptr %p.0, i64 1 br i1 %cmp25, label %while.cond, label %while.cond28, !llvm.loop !30 while.cond28: ; preds = %while.cond, %while.cond28 %cnt.0 = phi i32 [ %inc, %while.cond28 ], [ 0, %while.cond ] %p.0.pn = phi ptr [ %p.1, %while.cond28 ], [ %p.0, %while.cond ] %p.1 = getelementptr inbounds i32, ptr %p.0.pn, i64 -1 %2 = load i32, ptr %p.1, align 4, !tbaa !14 %cmp29 = icmp eq i32 %2, %target %inc = add nuw nsw i32 %cnt.0, 1 br i1 %cmp29, label %while.cond28, label %while.end33, !llvm.loop !31 while.end33: ; preds = %while.cond28 tail call void @free(ptr noundef %call) #16 br label %cleanup cleanup: ; preds = %while.end33, %if.then23 %retval.0 = phi i32 [ 0, %if.then23 ], [ %cnt.0, %while.end33 ] ret i32 %retval.0 } ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #7 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: nounwind uwtable define dso_local void @shuffle(ptr noundef %start, ptr noundef %end) local_unnamed_addr #6 { entry: %call = tail call i64 @time(ptr noundef null) #16 %conv = trunc i64 %call to i32 tail call void @srand(i32 noundef %conv) #16 %sub.ptr.lhs.cast = ptrtoint ptr %end to i64 %sub.ptr.rhs.cast = ptrtoint ptr %start to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %sub.ptr.div = lshr exact i64 %sub.ptr.sub, 2 %conv1 = trunc i64 %sub.ptr.div to i32 br label %for.body for.cond.cleanup: ; preds = %land.end ret void for.body: ; preds = %entry, %land.end %i.052 = phi i32 [ 0, %entry ], [ %inc, %land.end ] %call3 = tail call i32 @rand() #16 %rem = srem i32 %call3, %conv1 %call6 = tail call i32 @rand() #16 %rem10 = srem i32 %call6, %conv1 %idxprom = sext i32 %rem to i64 %arrayidx = getelementptr inbounds i32, ptr %start, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !14 %idxprom12 = sext i32 %rem10 to i64 %arrayidx13 = getelementptr inbounds i32, ptr %start, i64 %idxprom12 %1 = load i32, ptr %arrayidx13, align 4, !tbaa !14 %cmp14.not = icmp eq i32 %0, %1 br i1 %cmp14.not, label %land.end, label %land.rhs land.rhs: ; preds = %for.body %add20 = add nsw i32 %1, %0 store i32 %add20, ptr %arrayidx, align 4, !tbaa !14 %2 = load i32, ptr %arrayidx13, align 4, !tbaa !14 %sub25 = sub nsw i32 %add20, %2 store i32 %sub25, ptr %arrayidx13, align 4, !tbaa !14 %3 = load i32, ptr %arrayidx, align 4, !tbaa !14 %sub32 = sub nsw i32 %3, %sub25 store i32 %sub32, ptr %arrayidx, align 4, !tbaa !14 br label %land.end land.end: ; preds = %land.rhs, %for.body %inc = add nuw nsw i32 %i.052, 1 %exitcond.not = icmp eq i32 %inc, 500 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !32 } ; Function Attrs: nounwind declare void @srand(i32 noundef) local_unnamed_addr #10 ; Function Attrs: nounwind declare i64 @time(ptr noundef) local_unnamed_addr #10 ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #10 ; Function Attrs: nofree norecurse nosync nounwind memory(write, argmem: none, inaccessiblemem: none) uwtable define dso_local void @tree_init() local_unnamed_addr #11 { entry: br label %vector.body vector.body: ; preds = %vector.body.1, %entry %index = phi i64 [ 0, %entry ], [ %index.next.1, %vector.body.1 ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %entry ], [ %vec.ind.next.1, %vector.body.1 ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %0 = getelementptr inbounds [1000 x i32], ptr @tree, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %0, align 16, !tbaa !14 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 16, !tbaa !14 %index.next = or i64 %index, 8 %2 = icmp eq i64 %index.next, 1000 br i1 %2, label %for.cond.cleanup, label %vector.body.1, !llvm.loop !33 vector.body.1: ; preds = %vector.body %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %step.add.1 = add <4 x i32> %vec.ind, <i32 12, i32 12, i32 12, i32 12> %3 = getelementptr inbounds [1000 x i32], ptr @tree, i64 0, i64 %index.next store <4 x i32> %vec.ind.next, ptr %3, align 16, !tbaa !14 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> %step.add.1, ptr %4, align 16, !tbaa !14 %index.next.1 = add nuw nsw i64 %index, 16 %vec.ind.next.1 = add <4 x i32> %vec.ind, <i32 16, i32 16, i32 16, i32 16> br label %vector.body for.cond.cleanup: ; preds = %vector.body ret void } ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @tree_root(i32 noundef %x) local_unnamed_addr #12 { entry: %idxprom = sext i32 %x to i64 %arrayidx = getelementptr inbounds [1000 x i32], ptr @tree, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !14 %cmp = icmp eq i32 %0, %x br i1 %cmp, label %common.ret9, label %if.end common.ret9: ; preds = %entry, %if.end %common.ret9.op = phi i32 [ %call, %if.end ], [ %x, %entry ] ret i32 %common.ret9.op if.end: ; preds = %entry %call = tail call i32 @tree_root(i32 noundef %0) store i32 %call, ptr %arrayidx, align 4, !tbaa !14 br label %common.ret9 } ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @unite(i32 noundef %x, i32 noundef %y) local_unnamed_addr #13 { entry: %call = tail call i32 @tree_root(i32 noundef %x) %call1 = tail call i32 @tree_root(i32 noundef %y) %cmp = icmp eq i32 %call, %call1 br i1 %cmp, label %cleanup, label %if.end if.end: ; preds = %entry %idxprom = sext i32 %call to i64 %arrayidx = getelementptr inbounds [1000 x i32], ptr @tree, i64 0, i64 %idxprom store i32 %call1, ptr %arrayidx, align 4, !tbaa !14 br label %cleanup cleanup: ; preds = %entry, %if.end ret void } ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local zeroext i1 @same(i32 noundef %x, i32 noundef %y) local_unnamed_addr #13 { entry: %call = tail call i32 @tree_root(i32 noundef %x) %call1 = tail call i32 @tree_root(i32 noundef %y) %cmp = icmp eq i32 %call, %call1 ret i1 %cmp } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @pow_mod(i64 noundef %n, i64 noundef %k, i64 noundef %m) local_unnamed_addr #14 { entry: %cmp = icmp eq i64 %k, 0 br i1 %cmp, label %common.ret, label %if.else if.else: ; preds = %entry %0 = and i64 %k, 1 %tobool.not = icmp eq i64 %0, 0 br i1 %tobool.not, label %if.else3, label %if.then1 common.ret.sink.split: ; preds = %if.then1, %if.else3 %conv6.sink = phi i64 [ %conv6, %if.else3 ], [ %mul, %if.then1 ] %rem7 = srem i64 %conv6.sink, %m br label %common.ret common.ret: ; preds = %common.ret.sink.split, %entry %common.ret.op = phi i64 [ 1, %entry ], [ %rem7, %common.ret.sink.split ] ret i64 %common.ret.op if.then1: ; preds = %if.else %sub = add nsw i64 %k, -1 %call = tail call i64 @pow_mod(i64 noundef %n, i64 noundef %sub, i64 noundef %m) %mul = mul nsw i64 %call, %n br label %common.ret.sink.split if.else3: ; preds = %if.else %div = sdiv i64 %k, 2 %call4 = tail call i64 @pow_mod(i64 noundef %n, i64 noundef %div, i64 noundef %m) %mul5 = mul i64 %call4, %call4 %conv6 = and i64 %mul5, 4294967295 br label %common.ret.sink.split } attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree norecurse nosync nounwind memory(read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { 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 #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #9 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nounwind "no-trapping-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 norecurse nosync nounwind memory(write, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #14 = { 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 #15 = { nounwind allocsize(0) } attributes #16 = { nounwind } attributes #17 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!12, !13, i64 0} !12 = !{!"", !13, i64 0, !13, i64 4} !13 = !{!"int", !7, i64 0} !14 = !{!13, !13, i64 0} !15 = distinct !{!15, !10, !16, !17} !16 = !{!"llvm.loop.isvectorized", i32 1} !17 = !{!"llvm.loop.unroll.runtime.disable"} !18 = distinct !{!18, !10, !17, !16} !19 = distinct !{!19, !20} !20 = !{!"llvm.loop.unroll.disable"} !21 = distinct !{!21, !10} !22 = !{!12, !13, i64 4} !23 = distinct !{!23, !10, !16, !17} !24 = distinct !{!24, !10, !17, !16} !25 = distinct !{!25, !20} !26 = distinct !{!26, !10} !27 = !{!7, !7, i64 0} !28 = distinct !{!28, !10} !29 = distinct !{!29, !10} !30 = distinct !{!30, !10} !31 = distinct !{!31, !10} !32 = distinct !{!32, !10} !33 = distinct !{!33, !10, !16, !17}
#pragma warning(disable:4996) #include <stdio.h> #include <stdlib.h> #include <string.h> #define _USE_MATH_DEFINES #include <math.h> #include <float.h> #pragma region 定義 typedef long long ll; typedef unsigned long long ull; #define _itoa(A,N) sprintf(A, "%d", N); int i_dsort(const void* a, const void* b); int i_asort(const void* a, const void* b); int _gcd(int a, int b); int _swp(int* a, int* b); int _cknum(char* a, int n); int _atoi(char* s, int len); int s_asort(const void* a, const void* b); int s_dsort(const void* a, const void* b); //昇順 int s_asort(const void* a, const void* b) { return(strcmp((char*)a, (char*)b)); } int s_dsort(const void* a, const void* b) { return(strcmp((char*)b, (char*)a)); } int i_dsort(const void* a, const void* b) { return(*(int*)b - *(int*)a); } int i_asort(const void* a, const void* b) { return(*(int*)a - *(int*)b); } int i_gcd(int a, int b); int i_gcd(int a, int b) { if (!b)return a; return i_gcd(b, a % b); } int i_lcm(int a, int b); int i_lcm(int a, int b) { return (a * b) / i_gcd(a, b); } int ll_gcd(ll a, ll b); int ll_gcd(ll a, ll b) { if (!b)return a; return ll_gcd(b, a % b); } int ll_lcm(ll a, ll b); int ll_lcm(ll a, ll b) { return (a * b) / ll_gcd(a, b); } // puts("Yes\n") puts("No\n") // scanf("%d.%d") 浮動小数点入力を整数2つで得る //#define pai 3.1415926535 //#define _USE_MATH_DEFINES でM_PIが使える #define deg_rad(X) (X*(M_PI/180)) int _swp(int* a, int* b) { int tmp; tmp = *b; *b = *a; *a = tmp; return 0; } #define _abs(x) ((x)>0?(x):-(x)) #define _min(x,y) ((x)<(y)?(x):(y)) #define _max(x,y) ((x)<(y)?(y):(x)) int _cknum(char* a, int n) { int i; char t = '0'; for (i = 0; i < n; i++) { if (a[i] < '0' || a[i]>'9') return 1; } return 0; } int _atoi(char* s, int len) { char tmp[20]; memcpy(tmp, s, len); tmp[len] = 0x00; return (atoi(tmp)); } double dist(int x1, int y1, int x2, int y2); double dist(int x1, int y1, int x2, int y2) { x1 -= x2; y1 -= y2; return sqrt((double)x1 * (double)x1 + (double)y1 * (double)y1); } //素因数分解 pf素数が入る pc 素数の数 //ll _pfact(ll a); //static ll pf[100000000]; //static ll pc; // //ll _pfact(ll a) { // long i, r; // if (a % 2 == 0) { // pf[pc] = 2; pc++; // return(_pfact(a / 2)); // } // r = sqrt(a); // for (i = 3; i <= r; i += 2) { // if (a % i == 0) { // pf[pc] = i; pc++; // return(_pfact(a / i)); // } // } // if (a != 1) { // pf[pc] = a; pc++; // } // return 0; // //} //同じものの最初の文字をNULLにして降順 int _sort(const void* a, const void* b); int _sort(const void* a, const void* b) { char rc; rc = strcmp((char*)b, (char*)a); if (rc == 0) { *(char*)a = 0x00; return(1); } return(rc); } // 立っている ビットの数 int bitcount(unsigned int uc); int bitcount(unsigned int uc) { int bit; for (bit = 0; 0 != uc; uc = (unsigned int)(uc >> 1)) if (0 != (uc & 1))++bit; return bit; }//bitco //10進数の桁数の総和 int _sumdig(int n); int _sumdig(int n) { int sum = 0; while (n > 0) { sum += n % 10;n /= 10;} return(sum); } int combi(int n, int r); int combi(int n, int r) { if (r == 0 || r == n) return 1; return combi(n - 1, r) + combi(n - 1, r - 1); } #define _rnd(a,b) ((a+b-1)/b) // A/Bの余りを繰り上げる #define _abs(x) ((x)<0 ? -(x) : (x)) #define _MAX 200000 #pragma endregion // C - Sugar Water //int main(void) { // int a, b, c, d, e, f; // int mn, mx; // scanf("%d%d%d%d%d%d", &a, &b, &c, &d, &e, &f); // // int tmp,i; // for (i = 1;; i++) { // tmp = i * 100 + i * e; // if (tmp > f) break; // if (i % a && i % b)continue; // if (i % c && i % d)continue; // break; // } // // printf("%d %d", i * 100, tmp); // return 0; //} //D - Road to Millionaire //static ll a[81]; //int main(void) { // int n,i; // ll c=1000,ans=1000,tmp,cnt=0; // // scanf("%d", &n); // // for(i=0;i<n;i++) // scanf("%lld", &a[i]); // // tmp = 210; // for (i = 0; i < n; i++) { // if (tmp == a[i]) continue; // // if (tmp < a[i]) {//売り // if (a[i] < a[i + 1])continue; // c += cnt * a[i]; // tmp = a[i]; // ans = _max(c, ans); // printf("<S>i:%d a[i]:%lld ans:%lld \n",i, a[i], ans); // } // else { //買い //3 if (a[i] > a[i + 1])continue; // cnt = c / a[i]; // c = c % a[i]; // tmp = a[i]; // printf("<B>i:%d a[i]:%lld %lld\n", i,a[i],c); // // } // } // printf("%lld\n",ans); // return 0; //} // // ////AGC 011 A-Airport Bus //double d_asort(const void* a, const void* b); //double d_asort(const void* a, const void* b) { // return(*(double*)a - *(double*)b); //} //double t[100001]; //int main(void) { // int n,c,k; // // scanf("%d%d%d", &n,&c,&k); // for (int i = 0; i < n; i++) // scanf("%lf", &t[i]); // // qsort(t, n, sizeof(double), d_asort); // // int cnt = 0; // double f; // for (int i = 0; i < n; i++) { // // // // ans += (a[i] - tmp) * (a[i] - tmp); // // printf("%d\n", ans); //} //C - Average Length static int x[9], y[9]; int main(void) { int i,n; double ans=0; scanf("%d",&n); for (i = 0; i < n; i++) scanf("%d%d", &x[i],&y[i]); x[n] = x[0]; y[n] = y[0]; int cnt = 0; for (i = 0; i < n - 1; i++) { for (int j = i + 1; j < n; j++) { ans += dist(x[i],y[i],x[j],y[j]); cnt++; } } printf("%.7lf \n",ans/cnt*((double)n-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271047/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271047/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d%d\00", align 1 @x = internal global [9 x i32] zeroinitializer, align 16 @y = internal global [9 x i32] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [8 x i8] c"%.7lf \0A\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_asort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #17 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @s_dsort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #0 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #17 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @i_dsort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @i_asort(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #2 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @i_gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { 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 @i_lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #3 { entry: %tobool.not4.i = icmp eq i32 %b, 0 br i1 %tobool.not4.i, label %i_gcd.exit, label %if.end.i if.end.i: ; preds = %entry, %if.end.i %b.tr6.i = phi i32 [ %rem.i, %if.end.i ], [ %b, %entry ] %a.tr5.i = phi i32 [ %b.tr6.i, %if.end.i ], [ %a, %entry ] %rem.i = srem i32 %a.tr5.i, %b.tr6.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %i_gcd.exit, label %if.end.i i_gcd.exit: ; preds = %if.end.i, %entry %a.tr.lcssa.i = phi i32 [ %a, %entry ], [ %b.tr6.i, %if.end.i ] %mul = mul nsw i32 %b, %a %div = sdiv i32 %mul, %a.tr.lcssa.i ret i32 %div } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @ll_gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %tobool.not4 = icmp eq i64 %b, 0 br i1 %tobool.not4, label %if.then, label %if.end if.then: ; preds = %if.end, %entry %a.tr.lcssa = phi i64 [ %a, %entry ], [ %b.tr6, %if.end ] %conv = trunc i64 %a.tr.lcssa to i32 ret i32 %conv if.end: ; preds = %entry, %if.end %b.tr6 = phi i64 [ %rem, %if.end ], [ %b, %entry ] %a.tr5 = phi i64 [ %b.tr6, %if.end ], [ %a, %entry ] %rem = srem i64 %a.tr5, %b.tr6 %tobool.not = icmp eq i64 %rem, 0 br i1 %tobool.not, label %if.then, label %if.end } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @ll_lcm(i64 noundef %a, i64 noundef %b) local_unnamed_addr #3 { entry: %tobool.not4.i = icmp eq i64 %b, 0 br i1 %tobool.not4.i, label %ll_gcd.exit, label %if.end.i if.end.i: ; preds = %entry, %if.end.i %b.tr6.i = phi i64 [ %rem.i, %if.end.i ], [ %b, %entry ] %a.tr5.i = phi i64 [ %b.tr6.i, %if.end.i ], [ %a, %entry ] %rem.i = srem i64 %a.tr5.i, %b.tr6.i %tobool.not.i = icmp eq i64 %rem.i, 0 br i1 %tobool.not.i, label %ll_gcd.exit, label %if.end.i ll_gcd.exit: ; preds = %if.end.i, %entry %a.tr.lcssa.i = phi i64 [ %a, %entry ], [ %b.tr6.i, %if.end.i ] %mul = mul nsw i64 %b, %a %sext = shl i64 %a.tr.lcssa.i, 32 %conv = ashr exact i64 %sext, 32 %div = sdiv i64 %mul, %conv %conv1 = trunc i64 %div to i32 ret i32 %conv1 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @_swp(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %b, align 4, !tbaa !5 %1 = load i32, ptr %a, align 4, !tbaa !5 store i32 %1, ptr %b, align 4, !tbaa !5 store i32 %0, ptr %a, align 4, !tbaa !5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #5 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #5 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @_cknum(ptr nocapture noundef readonly %a, i32 noundef %n) local_unnamed_addr #6 { entry: %cmp13 = icmp sgt i32 %n, 0 br i1 %cmp13, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.cond: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !9 for.body: ; preds = %for.body.preheader, %for.cond %indvars.iv = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.cond ] %arrayidx = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %0 = load i8, ptr %arrayidx, align 1, !tbaa !11 %1 = add i8 %0, -58 %or.cond = icmp ult i8 %1, -10 br i1 %or.cond, label %cleanup, label %for.cond cleanup: ; preds = %for.body, %for.cond, %entry %retval.0 = phi i32 [ 0, %entry ], [ 0, %for.cond ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: mustprogress nofree nounwind willreturn uwtable define dso_local i32 @_atoi(ptr nocapture noundef readonly %s, i32 noundef %len) local_unnamed_addr #7 { entry: %tmp = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %tmp) #18 %conv = sext i32 %len to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 16 %tmp, ptr align 1 %s, i64 %conv, i1 false) %arrayidx = getelementptr inbounds [20 x i8], ptr %tmp, i64 0, i64 %conv store i8 0, ptr %arrayidx, align 1, !tbaa !11 %call.i = call i64 @strtol(ptr nocapture noundef nonnull %tmp, ptr noundef null, i32 noundef 10) #18 %conv.i = trunc i64 %call.i to i32 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %tmp) #18 ret i32 %conv.i } ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #8 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local double @dist(i32 noundef %x1, i32 noundef %y1, i32 noundef %x2, i32 noundef %y2) local_unnamed_addr #9 { entry: %sub = sub nsw i32 %x1, %x2 %sub1 = sub nsw i32 %y1, %y2 %conv = sitofp i32 %sub to double %conv3 = sitofp i32 %sub1 to double %mul5 = fmul double %conv3, %conv3 %0 = tail call double @llvm.fmuladd.f64(double %conv, double %conv, double %mul5) %sqrt = tail call double @llvm.sqrt.f64(double %0) ret double %sqrt } ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #10 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite) uwtable define dso_local i32 @_sort(ptr nocapture noundef %a, ptr nocapture noundef readonly %b) local_unnamed_addr #11 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #17 %sext = shl i32 %call, 24 %cmp = icmp eq i32 %sext, 0 br i1 %cmp, label %if.then, label %if.end if.then: ; preds = %entry store i8 0, ptr %a, align 1, !tbaa !11 br label %cleanup if.end: ; preds = %entry %conv1 = ashr exact i32 %sext, 24 br label %cleanup cleanup: ; preds = %if.end, %if.then %retval.0 = phi i32 [ 1, %if.then ], [ %conv1, %if.end ] ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @bitcount(i32 noundef %uc) local_unnamed_addr #3 { entry: %cmp.not5 = icmp eq i32 %uc, 0 br i1 %cmp.not5, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %bit.07 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %uc.addr.06 = phi i32 [ %shr, %for.body ], [ %uc, %entry ] %and = and i32 %uc.addr.06, 1 %spec.select = add i32 %bit.07, %and %shr = lshr i32 %uc.addr.06, 1 %cmp.not = icmp ult i32 %uc.addr.06, 2 br i1 %cmp.not, label %for.end, label %for.body, !llvm.loop !12 for.end: ; preds = %for.body, %entry %bit.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %for.body ] ret i32 %bit.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @_sumdig(i32 noundef %n) local_unnamed_addr #3 { entry: %cmp4 = icmp sgt i32 %n, 0 br i1 %cmp4, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %sum.06 = phi i32 [ %add, %while.body ], [ 0, %entry ] %n.addr.05 = phi i32 [ %div, %while.body ], [ %n, %entry ] %rem = urem i32 %n.addr.05, 10 %add = add nuw nsw i32 %sum.06, %rem %div = udiv i32 %n.addr.05, 10 %cmp.not = icmp ult i32 %n.addr.05, 10 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !13 while.end: ; preds = %while.body, %entry %sum.0.lcssa = phi i32 [ 0, %entry ], [ %add, %while.body ] ret i32 %sum.0.lcssa } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @combi(i32 noundef %n, i32 noundef %r) local_unnamed_addr #12 { entry: %cmp10 = icmp eq i32 %r, 0 %cmp111 = icmp eq i32 %r, %n %or.cond12 = or i1 %cmp10, %cmp111 br i1 %or.cond12, label %return, label %if.end if.end: ; preds = %entry, %if.end %r.tr15 = phi i32 [ %sub3, %if.end ], [ %r, %entry ] %n.tr14 = phi i32 [ %sub, %if.end ], [ %n, %entry ] %accumulator.tr13 = phi i32 [ %add, %if.end ], [ 0, %entry ] %sub = add nsw i32 %n.tr14, -1 %call = tail call i32 @combi(i32 noundef %sub, i32 noundef %r.tr15) %sub3 = add nsw i32 %r.tr15, -1 %add = add nsw i32 %call, %accumulator.tr13 %cmp = icmp eq i32 %sub3, 0 %cmp1 = icmp eq i32 %r.tr15, %n.tr14 %or.cond = or i1 %cmp, %cmp1 br i1 %or.cond, label %return.loopexit, label %if.end return.loopexit: ; preds = %if.end %0 = add nsw i32 %add, 1 br label %return return: ; preds = %return.loopexit, %entry %accumulator.tr.lcssa = phi i32 [ 1, %entry ], [ %0, %return.loopexit ] ret i32 %accumulator.tr.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #13 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #18 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp47 = icmp sgt i32 %0, 0 br i1 %cmp47, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %.pre = sext i32 %0 to i64 br label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [9 x i32], ptr @x, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [9 x i32], ptr @y, i64 0, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !14 for.end: ; preds = %for.body, %entry.for.end_crit_edge %idxprom4.pre-phi = phi i64 [ %.pre, %entry.for.end_crit_edge ], [ %2, %for.body ] %.lcssa = phi i32 [ %0, %entry.for.end_crit_edge ], [ %1, %for.body ] %3 = load i32, ptr @x, align 16, !tbaa !5 %arrayidx5 = getelementptr inbounds [9 x i32], ptr @x, i64 0, i64 %idxprom4.pre-phi store i32 %3, ptr %arrayidx5, align 4, !tbaa !5 %4 = load i32, ptr @y, align 16, !tbaa !5 %arrayidx7 = getelementptr inbounds [9 x i32], ptr @y, i64 0, i64 %idxprom4.pre-phi store i32 %4, ptr %arrayidx7, align 4, !tbaa !5 %cmp955 = icmp sgt i32 %.lcssa, 1 br i1 %cmp955, label %for.body10.preheader, label %for.end30 for.body10.preheader: ; preds = %for.end %sub = add nsw i32 %.lcssa, -1 %wide.trip.count73 = zext i32 %sub to i64 %wide.trip.count = zext i32 %.lcssa to i64 br label %for.body10 for.cond8.loopexit.loopexit: ; preds = %for.body13 %5 = add i32 %cnt.058, %indvars.iv67 br label %for.cond8.loopexit for.cond8.loopexit: ; preds = %for.cond8.loopexit.loopexit, %for.body10 %ans.1.lcssa = phi double [ %ans.057, %for.body10 ], [ %add23, %for.cond8.loopexit.loopexit ] %cnt.1.lcssa = phi i32 [ %cnt.058, %for.body10 ], [ %5, %for.cond8.loopexit.loopexit ] %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %indvars.iv.next68 = add i32 %indvars.iv67, -1 %exitcond74.not = icmp eq i64 %indvars.iv.next71, %wide.trip.count73 br i1 %exitcond74.not, label %for.end30.loopexit, label %for.body10, !llvm.loop !15 for.body10: ; preds = %for.body10.preheader, %for.cond8.loopexit %indvars.iv70 = phi i64 [ 0, %for.body10.preheader ], [ %indvars.iv.next71, %for.cond8.loopexit ] %indvars.iv67 = phi i32 [ %sub, %for.body10.preheader ], [ %indvars.iv.next68, %for.cond8.loopexit ] %indvars.iv63 = phi i64 [ 1, %for.body10.preheader ], [ %indvars.iv.next64, %for.cond8.loopexit ] %cnt.058 = phi i32 [ 0, %for.body10.preheader ], [ %cnt.1.lcssa, %for.cond8.loopexit ] %ans.057 = phi double [ 0.000000e+00, %for.body10.preheader ], [ %ans.1.lcssa, %for.cond8.loopexit ] %indvars.iv.next71 = add nuw nsw i64 %indvars.iv70, 1 %cmp1249 = icmp slt i64 %indvars.iv.next71, %idxprom4.pre-phi br i1 %cmp1249, label %for.body13.lr.ph, label %for.cond8.loopexit for.body13.lr.ph: ; preds = %for.body10 %arrayidx15 = getelementptr inbounds [9 x i32], ptr @x, i64 0, i64 %indvars.iv70 %6 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %arrayidx17 = getelementptr inbounds [9 x i32], ptr @y, i64 0, i64 %indvars.iv70 %7 = load i32, ptr %arrayidx17, align 4, !tbaa !5 br label %for.body13 for.body13: ; preds = %for.body13.lr.ph, %for.body13 %indvars.iv65 = phi i64 [ %indvars.iv63, %for.body13.lr.ph ], [ %indvars.iv.next66, %for.body13 ] %ans.150 = phi double [ %ans.057, %for.body13.lr.ph ], [ %add23, %for.body13 ] %arrayidx19 = getelementptr inbounds [9 x i32], ptr @x, i64 0, i64 %indvars.iv65 %8 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %arrayidx21 = getelementptr inbounds [9 x i32], ptr @y, i64 0, i64 %indvars.iv65 %9 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %sub.i = sub nsw i32 %6, %8 %sub1.i = sub nsw i32 %7, %9 %conv.i = sitofp i32 %sub.i to double %conv3.i = sitofp i32 %sub1.i to double %mul5.i = fmul double %conv3.i, %conv3.i %10 = call double @llvm.fmuladd.f64(double %conv.i, double %conv.i, double %mul5.i) %sqrt.i = call double @llvm.sqrt.f64(double %10) %add23 = fadd double %ans.150, %sqrt.i %indvars.iv.next66 = add nuw nsw i64 %indvars.iv65, 1 %exitcond.not = icmp eq i64 %indvars.iv.next66, %wide.trip.count br i1 %exitcond.not, label %for.cond8.loopexit.loopexit, label %for.body13, !llvm.loop !16 for.end30.loopexit: ; preds = %for.cond8.loopexit %11 = sitofp i32 %cnt.1.lcssa to double %12 = fdiv double %ans.1.lcssa, %11 br label %for.end30 for.end30: ; preds = %for.end30.loopexit, %for.end %div = phi double [ 0x7FF8000000000000, %for.end ], [ %12, %for.end30.loopexit ] %conv31 = sitofp i32 %.lcssa to double %sub32 = fadd double %conv31, -1.000000e+00 %mul = fmul double %sub32, %div %call33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %mul) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #18 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #14 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #14 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.sqrt.f64(double) #16 attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #6 = { 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 #7 = { mustprogress nofree nounwind willreturn uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #9 = { 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 #10 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #12 = { 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 #13 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { nofree nounwind "no-trapping-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 = { 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 #16 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #17 = { nounwind willreturn memory(read) } attributes #18 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include <stdio.h> #include <math.h> int main() { int N, x[8], y[8]; double ans = 0; scanf("%d",&N); for (int i = 0; i < N; i++) { scanf("%d%d", &x[i], &y[i]); } for (int i = 0; i < N; i++) { for (int j = i + 1; j < N; j++) { double X = (double)x[i] - x[j]; double Y = (double)y[i] - y[j]; ans = ans + sqrt(pow(X , 2) + pow(Y , 2)); } } printf("%f", ans / N * 2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271090/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271090/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"%f\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %x = alloca [8 x i32], align 16 %y = alloca [8 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %y) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp50 = icmp sgt i32 %0, 0 br i1 %cmp50, label %for.body, label %for.cond.cleanup7 for.cond5.preheader: ; preds = %for.body %cmp655 = icmp sgt i32 %2, 0 br i1 %cmp655, label %for.body8.lr.ph, label %for.cond.cleanup7 for.body8.lr.ph: ; preds = %for.cond5.preheader %1 = zext i32 %2 to i64 %wide.trip.count69 = zext i32 %2 to i64 br label %for.body8 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [8 x i32], ptr %x, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [8 x i32], ptr %y, i64 0, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %N, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.cond5.preheader, !llvm.loop !9 for.cond5.loopexit: ; preds = %for.body12, %for.body8 %ans.1.lcssa = phi double [ %ans.057, %for.body8 ], [ %add29, %for.body12 ] %indvars.iv.next62 = add nuw nsw i64 %indvars.iv61, 1 %exitcond70.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count69 br i1 %exitcond70.not, label %for.cond.cleanup7, label %for.body8, !llvm.loop !11 for.cond.cleanup7: ; preds = %for.cond5.loopexit, %entry, %for.cond5.preheader %4 = phi i32 [ %2, %for.cond5.preheader ], [ %0, %entry ], [ %2, %for.cond5.loopexit ] %ans.0.lcssa = phi double [ 0.000000e+00, %for.cond5.preheader ], [ 0.000000e+00, %entry ], [ %ans.1.lcssa, %for.cond5.loopexit ] %conv36 = sitofp i32 %4 to double %div = fdiv double %ans.0.lcssa, %conv36 %mul = fmul double %div, 2.000000e+00 %call37 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %mul) call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 for.body8: ; preds = %for.body8.lr.ph, %for.cond5.loopexit %indvars.iv66 = phi i64 [ 0, %for.body8.lr.ph ], [ %indvars.iv.next67, %for.cond5.loopexit ] %indvars.iv61 = phi i64 [ 1, %for.body8.lr.ph ], [ %indvars.iv.next62, %for.cond5.loopexit ] %ans.057 = phi double [ 0.000000e+00, %for.body8.lr.ph ], [ %ans.1.lcssa, %for.cond5.loopexit ] %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %cmp1052 = icmp ult i64 %indvars.iv.next67, %1 br i1 %cmp1052, label %for.body12.lr.ph, label %for.cond5.loopexit for.body12.lr.ph: ; preds = %for.body8 %arrayidx14 = getelementptr inbounds [8 x i32], ptr %x, i64 0, i64 %indvars.iv66 %5 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %arrayidx19 = getelementptr inbounds [8 x i32], ptr %y, i64 0, i64 %indvars.iv66 %6 = load i32, ptr %arrayidx19, align 4, !tbaa !5 %7 = insertelement <2 x i32> poison, i32 %5, i64 0 %8 = insertelement <2 x i32> %7, i32 %6, i64 1 %9 = sitofp <2 x i32> %8 to <2 x double> br label %for.body12 for.body12: ; preds = %for.body12.lr.ph, %for.body12 %indvars.iv63 = phi i64 [ %indvars.iv61, %for.body12.lr.ph ], [ %indvars.iv.next64, %for.body12 ] %ans.154 = phi double [ %ans.057, %for.body12.lr.ph ], [ %add29, %for.body12 ] %arrayidx16 = getelementptr inbounds [8 x i32], ptr %x, i64 0, i64 %indvars.iv63 %10 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %arrayidx22 = getelementptr inbounds [8 x i32], ptr %y, i64 0, i64 %indvars.iv63 %11 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %12 = insertelement <2 x i32> poison, i32 %10, i64 0 %13 = insertelement <2 x i32> %12, i32 %11, i64 1 %14 = sitofp <2 x i32> %13 to <2 x double> %15 = fsub <2 x double> %9, %14 %16 = fmul <2 x double> %15, %15 %shift = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> <i32 1, i32 poison> %17 = fadd <2 x double> %16, %shift %add27 = extractelement <2 x double> %17, i64 0 %sqrt = call double @llvm.sqrt.f64(double %add27) %add29 = fadd double %ans.154, %sqrt %indvars.iv.next64 = add nuw nsw i64 %indvars.iv63, 1 %exitcond.not = icmp eq i64 %indvars.iv.next64, %wide.trip.count69 br i1 %exitcond.not, label %for.cond5.loopexit, label %for.body12, !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 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 double @llvm.sqrt.f64(double) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <math.h> #include <stdio.h> #define N 8 int next(int n, int *pp) { int i, j, tmp; for (i = n - 2; i >= 0; i--) if (pp[i] < pp[i + 1]) break; if (i < 0) return 0; for (j = n - 1; j >= 0; j--) if (pp[i] < pp[j]) break; tmp = pp[i], pp[i] = pp[j], pp[j] = tmp; for (i++, j = n - 1; i < j; i++, j--) tmp = pp[i], pp[i] = pp[j], pp[j] = tmp; return 1; } int main() { static int xx[N], yy[N], ii[N]; int n, i, fac; double ans; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d%d", &xx[i], &yy[i]); for (i = 0; i < n; i++) ii[i] = i; ans = 0; do { for (i = 0; i + 1 < n; i++) ans += hypot(xx[ii[i]] - xx[ii[i + 1]], yy[ii[i]] - yy[ii[i + 1]]); } while (next(n, ii)); fac = 1; while (n--) fac *= (n + 1); printf("%.10f\n", ans / fac); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271133/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271133/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @main.xx = internal global [8 x i32] zeroinitializer, align 16 @main.yy = internal global [8 x i32] zeroinitializer, align 16 @main.ii = internal unnamed_addr global [8 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%.10f\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @next(i32 noundef %n, ptr nocapture noundef %pp) local_unnamed_addr #0 { entry: %cmp84 = icmp sgt i32 %n, 1 br i1 %cmp84, label %for.body.preheader, label %cleanup for.body.preheader: ; preds = %entry %sub = add nsw i32 %n, -2 %0 = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %indvars.iv.in = phi i64 [ %0, %for.body.preheader ], [ %indvars.iv, %for.inc ] %i.085 = phi i32 [ %sub, %for.body.preheader ], [ %dec, %for.inc ] %indvars.iv = add nsw i64 %indvars.iv.in, -1 %idxprom = zext i32 %i.085 to i64 %arrayidx = getelementptr inbounds i32, ptr %pp, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nuw nsw i32 %i.085, 1 %idxprom1 = zext i32 %add to i64 %arrayidx2 = getelementptr inbounds i32, ptr %pp, i64 %idxprom1 %2 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp3 = icmp slt i32 %1, %2 br i1 %cmp3, label %if.end6, label %for.inc for.inc: ; preds = %for.body %dec = add nsw i32 %i.085, -1 %cmp = icmp sgt i32 %i.085, 0 br i1 %cmp, label %for.body, label %cleanup, !llvm.loop !9 if.end6: ; preds = %for.body %arrayidx.le = getelementptr inbounds i32, ptr %pp, i64 %idxprom %sub7 = add i32 %n, -1 %cmp986 = icmp sgt i32 %n, 0 br i1 %cmp986, label %for.body10, label %for.end20 for.body10: ; preds = %if.end6, %for.inc18 %j.087 = phi i32 [ %dec19, %for.inc18 ], [ %sub7, %if.end6 ] %idxprom13 = zext i32 %j.087 to i64 %arrayidx14 = getelementptr inbounds i32, ptr %pp, i64 %idxprom13 %3 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %cmp15 = icmp slt i32 %1, %3 br i1 %cmp15, label %for.end20, label %for.inc18 for.inc18: ; preds = %for.body10 %dec19 = add nsw i32 %j.087, -1 %cmp9 = icmp sgt i32 %j.087, 0 br i1 %cmp9, label %for.body10, label %for.end20, !llvm.loop !11 for.end20: ; preds = %for.inc18, %for.body10, %if.end6 %j.0.lcssa = phi i32 [ %sub7, %if.end6 ], [ %j.087, %for.body10 ], [ -1, %for.inc18 ] %idxprom23 = sext i32 %j.0.lcssa to i64 %arrayidx24 = getelementptr inbounds i32, ptr %pp, i64 %idxprom23 %4 = load i32, ptr %arrayidx24, align 4, !tbaa !5 store i32 %4, ptr %arrayidx.le, align 4, !tbaa !5 store i32 %1, ptr %arrayidx24, align 4, !tbaa !5 %cmp3190 = icmp slt i32 %add, %sub7 br i1 %cmp3190, label %for.body32.preheader, label %cleanup for.body32.preheader: ; preds = %for.end20 %5 = sext i32 %sub7 to i64 br label %for.body32 for.body32: ; preds = %for.body32.preheader, %for.body32 %indvars.iv98 = phi i64 [ %5, %for.body32.preheader ], [ %indvars.iv.next99, %for.body32 ] %indvars.iv96 = phi i64 [ %indvars.iv, %for.body32.preheader ], [ %indvars.iv.next97, %for.body32 ] %arrayidx34 = getelementptr inbounds i32, ptr %pp, i64 %indvars.iv96 %6 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %arrayidx36 = getelementptr inbounds i32, ptr %pp, i64 %indvars.iv98 %7 = load i32, ptr %arrayidx36, align 4, !tbaa !5 store i32 %7, ptr %arrayidx34, align 4, !tbaa !5 store i32 %6, ptr %arrayidx36, align 4, !tbaa !5 %indvars.iv.next99 = add nsw i64 %indvars.iv98, -1 %indvars.iv.next97 = add nsw i64 %indvars.iv96, 1 %cmp31 = icmp slt i64 %indvars.iv.next97, %indvars.iv.next99 br i1 %cmp31, label %for.body32, label %cleanup, !llvm.loop !12 cleanup: ; preds = %for.inc, %for.body32, %entry, %for.end20 %retval.0 = phi i32 [ 1, %for.end20 ], [ 0, %entry ], [ 1, %for.body32 ], [ 0, %for.inc ] ret i32 %retval.0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp72 = icmp sgt i32 %0, 0 br i1 %cmp72, label %for.body, label %do.body.preheader for.cond4.preheader: ; preds = %for.body %cmp574 = icmp sgt i32 %4, 0 br i1 %cmp574, label %for.body6.preheader, label %do.body.preheader for.body6.preheader: ; preds = %for.cond4.preheader %wide.trip.count = zext i32 %4 to i64 %min.iters.check = icmp ult i32 %4, 8 br i1 %min.iters.check, label %for.body6.preheader168, label %vector.ph vector.ph: ; preds = %for.body6.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %vector.ph ], [ %vec.ind.next, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %1 = getelementptr inbounds [8 x i32], ptr @main.ii, i64 0, i64 %index store <4 x i32> %vec.ind, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> %step.add, ptr %2, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %3 = icmp eq i64 %index.next, %n.vec br i1 %3, label %middle.block, label %vector.body, !llvm.loop !13 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %do.body.preheader, label %for.body6.preheader168 for.body6.preheader168: ; preds = %for.body6.preheader, %middle.block %indvars.iv100.ph = phi i64 [ 0, %for.body6.preheader ], [ %n.vec, %middle.block ] br label %for.body6 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [8 x i32], ptr @main.xx, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [8 x i32], ptr @main.yy, i64 0, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !16 do.body.preheader: ; preds = %for.body6, %middle.block, %entry, %for.cond4.preheader %.lcssa71112 = phi i32 [ %4, %for.cond4.preheader ], [ %0, %entry ], [ %4, %middle.block ], [ %4, %for.body6 ] %cmp1376134 = icmp sgt i32 %.lcssa71112, 1 br i1 %cmp1376134, label %for.body14, label %while.condthread-pre-split for.body6: ; preds = %for.body6.preheader168, %for.body6 %indvars.iv100 = phi i64 [ %indvars.iv.next101, %for.body6 ], [ %indvars.iv100.ph, %for.body6.preheader168 ] %arrayidx8 = getelementptr inbounds [8 x i32], ptr @main.ii, i64 0, i64 %indvars.iv100 %6 = trunc i64 %indvars.iv100 to i32 store i32 %6, ptr %arrayidx8, align 4, !tbaa !5 %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1 %exitcond.not = icmp eq i64 %indvars.iv.next101, %wide.trip.count br i1 %exitcond.not, label %do.body.preheader, label %for.body6, !llvm.loop !17 for.body14: ; preds = %do.body.preheader, %for.body14.backedge %indvars.iv105 = phi i64 [ %indvars.iv105.be, %for.body14.backedge ], [ 0, %do.body.preheader ] %indvars.iv103 = phi i64 [ %indvars.iv103.be, %for.body14.backedge ], [ 1, %do.body.preheader ] %ans.178 = phi double [ %add36, %for.body14.backedge ], [ 0.000000e+00, %do.body.preheader ] %indvars.iv.next106 = add nuw nsw i64 %indvars.iv105, 1 %arrayidx16 = getelementptr inbounds [8 x i32], ptr @main.ii, i64 0, i64 %indvars.iv105 %7 = load i32, ptr %arrayidx16, align 4, !tbaa !5 %idxprom17 = sext i32 %7 to i64 %arrayidx18 = getelementptr inbounds [8 x i32], ptr @main.xx, i64 0, i64 %idxprom17 %8 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %arrayidx21 = getelementptr inbounds [8 x i32], ptr @main.ii, i64 0, i64 %indvars.iv103 %9 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %idxprom22 = sext i32 %9 to i64 %arrayidx23 = getelementptr inbounds [8 x i32], ptr @main.xx, i64 0, i64 %idxprom22 %10 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %sub = sub nsw i32 %8, %10 %conv = sitofp i32 %sub to double %arrayidx27 = getelementptr inbounds [8 x i32], ptr @main.yy, i64 0, i64 %idxprom17 %11 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %arrayidx32 = getelementptr inbounds [8 x i32], ptr @main.yy, i64 0, i64 %idxprom22 %12 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %sub33 = sub nsw i32 %11, %12 %conv34 = sitofp i32 %sub33 to double %call35 = call double @hypot(double noundef %conv, double noundef %conv34) #6 %add36 = fadd double %ans.178, %call35 %indvars.iv.next104 = add nuw nsw i64 %indvars.iv103, 1 %13 = load i32, ptr %n, align 4, !tbaa !5 %14 = sext i32 %13 to i64 %cmp13 = icmp slt i64 %indvars.iv.next104, %14 br i1 %cmp13, label %for.body14.backedge, label %do.cond for.body14.backedge: ; preds = %for.body14, %next.exit %indvars.iv105.be = phi i64 [ %indvars.iv.next106, %for.body14 ], [ 0, %next.exit ] %indvars.iv103.be = phi i64 [ %indvars.iv.next104, %for.body14 ], [ 1, %next.exit ] br label %for.body14, !llvm.loop !18 do.cond: ; preds = %for.body14 %cmp84.i = icmp sgt i32 %13, 1 br i1 %cmp84.i, label %for.body.preheader.i, label %while.condthread-pre-split for.body.preheader.i: ; preds = %do.cond %sub.i = add nsw i32 %13, -2 %15 = zext i32 %13 to i64 br label %for.body.i for.body.i: ; preds = %for.inc.i, %for.body.preheader.i %indvars.iv.in.i = phi i64 [ %15, %for.body.preheader.i ], [ %indvars.iv.i, %for.inc.i ] %i.085.i = phi i32 [ %sub.i, %for.body.preheader.i ], [ %dec.i, %for.inc.i ] %indvars.iv.i = add nsw i64 %indvars.iv.in.i, -1 %idxprom.i = zext i32 %i.085.i to i64 %arrayidx.i = getelementptr inbounds i32, ptr @main.ii, i64 %idxprom.i %16 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %add.i = add nuw nsw i32 %i.085.i, 1 %idxprom1.i = zext i32 %add.i to i64 %arrayidx2.i = getelementptr inbounds i32, ptr @main.ii, i64 %idxprom1.i %17 = load i32, ptr %arrayidx2.i, align 4, !tbaa !5 %cmp3.i = icmp slt i32 %16, %17 br i1 %cmp3.i, label %if.end6.i, label %for.inc.i for.inc.i: ; preds = %for.body.i %dec.i = add nsw i32 %i.085.i, -1 %cmp.i = icmp sgt i32 %i.085.i, 0 br i1 %cmp.i, label %for.body.i, label %while.condthread-pre-split, !llvm.loop !9 if.end6.i: ; preds = %for.body.i %sub7.i = add i32 %13, -1 br label %for.body10.i for.body10.i: ; preds = %if.end6.i, %for.inc18.i %j.087.i = phi i32 [ %dec19.i, %for.inc18.i ], [ %sub7.i, %if.end6.i ] %idxprom13.i = zext i32 %j.087.i to i64 %arrayidx14.i = getelementptr inbounds i32, ptr @main.ii, i64 %idxprom13.i %18 = load i32, ptr %arrayidx14.i, align 4, !tbaa !5 %cmp15.i = icmp slt i32 %16, %18 br i1 %cmp15.i, label %for.end20.i, label %for.inc18.i for.inc18.i: ; preds = %for.body10.i %dec19.i = add nsw i32 %j.087.i, -1 %cmp9.i = icmp sgt i32 %j.087.i, 0 br i1 %cmp9.i, label %for.body10.i, label %for.end20.i, !llvm.loop !11 for.end20.i: ; preds = %for.inc18.i, %for.body10.i %j.0.lcssa.i.ph = phi i32 [ -1, %for.inc18.i ], [ %j.087.i, %for.body10.i ] %idxprom23.i = sext i32 %j.0.lcssa.i.ph to i64 %arrayidx24.i = getelementptr inbounds i32, ptr @main.ii, i64 %idxprom23.i %19 = load i32, ptr %arrayidx24.i, align 4, !tbaa !5 store i32 %19, ptr %arrayidx.i, align 4, !tbaa !5 store i32 %16, ptr %arrayidx24.i, align 4, !tbaa !5 %cmp3190.i = icmp slt i32 %add.i, %sub7.i br i1 %cmp3190.i, label %for.body32.preheader.i, label %next.exit for.body32.preheader.i: ; preds = %for.end20.i %20 = sext i32 %sub7.i to i64 br label %for.body32.i for.body32.i: ; preds = %for.body32.i, %for.body32.preheader.i %indvars.iv98.i = phi i64 [ %20, %for.body32.preheader.i ], [ %indvars.iv.next99.i, %for.body32.i ] %indvars.iv96.i = phi i64 [ %indvars.iv.i, %for.body32.preheader.i ], [ %indvars.iv.next97.i, %for.body32.i ] %arrayidx34.i = getelementptr inbounds i32, ptr @main.ii, i64 %indvars.iv96.i %21 = load i32, ptr %arrayidx34.i, align 4, !tbaa !5 %arrayidx36.i = getelementptr inbounds i32, ptr @main.ii, i64 %indvars.iv98.i %22 = load i32, ptr %arrayidx36.i, align 4, !tbaa !5 store i32 %22, ptr %arrayidx34.i, align 4, !tbaa !5 store i32 %21, ptr %arrayidx36.i, align 4, !tbaa !5 %indvars.iv.next99.i = add nsw i64 %indvars.iv98.i, -1 %indvars.iv.next97.i = add nsw i64 %indvars.iv96.i, 1 %cmp31.i = icmp slt i64 %indvars.iv.next97.i, %indvars.iv.next99.i br i1 %cmp31.i, label %for.body32.i, label %next.exit, !llvm.loop !12 next.exit: ; preds = %for.body32.i, %for.end20.i %cmp1376 = icmp sgt i32 %13, 1 br i1 %cmp1376, label %for.body14.backedge, label %while.condthread-pre-split while.condthread-pre-split: ; preds = %do.cond, %next.exit, %for.inc.i, %do.body.preheader %ans.1.lcssa118 = phi double [ 0.000000e+00, %do.body.preheader ], [ %add36, %for.inc.i ], [ %add36, %next.exit ], [ %add36, %do.cond ] %.pr116 = phi i32 [ %.lcssa71112, %do.body.preheader ], [ %13, %for.inc.i ], [ %13, %next.exit ], [ %13, %do.cond ] %tobool41.not83 = icmp eq i32 %.pr116, 0 br i1 %tobool41.not83, label %while.end, label %while.body.preheader while.body.preheader: ; preds = %while.condthread-pre-split %min.iters.check142 = icmp ult i32 %.pr116, 8 br i1 %min.iters.check142, label %while.body.preheader156, label %vector.ph143 vector.ph143: ; preds = %while.body.preheader %n.vec145 = and i32 %.pr116, -8 %ind.end = and i32 %.pr116, 7 %.splatinsert = insertelement <4 x i32> poison, i32 %.pr116, i64 0 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %induction = add <4 x i32> %.splat, <i32 0, i32 -1, i32 -2, i32 -3> br label %vector.body148 vector.body148: ; preds = %vector.body148, %vector.ph143 %index149 = phi i32 [ 0, %vector.ph143 ], [ %index.next155, %vector.body148 ] %vec.phi = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph143 ], [ %23, %vector.body148 ] %vec.phi150 = phi <4 x i32> [ <i32 1, i32 1, i32 1, i32 1>, %vector.ph143 ], [ %24, %vector.body148 ] %vec.ind151 = phi <4 x i32> [ %induction, %vector.ph143 ], [ %vec.ind.next154, %vector.body148 ] %step.add152 = add <4 x i32> %vec.ind151, <i32 -4, i32 -4, i32 -4, i32 -4> %23 = mul <4 x i32> %vec.phi, %vec.ind151 %24 = mul <4 x i32> %vec.phi150, %step.add152 %index.next155 = add nuw i32 %index149, 8 %vec.ind.next154 = add <4 x i32> %vec.ind151, <i32 -8, i32 -8, i32 -8, i32 -8> %25 = icmp eq i32 %index.next155, %n.vec145 br i1 %25, label %middle.block140, label %vector.body148, !llvm.loop !19 middle.block140: ; preds = %vector.body148 %bin.rdx = mul <4 x i32> %24, %23 %26 = call i32 @llvm.vector.reduce.mul.v4i32(<4 x i32> %bin.rdx) %cmp.n147 = icmp eq i32 %.pr116, %n.vec145 br i1 %cmp.n147, label %while.end.loopexit, label %while.body.preheader156 while.body.preheader156: ; preds = %while.body.preheader, %middle.block140 %fac.084.ph = phi i32 [ 1, %while.body.preheader ], [ %26, %middle.block140 ] %.ph = phi i32 [ %.pr116, %while.body.preheader ], [ %ind.end, %middle.block140 ] br label %while.body while.body: ; preds = %while.body.preheader156, %while.body %fac.084 = phi i32 [ %mul, %while.body ], [ %fac.084.ph, %while.body.preheader156 ] %27 = phi i32 [ %dec85, %while.body ], [ %.ph, %while.body.preheader156 ] %dec85 = add nsw i32 %27, -1 %mul = mul nsw i32 %fac.084, %27 %tobool41.not = icmp eq i32 %dec85, 0 br i1 %tobool41.not, label %while.end.loopexit, label %while.body, !llvm.loop !20 while.end.loopexit: ; preds = %while.body, %middle.block140 %mul.lcssa = phi i32 [ %26, %middle.block140 ], [ %mul, %while.body ] %28 = sitofp i32 %mul.lcssa to double br label %while.end while.end: ; preds = %while.end.loopexit, %while.condthread-pre-split %fac.0.lcssa = phi double [ 1.000000e+00, %while.condthread-pre-split ], [ %28, %while.end.loopexit ] store i32 -1, ptr %n, align 4, !tbaa !5 %div = fdiv double %ans.1.lcssa118, %fac.0.lcssa %call44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nounwind declare double @hypot(double noundef, double noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #5 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !15, !14} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10, !14, !15} !20 = distinct !{!20, !10, !15, !14}
//gcc test.c -o test.out #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> int citynum = 0; int x[8],y[8]; double all_distance = 0; int all_number = 0; void city_path(int present,int next,double total_distance,char* isvisited){ double d = 0; isvisited[present] = 1; if(present!=next){ double dx = (x[present]-x[next]); double dy = (y[present]-y[next]); d = sqrt(dx*dx + dy*dy); } //printf("%d->%d:%lf\n",present,next,d); int isallvisited = 1; for(int i=0;i<citynum;i++){ if(isvisited[i]==0 && next!=i){ char isv[8]; memcpy(isv,isvisited,citynum); city_path(next,i,total_distance+d,isv); isallvisited = 0; } } if(isallvisited){ //printf("%lf\n",total_distance+d); all_distance+=(total_distance+d); all_number++; } } int main(void){ scanf("%d",&citynum); for(int i=0;i<citynum;i++){ scanf("%d %d",&x[i],&y[i]); } char isvisited[8][8]; for(int i=0;i<citynum;i++){ for(int j=0;j<citynum;j++){ isvisited[i][j] = 0; } } for(int i=0;i<citynum;i++){ city_path(i,i,0,isvisited[i]); } printf("%lf",(double)all_distance/all_number); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271177/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271177/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @citynum = dso_local global i32 0, align 4 @all_distance = dso_local local_unnamed_addr global double 0.000000e+00, align 8 @all_number = dso_local local_unnamed_addr global i32 0, align 4 @x = dso_local global [8 x i32] zeroinitializer, align 16 @y = dso_local global [8 x i32] zeroinitializer, align 16 @.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 [4 x i8] c"%lf\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable define dso_local void @city_path(i32 noundef %present, i32 noundef %next, double noundef %total_distance, ptr nocapture noundef %isvisited) local_unnamed_addr #0 { entry: %isv = alloca [8 x i8], align 1 %idxprom = sext i32 %present to i64 %arrayidx = getelementptr inbounds i8, ptr %isvisited, i64 %idxprom store i8 1, ptr %arrayidx, align 1, !tbaa !5 %cmp.not = icmp eq i32 %present, %next br i1 %cmp.not, label %if.end, label %if.then if.then: ; preds = %entry %arrayidx2 = getelementptr inbounds [8 x i32], ptr @x, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx2, align 4, !tbaa !8 %idxprom3 = sext i32 %next to i64 %arrayidx4 = getelementptr inbounds [8 x i32], ptr @x, i64 0, i64 %idxprom3 %1 = load i32, ptr %arrayidx4, align 4, !tbaa !8 %sub = sub nsw i32 %0, %1 %conv = sitofp i32 %sub to double %arrayidx6 = getelementptr inbounds [8 x i32], ptr @y, i64 0, i64 %idxprom %2 = load i32, ptr %arrayidx6, align 4, !tbaa !8 %arrayidx8 = getelementptr inbounds [8 x i32], ptr @y, i64 0, i64 %idxprom3 %3 = load i32, ptr %arrayidx8, align 4, !tbaa !8 %sub9 = sub nsw i32 %2, %3 %conv10 = sitofp i32 %sub9 to double %mul11 = fmul double %conv10, %conv10 %4 = tail call double @llvm.fmuladd.f64(double %conv, double %conv, double %mul11) %sqrt = tail call double @llvm.sqrt.f64(double %4) br label %if.end if.end: ; preds = %if.then, %entry %d.0 = phi double [ %sqrt, %if.then ], [ 0.000000e+00, %entry ] %5 = load i32, ptr @citynum, align 4, !tbaa !8 %cmp1247 = icmp sgt i32 %5, 0 br i1 %cmp1247, label %for.body.lr.ph, label %if.then25 for.body.lr.ph: ; preds = %if.end %add = fadd double %d.0, %total_distance %6 = zext i32 %next to i64 br label %for.body.outer for.body.outer: ; preds = %for.inc.thread, %for.body.lr.ph %.ph = phi i32 [ %.pre, %for.inc.thread ], [ %5, %for.body.lr.ph ] %indvars.iv.ph = phi i64 [ %indvars.iv.next53, %for.inc.thread ], [ 0, %for.body.lr.ph ] %7 = phi i1 [ true, %for.inc.thread ], [ false, %for.body.lr.ph ] %8 = sext i32 %.ph to i64 br label %for.body for.cond.cleanup: ; preds = %for.inc br i1 %7, label %if.end29, label %if.then25 for.body: ; preds = %for.body.outer, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ %indvars.iv.ph, %for.body.outer ] %arrayidx15 = getelementptr inbounds i8, ptr %isvisited, i64 %indvars.iv %9 = load i8, ptr %arrayidx15, align 1, !tbaa !5 %cmp17 = icmp ne i8 %9, 0 %cmp19.not = icmp eq i64 %indvars.iv, %6 %or.cond = or i1 %cmp19.not, %cmp17 br i1 %or.cond, label %for.inc, label %for.inc.thread for.inc: ; preds = %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %cmp12 = icmp slt i64 %indvars.iv.next, %8 br i1 %cmp12, label %for.body, label %for.cond.cleanup, !llvm.loop !10 for.inc.thread: ; preds = %for.body call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %isv) #8 %conv22 = sext i32 %.ph to i64 call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %isv, ptr nonnull align 1 %isvisited, i64 %conv22, i1 false) %10 = trunc i64 %indvars.iv to i32 call void @city_path(i32 noundef %next, i32 noundef %10, double noundef %add, ptr noundef nonnull %isv) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %isv) #8 %.pre = load i32, ptr @citynum, align 4, !tbaa !8 %indvars.iv.next53 = add nuw nsw i64 %indvars.iv, 1 %11 = sext i32 %.pre to i64 %cmp1254 = icmp slt i64 %indvars.iv.next53, %11 br i1 %cmp1254, label %for.body.outer, label %if.end29, !llvm.loop !10 if.then25: ; preds = %if.end, %for.cond.cleanup %add26 = fadd double %d.0, %total_distance %12 = load double, ptr @all_distance, align 8, !tbaa !12 %add27 = fadd double %add26, %12 store double %add27, ptr @all_distance, align 8, !tbaa !12 %13 = load i32, ptr @all_number, align 4, !tbaa !8 %inc28 = add nsw i32 %13, 1 store i32 %inc28, ptr @all_number, align 4, !tbaa !8 br label %if.end29 if.end29: ; preds = %for.inc.thread, %if.then25, %for.cond.cleanup 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 speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %isvisited = alloca [8 x [8 x i8]], align 16 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @citynum) %0 = load i32, ptr @citynum, align 4, !tbaa !8 %cmp45 = icmp sgt i32 %0, 0 br i1 %cmp45, label %for.body, label %for.cond.cleanup.thread for.cond.cleanup.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %isvisited) #8 br label %for.cond.cleanup26 for.cond.cleanup: ; preds = %for.body call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %isvisited) #8 %cmp649 = icmp sgt i32 %11, 0 br i1 %cmp649, label %for.cond9.preheader.us.preheader, label %for.cond.cleanup26 for.cond9.preheader.us.preheader: ; preds = %for.cond.cleanup %1 = zext i32 %11 to i64 %xtraiter = and i64 %1, 7 %2 = icmp ult i32 %11, 8 br i1 %2, label %for.cond24.preheader.unr-lcssa, label %for.cond9.preheader.us.preheader.new for.cond9.preheader.us.preheader.new: ; preds = %for.cond9.preheader.us.preheader %unroll_iter = and i64 %1, 4294967288 br label %for.cond9.preheader.us for.cond9.preheader.us: ; preds = %for.cond9.preheader.us, %for.cond9.preheader.us.preheader.new %indvar = phi i64 [ 0, %for.cond9.preheader.us.preheader.new ], [ %indvar.next.7, %for.cond9.preheader.us ] %niter = phi i64 [ 0, %for.cond9.preheader.us.preheader.new ], [ %niter.next.7, %for.cond9.preheader.us ] %3 = shl nuw nsw i64 %indvar, 3 %scevgep = getelementptr i8, ptr %isvisited, i64 %3 call void @llvm.memset.p0.i64(ptr align 16 %scevgep, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next = shl i64 %indvar, 3 %4 = or i64 %indvar.next, 8 %scevgep.1 = getelementptr i8, ptr %isvisited, i64 %4 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.1, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.1 = shl i64 %indvar, 3 %5 = or i64 %indvar.next.1, 16 %scevgep.2 = getelementptr i8, ptr %isvisited, i64 %5 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.2, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.2 = shl i64 %indvar, 3 %6 = or i64 %indvar.next.2, 24 %scevgep.3 = getelementptr i8, ptr %isvisited, i64 %6 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.3, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.3 = shl i64 %indvar, 3 %7 = or i64 %indvar.next.3, 32 %scevgep.4 = getelementptr i8, ptr %isvisited, i64 %7 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.4, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.4 = shl i64 %indvar, 3 %8 = or i64 %indvar.next.4, 40 %scevgep.5 = getelementptr i8, ptr %isvisited, i64 %8 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.5, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.5 = shl i64 %indvar, 3 %9 = or i64 %indvar.next.5, 48 %scevgep.6 = getelementptr i8, ptr %isvisited, i64 %9 call void @llvm.memset.p0.i64(ptr align 16 %scevgep.6, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.6 = shl i64 %indvar, 3 %10 = or i64 %indvar.next.6, 56 %scevgep.7 = getelementptr i8, ptr %isvisited, i64 %10 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.7, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.7 = add nuw nsw i64 %indvar, 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.cond24.preheader.unr-lcssa, label %for.cond9.preheader.us, !llvm.loop !14 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [8 x i32], ptr @x, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [8 x i32], ptr @y, i64 0, i64 %indvars.iv %call3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %11 = load i32, ptr @citynum, align 4, !tbaa !8 %12 = sext i32 %11 to i64 %cmp = icmp slt i64 %indvars.iv.next, %12 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !15 for.cond24.preheader.unr-lcssa: ; preds = %for.cond9.preheader.us, %for.cond9.preheader.us.preheader %indvar.unr = phi i64 [ 0, %for.cond9.preheader.us.preheader ], [ %indvar.next.7, %for.cond9.preheader.us ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond24.preheader, label %for.cond9.preheader.us.epil for.cond9.preheader.us.epil: ; preds = %for.cond24.preheader.unr-lcssa, %for.cond9.preheader.us.epil %indvar.epil = phi i64 [ %indvar.next.epil, %for.cond9.preheader.us.epil ], [ %indvar.unr, %for.cond24.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.cond9.preheader.us.epil ], [ 0, %for.cond24.preheader.unr-lcssa ] %13 = shl nuw nsw i64 %indvar.epil, 3 %scevgep.epil = getelementptr i8, ptr %isvisited, i64 %13 call void @llvm.memset.p0.i64(ptr align 8 %scevgep.epil, i8 0, i64 %1, i1 false), !tbaa !5 %indvar.next.epil = add nuw nsw i64 %indvar.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.cond24.preheader, label %for.cond9.preheader.us.epil, !llvm.loop !16 for.cond24.preheader: ; preds = %for.cond9.preheader.us.epil, %for.cond24.preheader.unr-lcssa br i1 %cmp649, label %for.body27, label %for.cond.cleanup26 for.cond.cleanup26: ; preds = %for.body27, %for.cond.cleanup, %for.cond.cleanup.thread, %for.cond24.preheader %14 = load double, ptr @all_distance, align 8, !tbaa !12 %15 = load i32, ptr @all_number, align 4, !tbaa !8 %conv = sitofp i32 %15 to double %div = fdiv double %14, %conv %call33 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, double noundef %div) call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %isvisited) #8 ret i32 0 for.body27: ; preds = %for.cond24.preheader, %for.body27 %indvars.iv59 = phi i64 [ %indvars.iv.next60, %for.body27 ], [ 0, %for.cond24.preheader ] %arrayidx29 = getelementptr inbounds [8 x [8 x i8]], ptr %isvisited, i64 0, i64 %indvars.iv59 %16 = trunc i64 %indvars.iv59 to i32 call void @city_path(i32 noundef %16, i32 noundef %16, double noundef 0.000000e+00, ptr noundef nonnull %arrayidx29) %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1 %17 = load i32, ptr @citynum, align 4, !tbaa !8 %18 = sext i32 %17 to i64 %cmp25 = icmp slt i64 %indvars.iv.next60, %18 br i1 %cmp25, label %for.body27, label %for.cond.cleanup26, !llvm.loop !18 } ; 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 double @llvm.sqrt.f64(double) #6 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #7 attributes #0 = { nofree nosync nounwind memory(readwrite, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!13, !13, i64 0} !13 = !{!"double", !6, i64 0} !14 = distinct !{!14, !11} !15 = distinct !{!15, !11} !16 = distinct !{!16, !17} !17 = !{!"llvm.loop.unroll.disable"} !18 = distinct !{!18, !11}
#include<stdio.h> #include<stdlib.h> #include<stdbool.h> #include <string.h> #include<math.h> #include <limits.h> void prob() { int n; scanf("%d",&n); /*if( (n != 3) && (n !=6) ) { printf("YES\n"); } if( (n== 3) || (n==6) ) { printf("NO\n"); }*/ if(n%4==0) { printf("YES\n"); } else {printf("NO\n");} } int main() { int T; scanf("%d",&T); for(int i = 0; i < T; i++) { prob(); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27122/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27122/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local void @prob() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %1 = and i32 %0, 3 %cmp = icmp eq i32 %1, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n.i = alloca i32, align 4 %T = 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 %cmp2 = icmp sgt i32 %0, 0 br i1 %cmp2, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #4 ret i32 0 for.body: ; preds = %entry, %for.body %i.03 = phi i32 [ %inc, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n.i) #4 %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n.i) %1 = load i32, ptr %n.i, align 4, !tbaa !5 %2 = and i32 %1, 3 %cmp.i = icmp eq i32 %2, 0 %str.3.str.i = select i1 %cmp.i, ptr @str.3, ptr @str %puts.i = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n.i) #4 %inc = add nuw nsw i32 %i.03, 1 %3 = load i32, ptr %T, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 } ; 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"}
//set many funcs template //Ver.20190820 #include<stdio.h> #include<string.h> #include<stdlib.h> #include<stdbool.h> #include<time.h> #include<assert.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;} void swap(int *a,int *b){int c;c=(*a);(*a)=(*b);(*b)=c;} 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;} void llswap(long long *a,long long *b){long long c;c=(*a);(*a)=(*b);(*b)=c;} 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);} void dbswap(double *a,double *b){double c;c=(*a);(*a)=(*b);(*b)=c;} void chswap(char *a,char *b){char c;c=(*a);(*a)=(*b);(*b)=c;} int sortfncsj(const void *a,const void *b){if(*(int *)a>*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int sortfnckj(const void *a,const void *b){if(*(int *)a<*(int *)b){return 1;}if(*(int *)a==*(int *)b){return 0;}return -1;} int llsortfncsj(const void *a,const void *b){if(*(long long *)a>*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int llsortfnckj(const void *a,const void *b){if(*(long long *)a<*(long long *)b){return 1;}if(*(long long *)a==*(long long *)b){return 0;}return -1;} int dbsortfncsj(const void *a,const void *b){if(*(double *)a>*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int dbsortfnckj(const void *a,const void *b){if(*(double *)a<*(double *)b){return 1;}if(*(double *)a==*(double *)b){return 0;}return -1;} int strsortfncsj(const void *a,const void *b){return strcmp((char *)a,(char *)b);} int strsortfnckj(const void *a,const void *b){return strcmp((char *)b,(char *)a);} int chsortfncsj(const void *a,const void *b){if(*(char *)a>*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} int chsortfnckj(const void *a,const void *b){if(*(char *)a<*(char *)b){return 1;}if(*(char *)a==*(char *)b){return 0;}return -1;} void shuffledget(int x[],int n){ int i,b[524288],p,c; for(i=0;i<n;i++){ b[i]=i; } for(i=n;i>=1;i--){ p=rand()%i; c=b[i-1];b[i-1]=b[p];b[p]=c; } for(i=0;i<n;i++){ scanf("%d",&x[b[i]]); } } int dx4[4]={1,-1,0,0}; int dy4[4]={0,0,1,-1}; int dx8[8]={-1,-1,-1,0,0,1,1,1}; int dy8[8]={-1,0,1,-1,1,-1,0,1}; int search(int x,int a[],int n){ int st=0,fi=n-1,te; while(st<=fi){ te=(st+fi)/2; if(a[te]<x){st=te+1;}else{fi=te-1;} } return st; } void prarr(int arr[],int n){ int i; for(i=0;i<n;i++){ if(i){printf(" ");} printf("%d",arr[i]); } printf("\n"); return; } void getperm(int a[],int n){ int i,p; for(i=0;i<n;i++){ a[i]=i; } for(i=n-1;i>=1;i--){ p=rand()%(i+1); swap(&a[p],&a[i]); } } typedef struct{ long long p; long long q; long long typ; }fd; int sdsortfnc(const void *a,const void *b){ if(((fd*)a)->p < ((fd*)b)->p){return -1;} if(((fd*)a)->p > ((fd*)b)->p){return 1;} if(((fd*)a)->q < ((fd*)b)->q){return -1;} if(((fd*)a)->q > ((fd*)b)->q){return 1;} return 0; } long long power(long long a,long long b){ long long x=1,y=a; while(b>0){ if(b&1ll){ x=(x*y)%mod; } y=(y*y)%mod; b>>=1; } return x%mod; } int main(void){ long long i,j,n,m,k,a,b,c=0,h,w,r,l,t; long long af,bf,tf; long long t1=0,t2=0,vd=0; long long c0,c1; fd dat[524288]; scanf("%lld",&n); for(i=0;i<n;i++){ scanf("%lld%lld",&a,&b); if(a==0&&b==0){vd++;continue;} if(a==0){t1++;continue;} if(b==0){t2++;continue;} if(a<0){af=1;a*=-1;}else{af=0;} if(b<0){bf=1;b*=-1;}else{bf=0;} if(af+bf==1){tf=-1;}else{tf=1;} w=llgcd(a,b); a/=w;b/=w; //printf("%lld %lld\n",a,b); if(tf==1){ dat[c].p=a; dat[c].q=b; dat[c].typ=0; } else{ dat[c].p=b; dat[c].q=a; dat[c].typ=1; } c++; } qsort(dat,c,sizeof(dat[0]),sdsortfnc); //for(i=0;i<c;i++){printf("<%lld %lld>\n",dat[i].p,dat[i].q);} r=1; c0=0;c1=0; if(dat[0].typ==0){c0++;} else{c1++;} for(i=1;i<=c;i++){ if(i==c || dat[i-1].p!=dat[i].p || dat[i-1].q!=dat[i].q){ //printf("<%lld %lld>\n",c0,c1); r*=(power(2,c0)+power(2,c1)-1);r%=mod; c0=0;c1=0; } if(dat[i].typ==0){c0++;} else{c1++;} } r*=(power(2,t1)+power(2,t2)-1);r%=mod; r+=(mod-1);r%=mod; r+=vd;r%=mod; printf("%lld\n",r); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271270/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271270/source.c" target datalayout = "e-m:e-p270: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.fd = type { i64, i64, i64 } @.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.3 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.4 = private unnamed_addr constant [9 x i8] c"%lld%lld\00", align 1 @.str.5 = 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 norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 store i32 %1, ptr %a, align 4, !tbaa !16 store i32 %0, ptr %b, align 4, !tbaa !16 ret void } ; 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 !20 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 !20 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 !21 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 !21 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 !22 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 !23 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 !25 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 !26 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 !27 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 !28 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(argmem: readwrite) uwtable define dso_local void @llswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i64, ptr %a, align 8, !tbaa !29 %1 = load i64, ptr %b, align 8, !tbaa !29 store i64 %1, ptr %a, align 8, !tbaa !29 store i64 %0, ptr %b, align 8, !tbaa !29 ret void } ; 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: readwrite) uwtable define dso_local void @dbswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load double, ptr %a, align 8, !tbaa !31 %1 = load double, ptr %b, align 8, !tbaa !31 store double %1, ptr %a, align 8, !tbaa !31 store double %0, ptr %b, align 8, !tbaa !31 ret void } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @chswap(ptr nocapture noundef %a, ptr nocapture noundef %b) local_unnamed_addr #4 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 store i8 %1, ptr %a, align 1, !tbaa !33 store i8 %0, ptr %b, align 1, !tbaa !33 ret void } ; 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 #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 %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 #5 { entry: %0 = load i32, ptr %a, align 4, !tbaa !16 %1 = load i32, ptr %b, align 4, !tbaa !16 %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 #5 { 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 #5 { 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 #5 { 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 #5 { 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 #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #16 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #7 ; 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 #6 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %b, ptr noundef nonnull dereferenceable(1) %a) #16 ret i32 %call } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @chsortfncsj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp sgt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext i1 %cmp5 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @chsortfnckj(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #5 { entry: %0 = load i8, ptr %a, align 1, !tbaa !33 %1 = load i8, ptr %b, align 1, !tbaa !33 %cmp = icmp slt i8 %0, %1 %cmp5 = icmp ne i8 %0, %1 %. = sext i1 %cmp5 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nounwind uwtable define dso_local void @shuffledget(ptr noundef %x, i32 noundef %n) local_unnamed_addr #8 { entry: %b = alloca [524288 x i32], align 16 call void @llvm.lifetime.start.p0(i64 2097152, ptr nonnull %b) #17 %cmp40 = icmp sgt i32 %n, 0 br i1 %cmp40, label %for.body.preheader, label %for.end25 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.preheader57, 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 !16 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 16, !tbaa !16 %index.next = add nuw i64 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %2 = icmp eq i64 %index.next, %n.vec br i1 %2, label %middle.block, label %vector.body, !llvm.loop !34 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader57 for.body.preheader57: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block br i1 %cmp40, label %for.body3.preheader, label %for.end25 for.body3.preheader: ; preds = %for.cond1.preheader %3 = zext i32 %n to i64 br label %for.body3 for.body: ; preds = %for.body.preheader57, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader57 ] %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 !16 %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.cond1.preheader, label %for.body, !llvm.loop !35 for.cond15.preheader: ; preds = %for.body3 br i1 %cmp40, label %for.body17.preheader, label %for.end25 for.body17.preheader: ; preds = %for.cond15.preheader %wide.trip.count54 = zext i32 %n to i64 br label %for.body17 for.body3: ; preds = %for.body3.preheader, %for.body3 %indvars.iv47 = phi i64 [ %3, %for.body3.preheader ], [ %indvars.iv.next48, %for.body3 ] %call = tail call i32 @rand() #17 %5 = trunc i64 %indvars.iv47 to i32 %rem = srem i32 %call, %5 %indvars.iv.next48 = add nsw i64 %indvars.iv47, -1 %idxprom4 = and i64 %indvars.iv.next48, 4294967295 %arrayidx5 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom4 %6 = load i32, ptr %arrayidx5, align 4, !tbaa !16 %idxprom6 = sext i32 %rem to i64 %arrayidx7 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %idxprom6 %7 = load i32, ptr %arrayidx7, align 4, !tbaa !16 store i32 %7, ptr %arrayidx5, align 4, !tbaa !16 store i32 %6, ptr %arrayidx7, align 4, !tbaa !16 %cmp2 = icmp ugt i64 %indvars.iv47, 1 br i1 %cmp2, label %for.body3, label %for.cond15.preheader, !llvm.loop !36 for.body17: ; preds = %for.body17.preheader, %for.body17 %indvars.iv50 = phi i64 [ 0, %for.body17.preheader ], [ %indvars.iv.next51, %for.body17 ] %arrayidx19 = getelementptr inbounds [524288 x i32], ptr %b, i64 0, i64 %indvars.iv50 %8 = load i32, ptr %arrayidx19, align 4, !tbaa !16 %idxprom20 = sext i32 %8 to i64 %arrayidx21 = getelementptr inbounds i32, ptr %x, i64 %idxprom20 %call22 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef %arrayidx21) %indvars.iv.next51 = add nuw nsw i64 %indvars.iv50, 1 %exitcond55.not = icmp eq i64 %indvars.iv.next51, %wide.trip.count54 br i1 %exitcond55.not, label %for.end25, label %for.body17, !llvm.loop !37 for.end25: ; preds = %for.body17, %entry, %for.cond1.preheader, %for.cond15.preheader call void @llvm.lifetime.end.p0(i64 2097152, ptr nonnull %b) #17 ret void } ; Function Attrs: nounwind declare i32 @rand() local_unnamed_addr #9 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; 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 #11 { 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 !16 %cmp1 = icmp slt i32 %0, %x %add2 = add nsw i32 %div, 1 %sub3 = add nsw i32 %div, -1 %fi.1 = select i1 %cmp1, i32 %fi.010, i32 %sub3 %st.1 = select i1 %cmp1, i32 %add2, i32 %st.011 %cmp.not = icmp sgt i32 %st.1, %fi.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !38 while.end: ; preds = %while.body, %entry %st.0.lcssa = phi i32 [ 0, %entry ], [ %st.1, %while.body ] ret i32 %st.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local void @prarr(ptr nocapture noundef readonly %arr, i32 noundef %n) local_unnamed_addr #12 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %if.end.peel, label %for.end if.end.peel: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %.pre = load i32, ptr %arr, align 4, !tbaa !16 %call1.peel = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %.pre) %exitcond.peel.not = icmp eq i32 %n, 1 br i1 %exitcond.peel.not, label %for.end, label %if.end if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar6 = tail call i32 @putchar(i32 32) %arrayidx = getelementptr inbounds i32, ptr %arr, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !16 %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %0) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %if.end, !llvm.loop !39 for.end: ; preds = %if.end, %if.end.peel, %entry %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nounwind uwtable define dso_local void @getperm(ptr nocapture noundef %a, i32 noundef %n) local_unnamed_addr #8 { entry: %cmp20 = icmp sgt i32 %n, 0 br i1 %cmp20, label %for.body.preheader, label %for.end9 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.preheader30, 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 i32, ptr %a, i64 %index store <4 x i32> %vec.ind, ptr %0, align 4, !tbaa !16 %1 = getelementptr inbounds i32, ptr %0, i64 4 store <4 x i32> %step.add, ptr %1, align 4, !tbaa !16 %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 !41 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond1.preheader, label %for.body.preheader30 for.body.preheader30: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond1.preheader: ; preds = %for.body, %middle.block %cmp222 = icmp sgt i32 %n, 1 br i1 %cmp222, label %for.body3.preheader, label %for.end9 for.body3.preheader: ; preds = %for.cond1.preheader %3 = zext i32 %n to i64 br label %for.body3 for.body: ; preds = %for.body.preheader30, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader30 ] %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %4 = trunc i64 %indvars.iv to i32 store i32 %4, ptr %arrayidx, align 4, !tbaa !16 %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.cond1.preheader, label %for.body, !llvm.loop !42 for.body3: ; preds = %for.body3.preheader, %for.body3 %indvars.iv25 = phi i64 [ %3, %for.body3.preheader ], [ %indvars.iv.next26, %for.body3 ] %indvars.iv.next26 = add nsw i64 %indvars.iv25, -1 %call = tail call i32 @rand() #17 %5 = trunc i64 %indvars.iv25 to i32 %rem = srem i32 %call, %5 %idxprom4 = sext i32 %rem to i64 %arrayidx5 = getelementptr inbounds i32, ptr %a, i64 %idxprom4 %idxprom6 = and i64 %indvars.iv.next26, 4294967295 %arrayidx7 = getelementptr inbounds i32, ptr %a, i64 %idxprom6 %6 = load i32, ptr %arrayidx5, align 4, !tbaa !16 %7 = load i32, ptr %arrayidx7, align 4, !tbaa !16 store i32 %7, ptr %arrayidx5, align 4, !tbaa !16 store i32 %6, ptr %arrayidx7, align 4, !tbaa !16 %cmp2 = icmp ugt i64 %indvars.iv25, 2 br i1 %cmp2, label %for.body3, label %for.end9, !llvm.loop !43 for.end9: ; preds = %for.body3, %entry, %for.cond1.preheader ret void } ; 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) #5 { entry: %0 = load i64, ptr %a, align 8, !tbaa !44 %1 = load i64, ptr %b, align 8, !tbaa !44 %cmp = icmp slt i64 %0, %1 br i1 %cmp, label %return, label %if.end if.end: ; preds = %entry %cmp4 = icmp sgt i64 %0, %1 br i1 %cmp4, label %return, label %if.end6 if.end6: ; preds = %if.end %q = getelementptr inbounds %struct.fd, ptr %a, i64 0, i32 1 %2 = load i64, ptr %q, align 8, !tbaa !46 %q7 = getelementptr inbounds %struct.fd, ptr %b, i64 0, i32 1 %3 = load i64, ptr %q7, align 8, !tbaa !46 %cmp8 = icmp slt i64 %2, %3 br i1 %cmp8, label %return, label %if.end10 if.end10: ; preds = %if.end6 %cmp13 = icmp sgt i64 %2, %3 %. = zext i1 %cmp13 to i32 br label %return return: ; preds = %if.end10, %if.end6, %if.end, %entry %retval.0 = phi i32 [ -1, %entry ], [ 1, %if.end ], [ -1, %if.end6 ], [ %., %if.end10 ] ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @power(i64 noundef %a, i64 noundef %b) local_unnamed_addr #2 { entry: %cmp9 = icmp sgt i64 %b, 0 br i1 %cmp9, label %while.body, label %while.end while.body: ; preds = %entry, %if.end %y.012 = phi i64 [ %rem2, %if.end ], [ %a, %entry ] %x.011 = phi i64 [ %x.1, %if.end ], [ 1, %entry ] %b.addr.010 = phi i64 [ %shr, %if.end ], [ %b, %entry ] %and = and i64 %b.addr.010, 1 %tobool.not = icmp eq i64 %and, 0 br i1 %tobool.not, label %if.end, label %if.then if.then: ; preds = %while.body %mul = mul nsw i64 %y.012, %x.011 %rem = srem i64 %mul, 1000000007 br label %if.end if.end: ; preds = %if.then, %while.body %x.1 = phi i64 [ %rem, %if.then ], [ %x.011, %while.body ] %mul1 = mul nsw i64 %y.012, %y.012 %rem2 = urem i64 %mul1, 1000000007 %shr = lshr i64 %b.addr.010, 1 %cmp.not = icmp ult i64 %b.addr.010, 2 br i1 %cmp.not, label %while.end.loopexit, label %while.body, !llvm.loop !47 while.end.loopexit: ; preds = %if.end %0 = srem i64 %x.1, 1000000007 br label %while.end while.end: ; preds = %while.end.loopexit, %entry %x.0.lcssa = phi i64 [ 1, %entry ], [ %0, %while.end.loopexit ] ret i64 %x.0.lcssa } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #12 { entry: %n = alloca i64, align 8 %a = alloca i64, align 8 %b = alloca i64, align 8 %dat = alloca [524288 x %struct.fd], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #17 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #17 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %b) #17 call void @llvm.lifetime.start.p0(i64 12582912, ptr nonnull %dat) #17 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.3, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !29 %cmp189 = icmp sgt i64 %0, 0 br i1 %cmp189, label %for.body, label %power.exit169.thread power.exit169.thread: ; preds = %entry call void @qsort(ptr noundef nonnull %dat, i64 noundef 0, i64 noundef 24, ptr noundef nonnull @sdsortfnc) #17 br label %power.exit188 for.body: ; preds = %entry, %for.inc %vd.0194 = phi i64 [ %vd.1, %for.inc ], [ 0, %entry ] %t2.0193 = phi i64 [ %t2.1, %for.inc ], [ 0, %entry ] %t1.0192 = phi i64 [ %t1.1, %for.inc ], [ 0, %entry ] %i.0191 = phi i64 [ %inc39, %for.inc ], [ 0, %entry ] %c.0190 = phi i64 [ %c.1, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.4, ptr noundef nonnull %a, ptr noundef nonnull %b) %1 = load i64, ptr %a, align 8, !tbaa !29 %cmp2 = icmp eq i64 %1, 0 %2 = load i64, ptr %b, align 8 %cmp3 = icmp eq i64 %2, 0 %or.cond = select i1 %cmp2, i1 %cmp3, i1 false br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %for.body %inc = add nsw i64 %vd.0194, 1 br label %for.inc if.end: ; preds = %for.body br i1 %cmp2, label %if.then5, label %if.end7 if.then5: ; preds = %if.end %inc6 = add nsw i64 %t1.0192, 1 br label %for.inc if.end7: ; preds = %if.end br i1 %cmp3, label %if.then9, label %if.end11 if.then9: ; preds = %if.end7 %inc10 = add nsw i64 %t2.0193, 1 br label %for.inc if.end11: ; preds = %if.end7 %spec.select = call i64 @llvm.abs.i64(i64 %1, i1 true) %.lobit = lshr i64 %1, 63 %3 = call i64 @llvm.abs.i64(i64 %2, i1 true) %.lobit229 = lshr i64 %2, 63 %add = add nuw nsw i64 %.lobit229, %.lobit %cmp20.not = icmp eq i64 %add, 1 br label %while.body.i while.body.i: ; preds = %if.end11, %while.body.i %a.addr.06.i = phi i64 [ %b.addr.05.i, %while.body.i ], [ %spec.select, %if.end11 ] %b.addr.05.i = phi i64 [ %rem.i, %while.body.i ], [ %3, %if.end11 ] %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 !20 llgcd.exit: ; preds = %while.body.i %div = sdiv i64 %spec.select, %b.addr.05.i store i64 %div, ptr %a, align 8, !tbaa !29 %div25 = sdiv i64 %3, %b.addr.05.i store i64 %div25, ptr %b, align 8, !tbaa !29 %div.sink = select i1 %cmp20.not, i64 %div25, i64 %div %div25.sink = select i1 %cmp20.not, i64 %div, i64 %div25 %.sink = zext i1 %cmp20.not to i64 %4 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %c.0190 store i64 %div.sink, ptr %4, align 8 %5 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %c.0190, i32 1 store i64 %div25.sink, ptr %5, align 8 %6 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %c.0190, i32 2 store i64 %.sink, ptr %6, align 8 %inc38 = add nsw i64 %c.0190, 1 br label %for.inc for.inc: ; preds = %llgcd.exit, %if.then9, %if.then5, %if.then %c.1 = phi i64 [ %c.0190, %if.then ], [ %c.0190, %if.then5 ], [ %c.0190, %if.then9 ], [ %inc38, %llgcd.exit ] %t1.1 = phi i64 [ %t1.0192, %if.then ], [ %inc6, %if.then5 ], [ %t1.0192, %if.then9 ], [ %t1.0192, %llgcd.exit ] %t2.1 = phi i64 [ %t2.0193, %if.then ], [ %t2.0193, %if.then5 ], [ %inc10, %if.then9 ], [ %t2.0193, %llgcd.exit ] %vd.1 = phi i64 [ %inc, %if.then ], [ %vd.0194, %if.then5 ], [ %vd.0194, %if.then9 ], [ %vd.0194, %llgcd.exit ] %inc39 = add nuw nsw i64 %i.0191, 1 %7 = load i64, ptr %n, align 8, !tbaa !29 %cmp = icmp slt i64 %inc39, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !48 for.end: ; preds = %for.inc call void @qsort(ptr noundef nonnull %dat, i64 noundef %c.1, i64 noundef 24, ptr noundef nonnull @sdsortfnc) #17 %cmp49.not198 = icmp slt i64 %c.1, 1 br i1 %cmp49.not198, label %for.end81, label %for.body50.preheader for.body50.preheader: ; preds = %for.end %typ41 = getelementptr inbounds %struct.fd, ptr %dat, i64 0, i32 2 %8 = load i64, ptr %typ41, align 16, !tbaa !49 %cmp42 = icmp eq i64 %8, 0 %not.cmp42 = xor i1 %cmp42, true %.128 = zext i1 %not.cmp42 to i64 %. = zext i1 %cmp42 to i64 br label %for.body50 for.body50: ; preds = %for.body50.preheader, %if.end70 %c1.1202 = phi i64 [ %c1.3, %if.end70 ], [ %.128, %for.body50.preheader ] %c0.1201 = phi i64 [ %c0.3, %if.end70 ], [ %., %for.body50.preheader ] %i.1200 = phi i64 [ %inc80, %if.end70 ], [ 1, %for.body50.preheader ] %r.0199 = phi i64 [ %r.1, %if.end70 ], [ 1, %for.body50.preheader ] %cmp51 = icmp eq i64 %i.1200, %c.1 br i1 %cmp51, label %if.then64, label %lor.lhs.false lor.lhs.false: ; preds = %for.body50 %sub = add nsw i64 %i.1200, -1 %arrayidx52 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %sub %9 = load i64, ptr %arrayidx52, align 8, !tbaa !44 %arrayidx54 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %i.1200 %10 = load i64, ptr %arrayidx54, align 8, !tbaa !44 %cmp56.not = icmp eq i64 %9, %10 br i1 %cmp56.not, label %lor.lhs.false57, label %if.then64 lor.lhs.false57: ; preds = %lor.lhs.false %q60 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %sub, i32 1 %11 = load i64, ptr %q60, align 8, !tbaa !46 %q62 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %i.1200, i32 1 %12 = load i64, ptr %q62, align 8, !tbaa !46 %cmp63.not = icmp eq i64 %11, %12 br i1 %cmp63.not, label %if.end70, label %if.then64 if.then64: ; preds = %lor.lhs.false57, %lor.lhs.false, %for.body50 %cmp9.i = icmp sgt i64 %c0.1201, 0 br i1 %cmp9.i, label %while.body.i129, label %power.exit while.body.i129: ; preds = %if.then64, %if.end.i %y.012.i = phi i64 [ %rem2.i, %if.end.i ], [ 2, %if.then64 ] %x.011.i = phi i64 [ %x.1.i, %if.end.i ], [ 1, %if.then64 ] %b.addr.010.i = phi i64 [ %shr.i, %if.end.i ], [ %c0.1201, %if.then64 ] %and.i = and i64 %b.addr.010.i, 1 %tobool.not.i = icmp eq i64 %and.i, 0 br i1 %tobool.not.i, label %if.end.i, label %if.then.i if.then.i: ; preds = %while.body.i129 %mul.i = mul nsw i64 %x.011.i, %y.012.i %rem.i130 = srem i64 %mul.i, 1000000007 br label %if.end.i if.end.i: ; preds = %if.then.i, %while.body.i129 %x.1.i = phi i64 [ %rem.i130, %if.then.i ], [ %x.011.i, %while.body.i129 ] %mul1.i = mul nuw nsw i64 %y.012.i, %y.012.i %rem2.i = urem i64 %mul1.i, 1000000007 %shr.i = lshr i64 %b.addr.010.i, 1 %cmp.not.i131 = icmp ult i64 %b.addr.010.i, 2 br i1 %cmp.not.i131, label %while.end.loopexit.i, label %while.body.i129, !llvm.loop !47 while.end.loopexit.i: ; preds = %if.end.i %13 = srem i64 %x.1.i, 1000000007 br label %power.exit power.exit: ; preds = %if.then64, %while.end.loopexit.i %x.0.lcssa.i = phi i64 [ 1, %if.then64 ], [ %13, %while.end.loopexit.i ] %cmp9.i132 = icmp sgt i64 %c1.1202, 0 br i1 %cmp9.i132, label %while.body.i134, label %power.exit150 while.body.i134: ; preds = %power.exit, %if.end.i143 %y.012.i135 = phi i64 [ %rem2.i146, %if.end.i143 ], [ 2, %power.exit ] %x.011.i136 = phi i64 [ %x.1.i144, %if.end.i143 ], [ 1, %power.exit ] %b.addr.010.i137 = phi i64 [ %shr.i147, %if.end.i143 ], [ %c1.1202, %power.exit ] %and.i138 = and i64 %b.addr.010.i137, 1 %tobool.not.i139 = icmp eq i64 %and.i138, 0 br i1 %tobool.not.i139, label %if.end.i143, label %if.then.i140 if.then.i140: ; preds = %while.body.i134 %mul.i141 = mul nsw i64 %x.011.i136, %y.012.i135 %rem.i142 = srem i64 %mul.i141, 1000000007 br label %if.end.i143 if.end.i143: ; preds = %if.then.i140, %while.body.i134 %x.1.i144 = phi i64 [ %rem.i142, %if.then.i140 ], [ %x.011.i136, %while.body.i134 ] %mul1.i145 = mul nuw nsw i64 %y.012.i135, %y.012.i135 %rem2.i146 = urem i64 %mul1.i145, 1000000007 %shr.i147 = lshr i64 %b.addr.010.i137, 1 %cmp.not.i148 = icmp ult i64 %b.addr.010.i137, 2 br i1 %cmp.not.i148, label %while.end.loopexit.i149, label %while.body.i134, !llvm.loop !47 while.end.loopexit.i149: ; preds = %if.end.i143 %14 = srem i64 %x.1.i144, 1000000007 br label %power.exit150 power.exit150: ; preds = %power.exit, %while.end.loopexit.i149 %x.0.lcssa.i133 = phi i64 [ 1, %power.exit ], [ %14, %while.end.loopexit.i149 ] %add67 = add nsw i64 %x.0.lcssa.i, -1 %sub68 = add nsw i64 %add67, %x.0.lcssa.i133 %mul69 = mul nsw i64 %sub68, %r.0199 %rem = srem i64 %mul69, 1000000007 br label %if.end70 if.end70: ; preds = %power.exit150, %lor.lhs.false57 %r.1 = phi i64 [ %rem, %power.exit150 ], [ %r.0199, %lor.lhs.false57 ] %c0.2 = phi i64 [ 0, %power.exit150 ], [ %c0.1201, %lor.lhs.false57 ] %c1.2 = phi i64 [ 0, %power.exit150 ], [ %c1.1202, %lor.lhs.false57 ] %typ72 = getelementptr inbounds [524288 x %struct.fd], ptr %dat, i64 0, i64 %i.1200, i32 2 %15 = load i64, ptr %typ72, align 8, !tbaa !49 %cmp73 = icmp eq i64 %15, 0 %inc75 = zext i1 %cmp73 to i64 %c0.3 = add nsw i64 %c0.2, %inc75 %not.cmp73 = xor i1 %cmp73, true %inc77 = zext i1 %not.cmp73 to i64 %c1.3 = add nsw i64 %c1.2, %inc77 %inc80 = add nuw i64 %i.1200, 1 %exitcond.not = icmp eq i64 %i.1200, %c.1 br i1 %exitcond.not, label %for.end81, label %for.body50, !llvm.loop !50 for.end81: ; preds = %if.end70, %for.end %r.0.lcssa = phi i64 [ 1, %for.end ], [ %r.1, %if.end70 ] %cmp9.i151 = icmp sgt i64 %t1.1, 0 br i1 %cmp9.i151, label %while.body.i153, label %power.exit169 while.body.i153: ; preds = %for.end81, %if.end.i162 %y.012.i154 = phi i64 [ %rem2.i165, %if.end.i162 ], [ 2, %for.end81 ] %x.011.i155 = phi i64 [ %x.1.i163, %if.end.i162 ], [ 1, %for.end81 ] %b.addr.010.i156 = phi i64 [ %shr.i166, %if.end.i162 ], [ %t1.1, %for.end81 ] %and.i157 = and i64 %b.addr.010.i156, 1 %tobool.not.i158 = icmp eq i64 %and.i157, 0 br i1 %tobool.not.i158, label %if.end.i162, label %if.then.i159 if.then.i159: ; preds = %while.body.i153 %mul.i160 = mul nsw i64 %x.011.i155, %y.012.i154 %rem.i161 = srem i64 %mul.i160, 1000000007 br label %if.end.i162 if.end.i162: ; preds = %if.then.i159, %while.body.i153 %x.1.i163 = phi i64 [ %rem.i161, %if.then.i159 ], [ %x.011.i155, %while.body.i153 ] %mul1.i164 = mul nuw nsw i64 %y.012.i154, %y.012.i154 %rem2.i165 = urem i64 %mul1.i164, 1000000007 %shr.i166 = lshr i64 %b.addr.010.i156, 1 %cmp.not.i167 = icmp ult i64 %b.addr.010.i156, 2 br i1 %cmp.not.i167, label %while.end.loopexit.i168, label %while.body.i153, !llvm.loop !47 while.end.loopexit.i168: ; preds = %if.end.i162 %16 = srem i64 %x.1.i163, 1000000007 %17 = add nsw i64 %16, -1 br label %power.exit169 power.exit169: ; preds = %for.end81, %while.end.loopexit.i168 %x.0.lcssa.i152 = phi i64 [ 0, %for.end81 ], [ %17, %while.end.loopexit.i168 ] %cmp9.i170 = icmp sgt i64 %t2.1, 0 br i1 %cmp9.i170, label %while.body.i172, label %power.exit188 while.body.i172: ; preds = %power.exit169, %if.end.i181 %y.012.i173 = phi i64 [ %rem2.i184, %if.end.i181 ], [ 2, %power.exit169 ] %x.011.i174 = phi i64 [ %x.1.i182, %if.end.i181 ], [ 1, %power.exit169 ] %b.addr.010.i175 = phi i64 [ %shr.i185, %if.end.i181 ], [ %t2.1, %power.exit169 ] %and.i176 = and i64 %b.addr.010.i175, 1 %tobool.not.i177 = icmp eq i64 %and.i176, 0 br i1 %tobool.not.i177, label %if.end.i181, label %if.then.i178 if.then.i178: ; preds = %while.body.i172 %mul.i179 = mul nsw i64 %x.011.i174, %y.012.i173 %rem.i180 = srem i64 %mul.i179, 1000000007 br label %if.end.i181 if.end.i181: ; preds = %if.then.i178, %while.body.i172 %x.1.i182 = phi i64 [ %rem.i180, %if.then.i178 ], [ %x.011.i174, %while.body.i172 ] %mul1.i183 = mul nuw nsw i64 %y.012.i173, %y.012.i173 %rem2.i184 = urem i64 %mul1.i183, 1000000007 %shr.i185 = lshr i64 %b.addr.010.i175, 1 %cmp.not.i186 = icmp ult i64 %b.addr.010.i175, 2 br i1 %cmp.not.i186, label %while.end.loopexit.i187, label %while.body.i172, !llvm.loop !47 while.end.loopexit.i187: ; preds = %if.end.i181 %18 = srem i64 %x.1.i182, 1000000007 br label %power.exit188 power.exit188: ; preds = %power.exit169.thread, %power.exit169, %while.end.loopexit.i187 %x.0.lcssa.i152227 = phi i64 [ %x.0.lcssa.i152, %power.exit169 ], [ %x.0.lcssa.i152, %while.end.loopexit.i187 ], [ 0, %power.exit169.thread ] %vd.0.lcssa211217226 = phi i64 [ %vd.1, %power.exit169 ], [ %vd.1, %while.end.loopexit.i187 ], [ 0, %power.exit169.thread ] %r.0.lcssa219225 = phi i64 [ %r.0.lcssa, %power.exit169 ], [ %r.0.lcssa, %while.end.loopexit.i187 ], [ 1, %power.exit169.thread ] %x.0.lcssa.i171 = phi i64 [ 1, %power.exit169 ], [ %18, %while.end.loopexit.i187 ], [ 1, %power.exit169.thread ] %sub85 = add nsw i64 %x.0.lcssa.i152227, %x.0.lcssa.i171 %mul86 = mul nsw i64 %sub85, %r.0.lcssa219225 %mul86.fr = freeze i64 %mul86 %rem87 = srem i64 %mul86.fr, 1000000007 %add88 = add nsw i64 %rem87, 1000000006 %rem89.urem = add nsw i64 %rem87, -1 %rem89.cmp = icmp ult i64 %add88, 1000000007 %rem89 = select i1 %rem89.cmp, i64 %add88, i64 %rem89.urem %add90 = add nsw i64 %rem89, %vd.0.lcssa211217226 %rem91 = srem i64 %add90, 1000000007 %call92 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i64 noundef %rem91) call void @llvm.lifetime.end.p0(i64 12582912, ptr nonnull %dat) #17 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %b) #17 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #17 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #17 ret i32 0 } ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #13 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #14 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #15 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #15 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: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { 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 #12 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #13 = { 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 #14 = { nofree nounwind } attributes #15 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #16 = { nounwind willreturn memory(read) } attributes #17 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = 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 = !{!17, !17, i64 0} !17 = !{!"int", !18, i64 0} !18 = !{!"omnipotent char", !19, i64 0} !19 = !{!"Simple C/C++ TBAA"} !20 = distinct !{!20, !6} !21 = distinct !{!21, !6} !22 = distinct !{!22, !6} !23 = distinct !{!23, !24} !24 = !{!"llvm.loop.unroll.disable"} !25 = distinct !{!25, !6} !26 = distinct !{!26, !24} !27 = distinct !{!27, !6} !28 = distinct !{!28, !6} !29 = !{!30, !30, i64 0} !30 = !{!"long long", !18, i64 0} !31 = !{!32, !32, i64 0} !32 = !{!"double", !18, i64 0} !33 = !{!18, !18, i64 0} !34 = distinct !{!34, !6, !9, !10} !35 = distinct !{!35, !6, !10, !9} !36 = distinct !{!36, !6} !37 = distinct !{!37, !6} !38 = distinct !{!38, !6} !39 = distinct !{!39, !6, !40} !40 = !{!"llvm.loop.peeled.count", i32 1} !41 = distinct !{!41, !6, !9, !10} !42 = distinct !{!42, !6, !10, !9} !43 = distinct !{!43, !6} !44 = !{!45, !30, i64 0} !45 = !{!"", !30, i64 0, !30, i64 8, !30, i64 16} !46 = !{!45, !30, i64 8} !47 = distinct !{!47, !6} !48 = distinct !{!48, !6} !49 = !{!45, !30, i64 16} !50 = distinct !{!50, !6}
#include <stdio.h> int main(void) { char c; while ((c = getchar()) != EOF){ if (c >= 'a' && c <= 'z'){ c -= ('a'-'A'); } printf("%c",c); } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271335/source.c" target datalayout = "e-m:e-p270: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 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i17 = tail call i32 @getc(ptr noundef %0) %sext18 = shl i32 %call.i17, 24 %cmp.not19 = icmp eq i32 %sext18, -16777216 br i1 %cmp.not19, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %sext21 = phi i32 [ %sext, %while.body ], [ %sext18, %entry ] %call.i20 = phi i32 [ %call.i, %while.body ], [ %call.i17, %entry ] %1 = add i32 %sext21, -1610612737 %or.cond = icmp ult i32 %1, 452984831 %2 = shl i32 %call.i20, 24 %3 = add i32 %2, -536870912 %sext16 = select i1 %or.cond, i32 %3, i32 %2 %conv11 = ashr exact i32 %sext16, 24 %putchar = tail call i32 @putchar(i32 %conv11) %4 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = tail call i32 @getc(ptr noundef %4) %sext = shl i32 %call.i, 24 %cmp.not = icmp eq i32 %sext, -16777216 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %while.body, %entry ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-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 } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{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(){char c;while(scanf("%c",&c)!=EOF){if(c>96)c-=32;printf("%c",c);}}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271414/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271414/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %cmp.not8 = icmp eq i32 %call7, -1 br i1 %cmp.not8, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %0 = load i8, ptr %c, align 1, !tbaa !5 %cmp1 = icmp sgt i8 %0, 96 br i1 %cmp1, label %if.then, label %if.end if.then: ; preds = %while.body %sub = add nsw i8 %0, -32 store i8 %sub, ptr %c, align 1, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %while.body %1 = phi i8 [ %sub, %if.then ], [ %0, %while.body ] %conv5 = sext i8 %1 to i32 %putchar = call i32 @putchar(i32 %conv5) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !8 while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<ctype.h> int main() { char s; while(scanf("%c",&s)!=EOF) printf("%c",toupper(s)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271494/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271494/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #5 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %cmp.not4 = icmp eq i32 %call3, -1 br i1 %cmp.not4, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %call1 = tail call ptr @__ctype_toupper_loc() #6 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %0 = load ptr, ptr %call1, align 8, !tbaa !5 %1 = load i8, ptr %s, align 1, !tbaa !9 %idxprom = sext i8 %1 to i64 %arrayidx = getelementptr inbounds i32, ptr %0, i64 %idxprom %2 = load i32, ptr %arrayidx, align 4, !tbaa !10 %putchar = call i32 @putchar(i32 %2) %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 !12 while.end: ; preds = %while.body, %entry call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) declare ptr @__ctype_toupper_loc() local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "no-trapping-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(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = !{!11, !11, i64 0} !11 = !{!"int", !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> int main(){ char s[256]; int i; fgets(s,sizeof(s),stdin); for(i=0;i<strlen(s);i++) if(97<=s[i]&&s[i]<=122) s[i]-=32; printf("%s",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271573/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271573/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [256 x i8], align 16 call void @llvm.lifetime.start.p0(i64 256, ptr nonnull %s) #4 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call ptr @fgets(ptr noundef nonnull %s, i32 noundef 256, ptr noundef %0) %char0 = load i8, ptr %s, align 16 %cmp23.not = icmp eq i8 %char0, 0 br i1 %cmp23.not, label %for.end, label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %arrayidx = getelementptr inbounds [256 x i8], ptr %s, i64 0, i64 %indvars.iv %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %2 = add i8 %1, -97 %or.cond = icmp ult i8 %2, 26 br i1 %or.cond, label %if.then, label %for.inc if.then: ; preds = %for.body %sub = add nsw i8 %1, -32 store i8 %sub, ptr %arrayidx, align 1, !tbaa !9 br label %for.inc for.inc: ; preds = %for.body, %if.then %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #5 %cmp = icmp ugt i64 %call2, %indvars.iv.next br i1 %cmp, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %for.inc, %entry %call17 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, ptr noundef nonnull %s) call void @llvm.lifetime.end.p0(i64 256, 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 ptr @fgets(ptr noundef, i32 noundef, ptr nocapture noundef) 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 = !{!"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"}
#include<stdio.h> static const int N_MAX=100010; int search(int A[],int n,int left,int right,int key){ int mid; while(left+1<right){ mid=(left+right)/2; if(A[mid]>=key) right=mid; else left=mid; } return right; } void trace(int A[],int n){ int i; for(i=0;i<n;i++){ if(i) printf(" "); printf("%d",A[i]); } printf("\n"); } int main(void){ int n,A[N_MAX],L[N_MAX]; int i,j,idx; int num; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&A[i]); } num=0; L[num++]=A[0]; for(i=1;i<n;i++){ if(A[i]>L[num-1]) L[num++]=A[i]; else { idx=search(L,num,-1,num,A[i]); L[idx]=A[i]; } // trace(L,num); } printf("%d\n",num); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271623/source.c" target datalayout = "e-m:e-p270:32: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 [3 x i8] c"%d\00", align 1 @.str.3 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @search(ptr nocapture noundef readonly %A, i32 noundef %n, i32 noundef %left, i32 noundef %right, i32 noundef %key) local_unnamed_addr #0 { entry: %add8 = add nsw i32 %left, 1 %cmp9 = icmp slt i32 %add8, %right br i1 %cmp9, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %left.addr.011 = phi i32 [ %div.left.addr.0, %while.body ], [ %left, %entry ] %right.addr.010 = phi i32 [ %right.addr.0.div, %while.body ], [ %right, %entry ] %add1 = add nsw i32 %left.addr.011, %right.addr.010 %div = sdiv i32 %add1, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp2.not = icmp slt i32 %0, %key %right.addr.0.div = select i1 %cmp2.not, i32 %right.addr.010, i32 %div %div.left.addr.0 = select i1 %cmp2.not, i32 %div, i32 %left.addr.011 %add = add nsw i32 %div.left.addr.0, 1 %cmp = icmp slt i32 %add, %right.addr.0.div br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %right.addr.0.lcssa = phi i32 [ %right, %entry ], [ %right.addr.0.div, %while.body ] ret i32 %right.addr.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @trace(ptr nocapture noundef readonly %A, i32 noundef %n) local_unnamed_addr #2 { entry: %cmp7 = icmp sgt i32 %n, 0 br i1 %cmp7, label %if.end.peel, label %for.end if.end.peel: ; preds = %entry %wide.trip.count = zext i32 %n to i64 %.pre = load i32, ptr %A, align 4, !tbaa !5 %call1.peel = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.pre) %exitcond.peel.not = icmp eq i32 %n, 1 br i1 %exitcond.peel.not, label %for.end, label %if.end if.end: ; preds = %if.end.peel, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %if.end.peel ] %putchar6 = tail call i32 @putchar(i32 32) %arrayidx = getelementptr inbounds i32, ptr %A, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %call1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %0) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.end, label %if.end, !llvm.loop !11 for.end: ; preds = %if.end, %if.end.peel, %entry %putchar = tail call i32 @putchar(i32 10) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %0 = tail call ptr @llvm.stacksave.p0() %vla44 = alloca [100010 x i32], align 16 %vla145 = alloca [100010 x i32], align 16 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp46 = icmp sgt i32 %1, 0 br i1 %cmp46, label %for.body, label %for.end29 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla44, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !13 for.end: ; preds = %for.body %.pre = load i32, ptr %vla44, align 16, !tbaa !5 store i32 %.pre, ptr %vla145, align 16, !tbaa !5 %cmp848 = icmp sgt i32 %2, 1 br i1 %cmp848, label %for.body9.preheader, label %for.end29 for.body9.preheader: ; preds = %for.end %wide.trip.count = zext i32 %2 to i64 br label %for.body9 for.body9: ; preds = %for.body9.preheader, %for.inc27 %indvars.iv54 = phi i64 [ 1, %for.body9.preheader ], [ %indvars.iv.next55, %for.inc27 ] %num.050 = phi i32 [ 1, %for.body9.preheader ], [ %num.1, %for.inc27 ] %arrayidx11 = getelementptr inbounds i32, ptr %vla44, i64 %indvars.iv54 %4 = load i32, ptr %arrayidx11, align 4, !tbaa !5 %sub = add nsw i32 %num.050, -1 %idxprom12 = sext i32 %sub to i64 %arrayidx13 = getelementptr inbounds i32, ptr %vla145, i64 %idxprom12 %5 = load i32, ptr %arrayidx13, align 4, !tbaa !5 %cmp14 = icmp sgt i32 %4, %5 br i1 %cmp14, label %if.then, label %if.else if.then: ; preds = %for.body9 %inc17 = add nsw i32 %num.050, 1 br label %for.inc27 if.else: ; preds = %for.body9 %cmp9.i = icmp sgt i32 %num.050, 0 br i1 %cmp9.i, label %while.body.i, label %for.inc27 while.body.i: ; preds = %if.else, %while.body.i %left.addr.011.i = phi i32 [ %div.left.addr.0.i, %while.body.i ], [ -1, %if.else ] %right.addr.010.i = phi i32 [ %right.addr.0.div.i, %while.body.i ], [ %num.050, %if.else ] %add1.i = add nsw i32 %right.addr.010.i, %left.addr.011.i %div.i = sdiv i32 %add1.i, 2 %idxprom.i = sext i32 %div.i to i64 %arrayidx.i = getelementptr inbounds i32, ptr %vla145, i64 %idxprom.i %6 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %cmp2.not.i = icmp slt i32 %6, %4 %right.addr.0.div.i = select i1 %cmp2.not.i, i32 %right.addr.010.i, i32 %div.i %div.left.addr.0.i = select i1 %cmp2.not.i, i32 %div.i, i32 %left.addr.011.i %add.i = add nsw i32 %div.left.addr.0.i, 1 %cmp.i = icmp slt i32 %add.i, %right.addr.0.div.i br i1 %cmp.i, label %while.body.i, label %for.inc27, !llvm.loop !9 for.inc27: ; preds = %while.body.i, %if.else, %if.then %num.050.sink = phi i32 [ %num.050, %if.then ], [ %num.050, %if.else ], [ %right.addr.0.div.i, %while.body.i ] %num.1 = phi i32 [ %inc17, %if.then ], [ %num.050, %if.else ], [ %num.050, %while.body.i ] %idxprom18 = sext i32 %num.050.sink to i64 %arrayidx19 = getelementptr inbounds i32, ptr %vla145, i64 %idxprom18 store i32 %4, ptr %arrayidx19, align 4, !tbaa !5 %indvars.iv.next55 = add nuw nsw i64 %indvars.iv54, 1 %exitcond.not = icmp eq i64 %indvars.iv.next55, %wide.trip.count br i1 %exitcond.not, label %for.end29, label %for.body9, !llvm.loop !14 for.end29: ; preds = %for.inc27, %entry, %for.end %num.0.lcssa = phi i32 [ 1, %for.end ], [ 1, %entry ], [ %num.1, %for.inc27 ] %call30 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %num.0.lcssa) call void @llvm.stackrestore.p0(ptr %0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #4 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="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 nosync nounwind willreturn } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10}
#include<stdio.h> int main(){ int n,d[100010],c=0,i; scanf("%d",&n); for(i=0;i<n;i++)scanf("%d",&d[i+1]); for(i=1;i<=n;i++)c+=d[d[i]]==i?1:0; printf("%d\n",c/2); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %d = alloca [100010 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 400040, ptr nonnull %d) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp23 = icmp sgt i32 %0, 0 br i1 %cmp23, label %for.body, label %for.end13 for.cond2.preheader: ; preds = %for.body %cmp3.not25 = icmp slt i32 %5, 1 br i1 %cmp3.not25, label %for.end13, label %for.body4.preheader for.body4.preheader: ; preds = %for.cond2.preheader %1 = add nuw i32 %5, 1 %wide.trip.count = zext i32 %1 to i64 %2 = add nsw i64 %wide.trip.count, -1 %3 = add nsw i64 %wide.trip.count, -2 %xtraiter = and i64 %2, 3 %4 = icmp ult i64 %3, 3 br i1 %4, label %for.end13.loopexit.unr-lcssa, label %for.body4.preheader.new for.body4.preheader.new: ; preds = %for.body4.preheader %unroll_iter = and i64 %2, -4 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv.next %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.body4: ; preds = %for.body4, %for.body4.preheader.new %indvars.iv31 = phi i64 [ 1, %for.body4.preheader.new ], [ %indvars.iv.next32.3, %for.body4 ] %c.026 = phi i32 [ 0, %for.body4.preheader.new ], [ %add10.3, %for.body4 ] %niter = phi i64 [ 0, %for.body4.preheader.new ], [ %niter.next.3, %for.body4 ] %arrayidx6 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv31 %7 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %idxprom7 = sext i32 %7 to i64 %arrayidx8 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %idxprom7 %8 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %9 = zext i32 %8 to i64 %cmp9 = icmp eq i64 %indvars.iv31, %9 %cond = zext i1 %cmp9 to i32 %add10 = add nuw nsw i32 %c.026, %cond %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1 %arrayidx6.1 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv.next32 %10 = load i32, ptr %arrayidx6.1, align 4, !tbaa !5 %idxprom7.1 = sext i32 %10 to i64 %arrayidx8.1 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %idxprom7.1 %11 = load i32, ptr %arrayidx8.1, align 4, !tbaa !5 %12 = zext i32 %11 to i64 %cmp9.1 = icmp eq i64 %indvars.iv.next32, %12 %cond.1 = zext i1 %cmp9.1 to i32 %add10.1 = add nuw nsw i32 %add10, %cond.1 %indvars.iv.next32.1 = add nuw nsw i64 %indvars.iv31, 2 %arrayidx6.2 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv.next32.1 %13 = load i32, ptr %arrayidx6.2, align 4, !tbaa !5 %idxprom7.2 = sext i32 %13 to i64 %arrayidx8.2 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %idxprom7.2 %14 = load i32, ptr %arrayidx8.2, align 4, !tbaa !5 %15 = zext i32 %14 to i64 %cmp9.2 = icmp eq i64 %indvars.iv.next32.1, %15 %cond.2 = zext i1 %cmp9.2 to i32 %add10.2 = add nuw nsw i32 %add10.1, %cond.2 %indvars.iv.next32.2 = add nuw nsw i64 %indvars.iv31, 3 %arrayidx6.3 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv.next32.2 %16 = load i32, ptr %arrayidx6.3, align 4, !tbaa !5 %idxprom7.3 = sext i32 %16 to i64 %arrayidx8.3 = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %idxprom7.3 %17 = load i32, ptr %arrayidx8.3, align 4, !tbaa !5 %18 = zext i32 %17 to i64 %cmp9.3 = icmp eq i64 %indvars.iv.next32.2, %18 %cond.3 = zext i1 %cmp9.3 to i32 %add10.3 = add nuw nsw i32 %add10.2, %cond.3 %indvars.iv.next32.3 = add nuw nsw i64 %indvars.iv31, 4 %niter.next.3 = add i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.end13.loopexit.unr-lcssa, label %for.body4, !llvm.loop !11 for.end13.loopexit.unr-lcssa: ; preds = %for.body4, %for.body4.preheader %add10.lcssa.ph = phi i32 [ undef, %for.body4.preheader ], [ %add10.3, %for.body4 ] %indvars.iv31.unr = phi i64 [ 1, %for.body4.preheader ], [ %indvars.iv.next32.3, %for.body4 ] %c.026.unr = phi i32 [ 0, %for.body4.preheader ], [ %add10.3, %for.body4 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end13.loopexit, label %for.body4.epil for.body4.epil: ; preds = %for.end13.loopexit.unr-lcssa, %for.body4.epil %indvars.iv31.epil = phi i64 [ %indvars.iv.next32.epil, %for.body4.epil ], [ %indvars.iv31.unr, %for.end13.loopexit.unr-lcssa ] %c.026.epil = phi i32 [ %add10.epil, %for.body4.epil ], [ %c.026.unr, %for.end13.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body4.epil ], [ 0, %for.end13.loopexit.unr-lcssa ] %arrayidx6.epil = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %indvars.iv31.epil %19 = load i32, ptr %arrayidx6.epil, align 4, !tbaa !5 %idxprom7.epil = sext i32 %19 to i64 %arrayidx8.epil = getelementptr inbounds [100010 x i32], ptr %d, i64 0, i64 %idxprom7.epil %20 = load i32, ptr %arrayidx8.epil, align 4, !tbaa !5 %21 = zext i32 %20 to i64 %cmp9.epil = icmp eq i64 %indvars.iv31.epil, %21 %cond.epil = zext i1 %cmp9.epil to i32 %add10.epil = add nuw nsw i32 %c.026.epil, %cond.epil %indvars.iv.next32.epil = add nuw nsw i64 %indvars.iv31.epil, 1 %epil.iter.next = add i64 %epil.iter, 1 %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter br i1 %epil.iter.cmp.not, label %for.end13.loopexit, label %for.body4.epil, !llvm.loop !12 for.end13.loopexit: ; preds = %for.body4.epil, %for.end13.loopexit.unr-lcssa %add10.lcssa = phi i32 [ %add10.lcssa.ph, %for.end13.loopexit.unr-lcssa ], [ %add10.epil, %for.body4.epil ] %22 = lshr i32 %add10.lcssa, 1 br label %for.end13 for.end13: ; preds = %entry, %for.end13.loopexit, %for.cond2.preheader %c.0.lcssa = phi i32 [ 0, %for.cond2.preheader ], [ %22, %for.end13.loopexit ], [ 0, %entry ] %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %c.0.lcssa) call void @llvm.lifetime.end.p0(i64 400040, ptr nonnull %d) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.unroll.disable"}
#include <stdio.h> #include <string.h> int main() { int n, num, i, j, cnt1=0, cnt2=0; int s[1001]; char r[1001], b[1001]; scanf("%d", &n); for(i=0; i<n; i++) { cnt1=cnt2=0; scanf("%d", &num); scanf("%s", r); scanf("%s", b); for(j=0; j<num; j++) { if(r[j]>b[j]) cnt1++; else if(r[j]<b[j]) cnt2++; } if(cnt1>cnt2) s[i] = 1; else if(cnt1<cnt2) s[i] = 2; else s[i] = 0; } for(i=0; i<n; i++) { if(s[i] == 1) printf("RED\n"); else if(s[i] == 2) printf("BLUE\n"); else printf("EQUAL\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27171/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27171/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [6 x i8] c"EQUAL\00", align 1 @str.5 = private unnamed_addr constant [5 x i8] c"BLUE\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"RED\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %num = alloca i32, align 4 %s = alloca [1001 x i32], align 16 %r = alloca [1001 x i8], align 16 %b = alloca [1001 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5 call void @llvm.lifetime.start.p0(i64 4004, ptr nonnull %s) #5 call void @llvm.lifetime.start.p0(i64 1001, ptr nonnull %r) #5 call void @llvm.lifetime.start.p0(i64 1001, ptr nonnull %b) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp92 = icmp sgt i32 %0, 0 br i1 %cmp92, label %for.body, label %for.end67 for.cond44.preheader: ; preds = %for.inc41 %1 = icmp sgt i32 %24, 0 br i1 %1, label %for.body47, label %for.end67 for.body: ; preds = %entry, %for.inc41 %indvars.iv97 = phi i64 [ %indvars.iv.next98, %for.inc41 ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %r) %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %b) %2 = load i32, ptr %num, align 4, !tbaa !5 %cmp687 = icmp sgt i32 %2, 0 br i1 %cmp687, label %for.body7.preheader, label %if.else36 for.body7.preheader: ; preds = %for.body %wide.trip.count = zext i32 %2 to i64 %min.iters.check = icmp ult i32 %2, 8 br i1 %min.iters.check, label %for.body7.preheader122, label %vector.ph vector.ph: ; preds = %for.body7.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ] %vec.phi114 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ] %vec.phi115 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %13, %vector.body ] %vec.phi116 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %14, %vector.body ] %3 = getelementptr inbounds [1001 x i8], ptr %r, i64 0, i64 %index %wide.load = load <4 x i8>, ptr %3, align 8, !tbaa !9 %4 = getelementptr inbounds i8, ptr %3, i64 4 %wide.load117 = load <4 x i8>, ptr %4, align 4, !tbaa !9 %5 = getelementptr inbounds [1001 x i8], ptr %b, i64 0, i64 %index %wide.load118 = load <4 x i8>, ptr %5, align 8, !tbaa !9 %6 = getelementptr inbounds i8, ptr %5, i64 4 %wide.load119 = load <4 x i8>, ptr %6, align 4, !tbaa !9 %7 = icmp sgt <4 x i8> %wide.load, %wide.load118 %8 = icmp sgt <4 x i8> %wide.load117, %wide.load119 %9 = icmp slt <4 x i8> %wide.load, %wide.load118 %10 = icmp slt <4 x i8> %wide.load117, %wide.load119 %11 = zext <4 x i1> %7 to <4 x i32> %12 = zext <4 x i1> %8 to <4 x i32> %13 = add <4 x i32> %vec.phi115, %11 %14 = add <4 x i32> %vec.phi116, %12 %15 = zext <4 x i1> %9 to <4 x i32> %16 = zext <4 x i1> %10 to <4 x i32> %17 = add <4 x i32> %vec.phi, %15 %18 = add <4 x i32> %vec.phi114, %16 %index.next = add nuw i64 %index, 8 %19 = icmp eq i64 %index.next, %n.vec br i1 %19, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %bin.rdx120 = add <4 x i32> %14, %13 %20 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx120) %bin.rdx = add <4 x i32> %18, %17 %21 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %for.body7.preheader122 for.body7.preheader122: ; preds = %for.body7.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body7.preheader ], [ %n.vec, %middle.block ] %cnt2.090.ph = phi i32 [ 0, %for.body7.preheader ], [ %21, %middle.block ] %cnt1.089.ph = phi i32 [ 0, %for.body7.preheader ], [ %20, %middle.block ] br label %for.body7 for.body7: ; preds = %for.body7.preheader122, %for.body7 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body7 ], [ %indvars.iv.ph, %for.body7.preheader122 ] %cnt2.090 = phi i32 [ %cnt2.1, %for.body7 ], [ %cnt2.090.ph, %for.body7.preheader122 ] %cnt1.089 = phi i32 [ %cnt1.1, %for.body7 ], [ %cnt1.089.ph, %for.body7.preheader122 ] %arrayidx = getelementptr inbounds [1001 x i8], ptr %r, i64 0, i64 %indvars.iv %22 = load i8, ptr %arrayidx, align 1, !tbaa !9 %arrayidx9 = getelementptr inbounds [1001 x i8], ptr %b, i64 0, i64 %indvars.iv %23 = load i8, ptr %arrayidx9, align 1, !tbaa !9 %cmp11 = icmp sgt i8 %22, %23 %cmp19 = icmp slt i8 %22, %23 %inc = zext i1 %cmp11 to i32 %cnt1.1 = add nuw nsw i32 %cnt1.089, %inc %spec.select = zext i1 %cmp19 to i32 %cnt2.1 = add nuw nsw i32 %cnt2.090, %spec.select %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.body7, !llvm.loop !14 for.end: ; preds = %for.body7, %middle.block %cnt1.1.lcssa = phi i32 [ %20, %middle.block ], [ %cnt1.1, %for.body7 ] %cnt2.1.lcssa = phi i32 [ %21, %middle.block ], [ %cnt2.1, %for.body7 ] %cmp25 = icmp ugt i32 %cnt1.1.lcssa, %cnt2.1.lcssa br i1 %cmp25, label %for.inc41, label %if.else30 if.else30: ; preds = %for.end %cmp31 = icmp ult i32 %cnt1.1.lcssa, %cnt2.1.lcssa br i1 %cmp31, label %for.inc41, label %if.else36 if.else36: ; preds = %for.body, %if.else30 br label %for.inc41 for.inc41: ; preds = %if.else30, %for.end, %if.else36 %.sink = phi i32 [ 0, %if.else36 ], [ 1, %for.end ], [ 2, %if.else30 ] %arrayidx29 = getelementptr inbounds [1001 x i32], ptr %s, i64 0, i64 %indvars.iv97 store i32 %.sink, ptr %arrayidx29, align 4, !tbaa !5 %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1 %24 = load i32, ptr %n, align 4, !tbaa !5 %25 = sext i32 %24 to i64 %cmp = icmp slt i64 %indvars.iv.next98, %25 br i1 %cmp, label %for.body, label %for.cond44.preheader, !llvm.loop !15 for.body47: ; preds = %for.cond44.preheader, %for.body47 %indvars.iv100 = phi i64 [ %indvars.iv.next101, %for.body47 ], [ 0, %for.cond44.preheader ] %arrayidx49 = getelementptr inbounds [1001 x i32], ptr %s, i64 0, i64 %indvars.iv100 %26 = load i32, ptr %arrayidx49, align 4, !tbaa !5 %switch.selectcmp = icmp eq i32 %26, 2 %switch.select = select i1 %switch.selectcmp, ptr @str.5, ptr @str %switch.selectcmp112 = icmp eq i32 %26, 1 %switch.select113 = select i1 %switch.selectcmp112, ptr @str.6, ptr %switch.select %puts86 = call i32 @puts(ptr nonnull dereferenceable(1) %switch.select113) %indvars.iv.next101 = add nuw nsw i64 %indvars.iv100, 1 %27 = load i32, ptr %n, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp45 = icmp slt i64 %indvars.iv.next101, %28 br i1 %cmp45, label %for.body47, label %for.end67, !llvm.loop !16 for.end67: ; preds = %for.body47, %entry, %for.cond44.preheader call void @llvm.lifetime.end.p0(i64 1001, ptr nonnull %b) #5 call void @llvm.lifetime.end.p0(i64 1001, ptr nonnull %r) #5 call void @llvm.lifetime.end.p0(i64 4004, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11} !16 = distinct !{!16, !11}
#include<stdio.h> int main(void){ int a[5][15]={0},i,j,n; scanf("%d",&n); for(i=0;i<n;i++){ char w; int x; scanf(" %c %d",&w,&x); int t; if(w=='S')t=0; if(w=='H')t=1; if(w=='C')t=2; if(w=='D')t=3; a[t][x]=1; } for(i=0;i<4;i++){ for(j=1;j<14;j++){ if(a[i][j]==0){ char tr[10]="SHCD"; printf("%c %d\n",tr[i],j); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271760/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271760/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c" %c %d\00", align 1 @__const.main.tr = private unnamed_addr constant [10 x i8] c"SHCD\00\00\00\00\00\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca [5 x [15 x i32]], align 16 %n = alloca i32, align 4 %w = alloca i8, align 1 %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 300, ptr nonnull %a) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(300) %a, i8 0, i64 300, i1 false) 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 %cmp55 = icmp sgt i32 %0, 0 br i1 %cmp55, label %for.body, label %for.cond25.preheader.preheader for.body: ; preds = %entry, %for.body %t.057 = phi i32 [ %t.4, %for.body ], [ undef, %entry ] %i.056 = phi i32 [ %inc, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %w) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %w, ptr noundef nonnull %x) %1 = load i8, ptr %w, align 1, !tbaa !9 %cmp2 = icmp eq i8 %1, 83 %spec.select = select i1 %cmp2, i32 0, i32 %t.057 %cmp5 = icmp eq i8 %1, 72 %t.2 = select i1 %cmp5, i32 1, i32 %spec.select %cmp10 = icmp eq i8 %1, 67 %t.3 = select i1 %cmp10, i32 2, i32 %t.2 %cmp15 = icmp eq i8 %1, 68 %t.4 = select i1 %cmp15, i32 3, i32 %t.3 %idxprom = sext i32 %t.4 to i64 %2 = load i32, ptr %x, align 4, !tbaa !5 %idxprom19 = sext i32 %2 to i64 %arrayidx20 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %idxprom, i64 %idxprom19 store i32 1, ptr %arrayidx20, align 4, !tbaa !5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %w) #4 %inc = add nuw nsw i32 %i.056, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %3 br i1 %cmp, label %for.body, label %for.cond25.preheader.preheader, !llvm.loop !10 for.cond25.preheader.preheader: ; preds = %for.body, %entry br label %for.cond25.preheader for.cond25.preheader: ; preds = %for.cond25.preheader.preheader, %for.inc41.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc41.12 ], [ 0, %for.cond25.preheader.preheader ] %arrayidx37 = getelementptr inbounds [10 x i8], ptr @__const.main.tr, i64 0, i64 %indvars.iv %arrayidx32 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 1 %4 = load i32, ptr %arrayidx32, align 4, !tbaa !5 %cmp33 = icmp eq i32 %4, 0 br i1 %cmp33, label %if.then35, label %for.inc41 if.then35: ; preds = %for.cond25.preheader %5 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38 = sext i8 %5 to i32 %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38, i32 noundef 1) br label %for.inc41 for.inc41: ; preds = %for.cond25.preheader, %if.then35 %arrayidx32.1 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 2 %6 = load i32, ptr %arrayidx32.1, align 4, !tbaa !5 %cmp33.1 = icmp eq i32 %6, 0 br i1 %cmp33.1, label %if.then35.1, label %for.inc41.1 if.then35.1: ; preds = %for.inc41 %7 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.1 = sext i8 %7 to i32 %call39.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.1, i32 noundef 2) br label %for.inc41.1 for.inc41.1: ; preds = %if.then35.1, %for.inc41 %arrayidx32.2 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 3 %8 = load i32, ptr %arrayidx32.2, align 4, !tbaa !5 %cmp33.2 = icmp eq i32 %8, 0 br i1 %cmp33.2, label %if.then35.2, label %for.inc41.2 if.then35.2: ; preds = %for.inc41.1 %9 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.2 = sext i8 %9 to i32 %call39.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.2, i32 noundef 3) br label %for.inc41.2 for.inc41.2: ; preds = %if.then35.2, %for.inc41.1 %arrayidx32.3 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 4 %10 = load i32, ptr %arrayidx32.3, align 4, !tbaa !5 %cmp33.3 = icmp eq i32 %10, 0 br i1 %cmp33.3, label %if.then35.3, label %for.inc41.3 if.then35.3: ; preds = %for.inc41.2 %11 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.3 = sext i8 %11 to i32 %call39.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.3, i32 noundef 4) br label %for.inc41.3 for.inc41.3: ; preds = %if.then35.3, %for.inc41.2 %arrayidx32.4 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 5 %12 = load i32, ptr %arrayidx32.4, align 4, !tbaa !5 %cmp33.4 = icmp eq i32 %12, 0 br i1 %cmp33.4, label %if.then35.4, label %for.inc41.4 if.then35.4: ; preds = %for.inc41.3 %13 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.4 = sext i8 %13 to i32 %call39.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.4, i32 noundef 5) br label %for.inc41.4 for.inc41.4: ; preds = %if.then35.4, %for.inc41.3 %arrayidx32.5 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 6 %14 = load i32, ptr %arrayidx32.5, align 4, !tbaa !5 %cmp33.5 = icmp eq i32 %14, 0 br i1 %cmp33.5, label %if.then35.5, label %for.inc41.5 if.then35.5: ; preds = %for.inc41.4 %15 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.5 = sext i8 %15 to i32 %call39.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.5, i32 noundef 6) br label %for.inc41.5 for.inc41.5: ; preds = %if.then35.5, %for.inc41.4 %arrayidx32.6 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 7 %16 = load i32, ptr %arrayidx32.6, align 4, !tbaa !5 %cmp33.6 = icmp eq i32 %16, 0 br i1 %cmp33.6, label %if.then35.6, label %for.inc41.6 if.then35.6: ; preds = %for.inc41.5 %17 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.6 = sext i8 %17 to i32 %call39.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.6, i32 noundef 7) br label %for.inc41.6 for.inc41.6: ; preds = %if.then35.6, %for.inc41.5 %arrayidx32.7 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 8 %18 = load i32, ptr %arrayidx32.7, align 4, !tbaa !5 %cmp33.7 = icmp eq i32 %18, 0 br i1 %cmp33.7, label %if.then35.7, label %for.inc41.7 if.then35.7: ; preds = %for.inc41.6 %19 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.7 = sext i8 %19 to i32 %call39.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.7, i32 noundef 8) br label %for.inc41.7 for.inc41.7: ; preds = %if.then35.7, %for.inc41.6 %arrayidx32.8 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 9 %20 = load i32, ptr %arrayidx32.8, align 4, !tbaa !5 %cmp33.8 = icmp eq i32 %20, 0 br i1 %cmp33.8, label %if.then35.8, label %for.inc41.8 if.then35.8: ; preds = %for.inc41.7 %21 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.8 = sext i8 %21 to i32 %call39.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.8, i32 noundef 9) br label %for.inc41.8 for.inc41.8: ; preds = %if.then35.8, %for.inc41.7 %arrayidx32.9 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 10 %22 = load i32, ptr %arrayidx32.9, align 4, !tbaa !5 %cmp33.9 = icmp eq i32 %22, 0 br i1 %cmp33.9, label %if.then35.9, label %for.inc41.9 if.then35.9: ; preds = %for.inc41.8 %23 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.9 = sext i8 %23 to i32 %call39.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.9, i32 noundef 10) br label %for.inc41.9 for.inc41.9: ; preds = %if.then35.9, %for.inc41.8 %arrayidx32.10 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 11 %24 = load i32, ptr %arrayidx32.10, align 4, !tbaa !5 %cmp33.10 = icmp eq i32 %24, 0 br i1 %cmp33.10, label %if.then35.10, label %for.inc41.10 if.then35.10: ; preds = %for.inc41.9 %25 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.10 = sext i8 %25 to i32 %call39.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.10, i32 noundef 11) br label %for.inc41.10 for.inc41.10: ; preds = %if.then35.10, %for.inc41.9 %arrayidx32.11 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 12 %26 = load i32, ptr %arrayidx32.11, align 4, !tbaa !5 %cmp33.11 = icmp eq i32 %26, 0 br i1 %cmp33.11, label %if.then35.11, label %for.inc41.11 if.then35.11: ; preds = %for.inc41.10 %27 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.11 = sext i8 %27 to i32 %call39.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.11, i32 noundef 12) br label %for.inc41.11 for.inc41.11: ; preds = %if.then35.11, %for.inc41.10 %arrayidx32.12 = getelementptr inbounds [5 x [15 x i32]], ptr %a, i64 0, i64 %indvars.iv, i64 13 %28 = load i32, ptr %arrayidx32.12, align 4, !tbaa !5 %cmp33.12 = icmp eq i32 %28, 0 br i1 %cmp33.12, label %if.then35.12, label %for.inc41.12 if.then35.12: ; preds = %for.inc41.11 %29 = load i8, ptr %arrayidx37, align 1, !tbaa !9 %conv38.12 = sext i8 %29 to i32 %call39.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv38.12, i32 noundef 13) br label %for.inc41.12 for.inc41.12: ; preds = %if.then35.12, %for.inc41.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end46, label %for.cond25.preheader, !llvm.loop !12 for.end46: ; preds = %for.inc41.12 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 300, 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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> #include<math.h> int main(){ int a;//??° int b[4][15]; int i; int i2; char s;//?????? int c;//?????? scanf("%d",&a); for(i=0;i<4;i++){ for(i2=1;i2<=13;i2++){ b[i][i2]=9; } } for(i=0;i<a;i++){ scanf("%s",&s); scanf("%d",&c); if(s=='S')b[0][c]=1; else if(s=='H')b[1][c]=1; else if(s=='C')b[2][c]=1; else if(s=='D')b[3][c]=1; } for(i=0;i<4;i++){ for(i2=1;i2<=13;i2++){ if(b[i][i2]!=1&&i==0)printf("S %d\n",i2); else if(b[i][i2]!=1&&i==1)printf("H %d\n",i2); else if(b[i][i2]!=1&&i==2)printf("C %d\n",i2); else if(b[i][i2]!=1&&i==3)printf("D %d\n",i2); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271803/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271803/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca [4 x [15 x i32]], align 16 %s = alloca i8, align 1 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 240, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %s) #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) %arrayidx5 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 1 %arrayidx5.1 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 2 %arrayidx5.2 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 3 %arrayidx5.3 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 4 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5, align 4, !tbaa !5 %arrayidx5.4 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 5 %arrayidx5.5 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 6 %arrayidx5.6 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 7 %arrayidx5.7 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 8 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.4, align 4, !tbaa !5 %arrayidx5.8 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 9 %arrayidx5.9 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 10 %arrayidx5.10 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 11 %arrayidx5.11 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 12 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.8, align 4, !tbaa !5 %arrayidx5.12 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 0, i64 13 store i32 9, ptr %arrayidx5.12, align 4, !tbaa !5 %arrayidx5.1169 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 1, i64 1 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.1169, align 16, !tbaa !5 %arrayidx5.4.1 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 1, i64 5 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.4.1, align 16, !tbaa !5 %arrayidx5.8.1 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 1, i64 9 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.8.1, align 16, !tbaa !5 %arrayidx5.12.1 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 1, i64 13 store i32 9, ptr %arrayidx5.12.1, align 16, !tbaa !5 %arrayidx5.2170 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 2, i64 1 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.2170, align 4, !tbaa !5 %arrayidx5.4.2 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 2, i64 5 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.4.2, align 4, !tbaa !5 %arrayidx5.8.2 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 2, i64 9 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.8.2, align 4, !tbaa !5 %arrayidx5.12.2 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 2, i64 13 store i32 9, ptr %arrayidx5.12.2, align 4, !tbaa !5 %arrayidx5.3171 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 3, i64 1 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.3171, align 8, !tbaa !5 %arrayidx5.4.3 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 3, i64 5 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.4.3, align 8, !tbaa !5 %arrayidx5.8.3 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 3, i64 9 store <4 x i32> <i32 9, i32 9, i32 9, i32 9>, ptr %arrayidx5.8.3, align 8, !tbaa !5 %arrayidx5.12.3 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 3, i64 13 store i32 9, ptr %arrayidx5.12.3, align 8, !tbaa !5 %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp10143 = icmp sgt i32 %0, 0 br i1 %cmp10143, label %for.body11, label %for.cond52.preheader.preheader for.body11: ; preds = %entry, %for.inc45 %i.1144 = phi i32 [ %inc46, %for.inc45 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %s) %call13 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %1 = load i8, ptr %s, align 1, !tbaa !9 switch i8 %1, label %for.inc45 [ i8 83, label %if.then i8 72, label %if.then22 i8 67, label %if.then30 i8 68, label %if.then38 ] if.then: ; preds = %for.body11 %2 = load i32, ptr %c, align 4, !tbaa !5 %idxprom17 = sext i32 %2 to i64 %arrayidx18 = getelementptr inbounds [15 x i32], ptr %b, i64 0, i64 %idxprom17 br label %for.inc45.sink.split if.then22: ; preds = %for.body11 %3 = load i32, ptr %c, align 4, !tbaa !5 %idxprom24 = sext i32 %3 to i64 %arrayidx25 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %4 = load i32, ptr %c, align 4, !tbaa !5 %idxprom32 = sext i32 %4 to i64 %arrayidx33 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 2, i64 %idxprom32 br label %for.inc45.sink.split if.then38: ; preds = %for.body11 %5 = load i32, ptr %c, align 4, !tbaa !5 %idxprom40 = sext i32 %5 to i64 %arrayidx41 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 3, i64 %idxprom40 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then22, %if.then38, %if.then30, %if.then %arrayidx18.sink = phi ptr [ %arrayidx18, %if.then ], [ %arrayidx33, %if.then30 ], [ %arrayidx41, %if.then38 ], [ %arrayidx25, %if.then22 ] store i32 1, ptr %arrayidx18.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %i.1144, 1 %6 = load i32, ptr %a, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc46, %6 br i1 %cmp10, label %for.body11, label %for.cond52.preheader.preheader, !llvm.loop !10 for.cond52.preheader.preheader: ; preds = %for.inc45, %entry br label %for.cond52.preheader for.cond52.preheader: ; preds = %for.cond52.preheader.preheader, %for.inc109 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc109 ], [ 0, %for.cond52.preheader.preheader ] %cmp62 = icmp eq i64 %indvars.iv, 0 %cmp74 = icmp eq i64 %indvars.iv, 1 %cmp86 = icmp eq i64 %indvars.iv, 2 %cmp98 = icmp eq i64 %indvars.iv, 3 br i1 %cmp62, label %for.body55.us146.preheader, label %for.body55.us.preheader for.body55.us.preheader: ; preds = %for.cond52.preheader %arrayidx59.us = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 1 %7 = load i32, ptr %arrayidx59.us, align 4, !tbaa !5 %cmp60.us = icmp ne i32 %7, 1 %or.cond112.us = and i1 %cmp74, %cmp60.us br i1 %or.cond112.us, label %if.then76.us, label %if.else78.us if.else78.us: ; preds = %for.body55.us.preheader %or.cond113.us = and i1 %cmp86, %cmp60.us br i1 %or.cond113.us, label %for.inc106.us.thread, label %if.else90.us if.else90.us: ; preds = %if.else78.us %or.cond114.us = and i1 %cmp98, %cmp60.us br i1 %or.cond114.us, label %for.inc106.us.thread, label %for.inc106.us if.then76.us: ; preds = %for.body55.us.preheader %call77.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc106.us for.inc106.us.thread: ; preds = %if.else78.us, %if.else90.us %.str.4.sink = phi ptr [ @.str.5, %if.else90.us ], [ @.str.4, %if.else78.us ] %call89.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink, i32 noundef 1) %arrayidx59.us.1176 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 2 %8 = load i32, ptr %arrayidx59.us.1176, align 4, !tbaa !5 %cmp60.us.1177 = icmp ne i32 %8, 1 br label %if.else78.us.1 for.inc106.us: ; preds = %if.then76.us, %if.else90.us %arrayidx59.us.1 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 2 %9 = load i32, ptr %arrayidx59.us.1, align 4, !tbaa !5 %cmp60.us.1 = icmp ne i32 %9, 1 %or.cond112.us.1 = and i1 %cmp74, %cmp60.us.1 br i1 %or.cond112.us.1, label %if.then76.us.1, label %if.else78.us.1 if.else78.us.1: ; preds = %for.inc106.us.thread, %for.inc106.us %cmp60.us.1179 = phi i1 [ %cmp60.us.1177, %for.inc106.us.thread ], [ %cmp60.us.1, %for.inc106.us ] %or.cond113.us.1 = and i1 %cmp86, %cmp60.us.1179 br i1 %or.cond113.us.1, label %for.inc106.us.1.thread, label %if.else90.us.1 if.else90.us.1: ; preds = %if.else78.us.1 %or.cond114.us.1 = and i1 %cmp98, %cmp60.us.1179 br i1 %or.cond114.us.1, label %for.inc106.us.1.thread, label %for.inc106.us.1 if.then76.us.1: ; preds = %for.inc106.us %call77.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc106.us.1 for.inc106.us.1.thread: ; preds = %if.else78.us.1, %if.else90.us.1 %.str.4.sink226 = phi ptr [ @.str.5, %if.else90.us.1 ], [ @.str.4, %if.else78.us.1 ] %call89.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink226, i32 noundef 2) %arrayidx59.us.2180 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 3 %10 = load i32, ptr %arrayidx59.us.2180, align 4, !tbaa !5 %cmp60.us.2181 = icmp ne i32 %10, 1 br label %if.else78.us.2 for.inc106.us.1: ; preds = %if.then76.us.1, %if.else90.us.1 %arrayidx59.us.2 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 3 %11 = load i32, ptr %arrayidx59.us.2, align 4, !tbaa !5 %cmp60.us.2 = icmp ne i32 %11, 1 %or.cond112.us.2 = and i1 %cmp74, %cmp60.us.2 br i1 %or.cond112.us.2, label %if.then76.us.2, label %if.else78.us.2 if.else78.us.2: ; preds = %for.inc106.us.1.thread, %for.inc106.us.1 %cmp60.us.2183 = phi i1 [ %cmp60.us.2181, %for.inc106.us.1.thread ], [ %cmp60.us.2, %for.inc106.us.1 ] %or.cond113.us.2 = and i1 %cmp86, %cmp60.us.2183 br i1 %or.cond113.us.2, label %for.inc106.us.2.thread, label %if.else90.us.2 if.else90.us.2: ; preds = %if.else78.us.2 %or.cond114.us.2 = and i1 %cmp98, %cmp60.us.2183 br i1 %or.cond114.us.2, label %for.inc106.us.2.thread, label %for.inc106.us.2 if.then76.us.2: ; preds = %for.inc106.us.1 %call77.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc106.us.2 for.inc106.us.2.thread: ; preds = %if.else78.us.2, %if.else90.us.2 %.str.4.sink227 = phi ptr [ @.str.5, %if.else90.us.2 ], [ @.str.4, %if.else78.us.2 ] %call89.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink227, i32 noundef 3) %arrayidx59.us.3184 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 4 %12 = load i32, ptr %arrayidx59.us.3184, align 4, !tbaa !5 %cmp60.us.3185 = icmp ne i32 %12, 1 br label %if.else78.us.3 for.inc106.us.2: ; preds = %if.then76.us.2, %if.else90.us.2 %arrayidx59.us.3 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 4 %13 = load i32, ptr %arrayidx59.us.3, align 4, !tbaa !5 %cmp60.us.3 = icmp ne i32 %13, 1 %or.cond112.us.3 = and i1 %cmp74, %cmp60.us.3 br i1 %or.cond112.us.3, label %if.then76.us.3, label %if.else78.us.3 if.else78.us.3: ; preds = %for.inc106.us.2.thread, %for.inc106.us.2 %cmp60.us.3187 = phi i1 [ %cmp60.us.3185, %for.inc106.us.2.thread ], [ %cmp60.us.3, %for.inc106.us.2 ] %or.cond113.us.3 = and i1 %cmp86, %cmp60.us.3187 br i1 %or.cond113.us.3, label %for.inc106.us.3.thread, label %if.else90.us.3 if.else90.us.3: ; preds = %if.else78.us.3 %or.cond114.us.3 = and i1 %cmp98, %cmp60.us.3187 br i1 %or.cond114.us.3, label %for.inc106.us.3.thread, label %for.inc106.us.3 if.then76.us.3: ; preds = %for.inc106.us.2 %call77.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc106.us.3 for.inc106.us.3.thread: ; preds = %if.else78.us.3, %if.else90.us.3 %.str.4.sink228 = phi ptr [ @.str.5, %if.else90.us.3 ], [ @.str.4, %if.else78.us.3 ] %call89.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink228, i32 noundef 4) %arrayidx59.us.4188 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 5 %14 = load i32, ptr %arrayidx59.us.4188, align 4, !tbaa !5 %cmp60.us.4189 = icmp ne i32 %14, 1 br label %if.else78.us.4 for.inc106.us.3: ; preds = %if.then76.us.3, %if.else90.us.3 %arrayidx59.us.4 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 5 %15 = load i32, ptr %arrayidx59.us.4, align 4, !tbaa !5 %cmp60.us.4 = icmp ne i32 %15, 1 %or.cond112.us.4 = and i1 %cmp74, %cmp60.us.4 br i1 %or.cond112.us.4, label %if.then76.us.4, label %if.else78.us.4 if.else78.us.4: ; preds = %for.inc106.us.3.thread, %for.inc106.us.3 %cmp60.us.4191 = phi i1 [ %cmp60.us.4189, %for.inc106.us.3.thread ], [ %cmp60.us.4, %for.inc106.us.3 ] %or.cond113.us.4 = and i1 %cmp86, %cmp60.us.4191 br i1 %or.cond113.us.4, label %for.inc106.us.4.thread, label %if.else90.us.4 if.else90.us.4: ; preds = %if.else78.us.4 %or.cond114.us.4 = and i1 %cmp98, %cmp60.us.4191 br i1 %or.cond114.us.4, label %for.inc106.us.4.thread, label %for.inc106.us.4 if.then76.us.4: ; preds = %for.inc106.us.3 %call77.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc106.us.4 for.inc106.us.4.thread: ; preds = %if.else78.us.4, %if.else90.us.4 %.str.4.sink229 = phi ptr [ @.str.5, %if.else90.us.4 ], [ @.str.4, %if.else78.us.4 ] %call89.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink229, i32 noundef 5) %arrayidx59.us.5192 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 6 %16 = load i32, ptr %arrayidx59.us.5192, align 4, !tbaa !5 %cmp60.us.5193 = icmp ne i32 %16, 1 br label %if.else78.us.5 for.inc106.us.4: ; preds = %if.then76.us.4, %if.else90.us.4 %arrayidx59.us.5 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 6 %17 = load i32, ptr %arrayidx59.us.5, align 4, !tbaa !5 %cmp60.us.5 = icmp ne i32 %17, 1 %or.cond112.us.5 = and i1 %cmp74, %cmp60.us.5 br i1 %or.cond112.us.5, label %if.then76.us.5, label %if.else78.us.5 if.else78.us.5: ; preds = %for.inc106.us.4.thread, %for.inc106.us.4 %cmp60.us.5195 = phi i1 [ %cmp60.us.5193, %for.inc106.us.4.thread ], [ %cmp60.us.5, %for.inc106.us.4 ] %or.cond113.us.5 = and i1 %cmp86, %cmp60.us.5195 br i1 %or.cond113.us.5, label %for.inc106.us.5.thread, label %if.else90.us.5 if.else90.us.5: ; preds = %if.else78.us.5 %or.cond114.us.5 = and i1 %cmp98, %cmp60.us.5195 br i1 %or.cond114.us.5, label %for.inc106.us.5.thread, label %for.inc106.us.5 if.then76.us.5: ; preds = %for.inc106.us.4 %call77.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc106.us.5 for.inc106.us.5.thread: ; preds = %if.else78.us.5, %if.else90.us.5 %.str.4.sink230 = phi ptr [ @.str.5, %if.else90.us.5 ], [ @.str.4, %if.else78.us.5 ] %call89.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink230, i32 noundef 6) %arrayidx59.us.6196 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 7 %18 = load i32, ptr %arrayidx59.us.6196, align 4, !tbaa !5 %cmp60.us.6197 = icmp ne i32 %18, 1 br label %if.else78.us.6 for.inc106.us.5: ; preds = %if.then76.us.5, %if.else90.us.5 %arrayidx59.us.6 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 7 %19 = load i32, ptr %arrayidx59.us.6, align 4, !tbaa !5 %cmp60.us.6 = icmp ne i32 %19, 1 %or.cond112.us.6 = and i1 %cmp74, %cmp60.us.6 br i1 %or.cond112.us.6, label %if.then76.us.6, label %if.else78.us.6 if.else78.us.6: ; preds = %for.inc106.us.5.thread, %for.inc106.us.5 %cmp60.us.6199 = phi i1 [ %cmp60.us.6197, %for.inc106.us.5.thread ], [ %cmp60.us.6, %for.inc106.us.5 ] %or.cond113.us.6 = and i1 %cmp86, %cmp60.us.6199 br i1 %or.cond113.us.6, label %for.inc106.us.6.thread, label %if.else90.us.6 if.else90.us.6: ; preds = %if.else78.us.6 %or.cond114.us.6 = and i1 %cmp98, %cmp60.us.6199 br i1 %or.cond114.us.6, label %for.inc106.us.6.thread, label %for.inc106.us.6 if.then76.us.6: ; preds = %for.inc106.us.5 %call77.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc106.us.6 for.inc106.us.6.thread: ; preds = %if.else78.us.6, %if.else90.us.6 %.str.4.sink231 = phi ptr [ @.str.5, %if.else90.us.6 ], [ @.str.4, %if.else78.us.6 ] %call89.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink231, i32 noundef 7) %arrayidx59.us.7200 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 8 %20 = load i32, ptr %arrayidx59.us.7200, align 4, !tbaa !5 %cmp60.us.7201 = icmp ne i32 %20, 1 br label %if.else78.us.7 for.inc106.us.6: ; preds = %if.then76.us.6, %if.else90.us.6 %arrayidx59.us.7 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 8 %21 = load i32, ptr %arrayidx59.us.7, align 4, !tbaa !5 %cmp60.us.7 = icmp ne i32 %21, 1 %or.cond112.us.7 = and i1 %cmp74, %cmp60.us.7 br i1 %or.cond112.us.7, label %if.then76.us.7, label %if.else78.us.7 if.else78.us.7: ; preds = %for.inc106.us.6.thread, %for.inc106.us.6 %cmp60.us.7203 = phi i1 [ %cmp60.us.7201, %for.inc106.us.6.thread ], [ %cmp60.us.7, %for.inc106.us.6 ] %or.cond113.us.7 = and i1 %cmp86, %cmp60.us.7203 br i1 %or.cond113.us.7, label %for.inc106.us.7.thread, label %if.else90.us.7 if.else90.us.7: ; preds = %if.else78.us.7 %or.cond114.us.7 = and i1 %cmp98, %cmp60.us.7203 br i1 %or.cond114.us.7, label %for.inc106.us.7.thread, label %for.inc106.us.7 if.then76.us.7: ; preds = %for.inc106.us.6 %call77.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc106.us.7 for.inc106.us.7.thread: ; preds = %if.else78.us.7, %if.else90.us.7 %.str.4.sink232 = phi ptr [ @.str.5, %if.else90.us.7 ], [ @.str.4, %if.else78.us.7 ] %call89.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink232, i32 noundef 8) %arrayidx59.us.8204 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 9 %22 = load i32, ptr %arrayidx59.us.8204, align 4, !tbaa !5 %cmp60.us.8205 = icmp ne i32 %22, 1 br label %if.else78.us.8 for.inc106.us.7: ; preds = %if.then76.us.7, %if.else90.us.7 %arrayidx59.us.8 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 9 %23 = load i32, ptr %arrayidx59.us.8, align 4, !tbaa !5 %cmp60.us.8 = icmp ne i32 %23, 1 %or.cond112.us.8 = and i1 %cmp74, %cmp60.us.8 br i1 %or.cond112.us.8, label %if.then76.us.8, label %if.else78.us.8 if.else78.us.8: ; preds = %for.inc106.us.7.thread, %for.inc106.us.7 %cmp60.us.8207 = phi i1 [ %cmp60.us.8205, %for.inc106.us.7.thread ], [ %cmp60.us.8, %for.inc106.us.7 ] %or.cond113.us.8 = and i1 %cmp86, %cmp60.us.8207 br i1 %or.cond113.us.8, label %for.inc106.us.8.thread, label %if.else90.us.8 if.else90.us.8: ; preds = %if.else78.us.8 %or.cond114.us.8 = and i1 %cmp98, %cmp60.us.8207 br i1 %or.cond114.us.8, label %for.inc106.us.8.thread, label %for.inc106.us.8 if.then76.us.8: ; preds = %for.inc106.us.7 %call77.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc106.us.8 for.inc106.us.8.thread: ; preds = %if.else78.us.8, %if.else90.us.8 %.str.4.sink233 = phi ptr [ @.str.5, %if.else90.us.8 ], [ @.str.4, %if.else78.us.8 ] %call89.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink233, i32 noundef 9) %arrayidx59.us.9208 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 10 %24 = load i32, ptr %arrayidx59.us.9208, align 4, !tbaa !5 %cmp60.us.9209 = icmp ne i32 %24, 1 br label %if.else78.us.9 for.inc106.us.8: ; preds = %if.then76.us.8, %if.else90.us.8 %arrayidx59.us.9 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 10 %25 = load i32, ptr %arrayidx59.us.9, align 4, !tbaa !5 %cmp60.us.9 = icmp ne i32 %25, 1 %or.cond112.us.9 = and i1 %cmp74, %cmp60.us.9 br i1 %or.cond112.us.9, label %if.then76.us.9, label %if.else78.us.9 if.else78.us.9: ; preds = %for.inc106.us.8.thread, %for.inc106.us.8 %cmp60.us.9211 = phi i1 [ %cmp60.us.9209, %for.inc106.us.8.thread ], [ %cmp60.us.9, %for.inc106.us.8 ] %or.cond113.us.9 = and i1 %cmp86, %cmp60.us.9211 br i1 %or.cond113.us.9, label %for.inc106.us.9.thread, label %if.else90.us.9 if.else90.us.9: ; preds = %if.else78.us.9 %or.cond114.us.9 = and i1 %cmp98, %cmp60.us.9211 br i1 %or.cond114.us.9, label %for.inc106.us.9.thread, label %for.inc106.us.9 if.then76.us.9: ; preds = %for.inc106.us.8 %call77.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc106.us.9 for.inc106.us.9.thread: ; preds = %if.else78.us.9, %if.else90.us.9 %.str.4.sink234 = phi ptr [ @.str.5, %if.else90.us.9 ], [ @.str.4, %if.else78.us.9 ] %call89.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink234, i32 noundef 10) %arrayidx59.us.10212 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 11 %26 = load i32, ptr %arrayidx59.us.10212, align 4, !tbaa !5 %cmp60.us.10213 = icmp ne i32 %26, 1 br label %if.else78.us.10 for.inc106.us.9: ; preds = %if.then76.us.9, %if.else90.us.9 %arrayidx59.us.10 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 11 %27 = load i32, ptr %arrayidx59.us.10, align 4, !tbaa !5 %cmp60.us.10 = icmp ne i32 %27, 1 %or.cond112.us.10 = and i1 %cmp74, %cmp60.us.10 br i1 %or.cond112.us.10, label %if.then76.us.10, label %if.else78.us.10 if.else78.us.10: ; preds = %for.inc106.us.9.thread, %for.inc106.us.9 %cmp60.us.10215 = phi i1 [ %cmp60.us.10213, %for.inc106.us.9.thread ], [ %cmp60.us.10, %for.inc106.us.9 ] %or.cond113.us.10 = and i1 %cmp86, %cmp60.us.10215 br i1 %or.cond113.us.10, label %for.inc106.us.10.thread, label %if.else90.us.10 if.else90.us.10: ; preds = %if.else78.us.10 %or.cond114.us.10 = and i1 %cmp98, %cmp60.us.10215 br i1 %or.cond114.us.10, label %for.inc106.us.10.thread, label %for.inc106.us.10 if.then76.us.10: ; preds = %for.inc106.us.9 %call77.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc106.us.10 for.inc106.us.10.thread: ; preds = %if.else78.us.10, %if.else90.us.10 %.str.4.sink235 = phi ptr [ @.str.5, %if.else90.us.10 ], [ @.str.4, %if.else78.us.10 ] %call89.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink235, i32 noundef 11) %arrayidx59.us.11216 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 12 %28 = load i32, ptr %arrayidx59.us.11216, align 4, !tbaa !5 %cmp60.us.11217 = icmp ne i32 %28, 1 br label %if.else78.us.11 for.inc106.us.10: ; preds = %if.then76.us.10, %if.else90.us.10 %arrayidx59.us.11 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 12 %29 = load i32, ptr %arrayidx59.us.11, align 4, !tbaa !5 %cmp60.us.11 = icmp ne i32 %29, 1 %or.cond112.us.11 = and i1 %cmp74, %cmp60.us.11 br i1 %or.cond112.us.11, label %if.then76.us.11, label %if.else78.us.11 if.else78.us.11: ; preds = %for.inc106.us.10.thread, %for.inc106.us.10 %cmp60.us.11219 = phi i1 [ %cmp60.us.11217, %for.inc106.us.10.thread ], [ %cmp60.us.11, %for.inc106.us.10 ] %or.cond113.us.11 = and i1 %cmp86, %cmp60.us.11219 br i1 %or.cond113.us.11, label %for.inc106.us.11.thread, label %if.else90.us.11 if.else90.us.11: ; preds = %if.else78.us.11 %or.cond114.us.11 = and i1 %cmp98, %cmp60.us.11219 br i1 %or.cond114.us.11, label %for.inc106.us.11.thread, label %for.inc106.us.11 if.then76.us.11: ; preds = %for.inc106.us.10 %call77.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc106.us.11 for.inc106.us.11.thread: ; preds = %if.else78.us.11, %if.else90.us.11 %.str.4.sink236 = phi ptr [ @.str.5, %if.else90.us.11 ], [ @.str.4, %if.else78.us.11 ] %call89.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.4.sink236, i32 noundef 12) %arrayidx59.us.12220 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 13 %30 = load i32, ptr %arrayidx59.us.12220, align 4, !tbaa !5 %cmp60.us.12221 = icmp ne i32 %30, 1 br label %if.else78.us.12 for.inc106.us.11: ; preds = %if.then76.us.11, %if.else90.us.11 %arrayidx59.us.12 = getelementptr inbounds [4 x [15 x i32]], ptr %b, i64 0, i64 %indvars.iv, i64 13 %31 = load i32, ptr %arrayidx59.us.12, align 4, !tbaa !5 %cmp60.us.12 = icmp ne i32 %31, 1 %or.cond112.us.12 = and i1 %cmp74, %cmp60.us.12 br i1 %or.cond112.us.12, label %for.inc109.sink.split, label %if.else78.us.12 if.else78.us.12: ; preds = %for.inc106.us.11.thread, %for.inc106.us.11 %cmp60.us.12223 = phi i1 [ %cmp60.us.12221, %for.inc106.us.11.thread ], [ %cmp60.us.12, %for.inc106.us.11 ] %or.cond113.us.12 = and i1 %cmp86, %cmp60.us.12223 br i1 %or.cond113.us.12, label %for.inc109.sink.split, label %if.else90.us.12 if.else90.us.12: ; preds = %if.else78.us.12 %or.cond114.us.12 = and i1 %cmp98, %cmp60.us.12223 br i1 %or.cond114.us.12, label %for.inc109.thread, label %for.inc109 for.inc109.thread: ; preds = %if.else90.us.12 %call101.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.end111 for.body55.us146.preheader: ; preds = %for.cond52.preheader %32 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %cmp60.us150.not = icmp eq i32 %32, 1 br i1 %cmp60.us150.not, label %for.inc106.us161, label %if.then64.us if.then64.us: ; preds = %for.body55.us146.preheader %call65.us = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc106.us161 for.inc106.us161: ; preds = %for.body55.us146.preheader, %if.then64.us %33 = load i32, ptr %arrayidx5.1, align 8, !tbaa !5 %cmp60.us150.not.1 = icmp eq i32 %33, 1 br i1 %cmp60.us150.not.1, label %for.inc106.us161.1, label %if.then64.us.1 if.then64.us.1: ; preds = %for.inc106.us161 %call65.us.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc106.us161.1 for.inc106.us161.1: ; preds = %if.then64.us.1, %for.inc106.us161 %34 = load i32, ptr %arrayidx5.2, align 4, !tbaa !5 %cmp60.us150.not.2 = icmp eq i32 %34, 1 br i1 %cmp60.us150.not.2, label %for.inc106.us161.2, label %if.then64.us.2 if.then64.us.2: ; preds = %for.inc106.us161.1 %call65.us.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc106.us161.2 for.inc106.us161.2: ; preds = %if.then64.us.2, %for.inc106.us161.1 %35 = load i32, ptr %arrayidx5.3, align 16, !tbaa !5 %cmp60.us150.not.3 = icmp eq i32 %35, 1 br i1 %cmp60.us150.not.3, label %for.inc106.us161.3, label %if.then64.us.3 if.then64.us.3: ; preds = %for.inc106.us161.2 %call65.us.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc106.us161.3 for.inc106.us161.3: ; preds = %if.then64.us.3, %for.inc106.us161.2 %36 = load i32, ptr %arrayidx5.4, align 4, !tbaa !5 %cmp60.us150.not.4 = icmp eq i32 %36, 1 br i1 %cmp60.us150.not.4, label %for.inc106.us161.4, label %if.then64.us.4 if.then64.us.4: ; preds = %for.inc106.us161.3 %call65.us.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc106.us161.4 for.inc106.us161.4: ; preds = %if.then64.us.4, %for.inc106.us161.3 %37 = load i32, ptr %arrayidx5.5, align 8, !tbaa !5 %cmp60.us150.not.5 = icmp eq i32 %37, 1 br i1 %cmp60.us150.not.5, label %for.inc106.us161.5, label %if.then64.us.5 if.then64.us.5: ; preds = %for.inc106.us161.4 %call65.us.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc106.us161.5 for.inc106.us161.5: ; preds = %if.then64.us.5, %for.inc106.us161.4 %38 = load i32, ptr %arrayidx5.6, align 4, !tbaa !5 %cmp60.us150.not.6 = icmp eq i32 %38, 1 br i1 %cmp60.us150.not.6, label %for.inc106.us161.6, label %if.then64.us.6 if.then64.us.6: ; preds = %for.inc106.us161.5 %call65.us.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc106.us161.6 for.inc106.us161.6: ; preds = %if.then64.us.6, %for.inc106.us161.5 %39 = load i32, ptr %arrayidx5.7, align 16, !tbaa !5 %cmp60.us150.not.7 = icmp eq i32 %39, 1 br i1 %cmp60.us150.not.7, label %for.inc106.us161.7, label %if.then64.us.7 if.then64.us.7: ; preds = %for.inc106.us161.6 %call65.us.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc106.us161.7 for.inc106.us161.7: ; preds = %if.then64.us.7, %for.inc106.us161.6 %40 = load i32, ptr %arrayidx5.8, align 4, !tbaa !5 %cmp60.us150.not.8 = icmp eq i32 %40, 1 br i1 %cmp60.us150.not.8, label %for.inc106.us161.8, label %if.then64.us.8 if.then64.us.8: ; preds = %for.inc106.us161.7 %call65.us.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc106.us161.8 for.inc106.us161.8: ; preds = %if.then64.us.8, %for.inc106.us161.7 %41 = load i32, ptr %arrayidx5.9, align 8, !tbaa !5 %cmp60.us150.not.9 = icmp eq i32 %41, 1 br i1 %cmp60.us150.not.9, label %for.inc106.us161.9, label %if.then64.us.9 if.then64.us.9: ; preds = %for.inc106.us161.8 %call65.us.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc106.us161.9 for.inc106.us161.9: ; preds = %if.then64.us.9, %for.inc106.us161.8 %42 = load i32, ptr %arrayidx5.10, align 4, !tbaa !5 %cmp60.us150.not.10 = icmp eq i32 %42, 1 br i1 %cmp60.us150.not.10, label %for.inc106.us161.10, label %if.then64.us.10 if.then64.us.10: ; preds = %for.inc106.us161.9 %call65.us.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc106.us161.10 for.inc106.us161.10: ; preds = %if.then64.us.10, %for.inc106.us161.9 %43 = load i32, ptr %arrayidx5.11, align 16, !tbaa !5 %cmp60.us150.not.11 = icmp eq i32 %43, 1 br i1 %cmp60.us150.not.11, label %for.inc106.us161.11, label %if.then64.us.11 if.then64.us.11: ; preds = %for.inc106.us161.10 %call65.us.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc106.us161.11 for.inc106.us161.11: ; preds = %if.then64.us.11, %for.inc106.us161.10 %44 = load i32, ptr %arrayidx5.12, align 4, !tbaa !5 %cmp60.us150.not.12 = icmp eq i32 %44, 1 br i1 %cmp60.us150.not.12, label %for.inc109, label %for.inc109.sink.split for.inc109.sink.split: ; preds = %for.inc106.us161.11, %for.inc106.us.11, %if.else78.us.12 %.str.2.sink = phi ptr [ @.str.4, %if.else78.us.12 ], [ @.str.3, %for.inc106.us.11 ], [ @.str.2, %for.inc106.us161.11 ] %call65.us.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.2.sink, i32 noundef 13) br label %for.inc109 for.inc109: ; preds = %for.inc109.sink.split, %for.inc106.us161.11, %if.else90.us.12 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end111, label %for.cond52.preheader, !llvm.loop !12 for.end111: ; preds = %for.inc109, %for.inc109.thread call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %s) #3 call void @llvm.lifetime.end.p0(i64 240, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(){ char c; int n,a,b,i,j,card[4][13]; for(i=0;i<4;i++){ for(j=0;j<13;j++){ card[i][j] = 0; //すべての配列をfalseに } } scanf("%d",&n); //枚数の取得 for(i=0; i<n; i++){ scanf("%s %d",&c,&b); //絵柄とランクの取得 if(c=='S')a=0; else if(c=='H')a=1; else if(c=='C')a=2; //絵柄を数値に変換 else a=3; card[a][b-1] = 1; //取得したところの配列をtrueに } for(j=0;j<13;j++){ if(!(card[0][j]))printf("S %d\n",j+1); } for(j=0;j<13;j++){ if(!(card[1][j]))printf("H %d\n",j+1); } for(j=0;j<13;j++){ if(!(card[2][j]))printf("C %d\n",j+1); } for(j=0;j<13;j++){ if(!(card[3][j]))printf("D %d\n",j+1); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271854/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271854/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %d\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"S %d\0A\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"H %d\0A\00", align 1 @.str.4 = private unnamed_addr constant [6 x i8] c"C %d\0A\00", align 1 @.str.5 = private unnamed_addr constant [6 x i8] c"D %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %c = alloca i8, align 1 %n = alloca i32, align 4 %b = alloca i32, align 4 %card = alloca [4 x [13 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false), !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10116 = icmp sgt i32 %0, 0 br i1 %cmp10116, label %for.body11, label %for.cond34.preheader for.cond34.preheader: ; preds = %if.end26, %entry %1 = load i32, ptr %card, align 16, !tbaa !5 %tobool.not = icmp eq i32 %1, 0 br i1 %tobool.not, label %if.then41, label %for.inc44 for.body11: ; preds = %entry, %if.end26 %i.1117 = phi i32 [ %inc32, %if.end26 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %b) %2 = load i8, ptr %c, align 1, !tbaa !9 switch i8 %2, label %if.else24 [ i8 83, label %if.end26 i8 72, label %if.then18 i8 67, label %if.then23 ] if.then18: ; preds = %for.body11 br label %if.end26 if.then23: ; preds = %for.body11 br label %if.end26 if.else24: ; preds = %for.body11 br label %if.end26 if.end26: ; preds = %for.body11, %if.then18, %if.else24, %if.then23 %a.0 = phi i64 [ 1, %if.then18 ], [ 2, %if.then23 ], [ 3, %if.else24 ], [ 0, %for.body11 ] %3 = load i32, ptr %b, align 4, !tbaa !5 %sub = add nsw i32 %3, -1 %idxprom29 = sext i32 %sub to i64 %arrayidx30 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %a.0, i64 %idxprom29 store i32 1, ptr %arrayidx30, align 4, !tbaa !5 %inc32 = add nuw nsw i32 %i.1117, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc32, %4 br i1 %cmp10, label %for.body11, label %for.cond34.preheader, !llvm.loop !10 if.then41: ; preds = %for.cond34.preheader %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 1) br label %for.inc44 for.inc44: ; preds = %for.cond34.preheader, %if.then41 %arrayidx40.1 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 1 %5 = load i32, ptr %arrayidx40.1, align 4, !tbaa !5 %tobool.not.1 = icmp eq i32 %5, 0 br i1 %tobool.not.1, label %if.then41.1, label %for.inc44.1 if.then41.1: ; preds = %for.inc44 %call42.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 2) br label %for.inc44.1 for.inc44.1: ; preds = %if.then41.1, %for.inc44 %arrayidx40.2 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 2 %6 = load i32, ptr %arrayidx40.2, align 8, !tbaa !5 %tobool.not.2 = icmp eq i32 %6, 0 br i1 %tobool.not.2, label %if.then41.2, label %for.inc44.2 if.then41.2: ; preds = %for.inc44.1 %call42.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 3) br label %for.inc44.2 for.inc44.2: ; preds = %if.then41.2, %for.inc44.1 %arrayidx40.3 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 3 %7 = load i32, ptr %arrayidx40.3, align 4, !tbaa !5 %tobool.not.3 = icmp eq i32 %7, 0 br i1 %tobool.not.3, label %if.then41.3, label %for.inc44.3 if.then41.3: ; preds = %for.inc44.2 %call42.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 4) br label %for.inc44.3 for.inc44.3: ; preds = %if.then41.3, %for.inc44.2 %arrayidx40.4 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 4 %8 = load i32, ptr %arrayidx40.4, align 16, !tbaa !5 %tobool.not.4 = icmp eq i32 %8, 0 br i1 %tobool.not.4, label %if.then41.4, label %for.inc44.4 if.then41.4: ; preds = %for.inc44.3 %call42.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 5) br label %for.inc44.4 for.inc44.4: ; preds = %if.then41.4, %for.inc44.3 %arrayidx40.5 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 5 %9 = load i32, ptr %arrayidx40.5, align 4, !tbaa !5 %tobool.not.5 = icmp eq i32 %9, 0 br i1 %tobool.not.5, label %if.then41.5, label %for.inc44.5 if.then41.5: ; preds = %for.inc44.4 %call42.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 6) br label %for.inc44.5 for.inc44.5: ; preds = %if.then41.5, %for.inc44.4 %arrayidx40.6 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 6 %10 = load i32, ptr %arrayidx40.6, align 8, !tbaa !5 %tobool.not.6 = icmp eq i32 %10, 0 br i1 %tobool.not.6, label %if.then41.6, label %for.inc44.6 if.then41.6: ; preds = %for.inc44.5 %call42.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 7) br label %for.inc44.6 for.inc44.6: ; preds = %if.then41.6, %for.inc44.5 %arrayidx40.7 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 7 %11 = load i32, ptr %arrayidx40.7, align 4, !tbaa !5 %tobool.not.7 = icmp eq i32 %11, 0 br i1 %tobool.not.7, label %if.then41.7, label %for.inc44.7 if.then41.7: ; preds = %for.inc44.6 %call42.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 8) br label %for.inc44.7 for.inc44.7: ; preds = %if.then41.7, %for.inc44.6 %arrayidx40.8 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 8 %12 = load i32, ptr %arrayidx40.8, align 16, !tbaa !5 %tobool.not.8 = icmp eq i32 %12, 0 br i1 %tobool.not.8, label %if.then41.8, label %for.inc44.8 if.then41.8: ; preds = %for.inc44.7 %call42.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 9) br label %for.inc44.8 for.inc44.8: ; preds = %if.then41.8, %for.inc44.7 %arrayidx40.9 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 9 %13 = load i32, ptr %arrayidx40.9, align 4, !tbaa !5 %tobool.not.9 = icmp eq i32 %13, 0 br i1 %tobool.not.9, label %if.then41.9, label %for.inc44.9 if.then41.9: ; preds = %for.inc44.8 %call42.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 10) br label %for.inc44.9 for.inc44.9: ; preds = %if.then41.9, %for.inc44.8 %arrayidx40.10 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 10 %14 = load i32, ptr %arrayidx40.10, align 8, !tbaa !5 %tobool.not.10 = icmp eq i32 %14, 0 br i1 %tobool.not.10, label %if.then41.10, label %for.inc44.10 if.then41.10: ; preds = %for.inc44.9 %call42.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 11) br label %for.inc44.10 for.inc44.10: ; preds = %if.then41.10, %for.inc44.9 %arrayidx40.11 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 11 %15 = load i32, ptr %arrayidx40.11, align 4, !tbaa !5 %tobool.not.11 = icmp eq i32 %15, 0 br i1 %tobool.not.11, label %if.then41.11, label %for.inc44.11 if.then41.11: ; preds = %for.inc44.10 %call42.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 12) br label %for.inc44.11 for.inc44.11: ; preds = %if.then41.11, %for.inc44.10 %arrayidx40.12 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 12 %16 = load i32, ptr %arrayidx40.12, align 16, !tbaa !5 %tobool.not.12 = icmp eq i32 %16, 0 br i1 %tobool.not.12, label %if.then41.12, label %for.inc44.12 if.then41.12: ; preds = %for.inc44.11 %call42.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 13) br label %for.inc44.12 for.inc44.12: ; preds = %if.then41.12, %for.inc44.11 %arrayidx53 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 0 %17 = load i32, ptr %arrayidx53, align 4, !tbaa !5 %tobool54.not = icmp eq i32 %17, 0 br i1 %tobool54.not, label %if.then55, label %for.inc59 if.then55: ; preds = %for.inc44.12 %call57 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 1) br label %for.inc59 for.inc59: ; preds = %for.inc44.12, %if.then55 %arrayidx53.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 1 %18 = load i32, ptr %arrayidx53.1, align 8, !tbaa !5 %tobool54.not.1 = icmp eq i32 %18, 0 br i1 %tobool54.not.1, label %if.then55.1, label %for.inc59.1 if.then55.1: ; preds = %for.inc59 %call57.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 2) br label %for.inc59.1 for.inc59.1: ; preds = %if.then55.1, %for.inc59 %arrayidx53.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 2 %19 = load i32, ptr %arrayidx53.2, align 4, !tbaa !5 %tobool54.not.2 = icmp eq i32 %19, 0 br i1 %tobool54.not.2, label %if.then55.2, label %for.inc59.2 if.then55.2: ; preds = %for.inc59.1 %call57.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 3) br label %for.inc59.2 for.inc59.2: ; preds = %if.then55.2, %for.inc59.1 %arrayidx53.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 3 %20 = load i32, ptr %arrayidx53.3, align 16, !tbaa !5 %tobool54.not.3 = icmp eq i32 %20, 0 br i1 %tobool54.not.3, label %if.then55.3, label %for.inc59.3 if.then55.3: ; preds = %for.inc59.2 %call57.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 4) br label %for.inc59.3 for.inc59.3: ; preds = %if.then55.3, %for.inc59.2 %arrayidx53.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 4 %21 = load i32, ptr %arrayidx53.4, align 4, !tbaa !5 %tobool54.not.4 = icmp eq i32 %21, 0 br i1 %tobool54.not.4, label %if.then55.4, label %for.inc59.4 if.then55.4: ; preds = %for.inc59.3 %call57.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 5) br label %for.inc59.4 for.inc59.4: ; preds = %if.then55.4, %for.inc59.3 %arrayidx53.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 5 %22 = load i32, ptr %arrayidx53.5, align 8, !tbaa !5 %tobool54.not.5 = icmp eq i32 %22, 0 br i1 %tobool54.not.5, label %if.then55.5, label %for.inc59.5 if.then55.5: ; preds = %for.inc59.4 %call57.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 6) br label %for.inc59.5 for.inc59.5: ; preds = %if.then55.5, %for.inc59.4 %arrayidx53.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 6 %23 = load i32, ptr %arrayidx53.6, align 4, !tbaa !5 %tobool54.not.6 = icmp eq i32 %23, 0 br i1 %tobool54.not.6, label %if.then55.6, label %for.inc59.6 if.then55.6: ; preds = %for.inc59.5 %call57.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 7) br label %for.inc59.6 for.inc59.6: ; preds = %if.then55.6, %for.inc59.5 %arrayidx53.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 7 %24 = load i32, ptr %arrayidx53.7, align 16, !tbaa !5 %tobool54.not.7 = icmp eq i32 %24, 0 br i1 %tobool54.not.7, label %if.then55.7, label %for.inc59.7 if.then55.7: ; preds = %for.inc59.6 %call57.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 8) br label %for.inc59.7 for.inc59.7: ; preds = %if.then55.7, %for.inc59.6 %arrayidx53.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 8 %25 = load i32, ptr %arrayidx53.8, align 4, !tbaa !5 %tobool54.not.8 = icmp eq i32 %25, 0 br i1 %tobool54.not.8, label %if.then55.8, label %for.inc59.8 if.then55.8: ; preds = %for.inc59.7 %call57.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 9) br label %for.inc59.8 for.inc59.8: ; preds = %if.then55.8, %for.inc59.7 %arrayidx53.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 9 %26 = load i32, ptr %arrayidx53.9, align 8, !tbaa !5 %tobool54.not.9 = icmp eq i32 %26, 0 br i1 %tobool54.not.9, label %if.then55.9, label %for.inc59.9 if.then55.9: ; preds = %for.inc59.8 %call57.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 10) br label %for.inc59.9 for.inc59.9: ; preds = %if.then55.9, %for.inc59.8 %arrayidx53.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 10 %27 = load i32, ptr %arrayidx53.10, align 4, !tbaa !5 %tobool54.not.10 = icmp eq i32 %27, 0 br i1 %tobool54.not.10, label %if.then55.10, label %for.inc59.10 if.then55.10: ; preds = %for.inc59.9 %call57.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 11) br label %for.inc59.10 for.inc59.10: ; preds = %if.then55.10, %for.inc59.9 %arrayidx53.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 11 %28 = load i32, ptr %arrayidx53.11, align 16, !tbaa !5 %tobool54.not.11 = icmp eq i32 %28, 0 br i1 %tobool54.not.11, label %if.then55.11, label %for.inc59.11 if.then55.11: ; preds = %for.inc59.10 %call57.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 12) br label %for.inc59.11 for.inc59.11: ; preds = %if.then55.11, %for.inc59.10 %arrayidx53.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 12 %29 = load i32, ptr %arrayidx53.12, align 4, !tbaa !5 %tobool54.not.12 = icmp eq i32 %29, 0 br i1 %tobool54.not.12, label %if.then55.12, label %for.inc59.12 if.then55.12: ; preds = %for.inc59.11 %call57.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef 13) br label %for.inc59.12 for.inc59.12: ; preds = %if.then55.12, %for.inc59.11 %arrayidx68 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 0 %30 = load i32, ptr %arrayidx68, align 8, !tbaa !5 %tobool69.not = icmp eq i32 %30, 0 br i1 %tobool69.not, label %if.then70, label %for.inc74 if.then70: ; preds = %for.inc59.12 %call72 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 1) br label %for.inc74 for.inc74: ; preds = %for.inc59.12, %if.then70 %arrayidx68.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 1 %31 = load i32, ptr %arrayidx68.1, align 4, !tbaa !5 %tobool69.not.1 = icmp eq i32 %31, 0 br i1 %tobool69.not.1, label %if.then70.1, label %for.inc74.1 if.then70.1: ; preds = %for.inc74 %call72.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 2) br label %for.inc74.1 for.inc74.1: ; preds = %if.then70.1, %for.inc74 %arrayidx68.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 2 %32 = load i32, ptr %arrayidx68.2, align 16, !tbaa !5 %tobool69.not.2 = icmp eq i32 %32, 0 br i1 %tobool69.not.2, label %if.then70.2, label %for.inc74.2 if.then70.2: ; preds = %for.inc74.1 %call72.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 3) br label %for.inc74.2 for.inc74.2: ; preds = %if.then70.2, %for.inc74.1 %arrayidx68.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 3 %33 = load i32, ptr %arrayidx68.3, align 4, !tbaa !5 %tobool69.not.3 = icmp eq i32 %33, 0 br i1 %tobool69.not.3, label %if.then70.3, label %for.inc74.3 if.then70.3: ; preds = %for.inc74.2 %call72.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 4) br label %for.inc74.3 for.inc74.3: ; preds = %if.then70.3, %for.inc74.2 %arrayidx68.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 4 %34 = load i32, ptr %arrayidx68.4, align 8, !tbaa !5 %tobool69.not.4 = icmp eq i32 %34, 0 br i1 %tobool69.not.4, label %if.then70.4, label %for.inc74.4 if.then70.4: ; preds = %for.inc74.3 %call72.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 5) br label %for.inc74.4 for.inc74.4: ; preds = %if.then70.4, %for.inc74.3 %arrayidx68.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 5 %35 = load i32, ptr %arrayidx68.5, align 4, !tbaa !5 %tobool69.not.5 = icmp eq i32 %35, 0 br i1 %tobool69.not.5, label %if.then70.5, label %for.inc74.5 if.then70.5: ; preds = %for.inc74.4 %call72.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 6) br label %for.inc74.5 for.inc74.5: ; preds = %if.then70.5, %for.inc74.4 %arrayidx68.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 6 %36 = load i32, ptr %arrayidx68.6, align 16, !tbaa !5 %tobool69.not.6 = icmp eq i32 %36, 0 br i1 %tobool69.not.6, label %if.then70.6, label %for.inc74.6 if.then70.6: ; preds = %for.inc74.5 %call72.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 7) br label %for.inc74.6 for.inc74.6: ; preds = %if.then70.6, %for.inc74.5 %arrayidx68.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 7 %37 = load i32, ptr %arrayidx68.7, align 4, !tbaa !5 %tobool69.not.7 = icmp eq i32 %37, 0 br i1 %tobool69.not.7, label %if.then70.7, label %for.inc74.7 if.then70.7: ; preds = %for.inc74.6 %call72.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 8) br label %for.inc74.7 for.inc74.7: ; preds = %if.then70.7, %for.inc74.6 %arrayidx68.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 8 %38 = load i32, ptr %arrayidx68.8, align 8, !tbaa !5 %tobool69.not.8 = icmp eq i32 %38, 0 br i1 %tobool69.not.8, label %if.then70.8, label %for.inc74.8 if.then70.8: ; preds = %for.inc74.7 %call72.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 9) br label %for.inc74.8 for.inc74.8: ; preds = %if.then70.8, %for.inc74.7 %arrayidx68.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 9 %39 = load i32, ptr %arrayidx68.9, align 4, !tbaa !5 %tobool69.not.9 = icmp eq i32 %39, 0 br i1 %tobool69.not.9, label %if.then70.9, label %for.inc74.9 if.then70.9: ; preds = %for.inc74.8 %call72.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 10) br label %for.inc74.9 for.inc74.9: ; preds = %if.then70.9, %for.inc74.8 %arrayidx68.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 10 %40 = load i32, ptr %arrayidx68.10, align 16, !tbaa !5 %tobool69.not.10 = icmp eq i32 %40, 0 br i1 %tobool69.not.10, label %if.then70.10, label %for.inc74.10 if.then70.10: ; preds = %for.inc74.9 %call72.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 11) br label %for.inc74.10 for.inc74.10: ; preds = %if.then70.10, %for.inc74.9 %arrayidx68.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 11 %41 = load i32, ptr %arrayidx68.11, align 4, !tbaa !5 %tobool69.not.11 = icmp eq i32 %41, 0 br i1 %tobool69.not.11, label %if.then70.11, label %for.inc74.11 if.then70.11: ; preds = %for.inc74.10 %call72.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 12) br label %for.inc74.11 for.inc74.11: ; preds = %if.then70.11, %for.inc74.10 %arrayidx68.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 12 %42 = load i32, ptr %arrayidx68.12, align 8, !tbaa !5 %tobool69.not.12 = icmp eq i32 %42, 0 br i1 %tobool69.not.12, label %if.then70.12, label %for.inc74.12 if.then70.12: ; preds = %for.inc74.11 %call72.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef 13) br label %for.inc74.12 for.inc74.12: ; preds = %if.then70.12, %for.inc74.11 %arrayidx83 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 0 %43 = load i32, ptr %arrayidx83, align 4, !tbaa !5 %tobool84.not = icmp eq i32 %43, 0 br i1 %tobool84.not, label %if.then85, label %for.inc89 if.then85: ; preds = %for.inc74.12 %call87 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 1) br label %for.inc89 for.inc89: ; preds = %for.inc74.12, %if.then85 %arrayidx83.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 1 %44 = load i32, ptr %arrayidx83.1, align 16, !tbaa !5 %tobool84.not.1 = icmp eq i32 %44, 0 br i1 %tobool84.not.1, label %if.then85.1, label %for.inc89.1 if.then85.1: ; preds = %for.inc89 %call87.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 2) br label %for.inc89.1 for.inc89.1: ; preds = %if.then85.1, %for.inc89 %arrayidx83.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 2 %45 = load i32, ptr %arrayidx83.2, align 4, !tbaa !5 %tobool84.not.2 = icmp eq i32 %45, 0 br i1 %tobool84.not.2, label %if.then85.2, label %for.inc89.2 if.then85.2: ; preds = %for.inc89.1 %call87.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 3) br label %for.inc89.2 for.inc89.2: ; preds = %if.then85.2, %for.inc89.1 %arrayidx83.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 3 %46 = load i32, ptr %arrayidx83.3, align 8, !tbaa !5 %tobool84.not.3 = icmp eq i32 %46, 0 br i1 %tobool84.not.3, label %if.then85.3, label %for.inc89.3 if.then85.3: ; preds = %for.inc89.2 %call87.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 4) br label %for.inc89.3 for.inc89.3: ; preds = %if.then85.3, %for.inc89.2 %arrayidx83.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 4 %47 = load i32, ptr %arrayidx83.4, align 4, !tbaa !5 %tobool84.not.4 = icmp eq i32 %47, 0 br i1 %tobool84.not.4, label %if.then85.4, label %for.inc89.4 if.then85.4: ; preds = %for.inc89.3 %call87.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 5) br label %for.inc89.4 for.inc89.4: ; preds = %if.then85.4, %for.inc89.3 %arrayidx83.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 5 %48 = load i32, ptr %arrayidx83.5, align 16, !tbaa !5 %tobool84.not.5 = icmp eq i32 %48, 0 br i1 %tobool84.not.5, label %if.then85.5, label %for.inc89.5 if.then85.5: ; preds = %for.inc89.4 %call87.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 6) br label %for.inc89.5 for.inc89.5: ; preds = %if.then85.5, %for.inc89.4 %arrayidx83.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 6 %49 = load i32, ptr %arrayidx83.6, align 4, !tbaa !5 %tobool84.not.6 = icmp eq i32 %49, 0 br i1 %tobool84.not.6, label %if.then85.6, label %for.inc89.6 if.then85.6: ; preds = %for.inc89.5 %call87.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 7) br label %for.inc89.6 for.inc89.6: ; preds = %if.then85.6, %for.inc89.5 %arrayidx83.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 7 %50 = load i32, ptr %arrayidx83.7, align 8, !tbaa !5 %tobool84.not.7 = icmp eq i32 %50, 0 br i1 %tobool84.not.7, label %if.then85.7, label %for.inc89.7 if.then85.7: ; preds = %for.inc89.6 %call87.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 8) br label %for.inc89.7 for.inc89.7: ; preds = %if.then85.7, %for.inc89.6 %arrayidx83.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 8 %51 = load i32, ptr %arrayidx83.8, align 4, !tbaa !5 %tobool84.not.8 = icmp eq i32 %51, 0 br i1 %tobool84.not.8, label %if.then85.8, label %for.inc89.8 if.then85.8: ; preds = %for.inc89.7 %call87.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 9) br label %for.inc89.8 for.inc89.8: ; preds = %if.then85.8, %for.inc89.7 %arrayidx83.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 9 %52 = load i32, ptr %arrayidx83.9, align 16, !tbaa !5 %tobool84.not.9 = icmp eq i32 %52, 0 br i1 %tobool84.not.9, label %if.then85.9, label %for.inc89.9 if.then85.9: ; preds = %for.inc89.8 %call87.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 10) br label %for.inc89.9 for.inc89.9: ; preds = %if.then85.9, %for.inc89.8 %arrayidx83.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 10 %53 = load i32, ptr %arrayidx83.10, align 4, !tbaa !5 %tobool84.not.10 = icmp eq i32 %53, 0 br i1 %tobool84.not.10, label %if.then85.10, label %for.inc89.10 if.then85.10: ; preds = %for.inc89.9 %call87.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 11) br label %for.inc89.10 for.inc89.10: ; preds = %if.then85.10, %for.inc89.9 %arrayidx83.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 11 %54 = load i32, ptr %arrayidx83.11, align 8, !tbaa !5 %tobool84.not.11 = icmp eq i32 %54, 0 br i1 %tobool84.not.11, label %if.then85.11, label %for.inc89.11 if.then85.11: ; preds = %for.inc89.10 %call87.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 12) br label %for.inc89.11 for.inc89.11: ; preds = %if.then85.11, %for.inc89.10 %arrayidx83.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 12 %55 = load i32, ptr %arrayidx83.12, align 4, !tbaa !5 %tobool84.not.12 = icmp eq i32 %55, 0 br i1 %tobool84.not.12, label %if.then85.12, label %for.inc89.12 if.then85.12: ; preds = %for.inc89.11 %call87.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.5, i32 noundef 13) br label %for.inc89.12 for.inc89.12: ; preds = %if.then85.12, %for.inc89.11 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void){ int cards[4][13]; int i,j,r; int n; char M; char Mark[4]={'S','H','C','D'}; for(i=0;i<4;i++){ for(j=0;j<13;j++){ cards[i][j]=j+1; } } scanf("%d\n" ,&n); for(i=0;i<n;i++){ scanf("%c %d\n",&M,&r); if(M=='S'){ cards[0][r-1]=0; } if(M=='H'){ cards[1][r-1]=0; } if(M=='C'){ cards[2][r-1]=0; } if(M=='D'){ cards[3][r-1]=0; } } for(i=0;i<4;i++){ for(j=0;j<13;j++){ if(cards[i][j] !=0){printf("%c %d",Mark[i],cards[i][j]); printf("\n");} } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271898/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271898/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @__const.main.Mark = private unnamed_addr constant [4 x i8] c"SHCD", align 1 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.1 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"%c %d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %cards = alloca [4 x [13 x i32]], align 16 %r = alloca i32, align 4 %n = alloca i32, align 4 %M = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %cards) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %M) #4 store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, ptr %cards, align 16, !tbaa !5 %arrayidx5.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 0, i64 4 store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, ptr %arrayidx5.4, align 16, !tbaa !5 %arrayidx5.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 0, i64 8 store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, ptr %arrayidx5.8, align 16, !tbaa !5 %arrayidx5.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 0, i64 12 store <4 x i32> <i32 13, i32 1, i32 2, i32 3>, ptr %arrayidx5.12, align 16, !tbaa !5 %arrayidx5.3.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 3 store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, ptr %arrayidx5.3.1, align 16, !tbaa !5 %arrayidx5.7.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 7 store <4 x i32> <i32 8, i32 9, i32 10, i32 11>, ptr %arrayidx5.7.1, align 16, !tbaa !5 %arrayidx5.11.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 11 store <4 x i32> <i32 12, i32 13, i32 1, i32 2>, ptr %arrayidx5.11.1, align 16, !tbaa !5 %arrayidx5.2.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 2 store <4 x i32> <i32 3, i32 4, i32 5, i32 6>, ptr %arrayidx5.2.2, align 16, !tbaa !5 %arrayidx5.6.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 6 store <4 x i32> <i32 7, i32 8, i32 9, i32 10>, ptr %arrayidx5.6.2, align 16, !tbaa !5 %arrayidx5.10.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 10 store <4 x i32> <i32 11, i32 12, i32 13, i32 1>, ptr %arrayidx5.10.2, align 16, !tbaa !5 %arrayidx5.1.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 1 store <4 x i32> <i32 2, i32 3, i32 4, i32 5>, ptr %arrayidx5.1.3, align 16, !tbaa !5 %arrayidx5.5.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 5 store <4 x i32> <i32 6, i32 7, i32 8, i32 9>, ptr %arrayidx5.5.3, align 16, !tbaa !5 %arrayidx5.9.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 9 store <4 x i32> <i32 10, i32 11, i32 12, i32 13>, ptr %arrayidx5.9.3, align 16, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp10100 = icmp sgt i32 %0, 0 br i1 %cmp10100, label %for.body11, label %for.cond52.preheader.preheader for.body11: ; preds = %entry, %for.inc45 %i.1101 = phi i32 [ %inc46, %for.inc45 ], [ 0, %entry ] %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %M, ptr noundef nonnull %r) %1 = load i8, ptr %M, align 1, !tbaa !9 switch i8 %1, label %for.inc45 [ i8 83, label %if.end.thread i8 72, label %if.then21 i8 67, label %if.then30 i8 68, label %if.then39 ] if.end.thread: ; preds = %for.body11 %2 = load i32, ptr %r, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom16 = sext i32 %sub to i64 %arrayidx17 = getelementptr inbounds [13 x i32], ptr %cards, i64 0, i64 %idxprom16 br label %for.inc45.sink.split if.then21: ; preds = %for.body11 %3 = load i32, ptr %r, align 4, !tbaa !5 %sub23 = add nsw i32 %3, -1 %idxprom24 = sext i32 %sub23 to i64 %arrayidx25 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 1, i64 %idxprom24 br label %for.inc45.sink.split if.then30: ; preds = %for.body11 %4 = load i32, ptr %r, align 4, !tbaa !5 %sub32 = add nsw i32 %4, -1 %idxprom33 = sext i32 %sub32 to i64 %arrayidx34 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 2, i64 %idxprom33 br label %for.inc45.sink.split if.then39: ; preds = %for.body11 %5 = load i32, ptr %r, align 4, !tbaa !5 %sub41 = add nsw i32 %5, -1 %idxprom42 = sext i32 %sub41 to i64 %arrayidx43 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 3, i64 %idxprom42 br label %for.inc45.sink.split for.inc45.sink.split: ; preds = %if.then39, %if.then30, %if.end.thread, %if.then21 %arrayidx25.sink = phi ptr [ %arrayidx25, %if.then21 ], [ %arrayidx17, %if.end.thread ], [ %arrayidx34, %if.then30 ], [ %arrayidx43, %if.then39 ] store i32 0, ptr %arrayidx25.sink, align 4, !tbaa !5 br label %for.inc45 for.inc45: ; preds = %for.inc45.sink.split, %for.body11 %inc46 = add nuw nsw i32 %i.1101, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp10 = icmp slt i32 %inc46, %6 br i1 %cmp10, label %for.body11, label %for.cond52.preheader.preheader, !llvm.loop !10 for.cond52.preheader.preheader: ; preds = %for.inc45, %entry br label %for.cond52.preheader for.cond52.preheader: ; preds = %for.cond52.preheader.preheader, %for.inc73.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc73.12 ], [ 0, %for.cond52.preheader.preheader ] %arrayidx64 = getelementptr inbounds [4 x i8], ptr @__const.main.Mark, i64 0, i64 %indvars.iv %arrayidx59 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 0 %7 = load i32, ptr %arrayidx59, align 4, !tbaa !5 %cmp60.not = icmp eq i32 %7, 0 br i1 %cmp60.not, label %for.inc73, label %if.then62 if.then62: ; preds = %for.cond52.preheader %8 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65 = sext i8 %8 to i32 %call70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65, i32 noundef %7) %putchar = call i32 @putchar(i32 10) br label %for.inc73 for.inc73: ; preds = %for.cond52.preheader, %if.then62 %arrayidx59.1 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 1 %9 = load i32, ptr %arrayidx59.1, align 4, !tbaa !5 %cmp60.not.1 = icmp eq i32 %9, 0 br i1 %cmp60.not.1, label %for.inc73.1, label %if.then62.1 if.then62.1: ; preds = %for.inc73 %10 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.1 = sext i8 %10 to i32 %call70.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.1, i32 noundef %9) %putchar.1 = call i32 @putchar(i32 10) br label %for.inc73.1 for.inc73.1: ; preds = %if.then62.1, %for.inc73 %arrayidx59.2 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 2 %11 = load i32, ptr %arrayidx59.2, align 4, !tbaa !5 %cmp60.not.2 = icmp eq i32 %11, 0 br i1 %cmp60.not.2, label %for.inc73.2, label %if.then62.2 if.then62.2: ; preds = %for.inc73.1 %12 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.2 = sext i8 %12 to i32 %call70.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.2, i32 noundef %11) %putchar.2 = call i32 @putchar(i32 10) br label %for.inc73.2 for.inc73.2: ; preds = %if.then62.2, %for.inc73.1 %arrayidx59.3 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 3 %13 = load i32, ptr %arrayidx59.3, align 4, !tbaa !5 %cmp60.not.3 = icmp eq i32 %13, 0 br i1 %cmp60.not.3, label %for.inc73.3, label %if.then62.3 if.then62.3: ; preds = %for.inc73.2 %14 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.3 = sext i8 %14 to i32 %call70.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.3, i32 noundef %13) %putchar.3 = call i32 @putchar(i32 10) br label %for.inc73.3 for.inc73.3: ; preds = %if.then62.3, %for.inc73.2 %arrayidx59.4 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 4 %15 = load i32, ptr %arrayidx59.4, align 4, !tbaa !5 %cmp60.not.4 = icmp eq i32 %15, 0 br i1 %cmp60.not.4, label %for.inc73.4, label %if.then62.4 if.then62.4: ; preds = %for.inc73.3 %16 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.4 = sext i8 %16 to i32 %call70.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.4, i32 noundef %15) %putchar.4 = call i32 @putchar(i32 10) br label %for.inc73.4 for.inc73.4: ; preds = %if.then62.4, %for.inc73.3 %arrayidx59.5 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 5 %17 = load i32, ptr %arrayidx59.5, align 4, !tbaa !5 %cmp60.not.5 = icmp eq i32 %17, 0 br i1 %cmp60.not.5, label %for.inc73.5, label %if.then62.5 if.then62.5: ; preds = %for.inc73.4 %18 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.5 = sext i8 %18 to i32 %call70.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.5, i32 noundef %17) %putchar.5 = call i32 @putchar(i32 10) br label %for.inc73.5 for.inc73.5: ; preds = %if.then62.5, %for.inc73.4 %arrayidx59.6 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 6 %19 = load i32, ptr %arrayidx59.6, align 4, !tbaa !5 %cmp60.not.6 = icmp eq i32 %19, 0 br i1 %cmp60.not.6, label %for.inc73.6, label %if.then62.6 if.then62.6: ; preds = %for.inc73.5 %20 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.6 = sext i8 %20 to i32 %call70.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.6, i32 noundef %19) %putchar.6 = call i32 @putchar(i32 10) br label %for.inc73.6 for.inc73.6: ; preds = %if.then62.6, %for.inc73.5 %arrayidx59.7 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 7 %21 = load i32, ptr %arrayidx59.7, align 4, !tbaa !5 %cmp60.not.7 = icmp eq i32 %21, 0 br i1 %cmp60.not.7, label %for.inc73.7, label %if.then62.7 if.then62.7: ; preds = %for.inc73.6 %22 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.7 = sext i8 %22 to i32 %call70.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.7, i32 noundef %21) %putchar.7 = call i32 @putchar(i32 10) br label %for.inc73.7 for.inc73.7: ; preds = %if.then62.7, %for.inc73.6 %arrayidx59.8 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 8 %23 = load i32, ptr %arrayidx59.8, align 4, !tbaa !5 %cmp60.not.8 = icmp eq i32 %23, 0 br i1 %cmp60.not.8, label %for.inc73.8, label %if.then62.8 if.then62.8: ; preds = %for.inc73.7 %24 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.8 = sext i8 %24 to i32 %call70.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.8, i32 noundef %23) %putchar.8 = call i32 @putchar(i32 10) br label %for.inc73.8 for.inc73.8: ; preds = %if.then62.8, %for.inc73.7 %arrayidx59.9 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 9 %25 = load i32, ptr %arrayidx59.9, align 4, !tbaa !5 %cmp60.not.9 = icmp eq i32 %25, 0 br i1 %cmp60.not.9, label %for.inc73.9, label %if.then62.9 if.then62.9: ; preds = %for.inc73.8 %26 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.9 = sext i8 %26 to i32 %call70.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.9, i32 noundef %25) %putchar.9 = call i32 @putchar(i32 10) br label %for.inc73.9 for.inc73.9: ; preds = %if.then62.9, %for.inc73.8 %arrayidx59.10 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 10 %27 = load i32, ptr %arrayidx59.10, align 4, !tbaa !5 %cmp60.not.10 = icmp eq i32 %27, 0 br i1 %cmp60.not.10, label %for.inc73.10, label %if.then62.10 if.then62.10: ; preds = %for.inc73.9 %28 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.10 = sext i8 %28 to i32 %call70.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.10, i32 noundef %27) %putchar.10 = call i32 @putchar(i32 10) br label %for.inc73.10 for.inc73.10: ; preds = %if.then62.10, %for.inc73.9 %arrayidx59.11 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 11 %29 = load i32, ptr %arrayidx59.11, align 4, !tbaa !5 %cmp60.not.11 = icmp eq i32 %29, 0 br i1 %cmp60.not.11, label %for.inc73.11, label %if.then62.11 if.then62.11: ; preds = %for.inc73.10 %30 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.11 = sext i8 %30 to i32 %call70.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.11, i32 noundef %29) %putchar.11 = call i32 @putchar(i32 10) br label %for.inc73.11 for.inc73.11: ; preds = %if.then62.11, %for.inc73.10 %arrayidx59.12 = getelementptr inbounds [4 x [13 x i32]], ptr %cards, i64 0, i64 %indvars.iv, i64 12 %31 = load i32, ptr %arrayidx59.12, align 4, !tbaa !5 %cmp60.not.12 = icmp eq i32 %31, 0 br i1 %cmp60.not.12, label %for.inc73.12, label %if.then62.12 if.then62.12: ; preds = %for.inc73.11 %32 = load i8, ptr %arrayidx64, align 1, !tbaa !9 %conv65.12 = sext i8 %32 to i32 %call70.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv65.12, i32 noundef %31) %putchar.12 = call i32 @putchar(i32 10) br label %for.inc73.12 for.inc73.12: ; preds = %if.then62.12, %for.inc73.11 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end78, label %for.cond52.preheader, !llvm.loop !12 for.end78: ; preds = %for.inc73.12 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %M) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %cards) #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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include<stdio.h> int main(void) { int n,b,i,j; int card[4][13]={}; char a[3]; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%s %d",&a,&b); if(a[0]=='S'){ card[0][b-1]=1; } else if(a[0]=='H'){ card[1][b-1]=1; } else if(a[0]=='C'){ card[2][b-1]=1; } else if(a[0]=='D'){ card[3][b-1]=1; } } for(i=0;i<4;i++){ for(j=0;j<13;j++){ if(i==0){ a[0]='S'; } else if(i==1){ a[0]='H'; } else if(i==2){ a[0]='C'; } else if(i==3){ a[0]='D'; } if(card[i][j]==0){ printf("%c %d\n",a[0],j+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271940/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271940/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%s %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %b = alloca i32, align 4 %card = alloca [4 x [13 x i32]], align 16 %a = alloca [3 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %card) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %card, i8 0, i64 208, i1 false) call void @llvm.lifetime.start.p0(i64 3, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp97 = icmp sgt i32 %0, 0 br i1 %cmp97, label %for.body, label %for.cond42.preheader.preheader for.body: ; preds = %entry, %for.inc %i.098 = phi i32 [ %inc, %for.inc ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %a, ptr noundef nonnull %b) %1 = load i8, ptr %a, align 1, !tbaa !9 switch i8 %1, label %for.inc [ i8 83, label %if.then i8 72, label %if.then10 i8 67, label %if.then20 i8 68, label %if.then30 ] if.then: ; preds = %for.body %2 = load i32, ptr %b, align 4, !tbaa !5 %sub = add nsw i32 %2, -1 %idxprom = sext i32 %sub to i64 %arrayidx5 = getelementptr inbounds [13 x i32], ptr %card, i64 0, i64 %idxprom br label %for.inc.sink.split if.then10: ; preds = %for.body %3 = load i32, ptr %b, align 4, !tbaa !5 %sub12 = add nsw i32 %3, -1 %idxprom13 = sext i32 %sub12 to i64 %arrayidx14 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 1, i64 %idxprom13 br label %for.inc.sink.split if.then20: ; preds = %for.body %4 = load i32, ptr %b, align 4, !tbaa !5 %sub22 = add nsw i32 %4, -1 %idxprom23 = sext i32 %sub22 to i64 %arrayidx24 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 2, i64 %idxprom23 br label %for.inc.sink.split if.then30: ; preds = %for.body %5 = load i32, ptr %b, align 4, !tbaa !5 %sub32 = add nsw i32 %5, -1 %idxprom33 = sext i32 %sub32 to i64 %arrayidx34 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 3, i64 %idxprom33 br label %for.inc.sink.split for.inc.sink.split: ; preds = %if.then10, %if.then30, %if.then20, %if.then %arrayidx5.sink = phi ptr [ %arrayidx5, %if.then ], [ %arrayidx24, %if.then20 ], [ %arrayidx34, %if.then30 ], [ %arrayidx14, %if.then10 ] store i32 1, ptr %arrayidx5.sink, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.inc.sink.split, %for.body %inc = add nuw nsw i32 %i.098, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %6 br i1 %cmp, label %for.body, label %for.cond42.preheader.preheader, !llvm.loop !10 for.cond42.preheader.preheader: ; preds = %for.inc, %entry br label %for.cond42.preheader for.cond42.preheader: ; preds = %for.cond42.preheader.preheader, %for.inc80.12 %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc80.12 ], [ 0, %for.cond42.preheader.preheader ] %7 = trunc i64 %indvars.iv to i32 switch i32 %7, label %if.end68 [ i32 0, label %if.then48 i32 1, label %if.then53 i32 2, label %if.then58 i32 3, label %if.then63 ] if.then48: ; preds = %for.cond42.preheader store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68 if.then53: ; preds = %for.cond42.preheader store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68 if.then58: ; preds = %for.cond42.preheader store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68 if.then63: ; preds = %for.cond42.preheader store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68 if.end68: ; preds = %for.cond42.preheader, %if.then53, %if.then63, %if.then58, %if.then48 %arrayidx72 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 0 %8 = load i32, ptr %arrayidx72, align 4, !tbaa !5 %cmp73 = icmp eq i32 %8, 0 br i1 %cmp73, label %if.then75, label %for.inc80 if.then75: ; preds = %if.end68 %9 = load i8, ptr %a, align 1, !tbaa !9 %conv77 = sext i8 %9 to i32 %call78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77, i32 noundef 1) br label %for.inc80 for.inc80: ; preds = %if.end68, %if.then75 switch i32 %7, label %if.end68.1 [ i32 0, label %if.then48.1 i32 1, label %if.then53.1 i32 2, label %if.then58.1 i32 3, label %if.then63.1 ] if.then63.1: ; preds = %for.inc80 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.1 if.then58.1: ; preds = %for.inc80 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.1 if.then53.1: ; preds = %for.inc80 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.1 if.then48.1: ; preds = %for.inc80 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.1 if.end68.1: ; preds = %if.then48.1, %if.then53.1, %if.then58.1, %if.then63.1, %for.inc80 %arrayidx72.1 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 1 %10 = load i32, ptr %arrayidx72.1, align 4, !tbaa !5 %cmp73.1 = icmp eq i32 %10, 0 br i1 %cmp73.1, label %if.then75.1, label %for.inc80.1 if.then75.1: ; preds = %if.end68.1 %11 = load i8, ptr %a, align 1, !tbaa !9 %conv77.1 = sext i8 %11 to i32 %call78.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.1, i32 noundef 2) br label %for.inc80.1 for.inc80.1: ; preds = %if.then75.1, %if.end68.1 switch i32 %7, label %if.end68.2 [ i32 0, label %if.then48.2 i32 1, label %if.then53.2 i32 2, label %if.then58.2 i32 3, label %if.then63.2 ] if.then63.2: ; preds = %for.inc80.1 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.2 if.then58.2: ; preds = %for.inc80.1 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.2 if.then53.2: ; preds = %for.inc80.1 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.2 if.then48.2: ; preds = %for.inc80.1 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.2 if.end68.2: ; preds = %if.then48.2, %if.then53.2, %if.then58.2, %if.then63.2, %for.inc80.1 %arrayidx72.2 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 2 %12 = load i32, ptr %arrayidx72.2, align 4, !tbaa !5 %cmp73.2 = icmp eq i32 %12, 0 br i1 %cmp73.2, label %if.then75.2, label %for.inc80.2 if.then75.2: ; preds = %if.end68.2 %13 = load i8, ptr %a, align 1, !tbaa !9 %conv77.2 = sext i8 %13 to i32 %call78.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.2, i32 noundef 3) br label %for.inc80.2 for.inc80.2: ; preds = %if.then75.2, %if.end68.2 switch i32 %7, label %if.end68.3 [ i32 0, label %if.then48.3 i32 1, label %if.then53.3 i32 2, label %if.then58.3 i32 3, label %if.then63.3 ] if.then63.3: ; preds = %for.inc80.2 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.3 if.then58.3: ; preds = %for.inc80.2 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.3 if.then53.3: ; preds = %for.inc80.2 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.3 if.then48.3: ; preds = %for.inc80.2 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.3 if.end68.3: ; preds = %if.then48.3, %if.then53.3, %if.then58.3, %if.then63.3, %for.inc80.2 %arrayidx72.3 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 3 %14 = load i32, ptr %arrayidx72.3, align 4, !tbaa !5 %cmp73.3 = icmp eq i32 %14, 0 br i1 %cmp73.3, label %if.then75.3, label %for.inc80.3 if.then75.3: ; preds = %if.end68.3 %15 = load i8, ptr %a, align 1, !tbaa !9 %conv77.3 = sext i8 %15 to i32 %call78.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.3, i32 noundef 4) br label %for.inc80.3 for.inc80.3: ; preds = %if.then75.3, %if.end68.3 switch i32 %7, label %if.end68.4 [ i32 0, label %if.then48.4 i32 1, label %if.then53.4 i32 2, label %if.then58.4 i32 3, label %if.then63.4 ] if.then63.4: ; preds = %for.inc80.3 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.4 if.then58.4: ; preds = %for.inc80.3 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.4 if.then53.4: ; preds = %for.inc80.3 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.4 if.then48.4: ; preds = %for.inc80.3 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.4 if.end68.4: ; preds = %if.then48.4, %if.then53.4, %if.then58.4, %if.then63.4, %for.inc80.3 %arrayidx72.4 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 4 %16 = load i32, ptr %arrayidx72.4, align 4, !tbaa !5 %cmp73.4 = icmp eq i32 %16, 0 br i1 %cmp73.4, label %if.then75.4, label %for.inc80.4 if.then75.4: ; preds = %if.end68.4 %17 = load i8, ptr %a, align 1, !tbaa !9 %conv77.4 = sext i8 %17 to i32 %call78.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.4, i32 noundef 5) br label %for.inc80.4 for.inc80.4: ; preds = %if.then75.4, %if.end68.4 switch i32 %7, label %if.end68.5 [ i32 0, label %if.then48.5 i32 1, label %if.then53.5 i32 2, label %if.then58.5 i32 3, label %if.then63.5 ] if.then63.5: ; preds = %for.inc80.4 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.5 if.then58.5: ; preds = %for.inc80.4 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.5 if.then53.5: ; preds = %for.inc80.4 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.5 if.then48.5: ; preds = %for.inc80.4 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.5 if.end68.5: ; preds = %if.then48.5, %if.then53.5, %if.then58.5, %if.then63.5, %for.inc80.4 %arrayidx72.5 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 5 %18 = load i32, ptr %arrayidx72.5, align 4, !tbaa !5 %cmp73.5 = icmp eq i32 %18, 0 br i1 %cmp73.5, label %if.then75.5, label %for.inc80.5 if.then75.5: ; preds = %if.end68.5 %19 = load i8, ptr %a, align 1, !tbaa !9 %conv77.5 = sext i8 %19 to i32 %call78.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.5, i32 noundef 6) br label %for.inc80.5 for.inc80.5: ; preds = %if.then75.5, %if.end68.5 switch i32 %7, label %if.end68.6 [ i32 0, label %if.then48.6 i32 1, label %if.then53.6 i32 2, label %if.then58.6 i32 3, label %if.then63.6 ] if.then63.6: ; preds = %for.inc80.5 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.6 if.then58.6: ; preds = %for.inc80.5 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.6 if.then53.6: ; preds = %for.inc80.5 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.6 if.then48.6: ; preds = %for.inc80.5 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.6 if.end68.6: ; preds = %if.then48.6, %if.then53.6, %if.then58.6, %if.then63.6, %for.inc80.5 %arrayidx72.6 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 6 %20 = load i32, ptr %arrayidx72.6, align 4, !tbaa !5 %cmp73.6 = icmp eq i32 %20, 0 br i1 %cmp73.6, label %if.then75.6, label %for.inc80.6 if.then75.6: ; preds = %if.end68.6 %21 = load i8, ptr %a, align 1, !tbaa !9 %conv77.6 = sext i8 %21 to i32 %call78.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.6, i32 noundef 7) br label %for.inc80.6 for.inc80.6: ; preds = %if.then75.6, %if.end68.6 switch i32 %7, label %if.end68.7 [ i32 0, label %if.then48.7 i32 1, label %if.then53.7 i32 2, label %if.then58.7 i32 3, label %if.then63.7 ] if.then63.7: ; preds = %for.inc80.6 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.7 if.then58.7: ; preds = %for.inc80.6 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.7 if.then53.7: ; preds = %for.inc80.6 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.7 if.then48.7: ; preds = %for.inc80.6 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.7 if.end68.7: ; preds = %if.then48.7, %if.then53.7, %if.then58.7, %if.then63.7, %for.inc80.6 %arrayidx72.7 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 7 %22 = load i32, ptr %arrayidx72.7, align 4, !tbaa !5 %cmp73.7 = icmp eq i32 %22, 0 br i1 %cmp73.7, label %if.then75.7, label %for.inc80.7 if.then75.7: ; preds = %if.end68.7 %23 = load i8, ptr %a, align 1, !tbaa !9 %conv77.7 = sext i8 %23 to i32 %call78.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.7, i32 noundef 8) br label %for.inc80.7 for.inc80.7: ; preds = %if.then75.7, %if.end68.7 switch i32 %7, label %if.end68.8 [ i32 0, label %if.then48.8 i32 1, label %if.then53.8 i32 2, label %if.then58.8 i32 3, label %if.then63.8 ] if.then63.8: ; preds = %for.inc80.7 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.8 if.then58.8: ; preds = %for.inc80.7 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.8 if.then53.8: ; preds = %for.inc80.7 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.8 if.then48.8: ; preds = %for.inc80.7 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.8 if.end68.8: ; preds = %if.then48.8, %if.then53.8, %if.then58.8, %if.then63.8, %for.inc80.7 %arrayidx72.8 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 8 %24 = load i32, ptr %arrayidx72.8, align 4, !tbaa !5 %cmp73.8 = icmp eq i32 %24, 0 br i1 %cmp73.8, label %if.then75.8, label %for.inc80.8 if.then75.8: ; preds = %if.end68.8 %25 = load i8, ptr %a, align 1, !tbaa !9 %conv77.8 = sext i8 %25 to i32 %call78.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.8, i32 noundef 9) br label %for.inc80.8 for.inc80.8: ; preds = %if.then75.8, %if.end68.8 switch i32 %7, label %if.end68.9 [ i32 0, label %if.then48.9 i32 1, label %if.then53.9 i32 2, label %if.then58.9 i32 3, label %if.then63.9 ] if.then63.9: ; preds = %for.inc80.8 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.9 if.then58.9: ; preds = %for.inc80.8 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.9 if.then53.9: ; preds = %for.inc80.8 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.9 if.then48.9: ; preds = %for.inc80.8 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.9 if.end68.9: ; preds = %if.then48.9, %if.then53.9, %if.then58.9, %if.then63.9, %for.inc80.8 %arrayidx72.9 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 9 %26 = load i32, ptr %arrayidx72.9, align 4, !tbaa !5 %cmp73.9 = icmp eq i32 %26, 0 br i1 %cmp73.9, label %if.then75.9, label %for.inc80.9 if.then75.9: ; preds = %if.end68.9 %27 = load i8, ptr %a, align 1, !tbaa !9 %conv77.9 = sext i8 %27 to i32 %call78.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.9, i32 noundef 10) br label %for.inc80.9 for.inc80.9: ; preds = %if.then75.9, %if.end68.9 switch i32 %7, label %if.end68.10 [ i32 0, label %if.then48.10 i32 1, label %if.then53.10 i32 2, label %if.then58.10 i32 3, label %if.then63.10 ] if.then63.10: ; preds = %for.inc80.9 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.10 if.then58.10: ; preds = %for.inc80.9 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.10 if.then53.10: ; preds = %for.inc80.9 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.10 if.then48.10: ; preds = %for.inc80.9 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.10 if.end68.10: ; preds = %if.then48.10, %if.then53.10, %if.then58.10, %if.then63.10, %for.inc80.9 %arrayidx72.10 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 10 %28 = load i32, ptr %arrayidx72.10, align 4, !tbaa !5 %cmp73.10 = icmp eq i32 %28, 0 br i1 %cmp73.10, label %if.then75.10, label %for.inc80.10 if.then75.10: ; preds = %if.end68.10 %29 = load i8, ptr %a, align 1, !tbaa !9 %conv77.10 = sext i8 %29 to i32 %call78.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.10, i32 noundef 11) br label %for.inc80.10 for.inc80.10: ; preds = %if.then75.10, %if.end68.10 switch i32 %7, label %if.end68.11 [ i32 0, label %if.then48.11 i32 1, label %if.then53.11 i32 2, label %if.then58.11 i32 3, label %if.then63.11 ] if.then63.11: ; preds = %for.inc80.10 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.11 if.then58.11: ; preds = %for.inc80.10 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.11 if.then53.11: ; preds = %for.inc80.10 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.11 if.then48.11: ; preds = %for.inc80.10 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.11 if.end68.11: ; preds = %if.then48.11, %if.then53.11, %if.then58.11, %if.then63.11, %for.inc80.10 %arrayidx72.11 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 11 %30 = load i32, ptr %arrayidx72.11, align 4, !tbaa !5 %cmp73.11 = icmp eq i32 %30, 0 br i1 %cmp73.11, label %if.then75.11, label %for.inc80.11 if.then75.11: ; preds = %if.end68.11 %31 = load i8, ptr %a, align 1, !tbaa !9 %conv77.11 = sext i8 %31 to i32 %call78.11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.11, i32 noundef 12) br label %for.inc80.11 for.inc80.11: ; preds = %if.then75.11, %if.end68.11 switch i32 %7, label %if.end68.12 [ i32 0, label %if.then48.12 i32 1, label %if.then53.12 i32 2, label %if.then58.12 i32 3, label %if.then63.12 ] if.then63.12: ; preds = %for.inc80.11 store i8 68, ptr %a, align 1, !tbaa !9 br label %if.end68.12 if.then58.12: ; preds = %for.inc80.11 store i8 67, ptr %a, align 1, !tbaa !9 br label %if.end68.12 if.then53.12: ; preds = %for.inc80.11 store i8 72, ptr %a, align 1, !tbaa !9 br label %if.end68.12 if.then48.12: ; preds = %for.inc80.11 store i8 83, ptr %a, align 1, !tbaa !9 br label %if.end68.12 if.end68.12: ; preds = %if.then48.12, %if.then53.12, %if.then58.12, %if.then63.12, %for.inc80.11 %arrayidx72.12 = getelementptr inbounds [4 x [13 x i32]], ptr %card, i64 0, i64 %indvars.iv, i64 12 %32 = load i32, ptr %arrayidx72.12, align 4, !tbaa !5 %cmp73.12 = icmp eq i32 %32, 0 br i1 %cmp73.12, label %if.then75.12, label %for.inc80.12 if.then75.12: ; preds = %if.end68.12 %33 = load i8, ptr %a, align 1, !tbaa !9 %conv77.12 = sext i8 %33 to i32 %call78.12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %conv77.12, i32 noundef 13) br label %for.inc80.12 for.inc80.12: ; preds = %if.then75.12, %if.end68.12 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, 4 br i1 %exitcond.not, label %for.end85, label %for.cond42.preheader, !llvm.loop !12 for.end85: ; preds = %for.inc80.12 call void @llvm.lifetime.end.p0(i64 3, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %card) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11}
#include <stdio.h> int main(void) { int n, i, a; char c; int s[4][13]; char k[] = "SHCD"; for (i = 0; i < 13; i++){ s[0][i] = 0; s[1][i] = 0; s[2][i] = 0; s[3][i] = 0; } scanf("%d", &n); for (i = 0; i < n; i++){ getchar(); scanf ("%c %d", &c, &a); switch (c){ case 'S': s[0][a-1] = 1; break; case 'H': s[1][a-1] = 1; break; case 'C': s[2][a-1] = 1; break; case 'D': s[3][a-1] = 1; break; } } for (i = 0; i < 4; i++){ for (a = 0; a < 13; a++){ if (s[i][a] == 0){ printf("%c %d\n", k[i], a+1); } } } return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_271984/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_271984/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%c %d\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%c %d\0A\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: %n = alloca i32, align 4 %a = alloca i32, align 4 %c = alloca i8, align 1 %s = alloca [4 x [13 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.start.p0(i64 208, ptr nonnull %s) #4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(208) %s, i8 0, i64 208, i1 false) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp1273 = icmp sgt i32 %0, 0 br i1 %cmp1273, label %for.body13, label %for.cond37.preheader for.cond37.preheader: ; preds = %for.inc34, %entry store i32 0, ptr %a, align 4, !tbaa !5 br label %for.body44 for.body13: ; preds = %entry, %for.inc34 %i.174 = phi i32 [ %inc35, %for.inc34 ], [ 0, %entry ] %1 = load ptr, ptr @stdin, align 8, !tbaa !9 %call.i = call i32 @getc(ptr noundef %1) %call15 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c, ptr noundef nonnull %a) %2 = load i8, ptr %c, align 1, !tbaa !11 %conv = sext i8 %2 to i32 switch i32 %conv, label %for.inc34 [ i32 83, label %sw.bb i32 72, label %sw.bb19 i32 67, label %sw.bb24 i32 68, label %sw.bb29 ] sw.bb: ; preds = %for.body13 %3 = load i32, ptr %a, align 4, !tbaa !5 %sub = add nsw i32 %3, -1 %idxprom17 = sext i32 %sub to i64 %arrayidx18 = getelementptr inbounds [13 x i32], ptr %s, i64 0, i64 %idxprom17 br label %for.inc34.sink.split sw.bb19: ; preds = %for.body13 %4 = load i32, ptr %a, align 4, !tbaa !5 %sub21 = add nsw i32 %4, -1 %idxprom22 = sext i32 %sub21 to i64 %arrayidx23 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 1, i64 %idxprom22 br label %for.inc34.sink.split sw.bb24: ; preds = %for.body13 %5 = load i32, ptr %a, align 4, !tbaa !5 %sub26 = add nsw i32 %5, -1 %idxprom27 = sext i32 %sub26 to i64 %arrayidx28 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 2, i64 %idxprom27 br label %for.inc34.sink.split sw.bb29: ; preds = %for.body13 %6 = load i32, ptr %a, align 4, !tbaa !5 %sub31 = add nsw i32 %6, -1 %idxprom32 = sext i32 %sub31 to i64 %arrayidx33 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 3, i64 %idxprom32 br label %for.inc34.sink.split for.inc34.sink.split: ; preds = %sw.bb29, %sw.bb24, %sw.bb19, %sw.bb %arrayidx18.sink = phi ptr [ %arrayidx18, %sw.bb ], [ %arrayidx23, %sw.bb19 ], [ %arrayidx28, %sw.bb24 ], [ %arrayidx33, %sw.bb29 ] store i32 1, ptr %arrayidx18.sink, align 4, !tbaa !5 br label %for.inc34 for.inc34: ; preds = %for.inc34.sink.split, %for.body13 %inc35 = add nuw nsw i32 %i.174, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp12 = icmp slt i32 %inc35, %7 br i1 %cmp12, label %for.body13, label %for.cond37.preheader, !llvm.loop !12 for.body44: ; preds = %for.cond37.preheader, %for.inc55 %storemerge75 = phi i32 [ 0, %for.cond37.preheader ], [ %inc56, %for.inc55 ] %idxprom47 = sext i32 %storemerge75 to i64 %arrayidx48 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 0, i64 %idxprom47 %8 = load i32, ptr %arrayidx48, align 4, !tbaa !5 %cmp49 = icmp eq i32 %8, 0 br i1 %cmp49, label %if.then, label %for.inc55 if.then: ; preds = %for.body44 %add = add nsw i32 %storemerge75, 1 %call54 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 83, i32 noundef %add) %.pre = load i32, ptr %a, align 4, !tbaa !5 br label %for.inc55 for.inc55: ; preds = %for.body44, %if.then %9 = phi i32 [ %storemerge75, %for.body44 ], [ %.pre, %if.then ] %inc56 = add nsw i32 %9, 1 store i32 %inc56, ptr %a, align 4, !tbaa !5 %cmp42 = icmp slt i32 %9, 12 br i1 %cmp42, label %for.body44, label %for.inc58, !llvm.loop !14 for.inc58: ; preds = %for.inc55 store i32 0, ptr %a, align 4, !tbaa !5 br label %for.body44.1 for.body44.1: ; preds = %for.inc55.1, %for.inc58 %storemerge75.1 = phi i32 [ 0, %for.inc58 ], [ %inc56.1, %for.inc55.1 ] %idxprom47.1 = sext i32 %storemerge75.1 to i64 %arrayidx48.1 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 1, i64 %idxprom47.1 %10 = load i32, ptr %arrayidx48.1, align 4, !tbaa !5 %cmp49.1 = icmp eq i32 %10, 0 br i1 %cmp49.1, label %if.then.1, label %for.inc55.1 if.then.1: ; preds = %for.body44.1 %add.1 = add nsw i32 %storemerge75.1, 1 %call54.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 72, i32 noundef %add.1) %.pre81 = load i32, ptr %a, align 4, !tbaa !5 br label %for.inc55.1 for.inc55.1: ; preds = %if.then.1, %for.body44.1 %11 = phi i32 [ %.pre81, %if.then.1 ], [ %storemerge75.1, %for.body44.1 ] %inc56.1 = add nsw i32 %11, 1 store i32 %inc56.1, ptr %a, align 4, !tbaa !5 %cmp42.1 = icmp slt i32 %11, 12 br i1 %cmp42.1, label %for.body44.1, label %for.inc58.1, !llvm.loop !14 for.inc58.1: ; preds = %for.inc55.1 store i32 0, ptr %a, align 4, !tbaa !5 br label %for.body44.2 for.body44.2: ; preds = %for.inc55.2, %for.inc58.1 %storemerge75.2 = phi i32 [ 0, %for.inc58.1 ], [ %inc56.2, %for.inc55.2 ] %idxprom47.2 = sext i32 %storemerge75.2 to i64 %arrayidx48.2 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 2, i64 %idxprom47.2 %12 = load i32, ptr %arrayidx48.2, align 4, !tbaa !5 %cmp49.2 = icmp eq i32 %12, 0 br i1 %cmp49.2, label %if.then.2, label %for.inc55.2 if.then.2: ; preds = %for.body44.2 %add.2 = add nsw i32 %storemerge75.2, 1 %call54.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 67, i32 noundef %add.2) %.pre82 = load i32, ptr %a, align 4, !tbaa !5 br label %for.inc55.2 for.inc55.2: ; preds = %if.then.2, %for.body44.2 %13 = phi i32 [ %.pre82, %if.then.2 ], [ %storemerge75.2, %for.body44.2 ] %inc56.2 = add nsw i32 %13, 1 store i32 %inc56.2, ptr %a, align 4, !tbaa !5 %cmp42.2 = icmp slt i32 %13, 12 br i1 %cmp42.2, label %for.body44.2, label %for.inc58.2, !llvm.loop !14 for.inc58.2: ; preds = %for.inc55.2 store i32 0, ptr %a, align 4, !tbaa !5 br label %for.body44.3 for.body44.3: ; preds = %for.inc55.3, %for.inc58.2 %storemerge75.3 = phi i32 [ 0, %for.inc58.2 ], [ %inc56.3, %for.inc55.3 ] %idxprom47.3 = sext i32 %storemerge75.3 to i64 %arrayidx48.3 = getelementptr inbounds [4 x [13 x i32]], ptr %s, i64 0, i64 3, i64 %idxprom47.3 %14 = load i32, ptr %arrayidx48.3, align 4, !tbaa !5 %cmp49.3 = icmp eq i32 %14, 0 br i1 %cmp49.3, label %if.then.3, label %for.inc55.3 if.then.3: ; preds = %for.body44.3 %add.3 = add nsw i32 %storemerge75.3, 1 %call54.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef 68, i32 noundef %add.3) %.pre83 = load i32, ptr %a, align 4, !tbaa !5 br label %for.inc55.3 for.inc55.3: ; preds = %if.then.3, %for.body44.3 %15 = phi i32 [ %.pre83, %if.then.3 ], [ %storemerge75.3, %for.body44.3 ] %inc56.3 = add nsw i32 %15, 1 store i32 %inc56.3, ptr %a, align 4, !tbaa !5 %cmp42.3 = icmp slt i32 %15, 12 br i1 %cmp42.3, label %for.body44.3, label %for.inc58.3, !llvm.loop !14 for.inc58.3: ; preds = %for.inc55.3 call void @llvm.lifetime.end.p0(i64 208, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"any pointer", !7, i64 0} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13}
#include <stdio.h> int main() { int T; scanf("%d", &T); for (int i = 0; i < T; i++) { int n; scanf("%d", &n); char red[n+1], blue[n+1]; scanf("%s", red); scanf("%s", blue); int num_red, num_blue; num_blue = num_red = 0; for (int j = 0; j < n; j++) { if (red[j] > blue[j]) num_red++; else if (red[j] < blue[j]) num_blue++; } if (num_red > num_blue) printf("RED\n"); else if (num_blue > num_red) printf("BLUE\n"); else printf("EQUAL\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27207/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27207/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @str = private unnamed_addr constant [6 x i8] c"EQUAL\00", align 1 @str.5 = private unnamed_addr constant [5 x i8] c"BLUE\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"RED\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) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %T) %0 = load i32, ptr %T, align 4, !tbaa !5 %cmp60 = icmp sgt i32 %0, 0 br i1 %cmp60, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %if.end39, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %T) #6 ret i32 0 for.body: ; preds = %entry, %if.end39 %i.061 = phi i32 [ %inc41, %if.end39 ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %add = add nsw i32 %1, 1 %2 = zext i32 %add to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca i8, i64 %2, align 16 %4 = load i32, ptr %n, align 4, !tbaa !5 %add2 = add nsw i32 %4, 1 %5 = zext i32 %add2 to i64 %vla3 = alloca i8, i64 %5, align 16 %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla) %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla3) %6 = load i32, ptr %n, align 4, !tbaa !5 %cmp755 = icmp sgt i32 %6, 0 br i1 %cmp755, label %for.body9.preheader, label %if.else36 for.body9.preheader: ; preds = %for.body %wide.trip.count = zext i32 %6 to i64 %min.iters.check = icmp ult i32 %6, 8 br i1 %min.iters.check, label %for.body9.preheader79, label %vector.ph vector.ph: ; preds = %for.body9.preheader %n.vec = and i64 %wide.trip.count, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %21, %vector.body ] %vec.phi71 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %22, %vector.body ] %vec.phi72 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %17, %vector.body ] %vec.phi73 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %18, %vector.body ] %7 = getelementptr inbounds i8, ptr %vla, i64 %index %wide.load = load <4 x i8>, ptr %7, align 8, !tbaa !9 %8 = getelementptr inbounds i8, ptr %7, i64 4 %wide.load74 = load <4 x i8>, ptr %8, align 4, !tbaa !9 %9 = getelementptr inbounds i8, ptr %vla3, i64 %index %wide.load75 = load <4 x i8>, ptr %9, align 8, !tbaa !9 %10 = getelementptr inbounds i8, ptr %9, i64 4 %wide.load76 = load <4 x i8>, ptr %10, align 4, !tbaa !9 %11 = icmp sgt <4 x i8> %wide.load, %wide.load75 %12 = icmp sgt <4 x i8> %wide.load74, %wide.load76 %13 = icmp slt <4 x i8> %wide.load, %wide.load75 %14 = icmp slt <4 x i8> %wide.load74, %wide.load76 %15 = zext <4 x i1> %11 to <4 x i32> %16 = zext <4 x i1> %12 to <4 x i32> %17 = add <4 x i32> %vec.phi72, %15 %18 = add <4 x i32> %vec.phi73, %16 %19 = zext <4 x i1> %13 to <4 x i32> %20 = zext <4 x i1> %14 to <4 x i32> %21 = add <4 x i32> %vec.phi, %19 %22 = add <4 x i32> %vec.phi71, %20 %index.next = add nuw i64 %index, 8 %23 = icmp eq i64 %index.next, %n.vec br i1 %23, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %bin.rdx77 = add <4 x i32> %18, %17 %24 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx77) %bin.rdx = add <4 x i32> %22, %21 %25 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.cond.cleanup8, label %for.body9.preheader79 for.body9.preheader79: ; preds = %for.body9.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body9.preheader ], [ %n.vec, %middle.block ] %num_blue.057.ph = phi i32 [ 0, %for.body9.preheader ], [ %25, %middle.block ] %num_red.056.ph = phi i32 [ 0, %for.body9.preheader ], [ %24, %middle.block ] br label %for.body9 for.cond.cleanup8: ; preds = %for.body9, %middle.block %num_red.1.lcssa = phi i32 [ %24, %middle.block ], [ %num_red.1, %for.body9 ] %num_blue.1.lcssa = phi i32 [ %25, %middle.block ], [ %num_blue.1, %for.body9 ] %cmp27 = icmp ugt i32 %num_red.1.lcssa, %num_blue.1.lcssa br i1 %cmp27, label %if.end39, label %if.else31 for.body9: ; preds = %for.body9.preheader79, %for.body9 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body9 ], [ %indvars.iv.ph, %for.body9.preheader79 ] %num_blue.057 = phi i32 [ %num_blue.1, %for.body9 ], [ %num_blue.057.ph, %for.body9.preheader79 ] %num_red.056 = phi i32 [ %num_red.1, %for.body9 ], [ %num_red.056.ph, %for.body9.preheader79 ] %arrayidx = getelementptr inbounds i8, ptr %vla, i64 %indvars.iv %26 = load i8, ptr %arrayidx, align 1, !tbaa !9 %arrayidx11 = getelementptr inbounds i8, ptr %vla3, i64 %indvars.iv %27 = load i8, ptr %arrayidx11, align 1, !tbaa !9 %cmp13 = icmp sgt i8 %26, %27 %cmp21 = icmp slt i8 %26, %27 %inc = zext i1 %cmp13 to i32 %num_red.1 = add nuw nsw i32 %num_red.056, %inc %spec.select = zext i1 %cmp21 to i32 %num_blue.1 = add nuw nsw i32 %num_blue.057, %spec.select %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.cleanup8, label %for.body9, !llvm.loop !14 if.else31: ; preds = %for.cond.cleanup8 %cmp32 = icmp ugt i32 %num_blue.1.lcssa, %num_red.1.lcssa br i1 %cmp32, label %if.end39, label %if.else36 if.else36: ; preds = %for.body, %if.else31 br label %if.end39 if.end39: ; preds = %if.else31, %for.cond.cleanup8, %if.else36 %str.5.sink = phi ptr [ @str, %if.else36 ], [ @str.6, %for.cond.cleanup8 ], [ @str.5, %if.else31 ] %puts53 = call i32 @puts(ptr nonnull dereferenceable(1) %str.5.sink) call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 %inc41 = add nuw nsw i32 %i.061, 1 %28 = load i32, ptr %T, align 4, !tbaa !5 %cmp = icmp slt i32 %inc41, %28 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !15 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn 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 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nofree nounwind } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11, !12, !13} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !11, !13, !12} !15 = distinct !{!15, !11}
#include<stdio.h> #include<stdlib.h> int main() { int N; fscanf(stdin, "%d", &N); int prices[N][2]; char eggs[N+100]; int i; for (i = 0; i < N; i++) { int priceA; fscanf(stdin, "%d", &priceA); int priceB; fscanf(stdin, "%d", &priceB); prices[i][0] = priceA; prices[i][1] = priceB; } int paymentA = 0; int paymentB = 0; for (i = 0; i < N; i++) { int newPaymentA = paymentA + prices[i][0]; int newPaymentB = paymentB + prices[i][1]; int currentDifferenceNewA = newPaymentA - paymentB; int currentDifferenceNewB = (newPaymentB - paymentA); if (currentDifferenceNewA < 0) { currentDifferenceNewA = currentDifferenceNewA * -1; } if (currentDifferenceNewB < 0) { currentDifferenceNewB = currentDifferenceNewB * -1; } if (currentDifferenceNewA < currentDifferenceNewB) { paymentA = newPaymentA; eggs[i] = 'A'; } else { paymentB = newPaymentB; eggs[i] = 'G'; } } int paymentDifference = paymentA - paymentB; if (paymentDifference < 0) { paymentDifference = paymentDifference * -1; } if (paymentDifference <= 500) { for (i = 0; i < N; i++) { fprintf(stdout, "%c", eggs[i]); } fprintf(stdout, "%s", "\n"); } else { fprintf(stdout, "%s", "-1\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2722/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2722/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @stdin = external local_unnamed_addr global ptr, align 8 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @stdout = external local_unnamed_addr global ptr, align 8 @.str.4 = private unnamed_addr constant [4 x i8] c"-1\0A\00", align 1 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %priceA = alloca i32, align 4 %priceB = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #6 %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %0, ptr noundef nonnull @.str, ptr noundef nonnull %N) #6 %1 = load i32, ptr %N, align 4, !tbaa !9 %2 = zext i32 %1 to i64 %3 = call ptr @llvm.stacksave.p0() %vla = alloca [2 x i32], i64 %2, align 16 %4 = load i32, ptr %N, align 4, !tbaa !9 %add = add nsw i32 %4, 100 %5 = zext i32 %add to i64 %vla1 = alloca i8, i64 %5, align 16 %cmp81 = icmp sgt i32 %4, 0 br i1 %cmp81, label %for.body, label %for.end50 for.cond8.preheader: ; preds = %for.body %cmp983 = icmp sgt i32 %10, 0 br i1 %cmp983, label %for.body10.preheader, label %for.end34 for.body10.preheader: ; preds = %for.cond8.preheader %wide.trip.count = zext i32 %10 to i64 br label %for.body10 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %priceA) #6 %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call2 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %6, ptr noundef nonnull @.str, ptr noundef nonnull %priceA) #6 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %priceB) #6 %7 = load ptr, ptr @stdin, align 8, !tbaa !5 %call3 = call i32 (ptr, ptr, ...) @__isoc99_fscanf(ptr noundef %7, ptr noundef nonnull @.str, ptr noundef nonnull %priceB) #6 %8 = load i32, ptr %priceA, align 4, !tbaa !9 %arrayidx = getelementptr inbounds [2 x i32], ptr %vla, i64 %indvars.iv store i32 %8, ptr %arrayidx, align 8, !tbaa !9 %9 = load i32, ptr %priceB, align 4, !tbaa !9 %arrayidx7 = getelementptr inbounds [2 x i32], ptr %vla, i64 %indvars.iv, i64 1 store i32 %9, ptr %arrayidx7, align 4, !tbaa !9 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %priceB) #6 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %priceA) #6 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %N, align 4, !tbaa !9 %11 = sext i32 %10 to i64 %cmp = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp, label %for.body, label %for.cond8.preheader, !llvm.loop !11 for.body10: ; preds = %for.body10.preheader, %for.body10 %indvars.iv93 = phi i64 [ 0, %for.body10.preheader ], [ %indvars.iv.next94, %for.body10 ] %paymentB.085 = phi i32 [ 0, %for.body10.preheader ], [ %paymentB.1, %for.body10 ] %paymentA.084 = phi i32 [ 0, %for.body10.preheader ], [ %paymentA.1, %for.body10 ] %arrayidx12 = getelementptr inbounds [2 x i32], ptr %vla, i64 %indvars.iv93 %12 = load i32, ptr %arrayidx12, align 8, !tbaa !9 %add14 = add nsw i32 %12, %paymentA.084 %arrayidx17 = getelementptr inbounds [2 x i32], ptr %vla, i64 %indvars.iv93, i64 1 %13 = load i32, ptr %arrayidx17, align 4, !tbaa !9 %add18 = add nsw i32 %13, %paymentB.085 %sub = sub nsw i32 %add14, %paymentB.085 %sub19 = sub nsw i32 %add18, %paymentA.084 %spec.select = call i32 @llvm.abs.i32(i32 %sub, i1 true) %currentDifferenceNewB.0 = call i32 @llvm.abs.i32(i32 %sub19, i1 true) %cmp25 = icmp ult i32 %spec.select, %currentDifferenceNewB.0 %.sink = select i1 %cmp25, i8 65, i8 71 %paymentA.1 = select i1 %cmp25, i32 %add14, i32 %paymentA.084 %paymentB.1 = select i1 %cmp25, i32 %paymentB.085, i32 %add18 %14 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv93 store i8 %.sink, ptr %14, align 1 %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1 %exitcond.not = icmp eq i64 %indvars.iv.next94, %wide.trip.count br i1 %exitcond.not, label %for.end34.loopexit, label %for.body10, !llvm.loop !13 for.end34.loopexit: ; preds = %for.body10 %15 = sub nsw i32 %paymentA.1, %paymentB.1 br label %for.end34 for.end34: ; preds = %for.end34.loopexit, %for.cond8.preheader %sub35 = phi i32 [ 0, %for.cond8.preheader ], [ %15, %for.end34.loopexit ] %spec.select80 = call i32 @llvm.abs.i32(i32 %sub35, i1 true) %cmp40 = icmp ult i32 %spec.select80, 501 br i1 %cmp40, label %for.cond42.preheader, label %if.else52 for.cond42.preheader: ; preds = %for.end34 br i1 %cmp983, label %for.body44, label %for.end50 for.body44: ; preds = %for.cond42.preheader, %for.body44 %indvars.iv96 = phi i64 [ %indvars.iv.next97, %for.body44 ], [ 0, %for.cond42.preheader ] %16 = load ptr, ptr @stdout, align 8, !tbaa !5 %arrayidx46 = getelementptr inbounds i8, ptr %vla1, i64 %indvars.iv96 %17 = load i8, ptr %arrayidx46, align 1, !tbaa !14 %conv = sext i8 %17 to i32 %fputc79 = call i32 @fputc(i32 %conv, ptr %16) %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1 %18 = load i32, ptr %N, align 4, !tbaa !9 %19 = sext i32 %18 to i64 %cmp43 = icmp slt i64 %indvars.iv.next97, %19 br i1 %cmp43, label %for.body44, label %for.end50, !llvm.loop !15 for.end50: ; preds = %for.body44, %entry, %for.cond42.preheader %20 = load ptr, ptr @stdout, align 8, !tbaa !5 %fputc = call i32 @fputc(i32 10, ptr %20) br label %if.end54 if.else52: ; preds = %for.end34 %21 = load ptr, ptr @stdout, align 8, !tbaa !5 %22 = call i64 @fwrite(ptr nonnull @.str.4, i64 3, i64 1, ptr %21) br label %if.end54 if.end54: ; preds = %if.else52, %for.end50 call void @llvm.stackrestore.p0(ptr %3) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 declare i32 @__isoc99_fscanf(ptr noundef, ptr noundef, ...) 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 i64 @fwrite(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @fputc(i32 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #5 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { "no-trapping-math"="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 = { 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 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = !{!7, !7, i64 0} !15 = distinct !{!15, !12}
/*strongly connected city*/ #include<stdio.h> int main() { int m,n,i,ul,ur,dl,dr; scanf("%d %d",&n,&m); getchar(); ul=getchar(); for(i=2;i<n;i++) getchar(); ur=getchar(); getchar(); dl=getchar(); for(i=2;i<m;i++) getchar(); dr=getchar(); if(ul=='>'&&ur=='<'&&dl=='^'&&dr=='v') printf("YES\n"); else if(ul=='<'&&ur=='>'&&dl=='v'&&dr=='^') printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27256/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27256/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.4 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %m = alloca i32, align 4 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i = call i32 @getc(ptr noundef %0) %1 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i48 = call i32 @getc(ptr noundef %1) %2 = load i32, ptr %n, align 4, !tbaa !9 %cmp55 = icmp sgt i32 %2, 2 br i1 %cmp55, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.056 = phi i32 [ %inc, %for.body ], [ 2, %entry ] %3 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i49 = call i32 @getc(ptr noundef %3) %inc = add nuw nsw i32 %i.056, 1 %4 = load i32, ptr %n, align 4, !tbaa !9 %cmp = icmp slt i32 %inc, %4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body, %entry %5 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i50 = call i32 @getc(ptr noundef %5) %6 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i51 = call i32 @getc(ptr noundef %6) %7 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i52 = call i32 @getc(ptr noundef %7) %8 = load i32, ptr %m, align 4, !tbaa !9 %cmp857 = icmp sgt i32 %8, 2 br i1 %cmp857, label %for.body9, label %for.end13 for.body9: ; preds = %for.end, %for.body9 %i.158 = phi i32 [ %inc12, %for.body9 ], [ 2, %for.end ] %9 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i53 = call i32 @getc(ptr noundef %9) %inc12 = add nuw nsw i32 %i.158, 1 %10 = load i32, ptr %m, align 4, !tbaa !9 %cmp8 = icmp slt i32 %inc12, %10 br i1 %cmp8, label %for.body9, label %for.end13, !llvm.loop !13 for.end13: ; preds = %for.body9, %for.end %11 = load ptr, ptr @stdin, align 8, !tbaa !5 %call.i54 = call i32 @getc(ptr noundef %11) %cmp15 = icmp eq i32 %call.i48, 62 %cmp16 = icmp eq i32 %call.i50, 60 %or.cond = and i1 %cmp15, %cmp16 %cmp18 = icmp eq i32 %call.i52, 94 %or.cond34 = and i1 %or.cond, %cmp18 %cmp20 = icmp eq i32 %call.i54, 118 %or.cond35 = and i1 %or.cond34, %cmp20 br i1 %or.cond35, label %if.end33, label %if.else if.else: ; preds = %for.end13 %cmp22 = icmp eq i32 %call.i48, 60 %cmp24 = icmp eq i32 %call.i50, 62 %or.cond36 = and i1 %cmp22, %cmp24 %cmp26 = icmp eq i32 %call.i52, 118 %or.cond37 = and i1 %or.cond36, %cmp26 %cmp28 = icmp eq i32 %call.i54, 94 %or.cond38 = and i1 %or.cond37, %cmp28 %str.3.str = select i1 %or.cond38, ptr @str.4, ptr @str br label %if.end33 if.end33: ; preds = %if.else, %for.end13 %str.3.sink = phi ptr [ @str.4, %for.end13 ], [ %str.3.str, %if.else ] %puts46 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #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 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include <stdio.h> int main(void) { int i; int n; int total; total = 0; for (i = 0; i < 10; i++){ scanf("%d", &n); total += n; } printf("%d\n", total); return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272602/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272602/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %add.1 = add nsw i32 %1, %0 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %2 = load i32, ptr %n, align 4, !tbaa !5 %add.2 = add nsw i32 %2, %add.1 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %3 = load i32, ptr %n, align 4, !tbaa !5 %add.3 = add nsw i32 %3, %add.2 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %4 = load i32, ptr %n, align 4, !tbaa !5 %add.4 = add nsw i32 %4, %add.3 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %5 = load i32, ptr %n, align 4, !tbaa !5 %add.5 = add nsw i32 %5, %add.4 %call.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %6 = load i32, ptr %n, align 4, !tbaa !5 %add.6 = add nsw i32 %6, %add.5 %call.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %7 = load i32, ptr %n, align 4, !tbaa !5 %add.7 = add nsw i32 %7, %add.6 %call.8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %8 = load i32, ptr %n, align 4, !tbaa !5 %add.8 = add nsw i32 %8, %add.7 %call.9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %9 = load i32, ptr %n, align 4, !tbaa !5 %add.9 = add nsw i32 %9, %add.8 %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.9) 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 a, b, c, d, e, f, g, h, i, j; int x; scanf("%d %d %d %d %d %d %d %d %d %d", &a, &b, &c, &d, &e, &f, &g, &h, &i, &j); x=a+b+c+d+e+f+g+h+i+j; printf("%d\n", x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272646/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272646/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [30 x i8] c"%d %d %d %d %d %d %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 %e = alloca i32, align 4 %f = alloca i32, align 4 %g = alloca i32, align 4 %h = alloca i32, align 4 %i = alloca i32, align 4 %j = 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 void @llvm.lifetime.start.p0(i64 4, ptr nonnull %e) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #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, ptr noundef nonnull %e, ptr noundef nonnull %f, ptr noundef nonnull %g, ptr noundef nonnull %h, ptr noundef nonnull %i, ptr noundef nonnull %j) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %add = add nsw i32 %1, %0 %2 = load i32, ptr %c, align 4, !tbaa !5 %add1 = add nsw i32 %add, %2 %3 = load i32, ptr %d, align 4, !tbaa !5 %add2 = add nsw i32 %add1, %3 %4 = load i32, ptr %e, align 4, !tbaa !5 %add3 = add nsw i32 %add2, %4 %5 = load i32, ptr %f, align 4, !tbaa !5 %add4 = add nsw i32 %add3, %5 %6 = load i32, ptr %g, align 4, !tbaa !5 %add5 = add nsw i32 %add4, %6 %7 = load i32, ptr %h, align 4, !tbaa !5 %add6 = add nsw i32 %add5, %7 %8 = load i32, ptr %i, align 4, !tbaa !5 %add7 = add nsw i32 %add6, %8 %9 = load i32, ptr %j, align 4, !tbaa !5 %add8 = add nsw i32 %add7, %9 %call9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add8) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %i) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %e) #3 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"}
/* http://codeforces.com/contest/475/problem/A */ #include <stdio.h> static char seats[11][3]; static char specialLine = '#'; static void printLine(int line, char driver, const char* ending){ printf("|"); size_t j; for(j = 0; j < 11; j++) printf("%c.", seats[j][line]); printf("|%c|%s\n", driver, ending); } int main(int arg, char** argv){ int i, n; scanf("%d", &n); char* begin = &seats[0][0]; for(i = 0; i < sizeof(seats); i++) begin[i] = '#'; for(i = 0; i < n; i++){ if(i == 2) specialLine = 'O'; else{ *begin = 'O'; begin++; } } const char* line = "+------------------------+"; puts(line); printLine(0, 'D', ")"); printLine(1, '.', ""); printf("|%c.......................|\n", specialLine); printLine(2, '.', ")"); printf(line); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27269/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27269/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @seats = internal unnamed_addr global [11 x [3 x i8]] zeroinitializer, align 16 @specialLine = internal unnamed_addr global i1 false, align 1 @.str.1 = private unnamed_addr constant [27 x i8] c"+------------------------+\00", align 1 @.str.2 = private unnamed_addr constant [2 x i8] c")\00", align 1 @.str.3 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1 @.str.4 = private unnamed_addr constant [29 x i8] c"|%c.......................|\0A\00", align 1 @.str.6 = private unnamed_addr constant [4 x i8] c"%c.\00", align 1 @.str.7 = private unnamed_addr constant [8 x i8] c"|%c|%s\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %arg, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(33) @seats, i8 35, i64 33, i1 false), !tbaa !5 %0 = load i32, ptr %n, align 4, !tbaa !8 %cmp324 = icmp sgt i32 %0, 0 br i1 %cmp324, label %for.inc8.peel, label %for.end10 for.inc8.peel: ; preds = %entry store i8 79, ptr @seats, align 16, !tbaa !5 %cmp3.peel.not = icmp eq i32 %0, 1 br i1 %cmp3.peel.not, label %for.end10, label %for.inc8.peel34 for.inc8.peel34: ; preds = %for.inc8.peel store i8 79, ptr getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 1), align 1, !tbaa !5 %cmp3.peel37 = icmp ugt i32 %0, 2 br i1 %cmp3.peel37, label %for.inc8.peel44, label %for.end10 for.inc8.peel44: ; preds = %for.inc8.peel34 store i1 true, ptr @specialLine, align 1 %cmp3.peel47.not = icmp eq i32 %0, 3 br i1 %cmp3.peel47.not, label %for.end10, label %iter.check iter.check: ; preds = %for.inc8.peel44 %.pre = load i32, ptr %n, align 4, !tbaa !8 %smax = call i32 @llvm.smax.i32(i32 %.pre, i32 4) %1 = add nsw i32 %smax, -3 %2 = zext i32 %1 to i64 %min.iters.check = icmp ult i32 %1, 8 br i1 %min.iters.check, label %for.inc8.preheader, label %vector.main.loop.iter.check vector.main.loop.iter.check: ; preds = %iter.check %min.iters.check49 = icmp ult i32 %1, 32 br i1 %min.iters.check49, label %vec.epilog.ph, label %vector.ph vector.ph: ; preds = %vector.main.loop.iter.check %n.vec = and i64 %2, 4294967264 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %next.gep = getelementptr i8, ptr getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 2), i64 %index store <16 x i8> <i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79>, ptr %next.gep, align 2, !tbaa !5 %3 = getelementptr i8, ptr %next.gep, i64 16 store <16 x i8> <i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79>, ptr %3, align 2, !tbaa !5 %index.next = add nuw i64 %index, 32 %4 = icmp eq i64 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !10 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %2 br i1 %cmp.n, label %for.end10, label %vec.epilog.iter.check vec.epilog.iter.check: ; preds = %middle.block %ind.end58 = getelementptr i8, ptr getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 2), i64 %n.vec %.cast54 = trunc i64 %n.vec to i32 %ind.end55 = or i32 %.cast54, 3 %n.vec.remaining = and i64 %2, 24 %min.epilog.iters.check = icmp eq i64 %n.vec.remaining, 0 br i1 %min.epilog.iters.check, label %for.inc8.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.vec52 = and i64 %2, 4294967288 %.cast = trunc i64 %n.vec52 to i32 %ind.end53 = or i32 %.cast, 3 %ind.end57 = getelementptr i8, ptr getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 2), i64 %n.vec52 br label %vec.epilog.vector.body vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph %index61 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next63, %vec.epilog.vector.body ] %next.gep62 = getelementptr i8, ptr getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 2), i64 %index61 store <8 x i8> <i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79, i8 79>, ptr %next.gep62, align 2, !tbaa !5 %index.next63 = add nuw i64 %index61, 8 %5 = icmp eq i64 %index.next63, %n.vec52 br i1 %5, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !llvm.loop !15 vec.epilog.middle.block: ; preds = %vec.epilog.vector.body %cmp.n60 = icmp eq i64 %n.vec52, %2 br i1 %cmp.n60, label %for.end10, label %for.inc8.preheader for.inc8.preheader: ; preds = %iter.check, %vec.epilog.iter.check, %vec.epilog.middle.block %i.126.ph = phi i32 [ 3, %iter.check ], [ %ind.end55, %vec.epilog.iter.check ], [ %ind.end53, %vec.epilog.middle.block ] %begin.025.ph = phi ptr [ getelementptr inbounds ([11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 2), %iter.check ], [ %ind.end58, %vec.epilog.iter.check ], [ %ind.end57, %vec.epilog.middle.block ] br label %for.inc8 for.inc8: ; preds = %for.inc8.preheader, %for.inc8 %i.126 = phi i32 [ %inc9, %for.inc8 ], [ %i.126.ph, %for.inc8.preheader ] %begin.025 = phi ptr [ %incdec.ptr, %for.inc8 ], [ %begin.025.ph, %for.inc8.preheader ] store i8 79, ptr %begin.025, align 1, !tbaa !5 %incdec.ptr = getelementptr inbounds i8, ptr %begin.025, i64 1 %inc9 = add nuw nsw i32 %i.126, 1 %cmp3 = icmp slt i32 %inc9, %.pre br i1 %cmp3, label %for.inc8, label %for.end10, !llvm.loop !16 for.end10: ; preds = %for.inc8, %middle.block, %vec.epilog.middle.block, %for.inc8.peel, %for.inc8.peel34, %for.inc8.peel44, %entry %call11 = call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.1) call fastcc void @printLine(i32 noundef 0, i8 noundef signext 68, ptr noundef nonnull @.str.2) call fastcc void @printLine(i32 noundef 1, i8 noundef signext 46, ptr noundef nonnull @.str.3) %.b = load i1, ptr @specialLine, align 1 %conv12 = select i1 %.b, i32 79, i32 35 %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %conv12) call fastcc void @printLine(i32 noundef 2, i8 noundef signext 46, ptr noundef nonnull @.str.2) %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nofree nounwind uwtable define internal fastcc void @printLine(i32 noundef %line, i8 noundef signext %driver, ptr noundef %ending) unnamed_addr #0 { entry: %putchar = tail call i32 @putchar(i32 124) %idxprom = zext i32 %line to i64 %arrayidx1 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 0, i64 %idxprom %0 = load i8, ptr %arrayidx1, align 1, !tbaa !5 %conv = sext i8 %0 to i32 %call2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv) %arrayidx1.1 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 1, i64 %idxprom %1 = load i8, ptr %arrayidx1.1, align 1, !tbaa !5 %conv.1 = sext i8 %1 to i32 %call2.1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.1) %arrayidx1.2 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 2, i64 %idxprom %2 = load i8, ptr %arrayidx1.2, align 1, !tbaa !5 %conv.2 = sext i8 %2 to i32 %call2.2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.2) %arrayidx1.3 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 3, i64 %idxprom %3 = load i8, ptr %arrayidx1.3, align 1, !tbaa !5 %conv.3 = sext i8 %3 to i32 %call2.3 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.3) %arrayidx1.4 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 4, i64 %idxprom %4 = load i8, ptr %arrayidx1.4, align 1, !tbaa !5 %conv.4 = sext i8 %4 to i32 %call2.4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.4) %arrayidx1.5 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 5, i64 %idxprom %5 = load i8, ptr %arrayidx1.5, align 1, !tbaa !5 %conv.5 = sext i8 %5 to i32 %call2.5 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.5) %arrayidx1.6 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 6, i64 %idxprom %6 = load i8, ptr %arrayidx1.6, align 1, !tbaa !5 %conv.6 = sext i8 %6 to i32 %call2.6 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.6) %arrayidx1.7 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 7, i64 %idxprom %7 = load i8, ptr %arrayidx1.7, align 1, !tbaa !5 %conv.7 = sext i8 %7 to i32 %call2.7 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.7) %arrayidx1.8 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 8, i64 %idxprom %8 = load i8, ptr %arrayidx1.8, align 1, !tbaa !5 %conv.8 = sext i8 %8 to i32 %call2.8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.8) %arrayidx1.9 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 9, i64 %idxprom %9 = load i8, ptr %arrayidx1.9, align 1, !tbaa !5 %conv.9 = sext i8 %9 to i32 %call2.9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.9) %arrayidx1.10 = getelementptr inbounds [11 x [3 x i8]], ptr @seats, i64 0, i64 10, i64 %idxprom %10 = load i8, ptr %arrayidx1.10, align 1, !tbaa !5 %conv.10 = sext i8 %10 to i32 %call2.10 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv.10) %conv3 = zext i8 %driver to i32 %call4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %conv3, ptr noundef %ending) 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 @putchar(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { 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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = !{!9, !9, i64 0} !9 = !{!"int", !6, i64 0} !10 = distinct !{!10, !11, !12, !13, !14} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.peeled.count", i32 3} !13 = !{!"llvm.loop.isvectorized", i32 1} !14 = !{!"llvm.loop.unroll.runtime.disable"} !15 = distinct !{!15, !11, !12, !13, !14} !16 = distinct !{!16, !11, !12, !14, !13}
#include<stdio.h> int main() { int i,j,k,n,m,p; scanf("%d",&n); int a[4][11]={{0}}; if(n>=3) { a[2][0]=1;n--; } k=0;j=0; for(i=0;i<n;i++) { if(k==4) { k=0;j++; } if(k==2) k=3; a[k][j]=1; k++; } printf("+------------------------+\n"); printf("|"); for(j=0;j<11;j++) { if(a[0][j]==0) printf("#."); else printf("O."); } printf("|D|)\n"); printf("|"); for(j=0;j<11;j++) { if(a[1][j]==0) printf("#."); else printf("O."); } printf("|.|\n"); printf("|"); if(a[2][0]==0) printf("#"); else printf("O"); printf(".......................|\n"); printf("|"); for(j=0;j<11;j++) { if(a[3][j]==0) printf("#."); else printf("O."); } printf("|.|)\n"); printf("+------------------------+"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27274/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27274/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.3 = private unnamed_addr constant [3 x i8] c"#.\00", align 1 @.str.4 = private unnamed_addr constant [3 x i8] c"O.\00", align 1 @str = private unnamed_addr constant [27 x i8] c"+------------------------+\00", align 1 @str.12 = private unnamed_addr constant [5 x i8] c"|D|)\00", align 1 @str.13 = private unnamed_addr constant [4 x i8] c"|.|\00", align 1 @str.14 = private unnamed_addr constant [25 x i8] c".......................|\00", align 1 @str.15 = private unnamed_addr constant [5 x i8] c"|.|)\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [4 x [11 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 176, ptr nonnull %a) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(176) %a, i8 0, i64 176, i1 false) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 2 br i1 %cmp, label %if.end.thread, label %if.end if.end.thread: ; preds = %entry %arrayidx = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 2 store i32 1, ptr %arrayidx, align 8, !tbaa !5 %dec = add nsw i32 %0, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 br label %for.body.preheader if.end: ; preds = %entry %cmp2100 = icmp sgt i32 %0, 0 br i1 %cmp2100, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %if.end.thread, %if.end %1 = phi i32 [ %dec, %if.end.thread ], [ %0, %if.end ] %xtraiter = and i32 %1, 1 %2 = icmp eq i32 %1, 1 br i1 %2, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %1, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %j.0102 = phi i32 [ 0, %for.body.preheader.new ], [ %spec.select99.1, %for.body ] %k.0101 = phi i32 [ 0, %for.body.preheader.new ], [ %inc12.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %cmp3 = icmp eq i32 %k.0101, 4 %spec.select = select i1 %cmp3, i32 0, i32 %k.0101 %inc = zext i1 %cmp3 to i32 %spec.select99 = add nuw nsw i32 %j.0102, %inc %cmp6 = icmp eq i32 %spec.select, 2 %spec.store.select = select i1 %cmp6, i32 3, i32 %spec.select %idxprom = sext i32 %spec.store.select to i64 %idxprom10 = zext i32 %spec.select99 to i64 %arrayidx11 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 %idxprom, i64 %idxprom10 store i32 1, ptr %arrayidx11, align 4, !tbaa !5 %inc12 = add nsw i32 %spec.store.select, 1 %cmp3.1 = icmp eq i32 %inc12, 4 %spec.select.1 = select i1 %cmp3.1, i32 0, i32 %inc12 %inc.1 = zext i1 %cmp3.1 to i32 %spec.select99.1 = add nuw nsw i32 %spec.select99, %inc.1 %cmp6.1 = icmp eq i32 %spec.select.1, 2 %spec.store.select.1 = select i1 %cmp6.1, i32 3, i32 %spec.select.1 %idxprom.1 = sext i32 %spec.store.select.1 to i64 %idxprom10.1 = zext i32 %spec.select99.1 to i64 %arrayidx11.1 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 %idxprom.1, i64 %idxprom10.1 store i32 1, ptr %arrayidx11.1, align 4, !tbaa !5 %inc12.1 = add nsw i32 %spec.store.select.1, 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, label %for.body, !llvm.loop !9 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %j.0102.unr = phi i32 [ 0, %for.body.preheader ], [ %spec.select99.1, %for.body ] %k.0101.unr = phi i32 [ 0, %for.body.preheader ], [ %inc12.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end.loopexit, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %cmp3.epil = icmp eq i32 %k.0101.unr, 4 %spec.select.epil = select i1 %cmp3.epil, i32 0, i32 %k.0101.unr %inc.epil = zext i1 %cmp3.epil to i32 %spec.select99.epil = add nuw nsw i32 %j.0102.unr, %inc.epil %cmp6.epil = icmp eq i32 %spec.select.epil, 2 %spec.store.select.epil = select i1 %cmp6.epil, i32 3, i32 %spec.select.epil %idxprom.epil = sext i32 %spec.store.select.epil to i64 %idxprom10.epil = zext i32 %spec.select99.epil to i64 %arrayidx11.epil = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 %idxprom.epil, i64 %idxprom10.epil store i32 1, ptr %arrayidx11.epil, align 4, !tbaa !5 br label %for.end.loopexit for.end.loopexit: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil %.pre = load i32, ptr %a, align 16, !tbaa !5 %3 = icmp eq i32 %.pre, 0 %4 = select i1 %3, ptr @.str.3, ptr @.str.4 br label %for.end for.end: ; preds = %for.end.loopexit, %if.end %cmp22 = phi ptr [ %4, %for.end.loopexit ], [ @.str.3, %if.end ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %putchar = call i32 @putchar(i32 124) %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %cmp22) %arrayidx21.1 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 1 %5 = load i32, ptr %arrayidx21.1, align 4, !tbaa !5 %cmp22.1 = icmp eq i32 %5, 0 %.str.3.sink114 = select i1 %cmp22.1, ptr @.str.3, ptr @.str.4 %call24.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink114) %arrayidx21.2 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 2 %6 = load i32, ptr %arrayidx21.2, align 8, !tbaa !5 %cmp22.2 = icmp eq i32 %6, 0 %.str.3.sink115 = select i1 %cmp22.2, ptr @.str.3, ptr @.str.4 %call24.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink115) %arrayidx21.3 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 3 %7 = load i32, ptr %arrayidx21.3, align 4, !tbaa !5 %cmp22.3 = icmp eq i32 %7, 0 %.str.3.sink116 = select i1 %cmp22.3, ptr @.str.3, ptr @.str.4 %call24.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink116) %arrayidx21.4 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 4 %8 = load i32, ptr %arrayidx21.4, align 16, !tbaa !5 %cmp22.4 = icmp eq i32 %8, 0 %.str.3.sink117 = select i1 %cmp22.4, ptr @.str.3, ptr @.str.4 %call24.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink117) %arrayidx21.5 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 5 %9 = load i32, ptr %arrayidx21.5, align 4, !tbaa !5 %cmp22.5 = icmp eq i32 %9, 0 %.str.3.sink118 = select i1 %cmp22.5, ptr @.str.3, ptr @.str.4 %call24.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink118) %arrayidx21.6 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 6 %10 = load i32, ptr %arrayidx21.6, align 8, !tbaa !5 %cmp22.6 = icmp eq i32 %10, 0 %.str.3.sink119 = select i1 %cmp22.6, ptr @.str.3, ptr @.str.4 %call24.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink119) %arrayidx21.7 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 7 %11 = load i32, ptr %arrayidx21.7, align 4, !tbaa !5 %cmp22.7 = icmp eq i32 %11, 0 %.str.3.sink120 = select i1 %cmp22.7, ptr @.str.3, ptr @.str.4 %call24.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink120) %arrayidx21.8 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 8 %12 = load i32, ptr %arrayidx21.8, align 16, !tbaa !5 %cmp22.8 = icmp eq i32 %12, 0 %.str.3.sink121 = select i1 %cmp22.8, ptr @.str.3, ptr @.str.4 %call24.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink121) %arrayidx21.9 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 9 %13 = load i32, ptr %arrayidx21.9, align 4, !tbaa !5 %cmp22.9 = icmp eq i32 %13, 0 %.str.3.sink122 = select i1 %cmp22.9, ptr @.str.3, ptr @.str.4 %call24.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink122) %arrayidx21.10 = getelementptr inbounds [11 x i32], ptr %a, i64 0, i64 10 %14 = load i32, ptr %arrayidx21.10, align 8, !tbaa !5 %cmp22.10 = icmp eq i32 %14, 0 %.str.3.sink123 = select i1 %cmp22.10, ptr @.str.3, ptr @.str.4 %call24.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink123) %puts90 = call i32 @puts(ptr nonnull dereferenceable(1) @str.12) %putchar91 = call i32 @putchar(i32 124) %arrayidx37 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 0 %15 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %cmp38 = icmp eq i32 %15, 0 %.str.3.sink124 = select i1 %cmp38, ptr @.str.3, ptr @.str.4 %call40 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink124) %arrayidx37.1 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 1 %16 = load i32, ptr %arrayidx37.1, align 16, !tbaa !5 %cmp38.1 = icmp eq i32 %16, 0 %.str.3.sink125 = select i1 %cmp38.1, ptr @.str.3, ptr @.str.4 %call40.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink125) %arrayidx37.2 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 2 %17 = load i32, ptr %arrayidx37.2, align 4, !tbaa !5 %cmp38.2 = icmp eq i32 %17, 0 %.str.3.sink126 = select i1 %cmp38.2, ptr @.str.3, ptr @.str.4 %call40.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink126) %arrayidx37.3 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 3 %18 = load i32, ptr %arrayidx37.3, align 8, !tbaa !5 %cmp38.3 = icmp eq i32 %18, 0 %.str.3.sink127 = select i1 %cmp38.3, ptr @.str.3, ptr @.str.4 %call40.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink127) %arrayidx37.4 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 4 %19 = load i32, ptr %arrayidx37.4, align 4, !tbaa !5 %cmp38.4 = icmp eq i32 %19, 0 %.str.3.sink128 = select i1 %cmp38.4, ptr @.str.3, ptr @.str.4 %call40.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink128) %arrayidx37.5 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 5 %20 = load i32, ptr %arrayidx37.5, align 16, !tbaa !5 %cmp38.5 = icmp eq i32 %20, 0 %.str.3.sink129 = select i1 %cmp38.5, ptr @.str.3, ptr @.str.4 %call40.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink129) %arrayidx37.6 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 6 %21 = load i32, ptr %arrayidx37.6, align 4, !tbaa !5 %cmp38.6 = icmp eq i32 %21, 0 %.str.3.sink130 = select i1 %cmp38.6, ptr @.str.3, ptr @.str.4 %call40.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink130) %arrayidx37.7 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 7 %22 = load i32, ptr %arrayidx37.7, align 8, !tbaa !5 %cmp38.7 = icmp eq i32 %22, 0 %.str.3.sink131 = select i1 %cmp38.7, ptr @.str.3, ptr @.str.4 %call40.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink131) %arrayidx37.8 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 8 %23 = load i32, ptr %arrayidx37.8, align 4, !tbaa !5 %cmp38.8 = icmp eq i32 %23, 0 %.str.3.sink132 = select i1 %cmp38.8, ptr @.str.3, ptr @.str.4 %call40.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink132) %arrayidx37.9 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 9 %24 = load i32, ptr %arrayidx37.9, align 16, !tbaa !5 %cmp38.9 = icmp eq i32 %24, 0 %.str.3.sink133 = select i1 %cmp38.9, ptr @.str.3, ptr @.str.4 %call40.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink133) %arrayidx37.10 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 1, i64 10 %25 = load i32, ptr %arrayidx37.10, align 4, !tbaa !5 %cmp38.10 = icmp eq i32 %25, 0 %.str.3.sink134 = select i1 %cmp38.10, ptr @.str.3, ptr @.str.4 %call40.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink134) %puts92 = call i32 @puts(ptr nonnull dereferenceable(1) @str.13) %putchar93 = call i32 @putchar(i32 124) %arrayidx49 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 2 %26 = load i32, ptr %arrayidx49, align 8, !tbaa !5 %cmp51 = icmp eq i32 %26, 0 %.sink = select i1 %cmp51, i32 35, i32 79 %putchar94 = call i32 @putchar(i32 %.sink) %puts96 = call i32 @puts(ptr nonnull dereferenceable(1) @str.14) %putchar97 = call i32 @putchar(i32 124) %arrayidx64 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 0 %27 = load i32, ptr %arrayidx64, align 4, !tbaa !5 %cmp65 = icmp eq i32 %27, 0 %.str.3.sink135 = select i1 %cmp65, ptr @.str.3, ptr @.str.4 %call67 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink135) %arrayidx64.1 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 1 %28 = load i32, ptr %arrayidx64.1, align 8, !tbaa !5 %cmp65.1 = icmp eq i32 %28, 0 %.str.3.sink136 = select i1 %cmp65.1, ptr @.str.3, ptr @.str.4 %call67.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink136) %arrayidx64.2 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 2 %29 = load i32, ptr %arrayidx64.2, align 4, !tbaa !5 %cmp65.2 = icmp eq i32 %29, 0 %.str.3.sink137 = select i1 %cmp65.2, ptr @.str.3, ptr @.str.4 %call67.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink137) %arrayidx64.3 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 3 %30 = load i32, ptr %arrayidx64.3, align 16, !tbaa !5 %cmp65.3 = icmp eq i32 %30, 0 %.str.3.sink138 = select i1 %cmp65.3, ptr @.str.3, ptr @.str.4 %call67.3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink138) %arrayidx64.4 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 4 %31 = load i32, ptr %arrayidx64.4, align 4, !tbaa !5 %cmp65.4 = icmp eq i32 %31, 0 %.str.3.sink139 = select i1 %cmp65.4, ptr @.str.3, ptr @.str.4 %call67.4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink139) %arrayidx64.5 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 5 %32 = load i32, ptr %arrayidx64.5, align 8, !tbaa !5 %cmp65.5 = icmp eq i32 %32, 0 %.str.3.sink140 = select i1 %cmp65.5, ptr @.str.3, ptr @.str.4 %call67.5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink140) %arrayidx64.6 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 6 %33 = load i32, ptr %arrayidx64.6, align 4, !tbaa !5 %cmp65.6 = icmp eq i32 %33, 0 %.str.3.sink141 = select i1 %cmp65.6, ptr @.str.3, ptr @.str.4 %call67.6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink141) %arrayidx64.7 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 7 %34 = load i32, ptr %arrayidx64.7, align 16, !tbaa !5 %cmp65.7 = icmp eq i32 %34, 0 %.str.3.sink142 = select i1 %cmp65.7, ptr @.str.3, ptr @.str.4 %call67.7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink142) %arrayidx64.8 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 8 %35 = load i32, ptr %arrayidx64.8, align 4, !tbaa !5 %cmp65.8 = icmp eq i32 %35, 0 %.str.3.sink143 = select i1 %cmp65.8, ptr @.str.3, ptr @.str.4 %call67.8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink143) %arrayidx64.9 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 9 %36 = load i32, ptr %arrayidx64.9, align 8, !tbaa !5 %cmp65.9 = icmp eq i32 %36, 0 %.str.3.sink144 = select i1 %cmp65.9, ptr @.str.3, ptr @.str.4 %call67.9 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink144) %arrayidx64.10 = getelementptr inbounds [4 x [11 x i32]], ptr %a, i64 0, i64 3, i64 10 %37 = load i32, ptr %arrayidx64.10, align 4, !tbaa !5 %cmp65.10 = icmp eq i32 %37, 0 %.str.3.sink145 = select i1 %cmp65.10, ptr @.str.3, ptr @.str.4 %call67.10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink145) %puts98 = call i32 @puts(ptr nonnull dereferenceable(1) @str.15) %call75 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @str) call void @llvm.lifetime.end.p0(i64 176, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void) { int n,d,x; int a[110]; scanf("%d %d %d",&n,&d,&x); for(int i=0;i<n;i++){ scanf("%d",&a[i]); } int sum=n; for(int i=0;i<n;i++){ int start=1; while(start+a[i]<=d){ sum++; start+=a[i]; } } printf("%d\n",sum+x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272783/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272783/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %d = alloca i32, align 4 %x = alloca i32, align 4 %a = alloca [110 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.start.p0(i64 440, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %d, ptr noundef nonnull %x) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp26 = icmp sgt i32 %0, 0 br i1 %cmp26, label %for.body, label %for.cond.cleanup5 for.cond3.preheader: ; preds = %for.body %cmp428 = icmp sgt i32 %3, 0 br i1 %cmp428, label %while.cond.preheader.lr.ph, label %for.cond.cleanup5 while.cond.preheader.lr.ph: ; preds = %for.cond3.preheader %1 = load i32, ptr %d, align 4, !tbaa !5 %2 = add i32 %1, 1 %wide.trip.count = zext i32 %3 to i64 br label %while.cond.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [110 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 while.cond.preheader: ; preds = %while.cond.preheader.lr.ph, %while.cond.preheader %indvars.iv34 = phi i64 [ 0, %while.cond.preheader.lr.ph ], [ %indvars.iv.next35, %while.cond.preheader ] %sum.029 = phi i32 [ %3, %while.cond.preheader.lr.ph ], [ %13, %while.cond.preheader ] %arrayidx8 = getelementptr inbounds [110 x i32], ptr %a, i64 0, i64 %indvars.iv34 %5 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %6 = add nsw i32 %5, 1 %smax = call i32 @llvm.smax.i32(i32 %6, i32 %2) %7 = xor i32 %5, -1 %8 = add i32 %smax, %7 %9 = icmp ne i32 %8, 0 %umin = zext i1 %9 to i32 %10 = sub i32 %8, %umin %umax = call i32 @llvm.umax.i32(i32 %5, i32 1) %11 = udiv i32 %10, %umax %12 = add i32 %sum.029, %umin %13 = add i32 %12, %11 %indvars.iv.next35 = add nuw nsw i64 %indvars.iv34, 1 %exitcond.not = icmp eq i64 %indvars.iv.next35, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup5, label %while.cond.preheader, !llvm.loop !11 for.cond.cleanup5: ; preds = %while.cond.preheader, %entry, %for.cond3.preheader %sum.0.lcssa = phi i32 [ %3, %for.cond3.preheader ], [ %0, %entry ], [ %13, %while.cond.preheader ] %14 = load i32, ptr %x, align 4, !tbaa !5 %add17 = add nsw i32 %14, %sum.0.lcssa %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add17) call void @llvm.lifetime.end.p0(i64 440, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %d) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @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.umax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #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(char array[], 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[i], &array[j]); } } } } void sort_asc_char_array_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(char array[], 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[i], &array[j]); } } } } void sort_des_char_array_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_array_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_array_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 i; bool answer=0; if_exists(i, min, max, array[i]==element) { answer=1; } return answer; } bool detect_char_array(char array[], int min, int max, char element[], int start, int goal) { int i, j; bool answer=0; if(goal-start<=max-min) { rep(i, min, max-(goal-start)) { 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_array(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; } int count_equalelement_char_array(int size, char array[][size], int min, int max, char element[]) { int i; int answer=0; rep(i, min, max) { if(strcmp(array[i], element)==0) { 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; int N, D, X; scanf("%d %d %d", &N, &D, &X); int A[N+1]; scanf_int_array(A, 1, N); int ans=0; rep(i, 1, N) { ans=ans+(D-1)/A[i]+1; } printf("%d\n", ans+X); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272826/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272826/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 ; 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) #24 %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) #24 %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) #24 %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) #24 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) #24 %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) #25 %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) #24 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(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #16 { 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 !61 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 i8, 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 ] %arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv30 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #25 %cmp6 = icmp sgt i32 %call, 0 br i1 %cmp6, label %if.then, label %for.inc if.then: ; preds = %for.body3 %4 = load i8, ptr %arrayidx, align 1, !tbaa !14 %5 = load i8, ptr %arrayidx5, align 1, !tbaa !14 store i8 %5, ptr %arrayidx, align 1, !tbaa !14 store i8 %4, ptr %arrayidx5, align 1, !tbaa !14 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 !62 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_asc_char_array_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 !63 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) #25 %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 !64, !noalias !67 %24 = getelementptr inbounds i8, ptr %22, i64 16 %wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !64, !noalias !67 %wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !67 %25 = getelementptr inbounds i8, ptr %23, i64 16 %wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !67 store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !64, !noalias !67 store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !64, !noalias !67 store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !67 store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !67 %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 !69 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 !70, !noalias !73 %wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !73 store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !70, !noalias !73 store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !73 %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 !75 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 !76 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 !77 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_des_char_dic(ptr nocapture noundef %array, i32 noundef %min, i32 noundef %max) local_unnamed_addr #16 { 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 !78 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 i8, 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 ] %arrayidx5 = getelementptr inbounds i8, ptr %array, i64 %indvars.iv30 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %arrayidx5) #25 %cmp6 = icmp slt i32 %call, 0 br i1 %cmp6, label %if.then, label %for.inc if.then: ; preds = %for.body3 %4 = load i8, ptr %arrayidx, align 1, !tbaa !14 %5 = load i8, ptr %arrayidx5, align 1, !tbaa !14 store i8 %5, ptr %arrayidx, align 1, !tbaa !14 store i8 %4, ptr %arrayidx5, align 1, !tbaa !14 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 !79 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree nounwind memory(argmem: readwrite) uwtable define dso_local void @sort_des_char_array_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 !80 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) #25 %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 !81, !noalias !84 %24 = getelementptr inbounds i8, ptr %22, i64 16 %wide.load46 = load <16 x i8>, ptr %24, align 1, !tbaa !14, !alias.scope !81, !noalias !84 %wide.load47 = load <16 x i8>, ptr %23, align 1, !tbaa !14, !alias.scope !84 %25 = getelementptr inbounds i8, ptr %23, i64 16 %wide.load48 = load <16 x i8>, ptr %25, align 1, !tbaa !14, !alias.scope !84 store <16 x i8> %wide.load47, ptr %22, align 1, !tbaa !14, !alias.scope !81, !noalias !84 store <16 x i8> %wide.load48, ptr %24, align 1, !tbaa !14, !alias.scope !81, !noalias !84 store <16 x i8> %wide.load, ptr %23, align 1, !tbaa !14, !alias.scope !84 store <16 x i8> %wide.load46, ptr %25, align 1, !tbaa !14, !alias.scope !84 %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 !86 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 !87, !noalias !90 %wide.load54 = load <8 x i8>, ptr %28, align 1, !tbaa !14, !alias.scope !90 store <8 x i8> %wide.load54, ptr %27, align 1, !tbaa !14, !alias.scope !87, !noalias !90 store <8 x i8> %wide.load53, ptr %28, align 1, !tbaa !14, !alias.scope !90 %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 !92 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 !93 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 !94 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 !95 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 !96 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 !97 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 !98 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 !99 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 !100 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 !101 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 !102 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 !103 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 !104 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_array_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) #25 %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 !105 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_array_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) #25 %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 !106 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 !107 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 !108 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 !109 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, i8 noundef signext %element) local_unnamed_addr #19 { entry: %cmp.not13 = icmp sgt i32 %min, %max br i1 %cmp.not13, 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 i8, ptr %array, i64 %indvars.iv %2 = load i8, ptr %arrayidx, align 1, !tbaa !14 %cmp2 = icmp eq i8 %2, %element br i1 %cmp2, 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 !110 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 ] %cmp5.not = icmp sle i32 %i.0.lcssa, %max ret i1 %cmp5.not } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local zeroext i1 @detect_char_array(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 !111 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 !112 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 !109 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 !113 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: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #20 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #20 ; 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 !112 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 !114 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 !115 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 !116 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 !117 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 !118 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 memory(argmem: read) uwtable define dso_local i32 @count_equalelement_char_array(i32 noundef %size, ptr nocapture noundef readonly %array, i32 noundef %min, i32 noundef %max, ptr nocapture noundef readonly %element) local_unnamed_addr #18 { entry: %0 = zext i32 %size to i64 %cmp.not6 = icmp sgt i32 %min, %max br i1 %cmp.not6, label %for.end, label %for.body.preheader for.body.preheader: ; preds = %entry %1 = sext i32 %min to i64 %2 = add i32 %max, 1 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.08 = phi i32 [ 0, %for.body.preheader ], [ %spec.select, %for.body ] %3 = mul nsw i64 %indvars.iv, %0 %arrayidx = getelementptr inbounds i8, ptr %array, i64 %3 %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx, ptr noundef nonnull dereferenceable(1) %element) #25 %cmp1 = icmp eq i32 %call, 0 %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 %2, %lftr.wideiv br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !119 for.end: ; preds = %for.body, %entry %answer.0.lcssa = phi i32 [ 0, %entry ], [ %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 !120 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #21 ; 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 !121 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 !122 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) #25 %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 !123 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 !124 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 !125 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 !126 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 !127 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #21 ; 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 !128 for.end: ; preds = %for.body, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #10 { entry: %N = alloca i32, align 4 %D = alloca i32, align 4 %X = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #24 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #24 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %X) #24 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %N, ptr noundef nonnull %D, ptr noundef nonnull %X) %0 = load i32, ptr %N, align 4, !tbaa !5 %add = add nsw i32 %0, 1 %1 = zext i32 %add to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp.not3.i = icmp slt i32 %3, 1 br i1 %cmp.not3.i, label %for.end, label %for.body.preheader.i for.body.preheader.i: ; preds = %entry %4 = add nuw i32 %3, 1 %zext = zext i32 %4 to i64 br label %for.body.i for.body.i: ; preds = %for.body.i, %for.body.preheader.i %indvars.iv.i = phi i64 [ 1, %for.body.preheader.i ], [ %indvars.iv.next.i, %for.body.i ] %arrayidx.i = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.i %call.i = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx.i) %indvars.iv.next.i = add nuw nsw i64 %indvars.iv.i, 1 %5 = icmp eq i64 %indvars.iv.next.i, %zext br i1 %5, label %scanf_int_array.exit, label %for.body.i, !llvm.loop !120 scanf_int_array.exit: ; preds = %for.body.i %.pre = load i32, ptr %N, align 4, !tbaa !5 %cmp.not9 = icmp slt i32 %.pre, 1 br i1 %cmp.not9, label %for.end, label %for.body.lr.ph for.body.lr.ph: ; preds = %scanf_int_array.exit %6 = load i32, ptr %D, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %7 = zext i32 %.pre to i64 %xtraiter = and i64 %7, 1 %8 = icmp eq i32 %.pre, 1 br i1 %8, 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 %7, 4294967294 %invariant.gep = getelementptr i32, ptr %vla, i64 1 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.1, %for.body ] %ans.011 = phi i32 [ 0, %for.body.lr.ph.new ], [ %add2.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %9 = load i32, ptr %arrayidx, align 4, !tbaa !5 %div = sdiv i32 %sub, %9 %add1 = add i32 %ans.011, 1 %add2 = add i32 %add1, %div %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv %10 = load i32, ptr %gep, align 4, !tbaa !5 %div.1 = sdiv i32 %sub, %10 %add1.1 = add i32 %add2, 1 %add2.1 = add i32 %add1.1, %div.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.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa.loopexit, label %for.body, !llvm.loop !129 for.end.loopexit.unr-lcssa.loopexit: ; preds = %for.body %11 = add i32 %add2.1, 1 br label %for.end.loopexit.unr-lcssa for.end.loopexit.unr-lcssa: ; preds = %for.end.loopexit.unr-lcssa.loopexit, %for.body.lr.ph %add2.lcssa.ph = phi i32 [ undef, %for.body.lr.ph ], [ %add2.1, %for.end.loopexit.unr-lcssa.loopexit ] %indvars.iv.unr = phi i64 [ 1, %for.body.lr.ph ], [ %indvars.iv.next.1, %for.end.loopexit.unr-lcssa.loopexit ] %ans.011.unr = phi i32 [ 1, %for.body.lr.ph ], [ %11, %for.end.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end, label %for.body.epil for.body.epil: ; preds = %for.end.loopexit.unr-lcssa %arrayidx.epil = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.unr %12 = load i32, ptr %arrayidx.epil, align 4, !tbaa !5 %div.epil = sdiv i32 %sub, %12 %add2.epil = add i32 %ans.011.unr, %div.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry, %scanf_int_array.exit %ans.0.lcssa = phi i32 [ 0, %scanf_int_array.exit ], [ 0, %entry ], [ %add2.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %add2.epil, %for.body.epil ] %13 = load i32, ptr %X, align 4, !tbaa !5 %add4 = add nsw i32 %13, %ans.0.lcssa %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.4, i32 noundef %add4) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #24 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #24 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #24 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #22 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.umax.i32(i32, i32) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.abs.i64(i64, i1 immarg) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smax.v4i32(<4 x i32>, <4 x i32>) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smax.v4i32(<4 x i32>) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare <4 x i32> @llvm.smin.v4i32(<4 x i32>, <4 x i32>) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.smin.v4i32(<4 x i32>) #23 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #23 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 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #21 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #22 = { nofree nounwind } attributes #23 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #24 = { nounwind } attributes #25 = { 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 = distinct !{!62, !10} !63 = distinct !{!63, !10} !64 = !{!65} !65 = distinct !{!65, !66} !66 = distinct !{!66, !"LVerDomain"} !67 = !{!68} !68 = distinct !{!68, !66} !69 = distinct !{!69, !10, !11, !12} !70 = !{!71} !71 = distinct !{!71, !72} !72 = distinct !{!72, !"LVerDomain"} !73 = !{!74} !74 = distinct !{!74, !72} !75 = distinct !{!75, !10, !11, !12} !76 = distinct !{!76, !10, !11} !77 = distinct !{!77, !10} !78 = distinct !{!78, !10} !79 = distinct !{!79, !10} !80 = distinct !{!80, !10} !81 = !{!82} !82 = distinct !{!82, !83} !83 = distinct !{!83, !"LVerDomain"} !84 = !{!85} !85 = distinct !{!85, !83} !86 = distinct !{!86, !10, !11, !12} !87 = !{!88} !88 = distinct !{!88, !89} !89 = distinct !{!89, !"LVerDomain"} !90 = !{!91} !91 = distinct !{!91, !89} !92 = distinct !{!92, !10, !11, !12} !93 = distinct !{!93, !10, !11} !94 = distinct !{!94, !10} !95 = distinct !{!95, !10, !11, !12} !96 = distinct !{!96, !10, !12, !11} !97 = distinct !{!97, !10, !11, !12} !98 = distinct !{!98, !10, !12, !11} !99 = distinct !{!99, !10} !100 = distinct !{!100, !10, !11, !12} !101 = distinct !{!101, !10, !12, !11} !102 = distinct !{!102, !10, !11, !12} !103 = distinct !{!103, !10, !12, !11} !104 = distinct !{!104, !10} !105 = distinct !{!105, !10} !106 = distinct !{!106, !10} !107 = distinct !{!107, !10, !11, !12} !108 = distinct !{!108, !10, !12, !11} !109 = distinct !{!109, !10} !110 = distinct !{!110, !10} !111 = distinct !{!111, !10} !112 = distinct !{!112, !10} !113 = distinct !{!113, !10} !114 = distinct !{!114, !10} !115 = distinct !{!115, !10, !11, !12} !116 = distinct !{!116, !10, !12, !11} !117 = distinct !{!117, !10, !11, !12} !118 = distinct !{!118, !10, !12, !11} !119 = distinct !{!119, !10} !120 = distinct !{!120, !10} !121 = distinct !{!121, !10} !122 = distinct !{!122, !10} !123 = distinct !{!123, !10, !11, !12} !124 = distinct !{!124, !10, !11, !12} !125 = distinct !{!125, !39} !126 = distinct !{!126, !10, !11} !127 = distinct !{!127, !10} !128 = distinct !{!128, !10} !129 = distinct !{!129, !10}
#include<stdio.h> int main() { int n,m,i; char N[30],M[30]; scanf("%d %d",&n,&m); scanf("%s",N); scanf("%s",M); //for(i=0;i<n;i++) // printf("%c ",N[i]); //for(i=0;i<m;i++) // printf("%c ",M[i]); if((N[0]!=N[n-1])&&(M[0]!=M[m-1])&&(((M[0]=='^')&&(N[0]=='>'))||((M[0]=='v')&&(N[0]=='<')))) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27287/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27287/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.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 %N = alloca [30 x i8], align 16 %M = alloca [30 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 30, ptr nonnull %M) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %N) %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %M) %0 = load i8, ptr %N, align 16 %1 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %1, -1 %idxprom = sext i32 %sub to i64 %arrayidx4 = getelementptr inbounds [30 x i8], ptr %N, i64 0, i64 %idxprom %2 = load i8, ptr %arrayidx4, align 1, !tbaa !9 %cmp.not = icmp eq i8 %0, %2 br i1 %cmp.not, label %if.else, label %land.lhs.true land.lhs.true: ; preds = %entry %3 = load i8, ptr %M, align 16, !tbaa !9 %4 = load i32, ptr %m, align 4, !tbaa !5 %sub9 = add nsw i32 %4, -1 %idxprom10 = sext i32 %sub9 to i64 %arrayidx11 = getelementptr inbounds [30 x i8], ptr %M, i64 0, i64 %idxprom10 %5 = load i8, ptr %arrayidx11, align 1, !tbaa !9 %cmp13.not = icmp eq i8 %3, %5 br i1 %cmp13.not, label %if.else, label %land.lhs.true15 land.lhs.true15: ; preds = %land.lhs.true %cmp18 = icmp eq i8 %3, 94 %cmp23 = icmp eq i8 %0, 62 %or.cond = and i1 %cmp23, %cmp18 br i1 %or.cond, label %if.end, label %lor.lhs.false lor.lhs.false: ; preds = %land.lhs.true15 %cmp27 = icmp eq i8 %3, 118 %cmp32 = icmp eq i8 %0, 60 %or.cond36 = and i1 %cmp32, %cmp27 br i1 %or.cond36, label %if.end, label %if.else if.else: ; preds = %lor.lhs.false, %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true15, %lor.lhs.false, %if.else %.str.3.sink = phi ptr [ @.str.3, %if.else ], [ @.str.2, %lor.lhs.false ], [ @.str.2, %land.lhs.true15 ] %call35 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.3.sink) call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %M) #3 call void @llvm.lifetime.end.p0(i64 30, ptr nonnull %N) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %m) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0}
#include <stdio.h> int main(void){ int N,D,X; scanf("%d%d%d",&N,&D,&X); int A[N]; int count = 0; for(int i = 0; i < N; i++){ scanf("%d",&A[i]); } for(int i = 0; i < N; i++){ int j = 0; for(int d = 1; d < D+1;d++){ if(j*A[i]+1 == d){ count++; j++; } } } printf("%d\n",count+X); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272912/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272912/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %D = alloca i32, align 4 %X = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %D) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %X) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N, ptr noundef nonnull %D, ptr noundef nonnull %X) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp33 = icmp sgt i32 %3, 0 br i1 %cmp33, label %for.body, label %for.cond.cleanup5 for.cond3.preheader: ; preds = %for.body %cmp440 = icmp sgt i32 %6, 0 br i1 %cmp440, label %for.cond7.preheader.lr.ph, label %for.cond.cleanup5 for.cond7.preheader.lr.ph: ; preds = %for.cond3.preheader %4 = load i32, ptr %D, align 4, !tbaa !5 %cmp8.not35 = icmp slt i32 %4, 1 br i1 %cmp8.not35, label %for.cond.cleanup5, label %for.cond7.preheader.preheader for.cond7.preheader.preheader: ; preds = %for.cond7.preheader.lr.ph %wide.trip.count = zext i32 %6 to i64 %xtraiter = and i32 %4, 1 %5 = icmp eq i32 %4, 1 %unroll_iter = and i32 %4, -2 %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br label %for.cond7.preheader for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %N, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.cond7.preheader: ; preds = %for.cond7.preheader.preheader, %for.cond7.for.cond.cleanup9_crit_edge %indvars.iv47 = phi i64 [ 0, %for.cond7.preheader.preheader ], [ %indvars.iv.next48, %for.cond7.for.cond.cleanup9_crit_edge ] %count.041 = phi i32 [ 0, %for.cond7.preheader.preheader ], [ %count.2.lcssa, %for.cond7.for.cond.cleanup9_crit_edge ] %arrayidx12 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv47 %8 = load i32, ptr %arrayidx12, align 4, !tbaa !5 br i1 %5, label %for.cond7.for.cond.cleanup9_crit_edge.unr-lcssa, label %for.body10 for.cond.cleanup5: ; preds = %for.cond7.for.cond.cleanup9_crit_edge, %entry, %for.cond7.preheader.lr.ph, %for.cond3.preheader %count.0.lcssa = phi i32 [ 0, %for.cond3.preheader ], [ 0, %for.cond7.preheader.lr.ph ], [ 0, %entry ], [ %count.2.lcssa, %for.cond7.for.cond.cleanup9_crit_edge ] %9 = load i32, ptr %X, align 4, !tbaa !5 %add23 = add nsw i32 %9, %count.0.lcssa %call24 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add23) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %X) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %D) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 for.cond7.for.cond.cleanup9_crit_edge.unr-lcssa: ; preds = %for.body10, %for.cond7.preheader %count.2.lcssa.ph = phi i32 [ undef, %for.cond7.preheader ], [ %count.2.1, %for.body10 ] %d.038.unr = phi i32 [ 1, %for.cond7.preheader ], [ %inc18.1, %for.body10 ] %j.037.unr = phi i32 [ 0, %for.cond7.preheader ], [ %j.1.1, %for.body10 ] %count.136.unr = phi i32 [ %count.041, %for.cond7.preheader ], [ %count.2.1, %for.body10 ] br i1 %lcmp.mod.not, label %for.cond7.for.cond.cleanup9_crit_edge, label %for.body10.epil for.body10.epil: ; preds = %for.cond7.for.cond.cleanup9_crit_edge.unr-lcssa %mul.epil = mul nsw i32 %8, %j.037.unr %add13.epil = add nsw i32 %mul.epil, 1 %cmp14.epil = icmp eq i32 %add13.epil, %d.038.unr %inc15.epil = zext i1 %cmp14.epil to i32 %count.2.epil = add nsw i32 %count.136.unr, %inc15.epil br label %for.cond7.for.cond.cleanup9_crit_edge for.cond7.for.cond.cleanup9_crit_edge: ; preds = %for.cond7.for.cond.cleanup9_crit_edge.unr-lcssa, %for.body10.epil %count.2.lcssa = phi i32 [ %count.2.lcssa.ph, %for.cond7.for.cond.cleanup9_crit_edge.unr-lcssa ], [ %count.2.epil, %for.body10.epil ] %indvars.iv.next48 = add nuw nsw i64 %indvars.iv47, 1 %exitcond50.not = icmp eq i64 %indvars.iv.next48, %wide.trip.count br i1 %exitcond50.not, label %for.cond.cleanup5, label %for.cond7.preheader, !llvm.loop !11 for.body10: ; preds = %for.cond7.preheader, %for.body10 %d.038 = phi i32 [ %inc18.1, %for.body10 ], [ 1, %for.cond7.preheader ] %j.037 = phi i32 [ %j.1.1, %for.body10 ], [ 0, %for.cond7.preheader ] %count.136 = phi i32 [ %count.2.1, %for.body10 ], [ %count.041, %for.cond7.preheader ] %niter = phi i32 [ %niter.next.1, %for.body10 ], [ 0, %for.cond7.preheader ] %mul = mul nsw i32 %8, %j.037 %add13 = add nsw i32 %mul, 1 %cmp14 = icmp eq i32 %add13, %d.038 %inc15 = zext i1 %cmp14 to i32 %count.2 = add nsw i32 %count.136, %inc15 %j.1 = add nuw nsw i32 %j.037, %inc15 %mul.1 = mul nsw i32 %8, %j.1 %cmp14.1 = icmp eq i32 %mul.1, %d.038 %inc15.1 = zext i1 %cmp14.1 to i32 %count.2.1 = add nsw i32 %count.2, %inc15.1 %j.1.1 = add nuw nsw i32 %j.1, %inc15.1 %inc18.1 = add nuw i32 %d.038, 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.cond7.for.cond.cleanup9_crit_edge.unr-lcssa, label %for.body10, !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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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[100]; int count; scanf("%d", &a[0]); scanf("%d", &a[1]); scanf("%d", &a[2]); for(int i=0; i < a[0]; i++) { scanf("%d", &a[i+3]); } count = 0; for(int i=0; i < a[0]; i++) //人数分行う { for(int j=0; a[1] >= (j*(a[i+3]) + 1); ++j) //D日間 { count = count + 1; } } printf("%d\n", (a[2] + count)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_272956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_272956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %a) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %arrayidx1 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 1 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx1) %arrayidx3 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 2 %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx3) %0 = load i32, ptr %a, align 16, !tbaa !5 %cmp39 = icmp sgt i32 %0, 0 br i1 %cmp39, label %for.body, label %for.cond.cleanup12 for.cond9.preheader: ; preds = %for.body %cmp1145 = icmp sgt i32 %13, 0 br i1 %cmp1145, label %for.cond14.preheader.lr.ph, label %for.cond.cleanup12 for.cond14.preheader.lr.ph: ; preds = %for.cond9.preheader %1 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %cmp20.not.not41 = icmp sgt i32 %1, 0 br i1 %cmp20.not.not41, label %for.cond14.preheader.us.preheader, label %for.cond.cleanup12 for.cond14.preheader.us.preheader: ; preds = %for.cond14.preheader.lr.ph %wide.trip.count = zext i32 %13 to i64 br label %for.cond14.preheader.us for.cond14.preheader.us: ; preds = %for.cond14.preheader.us.preheader, %for.cond14.for.cond.cleanup21_crit_edge.us %indvars.iv53 = phi i64 [ 0, %for.cond14.preheader.us.preheader ], [ %indvars.iv.next54, %for.cond14.for.cond.cleanup21_crit_edge.us ] %count.046.us = phi i32 [ 0, %for.cond14.preheader.us.preheader ], [ %add23.us.lcssa, %for.cond14.for.cond.cleanup21_crit_edge.us ] %2 = add nuw nsw i64 %indvars.iv53, 3 %arrayidx18.us = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %2 %3 = load i32, ptr %arrayidx18.us, align 4, !tbaa !5 %smax = call i32 @llvm.smax.i32(i32 %3, i32 %1) %4 = add i32 %smax, -1 %5 = udiv i32 %4, %3 %6 = add i32 %5, 1 %min.iters.check = icmp ult i32 %6, 8 br i1 %min.iters.check, label %for.body22.us.preheader, label %vector.ph vector.ph: ; preds = %for.cond14.preheader.us %n.vec = and i32 %6, -8 %7 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %count.046.us, i64 0 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> [ %7, %vector.ph ], [ %8, %vector.body ] %vec.phi59 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %9, %vector.body ] %8 = add <4 x i32> %vec.phi, <i32 1, i32 1, i32 1, i32 1> %9 = add <4 x i32> %vec.phi59, <i32 1, i32 1, i32 1, i32 1> %index.next = add nuw i32 %index, 8 %10 = icmp eq i32 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %9, %8 %11 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %6, %n.vec br i1 %cmp.n, label %for.cond14.for.cond.cleanup21_crit_edge.us, label %for.body22.us.preheader for.body22.us.preheader: ; preds = %for.cond14.preheader.us, %middle.block %j.043.us.ph = phi i32 [ 0, %for.cond14.preheader.us ], [ %n.vec, %middle.block ] %count.142.us.ph = phi i32 [ %count.046.us, %for.cond14.preheader.us ], [ %11, %middle.block ] br label %for.body22.us for.body22.us: ; preds = %for.body22.us.preheader, %for.body22.us %j.043.us = phi i32 [ %inc25.us, %for.body22.us ], [ %j.043.us.ph, %for.body22.us.preheader ] %count.142.us = phi i32 [ %add23.us, %for.body22.us ], [ %count.142.us.ph, %for.body22.us.preheader ] %add23.us = add nsw i32 %count.142.us, 1 %inc25.us = add nuw nsw i32 %j.043.us, 1 %mul.us = mul nsw i32 %3, %inc25.us %cmp20.not.not.us = icmp sgt i32 %1, %mul.us br i1 %cmp20.not.not.us, label %for.body22.us, label %for.cond14.for.cond.cleanup21_crit_edge.us, !llvm.loop !13 for.cond14.for.cond.cleanup21_crit_edge.us: ; preds = %for.body22.us, %middle.block %add23.us.lcssa = phi i32 [ %11, %middle.block ], [ %add23.us, %for.body22.us ] %indvars.iv.next54 = add nuw nsw i64 %indvars.iv53, 1 %exitcond.not = icmp eq i64 %indvars.iv.next54, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup12, label %for.cond14.preheader.us, !llvm.loop !14 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %12 = add nuw nsw i64 %indvars.iv, 3 %arrayidx6 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %12 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %13 = load i32, ptr %a, align 16, !tbaa !5 %14 = sext i32 %13 to i64 %cmp = icmp slt i64 %indvars.iv.next, %14 br i1 %cmp, label %for.body, label %for.cond9.preheader, !llvm.loop !15 for.cond.cleanup12: ; preds = %for.cond14.for.cond.cleanup21_crit_edge.us, %entry, %for.cond14.preheader.lr.ph, %for.cond9.preheader %count.0.lcssa = phi i32 [ 0, %for.cond9.preheader ], [ 0, %for.cond14.preheader.lr.ph ], [ 0, %entry ], [ %add23.us.lcssa, %for.cond14.for.cond.cleanup21_crit_edge.us ] %15 = load i32, ptr %arrayidx3, align 8, !tbaa !5 %add31 = add nsw i32 %15, %count.0.lcssa %call32 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add31) 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: 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.vector.reduce.add.v4i32(<4 x i32>) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10, !12, !11} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10}
#include <stdio.h> int main() { int t, x, cnt, i; scanf ("%d", &t); for (i = 0; i < t; i++) { cnt = 0; scanf ("%d", &x); if (x % 2 == 1){ x -= 3; cnt++; } cnt += x / 2; printf ("%d\n", cnt); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %x = 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 %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %t) %0 = load i32, ptr %t, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %0, 0 br i1 %cmp8, label %for.body, label %for.end for.body: ; preds = %entry, %if.end %i.09 = phi i32 [ %inc4, %if.end ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %1 = load i32, ptr %x, align 4, !tbaa !5 %2 = and i32 %1, -2147483647 %cmp2 = icmp eq i32 %2, 1 br i1 %cmp2, label %if.then, label %if.end if.then: ; preds = %for.body %sub = add nsw i32 %1, -3 store i32 %sub, ptr %x, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then, %for.body %3 = phi i32 [ %sub, %if.then ], [ %1, %for.body ] %cnt.0 = phi i32 [ 1, %if.then ], [ 0, %for.body ] %div = sdiv i32 %3, 2 %add = add nsw i32 %div, %cnt.0 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) %inc4 = add nuw nsw i32 %i.09, 1 %4 = load i32, ptr %t, align 4, !tbaa !5 %cmp = icmp slt i32 %inc4, %4 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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 <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 #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 char stribuf[2200010]; uint32_t stribufl; #define getchar_unlocked() stribuf[stribufl++] uint32_t nextpint(void){ char c=getchar_unlocked(); while(c<'0'||'9'<c) c=getchar_unlocked(); uint32_t x=0; while('0'<=c && c<='9'){ x=x*10+c-'0'; c=getchar_unlocked(); } return x; } void printint(uint32_t x){ if(x<0){x=-x; putchar_unlocked('-');}else if(x==0){putchar_unlocked('0');} int d=0; char s[10]; while(x){ s[d]='0'+x%10; x/=10; d++; } for (int i=d-1; i>=0; i--) putchar_unlocked(s[i]); putchar_unlocked('\n'); } void rsort_str(void *base, const int count, const int size); char str[200000][11]; int main(void){ read(0, stribuf, sizeof(stribuf)); uint32_t n=nextpint(); for(uint32_t i=0; i<n; i++){ char *s=str[i]; char c=getchar_unlocked(); while(c!=' '&&c!='\n'){ *s++=c; c=getchar_unlocked(); } *s='\0'; } rsort_str(str, n, 11); uint32_t ans=1; for(uint32_t i=1; i<n; i++){ if(strcmp(str[i], str[i-1])) ans++; } printint(ans); } void rsort_str(void *base, const int count, const int size){ char (*a)[size]=base; char (*b)[size]=malloc(count*size); int c[0x100]; for(int j=9; j>=0; j--){ memset(c, 0, sizeof(c)); for(int i=0; i<count; i++){ c[a[i][j]]++; } for(int i=1; i<0x100; i++) c[i]+=c[i-1]; for(int i=count-1; i>=0; i--){ memcpy(&b[--c[a[i][j]]], a[i], size); }{void *t=a; a=b; b=t;} } free(b); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273092/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273092/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" %struct._IO_FILE = type { i32, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, i64, i16, i8, [1 x i8], ptr, i64, ptr, ptr, ptr, ptr, i64, i32, [20 x i8] } @stribuf = dso_local global [2200010 x i8] zeroinitializer, align 16 @stribufl = dso_local local_unnamed_addr global i32 0, align 4 @str = dso_local global [200000 x [11 x i8]] zeroinitializer, align 16 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @nextpint() local_unnamed_addr #0 { entry: %stribufl.promoted = load i32, ptr @stribufl, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %while.cond, %entry %idxprom.pn.in26 = phi i32 [ %storemerge, %while.cond ], [ %stribufl.promoted, %entry ] %storemerge = add i32 %idxprom.pn.in26, 1 %idxprom.pn = zext i32 %idxprom.pn.in26 to i64 %c.0.in = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom.pn %c.0 = load i8, ptr %c.0.in, align 1, !tbaa !9 %0 = add i8 %c.0, -58 %1 = icmp ult i8 %0, -10 br i1 %1, label %while.cond, label %while.body15, !llvm.loop !10 while.body15: ; preds = %while.cond, %while.body15 %x.031 = phi i32 [ %sub, %while.body15 ], [ 0, %while.cond ] %c.130 = phi i8 [ %2, %while.body15 ], [ %c.0, %while.cond ] %inc172829 = phi i32 [ %inc17, %while.body15 ], [ %storemerge, %while.cond ] %conv9 = zext i8 %c.130 to i32 %mul = mul i32 %x.031, 10 %add = add nsw i32 %conv9, -48 %sub = add i32 %add, %mul %inc17 = add i32 %inc172829, 1 %idxprom18 = zext i32 %inc172829 to i64 %arrayidx19 = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom18 %2 = load i8, ptr %arrayidx19, align 1, !tbaa !9 %3 = add i8 %2, -48 %4 = icmp ult i8 %3, 10 br i1 %4, label %while.body15, label %while.end20, !llvm.loop !12 while.end20: ; preds = %while.body15 store i32 %inc17, ptr @stribufl, align 4, !tbaa !5 ret i32 %sub } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind uwtable define dso_local void @printint(i32 noundef %x) local_unnamed_addr #2 { entry: %s = alloca [10 x i8], align 1 %cmp1 = icmp eq i32 %x, 0 br i1 %cmp1, label %if.then2, label %while.body.preheader if.then2: ; preds = %entry %0 = load ptr, ptr @stdout, align 8, !tbaa !13 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 5 %1 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !15 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 6 %2 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !19 %cmp.not.i = icmp ult ptr %1, %2 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !20 cond.true.i: ; preds = %if.then2 %call.i = tail call i32 @__overflow(ptr noundef nonnull %0, i32 noundef 48) #10 br label %for.cond.preheader.thread cond.false.i: ; preds = %if.then2 %incdec.ptr.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i, ptr %_IO_write_ptr.i, align 8, !tbaa !15 store i8 48, ptr %1, align 1, !tbaa !9 br label %for.cond.preheader.thread for.cond.preheader.thread: ; preds = %cond.true.i, %cond.false.i call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s) #10 br label %for.cond.cleanup while.body.preheader: ; preds = %entry call void @llvm.lifetime.start.p0(i64 10, ptr nonnull %s) #10 br label %while.body for.cond.preheader: ; preds = %while.body %3 = trunc i64 %indvars.iv.next to i32 %cmp643 = icmp sgt i32 %3, 0 br i1 %cmp643, label %for.body.preheader, label %for.cond.cleanup for.body.preheader: ; preds = %for.cond.preheader %4 = and i64 %indvars.iv.next, 4294967295 br label %for.body while.body: ; preds = %while.body.preheader, %while.body %indvars.iv = phi i64 [ 0, %while.body.preheader ], [ %indvars.iv.next, %while.body ] %x.addr.141 = phi i32 [ %x, %while.body.preheader ], [ %div, %while.body ] %rem = urem i32 %x.addr.141, 10 %5 = trunc i32 %rem to i8 %conv = or i8 %5, 48 %arrayidx = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx, align 1, !tbaa !9 %div = udiv i32 %x.addr.141, 10 %indvars.iv.next = add nuw i64 %indvars.iv, 1 %tobool.not = icmp ult i32 %x.addr.141, 10 br i1 %tobool.not, label %for.cond.preheader, label %while.body, !llvm.loop !21 for.cond.cleanup: ; preds = %putchar_unlocked.exit39, %for.cond.preheader.thread, %for.cond.preheader %6 = load ptr, ptr @stdout, align 8, !tbaa !13 %_IO_write_ptr.i22 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 5 %7 = load ptr, ptr %_IO_write_ptr.i22, align 8, !tbaa !15 %_IO_write_end.i23 = getelementptr inbounds %struct._IO_FILE, ptr %6, i64 0, i32 6 %8 = load ptr, ptr %_IO_write_end.i23, align 8, !tbaa !19 %cmp.not.i24 = icmp ult ptr %7, %8 br i1 %cmp.not.i24, label %cond.false.i28, label %cond.true.i25, !prof !20 cond.true.i25: ; preds = %for.cond.cleanup %call.i26 = tail call i32 @__overflow(ptr noundef nonnull %6, i32 noundef 10) #10 br label %putchar_unlocked.exit30 cond.false.i28: ; preds = %for.cond.cleanup %incdec.ptr.i29 = getelementptr inbounds i8, ptr %7, i64 1 store ptr %incdec.ptr.i29, ptr %_IO_write_ptr.i22, align 8, !tbaa !15 store i8 10, ptr %7, align 1, !tbaa !9 br label %putchar_unlocked.exit30 putchar_unlocked.exit30: ; preds = %cond.true.i25, %cond.false.i28 call void @llvm.lifetime.end.p0(i64 10, ptr nonnull %s) #10 ret void for.body: ; preds = %for.body.preheader, %putchar_unlocked.exit39 %indvars.iv46 = phi i64 [ %4, %for.body.preheader ], [ %indvars.iv.next47, %putchar_unlocked.exit39 ] %indvars.iv.next47 = add nsw i64 %indvars.iv46, -1 %idxprom8 = and i64 %indvars.iv.next47, 4294967295 %arrayidx9 = getelementptr inbounds [10 x i8], ptr %s, i64 0, i64 %idxprom8 %9 = load i8, ptr %arrayidx9, align 1, !tbaa !9 %10 = load ptr, ptr @stdout, align 8, !tbaa !13 %_IO_write_ptr.i31 = getelementptr inbounds %struct._IO_FILE, ptr %10, i64 0, i32 5 %11 = load ptr, ptr %_IO_write_ptr.i31, align 8, !tbaa !15 %_IO_write_end.i32 = getelementptr inbounds %struct._IO_FILE, ptr %10, i64 0, i32 6 %12 = load ptr, ptr %_IO_write_end.i32, align 8, !tbaa !19 %cmp.not.i33 = icmp ult ptr %11, %12 br i1 %cmp.not.i33, label %cond.false.i37, label %cond.true.i34, !prof !20 cond.true.i34: ; preds = %for.body %conv10 = zext i8 %9 to i32 %call.i35 = tail call i32 @__overflow(ptr noundef nonnull %10, i32 noundef %conv10) #10 br label %putchar_unlocked.exit39 cond.false.i37: ; preds = %for.body %incdec.ptr.i38 = getelementptr inbounds i8, ptr %11, i64 1 store ptr %incdec.ptr.i38, ptr %_IO_write_ptr.i31, align 8, !tbaa !15 store i8 %9, ptr %11, align 1, !tbaa !9 br label %putchar_unlocked.exit39 putchar_unlocked.exit39: ; preds = %cond.true.i34, %cond.false.i37 %cmp6 = icmp ugt i64 %indvars.iv46, 1 br i1 %cmp6, label %for.body, label %for.cond.cleanup, !llvm.loop !22 } ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %call = tail call i64 @read(i32 noundef 0, ptr noundef nonnull @stribuf, i64 noundef 2200010) #10 %stribufl.promoted.i = load i32, ptr @stribufl, align 4, !tbaa !5 br label %while.cond.i while.cond.i: ; preds = %while.cond.i, %entry %idxprom.pn.in26.i = phi i32 [ %storemerge.i, %while.cond.i ], [ %stribufl.promoted.i, %entry ] %storemerge.i = add i32 %idxprom.pn.in26.i, 1 %idxprom.pn.i = zext i32 %idxprom.pn.in26.i to i64 %c.0.in.i = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom.pn.i %c.0.i = load i8, ptr %c.0.in.i, align 1, !tbaa !9 %0 = add i8 %c.0.i, -58 %1 = icmp ult i8 %0, -10 br i1 %1, label %while.cond.i, label %while.body15.i, !llvm.loop !10 while.body15.i: ; preds = %while.cond.i, %while.body15.i %x.031.i = phi i32 [ %sub.i, %while.body15.i ], [ 0, %while.cond.i ] %c.130.i = phi i8 [ %2, %while.body15.i ], [ %c.0.i, %while.cond.i ] %inc172829.i = phi i32 [ %inc17.i, %while.body15.i ], [ %storemerge.i, %while.cond.i ] %conv9.i = zext i8 %c.130.i to i32 %mul.i = mul i32 %x.031.i, 10 %add.i = add i32 %mul.i, -48 %sub.i = add i32 %add.i, %conv9.i %inc17.i = add i32 %inc172829.i, 1 %idxprom18.i = zext i32 %inc172829.i to i64 %arrayidx19.i = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom18.i %2 = load i8, ptr %arrayidx19.i, align 1, !tbaa !9 %3 = add i8 %2, -48 %4 = icmp ult i8 %3, 10 br i1 %4, label %while.body15.i, label %nextpint.exit, !llvm.loop !12 nextpint.exit: ; preds = %while.body15.i store i32 %inc17.i, ptr @stribufl, align 4, !tbaa !5 %cmp44.not = icmp eq i32 %sub.i, 0 br i1 %cmp44.not, label %for.cond.cleanup.thread, label %for.body.preheader for.cond.cleanup.thread: ; preds = %nextpint.exit tail call void @rsort_str(ptr noundef nonnull @str, i32 noundef %sub.i, i32 noundef 11) br label %for.cond.cleanup17 for.body.preheader: ; preds = %nextpint.exit %wide.trip.count = zext i32 %sub.i to i64 %xtraiter = and i64 %wide.trip.count, 1 %5 = icmp eq i32 %sub.i, 1 br i1 %5, label %for.cond.cleanup.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.cond.cleanup.unr-lcssa: ; preds = %while.end.1, %for.body.preheader %storemerge.lcssa.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %storemerge.1, %while.end.1 ] %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %while.end.1 ] %storemerge.lcssa4345.unr = phi i32 [ %inc17.i, %for.body.preheader ], [ %storemerge.1, %while.end.1 ] %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.unr-lcssa %arrayidx.epil = getelementptr inbounds [200000 x [11 x i8]], ptr @str, i64 0, i64 %indvars.iv.unr br label %while.cond.epil while.cond.epil: ; preds = %while.body.epil, %for.body.epil %idxprom2.pn.in41.epil = phi i32 [ %storemerge.lcssa4345.unr, %for.body.epil ], [ %storemerge.epil, %while.body.epil ] %s.0.epil = phi ptr [ %arrayidx.epil, %for.body.epil ], [ %incdec.ptr.epil, %while.body.epil ] %storemerge.epil = add i32 %idxprom2.pn.in41.epil, 1 %idxprom2.pn.epil = zext i32 %idxprom2.pn.in41.epil to i64 %c.0.in.epil = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom2.pn.epil %c.0.epil = load i8, ptr %c.0.in.epil, align 1, !tbaa !9 switch i8 %c.0.epil, label %while.body.epil [ i8 32, label %while.end.epil i8 10, label %while.end.epil ] while.end.epil: ; preds = %while.cond.epil, %while.cond.epil store i8 0, ptr %s.0.epil, align 1, !tbaa !9 br label %for.cond.cleanup while.body.epil: ; preds = %while.cond.epil %incdec.ptr.epil = getelementptr inbounds i8, ptr %s.0.epil, i64 1 store i8 %c.0.epil, ptr %s.0.epil, align 1, !tbaa !9 br label %while.cond.epil, !llvm.loop !23 for.cond.cleanup: ; preds = %for.cond.cleanup.unr-lcssa, %while.end.epil %storemerge.lcssa.lcssa = phi i32 [ %storemerge.lcssa.lcssa.ph, %for.cond.cleanup.unr-lcssa ], [ %storemerge.epil, %while.end.epil ] store i32 %storemerge.lcssa.lcssa, ptr @stribufl, align 4, !tbaa !5 tail call void @rsort_str(ptr noundef nonnull @str, i32 noundef %sub.i, i32 noundef 11) %cmp1547 = icmp ugt i32 %sub.i, 1 br i1 %cmp1547, label %for.body18.preheader, label %for.cond.cleanup17 for.body18.preheader: ; preds = %for.cond.cleanup %wide.trip.count55 = zext i32 %sub.i to i64 br label %for.body18 for.body: ; preds = %while.end.1, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %while.end.1 ] %storemerge.lcssa4345 = phi i32 [ %inc17.i, %for.body.preheader.new ], [ %storemerge.1, %while.end.1 ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %while.end.1 ] %arrayidx = getelementptr inbounds [200000 x [11 x i8]], ptr @str, i64 0, i64 %indvars.iv br label %while.cond while.cond: ; preds = %while.body, %for.body %idxprom2.pn.in41 = phi i32 [ %storemerge.lcssa4345, %for.body ], [ %storemerge, %while.body ] %s.0 = phi ptr [ %arrayidx, %for.body ], [ %incdec.ptr, %while.body ] %storemerge = add i32 %idxprom2.pn.in41, 1 %idxprom2.pn = zext i32 %idxprom2.pn.in41 to i64 %c.0.in = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom2.pn %c.0 = load i8, ptr %c.0.in, align 1, !tbaa !9 switch i8 %c.0, label %while.body [ i8 32, label %while.end i8 10, label %while.end ] while.body: ; preds = %while.cond %incdec.ptr = getelementptr inbounds i8, ptr %s.0, i64 1 store i8 %c.0, ptr %s.0, align 1, !tbaa !9 br label %while.cond, !llvm.loop !23 while.end: ; preds = %while.cond, %while.cond store i8 0, ptr %s.0, align 1, !tbaa !9 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx.1 = getelementptr inbounds [200000 x [11 x i8]], ptr @str, i64 0, i64 %indvars.iv.next br label %while.cond.1 while.cond.1: ; preds = %while.body.1, %while.end %idxprom2.pn.in41.1 = phi i32 [ %storemerge, %while.end ], [ %storemerge.1, %while.body.1 ] %s.0.1 = phi ptr [ %arrayidx.1, %while.end ], [ %incdec.ptr.1, %while.body.1 ] %storemerge.1 = add i32 %idxprom2.pn.in41.1, 1 %idxprom2.pn.1 = zext i32 %idxprom2.pn.in41.1 to i64 %c.0.in.1 = getelementptr inbounds [2200010 x i8], ptr @stribuf, i64 0, i64 %idxprom2.pn.1 %c.0.1 = load i8, ptr %c.0.in.1, align 1, !tbaa !9 switch i8 %c.0.1, label %while.body.1 [ i8 32, label %while.end.1 i8 10, label %while.end.1 ] while.end.1: ; preds = %while.cond.1, %while.cond.1 store i8 0, ptr %s.0.1, align 1, !tbaa !9 %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.cond.cleanup.unr-lcssa, label %for.body, !llvm.loop !24 while.body.1: ; preds = %while.cond.1 %incdec.ptr.1 = getelementptr inbounds i8, ptr %s.0.1, i64 1 store i8 %c.0.1, ptr %s.0.1, align 1, !tbaa !9 br label %while.cond.1, !llvm.loop !23 for.cond.cleanup17: ; preds = %for.body18, %for.cond.cleanup.thread, %for.cond.cleanup %ans.0.lcssa = phi i32 [ 1, %for.cond.cleanup ], [ 1, %for.cond.cleanup.thread ], [ %spec.select, %for.body18 ] tail call void @printint(i32 noundef %ans.0.lcssa) ret i32 0 for.body18: ; preds = %for.body18.preheader, %for.body18 %indvars.iv51 = phi i64 [ 1, %for.body18.preheader ], [ %indvars.iv.next52, %for.body18 ] %ans.048 = phi i32 [ 1, %for.body18.preheader ], [ %spec.select, %for.body18 ] %arrayidx20 = getelementptr inbounds [200000 x [11 x i8]], ptr @str, i64 0, i64 %indvars.iv51 %6 = add nsw i64 %indvars.iv51, -1 %arrayidx23 = getelementptr inbounds [200000 x [11 x i8]], ptr @str, i64 0, i64 %6 %call25 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx20, ptr noundef nonnull dereferenceable(1) %arrayidx23) #11 %tobool.not = icmp ne i32 %call25, 0 %inc26 = zext i1 %tobool.not to i32 %spec.select = add i32 %ans.048, %inc26 %indvars.iv.next52 = add nuw nsw i64 %indvars.iv51, 1 %exitcond56.not = icmp eq i64 %indvars.iv.next52, %wide.trip.count55 br i1 %exitcond56.not, label %for.cond.cleanup17, label %for.body18, !llvm.loop !25 } ; Function Attrs: nofree declare noundef i64 @read(i32 noundef, ptr nocapture noundef, i64 noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define dso_local void @rsort_str(ptr nocapture noundef %base, i32 noundef %count, i32 noundef %size) local_unnamed_addr #2 { entry: %c = alloca [256 x i32], align 16 %0 = zext i32 %size to i64 %mul = mul nsw i32 %size, %count %conv = sext i32 %mul to i64 %call = tail call noalias ptr @malloc(i64 noundef %conv) #12 call void @llvm.lifetime.start.p0(i64 1024, ptr nonnull %c) #10 %cmp2873 = icmp sgt i32 %count, 0 %conv42 = sext i32 %size to i64 br i1 %cmp2873, label %for.body.us.us.preheader, label %for.body.preheader for.body.preheader: ; preds = %entry call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17 for.body.us.us.preheader: ; preds = %entry %1 = zext i32 %count to i64 %xtraiter = and i64 %1, 1 %2 = icmp eq i32 %count, 1 %unroll_iter = and i64 %1, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body.us.us for.body.us.us: ; preds = %for.body.us.us.preheader, %for.cond27.for.cond.cleanup30_crit_edge.us.us %indvars.iv127 = phi i64 [ 9, %for.body.us.us.preheader ], [ %indvars.iv.next128, %for.cond27.for.cond.cleanup30_crit_edge.us.us ] %a.077.us.us = phi ptr [ %base, %for.body.us.us.preheader ], [ %b.075.us.us, %for.cond27.for.cond.cleanup30_crit_edge.us.us ] %b.075.us.us = phi ptr [ %call, %for.body.us.us.preheader ], [ %a.077.us.us, %for.cond27.for.cond.cleanup30_crit_edge.us.us ] call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) %invariant.gep.us.us = getelementptr inbounds i8, ptr %a.077.us.us, i64 %indvars.iv127 br i1 %2, label %for.body17.us.us.preheader.unr-lcssa, label %for.body6.us.us for.body31.us.us: ; preds = %for.body17.us.us, %for.body31.us.us %indvars.iv124 = phi i64 [ %indvars.iv.next125, %for.body31.us.us ], [ %1, %for.body17.us.us ] %indvars.iv.next125 = add nsw i64 %indvars.iv124, -1 %idxprom32.us.us = and i64 %indvars.iv.next125, 4294967295 %3 = mul nuw nsw i64 %idxprom32.us.us, %0 %arrayidx33.us.us = getelementptr inbounds i8, ptr %a.077.us.us, i64 %3 %arrayidx35.us.us = getelementptr inbounds i8, ptr %arrayidx33.us.us, i64 %indvars.iv127 %4 = load i8, ptr %arrayidx35.us.us, align 1, !tbaa !9 %idxprom36.us.us = sext i8 %4 to i64 %arrayidx37.us.us = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %idxprom36.us.us %5 = load i32, ptr %arrayidx37.us.us, align 4, !tbaa !5 %dec.us.us = add nsw i32 %5, -1 store i32 %dec.us.us, ptr %arrayidx37.us.us, align 4, !tbaa !5 %idxprom38.us.us = sext i32 %dec.us.us to i64 %6 = mul nsw i64 %idxprom38.us.us, %0 %arrayidx39.us.us = getelementptr inbounds i8, ptr %b.075.us.us, i64 %6 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %arrayidx39.us.us, ptr align 1 %arrayidx33.us.us, i64 %conv42, i1 false) %cmp28.us.us = icmp sgt i64 %indvars.iv124, 1 br i1 %cmp28.us.us, label %for.body31.us.us, label %for.cond27.for.cond.cleanup30_crit_edge.us.us, !llvm.loop !26 for.body17.us.us: ; preds = %for.body17.us.us, %for.body17.us.us.preheader %7 = phi i32 [ %.pre, %for.body17.us.us.preheader ], [ %add.us.us.4, %for.body17.us.us ] %indvars.iv119 = phi i64 [ 1, %for.body17.us.us.preheader ], [ %indvars.iv.next120.4, %for.body17.us.us ] %arrayidx21.us.us = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv119 %8 = load i32, ptr %arrayidx21.us.us, align 4, !tbaa !5 %add.us.us = add nsw i32 %8, %7 store i32 %add.us.us, ptr %arrayidx21.us.us, align 4, !tbaa !5 %indvars.iv.next120 = add nuw nsw i64 %indvars.iv119, 1 %arrayidx21.us.us.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next120 %9 = load i32, ptr %arrayidx21.us.us.1, align 4, !tbaa !5 %add.us.us.1 = add nsw i32 %9, %add.us.us store i32 %add.us.us.1, ptr %arrayidx21.us.us.1, align 4, !tbaa !5 %indvars.iv.next120.1 = add nuw nsw i64 %indvars.iv119, 2 %arrayidx21.us.us.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next120.1 %10 = load i32, ptr %arrayidx21.us.us.2, align 4, !tbaa !5 %add.us.us.2 = add nsw i32 %10, %add.us.us.1 store i32 %add.us.us.2, ptr %arrayidx21.us.us.2, align 4, !tbaa !5 %indvars.iv.next120.2 = add nuw nsw i64 %indvars.iv119, 3 %arrayidx21.us.us.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next120.2 %11 = load i32, ptr %arrayidx21.us.us.3, align 4, !tbaa !5 %add.us.us.3 = add nsw i32 %11, %add.us.us.2 store i32 %add.us.us.3, ptr %arrayidx21.us.us.3, align 4, !tbaa !5 %indvars.iv.next120.3 = add nuw nsw i64 %indvars.iv119, 4 %arrayidx21.us.us.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next120.3 %12 = load i32, ptr %arrayidx21.us.us.4, align 4, !tbaa !5 %add.us.us.4 = add nsw i32 %12, %add.us.us.3 store i32 %add.us.us.4, ptr %arrayidx21.us.us.4, align 4, !tbaa !5 %indvars.iv.next120.4 = add nuw nsw i64 %indvars.iv119, 5 %exitcond123.not.4 = icmp eq i64 %indvars.iv.next120.4, 256 br i1 %exitcond123.not.4, label %for.body31.us.us, label %for.body17.us.us, !llvm.loop !27 for.body6.us.us: ; preds = %for.body.us.us, %for.body6.us.us %indvars.iv115 = phi i64 [ %indvars.iv.next116.1, %for.body6.us.us ], [ 0, %for.body.us.us ] %niter = phi i64 [ %niter.next.1, %for.body6.us.us ], [ 0, %for.body.us.us ] %13 = mul nuw nsw i64 %indvars.iv115, %0 %gep.us.us = getelementptr inbounds i8, ptr %invariant.gep.us.us, i64 %13 %14 = load i8, ptr %gep.us.us, align 1, !tbaa !9 %idxprom9.us.us = sext i8 %14 to i64 %arrayidx10.us.us = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %idxprom9.us.us %15 = load i32, ptr %arrayidx10.us.us, align 4, !tbaa !5 %inc.us.us = add nsw i32 %15, 1 store i32 %inc.us.us, ptr %arrayidx10.us.us, align 4, !tbaa !5 %indvars.iv.next116 = or i64 %indvars.iv115, 1 %16 = mul nuw nsw i64 %indvars.iv.next116, %0 %gep.us.us.1 = getelementptr inbounds i8, ptr %invariant.gep.us.us, i64 %16 %17 = load i8, ptr %gep.us.us.1, align 1, !tbaa !9 %idxprom9.us.us.1 = sext i8 %17 to i64 %arrayidx10.us.us.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %idxprom9.us.us.1 %18 = load i32, ptr %arrayidx10.us.us.1, align 4, !tbaa !5 %inc.us.us.1 = add nsw i32 %18, 1 store i32 %inc.us.us.1, ptr %arrayidx10.us.us.1, align 4, !tbaa !5 %indvars.iv.next116.1 = add nuw nsw i64 %indvars.iv115, 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.body17.us.us.preheader.unr-lcssa, label %for.body6.us.us, !llvm.loop !28 for.body17.us.us.preheader.unr-lcssa: ; preds = %for.body6.us.us, %for.body.us.us %indvars.iv115.unr = phi i64 [ 0, %for.body.us.us ], [ %indvars.iv.next116.1, %for.body6.us.us ] br i1 %lcmp.mod.not, label %for.body17.us.us.preheader, label %for.body6.us.us.epil for.body6.us.us.epil: ; preds = %for.body17.us.us.preheader.unr-lcssa %19 = mul nuw nsw i64 %indvars.iv115.unr, %0 %gep.us.us.epil = getelementptr inbounds i8, ptr %invariant.gep.us.us, i64 %19 %20 = load i8, ptr %gep.us.us.epil, align 1, !tbaa !9 %idxprom9.us.us.epil = sext i8 %20 to i64 %arrayidx10.us.us.epil = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %idxprom9.us.us.epil %21 = load i32, ptr %arrayidx10.us.us.epil, align 4, !tbaa !5 %inc.us.us.epil = add nsw i32 %21, 1 store i32 %inc.us.us.epil, ptr %arrayidx10.us.us.epil, align 4, !tbaa !5 br label %for.body17.us.us.preheader for.body17.us.us.preheader: ; preds = %for.body17.us.us.preheader.unr-lcssa, %for.body6.us.us.epil %.pre = load i32, ptr %c, align 16, !tbaa !5 br label %for.body17.us.us for.cond27.for.cond.cleanup30_crit_edge.us.us: ; preds = %for.body31.us.us %indvars.iv.next128 = add nsw i64 %indvars.iv127, -1 %cmp.us.us.not = icmp eq i64 %indvars.iv127, 0 br i1 %cmp.us.us.not, label %for.cond.cleanup, label %for.body.us.us, !llvm.loop !29 for.cond.cleanup: ; preds = %for.body17.9, %for.cond27.for.cond.cleanup30_crit_edge.us.us %.us-phi = phi ptr [ %a.077.us.us, %for.cond27.for.cond.cleanup30_crit_edge.us.us ], [ %call, %for.body17.9 ] tail call void @free(ptr noundef %.us-phi) #10 call void @llvm.lifetime.end.p0(i64 1024, ptr nonnull %c) #10 ret void for.cond27.preheader: ; preds = %for.body17 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.1 for.body17.1: ; preds = %for.body17.1, %for.cond27.preheader %22 = phi i32 [ 0, %for.cond27.preheader ], [ %add.1.4, %for.body17.1 ] %indvars.iv.1 = phi i64 [ 1, %for.cond27.preheader ], [ %indvars.iv.next.1.4, %for.body17.1 ] %arrayidx21.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.1 %23 = load i32, ptr %arrayidx21.1, align 4, !tbaa !5 %add.1 = add nsw i32 %23, %22 store i32 %add.1, ptr %arrayidx21.1, align 4, !tbaa !5 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %arrayidx21.1.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.1 %24 = load i32, ptr %arrayidx21.1.1, align 4, !tbaa !5 %add.1.1 = add nsw i32 %24, %add.1 store i32 %add.1.1, ptr %arrayidx21.1.1, align 4, !tbaa !5 %indvars.iv.next.1.1 = add nuw nsw i64 %indvars.iv.1, 2 %arrayidx21.1.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.1.1 %25 = load i32, ptr %arrayidx21.1.2, align 4, !tbaa !5 %add.1.2 = add nsw i32 %25, %add.1.1 store i32 %add.1.2, ptr %arrayidx21.1.2, align 4, !tbaa !5 %indvars.iv.next.1.2 = add nuw nsw i64 %indvars.iv.1, 3 %arrayidx21.1.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.1.2 %26 = load i32, ptr %arrayidx21.1.3, align 4, !tbaa !5 %add.1.3 = add nsw i32 %26, %add.1.2 store i32 %add.1.3, ptr %arrayidx21.1.3, align 4, !tbaa !5 %indvars.iv.next.1.3 = add nuw nsw i64 %indvars.iv.1, 4 %arrayidx21.1.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.1.3 %27 = load i32, ptr %arrayidx21.1.4, align 4, !tbaa !5 %add.1.4 = add nsw i32 %27, %add.1.3 store i32 %add.1.4, ptr %arrayidx21.1.4, align 4, !tbaa !5 %indvars.iv.next.1.4 = add nuw nsw i64 %indvars.iv.1, 5 %exitcond.1.not.4 = icmp eq i64 %indvars.iv.next.1.4, 256 br i1 %exitcond.1.not.4, label %for.cond27.preheader.1, label %for.body17.1, !llvm.loop !27 for.cond27.preheader.1: ; preds = %for.body17.1 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.2 for.body17.2: ; preds = %for.body17.2, %for.cond27.preheader.1 %28 = phi i32 [ 0, %for.cond27.preheader.1 ], [ %add.2.4, %for.body17.2 ] %indvars.iv.2 = phi i64 [ 1, %for.cond27.preheader.1 ], [ %indvars.iv.next.2.4, %for.body17.2 ] %arrayidx21.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.2 %29 = load i32, ptr %arrayidx21.2, align 4, !tbaa !5 %add.2 = add nsw i32 %29, %28 store i32 %add.2, ptr %arrayidx21.2, align 4, !tbaa !5 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv.2, 1 %arrayidx21.2.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.2 %30 = load i32, ptr %arrayidx21.2.1, align 4, !tbaa !5 %add.2.1 = add nsw i32 %30, %add.2 store i32 %add.2.1, ptr %arrayidx21.2.1, align 4, !tbaa !5 %indvars.iv.next.2.1 = add nuw nsw i64 %indvars.iv.2, 2 %arrayidx21.2.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.2.1 %31 = load i32, ptr %arrayidx21.2.2, align 4, !tbaa !5 %add.2.2 = add nsw i32 %31, %add.2.1 store i32 %add.2.2, ptr %arrayidx21.2.2, align 4, !tbaa !5 %indvars.iv.next.2.2 = add nuw nsw i64 %indvars.iv.2, 3 %arrayidx21.2.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.2.2 %32 = load i32, ptr %arrayidx21.2.3, align 4, !tbaa !5 %add.2.3 = add nsw i32 %32, %add.2.2 store i32 %add.2.3, ptr %arrayidx21.2.3, align 4, !tbaa !5 %indvars.iv.next.2.3 = add nuw nsw i64 %indvars.iv.2, 4 %arrayidx21.2.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.2.3 %33 = load i32, ptr %arrayidx21.2.4, align 4, !tbaa !5 %add.2.4 = add nsw i32 %33, %add.2.3 store i32 %add.2.4, ptr %arrayidx21.2.4, align 4, !tbaa !5 %indvars.iv.next.2.4 = add nuw nsw i64 %indvars.iv.2, 5 %exitcond.2.not.4 = icmp eq i64 %indvars.iv.next.2.4, 256 br i1 %exitcond.2.not.4, label %for.cond27.preheader.2, label %for.body17.2, !llvm.loop !27 for.cond27.preheader.2: ; preds = %for.body17.2 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.3 for.body17.3: ; preds = %for.body17.3, %for.cond27.preheader.2 %34 = phi i32 [ 0, %for.cond27.preheader.2 ], [ %add.3.4, %for.body17.3 ] %indvars.iv.3 = phi i64 [ 1, %for.cond27.preheader.2 ], [ %indvars.iv.next.3.4, %for.body17.3 ] %arrayidx21.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.3 %35 = load i32, ptr %arrayidx21.3, align 4, !tbaa !5 %add.3 = add nsw i32 %35, %34 store i32 %add.3, ptr %arrayidx21.3, align 4, !tbaa !5 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv.3, 1 %arrayidx21.3.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.3 %36 = load i32, ptr %arrayidx21.3.1, align 4, !tbaa !5 %add.3.1 = add nsw i32 %36, %add.3 store i32 %add.3.1, ptr %arrayidx21.3.1, align 4, !tbaa !5 %indvars.iv.next.3.1 = add nuw nsw i64 %indvars.iv.3, 2 %arrayidx21.3.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.3.1 %37 = load i32, ptr %arrayidx21.3.2, align 4, !tbaa !5 %add.3.2 = add nsw i32 %37, %add.3.1 store i32 %add.3.2, ptr %arrayidx21.3.2, align 4, !tbaa !5 %indvars.iv.next.3.2 = add nuw nsw i64 %indvars.iv.3, 3 %arrayidx21.3.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.3.2 %38 = load i32, ptr %arrayidx21.3.3, align 4, !tbaa !5 %add.3.3 = add nsw i32 %38, %add.3.2 store i32 %add.3.3, ptr %arrayidx21.3.3, align 4, !tbaa !5 %indvars.iv.next.3.3 = add nuw nsw i64 %indvars.iv.3, 4 %arrayidx21.3.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.3.3 %39 = load i32, ptr %arrayidx21.3.4, align 4, !tbaa !5 %add.3.4 = add nsw i32 %39, %add.3.3 store i32 %add.3.4, ptr %arrayidx21.3.4, align 4, !tbaa !5 %indvars.iv.next.3.4 = add nuw nsw i64 %indvars.iv.3, 5 %exitcond.3.not.4 = icmp eq i64 %indvars.iv.next.3.4, 256 br i1 %exitcond.3.not.4, label %for.cond27.preheader.3, label %for.body17.3, !llvm.loop !27 for.cond27.preheader.3: ; preds = %for.body17.3 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.4 for.body17.4: ; preds = %for.body17.4, %for.cond27.preheader.3 %40 = phi i32 [ 0, %for.cond27.preheader.3 ], [ %add.4.4, %for.body17.4 ] %indvars.iv.4 = phi i64 [ 1, %for.cond27.preheader.3 ], [ %indvars.iv.next.4.4, %for.body17.4 ] %arrayidx21.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.4 %41 = load i32, ptr %arrayidx21.4, align 4, !tbaa !5 %add.4 = add nsw i32 %41, %40 store i32 %add.4, ptr %arrayidx21.4, align 4, !tbaa !5 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv.4, 1 %arrayidx21.4.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.4 %42 = load i32, ptr %arrayidx21.4.1, align 4, !tbaa !5 %add.4.1 = add nsw i32 %42, %add.4 store i32 %add.4.1, ptr %arrayidx21.4.1, align 4, !tbaa !5 %indvars.iv.next.4.1 = add nuw nsw i64 %indvars.iv.4, 2 %arrayidx21.4.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.4.1 %43 = load i32, ptr %arrayidx21.4.2, align 4, !tbaa !5 %add.4.2 = add nsw i32 %43, %add.4.1 store i32 %add.4.2, ptr %arrayidx21.4.2, align 4, !tbaa !5 %indvars.iv.next.4.2 = add nuw nsw i64 %indvars.iv.4, 3 %arrayidx21.4.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.4.2 %44 = load i32, ptr %arrayidx21.4.3, align 4, !tbaa !5 %add.4.3 = add nsw i32 %44, %add.4.2 store i32 %add.4.3, ptr %arrayidx21.4.3, align 4, !tbaa !5 %indvars.iv.next.4.3 = add nuw nsw i64 %indvars.iv.4, 4 %arrayidx21.4.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.4.3 %45 = load i32, ptr %arrayidx21.4.4, align 4, !tbaa !5 %add.4.4 = add nsw i32 %45, %add.4.3 store i32 %add.4.4, ptr %arrayidx21.4.4, align 4, !tbaa !5 %indvars.iv.next.4.4 = add nuw nsw i64 %indvars.iv.4, 5 %exitcond.4.not.4 = icmp eq i64 %indvars.iv.next.4.4, 256 br i1 %exitcond.4.not.4, label %for.cond27.preheader.4, label %for.body17.4, !llvm.loop !27 for.cond27.preheader.4: ; preds = %for.body17.4 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.5 for.body17.5: ; preds = %for.body17.5, %for.cond27.preheader.4 %46 = phi i32 [ 0, %for.cond27.preheader.4 ], [ %add.5.4, %for.body17.5 ] %indvars.iv.5 = phi i64 [ 1, %for.cond27.preheader.4 ], [ %indvars.iv.next.5.4, %for.body17.5 ] %arrayidx21.5 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.5 %47 = load i32, ptr %arrayidx21.5, align 4, !tbaa !5 %add.5 = add nsw i32 %47, %46 store i32 %add.5, ptr %arrayidx21.5, align 4, !tbaa !5 %indvars.iv.next.5 = add nuw nsw i64 %indvars.iv.5, 1 %arrayidx21.5.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.5 %48 = load i32, ptr %arrayidx21.5.1, align 4, !tbaa !5 %add.5.1 = add nsw i32 %48, %add.5 store i32 %add.5.1, ptr %arrayidx21.5.1, align 4, !tbaa !5 %indvars.iv.next.5.1 = add nuw nsw i64 %indvars.iv.5, 2 %arrayidx21.5.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.5.1 %49 = load i32, ptr %arrayidx21.5.2, align 4, !tbaa !5 %add.5.2 = add nsw i32 %49, %add.5.1 store i32 %add.5.2, ptr %arrayidx21.5.2, align 4, !tbaa !5 %indvars.iv.next.5.2 = add nuw nsw i64 %indvars.iv.5, 3 %arrayidx21.5.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.5.2 %50 = load i32, ptr %arrayidx21.5.3, align 4, !tbaa !5 %add.5.3 = add nsw i32 %50, %add.5.2 store i32 %add.5.3, ptr %arrayidx21.5.3, align 4, !tbaa !5 %indvars.iv.next.5.3 = add nuw nsw i64 %indvars.iv.5, 4 %arrayidx21.5.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.5.3 %51 = load i32, ptr %arrayidx21.5.4, align 4, !tbaa !5 %add.5.4 = add nsw i32 %51, %add.5.3 store i32 %add.5.4, ptr %arrayidx21.5.4, align 4, !tbaa !5 %indvars.iv.next.5.4 = add nuw nsw i64 %indvars.iv.5, 5 %exitcond.5.not.4 = icmp eq i64 %indvars.iv.next.5.4, 256 br i1 %exitcond.5.not.4, label %for.cond27.preheader.5, label %for.body17.5, !llvm.loop !27 for.cond27.preheader.5: ; preds = %for.body17.5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.6 for.body17.6: ; preds = %for.body17.6, %for.cond27.preheader.5 %52 = phi i32 [ 0, %for.cond27.preheader.5 ], [ %add.6.4, %for.body17.6 ] %indvars.iv.6 = phi i64 [ 1, %for.cond27.preheader.5 ], [ %indvars.iv.next.6.4, %for.body17.6 ] %arrayidx21.6 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.6 %53 = load i32, ptr %arrayidx21.6, align 4, !tbaa !5 %add.6 = add nsw i32 %53, %52 store i32 %add.6, ptr %arrayidx21.6, align 4, !tbaa !5 %indvars.iv.next.6 = add nuw nsw i64 %indvars.iv.6, 1 %arrayidx21.6.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.6 %54 = load i32, ptr %arrayidx21.6.1, align 4, !tbaa !5 %add.6.1 = add nsw i32 %54, %add.6 store i32 %add.6.1, ptr %arrayidx21.6.1, align 4, !tbaa !5 %indvars.iv.next.6.1 = add nuw nsw i64 %indvars.iv.6, 2 %arrayidx21.6.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.6.1 %55 = load i32, ptr %arrayidx21.6.2, align 4, !tbaa !5 %add.6.2 = add nsw i32 %55, %add.6.1 store i32 %add.6.2, ptr %arrayidx21.6.2, align 4, !tbaa !5 %indvars.iv.next.6.2 = add nuw nsw i64 %indvars.iv.6, 3 %arrayidx21.6.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.6.2 %56 = load i32, ptr %arrayidx21.6.3, align 4, !tbaa !5 %add.6.3 = add nsw i32 %56, %add.6.2 store i32 %add.6.3, ptr %arrayidx21.6.3, align 4, !tbaa !5 %indvars.iv.next.6.3 = add nuw nsw i64 %indvars.iv.6, 4 %arrayidx21.6.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.6.3 %57 = load i32, ptr %arrayidx21.6.4, align 4, !tbaa !5 %add.6.4 = add nsw i32 %57, %add.6.3 store i32 %add.6.4, ptr %arrayidx21.6.4, align 4, !tbaa !5 %indvars.iv.next.6.4 = add nuw nsw i64 %indvars.iv.6, 5 %exitcond.6.not.4 = icmp eq i64 %indvars.iv.next.6.4, 256 br i1 %exitcond.6.not.4, label %for.cond27.preheader.6, label %for.body17.6, !llvm.loop !27 for.cond27.preheader.6: ; preds = %for.body17.6 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.7 for.body17.7: ; preds = %for.body17.7, %for.cond27.preheader.6 %58 = phi i32 [ 0, %for.cond27.preheader.6 ], [ %add.7.4, %for.body17.7 ] %indvars.iv.7 = phi i64 [ 1, %for.cond27.preheader.6 ], [ %indvars.iv.next.7.4, %for.body17.7 ] %arrayidx21.7 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.7 %59 = load i32, ptr %arrayidx21.7, align 4, !tbaa !5 %add.7 = add nsw i32 %59, %58 store i32 %add.7, ptr %arrayidx21.7, align 4, !tbaa !5 %indvars.iv.next.7 = add nuw nsw i64 %indvars.iv.7, 1 %arrayidx21.7.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.7 %60 = load i32, ptr %arrayidx21.7.1, align 4, !tbaa !5 %add.7.1 = add nsw i32 %60, %add.7 store i32 %add.7.1, ptr %arrayidx21.7.1, align 4, !tbaa !5 %indvars.iv.next.7.1 = add nuw nsw i64 %indvars.iv.7, 2 %arrayidx21.7.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.7.1 %61 = load i32, ptr %arrayidx21.7.2, align 4, !tbaa !5 %add.7.2 = add nsw i32 %61, %add.7.1 store i32 %add.7.2, ptr %arrayidx21.7.2, align 4, !tbaa !5 %indvars.iv.next.7.2 = add nuw nsw i64 %indvars.iv.7, 3 %arrayidx21.7.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.7.2 %62 = load i32, ptr %arrayidx21.7.3, align 4, !tbaa !5 %add.7.3 = add nsw i32 %62, %add.7.2 store i32 %add.7.3, ptr %arrayidx21.7.3, align 4, !tbaa !5 %indvars.iv.next.7.3 = add nuw nsw i64 %indvars.iv.7, 4 %arrayidx21.7.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.7.3 %63 = load i32, ptr %arrayidx21.7.4, align 4, !tbaa !5 %add.7.4 = add nsw i32 %63, %add.7.3 store i32 %add.7.4, ptr %arrayidx21.7.4, align 4, !tbaa !5 %indvars.iv.next.7.4 = add nuw nsw i64 %indvars.iv.7, 5 %exitcond.7.not.4 = icmp eq i64 %indvars.iv.next.7.4, 256 br i1 %exitcond.7.not.4, label %for.cond27.preheader.7, label %for.body17.7, !llvm.loop !27 for.cond27.preheader.7: ; preds = %for.body17.7 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.8 for.body17.8: ; preds = %for.body17.8, %for.cond27.preheader.7 %64 = phi i32 [ 0, %for.cond27.preheader.7 ], [ %add.8.4, %for.body17.8 ] %indvars.iv.8 = phi i64 [ 1, %for.cond27.preheader.7 ], [ %indvars.iv.next.8.4, %for.body17.8 ] %arrayidx21.8 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.8 %65 = load i32, ptr %arrayidx21.8, align 4, !tbaa !5 %add.8 = add nsw i32 %65, %64 store i32 %add.8, ptr %arrayidx21.8, align 4, !tbaa !5 %indvars.iv.next.8 = add nuw nsw i64 %indvars.iv.8, 1 %arrayidx21.8.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.8 %66 = load i32, ptr %arrayidx21.8.1, align 4, !tbaa !5 %add.8.1 = add nsw i32 %66, %add.8 store i32 %add.8.1, ptr %arrayidx21.8.1, align 4, !tbaa !5 %indvars.iv.next.8.1 = add nuw nsw i64 %indvars.iv.8, 2 %arrayidx21.8.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.8.1 %67 = load i32, ptr %arrayidx21.8.2, align 4, !tbaa !5 %add.8.2 = add nsw i32 %67, %add.8.1 store i32 %add.8.2, ptr %arrayidx21.8.2, align 4, !tbaa !5 %indvars.iv.next.8.2 = add nuw nsw i64 %indvars.iv.8, 3 %arrayidx21.8.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.8.2 %68 = load i32, ptr %arrayidx21.8.3, align 4, !tbaa !5 %add.8.3 = add nsw i32 %68, %add.8.2 store i32 %add.8.3, ptr %arrayidx21.8.3, align 4, !tbaa !5 %indvars.iv.next.8.3 = add nuw nsw i64 %indvars.iv.8, 4 %arrayidx21.8.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.8.3 %69 = load i32, ptr %arrayidx21.8.4, align 4, !tbaa !5 %add.8.4 = add nsw i32 %69, %add.8.3 store i32 %add.8.4, ptr %arrayidx21.8.4, align 4, !tbaa !5 %indvars.iv.next.8.4 = add nuw nsw i64 %indvars.iv.8, 5 %exitcond.8.not.4 = icmp eq i64 %indvars.iv.next.8.4, 256 br i1 %exitcond.8.not.4, label %for.cond27.preheader.8, label %for.body17.8, !llvm.loop !27 for.cond27.preheader.8: ; preds = %for.body17.8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(1024) %c, i8 0, i64 1024, i1 false) br label %for.body17.9 for.body17.9: ; preds = %for.body17.9, %for.cond27.preheader.8 %70 = phi i32 [ 0, %for.cond27.preheader.8 ], [ %add.9.4, %for.body17.9 ] %indvars.iv.9 = phi i64 [ 1, %for.cond27.preheader.8 ], [ %indvars.iv.next.9.4, %for.body17.9 ] %arrayidx21.9 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.9 %71 = load i32, ptr %arrayidx21.9, align 4, !tbaa !5 %add.9 = add nsw i32 %71, %70 store i32 %add.9, ptr %arrayidx21.9, align 4, !tbaa !5 %indvars.iv.next.9 = add nuw nsw i64 %indvars.iv.9, 1 %arrayidx21.9.1 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.9 %72 = load i32, ptr %arrayidx21.9.1, align 4, !tbaa !5 %add.9.1 = add nsw i32 %72, %add.9 store i32 %add.9.1, ptr %arrayidx21.9.1, align 4, !tbaa !5 %indvars.iv.next.9.1 = add nuw nsw i64 %indvars.iv.9, 2 %arrayidx21.9.2 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.9.1 %73 = load i32, ptr %arrayidx21.9.2, align 4, !tbaa !5 %add.9.2 = add nsw i32 %73, %add.9.1 store i32 %add.9.2, ptr %arrayidx21.9.2, align 4, !tbaa !5 %indvars.iv.next.9.2 = add nuw nsw i64 %indvars.iv.9, 3 %arrayidx21.9.3 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.9.2 %74 = load i32, ptr %arrayidx21.9.3, align 4, !tbaa !5 %add.9.3 = add nsw i32 %74, %add.9.2 store i32 %add.9.3, ptr %arrayidx21.9.3, align 4, !tbaa !5 %indvars.iv.next.9.3 = add nuw nsw i64 %indvars.iv.9, 4 %arrayidx21.9.4 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.9.3 %75 = load i32, ptr %arrayidx21.9.4, align 4, !tbaa !5 %add.9.4 = add nsw i32 %75, %add.9.3 store i32 %add.9.4, ptr %arrayidx21.9.4, align 4, !tbaa !5 %indvars.iv.next.9.4 = add nuw nsw i64 %indvars.iv.9, 5 %exitcond.9.not.4 = icmp eq i64 %indvars.iv.next.9.4, 256 br i1 %exitcond.9.not.4, label %for.cond.cleanup, label %for.body17.9, !llvm.loop !27 for.body17: ; preds = %for.body17, %for.body.preheader %76 = phi i32 [ 0, %for.body.preheader ], [ %add.4151, %for.body17 ] %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next.4152, %for.body17 ] %arrayidx21 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv %77 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %add = add nsw i32 %77, %76 store i32 %add, ptr %arrayidx21, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %arrayidx21.1135 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next %78 = load i32, ptr %arrayidx21.1135, align 4, !tbaa !5 %add.1136 = add nsw i32 %78, %add store i32 %add.1136, ptr %arrayidx21.1135, align 4, !tbaa !5 %indvars.iv.next.1137 = add nuw nsw i64 %indvars.iv, 2 %arrayidx21.2140 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.1137 %79 = load i32, ptr %arrayidx21.2140, align 4, !tbaa !5 %add.2141 = add nsw i32 %79, %add.1136 store i32 %add.2141, ptr %arrayidx21.2140, align 4, !tbaa !5 %indvars.iv.next.2142 = add nuw nsw i64 %indvars.iv, 3 %arrayidx21.3145 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.2142 %80 = load i32, ptr %arrayidx21.3145, align 4, !tbaa !5 %add.3146 = add nsw i32 %80, %add.2141 store i32 %add.3146, ptr %arrayidx21.3145, align 4, !tbaa !5 %indvars.iv.next.3147 = add nuw nsw i64 %indvars.iv, 4 %arrayidx21.4150 = getelementptr inbounds [256 x i32], ptr %c, i64 0, i64 %indvars.iv.next.3147 %81 = load i32, ptr %arrayidx21.4150, align 4, !tbaa !5 %add.4151 = add nsw i32 %81, %add.3146 store i32 %add.4151, ptr %arrayidx21.4150, align 4, !tbaa !5 %indvars.iv.next.4152 = add nuw nsw i64 %indvars.iv, 5 %exitcond.not.4 = icmp eq i64 %indvars.iv.next.4152, 256 br i1 %exitcond.not.4, label %for.cond27.preheader, label %for.body17, !llvm.loop !27 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #7 ; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #8 declare i32 @__overflow(ptr noundef, i32 noundef) local_unnamed_addr #9 attributes #0 = { nofree norecurse nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #7 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) } attributes #8 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { "no-trapping-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 = { nounwind } attributes #11 = { nounwind willreturn memory(read) } attributes #12 = { nounwind allocsize(0) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"} !12 = distinct !{!12, !11} !13 = !{!14, !14, i64 0} !14 = !{!"any pointer", !7, i64 0} !15 = !{!16, !14, i64 40} !16 = !{!"_IO_FILE", !6, i64 0, !14, i64 8, !14, i64 16, !14, i64 24, !14, i64 32, !14, i64 40, !14, i64 48, !14, i64 56, !14, i64 64, !14, i64 72, !14, i64 80, !14, i64 88, !14, i64 96, !14, i64 104, !6, i64 112, !6, i64 116, !17, i64 120, !18, i64 128, !7, i64 130, !7, i64 131, !14, i64 136, !17, i64 144, !14, i64 152, !14, i64 160, !14, i64 168, !14, i64 176, !17, i64 184, !6, i64 192, !7, i64 196} !17 = !{!"long", !7, i64 0} !18 = !{!"short", !7, i64 0} !19 = !{!16, !14, i64 48} !20 = !{!"branch_weights", i32 2000, i32 1} !21 = distinct !{!21, !11} !22 = distinct !{!22, !11} !23 = distinct !{!23, !11} !24 = distinct !{!24, !11} !25 = distinct !{!25, !11} !26 = distinct !{!26, !11} !27 = distinct !{!27, !11} !28 = distinct !{!28, !11} !29 = distinct !{!29, !11}
#include <stdio.h> #include <stdlib.h> #include <string.h> int compare(const void* a, const void* b) { return (strcmp((char*)a, (char*)b)); } int main() { int N, ans = 1; char S[200000][11]; scanf("%d", &N); for (int i = 0; i < N; i++) scanf("%s", S[i]); qsort((void*)S, N, sizeof(S[0]), compare); for (int i = 0; i < N - 1; i++) if(strcmp(S[i], S[i + 1]) != 0) ans++; printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273179/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273179/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @compare(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %a, ptr noundef nonnull dereferenceable(1) %b) #6 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %N = alloca i32, align 4 %S = alloca [200000 x [11 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #7 call void @llvm.lifetime.start.p0(i64 2200000, ptr nonnull %S) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp29 = icmp sgt i32 %0, 0 br i1 %cmp29, label %for.body, label %entry.for.cond.cleanup_crit_edge entry.for.cond.cleanup_crit_edge: ; preds = %entry %.pre = sext i32 %0 to i64 br label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry.for.cond.cleanup_crit_edge %conv.pre-phi = phi i64 [ %.pre, %entry.for.cond.cleanup_crit_edge ], [ %3, %for.body ] call void @qsort(ptr noundef nonnull %S, i64 noundef %conv.pre-phi, i64 noundef 11, ptr noundef nonnull @compare) #7 %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp531 = icmp sgt i32 %1, 1 br i1 %cmp531, label %for.body8.preheader, label %for.cond.cleanup7 for.body8.preheader: ; preds = %for.cond.cleanup %sub = add nsw i32 %1, -1 %wide.trip.count = zext i32 %sub to i64 br label %for.body8 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [200000 x [11 x i8]], ptr %S, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %N, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !9 for.cond.cleanup7: ; preds = %for.body8, %for.cond.cleanup %ans.0.lcssa = phi i32 [ 1, %for.cond.cleanup ], [ %spec.select, %for.body8 ] %call22 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 2200000, ptr nonnull %S) #7 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #7 ret i32 0 for.body8: ; preds = %for.body8.preheader, %for.body8 %indvars.iv37 = phi i64 [ 0, %for.body8.preheader ], [ %indvars.iv.next38, %for.body8 ] %ans.032 = phi i32 [ 1, %for.body8.preheader ], [ %spec.select, %for.body8 ] %arrayidx10 = getelementptr inbounds [200000 x [11 x i8]], ptr %S, i64 0, i64 %indvars.iv37 %indvars.iv.next38 = add nuw nsw i64 %indvars.iv37, 1 %arrayidx13 = getelementptr inbounds [200000 x [11 x i8]], ptr %S, i64 0, i64 %indvars.iv.next38 %call15 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx10, ptr noundef nonnull dereferenceable(1) %arrayidx13) #6 %cmp16.not = icmp ne i32 %call15, 0 %inc18 = zext i1 %cmp16.not to i32 %spec.select = add nuw nsw i32 %ans.032, %inc18 %exitcond.not = icmp eq i64 %indvars.iv.next38, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup7, label %for.body8, !llvm.loop !11 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 attributes #0 = { mustprogress nofree nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nounwind 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #define MOD1 1000000007 #define MOD2 998244353 #define LIMIT1 200002 #define LIMIT2 500002 typedef long long ll; typedef long double ld; #define rep(i,n) for(i=0;i<n;i++) #define max(a,b) ((a)>(b) ? (a) : (b)) #define min(a,b) ((a)<(b) ? (a) : (b)) #define zt(a,b) (max((a),(b))-min((a),(b))) ll gcd(ll a,ll b){return b?gcd(b,a%b):a;} ll nPr(int n,int r){ll i,result=1;rep(i,r){result*=(ll)(n-i);}return result;} ll nCr(int n,int r){ll i,result=1; rep(i,min(r,n-r)){result*=(ll)(n-i);result/=(ll)(i+1);}return result;} #define fact(n) nPr((int)(n),(int)(n)) #define nHr(n,r) nCr((int)((n)+(r)+1),(int)(r)) #define sankaku(x) (((x)*((x)+1))/2) int dx[8]={1,0,-1,0,1,-1,-1,1}; int dy[8]={0,1,0,-1,1,1,-1,-1}; int upint(const void *a, const void *b) { return *(int *)a < *(int *)b ? -1 : *(int *)a > *(int *)b ? 1 : 0; } int downint(const void *a, const void *b) { return *(int *)a < *(int *)b ? 1 : *(int *)a > *(int *)b ? -1 : 0; } int upchar(const void* left, const void* right) {return strcmp((char *)left,(char *)right);} int downchar(const void* left, const void* right) {return strcmp((char *)right,(char *)left);} ll modpow(ll a, ll n, ll mod) { ll res = 1; while (n > 0) { if (n & 1) res = res * a % mod; a = a * a % mod; n >>= 1; } return res; } void initialize(){ } int main(void){ initialize(); ll n,m,i,j,k,result=1; char s[LIMIT1][11]; scanf("%lld",&n); rep(i,n) scanf("%s",s[i]); qsort(s,n,sizeof(s[0]),upchar); result=1; rep(i,n-1){ if(strcmp(s[i],s[i+1])!=0) result++; } printf("%lld",result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273221/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273221/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dx = dso_local local_unnamed_addr global [8 x i32] [i32 1, i32 0, i32 -1, i32 0, i32 1, i32 -1, i32 -1, i32 1], align 16 @dy = dso_local local_unnamed_addr global [8 x i32] [i32 0, i32 1, i32 0, i32 -1, i32 1, i32 1, i32 -1, i32 -1], align 16 @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @gcd(i64 noundef %a, i64 noundef %b) local_unnamed_addr #0 { entry: %tobool.not4 = icmp eq i64 %b, 0 br i1 %tobool.not4, label %cond.end, label %cond.true cond.true: ; preds = %entry, %cond.true %b.tr6 = phi i64 [ %rem, %cond.true ], [ %b, %entry ] %a.tr5 = phi i64 [ %b.tr6, %cond.true ], [ %a, %entry ] %rem = srem i64 %a.tr5, %b.tr6 %tobool.not = icmp eq i64 %rem, 0 br i1 %tobool.not, label %cond.end, label %cond.true cond.end: ; preds = %cond.true, %entry %a.tr.lcssa = phi i64 [ %a, %entry ], [ %b.tr6, %cond.true ] ret i64 %a.tr.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @nPr(i32 noundef %n, i32 noundef %r) local_unnamed_addr #0 { entry: %conv = sext i32 %r to i64 %cmp6 = icmp sgt i32 %r, 0 br i1 %cmp6, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %conv2 = sext i32 %n to i64 %xtraiter = and i64 %conv, 7 %0 = icmp ult i32 %r, 8 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 %conv, -8 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %result.08 = phi i64 [ 1, %for.body.lr.ph.new ], [ %mul.7, %for.body ] %i.07 = phi i64 [ 0, %for.body.lr.ph.new ], [ %inc.7, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.7, %for.body ] %sub = sub nsw i64 %conv2, %i.07 %mul = mul nsw i64 %result.08, %sub %inc.neg = xor i64 %i.07, -1 %sub.1 = add i64 %inc.neg, %conv2 %mul.1 = mul nsw i64 %mul, %sub.1 %inc.1 = or i64 %i.07, 2 %sub.2 = sub nsw i64 %conv2, %inc.1 %mul.2 = mul nsw i64 %mul.1, %sub.2 %inc.2 = or i64 %i.07, 3 %sub.3 = sub nsw i64 %conv2, %inc.2 %mul.3 = mul nsw i64 %mul.2, %sub.3 %inc.3 = or i64 %i.07, 4 %sub.4 = sub nsw i64 %conv2, %inc.3 %mul.4 = mul nsw i64 %mul.3, %sub.4 %inc.4 = or i64 %i.07, 5 %sub.5 = sub nsw i64 %conv2, %inc.4 %mul.5 = mul nsw i64 %mul.4, %sub.5 %inc.5 = or i64 %i.07, 6 %sub.6 = sub nsw i64 %conv2, %inc.5 %mul.6 = mul nsw i64 %mul.5, %sub.6 %inc.6 = or i64 %i.07, 7 %sub.7 = sub nsw i64 %conv2, %inc.6 %mul.7 = mul nsw i64 %mul.6, %sub.7 %inc.7 = add nuw nsw i64 %i.07, 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 !5 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.lr.ph %mul.lcssa.ph = phi i64 [ undef, %for.body.lr.ph ], [ %mul.7, %for.body ] %result.08.unr = phi i64 [ 1, %for.body.lr.ph ], [ %mul.7, %for.body ] %i.07.unr = phi i64 [ 0, %for.body.lr.ph ], [ %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 %result.08.epil = phi i64 [ %mul.epil, %for.body.epil ], [ %result.08.unr, %for.end.loopexit.unr-lcssa ] %i.07.epil = phi i64 [ %inc.epil, %for.body.epil ], [ %i.07.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %sub.epil = sub nsw i64 %conv2, %i.07.epil %mul.epil = mul nsw i64 %result.08.epil, %sub.epil %inc.epil = add nuw nsw i64 %i.07.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 !7 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %entry %result.0.lcssa = phi i64 [ 1, %entry ], [ %mul.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %mul.epil, %for.body.epil ] ret i64 %result.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 nosync nounwind memory(none) uwtable define dso_local i64 @nCr(i32 noundef %n, i32 noundef %r) local_unnamed_addr #2 { entry: %sub = sub nsw i32 %n, %r %cond = tail call i32 @llvm.smin.i32(i32 %sub, i32 %r) %conv = sext i32 %cond to i64 %cmp216 = icmp sgt i32 %cond, 0 br i1 %cmp216, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %entry %conv4 = sext i32 %n to i64 %xtraiter = and i64 %conv, 1 %0 = icmp eq i32 %cond, 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 %conv, -2 br label %for.body for.body: ; preds = %for.body, %for.body.lr.ph.new %result.018 = phi i64 [ 1, %for.body.lr.ph.new ], [ %div.1, %for.body ] %i.017 = phi i64 [ 0, %for.body.lr.ph.new ], [ %add.1, %for.body ] %niter = phi i64 [ 0, %for.body.lr.ph.new ], [ %niter.next.1, %for.body ] %sub5 = sub nsw i64 %conv4, %i.017 %mul = mul nsw i64 %result.018, %sub5 %add = or i64 %i.017, 1 %div = sdiv i64 %mul, %add %sub5.1 = sub nsw i64 %conv4, %add %mul.1 = mul nsw i64 %div, %sub5.1 %add.1 = add nuw nsw i64 %i.017, 2 %div.1 = sdiv i64 %mul.1, %add.1 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.end.loopexit.unr-lcssa, label %for.body, !llvm.loop !9 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 ] %result.018.unr = phi i64 [ 1, %for.body.lr.ph ], [ %div.1, %for.body ] %i.017.unr = phi i64 [ 0, %for.body.lr.ph ], [ %add.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 %sub5.epil = sub nsw i64 %conv4, %i.017.unr %mul.epil = mul nsw i64 %result.018.unr, %sub5.epil %add.epil = add nuw nsw i64 %i.017.unr, 1 %div.epil = sdiv i64 %mul.epil, %add.epil br label %for.end for.end: ; preds = %for.body.epil, %for.end.loopexit.unr-lcssa, %entry %result.0.lcssa = phi i64 [ 1, %entry ], [ %div.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %div.epil, %for.body.epil ] ret i64 %result.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @upint(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 { entry: %0 = load i32, ptr %a, align 4, !tbaa !10 %1 = load i32, ptr %b, align 4, !tbaa !10 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp sgt i32 %0, %1 %cond = zext i1 %cmp1 to i32 %cond2 = select i1 %cmp, i32 -1, i32 %cond ret i32 %cond2 } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @downint(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) local_unnamed_addr #3 { entry: %0 = load i32, ptr %a, align 4, !tbaa !10 %1 = load i32, ptr %b, align 4, !tbaa !10 %cmp = icmp slt i32 %0, %1 %cmp1 = icmp sgt i32 %0, %1 %cond = sext i1 %cmp1 to i32 %cond2 = select i1 %cmp, i32 1, i32 %cond ret i32 %cond2 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @upchar(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) #4 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %left, ptr noundef nonnull dereferenceable(1) %right) #11 ret i32 %call } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @downchar(ptr nocapture noundef readonly %left, ptr nocapture noundef readonly %right) local_unnamed_addr #4 { entry: %call = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %right, ptr noundef nonnull dereferenceable(1) %left) #11 ret i32 %call } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @modpow(i64 noundef %a, i64 noundef %n, i64 noundef %mod) local_unnamed_addr #0 { entry: %cmp9 = icmp sgt i64 %n, 0 br i1 %cmp9, label %while.body, label %while.end while.body: ; preds = %entry, %if.end %res.012 = phi i64 [ %res.1, %if.end ], [ 1, %entry ] %a.addr.011 = phi i64 [ %rem2, %if.end ], [ %a, %entry ] %n.addr.010 = phi i64 [ %shr, %if.end ], [ %n, %entry ] %and = and i64 %n.addr.010, 1 %tobool.not = icmp eq i64 %and, 0 br i1 %tobool.not, label %if.end, label %if.then if.then: ; preds = %while.body %mul = mul nsw i64 %res.012, %a.addr.011 %rem = srem i64 %mul, %mod br label %if.end if.end: ; preds = %if.then, %while.body %res.1 = phi i64 [ %rem, %if.then ], [ %res.012, %while.body ] %mul1 = mul nsw i64 %a.addr.011, %a.addr.011 %rem2 = srem i64 %mul1, %mod %shr = lshr i64 %n.addr.010, 1 %cmp.not = icmp ult i64 %n.addr.010, 2 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %if.end, %entry %res.0.lcssa = phi i64 [ 1, %entry ], [ %res.1, %if.end ] ret i64 %res.0.lcssa } ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local void @initialize() local_unnamed_addr #6 { entry: ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #7 { entry: %n = alloca i64, align 8 %s = alloca [200002 x [11 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #12 call void @llvm.lifetime.start.p0(i64 2200022, ptr nonnull %s) #12 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !15 %cmp24 = icmp sgt i64 %0, 0 br i1 %cmp24, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %i.025 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [200002 x [11 x i8]], ptr %s, i64 0, i64 %i.025 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.025, 1 %1 = load i64, ptr %n, align 8, !tbaa !15 %cmp = icmp slt i64 %inc, %1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !17 for.end: ; preds = %for.body, %entry %.lcssa = phi i64 [ %0, %entry ], [ %1, %for.body ] call void @qsort(ptr noundef nonnull %s, i64 noundef %.lcssa, i64 noundef 11, ptr noundef nonnull @upchar) #12 %2 = load i64, ptr %n, align 8, !tbaa !15 %cmp426 = icmp sgt i64 %2, 1 br i1 %cmp426, label %for.body5.preheader, label %for.end15 for.body5.preheader: ; preds = %for.end %3 = add i64 %2, -2 br label %for.body5 for.body5: ; preds = %for.body5.preheader, %for.body5 %result.028 = phi i64 [ %spec.select, %for.body5 ], [ 1, %for.body5.preheader ] %i.127 = phi i64 [ %add, %for.body5 ], [ 0, %for.body5.preheader ] %arrayidx6 = getelementptr inbounds [200002 x [11 x i8]], ptr %s, i64 0, i64 %i.127 %add = add nuw nsw i64 %i.127, 1 %arrayidx8 = getelementptr inbounds [200002 x [11 x i8]], ptr %s, i64 0, i64 %add %call10 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %arrayidx6, ptr noundef nonnull dereferenceable(1) %arrayidx8) #11 %cmp11.not = icmp ne i32 %call10, 0 %inc12 = zext i1 %cmp11.not to i64 %spec.select = add nuw nsw i64 %result.028, %inc12 %exitcond.not = icmp eq i64 %i.127, %3 br i1 %exitcond.not, label %for.end15, label %for.body5, !llvm.loop !18 for.end15: ; preds = %for.body5, %for.end %result.0.lcssa = phi i64 [ 1, %for.end ], [ %spec.select, %for.body5 ] %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %result.0.lcssa) call void @llvm.lifetime.end.p0(i64 2200022, ptr nonnull %s) #12 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #12 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #9 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #8 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #10 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree 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 nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { 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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #7 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #8 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #9 = { 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 #10 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #11 = { nounwind willreturn memory(read) } attributes #12 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"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, !8} !8 = !{!"llvm.loop.unroll.disable"} !9 = distinct !{!9, !6} !10 = !{!11, !11, i64 0} !11 = !{!"int", !12, i64 0} !12 = !{!"omnipotent char", !13, i64 0} !13 = !{!"Simple C/C++ TBAA"} !14 = distinct !{!14, !6} !15 = !{!16, !16, i64 0} !16 = !{!"long long", !12, i64 0} !17 = distinct !{!17, !6} !18 = distinct !{!18, !6}
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(c%4==2 && b%2==1) printf("YES"); else if(c%4==0 && b%2==0) printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273265/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273265/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 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 %c, align 4, !tbaa !5 %1 = and i32 %0, -2147483645 %cmp = icmp eq i32 %1, 2 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %2 = load i32, ptr %b, align 4, !tbaa !5 %3 = and i32 %2, -2147483647 %cmp2 = icmp eq i32 %3, 1 br i1 %cmp2, label %if.end13, label %if.else if.else: ; preds = %land.lhs.true, %entry %4 = and i32 %0, 3 %cmp5 = icmp eq i32 %4, 0 br i1 %cmp5, label %land.lhs.true6, label %if.else11 land.lhs.true6: ; preds = %if.else %5 = load i32, ptr %b, align 4, !tbaa !5 %6 = and i32 %5, 1 %cmp8 = icmp eq i32 %6, 0 br i1 %cmp8, label %if.end13, label %if.else11 if.else11: ; preds = %land.lhs.true6, %if.else br label %if.end13 if.end13: ; preds = %land.lhs.true6, %land.lhs.true, %if.else11 %.str.1.sink = phi ptr [ @.str.2, %if.else11 ], [ @.str.1, %land.lhs.true ], [ @.str.1, %land.lhs.true6 ] %call10 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) 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("%s\n", ((a*100)+(b*10)+c)%4==0 ? "YES": "NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273315/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273315/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 @.str.3 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %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 %b, align 4, !tbaa !5 %mul1 = shl i32 %0, 1 %1 = load i32, ptr %c, align 4, !tbaa !5 %add2 = add i32 %mul1, %1 %2 = and i32 %add2, 3 %cmp = icmp eq i32 %2, 0 %cond = select i1 %cmp, ptr @.str.2, ptr @.str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %cond) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int r, g, b, number; scanf("%d %d %d", &r, &g, &b); number = 100 * r + 10 * g + b; if (number % 4 == 0) { printf("YES\n"); } else { printf("NO\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273366/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273366/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %g = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %g, ptr noundef nonnull %b) %0 = load i32, ptr %g, align 4, !tbaa !5 %mul1 = shl i32 %0, 1 %1 = load i32, ptr %b, align 4, !tbaa !5 %add2 = add i32 %mul1, %1 %2 = and i32 %add2, 3 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(){ int r,g,b; scanf("%d%d%d",&r,&g,&b); if((g*10+b)%4==0)printf("YES\n"); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273409/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273409/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %g = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %g, ptr noundef nonnull %b) %0 = load i32, ptr %g, align 4, !tbaa !5 %mul = shl i32 %0, 1 %1 = load i32, ptr %b, align 4, !tbaa !5 %add = add i32 %mul, %1 %2 = and i32 %add, 3 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int r, g, b; scanf("%d %d %d", &r, &g, &b); if((r*100 + g*10 + b) % 4 == 0){ printf("YES\n"); }else{ printf("NO\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273452/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273452/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %g = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %g, ptr noundef nonnull %b) %0 = load i32, ptr %g, align 4, !tbaa !5 %mul1 = shl i32 %0, 1 %1 = load i32, ptr %b, align 4, !tbaa !5 %add2 = add i32 %mul1, %1 %2 = and i32 %add2, 3 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ int a,b,c; int n; scanf("%d%d%d",&a,&b,&c); n=100*a+10*b+c; if(n%4==0){ printf("YES\n"); }else{ printf("NO\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273496/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273496/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 @str.3 = private unnamed_addr constant [4 x i8] c"YES\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 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 %b, align 4, !tbaa !5 %mul1 = shl i32 %0, 1 %1 = load i32, ptr %c, align 4, !tbaa !5 %add2 = add i32 %mul1, %1 %2 = and i32 %add2, 3 %cmp = icmp eq i32 %2, 0 %str.3.str = select i1 %cmp, ptr @str.3, ptr @str %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(int argc, char *argv[]) { int r,g,b; scanf("%d %d %d",&r,&g,&b); int sum=r*100+g*10+b; if(sum%4==0)printf("YES"); else printf("NO"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273539/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273539/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"YES\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %g = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %r) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %g) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %g, ptr noundef nonnull %b) %0 = load i32, ptr %g, align 4, !tbaa !5 %mul1 = shl i32 %0, 1 %1 = load i32, ptr %b, align 4, !tbaa !5 %add2 = add i32 %mul1, %1 %2 = and i32 %add2, 3 %cmp = icmp eq i32 %2, 0 %.str.1..str.2 = select i1 %cmp, ptr @.str.1, ptr @.str.2 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %g) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %r) #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 cmp(const void *a,const void *b) { return(*(int*)a-*(int*)b); } int main() { int n,flag=1,f; scanf("%d",&n); int a[2*n],b[n][2],c[n],count=0,i,j=0; for(i=0;i<2*n;i++) { scanf("%d",&a[i]); if(i<n) c[i]=a[i]; } qsort(a,2*n,sizeof(int),cmp); /*for(i=0;i<2*n;i++) printf("%d ",a[i]); printf("\n");*/ qsort(c,n,sizeof(int),cmp); i=0; while(i<2*n) { if(a[i]!=a[i+1]) { flag=0;} b[j][0]=a[i]; b[j][1]=0; i=i+2; j++; } /*for(i=0;i<n;i++) printf("%d ",b[i]); printf("\n"); for(i=0;i<n;i++) printf("%d ",c[i]); printf("\n");*/ if(flag==0) { printf("-1");} else { for(i=0;i<n;i++) { f=0; for(j=0;j<n;j++) { if(b[j][0]==c[i]&&b[j][1]==0) {f=1;b[j][1]=1;break;} } if(f==0) count++; } printf("%d",count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27359/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27359/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"-1\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub = sub nsw i32 %0, %1 ret i32 %sub } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %mul = shl nsw i32 %0, 1 %1 = zext i32 %mul to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca [2 x i32], i64 %4, align 16 %vla2 = alloca i32, i64 %4, align 16 %cmp100 = icmp sgt i32 %3, 0 br i1 %cmp100, label %for.body, label %entry.for.end_crit_edge entry.for.end_crit_edge: ; preds = %entry %mul399 = shl nsw i32 %3, 1 %.pre = sext i32 %mul399 to i64 br label %for.end for.body: ; preds = %entry, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp5 = icmp slt i64 %indvars.iv, %6 br i1 %cmp5, label %if.then, label %for.inc if.then: ; preds = %for.body %7 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx9 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv store i32 %7, ptr %arrayidx9, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body, %if.then %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %mul3 = shl nsw i32 %5, 1 %8 = sext i32 %mul3 to i64 %cmp = icmp slt i64 %indvars.iv.next, %8 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc, %entry.for.end_crit_edge %conv.pre-phi = phi i64 [ %.pre, %entry.for.end_crit_edge ], [ %8, %for.inc ] call void @qsort(ptr noundef nonnull %vla, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @cmp) #7 %9 = load i32, ptr %n, align 4, !tbaa !5 %conv11 = sext i32 %9 to i64 call void @qsort(ptr noundef nonnull %vla2, i64 noundef %conv11, i64 noundef 4, ptr noundef nonnull @cmp) #7 %10 = load i32, ptr %n, align 4, !tbaa !5 %cmp13102 = icmp sgt i32 %10, 0 br i1 %cmp13102, label %while.body.preheader, label %for.end72 while.body.preheader: ; preds = %for.end %mul12 = shl nuw i32 %10, 1 %smax = call i32 @llvm.smax.i32(i32 %mul12, i32 2) %11 = add nsw i32 %smax, -1 %12 = lshr i32 %11, 1 %13 = add nuw nsw i32 %12, 1 %wide.trip.count = zext i32 %13 to i64 %min.iters.check = icmp ult i32 %smax, 7 br i1 %min.iters.check, label %while.body.preheader154, label %vector.ph vector.ph: ; preds = %while.body.preheader %n.vec = and i64 %wide.trip.count, 2147483644 %ind.end = shl nuw nsw 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 <2 x i32> [ <i32 1, i32 1>, %vector.ph ], [ %20, %vector.body ] %vec.phi143 = phi <2 x i32> [ <i32 1, i32 1>, %vector.ph ], [ %21, %vector.body ] %14 = or i64 %index, 2 %offset.idx = shl i64 %index, 1 %15 = or i64 %offset.idx, 4 %16 = getelementptr inbounds i32, ptr %vla, i64 %offset.idx %17 = getelementptr inbounds i32, ptr %vla, i64 %15 %wide.vec = load <4 x i32>, ptr %16, align 16, !tbaa !5 %wide.vec144 = load <4 x i32>, ptr %17, align 16, !tbaa !5 %strided.vec = shufflevector <4 x i32> %wide.vec, <4 x i32> poison, <2 x i32> <i32 0, i32 2> %strided.vec145 = shufflevector <4 x i32> %wide.vec144, <4 x i32> poison, <2 x i32> <i32 0, i32 2> %strided.vec146 = shufflevector <4 x i32> %wide.vec, <4 x i32> poison, <2 x i32> <i32 1, i32 3> %strided.vec147 = shufflevector <4 x i32> %wide.vec144, <4 x i32> poison, <2 x i32> <i32 1, i32 3> %18 = icmp eq <2 x i32> %strided.vec, %strided.vec146 %19 = icmp eq <2 x i32> %strided.vec145, %strided.vec147 %20 = select <2 x i1> %18, <2 x i32> %vec.phi, <2 x i32> zeroinitializer %21 = select <2 x i1> %19, <2 x i32> %vec.phi143, <2 x i32> zeroinitializer %22 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %index %23 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %14 %interleaved.vec = shufflevector <2 x i32> %strided.vec, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 2, i32 1, i32 3> store <4 x i32> %interleaved.vec, ptr %22, align 16, !tbaa !5 %interleaved.vec148 = shufflevector <2 x i32> %strided.vec145, <2 x i32> zeroinitializer, <4 x i32> <i32 0, i32 2, i32 1, i32 3> store <4 x i32> %interleaved.vec148, ptr %23, align 16, !tbaa !5 %index.next = add nuw i64 %index, 4 %24 = icmp eq i64 %index.next, %n.vec br i1 %24, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %rdx.select.cmp.not = icmp ne <2 x i32> %20, <i32 1, i32 1> %rdx.select.cmp149151 = icmp ne <2 x i32> %21, <i32 1, i32 1> %rdx.select.cmp149 = select <2 x i1> %rdx.select.cmp.not, <2 x i1> <i1 true, i1 true>, <2 x i1> %rdx.select.cmp149151 %25 = bitcast <2 x i1> %rdx.select.cmp149 to i2 %.not = icmp eq i2 %25, 0 %rdx.select150 = zext i1 %.not to i32 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %while.end, label %while.body.preheader154 while.body.preheader154: ; preds = %while.body.preheader, %middle.block %indvars.iv123.ph = phi i64 [ 0, %while.body.preheader ], [ %ind.end, %middle.block ] %indvars.iv121.ph = phi i64 [ 0, %while.body.preheader ], [ %n.vec, %middle.block ] %flag.0103.ph = phi i32 [ 1, %while.body.preheader ], [ %rdx.select150, %middle.block ] br label %while.body while.body: ; preds = %while.body.preheader154, %while.body %indvars.iv123 = phi i64 [ %indvars.iv.next124, %while.body ], [ %indvars.iv123.ph, %while.body.preheader154 ] %indvars.iv121 = phi i64 [ %indvars.iv.next122, %while.body ], [ %indvars.iv121.ph, %while.body.preheader154 ] %flag.0103 = phi i32 [ %spec.select, %while.body ], [ %flag.0103.ph, %while.body.preheader154 ] %arrayidx16 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv123 %26 = load i32, ptr %arrayidx16, align 8, !tbaa !5 %27 = or i64 %indvars.iv123, 1 %arrayidx18 = getelementptr inbounds i32, ptr %vla, i64 %27 %28 = load i32, ptr %arrayidx18, align 4, !tbaa !5 %cmp19.not = icmp eq i32 %26, %28 %spec.select = select i1 %cmp19.not, i32 %flag.0103, i32 0 %arrayidx26 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %indvars.iv121 store i32 %26, ptr %arrayidx26, align 8, !tbaa !5 %arrayidx30 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %indvars.iv121, i64 1 store i32 0, ptr %arrayidx30, align 4, !tbaa !5 %indvars.iv.next124 = add nuw nsw i64 %indvars.iv123, 2 %indvars.iv.next122 = add nuw nsw i64 %indvars.iv121, 1 %exitcond.not = icmp eq i64 %indvars.iv.next122, %wide.trip.count br i1 %exitcond.not, label %while.end, label %while.body, !llvm.loop !14 while.end: ; preds = %while.body, %middle.block %spec.select.lcssa = phi i32 [ %rdx.select150, %middle.block ], [ %spec.select, %while.body ] %29 = icmp eq i32 %spec.select.lcssa, 0 br i1 %29, label %if.then35, label %for.cond37.preheader for.cond37.preheader: ; preds = %while.end br i1 %cmp13102, label %for.cond41.preheader.preheader, label %for.end72 for.cond41.preheader.preheader: ; preds = %for.cond37.preheader %30 = zext i32 %10 to i64 %wide.trip.count136 = zext i32 %10 to i64 br label %for.cond41.preheader if.then35: ; preds = %while.end %call36 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1) br label %if.end74 for.cond41.preheader: ; preds = %for.cond41.preheader.preheader, %for.end64 %indvars.iv133 = phi i64 [ 0, %for.cond41.preheader.preheader ], [ %indvars.iv.next134, %for.end64 ] %count.0113 = phi i32 [ 0, %for.cond41.preheader.preheader ], [ %spec.select96, %for.end64 ] %arrayidx49 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv133 %31 = load i32, ptr %arrayidx49, align 4, !tbaa !5 br label %for.body44 for.body44: ; preds = %for.cond41.preheader, %for.inc62 %indvars.iv129 = phi i64 [ 0, %for.cond41.preheader ], [ %indvars.iv.next130, %for.inc62 ] %cmp42.not110 = phi i1 [ false, %for.cond41.preheader ], [ %cmp42.not, %for.inc62 ] %arrayidx46 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %indvars.iv129 %32 = load i32, ptr %arrayidx46, align 8, !tbaa !5 %cmp50 = icmp eq i32 %32, %31 br i1 %cmp50, label %land.lhs.true, label %for.inc62 land.lhs.true: ; preds = %for.body44 %arrayidx54 = getelementptr inbounds [2 x i32], ptr %vla1, i64 %indvars.iv129, i64 1 %33 = load i32, ptr %arrayidx54, align 4, !tbaa !5 %cmp55 = icmp eq i32 %33, 0 br i1 %cmp55, label %if.then57, label %for.inc62 if.then57: ; preds = %land.lhs.true %arrayidx54.le = getelementptr inbounds [2 x i32], ptr %vla1, i64 %indvars.iv129, i64 1 store i32 1, ptr %arrayidx54.le, align 4, !tbaa !5 br label %for.end64 for.inc62: ; preds = %for.body44, %land.lhs.true %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1 %cmp42.not = icmp uge i64 %indvars.iv.next130, %30 %exitcond132 = icmp eq i64 %indvars.iv.next130, %wide.trip.count136 br i1 %exitcond132, label %for.end64, label %for.body44, !llvm.loop !15 for.end64: ; preds = %for.inc62, %if.then57 %cmp42.not98 = phi i1 [ %cmp42.not110, %if.then57 ], [ %cmp42.not, %for.inc62 ] %inc68 = zext i1 %cmp42.not98 to i32 %spec.select96 = add nuw nsw i32 %count.0113, %inc68 %indvars.iv.next134 = add nuw nsw i64 %indvars.iv133, 1 %exitcond137.not = icmp eq i64 %indvars.iv.next134, %wide.trip.count136 br i1 %exitcond137.not, label %for.end72, label %for.cond41.preheader, !llvm.loop !16 for.end72: ; preds = %for.end64, %for.end, %for.cond37.preheader %count.0.lcssa = phi i32 [ 0, %for.cond37.preheader ], [ 0, %for.end ], [ %spec.select96, %for.end64 ] %call73 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %count.0.lcssa) br label %if.end74 if.end74: ; preds = %for.end72, %if.then35 call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #4 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #6 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12, !13} !12 = !{!"llvm.loop.isvectorized", i32 1} !13 = !{!"llvm.loop.unroll.runtime.disable"} !14 = distinct !{!14, !10, !13, !12} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include <stdio.h> int ans; int zero; unsigned int n; int k; int main() { scanf("%u%d", &n, &k); for (int i = 0; i < k; i++, n/=10) { if (n == 0) { if (zero == 1) { printf("%d", i-1); } else { printf("%d", i); } return 0; } if (n%10 != 0) { ans++; k++; } else { zero = 1; } } printf("%d", ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%u%d\00", align 1 @n = dso_local global i32 0, align 4 @k = dso_local global i32 0, align 4 @zero = dso_local local_unnamed_addr global i32 0, align 4 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @ans = dso_local local_unnamed_addr global i32 0, align 4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n, ptr noundef nonnull @k) %k.promoted = load i32, ptr @k, align 4, !tbaa !5 %ans.promoted = load i32, ptr @ans, align 4, !tbaa !5 %cmp26 = icmp sgt i32 %k.promoted, 0 br i1 %cmp26, label %for.body.preheader, label %return for.body.preheader: ; preds = %entry %n.promoted = load i32, ptr @n, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.preheader, %for.inc %i.030 = phi i32 [ %inc12, %for.inc ], [ 0, %for.body.preheader ] %inc92229 = phi i32 [ %inc921, %for.inc ], [ %k.promoted, %for.body.preheader ] %div2328 = phi i32 [ %div, %for.inc ], [ %n.promoted, %for.body.preheader ] %inc2527 = phi i32 [ %inc24, %for.inc ], [ %ans.promoted, %for.body.preheader ] %cmp1 = icmp eq i32 %div2328, 0 br i1 %cmp1, label %if.then, label %if.end6 if.then: ; preds = %for.body %0 = load i32, ptr @zero, align 4, !tbaa !5 %cmp2 = icmp eq i32 %0, 1 %sub = sext i1 %cmp2 to i32 %spec.select = add nsw i32 %i.030, %sub br label %return if.end6: ; preds = %for.body %rem = urem i32 %div2328, 10 %div = udiv i32 %div2328, 10 %cmp7.not = icmp eq i32 %rem, 0 br i1 %cmp7.not, label %if.else10, label %if.then8 if.then8: ; preds = %if.end6 %inc = add nsw i32 %inc2527, 1 store i32 %inc, ptr @ans, align 4, !tbaa !5 %inc9 = add nsw i32 %inc92229, 1 store i32 %inc9, ptr @k, align 4, !tbaa !5 br label %for.inc if.else10: ; preds = %if.end6 store i32 1, ptr @zero, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %if.then8, %if.else10 %inc24 = phi i32 [ %inc, %if.then8 ], [ %inc2527, %if.else10 ] %inc921 = phi i32 [ %inc9, %if.then8 ], [ %inc92229, %if.else10 ] %inc12 = add nuw nsw i32 %i.030, 1 store i32 %div, ptr @n, align 4, !tbaa !5 %cmp = icmp slt i32 %inc12, %inc921 br i1 %cmp, label %for.body, label %return, !llvm.loop !9 return: ; preds = %for.inc, %if.then, %entry %sub.sink = phi i32 [ %ans.promoted, %entry ], [ %spec.select, %if.then ], [ %inc24, %for.inc ] %call4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub.sink) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(){ int n, i; char s[100]; scanf("%d", &n); for(i=0; i<n; i++) scanf("%c", &s[i]); for(i=0; i<n; i++){ if(s[i] == 'Y'){ printf("Four\n"); return 0; } } printf("Three\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273683/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273683/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%c\00", align 1 @str = private unnamed_addr constant [6 x i8] c"Three\00", align 1 @str.4 = private unnamed_addr constant [5 x i8] c"Four\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %s = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp22 = icmp sgt i32 %0, 0 br i1 %cmp22, label %for.body, label %cleanup for.cond2.preheader: ; preds = %for.body %cmp324 = icmp sgt i32 %1, 0 br i1 %cmp324, label %for.body4.preheader, label %cleanup for.body4.preheader: ; preds = %for.cond2.preheader %wide.trip.count = zext i32 %1 to i64 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond2: ; preds = %for.body4 %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1 %exitcond.not = icmp eq i64 %indvars.iv.next29, %wide.trip.count br i1 %exitcond.not, label %cleanup, label %for.body4, !llvm.loop !11 for.body4: ; preds = %for.body4.preheader, %for.cond2 %indvars.iv28 = phi i64 [ 0, %for.body4.preheader ], [ %indvars.iv.next29, %for.cond2 ] %arrayidx6 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv28 %3 = load i8, ptr %arrayidx6, align 1, !tbaa !12 %cmp7 = icmp eq i8 %3, 89 br i1 %cmp7, label %cleanup, label %for.cond2 cleanup: ; preds = %for.cond2, %for.body4, %for.cond2.preheader, %entry %str.sink = phi ptr [ @str, %entry ], [ @str, %for.cond2.preheader ], [ @str.4, %for.body4 ], [ @str, %for.cond2 ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = !{!7, !7, i64 0}
#include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> #include<stdio.h> #include<stdlib.h> #include<math.h> #include<string.h> int main(void){ int i,N,s[4]; scanf("%d",&N); char c; for(i=0;i<N;i++){ scanf("%c ",&c); if(c == 'P'){ s[0] = 1; }else if(c == 'W'){ s[1] = 1; }else if(c == 'G'){ s[2] = 1; }else if(c == 'Y'){ s[3] = 1; } } int n=0; for(i=0;i<4;i++){ n+=s[i]; } if(n==3){ printf("Three\n"); }else{ printf("Four\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273726/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273726/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%c \00", align 1 @str = private unnamed_addr constant [5 x i8] c"Four\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %c = alloca i8, align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %c) #4 %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp45 = icmp sgt i32 %0, 0 br i1 %cmp45, label %for.body, label %if.end38 for.body: ; preds = %entry, %for.body %i.046 = phi i32 [ %inc, %for.body ], [ 0, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %c) %inc = add nuw nsw i32 %i.046, 1 %1 = load i32, ptr %N, align 4, !tbaa !5 %cmp = icmp slt i32 %inc, %1 br i1 %cmp, label %for.body, label %if.end38, !llvm.loop !9 if.end38: ; preds = %for.body, %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %c) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <math.h> int main (void){ int n; char c; scanf("%d",&n); for (int i = 0; i < n; i++) { c=getchar(); if(c=='Y') { printf("Four"); return 0; } } printf("Three"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273812/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273812/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"Four\00", align 1 @.str.2 = private unnamed_addr constant [6 x i8] c"Three\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: %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 %cmp.not10 = icmp sgt i32 %0, 0 br i1 %cmp.not10, label %for.body, label %cleanup7 for.cond: ; preds = %for.body %inc = add nuw nsw i32 %i.011, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not = icmp slt i32 %inc, %1 br i1 %cmp.not, label %for.body, label %cleanup7, !llvm.loop !9 for.body: ; preds = %entry, %for.cond %i.011 = phi i32 [ %inc, %for.cond ], [ 0, %entry ] %2 = load ptr, ptr @stdin, align 8, !tbaa !11 %call.i = call i32 @getc(ptr noundef %2) %sext.mask = and i32 %call.i, 255 %cmp3 = icmp eq i32 %sext.mask, 89 br i1 %cmp3, label %cleanup7, label %for.cond cleanup7: ; preds = %for.cond, %for.body, %entry %.str.1.sink = phi ptr [ @.str.2, %entry ], [ @.str.1, %for.body ], [ @.str.2, %for.cond ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @getc(ptr nocapture noundef) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!12, !12, i64 0} !12 = !{!"any pointer", !7, i64 0}
#include<stdio.h> int main(void) { int n, a[20], b[20], c[19], i, s=0; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&a[i]); for(i=0;i<n;i++){ scanf("%d",&b[i]); s+=b[i]; } for(i=0;i<n-1;i++) scanf("%d",&c[i]); for(i=0;i<n-1;i++) if(a[i]==a[i+1]-1) s+=c[a[i]-1]; printf("%d\n",s); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273856/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273856/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [20 x i32], align 16 %b = alloca [20 x i32], align 16 %c = alloca [19 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp59 = icmp sgt i32 %0, 0 br i1 %cmp59, label %for.body, label %for.end41 for.cond2.preheader: ; preds = %for.body %cmp361 = icmp sgt i32 %1, 0 br i1 %cmp361, label %for.body4, label %for.end41 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond13.preheader: ; preds = %for.body4 %cmp1465 = icmp sgt i32 %4, 1 br i1 %cmp1465, label %for.body15, label %for.end41 for.body4: ; preds = %for.cond2.preheader, %for.body4 %indvars.iv74 = phi i64 [ %indvars.iv.next75, %for.body4 ], [ 0, %for.cond2.preheader ] %s.063 = phi i32 [ %add, %for.body4 ], [ 0, %for.cond2.preheader ] %arrayidx6 = getelementptr inbounds [20 x i32], ptr %b, i64 0, i64 %indvars.iv74 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %3 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %add = add nsw i32 %3, %s.063 %indvars.iv.next75 = add nuw nsw i64 %indvars.iv74, 1 %4 = load i32, ptr %n, align 4, !tbaa !5 %5 = sext i32 %4 to i64 %cmp3 = icmp slt i64 %indvars.iv.next75, %5 br i1 %cmp3, label %for.body4, label %for.cond13.preheader, !llvm.loop !11 for.cond22.preheader: ; preds = %for.body15 %cmp2468 = icmp sgt i32 %7, 1 br i1 %cmp2468, label %for.body25.preheader, label %for.end41 for.body25.preheader: ; preds = %for.cond22.preheader %wide.trip.count = zext i32 %sub to i64 %.pre = load i32, ptr %a, align 16, !tbaa !5 %xtraiter = and i64 %wide.trip.count, 1 %6 = icmp eq i32 %sub, 1 br i1 %6, label %for.end41.loopexit.unr-lcssa, label %for.body25.preheader.new for.body25.preheader.new: ; preds = %for.body25.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body25 for.body15: ; preds = %for.cond13.preheader, %for.body15 %indvars.iv77 = phi i64 [ %indvars.iv.next78, %for.body15 ], [ 0, %for.cond13.preheader ] %arrayidx17 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %indvars.iv77 %call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx17) %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %7, -1 %8 = sext i32 %sub to i64 %cmp14 = icmp slt i64 %indvars.iv.next78, %8 br i1 %cmp14, label %for.body15, label %for.cond22.preheader, !llvm.loop !12 for.body25: ; preds = %for.inc39.1, %for.body25.preheader.new %9 = phi i32 [ %.pre, %for.body25.preheader.new ], [ %12, %for.inc39.1 ] %indvars.iv80 = phi i64 [ 0, %for.body25.preheader.new ], [ %indvars.iv.next81.1, %for.inc39.1 ] %s.170 = phi i32 [ %add, %for.body25.preheader.new ], [ %s.2.1, %for.inc39.1 ] %niter = phi i64 [ 0, %for.body25.preheader.new ], [ %niter.next.1, %for.inc39.1 ] %indvars.iv.next81 = or i64 %indvars.iv80, 1 %arrayidx30 = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv.next81 %10 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %sub31 = add nsw i32 %10, -1 %cmp32 = icmp eq i32 %9, %sub31 br i1 %cmp32, label %if.then, label %for.inc39 if.then: ; preds = %for.body25 %sub35 = add nsw i32 %9, -1 %idxprom36 = sext i32 %sub35 to i64 %arrayidx37 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom36 %11 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %add38 = add nsw i32 %11, %s.170 br label %for.inc39 for.inc39: ; preds = %for.body25, %if.then %s.2 = phi i32 [ %add38, %if.then ], [ %s.170, %for.body25 ] %indvars.iv.next81.1 = add nuw nsw i64 %indvars.iv80, 2 %arrayidx30.1 = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv.next81.1 %12 = load i32, ptr %arrayidx30.1, align 8, !tbaa !5 %sub31.1 = add nsw i32 %12, -1 %cmp32.1 = icmp eq i32 %10, %sub31.1 br i1 %cmp32.1, label %if.then.1, label %for.inc39.1 if.then.1: ; preds = %for.inc39 %sub35.1 = add nsw i32 %10, -1 %idxprom36.1 = sext i32 %sub35.1 to i64 %arrayidx37.1 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom36.1 %13 = load i32, ptr %arrayidx37.1, align 4, !tbaa !5 %add38.1 = add nsw i32 %13, %s.2 br label %for.inc39.1 for.inc39.1: ; preds = %if.then.1, %for.inc39 %s.2.1 = phi i32 [ %add38.1, %if.then.1 ], [ %s.2, %for.inc39 ] %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.end41.loopexit.unr-lcssa.loopexit, label %for.body25, !llvm.loop !13 for.end41.loopexit.unr-lcssa.loopexit: ; preds = %for.inc39.1 %14 = add nuw nsw i64 %indvars.iv80, 3 br label %for.end41.loopexit.unr-lcssa for.end41.loopexit.unr-lcssa: ; preds = %for.end41.loopexit.unr-lcssa.loopexit, %for.body25.preheader %s.2.lcssa.ph = phi i32 [ undef, %for.body25.preheader ], [ %s.2.1, %for.end41.loopexit.unr-lcssa.loopexit ] %.unr = phi i32 [ %.pre, %for.body25.preheader ], [ %12, %for.end41.loopexit.unr-lcssa.loopexit ] %indvars.iv80.unr = phi i64 [ 1, %for.body25.preheader ], [ %14, %for.end41.loopexit.unr-lcssa.loopexit ] %s.170.unr = phi i32 [ %add, %for.body25.preheader ], [ %s.2.1, %for.end41.loopexit.unr-lcssa.loopexit ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end41, label %for.body25.epil for.body25.epil: ; preds = %for.end41.loopexit.unr-lcssa %arrayidx30.epil = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv80.unr %15 = load i32, ptr %arrayidx30.epil, align 4, !tbaa !5 %sub31.epil = add nsw i32 %15, -1 %cmp32.epil = icmp eq i32 %.unr, %sub31.epil br i1 %cmp32.epil, label %if.then.epil, label %for.end41 if.then.epil: ; preds = %for.body25.epil %sub35.epil = add nsw i32 %.unr, -1 %idxprom36.epil = sext i32 %sub35.epil to i64 %arrayidx37.epil = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom36.epil %16 = load i32, ptr %arrayidx37.epil, align 4, !tbaa !5 %add38.epil = add nsw i32 %16, %s.170.unr br label %for.end41 for.end41: ; preds = %for.end41.loopexit.unr-lcssa, %if.then.epil, %for.body25.epil, %entry, %for.cond2.preheader, %for.cond13.preheader, %for.cond22.preheader %s.1.lcssa = phi i32 [ %add, %for.cond22.preheader ], [ %add, %for.cond13.preheader ], [ 0, %for.cond2.preheader ], [ 0, %entry ], [ %s.2.lcssa.ph, %for.end41.loopexit.unr-lcssa ], [ %add38.epil, %if.then.epil ], [ %s.170.unr, %for.body25.epil ] %call42 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %s.1.lcssa) call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %a) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main() { int n=0,x=0; scanf("%d",&n); while(n--) { char ex[4]=""; scanf("%s",ex); if(ex[1]=='+') x++; else x--; } printf("%d",x); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_2739/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_2739/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %ex = alloca [4 x i8], align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 store i32 0, ptr %n, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %dec7 = add nsw i32 %0, -1 store i32 %dec7, ptr %n, align 4, !tbaa !5 %tobool.not8 = icmp eq i32 %0, 0 br i1 %tobool.not8, label %while.end, label %while.body.lr.ph while.body.lr.ph: ; preds = %entry %arrayidx = getelementptr inbounds [4 x i8], ptr %ex, i64 0, i64 1 br label %while.body while.body: ; preds = %while.body.lr.ph, %while.body %x.09 = phi i32 [ 0, %while.body.lr.ph ], [ %x.1, %while.body ] call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %ex) #3 store i32 0, ptr %ex, align 4 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %ex) %1 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp = icmp eq i8 %1, 43 %x.1.v = select i1 %cmp, i32 1, i32 -1 %x.1 = add nsw i32 %x.1.v, %x.09 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %ex) #3 %2 = load i32, ptr %n, align 4, !tbaa !5 %dec = add nsw i32 %2, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 %tobool.not = icmp eq i32 %2, 0 br i1 %tobool.not, label %while.end, label %while.body, !llvm.loop !10 while.end: ; preds = %while.body, %entry %x.0.lcssa = phi i32 [ 0, %entry ], [ %x.1, %while.body ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, 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: 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 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> int main(void) { int N, A[20], B[20], C[20], i, n[2]={-1,-1}, sum=0; scanf("%d", &N); for(i=0; i<N; i++){ scanf("%d", &A[i]); } for(i=0; i<N; i++){ scanf("%d", &B[i]); } for(i=0; i<N-1; i++){ scanf("%d", &C[i]); } for(i=0; i<N; i++){ n[1] = A[i]; sum += B[n[1]-1]; if(n[1] == n[0] + 1){ sum += C[n[0]-1]; } n[0] = n[1]; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273942/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273942/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 %A = alloca [20 x i32], align 16 %B = alloca [20 x i32], align 16 %C = alloca [20 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %B) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %C) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %cmp61 = icmp sgt i32 %0, 0 br i1 %cmp61, label %for.body, label %for.end43 for.cond2.preheader: ; preds = %for.body %cmp363 = icmp sgt i32 %1, 0 br i1 %cmp363, label %for.body4, label %for.end43 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [20 x i32], ptr %A, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %N, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond11.preheader: ; preds = %for.body4 %cmp1266 = icmp sgt i32 %3, 1 br i1 %cmp1266, label %for.body13, label %for.cond20.preheader for.body4: ; preds = %for.cond2.preheader, %for.body4 %indvars.iv75 = phi i64 [ %indvars.iv.next76, %for.body4 ], [ 0, %for.cond2.preheader ] %arrayidx6 = getelementptr inbounds [20 x i32], ptr %B, i64 0, i64 %indvars.iv75 %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %3 = load i32, ptr %N, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp3 = icmp slt i64 %indvars.iv.next76, %4 br i1 %cmp3, label %for.body4, label %for.cond11.preheader, !llvm.loop !11 for.cond20.preheader: ; preds = %for.body13, %for.cond11.preheader %.lcssa = phi i32 [ %3, %for.cond11.preheader ], [ %5, %for.body13 ] %cmp2168 = icmp sgt i32 %.lcssa, 0 br i1 %cmp2168, label %for.body22.preheader, label %for.end43 for.body22.preheader: ; preds = %for.cond20.preheader %wide.trip.count = zext i32 %.lcssa to i64 br label %for.body22 for.body13: ; preds = %for.cond11.preheader, %for.body13 %indvars.iv78 = phi i64 [ %indvars.iv.next79, %for.body13 ], [ 0, %for.cond11.preheader ] %arrayidx15 = getelementptr inbounds [20 x i32], ptr %C, i64 0, i64 %indvars.iv78 %call16 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx15) %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1 %5 = load i32, ptr %N, align 4, !tbaa !5 %sub = add nsw i32 %5, -1 %6 = sext i32 %sub to i64 %cmp12 = icmp slt i64 %indvars.iv.next79, %6 br i1 %cmp12, label %for.body13, label %for.cond20.preheader, !llvm.loop !12 for.body22: ; preds = %for.body22.preheader, %if.end %indvars.iv81 = phi i64 [ 0, %for.body22.preheader ], [ %indvars.iv.next82, %if.end ] %sum.071 = phi i32 [ 0, %for.body22.preheader ], [ %sum.1, %if.end ] %n.sroa.0.070 = phi i32 [ -1, %for.body22.preheader ], [ %7, %if.end ] %arrayidx24 = getelementptr inbounds [20 x i32], ptr %A, i64 0, i64 %indvars.iv81 %7 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %sub27 = add nsw i32 %7, -1 %idxprom28 = sext i32 %sub27 to i64 %arrayidx29 = getelementptr inbounds [20 x i32], ptr %B, i64 0, i64 %idxprom28 %8 = load i32, ptr %arrayidx29, align 4, !tbaa !5 %add = add nsw i32 %8, %sum.071 %add32 = add nsw i32 %n.sroa.0.070, 1 %cmp33 = icmp eq i32 %7, %add32 br i1 %cmp33, label %if.then, label %if.end if.then: ; preds = %for.body22 %sub35 = add nsw i32 %n.sroa.0.070, -1 %idxprom36 = sext i32 %sub35 to i64 %arrayidx37 = getelementptr inbounds [20 x i32], ptr %C, i64 0, i64 %idxprom36 %9 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %add38 = add nsw i32 %9, %add br label %if.end if.end: ; preds = %if.then, %for.body22 %sum.1 = phi i32 [ %add38, %if.then ], [ %add, %for.body22 ] %indvars.iv.next82 = add nuw nsw i64 %indvars.iv81, 1 %exitcond.not = icmp eq i64 %indvars.iv.next82, %wide.trip.count br i1 %exitcond.not, label %for.end43, label %for.body22, !llvm.loop !13 for.end43: ; preds = %if.end, %for.cond2.preheader, %entry, %for.cond20.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond20.preheader ], [ 0, %entry ], [ 0, %for.cond2.preheader ], [ %sum.1, %if.end ] %call44 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %C) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %B) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %A) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include<stdio.h> int main(void){ int n; int a[20], b[20], c[19]; int sum=0; scanf("%d",&n); for(int i=0; i<n; i++){ scanf("%d", &a[i]); } for(int j=0; j<n; j++){ scanf("%d", &b[j]); } for(int s=0; s<n-1; s++){ scanf("%d", &c[s]); } for(int t=0; t<n; t++){ sum += b[a[t]-1]; if(a[t] - 1 == a[t-1]){ sum += c[a[t-1]-1]; } } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_273993/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_273993/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca [20 x i32], align 16 %b = alloca [20 x i32], align 16 %c = alloca [19 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 76, ptr nonnull %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp62 = icmp sgt i32 %0, 0 br i1 %cmp62, label %for.body, label %for.cond.cleanup24 for.cond2.preheader: ; preds = %for.body %cmp364 = icmp sgt i32 %1, 0 br i1 %cmp364, label %for.body5, label %for.cond.cleanup24 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.cond12.preheader: ; preds = %for.body5 %cmp1367 = icmp sgt i32 %3, 1 br i1 %cmp1367, label %for.body15, label %for.cond22.preheader for.body5: ; preds = %for.cond2.preheader, %for.body5 %indvars.iv75 = phi i64 [ %indvars.iv.next76, %for.body5 ], [ 0, %for.cond2.preheader ] %arrayidx7 = getelementptr inbounds [20 x i32], ptr %b, i64 0, i64 %indvars.iv75 %call8 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx7) %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp3 = icmp slt i64 %indvars.iv.next76, %4 br i1 %cmp3, label %for.body5, label %for.cond12.preheader, !llvm.loop !11 for.cond22.preheader: ; preds = %for.body15, %for.cond12.preheader %.lcssa = phi i32 [ %3, %for.cond12.preheader ], [ %6, %for.body15 ] %cmp2369 = icmp sgt i32 %.lcssa, 0 br i1 %cmp2369, label %for.body25.preheader, label %for.cond.cleanup24 for.body25.preheader: ; preds = %for.cond22.preheader %wide.trip.count = zext i32 %.lcssa to i64 %arrayidx36.phi.trans.insert = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 -1 %.pre = load i32, ptr %arrayidx36.phi.trans.insert, align 4, !tbaa !5 %xtraiter = and i64 %wide.trip.count, 1 %5 = icmp eq i32 %.lcssa, 1 br i1 %5, label %for.cond.cleanup24.loopexit.unr-lcssa, label %for.body25.preheader.new for.body25.preheader.new: ; preds = %for.body25.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body25 for.body15: ; preds = %for.cond12.preheader, %for.body15 %indvars.iv78 = phi i64 [ %indvars.iv.next79, %for.body15 ], [ 0, %for.cond12.preheader ] %arrayidx17 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %indvars.iv78 %call18 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx17) %indvars.iv.next79 = add nuw nsw i64 %indvars.iv78, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %7 = sext i32 %sub to i64 %cmp13 = icmp slt i64 %indvars.iv.next79, %7 br i1 %cmp13, label %for.body15, label %for.cond22.preheader, !llvm.loop !12 for.cond.cleanup24.loopexit.unr-lcssa: ; preds = %for.inc45.1, %for.body25.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body25.preheader ], [ %sum.1.1, %for.inc45.1 ] %.unr = phi i32 [ %.pre, %for.body25.preheader ], [ %15, %for.inc45.1 ] %indvars.iv81.unr = phi i64 [ 0, %for.body25.preheader ], [ %indvars.iv.next82.1, %for.inc45.1 ] %sum.070.unr = phi i32 [ 0, %for.body25.preheader ], [ %sum.1.1, %for.inc45.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup24, label %for.body25.epil for.body25.epil: ; preds = %for.cond.cleanup24.loopexit.unr-lcssa %arrayidx27.epil = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv81.unr %8 = load i32, ptr %arrayidx27.epil, align 4, !tbaa !5 %sub28.epil = add nsw i32 %8, -1 %idxprom29.epil = sext i32 %sub28.epil to i64 %arrayidx30.epil = getelementptr inbounds [20 x i32], ptr %b, i64 0, i64 %idxprom29.epil %9 = load i32, ptr %arrayidx30.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %9, %sum.070.unr %cmp37.epil = icmp eq i32 %sub28.epil, %.unr br i1 %cmp37.epil, label %if.then.epil, label %for.cond.cleanup24 if.then.epil: ; preds = %for.body25.epil %sub41.epil = add nsw i32 %.unr, -1 %idxprom42.epil = sext i32 %sub41.epil to i64 %arrayidx43.epil = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom42.epil %10 = load i32, ptr %arrayidx43.epil, align 4, !tbaa !5 %add44.epil = add nsw i32 %10, %add.epil br label %for.cond.cleanup24 for.cond.cleanup24: ; preds = %for.cond.cleanup24.loopexit.unr-lcssa, %if.then.epil, %for.body25.epil, %for.cond2.preheader, %entry, %for.cond22.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond22.preheader ], [ 0, %entry ], [ 0, %for.cond2.preheader ], [ %sum.1.lcssa.ph, %for.cond.cleanup24.loopexit.unr-lcssa ], [ %add44.epil, %if.then.epil ], [ %add.epil, %for.body25.epil ] %call48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 76, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %a) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 for.body25: ; preds = %for.inc45.1, %for.body25.preheader.new %11 = phi i32 [ %.pre, %for.body25.preheader.new ], [ %15, %for.inc45.1 ] %indvars.iv81 = phi i64 [ 0, %for.body25.preheader.new ], [ %indvars.iv.next82.1, %for.inc45.1 ] %sum.070 = phi i32 [ 0, %for.body25.preheader.new ], [ %sum.1.1, %for.inc45.1 ] %niter = phi i64 [ 0, %for.body25.preheader.new ], [ %niter.next.1, %for.inc45.1 ] %arrayidx27 = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv81 %12 = load i32, ptr %arrayidx27, align 8, !tbaa !5 %sub28 = add nsw i32 %12, -1 %idxprom29 = sext i32 %sub28 to i64 %arrayidx30 = getelementptr inbounds [20 x i32], ptr %b, i64 0, i64 %idxprom29 %13 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %add = add nsw i32 %13, %sum.070 %cmp37 = icmp eq i32 %sub28, %11 br i1 %cmp37, label %if.then, label %for.inc45 if.then: ; preds = %for.body25 %sub41 = add nsw i32 %11, -1 %idxprom42 = sext i32 %sub41 to i64 %arrayidx43 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom42 %14 = load i32, ptr %arrayidx43, align 4, !tbaa !5 %add44 = add nsw i32 %14, %add br label %for.inc45 for.inc45: ; preds = %for.body25, %if.then %sum.1 = phi i32 [ %add44, %if.then ], [ %add, %for.body25 ] %indvars.iv.next82 = or i64 %indvars.iv81, 1 %arrayidx27.1 = getelementptr inbounds [20 x i32], ptr %a, i64 0, i64 %indvars.iv.next82 %15 = load i32, ptr %arrayidx27.1, align 4, !tbaa !5 %sub28.1 = add nsw i32 %15, -1 %idxprom29.1 = sext i32 %sub28.1 to i64 %arrayidx30.1 = getelementptr inbounds [20 x i32], ptr %b, i64 0, i64 %idxprom29.1 %16 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %add.1 = add nsw i32 %16, %sum.1 %cmp37.1 = icmp eq i32 %sub28.1, %12 br i1 %cmp37.1, label %if.then.1, label %for.inc45.1 if.then.1: ; preds = %for.inc45 %sub41.1 = add nsw i32 %12, -1 %idxprom42.1 = sext i32 %sub41.1 to i64 %arrayidx43.1 = getelementptr inbounds [19 x i32], ptr %c, i64 0, i64 %idxprom42.1 %17 = load i32, ptr %arrayidx43.1, align 4, !tbaa !5 %add44.1 = add nsw i32 %17, %add.1 br label %for.inc45.1 for.inc45.1: ; preds = %if.then.1, %for.inc45 %sum.1.1 = phi i32 [ %add44.1, %if.then.1 ], [ %add.1, %for.inc45 ] %indvars.iv.next82.1 = add nuw nsw i64 %indvars.iv81, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup24.loopexit.unr-lcssa, label %for.body25, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> #include <math.h> #include <string.h> #include <stdlib.h> int main(){ int a[100],b[100],c[100],n; int ans=0,tmp=0,tmp2=0; 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]); } for(int i=1;i<=n-1;i++){ scanf("%d",&c[i]); } for(int i=1;i<=n;i++){ tmp = a[i]; if(a[i]!=a[i-1]+1){ ans += b[tmp]; }else{ ans += b[tmp] + c[tmp-1]; } } printf("%d\n", ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274035/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274035/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [100 x i32], align 16 %b = alloca [100 x i32], align 16 %c = alloca [100 x i32], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %c) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not65 = icmp slt i32 %0, 1 br i1 %cmp.not65, label %for.cond.cleanup27, label %for.body for.cond3.preheader: ; preds = %for.body %cmp4.not67 = icmp slt i32 %1, 1 br i1 %cmp4.not67, label %for.cond.cleanup27, label %for.body6 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %2 br i1 %cmp.not.not, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.cond14.preheader: ; preds = %for.body6 %cmp15.not.not69 = icmp sgt i32 %3, 1 br i1 %cmp15.not.not69, label %for.body17, label %for.cond25.preheader for.body6: ; preds = %for.cond3.preheader, %for.body6 %indvars.iv77 = phi i64 [ %indvars.iv.next78, %for.body6 ], [ 1, %for.cond3.preheader ] %arrayidx8 = getelementptr inbounds [100 x i32], ptr %b, i64 0, i64 %indvars.iv77 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx8) %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp4.not.not = icmp slt i64 %indvars.iv77, %4 br i1 %cmp4.not.not, label %for.body6, label %for.cond14.preheader, !llvm.loop !11 for.cond25.preheader: ; preds = %for.body17, %for.cond14.preheader %.lcssa = phi i32 [ %3, %for.cond14.preheader ], [ %8, %for.body17 ] %cmp26.not71 = icmp slt i32 %.lcssa, 1 br i1 %cmp26.not71, label %for.cond.cleanup27, label %for.body28.preheader for.body28.preheader: ; preds = %for.cond25.preheader %5 = add i32 %.lcssa, 1 %wide.trip.count = zext i32 %5 to i64 %.pre = load i32, ptr %a, align 16, !tbaa !5 %6 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %6, 1 %7 = icmp eq i32 %5, 2 br i1 %7, label %for.cond.cleanup27.loopexit.unr-lcssa, label %for.body28.preheader.new for.body28.preheader.new: ; preds = %for.body28.preheader %unroll_iter = and i64 %6, -2 br label %for.body28 for.body17: ; preds = %for.cond14.preheader, %for.body17 %indvars.iv80 = phi i64 [ %indvars.iv.next81, %for.body17 ], [ 1, %for.cond14.preheader ] %arrayidx19 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %indvars.iv80 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx19) %indvars.iv.next81 = add nuw nsw i64 %indvars.iv80, 1 %8 = load i32, ptr %n, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp15.not.not = icmp slt i64 %indvars.iv.next81, %9 br i1 %cmp15.not.not, label %for.body17, label %for.cond25.preheader, !llvm.loop !12 for.cond.cleanup27.loopexit.unr-lcssa: ; preds = %for.inc47.1, %for.body28.preheader %ans.1.lcssa.ph = phi i32 [ undef, %for.body28.preheader ], [ %ans.1.1, %for.inc47.1 ] %.unr = phi i32 [ %.pre, %for.body28.preheader ], [ %17, %for.inc47.1 ] %indvars.iv83.unr = phi i64 [ 1, %for.body28.preheader ], [ %indvars.iv.next84.1, %for.inc47.1 ] %ans.072.unr = phi i32 [ 0, %for.body28.preheader ], [ %ans.1.1, %for.inc47.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup27, label %for.body28.epil for.body28.epil: ; preds = %for.cond.cleanup27.loopexit.unr-lcssa %arrayidx30.epil = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv83.unr %10 = load i32, ptr %arrayidx30.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %.unr, 1 %cmp36.not.epil = icmp eq i32 %10, %add.epil %idxprom40.epil = sext i32 %10 to i64 %arrayidx41.epil = getelementptr inbounds [100 x i32], ptr %b, i64 0, i64 %idxprom40.epil %11 = load i32, ptr %arrayidx41.epil, align 4, !tbaa !5 br i1 %cmp36.not.epil, label %if.else.epil, label %for.inc47.epil if.else.epil: ; preds = %for.body28.epil %sub42.epil = add nsw i32 %10, -1 %idxprom43.epil = sext i32 %sub42.epil to i64 %arrayidx44.epil = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %idxprom43.epil %12 = load i32, ptr %arrayidx44.epil, align 4, !tbaa !5 %add45.epil = add nsw i32 %12, %11 br label %for.inc47.epil for.inc47.epil: ; preds = %if.else.epil, %for.body28.epil %.pn.epil = phi i32 [ %add45.epil, %if.else.epil ], [ %11, %for.body28.epil ] %ans.1.epil = add nsw i32 %.pn.epil, %ans.072.unr br label %for.cond.cleanup27 for.cond.cleanup27: ; preds = %for.inc47.epil, %for.cond.cleanup27.loopexit.unr-lcssa, %for.cond3.preheader, %entry, %for.cond25.preheader %ans.0.lcssa = phi i32 [ 0, %for.cond25.preheader ], [ 0, %entry ], [ 0, %for.cond3.preheader ], [ %ans.1.lcssa.ph, %for.cond.cleanup27.loopexit.unr-lcssa ], [ %ans.1.epil, %for.inc47.epil ] %call50 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %a) #3 ret i32 0 for.body28: ; preds = %for.inc47.1, %for.body28.preheader.new %13 = phi i32 [ %.pre, %for.body28.preheader.new ], [ %17, %for.inc47.1 ] %indvars.iv83 = phi i64 [ 1, %for.body28.preheader.new ], [ %indvars.iv.next84.1, %for.inc47.1 ] %ans.072 = phi i32 [ 0, %for.body28.preheader.new ], [ %ans.1.1, %for.inc47.1 ] %niter = phi i64 [ 0, %for.body28.preheader.new ], [ %niter.next.1, %for.inc47.1 ] %arrayidx30 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv83 %14 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %add = add nsw i32 %13, 1 %cmp36.not = icmp eq i32 %14, %add %idxprom40 = sext i32 %14 to i64 %arrayidx41 = getelementptr inbounds [100 x i32], ptr %b, i64 0, i64 %idxprom40 %15 = load i32, ptr %arrayidx41, align 4, !tbaa !5 br i1 %cmp36.not, label %if.else, label %for.inc47 if.else: ; preds = %for.body28 %sub42 = add nsw i32 %14, -1 %idxprom43 = sext i32 %sub42 to i64 %arrayidx44 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %idxprom43 %16 = load i32, ptr %arrayidx44, align 4, !tbaa !5 %add45 = add nsw i32 %16, %15 br label %for.inc47 for.inc47: ; preds = %for.body28, %if.else %.pn = phi i32 [ %add45, %if.else ], [ %15, %for.body28 ] %ans.1 = add nsw i32 %.pn, %ans.072 %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %arrayidx30.1 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv.next84 %17 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %add.1 = add nsw i32 %14, 1 %cmp36.not.1 = icmp eq i32 %17, %add.1 %idxprom40.1 = sext i32 %17 to i64 %arrayidx41.1 = getelementptr inbounds [100 x i32], ptr %b, i64 0, i64 %idxprom40.1 %18 = load i32, ptr %arrayidx41.1, align 4, !tbaa !5 br i1 %cmp36.not.1, label %if.else.1, label %for.inc47.1 if.else.1: ; preds = %for.inc47 %sub42.1 = add nsw i32 %17, -1 %idxprom43.1 = sext i32 %sub42.1 to i64 %arrayidx44.1 = getelementptr inbounds [100 x i32], ptr %c, i64 0, i64 %idxprom43.1 %19 = load i32, ptr %arrayidx44.1, align 4, !tbaa !5 %add45.1 = add nsw i32 %19, %18 br label %for.inc47.1 for.inc47.1: ; preds = %if.else.1, %for.inc47 %.pn.1 = phi i32 [ %add45.1, %if.else.1 ], [ %18, %for.inc47 ] %ans.1.1 = add nsw i32 %.pn.1, %ans.1 %indvars.iv.next84.1 = add nuw nsw i64 %indvars.iv83, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond.cleanup27.loopexit.unr-lcssa, label %for.body28, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10}
#include <stdio.h> int main(){ int n,sum; scanf("%d",&n); int a[n],b[n],c[n]; for(int i=1;i<=n;i++){ scanf("%d",&a[i]); } for(int i=1;i<=n;i++){ scanf("%d",&b[i]); } for(int i=1;i<n;i++){ scanf("%d",&c[i]); } sum=b[a[1]]; for(int i=2;i<=n;i++){ //printf("b[%d]=%d\n",i,b[i]); if(a[i]==a[i-1]+1){ sum+=(b[a[i]]+c[a[i]-1]); }else{ sum+=b[a[i]]; } //printf("%d\n",sum); } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274079/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274079/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = zext i32 %3 to i64 %vla1 = alloca i32, i64 %4, align 16 %vla2 = alloca i32, i64 %4, align 16 %cmp.not73 = icmp slt i32 %3, 1 br i1 %cmp.not73, label %for.cond.cleanup18.thread, label %for.body for.cond5.preheader: ; preds = %for.body %cmp6.not75 = icmp slt i32 %5, 1 br i1 %cmp6.not75, label %for.cond.cleanup18.thread, label %for.body8 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %6 br i1 %cmp.not.not, label %for.body, label %for.cond5.preheader, !llvm.loop !9 for.cond16.preheader: ; preds = %for.body8 %cmp1777 = icmp sgt i32 %7, 1 br i1 %cmp1777, label %for.body19, label %for.cond.cleanup18.thread for.body8: ; preds = %for.cond5.preheader, %for.body8 %indvars.iv85 = phi i64 [ %indvars.iv.next86, %for.body8 ], [ 1, %for.cond5.preheader ] %arrayidx10 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv85 %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx10) %indvars.iv.next86 = add nuw nsw i64 %indvars.iv85, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %8 = sext i32 %7 to i64 %cmp6.not.not = icmp slt i64 %indvars.iv85, %8 br i1 %cmp6.not.not, label %for.body8, label %for.cond16.preheader, !llvm.loop !11 for.cond.cleanup18.thread: ; preds = %for.cond16.preheader, %for.cond5.preheader, %entry %arrayidx2698 = getelementptr inbounds i32, ptr %vla, i64 1 %9 = load i32, ptr %arrayidx2698, align 4, !tbaa !5 %idxprom2799 = sext i32 %9 to i64 %arrayidx28100 = getelementptr inbounds i32, ptr %vla1, i64 %idxprom2799 %10 = load i32, ptr %arrayidx28100, align 4, !tbaa !5 br label %for.cond.cleanup32 for.cond.cleanup18: ; preds = %for.body19 %arrayidx26 = getelementptr inbounds i32, ptr %vla, i64 1 %11 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %idxprom27 = sext i32 %11 to i64 %arrayidx28 = getelementptr inbounds i32, ptr %vla1, i64 %idxprom27 %12 = load i32, ptr %arrayidx28, align 4, !tbaa !5 %cmp31.not79 = icmp slt i32 %17, 2 br i1 %cmp31.not79, label %for.cond.cleanup32, label %for.body33.preheader for.body33.preheader: ; preds = %for.cond.cleanup18 %13 = add i32 %17, 1 %wide.trip.count = zext i32 %13 to i64 %xtraiter = and i64 %wide.trip.count, 1 %14 = icmp eq i32 %13, 3 br i1 %14, label %for.cond.cleanup32.loopexit.unr-lcssa, label %for.body33.preheader.new for.body33.preheader.new: ; preds = %for.body33.preheader %15 = and i64 %wide.trip.count, 4294967294 %16 = add nsw i64 %15, -4 br label %for.body33 for.body19: ; preds = %for.cond16.preheader, %for.body19 %indvars.iv88 = phi i64 [ %indvars.iv.next89, %for.body19 ], [ 1, %for.cond16.preheader ] %arrayidx21 = getelementptr inbounds i32, ptr %vla2, i64 %indvars.iv88 %call22 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx21) %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1 %17 = load i32, ptr %n, align 4, !tbaa !5 %18 = sext i32 %17 to i64 %cmp17 = icmp slt i64 %indvars.iv.next89, %18 br i1 %cmp17, label %for.body19, label %for.cond.cleanup18, !llvm.loop !12 for.cond.cleanup32.loopexit.unr-lcssa: ; preds = %for.inc55.1, %for.body33.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body33.preheader ], [ %sum.1.1, %for.inc55.1 ] %.unr = phi i32 [ %11, %for.body33.preheader ], [ %26, %for.inc55.1 ] %indvars.iv91.unr = phi i64 [ 2, %for.body33.preheader ], [ %indvars.iv.next92.1, %for.inc55.1 ] %sum.080.unr = phi i32 [ %12, %for.body33.preheader ], [ %sum.1.1, %for.inc55.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup32, label %for.body33.epil for.body33.epil: ; preds = %for.cond.cleanup32.loopexit.unr-lcssa %arrayidx35.epil = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv91.unr %19 = load i32, ptr %arrayidx35.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %.unr, 1 %cmp38.epil = icmp eq i32 %19, %add.epil %idxprom41.epil = sext i32 %19 to i64 %arrayidx42.epil = getelementptr inbounds i32, ptr %vla1, i64 %idxprom41.epil %20 = load i32, ptr %arrayidx42.epil, align 4, !tbaa !5 br i1 %cmp38.epil, label %if.then.epil, label %for.inc55.epil if.then.epil: ; preds = %for.body33.epil %sub45.epil = add nsw i32 %19, -1 %idxprom46.epil = sext i32 %sub45.epil to i64 %arrayidx47.epil = getelementptr inbounds i32, ptr %vla2, i64 %idxprom46.epil %21 = load i32, ptr %arrayidx47.epil, align 4, !tbaa !5 %add48.epil = add nsw i32 %21, %20 br label %for.inc55.epil for.inc55.epil: ; preds = %if.then.epil, %for.body33.epil %add48.pn.epil = phi i32 [ %add48.epil, %if.then.epil ], [ %20, %for.body33.epil ] %sum.1.epil = add nsw i32 %add48.pn.epil, %sum.080.unr br label %for.cond.cleanup32 for.cond.cleanup32: ; preds = %for.inc55.epil, %for.cond.cleanup32.loopexit.unr-lcssa, %for.cond.cleanup18.thread, %for.cond.cleanup18 %sum.0.lcssa = phi i32 [ %12, %for.cond.cleanup18 ], [ %10, %for.cond.cleanup18.thread ], [ %sum.1.lcssa.ph, %for.cond.cleanup32.loopexit.unr-lcssa ], [ %sum.1.epil, %for.inc55.epil ] %call58 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 for.body33: ; preds = %for.inc55.1, %for.body33.preheader.new %22 = phi i32 [ %11, %for.body33.preheader.new ], [ %26, %for.inc55.1 ] %indvars.iv91 = phi i64 [ 2, %for.body33.preheader.new ], [ %indvars.iv.next92.1, %for.inc55.1 ] %sum.080 = phi i32 [ %12, %for.body33.preheader.new ], [ %sum.1.1, %for.inc55.1 ] %niter = phi i64 [ 0, %for.body33.preheader.new ], [ %niter.next.1, %for.inc55.1 ] %arrayidx35 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv91 %23 = load i32, ptr %arrayidx35, align 8, !tbaa !5 %add = add nsw i32 %22, 1 %cmp38 = icmp eq i32 %23, %add %idxprom41 = sext i32 %23 to i64 %arrayidx42 = getelementptr inbounds i32, ptr %vla1, i64 %idxprom41 %24 = load i32, ptr %arrayidx42, align 4, !tbaa !5 br i1 %cmp38, label %if.then, label %for.inc55 if.then: ; preds = %for.body33 %sub45 = add nsw i32 %23, -1 %idxprom46 = sext i32 %sub45 to i64 %arrayidx47 = getelementptr inbounds i32, ptr %vla2, i64 %idxprom46 %25 = load i32, ptr %arrayidx47, align 4, !tbaa !5 %add48 = add nsw i32 %25, %24 br label %for.inc55 for.inc55: ; preds = %for.body33, %if.then %add48.pn = phi i32 [ %add48, %if.then ], [ %24, %for.body33 ] %sum.1 = add nsw i32 %add48.pn, %sum.080 %indvars.iv.next92 = or i64 %indvars.iv91, 1 %arrayidx35.1 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv.next92 %26 = load i32, ptr %arrayidx35.1, align 4, !tbaa !5 %add.1 = add nsw i32 %23, 1 %cmp38.1 = icmp eq i32 %26, %add.1 %idxprom41.1 = sext i32 %26 to i64 %arrayidx42.1 = getelementptr inbounds i32, ptr %vla1, i64 %idxprom41.1 %27 = load i32, ptr %arrayidx42.1, align 4, !tbaa !5 br i1 %cmp38.1, label %if.then.1, label %for.inc55.1 if.then.1: ; preds = %for.inc55 %sub45.1 = add nsw i32 %26, -1 %idxprom46.1 = sext i32 %sub45.1 to i64 %arrayidx47.1 = getelementptr inbounds i32, ptr %vla2, i64 %idxprom46.1 %28 = load i32, ptr %arrayidx47.1, align 4, !tbaa !5 %add48.1 = add nsw i32 %28, %27 br label %for.inc55.1 for.inc55.1: ; preds = %if.then.1, %for.inc55 %add48.pn.1 = phi i32 [ %add48.1, %if.then.1 ], [ %27, %for.inc55 ] %sum.1.1 = add nsw i32 %add48.pn.1, %sum.1 %indvars.iv.next92.1 = add nuw nsw i64 %indvars.iv91, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter, %16 br i1 %niter.ncmp.1, label %for.cond.cleanup32.loopexit.unr-lcssa, label %for.body33, !llvm.loop !13 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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 <math.h> #include <stdlib.h> #include <string.h> #include <stdio.h> int main() { int n; scanf("%d",&n); int a[50],b[50],c[50]; for(int i=0;i<n;i++){ scanf("%d",&a[i]); } for(int i=0;i<n;i++){ scanf("%d",&b[i]); } for(int i=0;i<n-1;i++){ scanf("%d",&c[i]); } int ans=0; for(int i=0;i<n;i++){ ans+=b[a[i]-1]; } for(int i=0;i<n-1;i++){ if(a[i+1]==a[i]+1){ ans+=c[a[i]-1]; } } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274121/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274121/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a = alloca [50 x i32], align 16 %b = alloca [50 x i32], align 16 %c = alloca [50 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %b) #3 call void @llvm.lifetime.start.p0(i64 200, ptr nonnull %c) #3 %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp74 = icmp sgt i32 %0, 0 br i1 %cmp74, label %for.body, label %for.cond.cleanup41 for.cond3.preheader: ; preds = %for.body %cmp476 = icmp sgt i32 %1, 0 br i1 %cmp476, label %for.body6, label %for.cond.cleanup41 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.cond3.preheader, !llvm.loop !9 for.cond14.preheader: ; preds = %for.body6 %sub78 = add nsw i32 %3, -1 %cmp1579 = icmp sgt i32 %3, 1 br i1 %cmp1579, label %for.body17, label %for.cond25.preheader for.body6: ; preds = %for.cond3.preheader, %for.body6 %indvars.iv93 = phi i64 [ %indvars.iv.next94, %for.body6 ], [ 0, %for.cond3.preheader ] %arrayidx8 = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %indvars.iv93 %call9 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx8) %indvars.iv.next94 = add nuw nsw i64 %indvars.iv93, 1 %3 = load i32, ptr %n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp4 = icmp slt i64 %indvars.iv.next94, %4 br i1 %cmp4, label %for.body6, label %for.cond14.preheader, !llvm.loop !11 for.cond25.preheader: ; preds = %for.body17, %for.cond14.preheader %.lcssa = phi i32 [ %3, %for.cond14.preheader ], [ %6, %for.body17 ] %sub.lcssa = phi i32 [ %sub78, %for.cond14.preheader ], [ %sub, %for.body17 ] %cmp2682 = icmp sgt i32 %.lcssa, 0 br i1 %cmp2682, label %for.body28.preheader, label %for.cond38.preheader for.body28.preheader: ; preds = %for.cond25.preheader %wide.trip.count = zext i32 %.lcssa to i64 %xtraiter = and i64 %wide.trip.count, 3 %5 = icmp ult i32 %.lcssa, 4 br i1 %5, label %for.cond38.preheader.loopexit.unr-lcssa, label %for.body28.preheader.new for.body28.preheader.new: ; preds = %for.body28.preheader %unroll_iter = and i64 %wide.trip.count, 4294967292 br label %for.body28 for.body17: ; preds = %for.cond14.preheader, %for.body17 %indvars.iv96 = phi i64 [ %indvars.iv.next97, %for.body17 ], [ 0, %for.cond14.preheader ] %arrayidx19 = getelementptr inbounds [50 x i32], ptr %c, i64 0, i64 %indvars.iv96 %call20 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx19) %indvars.iv.next97 = add nuw nsw i64 %indvars.iv96, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %6, -1 %7 = sext i32 %sub to i64 %cmp15 = icmp slt i64 %indvars.iv.next97, %7 br i1 %cmp15, label %for.body17, label %for.cond25.preheader, !llvm.loop !12 for.cond38.preheader.loopexit.unr-lcssa: ; preds = %for.body28, %for.body28.preheader %add.lcssa.ph = phi i32 [ undef, %for.body28.preheader ], [ %add.3, %for.body28 ] %indvars.iv99.unr = phi i64 [ 0, %for.body28.preheader ], [ %indvars.iv.next100.3, %for.body28 ] %ans.083.unr = phi i32 [ 0, %for.body28.preheader ], [ %add.3, %for.body28 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond38.preheader, label %for.body28.epil for.body28.epil: ; preds = %for.cond38.preheader.loopexit.unr-lcssa, %for.body28.epil %indvars.iv99.epil = phi i64 [ %indvars.iv.next100.epil, %for.body28.epil ], [ %indvars.iv99.unr, %for.cond38.preheader.loopexit.unr-lcssa ] %ans.083.epil = phi i32 [ %add.epil, %for.body28.epil ], [ %ans.083.unr, %for.cond38.preheader.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body28.epil ], [ 0, %for.cond38.preheader.loopexit.unr-lcssa ] %arrayidx30.epil = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv99.epil %8 = load i32, ptr %arrayidx30.epil, align 4, !tbaa !5 %sub31.epil = add nsw i32 %8, -1 %idxprom32.epil = sext i32 %sub31.epil to i64 %arrayidx33.epil = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %idxprom32.epil %9 = load i32, ptr %arrayidx33.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %9, %ans.083.epil %indvars.iv.next100.epil = add nuw nsw i64 %indvars.iv99.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.cond38.preheader, label %for.body28.epil, !llvm.loop !13 for.cond38.preheader: ; preds = %for.cond38.preheader.loopexit.unr-lcssa, %for.body28.epil, %for.cond25.preheader %ans.0.lcssa = phi i32 [ 0, %for.cond25.preheader ], [ %add.lcssa.ph, %for.cond38.preheader.loopexit.unr-lcssa ], [ %add.epil, %for.body28.epil ] %cmp4086 = icmp sgt i32 %sub.lcssa, 0 br i1 %cmp4086, label %for.body42.preheader, label %for.cond.cleanup41 for.body42.preheader: ; preds = %for.cond38.preheader %wide.trip.count105 = zext i32 %sub.lcssa to i64 %.pre = load i32, ptr %a, align 16, !tbaa !5 %xtraiter130 = and i64 %wide.trip.count105, 1 %10 = icmp eq i32 %sub.lcssa, 1 br i1 %10, label %for.cond.cleanup41.loopexit.unr-lcssa, label %for.body42.preheader.new for.body42.preheader.new: ; preds = %for.body42.preheader %unroll_iter134 = and i64 %wide.trip.count105, 4294967294 br label %for.body42 for.body28: ; preds = %for.body28, %for.body28.preheader.new %indvars.iv99 = phi i64 [ 0, %for.body28.preheader.new ], [ %indvars.iv.next100.3, %for.body28 ] %ans.083 = phi i32 [ 0, %for.body28.preheader.new ], [ %add.3, %for.body28 ] %niter = phi i64 [ 0, %for.body28.preheader.new ], [ %niter.next.3, %for.body28 ] %arrayidx30 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv99 %11 = load i32, ptr %arrayidx30, align 16, !tbaa !5 %sub31 = add nsw i32 %11, -1 %idxprom32 = sext i32 %sub31 to i64 %arrayidx33 = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %idxprom32 %12 = load i32, ptr %arrayidx33, align 4, !tbaa !5 %add = add nsw i32 %12, %ans.083 %indvars.iv.next100 = or i64 %indvars.iv99, 1 %arrayidx30.1 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv.next100 %13 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %sub31.1 = add nsw i32 %13, -1 %idxprom32.1 = sext i32 %sub31.1 to i64 %arrayidx33.1 = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %idxprom32.1 %14 = load i32, ptr %arrayidx33.1, align 4, !tbaa !5 %add.1 = add nsw i32 %14, %add %indvars.iv.next100.1 = or i64 %indvars.iv99, 2 %arrayidx30.2 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv.next100.1 %15 = load i32, ptr %arrayidx30.2, align 8, !tbaa !5 %sub31.2 = add nsw i32 %15, -1 %idxprom32.2 = sext i32 %sub31.2 to i64 %arrayidx33.2 = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %idxprom32.2 %16 = load i32, ptr %arrayidx33.2, align 4, !tbaa !5 %add.2 = add nsw i32 %16, %add.1 %indvars.iv.next100.2 = or i64 %indvars.iv99, 3 %arrayidx30.3 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv.next100.2 %17 = load i32, ptr %arrayidx30.3, align 4, !tbaa !5 %sub31.3 = add nsw i32 %17, -1 %idxprom32.3 = sext i32 %sub31.3 to i64 %arrayidx33.3 = getelementptr inbounds [50 x i32], ptr %b, i64 0, i64 %idxprom32.3 %18 = load i32, ptr %arrayidx33.3, align 4, !tbaa !5 %add.3 = add nsw i32 %18, %add.2 %indvars.iv.next100.3 = add nuw nsw i64 %indvars.iv99, 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.cond38.preheader.loopexit.unr-lcssa, label %for.body28, !llvm.loop !15 for.cond.cleanup41.loopexit.unr-lcssa.loopexit: ; preds = %for.inc56.1 %19 = add nuw nsw i64 %indvars.iv102, 3 br label %for.cond.cleanup41.loopexit.unr-lcssa for.cond.cleanup41.loopexit.unr-lcssa: ; preds = %for.cond.cleanup41.loopexit.unr-lcssa.loopexit, %for.body42.preheader %ans.2.lcssa.ph = phi i32 [ undef, %for.body42.preheader ], [ %ans.2.1, %for.cond.cleanup41.loopexit.unr-lcssa.loopexit ] %.unr = phi i32 [ %.pre, %for.body42.preheader ], [ %25, %for.cond.cleanup41.loopexit.unr-lcssa.loopexit ] %indvars.iv102.unr = phi i64 [ 1, %for.body42.preheader ], [ %19, %for.cond.cleanup41.loopexit.unr-lcssa.loopexit ] %ans.187.unr = phi i32 [ %ans.0.lcssa, %for.body42.preheader ], [ %ans.2.1, %for.cond.cleanup41.loopexit.unr-lcssa.loopexit ] %lcmp.mod132.not = icmp eq i64 %xtraiter130, 0 br i1 %lcmp.mod132.not, label %for.cond.cleanup41, label %for.body42.epil for.body42.epil: ; preds = %for.cond.cleanup41.loopexit.unr-lcssa %arrayidx45.epil = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv102.unr %20 = load i32, ptr %arrayidx45.epil, align 4, !tbaa !5 %add48.epil = add nsw i32 %.unr, 1 %cmp49.epil = icmp eq i32 %20, %add48.epil br i1 %cmp49.epil, label %if.then.epil, label %for.cond.cleanup41 if.then.epil: ; preds = %for.body42.epil %sub52.epil = add nsw i32 %.unr, -1 %idxprom53.epil = sext i32 %sub52.epil to i64 %arrayidx54.epil = getelementptr inbounds [50 x i32], ptr %c, i64 0, i64 %idxprom53.epil %21 = load i32, ptr %arrayidx54.epil, align 4, !tbaa !5 %add55.epil = add nsw i32 %21, %ans.187.unr br label %for.cond.cleanup41 for.cond.cleanup41: ; preds = %for.cond.cleanup41.loopexit.unr-lcssa, %if.then.epil, %for.body42.epil, %entry, %for.cond3.preheader, %for.cond38.preheader %ans.1.lcssa = phi i32 [ %ans.0.lcssa, %for.cond38.preheader ], [ 0, %for.cond3.preheader ], [ 0, %entry ], [ %ans.2.lcssa.ph, %for.cond.cleanup41.loopexit.unr-lcssa ], [ %add55.epil, %if.then.epil ], [ %ans.187.unr, %for.body42.epil ] %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.1.lcssa) call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %c) #3 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 200, ptr nonnull %a) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 for.body42: ; preds = %for.inc56.1, %for.body42.preheader.new %22 = phi i32 [ %.pre, %for.body42.preheader.new ], [ %25, %for.inc56.1 ] %indvars.iv102 = phi i64 [ 0, %for.body42.preheader.new ], [ %indvars.iv.next103.1, %for.inc56.1 ] %ans.187 = phi i32 [ %ans.0.lcssa, %for.body42.preheader.new ], [ %ans.2.1, %for.inc56.1 ] %niter135 = phi i64 [ 0, %for.body42.preheader.new ], [ %niter135.next.1, %for.inc56.1 ] %indvars.iv.next103 = or i64 %indvars.iv102, 1 %arrayidx45 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv.next103 %23 = load i32, ptr %arrayidx45, align 4, !tbaa !5 %add48 = add nsw i32 %22, 1 %cmp49 = icmp eq i32 %23, %add48 br i1 %cmp49, label %if.then, label %for.inc56 if.then: ; preds = %for.body42 %sub52 = add nsw i32 %22, -1 %idxprom53 = sext i32 %sub52 to i64 %arrayidx54 = getelementptr inbounds [50 x i32], ptr %c, i64 0, i64 %idxprom53 %24 = load i32, ptr %arrayidx54, align 4, !tbaa !5 %add55 = add nsw i32 %24, %ans.187 br label %for.inc56 for.inc56: ; preds = %for.body42, %if.then %ans.2 = phi i32 [ %add55, %if.then ], [ %ans.187, %for.body42 ] %indvars.iv.next103.1 = add nuw nsw i64 %indvars.iv102, 2 %arrayidx45.1 = getelementptr inbounds [50 x i32], ptr %a, i64 0, i64 %indvars.iv.next103.1 %25 = load i32, ptr %arrayidx45.1, align 8, !tbaa !5 %add48.1 = add nsw i32 %23, 1 %cmp49.1 = icmp eq i32 %25, %add48.1 br i1 %cmp49.1, label %if.then.1, label %for.inc56.1 if.then.1: ; preds = %for.inc56 %sub52.1 = add nsw i32 %23, -1 %idxprom53.1 = sext i32 %sub52.1 to i64 %arrayidx54.1 = getelementptr inbounds [50 x i32], ptr %c, i64 0, i64 %idxprom53.1 %26 = load i32, ptr %arrayidx54.1, align 4, !tbaa !5 %add55.1 = add nsw i32 %26, %ans.2 br label %for.inc56.1 for.inc56.1: ; preds = %if.then.1, %for.inc56 %ans.2.1 = phi i32 [ %add55.1, %if.then.1 ], [ %ans.2, %for.inc56 ] %niter135.next.1 = add i64 %niter135, 2 %niter135.ncmp.1 = icmp eq i64 %niter135.next.1, %unroll_iter134 br i1 %niter135.ncmp.1, label %for.cond.cleanup41.loopexit.unr-lcssa.loopexit, label %for.body42, !llvm.loop !16 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !14} !14 = !{!"llvm.loop.unroll.disable"} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10}
#include <stdio.h> int main(){ int n,k,i,j; while (1) { scanf("%d %d",&n,&k); if (n==0&&k==0) { return 0; } int c[100000],blank=0,flag=0,max=0; for (i=0; i<100000; i++) { c[i]=0; } for (i=0; i<k; i++) { scanf("%d",&j); if (j==0) { blank=1; } c[j-1]=1; } for (i=0; i<n; i++) { int count=0; flag=blank; for (j=i; j<n; j++) { if (c[j]==0) { if (flag==0) { break; } flag--; } count++; } if (max<count) { max=count; } } printf("%d\n",max); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274165/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274165/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %j = alloca i32, align 4 %c = alloca [100000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %j) #5 %call63 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp64 = icmp eq i32 %0, 0 %1 = load i32, ptr %k, align 4 %cmp165 = icmp eq i32 %1, 0 %or.cond66 = select i1 %cmp64, i1 %cmp165, i1 false br i1 %or.cond66, label %if.then, label %if.end if.then: ; preds = %for.end38, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %j) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 if.end: ; preds = %entry, %for.end38 %2 = phi i32 [ %10, %for.end38 ], [ %0, %entry ] %3 = phi i32 [ %11, %for.end38 ], [ %1, %entry ] call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %c) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) %c, i8 0, i64 400000, i1 false), !tbaa !5 %cmp453 = icmp sgt i32 %3, 0 br i1 %cmp453, label %for.body5, label %for.cond15.preheader for.cond15.preheader.loopexit: ; preds = %for.body5 %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.cond15.preheader for.cond15.preheader: ; preds = %for.cond15.preheader.loopexit, %if.end %4 = phi i32 [ %2, %if.end ], [ %.pre, %for.cond15.preheader.loopexit ] %blank.0.lcssa = phi i32 [ 0, %if.end ], [ %spec.select, %for.cond15.preheader.loopexit ] %cmp1659 = icmp sgt i32 %4, 0 br i1 %cmp1659, label %for.cond18.preheader.preheader, label %for.end38 for.cond18.preheader.preheader: ; preds = %for.cond15.preheader %wide.trip.count = zext i32 %4 to i64 %sext = sext i32 %4 to i64 br label %for.cond18.preheader for.body5: ; preds = %if.end, %for.body5 %blank.055 = phi i32 [ %spec.select, %for.body5 ], [ 0, %if.end ] %i.154 = phi i32 [ %inc13, %for.body5 ], [ 0, %if.end ] %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %j) %5 = load i32, ptr %j, align 4, !tbaa !5 %cmp7 = icmp eq i32 %5, 0 %spec.select = select i1 %cmp7, i32 1, i32 %blank.055 %sub = add nsw i32 %5, -1 %idxprom10 = sext i32 %sub to i64 %arrayidx11 = getelementptr inbounds [100000 x i32], ptr %c, i64 0, i64 %idxprom10 store i32 1, ptr %arrayidx11, align 4, !tbaa !5 %inc13 = add nuw nsw i32 %i.154, 1 %6 = load i32, ptr %k, align 4, !tbaa !5 %cmp4 = icmp slt i32 %inc13, %6 br i1 %cmp4, label %for.body5, label %for.cond15.preheader.loopexit, !llvm.loop !9 for.cond18.preheader: ; preds = %for.cond18.preheader.preheader, %for.end32 %indvars.iv70 = phi i32 [ 1, %for.cond18.preheader.preheader ], [ %indvars.iv.next71, %for.end32 ] %indvars.iv = phi i64 [ 0, %for.cond18.preheader.preheader ], [ %indvars.iv.next, %for.end32 ] %max.061 = phi i32 [ 0, %for.cond18.preheader.preheader ], [ %spec.select51, %for.end32 ] %smax = call i32 @llvm.smax.i32(i32 %4, i32 %indvars.iv70) br label %for.body20 for.body20: ; preds = %for.cond18.preheader, %if.end28 %indvars.iv68 = phi i64 [ %indvars.iv, %for.cond18.preheader ], [ %indvars.iv.next69, %if.end28 ] %count.058 = phi i32 [ 0, %for.cond18.preheader ], [ %inc29, %if.end28 ] %flag.057 = phi i32 [ %blank.0.lcssa, %for.cond18.preheader ], [ %flag.1, %if.end28 ] %arrayidx22 = getelementptr inbounds [100000 x i32], ptr %c, i64 0, i64 %indvars.iv68 %7 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %cmp23 = icmp eq i32 %7, 0 br i1 %cmp23, label %if.then24, label %if.end28 if.then24: ; preds = %for.body20 %cmp25 = icmp eq i32 %flag.057, 0 br i1 %cmp25, label %for.end32.split.loop.exit, label %if.end28 if.end28: ; preds = %if.then24, %for.body20 %flag.1 = phi i32 [ %flag.057, %for.body20 ], [ 0, %if.then24 ] %inc29 = add nuw nsw i32 %count.058, 1 %indvars.iv.next69 = add nuw nsw i64 %indvars.iv68, 1 %8 = icmp slt i64 %indvars.iv.next69, %sext br i1 %8, label %for.body20, label %for.end32, !llvm.loop !11 for.end32.split.loop.exit: ; preds = %if.then24 %9 = trunc i64 %indvars.iv68 to i32 br label %for.end32 for.end32: ; preds = %if.end28, %for.end32.split.loop.exit %storemerge.lcssa = phi i32 [ %9, %for.end32.split.loop.exit ], [ %smax, %if.end28 ] %count.0.lcssa = phi i32 [ %count.058, %for.end32.split.loop.exit ], [ %inc29, %if.end28 ] %spec.select51 = call i32 @llvm.smax.i32(i32 %max.061, i32 %count.0.lcssa) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %indvars.iv.next71 = add nuw i32 %indvars.iv70, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count br i1 %exitcond.not, label %for.cond15.for.end38_crit_edge, label %for.cond18.preheader, !llvm.loop !12 for.cond15.for.end38_crit_edge: ; preds = %for.end32 store i32 %storemerge.lcssa, ptr %j, align 4, !tbaa !5 br label %for.end38 for.end38: ; preds = %for.cond15.for.end38_crit_edge, %for.cond15.preheader %max.0.lcssa = phi i32 [ %spec.select51, %for.cond15.for.end38_crit_edge ], [ 0, %for.cond15.preheader ] %call39 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %max.0.lcssa) call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %c) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k) %10 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp eq i32 %10, 0 %11 = load i32, ptr %k, align 4 %cmp1 = icmp eq i32 %11, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %if.end } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(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 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> int main(void) { int a; int b; int n; int i; int s = 0; while (scanf("%d %d %d", &a, &b, &n) != EOF){ for ( i = 0; i < n; i++){ a *= 10; s += (a / b) % 10; a %= b; } printf("%d\n", s); s = 0; } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274208/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274208/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [9 x i8] c"%d %d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %n = 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 %n) #3 %call11 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %n) %cmp.not12 = icmp eq i32 %call11, -1 br i1 %cmp.not12, label %while.end, label %for.cond.preheader for.cond.preheader: ; preds = %entry, %for.end %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp17 = icmp sgt i32 %0, 0 br i1 %cmp17, label %for.body.lr.ph, label %for.end for.body.lr.ph: ; preds = %for.cond.preheader %a.promoted = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.body %s.110 = phi i32 [ 0, %for.body.lr.ph ], [ %add, %for.body ] %i.09 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.body ] %rem268 = phi i32 [ %a.promoted, %for.body.lr.ph ], [ %rem2, %for.body ] %mul = mul nsw i32 %rem268, 10 %div = sdiv i32 %mul, %1 %rem = srem i32 %div, 10 %add = add nsw i32 %rem, %s.110 %rem2 = srem i32 %mul, %1 %inc = add nuw nsw i32 %i.09, 1 %exitcond.not = icmp eq i32 %inc, %0 br i1 %exitcond.not, label %for.cond.for.end_crit_edge, label %for.body, !llvm.loop !9 for.cond.for.end_crit_edge: ; preds = %for.body store i32 %rem2, ptr %a, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %for.cond.preheader %s.1.lcssa = phi i32 [ %add, %for.cond.for.end_crit_edge ], [ 0, %for.cond.preheader ] %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %s.1.lcssa) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %n) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %for.cond.preheader, !llvm.loop !11 while.end: ; preds = %for.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> int main(void) { int a,b,n,sum,i; while (scanf("%d %d %d\n",&a,&b,&n)!=EOF) { sum=0; a=(a%b)*10; for (i=0; i<n; i++) { sum+=a/b; a=(a%b)*10; } printf("%d\n",sum); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274266/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274266/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @.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 %n = 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 %n) #3 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %n) %cmp.not13 = icmp eq i32 %call12, -1 br i1 %cmp.not13, label %while.end, label %while.body while.body: ; preds = %entry, %for.end %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %rem = srem i32 %0, %1 %mul = mul nsw i32 %rem, 10 store i32 %mul, ptr %a, align 4, !tbaa !5 %2 = load i32, ptr %n, align 4, !tbaa !5 %cmp18 = icmp sgt i32 %2, 0 br i1 %cmp18, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %while.body %xtraiter = and i32 %2, 1 %3 = icmp eq i32 %2, 1 br i1 %3, label %for.cond.for.end_crit_edge.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i32 %2, -2 br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %sum.010 = phi i32 [ 0, %for.body.preheader.new ], [ %add.1, %for.body ] %mul379 = phi i32 [ %mul, %for.body.preheader.new ], [ %mul3.1, %for.body ] %niter = phi i32 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ] %div = sdiv i32 %mul379, %1 %add = add nsw i32 %div, %sum.010 %rem2 = srem i32 %mul379, %1 %mul3 = mul nsw i32 %rem2, 10 %div.1 = sdiv i32 %mul3, %1 %add.1 = add nsw i32 %div.1, %add %rem2.1 = srem i32 %mul3, %1 %mul3.1 = mul nsw i32 %rem2.1, 10 %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.cond.for.end_crit_edge.unr-lcssa, label %for.body, !llvm.loop !9 for.cond.for.end_crit_edge.unr-lcssa: ; preds = %for.body, %for.body.preheader %add.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %add.1, %for.body ] %mul3.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %mul3.1, %for.body ] %sum.010.unr = phi i32 [ 0, %for.body.preheader ], [ %add.1, %for.body ] %mul379.unr = phi i32 [ %mul, %for.body.preheader ], [ %mul3.1, %for.body ] %lcmp.mod.not = icmp eq i32 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.for.end_crit_edge, label %for.body.epil for.body.epil: ; preds = %for.cond.for.end_crit_edge.unr-lcssa %div.epil = sdiv i32 %mul379.unr, %1 %add.epil = add nsw i32 %div.epil, %sum.010.unr %rem2.epil = srem i32 %mul379.unr, %1 %mul3.epil = mul nsw i32 %rem2.epil, 10 br label %for.cond.for.end_crit_edge for.cond.for.end_crit_edge: ; preds = %for.cond.for.end_crit_edge.unr-lcssa, %for.body.epil %add.lcssa = phi i32 [ %add.lcssa.ph, %for.cond.for.end_crit_edge.unr-lcssa ], [ %add.epil, %for.body.epil ] %mul3.lcssa = phi i32 [ %mul3.lcssa.ph, %for.cond.for.end_crit_edge.unr-lcssa ], [ %mul3.epil, %for.body.epil ] store i32 %mul3.lcssa, ptr %a, align 4, !tbaa !5 br label %for.end for.end: ; preds = %for.cond.for.end_crit_edge, %while.body %sum.0.lcssa = phi i32 [ %add.lcssa, %for.cond.for.end_crit_edge ], [ 0, %while.body ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %n) %cmp.not = icmp eq i32 %call, -1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !11 while.end: ; preds = %for.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #define SETMAX 3 #define RUNMAX 8 typedef struct _runner { int num; double rtime; } runner_t; void swap( runner_t * run1, runner_t * run2 ) { runner_t tmp; tmp.num = run1->num; tmp.rtime = run1->rtime; run1->num = run2->num; run1->rtime = run2->rtime; run2->num = tmp.num; run2->rtime = tmp.rtime; } void sort( runner_t * run, int arysize ) { int i, j; int n = sizeof( run ) / sizeof( runner_t ); for ( i = 0 ; i < arysize; i++ ) { for ( j = i+1 ; j < arysize ; j++ ) { if ( run[i].rtime > run[j].rtime ) { swap( &run[i], &run[j] ); } } } } int main() { runner_t run[SETMAX][RUNMAX]; runner_t third[(RUNMAX-2)*3]; int i = 0, j = 0, k = 0; for ( i = 0 ; i < SETMAX ; i++ ) { for ( j = 0 ; j < RUNMAX ; j++ ) { scanf( "%d %lf", &run[i][j].num, &run[i][j].rtime ); } } k = 0; for ( i = 0 ; i < SETMAX ; i++ ) { sort( run[i], RUNMAX ); for ( j = 2 ; j < RUNMAX ; j++ ) { third[k].num = run[i][j].num; third[k].rtime = run[i][j].rtime; k++; } } sort( third, k ); for ( i = 0 ; i < SETMAX ; i++ ) { for ( j = 0 ; j < 2 ; j++ ) { printf( "%d %.2lf\n", run[i][j].num, run[i][j].rtime ); } } for ( i = 0 ; i < 2 ; i++ ) { printf( "%d %.2lf\n", third[i].num, third[i].rtime ); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274316/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274316/source.c" target datalayout = "e-m:e-p270: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._runner = type { i32, double } @.str = private unnamed_addr constant [7 x i8] c"%d %lf\00", align 1 @.str.1 = private unnamed_addr constant [10 x i8] c"%d %.2lf\0A\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable define dso_local void @swap(ptr nocapture noundef %run1, ptr nocapture noundef %run2) local_unnamed_addr #0 { entry: %0 = load i32, ptr %run1, align 8, !tbaa !5 %rtime = getelementptr inbounds %struct._runner, ptr %run1, i64 0, i32 1 %1 = load double, ptr %rtime, align 8, !tbaa !11 %2 = load i32, ptr %run2, align 8, !tbaa !5 store i32 %2, ptr %run1, align 8, !tbaa !5 %rtime5 = getelementptr inbounds %struct._runner, ptr %run2, i64 0, i32 1 %3 = load double, ptr %rtime5, align 8, !tbaa !11 store double %3, ptr %rtime, align 8, !tbaa !11 store i32 %0, ptr %run2, align 8, !tbaa !5 store double %1, ptr %rtime5, align 8, !tbaa !11 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @sort(ptr nocapture noundef %run, i32 noundef %arysize) local_unnamed_addr #2 { entry: %cmp28 = icmp sgt i32 %arysize, 0 br i1 %cmp28, label %for.body.preheader, label %for.end14 for.body.preheader: ; preds = %entry %0 = zext i32 %arysize to i64 %wide.trip.count36 = zext i32 %arysize to i64 br label %for.body for.cond.loopexit: ; preds = %for.inc, %for.body %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond37.not = icmp eq i64 %indvars.iv.next34, %wide.trip.count36 br i1 %exitcond37.not, label %for.end14, label %for.body, !llvm.loop !12 for.body: ; preds = %for.body.preheader, %for.cond.loopexit %indvars.iv33 = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next34, %for.cond.loopexit ] %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.cond.loopexit ] %indvars.iv.next34 = add nuw nsw i64 %indvars.iv33, 1 %cmp226 = icmp ult i64 %indvars.iv.next34, %0 br i1 %cmp226, label %for.body3.lr.ph, label %for.cond.loopexit for.body3.lr.ph: ; preds = %for.body %rtime = getelementptr inbounds %struct._runner, ptr %run, i64 %indvars.iv33, i32 1 %arrayidx = getelementptr inbounds %struct._runner, ptr %run, i64 %indvars.iv33 br label %for.body3 for.body3: ; preds = %for.body3.lr.ph, %for.inc %indvars.iv30 = phi i64 [ %indvars.iv, %for.body3.lr.ph ], [ %indvars.iv.next31, %for.inc ] %1 = load double, ptr %rtime, align 8, !tbaa !11 %rtime6 = getelementptr inbounds %struct._runner, ptr %run, i64 %indvars.iv30, i32 1 %2 = load double, ptr %rtime6, align 8, !tbaa !11 %cmp7 = fcmp ogt double %1, %2 br i1 %cmp7, label %if.then, label %for.inc if.then: ; preds = %for.body3 %arrayidx5 = getelementptr inbounds %struct._runner, ptr %run, i64 %indvars.iv30 %3 = load i32, ptr %arrayidx, align 8, !tbaa !5 %4 = load i32, ptr %arrayidx5, align 8, !tbaa !5 store i32 %4, ptr %arrayidx, align 8, !tbaa !5 store double %2, ptr %rtime, align 8, !tbaa !11 store i32 %3, ptr %arrayidx5, align 8, !tbaa !5 store double %1, ptr %rtime6, align 8, !tbaa !11 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next31 = add nuw nsw i64 %indvars.iv30, 1 %exitcond.not = icmp eq i64 %indvars.iv.next31, %wide.trip.count36 br i1 %exitcond.not, label %for.cond.loopexit, label %for.body3, !llvm.loop !14 for.end14: ; preds = %for.cond.loopexit, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %run = alloca [3 x [8 x %struct._runner]], align 16 %third = alloca [18 x %struct._runner], align 16 call void @llvm.lifetime.start.p0(i64 384, ptr nonnull %run) #5 call void @llvm.lifetime.start.p0(i64 288, ptr nonnull %third) #5 %rtime = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 0, i32 1 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %run, ptr noundef nonnull %rtime) %arrayidx5.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 1 %rtime.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 1, i32 1 %call.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1, ptr noundef nonnull %rtime.1) %arrayidx5.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 2 %rtime.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 2, i32 1 %call.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2, ptr noundef nonnull %rtime.2) %arrayidx5.3 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 3 %rtime.3 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 3, i32 1 %call.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.3, ptr noundef nonnull %rtime.3) %arrayidx5.4 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 4 %rtime.4 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 4, i32 1 %call.4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.4, ptr noundef nonnull %rtime.4) %arrayidx5.5 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 5 %rtime.5 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 5, i32 1 %call.5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.5, ptr noundef nonnull %rtime.5) %arrayidx5.6 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 6 %rtime.6 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 6, i32 1 %call.6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.6, ptr noundef nonnull %rtime.6) %arrayidx5.7 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 7 %rtime.7 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 0, i64 7, i32 1 %call.7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.7, ptr noundef nonnull %rtime.7) %arrayidx5.1143 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 0 %rtime.1144 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 0, i32 1 %call.1145 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1143, ptr noundef nonnull %rtime.1144) %arrayidx5.1.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 1 %rtime.1.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 1, i32 1 %call.1.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.1, ptr noundef nonnull %rtime.1.1) %arrayidx5.2.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 2 %rtime.2.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 2, i32 1 %call.2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.1, ptr noundef nonnull %rtime.2.1) %arrayidx5.3.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 3 %rtime.3.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 3, i32 1 %call.3.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.3.1, ptr noundef nonnull %rtime.3.1) %arrayidx5.4.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 4 %rtime.4.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 4, i32 1 %call.4.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.4.1, ptr noundef nonnull %rtime.4.1) %arrayidx5.5.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 5 %rtime.5.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 5, i32 1 %call.5.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.5.1, ptr noundef nonnull %rtime.5.1) %arrayidx5.6.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 6 %rtime.6.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 6, i32 1 %call.6.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.6.1, ptr noundef nonnull %rtime.6.1) %arrayidx5.7.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 7 %rtime.7.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 1, i64 7, i32 1 %call.7.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.7.1, ptr noundef nonnull %rtime.7.1) %arrayidx5.2146 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 0 %rtime.2147 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 0, i32 1 %call.2148 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2146, ptr noundef nonnull %rtime.2147) %arrayidx5.1.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 1 %rtime.1.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 1, i32 1 %call.1.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1.2, ptr noundef nonnull %rtime.1.2) %arrayidx5.2.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 2 %rtime.2.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 2, i32 1 %call.2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.2.2, ptr noundef nonnull %rtime.2.2) %arrayidx5.3.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 3 %rtime.3.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 3, i32 1 %call.3.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.3.2, ptr noundef nonnull %rtime.3.2) %arrayidx5.4.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 4 %rtime.4.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 4, i32 1 %call.4.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.4.2, ptr noundef nonnull %rtime.4.2) %arrayidx5.5.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 5 %rtime.5.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 5, i32 1 %call.5.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.5.2, ptr noundef nonnull %rtime.5.2) %arrayidx5.6.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 6 %rtime.6.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 6, i32 1 %call.6.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.6.2, ptr noundef nonnull %rtime.6.2) %arrayidx5.7.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 7 %rtime.7.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 2, i64 7, i32 1 %call.7.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.7.2, ptr noundef nonnull %rtime.7.2) br label %for.body3.lr.ph.i for.body3.lr.ph.i.1: ; preds = %if.then.i.6183, %for.inc.i.5178 %rtime.i.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 1, i32 1 %arrayidx.i.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 1 %0 = load double, ptr %rtime.i.1, align 8, !tbaa !11 %rtime6.i.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2, i32 1 %1 = load double, ptr %rtime6.i.1, align 8, !tbaa !11 %cmp7.i.1 = fcmp ogt double %0, %1 br i1 %cmp7.i.1, label %if.then.i.1, label %for.inc.i.1 if.then.i.1: ; preds = %for.body3.lr.ph.i.1 %arrayidx5.i.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2 %2 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %3 = load i32, ptr %arrayidx5.i.1, align 16, !tbaa !5 store i32 %3, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %1, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %2, ptr %arrayidx5.i.1, align 16, !tbaa !5 store double %0, ptr %rtime6.i.1, align 8, !tbaa !11 br label %for.inc.i.1 for.inc.i.1: ; preds = %if.then.i.1, %for.body3.lr.ph.i.1 %4 = phi double [ %1, %if.then.i.1 ], [ %0, %for.body3.lr.ph.i.1 ] %rtime6.i.1.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3, i32 1 %5 = load double, ptr %rtime6.i.1.1, align 8, !tbaa !11 %cmp7.i.1.1 = fcmp ogt double %4, %5 br i1 %cmp7.i.1.1, label %if.then.i.1.1, label %for.inc.i.1.1 if.then.i.1.1: ; preds = %for.inc.i.1 %arrayidx5.i.1.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3 %6 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %7 = load i32, ptr %arrayidx5.i.1.1, align 16, !tbaa !5 store i32 %7, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %5, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %6, ptr %arrayidx5.i.1.1, align 16, !tbaa !5 store double %4, ptr %rtime6.i.1.1, align 8, !tbaa !11 br label %for.inc.i.1.1 for.inc.i.1.1: ; preds = %if.then.i.1.1, %for.inc.i.1 %8 = phi double [ %5, %if.then.i.1.1 ], [ %4, %for.inc.i.1 ] %rtime6.i.1.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4, i32 1 %9 = load double, ptr %rtime6.i.1.2, align 8, !tbaa !11 %cmp7.i.1.2 = fcmp ogt double %8, %9 br i1 %cmp7.i.1.2, label %if.then.i.1.2, label %for.inc.i.1.2 if.then.i.1.2: ; preds = %for.inc.i.1.1 %arrayidx5.i.1.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4 %10 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %11 = load i32, ptr %arrayidx5.i.1.2, align 16, !tbaa !5 store i32 %11, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %9, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %10, ptr %arrayidx5.i.1.2, align 16, !tbaa !5 store double %8, ptr %rtime6.i.1.2, align 8, !tbaa !11 br label %for.inc.i.1.2 for.inc.i.1.2: ; preds = %if.then.i.1.2, %for.inc.i.1.1 %12 = phi double [ %9, %if.then.i.1.2 ], [ %8, %for.inc.i.1.1 ] %rtime6.i.1.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %13 = load double, ptr %rtime6.i.1.3, align 8, !tbaa !11 %cmp7.i.1.3 = fcmp ogt double %12, %13 br i1 %cmp7.i.1.3, label %if.then.i.1.3, label %for.inc.i.1.3 if.then.i.1.3: ; preds = %for.inc.i.1.2 %arrayidx5.i.1.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %14 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %15 = load i32, ptr %arrayidx5.i.1.3, align 16, !tbaa !5 store i32 %15, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %13, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %14, ptr %arrayidx5.i.1.3, align 16, !tbaa !5 store double %12, ptr %rtime6.i.1.3, align 8, !tbaa !11 br label %for.inc.i.1.3 for.inc.i.1.3: ; preds = %if.then.i.1.3, %for.inc.i.1.2 %16 = phi double [ %13, %if.then.i.1.3 ], [ %12, %for.inc.i.1.2 ] %rtime6.i.1.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %17 = load double, ptr %rtime6.i.1.4, align 8, !tbaa !11 %cmp7.i.1.4 = fcmp ogt double %16, %17 br i1 %cmp7.i.1.4, label %if.then.i.1.4, label %for.inc.i.1.4 if.then.i.1.4: ; preds = %for.inc.i.1.3 %arrayidx5.i.1.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %18 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %19 = load i32, ptr %arrayidx5.i.1.4, align 16, !tbaa !5 store i32 %19, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %17, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %18, ptr %arrayidx5.i.1.4, align 16, !tbaa !5 store double %16, ptr %rtime6.i.1.4, align 8, !tbaa !11 br label %for.inc.i.1.4 for.inc.i.1.4: ; preds = %if.then.i.1.4, %for.inc.i.1.3 %20 = phi double [ %17, %if.then.i.1.4 ], [ %16, %for.inc.i.1.3 ] %rtime6.i.1.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %21 = load double, ptr %rtime6.i.1.5, align 8, !tbaa !11 %cmp7.i.1.5 = fcmp ogt double %20, %21 br i1 %cmp7.i.1.5, label %if.then.i.1.5, label %for.body3.lr.ph.i.2 if.then.i.1.5: ; preds = %for.inc.i.1.4 %arrayidx5.i.1.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %22 = load i32, ptr %arrayidx.i.1, align 16, !tbaa !5 %23 = load i32, ptr %arrayidx5.i.1.5, align 16, !tbaa !5 store i32 %23, ptr %arrayidx.i.1, align 16, !tbaa !5 store double %21, ptr %rtime.i.1, align 8, !tbaa !11 store i32 %22, ptr %arrayidx5.i.1.5, align 16, !tbaa !5 store double %20, ptr %rtime6.i.1.5, align 8, !tbaa !11 br label %for.body3.lr.ph.i.2 for.body3.lr.ph.i.2: ; preds = %if.then.i.1.5, %for.inc.i.1.4 %rtime.i.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2, i32 1 %arrayidx.i.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2 %24 = load double, ptr %rtime.i.2, align 8, !tbaa !11 %rtime6.i.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3, i32 1 %25 = load double, ptr %rtime6.i.2, align 8, !tbaa !11 %cmp7.i.2 = fcmp ogt double %24, %25 br i1 %cmp7.i.2, label %if.then.i.2, label %for.inc.i.2 if.then.i.2: ; preds = %for.body3.lr.ph.i.2 %arrayidx5.i.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3 %26 = load i32, ptr %arrayidx.i.2, align 16, !tbaa !5 %27 = load i32, ptr %arrayidx5.i.2, align 16, !tbaa !5 store i32 %27, ptr %arrayidx.i.2, align 16, !tbaa !5 store double %25, ptr %rtime.i.2, align 8, !tbaa !11 store i32 %26, ptr %arrayidx5.i.2, align 16, !tbaa !5 store double %24, ptr %rtime6.i.2, align 8, !tbaa !11 br label %for.inc.i.2 for.inc.i.2: ; preds = %if.then.i.2, %for.body3.lr.ph.i.2 %28 = phi double [ %25, %if.then.i.2 ], [ %24, %for.body3.lr.ph.i.2 ] %rtime6.i.2.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4, i32 1 %29 = load double, ptr %rtime6.i.2.1, align 8, !tbaa !11 %cmp7.i.2.1 = fcmp ogt double %28, %29 br i1 %cmp7.i.2.1, label %if.then.i.2.1, label %for.inc.i.2.1 if.then.i.2.1: ; preds = %for.inc.i.2 %arrayidx5.i.2.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4 %30 = load i32, ptr %arrayidx.i.2, align 16, !tbaa !5 %31 = load i32, ptr %arrayidx5.i.2.1, align 16, !tbaa !5 store i32 %31, ptr %arrayidx.i.2, align 16, !tbaa !5 store double %29, ptr %rtime.i.2, align 8, !tbaa !11 store i32 %30, ptr %arrayidx5.i.2.1, align 16, !tbaa !5 store double %28, ptr %rtime6.i.2.1, align 8, !tbaa !11 br label %for.inc.i.2.1 for.inc.i.2.1: ; preds = %if.then.i.2.1, %for.inc.i.2 %32 = phi double [ %29, %if.then.i.2.1 ], [ %28, %for.inc.i.2 ] %rtime6.i.2.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %33 = load double, ptr %rtime6.i.2.2, align 8, !tbaa !11 %cmp7.i.2.2 = fcmp ogt double %32, %33 br i1 %cmp7.i.2.2, label %if.then.i.2.2, label %for.inc.i.2.2 if.then.i.2.2: ; preds = %for.inc.i.2.1 %arrayidx5.i.2.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %34 = load i32, ptr %arrayidx.i.2, align 16, !tbaa !5 %35 = load i32, ptr %arrayidx5.i.2.2, align 16, !tbaa !5 store i32 %35, ptr %arrayidx.i.2, align 16, !tbaa !5 store double %33, ptr %rtime.i.2, align 8, !tbaa !11 store i32 %34, ptr %arrayidx5.i.2.2, align 16, !tbaa !5 store double %32, ptr %rtime6.i.2.2, align 8, !tbaa !11 br label %for.inc.i.2.2 for.inc.i.2.2: ; preds = %if.then.i.2.2, %for.inc.i.2.1 %36 = phi double [ %33, %if.then.i.2.2 ], [ %32, %for.inc.i.2.1 ] %rtime6.i.2.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %37 = load double, ptr %rtime6.i.2.3, align 8, !tbaa !11 %cmp7.i.2.3 = fcmp ogt double %36, %37 br i1 %cmp7.i.2.3, label %if.then.i.2.3, label %for.inc.i.2.3 if.then.i.2.3: ; preds = %for.inc.i.2.2 %arrayidx5.i.2.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %38 = load i32, ptr %arrayidx.i.2, align 16, !tbaa !5 %39 = load i32, ptr %arrayidx5.i.2.3, align 16, !tbaa !5 store i32 %39, ptr %arrayidx.i.2, align 16, !tbaa !5 store double %37, ptr %rtime.i.2, align 8, !tbaa !11 store i32 %38, ptr %arrayidx5.i.2.3, align 16, !tbaa !5 store double %36, ptr %rtime6.i.2.3, align 8, !tbaa !11 br label %for.inc.i.2.3 for.inc.i.2.3: ; preds = %if.then.i.2.3, %for.inc.i.2.2 %40 = phi double [ %37, %if.then.i.2.3 ], [ %36, %for.inc.i.2.2 ] %rtime6.i.2.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %41 = load double, ptr %rtime6.i.2.4, align 8, !tbaa !11 %cmp7.i.2.4 = fcmp ogt double %40, %41 br i1 %cmp7.i.2.4, label %if.then.i.2.4, label %for.body3.lr.ph.i.3 if.then.i.2.4: ; preds = %for.inc.i.2.3 %arrayidx5.i.2.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %42 = load i32, ptr %arrayidx.i.2, align 16, !tbaa !5 %43 = load i32, ptr %arrayidx5.i.2.4, align 16, !tbaa !5 store i32 %43, ptr %arrayidx.i.2, align 16, !tbaa !5 store double %41, ptr %rtime.i.2, align 8, !tbaa !11 store i32 %42, ptr %arrayidx5.i.2.4, align 16, !tbaa !5 store double %40, ptr %rtime6.i.2.4, align 8, !tbaa !11 br label %for.body3.lr.ph.i.3 for.body3.lr.ph.i.3: ; preds = %if.then.i.2.4, %for.inc.i.2.3 %rtime.i.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3, i32 1 %arrayidx.i.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3 %44 = load double, ptr %rtime.i.3, align 8, !tbaa !11 %rtime6.i.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4, i32 1 %45 = load double, ptr %rtime6.i.3, align 8, !tbaa !11 %cmp7.i.3 = fcmp ogt double %44, %45 br i1 %cmp7.i.3, label %if.then.i.3, label %for.inc.i.3 if.then.i.3: ; preds = %for.body3.lr.ph.i.3 %arrayidx5.i.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4 %46 = load i32, ptr %arrayidx.i.3, align 16, !tbaa !5 %47 = load i32, ptr %arrayidx5.i.3, align 16, !tbaa !5 store i32 %47, ptr %arrayidx.i.3, align 16, !tbaa !5 store double %45, ptr %rtime.i.3, align 8, !tbaa !11 store i32 %46, ptr %arrayidx5.i.3, align 16, !tbaa !5 store double %44, ptr %rtime6.i.3, align 8, !tbaa !11 br label %for.inc.i.3 for.inc.i.3: ; preds = %if.then.i.3, %for.body3.lr.ph.i.3 %48 = phi double [ %45, %if.then.i.3 ], [ %44, %for.body3.lr.ph.i.3 ] %rtime6.i.3.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %49 = load double, ptr %rtime6.i.3.1, align 8, !tbaa !11 %cmp7.i.3.1 = fcmp ogt double %48, %49 br i1 %cmp7.i.3.1, label %if.then.i.3.1, label %for.inc.i.3.1 if.then.i.3.1: ; preds = %for.inc.i.3 %arrayidx5.i.3.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %50 = load i32, ptr %arrayidx.i.3, align 16, !tbaa !5 %51 = load i32, ptr %arrayidx5.i.3.1, align 16, !tbaa !5 store i32 %51, ptr %arrayidx.i.3, align 16, !tbaa !5 store double %49, ptr %rtime.i.3, align 8, !tbaa !11 store i32 %50, ptr %arrayidx5.i.3.1, align 16, !tbaa !5 store double %48, ptr %rtime6.i.3.1, align 8, !tbaa !11 br label %for.inc.i.3.1 for.inc.i.3.1: ; preds = %if.then.i.3.1, %for.inc.i.3 %52 = phi double [ %49, %if.then.i.3.1 ], [ %48, %for.inc.i.3 ] %rtime6.i.3.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %53 = load double, ptr %rtime6.i.3.2, align 8, !tbaa !11 %cmp7.i.3.2 = fcmp ogt double %52, %53 br i1 %cmp7.i.3.2, label %if.then.i.3.2, label %for.inc.i.3.2 if.then.i.3.2: ; preds = %for.inc.i.3.1 %arrayidx5.i.3.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %54 = load i32, ptr %arrayidx.i.3, align 16, !tbaa !5 %55 = load i32, ptr %arrayidx5.i.3.2, align 16, !tbaa !5 store i32 %55, ptr %arrayidx.i.3, align 16, !tbaa !5 store double %53, ptr %rtime.i.3, align 8, !tbaa !11 store i32 %54, ptr %arrayidx5.i.3.2, align 16, !tbaa !5 store double %52, ptr %rtime6.i.3.2, align 8, !tbaa !11 br label %for.inc.i.3.2 for.inc.i.3.2: ; preds = %if.then.i.3.2, %for.inc.i.3.1 %56 = phi double [ %53, %if.then.i.3.2 ], [ %52, %for.inc.i.3.1 ] %rtime6.i.3.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %57 = load double, ptr %rtime6.i.3.3, align 8, !tbaa !11 %cmp7.i.3.3 = fcmp ogt double %56, %57 br i1 %cmp7.i.3.3, label %if.then.i.3.3, label %for.body3.lr.ph.i.4 if.then.i.3.3: ; preds = %for.inc.i.3.2 %arrayidx5.i.3.3 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %58 = load i32, ptr %arrayidx.i.3, align 16, !tbaa !5 %59 = load i32, ptr %arrayidx5.i.3.3, align 16, !tbaa !5 store i32 %59, ptr %arrayidx.i.3, align 16, !tbaa !5 store double %57, ptr %rtime.i.3, align 8, !tbaa !11 store i32 %58, ptr %arrayidx5.i.3.3, align 16, !tbaa !5 store double %56, ptr %rtime6.i.3.3, align 8, !tbaa !11 br label %for.body3.lr.ph.i.4 for.body3.lr.ph.i.4: ; preds = %if.then.i.3.3, %for.inc.i.3.2 %rtime.i.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4, i32 1 %arrayidx.i.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4 %60 = load double, ptr %rtime.i.4, align 8, !tbaa !11 %rtime6.i.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %61 = load double, ptr %rtime6.i.4, align 8, !tbaa !11 %cmp7.i.4 = fcmp ogt double %60, %61 br i1 %cmp7.i.4, label %if.then.i.4, label %for.inc.i.4 if.then.i.4: ; preds = %for.body3.lr.ph.i.4 %arrayidx5.i.4 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %62 = load i32, ptr %arrayidx.i.4, align 16, !tbaa !5 %63 = load i32, ptr %arrayidx5.i.4, align 16, !tbaa !5 store i32 %63, ptr %arrayidx.i.4, align 16, !tbaa !5 store double %61, ptr %rtime.i.4, align 8, !tbaa !11 store i32 %62, ptr %arrayidx5.i.4, align 16, !tbaa !5 store double %60, ptr %rtime6.i.4, align 8, !tbaa !11 br label %for.inc.i.4 for.inc.i.4: ; preds = %if.then.i.4, %for.body3.lr.ph.i.4 %64 = phi double [ %61, %if.then.i.4 ], [ %60, %for.body3.lr.ph.i.4 ] %rtime6.i.4.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %65 = load double, ptr %rtime6.i.4.1, align 8, !tbaa !11 %cmp7.i.4.1 = fcmp ogt double %64, %65 br i1 %cmp7.i.4.1, label %if.then.i.4.1, label %for.inc.i.4.1 if.then.i.4.1: ; preds = %for.inc.i.4 %arrayidx5.i.4.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %66 = load i32, ptr %arrayidx.i.4, align 16, !tbaa !5 %67 = load i32, ptr %arrayidx5.i.4.1, align 16, !tbaa !5 store i32 %67, ptr %arrayidx.i.4, align 16, !tbaa !5 store double %65, ptr %rtime.i.4, align 8, !tbaa !11 store i32 %66, ptr %arrayidx5.i.4.1, align 16, !tbaa !5 store double %64, ptr %rtime6.i.4.1, align 8, !tbaa !11 br label %for.inc.i.4.1 for.inc.i.4.1: ; preds = %if.then.i.4.1, %for.inc.i.4 %68 = phi double [ %65, %if.then.i.4.1 ], [ %64, %for.inc.i.4 ] %rtime6.i.4.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %69 = load double, ptr %rtime6.i.4.2, align 8, !tbaa !11 %cmp7.i.4.2 = fcmp ogt double %68, %69 br i1 %cmp7.i.4.2, label %if.then.i.4.2, label %for.body3.lr.ph.i.5 if.then.i.4.2: ; preds = %for.inc.i.4.1 %arrayidx5.i.4.2 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %70 = load i32, ptr %arrayidx.i.4, align 16, !tbaa !5 %71 = load i32, ptr %arrayidx5.i.4.2, align 16, !tbaa !5 store i32 %71, ptr %arrayidx.i.4, align 16, !tbaa !5 store double %69, ptr %rtime.i.4, align 8, !tbaa !11 store i32 %70, ptr %arrayidx5.i.4.2, align 16, !tbaa !5 store double %68, ptr %rtime6.i.4.2, align 8, !tbaa !11 br label %for.body3.lr.ph.i.5 for.body3.lr.ph.i.5: ; preds = %if.then.i.4.2, %for.inc.i.4.1 %rtime.i.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %arrayidx.i.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %72 = load double, ptr %rtime.i.5, align 8, !tbaa !11 %rtime6.i.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %73 = load double, ptr %rtime6.i.5, align 8, !tbaa !11 %cmp7.i.5 = fcmp ogt double %72, %73 br i1 %cmp7.i.5, label %if.then.i.5, label %for.inc.i.5 if.then.i.5: ; preds = %for.body3.lr.ph.i.5 %arrayidx5.i.5 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %74 = load i32, ptr %arrayidx.i.5, align 16, !tbaa !5 %75 = load i32, ptr %arrayidx5.i.5, align 16, !tbaa !5 store i32 %75, ptr %arrayidx.i.5, align 16, !tbaa !5 store double %73, ptr %rtime.i.5, align 8, !tbaa !11 store i32 %74, ptr %arrayidx5.i.5, align 16, !tbaa !5 store double %72, ptr %rtime6.i.5, align 8, !tbaa !11 br label %for.inc.i.5 for.inc.i.5: ; preds = %if.then.i.5, %for.body3.lr.ph.i.5 %76 = phi double [ %73, %if.then.i.5 ], [ %72, %for.body3.lr.ph.i.5 ] %rtime6.i.5.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %77 = load double, ptr %rtime6.i.5.1, align 8, !tbaa !11 %cmp7.i.5.1 = fcmp ogt double %76, %77 br i1 %cmp7.i.5.1, label %if.then.i.5.1, label %for.body3.lr.ph.i.6 if.then.i.5.1: ; preds = %for.inc.i.5 %arrayidx5.i.5.1 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %78 = load i32, ptr %arrayidx.i.5, align 16, !tbaa !5 %79 = load i32, ptr %arrayidx5.i.5.1, align 16, !tbaa !5 store i32 %79, ptr %arrayidx.i.5, align 16, !tbaa !5 store double %77, ptr %rtime.i.5, align 8, !tbaa !11 store i32 %78, ptr %arrayidx5.i.5.1, align 16, !tbaa !5 store double %76, ptr %rtime6.i.5.1, align 8, !tbaa !11 br label %for.body3.lr.ph.i.6 for.body3.lr.ph.i.6: ; preds = %if.then.i.5.1, %for.inc.i.5 %rtime.i.6 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %80 = load double, ptr %rtime.i.6, align 8, !tbaa !11 %rtime6.i.6 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %81 = load double, ptr %rtime6.i.6, align 8, !tbaa !11 %cmp7.i.6 = fcmp ogt double %80, %81 br i1 %cmp7.i.6, label %if.then.i.6, label %for.cond.loopexit.i.7 if.then.i.6: ; preds = %for.body3.lr.ph.i.6 %arrayidx.i.6 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %arrayidx5.i.6 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %82 = load i32, ptr %arrayidx.i.6, align 16, !tbaa !5 %83 = load i32, ptr %arrayidx5.i.6, align 16, !tbaa !5 store i32 %83, ptr %arrayidx.i.6, align 16, !tbaa !5 store double %81, ptr %rtime.i.6, align 8, !tbaa !11 store i32 %82, ptr %arrayidx5.i.6, align 16, !tbaa !5 store double %80, ptr %rtime6.i.6, align 8, !tbaa !11 br label %for.cond.loopexit.i.7 for.cond.loopexit.i.7: ; preds = %if.then.i.6, %for.body3.lr.ph.i.6 %arrayidx24 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 2 %84 = load i32, ptr %arrayidx24, align 16, !tbaa !5 %arrayidx27 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv store i32 %84, ptr %arrayidx27, align 16, !tbaa !5 %rtime33 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 2, i32 1 %85 = load double, ptr %rtime33, align 8, !tbaa !11 %rtime36 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv, i32 1 store double %85, ptr %rtime36, align 8, !tbaa !11 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx24.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 3 %86 = load i32, ptr %arrayidx24.1, align 16, !tbaa !5 %arrayidx27.1 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next store i32 %86, ptr %arrayidx27.1, align 16, !tbaa !5 %rtime33.1 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 3, i32 1 %87 = load double, ptr %rtime33.1, align 8, !tbaa !11 %rtime36.1 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next, i32 1 store double %87, ptr %rtime36.1, align 8, !tbaa !11 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2 %arrayidx24.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 4 %88 = load i32, ptr %arrayidx24.2, align 16, !tbaa !5 %arrayidx27.2 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.1 store i32 %88, ptr %arrayidx27.2, align 16, !tbaa !5 %rtime33.2 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 4, i32 1 %89 = load double, ptr %rtime33.2, align 8, !tbaa !11 %rtime36.2 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.1, i32 1 store double %89, ptr %rtime36.2, align 8, !tbaa !11 %indvars.iv.next.2 = add nuw nsw i64 %indvars.iv, 3 %arrayidx24.3 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 5 %90 = load i32, ptr %arrayidx24.3, align 16, !tbaa !5 %arrayidx27.3 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.2 store i32 %90, ptr %arrayidx27.3, align 16, !tbaa !5 %rtime33.3 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 5, i32 1 %91 = load double, ptr %rtime33.3, align 8, !tbaa !11 %rtime36.3 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.2, i32 1 store double %91, ptr %rtime36.3, align 8, !tbaa !11 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %arrayidx24.4 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 6 %92 = load i32, ptr %arrayidx24.4, align 16, !tbaa !5 %arrayidx27.4 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.3 store i32 %92, ptr %arrayidx27.4, align 16, !tbaa !5 %rtime33.4 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 6, i32 1 %93 = load double, ptr %rtime33.4, align 8, !tbaa !11 %rtime36.4 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.3, i32 1 store double %93, ptr %rtime36.4, align 8, !tbaa !11 %indvars.iv.next.4 = add nuw nsw i64 %indvars.iv, 5 %arrayidx24.5 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 7 %94 = load i32, ptr %arrayidx24.5, align 16, !tbaa !5 %arrayidx27.5 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.4 store i32 %94, ptr %arrayidx27.5, align 16, !tbaa !5 %rtime33.5 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191, i64 7, i32 1 %95 = load double, ptr %rtime33.5, align 8, !tbaa !11 %rtime36.5 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 %indvars.iv.next.4, i32 1 store double %95, ptr %rtime36.5, align 8, !tbaa !11 %indvars.iv.next190 = add nuw nsw i64 %indvars.iv, 6 %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1 %exitcond.not = icmp eq i64 %indvars.iv.next192, 3 br i1 %exitcond.not, label %for.body.i111, label %for.body3.lr.ph.i, !llvm.loop !15 for.body3.lr.ph.i: ; preds = %for.cond.loopexit.i.7, %entry %indvars.iv191 = phi i64 [ 0, %entry ], [ %indvars.iv.next192, %for.cond.loopexit.i.7 ] %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next190, %for.cond.loopexit.i.7 ] %arrayidx17 = getelementptr inbounds [3 x [8 x %struct._runner]], ptr %run, i64 0, i64 %indvars.iv191 %rtime.i = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 0, i32 1 %96 = load double, ptr %rtime.i, align 8, !tbaa !11 %rtime6.i = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 1, i32 1 %97 = load double, ptr %rtime6.i, align 8, !tbaa !11 %cmp7.i = fcmp ogt double %96, %97 br i1 %cmp7.i, label %if.then.i, label %for.inc.i if.then.i: ; preds = %for.body3.lr.ph.i %arrayidx5.i = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 1 %98 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %99 = load i32, ptr %arrayidx5.i, align 16, !tbaa !5 store i32 %99, ptr %arrayidx17, align 16, !tbaa !5 store double %97, ptr %rtime.i, align 8, !tbaa !11 store i32 %98, ptr %arrayidx5.i, align 16, !tbaa !5 store double %96, ptr %rtime6.i, align 8, !tbaa !11 br label %for.inc.i for.inc.i: ; preds = %if.then.i, %for.body3.lr.ph.i %100 = phi double [ %97, %if.then.i ], [ %96, %for.body3.lr.ph.i ] %rtime6.i.1149 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2, i32 1 %101 = load double, ptr %rtime6.i.1149, align 8, !tbaa !11 %cmp7.i.1150 = fcmp ogt double %100, %101 br i1 %cmp7.i.1150, label %if.then.i.1153, label %for.inc.i.1154 if.then.i.1153: ; preds = %for.inc.i %arrayidx5.i.1152 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 2 %102 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %103 = load i32, ptr %arrayidx5.i.1152, align 16, !tbaa !5 store i32 %103, ptr %arrayidx17, align 16, !tbaa !5 store double %101, ptr %rtime.i, align 8, !tbaa !11 store i32 %102, ptr %arrayidx5.i.1152, align 16, !tbaa !5 store double %100, ptr %rtime6.i.1149, align 8, !tbaa !11 br label %for.inc.i.1154 for.inc.i.1154: ; preds = %if.then.i.1153, %for.inc.i %104 = phi double [ %101, %if.then.i.1153 ], [ %100, %for.inc.i ] %rtime6.i.2155 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3, i32 1 %105 = load double, ptr %rtime6.i.2155, align 8, !tbaa !11 %cmp7.i.2156 = fcmp ogt double %104, %105 br i1 %cmp7.i.2156, label %if.then.i.2159, label %for.inc.i.2160 if.then.i.2159: ; preds = %for.inc.i.1154 %arrayidx5.i.2158 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 3 %106 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %107 = load i32, ptr %arrayidx5.i.2158, align 16, !tbaa !5 store i32 %107, ptr %arrayidx17, align 16, !tbaa !5 store double %105, ptr %rtime.i, align 8, !tbaa !11 store i32 %106, ptr %arrayidx5.i.2158, align 16, !tbaa !5 store double %104, ptr %rtime6.i.2155, align 8, !tbaa !11 br label %for.inc.i.2160 for.inc.i.2160: ; preds = %if.then.i.2159, %for.inc.i.1154 %108 = phi double [ %105, %if.then.i.2159 ], [ %104, %for.inc.i.1154 ] %rtime6.i.3161 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4, i32 1 %109 = load double, ptr %rtime6.i.3161, align 8, !tbaa !11 %cmp7.i.3162 = fcmp ogt double %108, %109 br i1 %cmp7.i.3162, label %if.then.i.3165, label %for.inc.i.3166 if.then.i.3165: ; preds = %for.inc.i.2160 %arrayidx5.i.3164 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 4 %110 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %111 = load i32, ptr %arrayidx5.i.3164, align 16, !tbaa !5 store i32 %111, ptr %arrayidx17, align 16, !tbaa !5 store double %109, ptr %rtime.i, align 8, !tbaa !11 store i32 %110, ptr %arrayidx5.i.3164, align 16, !tbaa !5 store double %108, ptr %rtime6.i.3161, align 8, !tbaa !11 br label %for.inc.i.3166 for.inc.i.3166: ; preds = %if.then.i.3165, %for.inc.i.2160 %112 = phi double [ %109, %if.then.i.3165 ], [ %108, %for.inc.i.2160 ] %rtime6.i.4167 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5, i32 1 %113 = load double, ptr %rtime6.i.4167, align 8, !tbaa !11 %cmp7.i.4168 = fcmp ogt double %112, %113 br i1 %cmp7.i.4168, label %if.then.i.4171, label %for.inc.i.4172 if.then.i.4171: ; preds = %for.inc.i.3166 %arrayidx5.i.4170 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 5 %114 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %115 = load i32, ptr %arrayidx5.i.4170, align 16, !tbaa !5 store i32 %115, ptr %arrayidx17, align 16, !tbaa !5 store double %113, ptr %rtime.i, align 8, !tbaa !11 store i32 %114, ptr %arrayidx5.i.4170, align 16, !tbaa !5 store double %112, ptr %rtime6.i.4167, align 8, !tbaa !11 br label %for.inc.i.4172 for.inc.i.4172: ; preds = %if.then.i.4171, %for.inc.i.3166 %116 = phi double [ %113, %if.then.i.4171 ], [ %112, %for.inc.i.3166 ] %rtime6.i.5173 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6, i32 1 %117 = load double, ptr %rtime6.i.5173, align 8, !tbaa !11 %cmp7.i.5174 = fcmp ogt double %116, %117 br i1 %cmp7.i.5174, label %if.then.i.5177, label %for.inc.i.5178 if.then.i.5177: ; preds = %for.inc.i.4172 %arrayidx5.i.5176 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 6 %118 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %119 = load i32, ptr %arrayidx5.i.5176, align 16, !tbaa !5 store i32 %119, ptr %arrayidx17, align 16, !tbaa !5 store double %117, ptr %rtime.i, align 8, !tbaa !11 store i32 %118, ptr %arrayidx5.i.5176, align 16, !tbaa !5 store double %116, ptr %rtime6.i.5173, align 8, !tbaa !11 br label %for.inc.i.5178 for.inc.i.5178: ; preds = %if.then.i.5177, %for.inc.i.4172 %120 = phi double [ %117, %if.then.i.5177 ], [ %116, %for.inc.i.4172 ] %rtime6.i.6179 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7, i32 1 %121 = load double, ptr %rtime6.i.6179, align 8, !tbaa !11 %cmp7.i.6180 = fcmp ogt double %120, %121 br i1 %cmp7.i.6180, label %if.then.i.6183, label %for.body3.lr.ph.i.1 if.then.i.6183: ; preds = %for.inc.i.5178 %arrayidx5.i.6182 = getelementptr inbounds %struct._runner, ptr %arrayidx17, i64 7 %122 = load i32, ptr %arrayidx17, align 16, !tbaa !5 %123 = load i32, ptr %arrayidx5.i.6182, align 16, !tbaa !5 store i32 %123, ptr %arrayidx17, align 16, !tbaa !5 store double %121, ptr %rtime.i, align 8, !tbaa !11 store i32 %122, ptr %arrayidx5.i.6182, align 16, !tbaa !5 store double %120, ptr %rtime6.i.6179, align 8, !tbaa !11 br label %for.body3.lr.ph.i.1 for.cond.loopexit.i116: ; preds = %for.inc.i126, %for.body.i111 %indvars.iv.next.i117 = add nuw nsw i64 %indvars.iv.i113, 1 %exitcond37.not.i118 = icmp eq i64 %indvars.iv.next34.i114, 18 br i1 %exitcond37.not.i118, label %sort.exit131, label %for.body.i111, !llvm.loop !12 for.body.i111: ; preds = %for.cond.loopexit.i.7, %for.cond.loopexit.i116 %indvars.iv33.i112 = phi i64 [ %indvars.iv.next34.i114, %for.cond.loopexit.i116 ], [ 0, %for.cond.loopexit.i.7 ] %indvars.iv.i113 = phi i64 [ %indvars.iv.next.i117, %for.cond.loopexit.i116 ], [ 1, %for.cond.loopexit.i.7 ] %indvars.iv.next34.i114 = add nuw nsw i64 %indvars.iv33.i112, 1 %cmp226.i115 = icmp ult i64 %indvars.iv33.i112, 17 br i1 %cmp226.i115, label %for.body3.lr.ph.i119, label %for.cond.loopexit.i116 for.body3.lr.ph.i119: ; preds = %for.body.i111 %rtime.i120 = getelementptr inbounds %struct._runner, ptr %third, i64 %indvars.iv33.i112, i32 1 %arrayidx.i121 = getelementptr inbounds %struct._runner, ptr %third, i64 %indvars.iv33.i112 br label %for.body3.i122 for.body3.i122: ; preds = %for.inc.i126, %for.body3.lr.ph.i119 %indvars.iv30.i123 = phi i64 [ %indvars.iv.i113, %for.body3.lr.ph.i119 ], [ %indvars.iv.next31.i127, %for.inc.i126 ] %124 = load double, ptr %rtime.i120, align 8, !tbaa !11 %rtime6.i124 = getelementptr inbounds %struct._runner, ptr %third, i64 %indvars.iv30.i123, i32 1 %125 = load double, ptr %rtime6.i124, align 8, !tbaa !11 %cmp7.i125 = fcmp ogt double %124, %125 br i1 %cmp7.i125, label %if.then.i129, label %for.inc.i126 if.then.i129: ; preds = %for.body3.i122 %arrayidx5.i130 = getelementptr inbounds %struct._runner, ptr %third, i64 %indvars.iv30.i123 %126 = load i32, ptr %arrayidx.i121, align 16, !tbaa !5 %127 = load i32, ptr %arrayidx5.i130, align 16, !tbaa !5 store i32 %127, ptr %arrayidx.i121, align 16, !tbaa !5 store double %125, ptr %rtime.i120, align 8, !tbaa !11 store i32 %126, ptr %arrayidx5.i130, align 16, !tbaa !5 store double %124, ptr %rtime6.i124, align 8, !tbaa !11 br label %for.inc.i126 for.inc.i126: ; preds = %if.then.i129, %for.body3.i122 %indvars.iv.next31.i127 = add nuw nsw i64 %indvars.iv30.i123, 1 %exitcond.not.i128 = icmp eq i64 %indvars.iv.next31.i127, 18 br i1 %exitcond.not.i128, label %for.cond.loopexit.i116, label %for.body3.i122, !llvm.loop !14 sort.exit131: ; preds = %for.cond.loopexit.i116 %128 = load i32, ptr %run, align 16, !tbaa !5 %129 = load double, ptr %rtime, align 8, !tbaa !11 %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %128, double noundef %129) %130 = load i32, ptr %arrayidx5.1, align 16, !tbaa !5 %131 = load double, ptr %rtime.1, align 8, !tbaa !11 %call61.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %130, double noundef %131) %132 = load i32, ptr %arrayidx5.1143, align 16, !tbaa !5 %133 = load double, ptr %rtime.1144, align 8, !tbaa !11 %call61.1205 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %132, double noundef %133) %134 = load i32, ptr %arrayidx5.1.1, align 16, !tbaa !5 %135 = load double, ptr %rtime.1.1, align 8, !tbaa !11 %call61.1.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %134, double noundef %135) %136 = load i32, ptr %arrayidx5.2146, align 16, !tbaa !5 %137 = load double, ptr %rtime.2147, align 8, !tbaa !11 %call61.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %136, double noundef %137) %138 = load i32, ptr %arrayidx5.1.2, align 16, !tbaa !5 %139 = load double, ptr %rtime.1.2, align 8, !tbaa !11 %call61.1.2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %138, double noundef %139) %140 = load i32, ptr %third, align 16, !tbaa !5 %rtime76 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 0, i32 1 %141 = load double, ptr %rtime76, align 8, !tbaa !11 %call77 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %140, double noundef %141) %arrayidx72.1 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 1 %142 = load i32, ptr %arrayidx72.1, align 16, !tbaa !5 %rtime76.1 = getelementptr inbounds [18 x %struct._runner], ptr %third, i64 0, i64 1, i32 1 %143 = load double, ptr %rtime76.1, align 8, !tbaa !11 %call77.1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %142, double noundef %143) call void @llvm.lifetime.end.p0(i64 288, ptr nonnull %third) #5 call void @llvm.lifetime.end.p0(i64 384, ptr nonnull %run) #5 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 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE 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 = !{!"_runner", !7, i64 0, !10, i64 8} !7 = !{!"int", !8, i64 0} !8 = !{!"omnipotent char", !9, i64 0} !9 = !{!"Simple C/C++ TBAA"} !10 = !{!"double", !8, i64 0} !11 = !{!6, !10, i64 8} !12 = distinct !{!12, !13} !13 = !{!"llvm.loop.mustprogress"} !14 = distinct !{!14, !13} !15 = distinct !{!15, !13}
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int n,a[105],dp[105][5]; int DP(int p,int now) { int i,j,k,q,flag=0; if(dp[p][now]!=0) return dp[p][now]; if(a[p]==0&&now!=0){ dp[p][now]=99999999; return dp[p][now]; } if(a[p]==1&&now==2){ dp[p][now]=99999999; return dp[p][now]; } if(a[p]==2&&now==1){ dp[p][now]=99999999; return dp[p][now]; } if(p==n){ if(now==0) return 1; else return 0; } dp[p][now]=99999999; if(now==0) flag=1; for(i=0;i<=2;i++){ if(i!=0&&i==now) continue; q=DP(p+1,i); if(q+flag<dp[p][now]) dp[p][now]=q+flag; } return dp[p][now]; } int main() { int i,j,k,ans,now=0; scanf("%d",&n); for(i=1;i<=n;i++) scanf("%d",&a[i]); dp[1][0]=DP(1,0); ans=dp[1][0]; dp[1][1]=DP(1,1); dp[1][2]=DP(1,2); if(dp[1][1]<ans) ans=dp[1][1]; if(dp[1][2]<ans) ans=dp[1][2]; printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27436/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @dp = dso_local local_unnamed_addr global [105 x [5 x i32]] zeroinitializer, align 16 @a = dso_local global [105 x i32] zeroinitializer, align 16 @n = dso_local global i32 0, align 4 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @DP(i32 noundef %p, i32 noundef %now) local_unnamed_addr #0 { entry: %idxprom = sext i32 %p to i64 %idxprom1 = sext i32 %now to i64 %arrayidx2 = getelementptr inbounds [105 x [5 x i32]], ptr @dp, i64 0, i64 %idxprom, i64 %idxprom1 %0 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %cmp.not = icmp eq i32 %0, 0 br i1 %cmp.not, label %if.end, label %cleanup if.end: ; preds = %entry %arrayidx8 = getelementptr inbounds [105 x i32], ptr @a, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %cmp9 = icmp eq i32 %1, 0 %cmp10 = icmp ne i32 %now, 0 %or.cond = and i1 %cmp10, %cmp9 br i1 %or.cond, label %if.then11, label %if.end20 if.then11: ; preds = %if.end store i32 99999999, ptr %arrayidx2, align 4, !tbaa !5 br label %cleanup if.end20: ; preds = %if.end %cmp23 = icmp eq i32 %1, 1 %cmp25 = icmp eq i32 %now, 2 %or.cond90 = and i1 %cmp25, %cmp23 br i1 %or.cond90, label %if.then26, label %if.end35 if.then26: ; preds = %if.end20 store i32 99999999, ptr %arrayidx2, align 4, !tbaa !5 br label %cleanup if.end35: ; preds = %if.end20 %cmp38 = icmp eq i32 %1, 2 %cmp40 = icmp eq i32 %now, 1 %or.cond91 = and i1 %cmp40, %cmp38 br i1 %or.cond91, label %if.then41, label %if.end50 if.then41: ; preds = %if.end35 store i32 99999999, ptr %arrayidx2, align 4, !tbaa !5 br label %cleanup if.end50: ; preds = %if.end35 %2 = load i32, ptr @n, align 4, !tbaa !5 %cmp51 = icmp eq i32 %2, %p br i1 %cmp51, label %if.then52, label %if.end68 if.then52: ; preds = %if.end50 %cmp53 = icmp eq i32 %now, 0 %. = zext i1 %cmp53 to i32 br label %cleanup if.end68: ; preds = %if.end50 store i32 99999999, ptr %arrayidx2, align 4, !tbaa !5 %cmp60 = icmp eq i32 %now, 0 %spec.select = zext i1 %cmp60 to i32 %add133 = add nsw i32 %p, 1 %call132 = tail call i32 @DP(i32 noundef %add133, i32 noundef 0) %.pre = load i32, ptr %arrayidx2, align 4, !tbaa !5 %add69 = add nsw i32 %call132, %spec.select %cmp74 = icmp slt i32 %add69, %.pre br i1 %cmp74, label %if.then75, label %land.lhs.true65.1 if.then75: ; preds = %if.end68 store i32 %add69, ptr %arrayidx2, align 4, !tbaa !5 br label %land.lhs.true65.1 land.lhs.true65.1: ; preds = %if.then75, %if.end68 br i1 %cmp40, label %if.end68.2, label %if.end68.1 if.end68.1: ; preds = %land.lhs.true65.1 %call134.1 = tail call i32 @DP(i32 noundef %add133, i32 noundef 1) %.pre137 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %add69.1 = add nsw i32 %call134.1, %spec.select %cmp74.1 = icmp slt i32 %add69.1, %.pre137 br i1 %cmp74.1, label %if.then75.1, label %land.lhs.true65.2 if.then75.1: ; preds = %if.end68.1 store i32 %add69.1, ptr %arrayidx2, align 4, !tbaa !5 br label %land.lhs.true65.2 land.lhs.true65.2: ; preds = %if.end68.1, %if.then75.1 %3 = phi i32 [ %add69.1, %if.then75.1 ], [ %.pre137, %if.end68.1 ] br i1 %cmp25, label %cleanup, label %if.end68.2 if.end68.2: ; preds = %land.lhs.true65.1, %land.lhs.true65.2 %call134.2 = tail call i32 @DP(i32 noundef %add133, i32 noundef 2) %.pre138 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %add69.2 = add nsw i32 %call134.2, %spec.select %cmp74.2 = icmp slt i32 %add69.2, %.pre138 br i1 %cmp74.2, label %if.then75.2, label %cleanup if.then75.2: ; preds = %if.end68.2 store i32 %add69.2, ptr %arrayidx2, align 4, !tbaa !5 br label %cleanup cleanup: ; preds = %land.lhs.true65.2, %if.end68.2, %if.then75.2, %if.then52, %entry, %if.then41, %if.then26, %if.then11 %retval.0 = phi i32 [ 99999999, %if.then11 ], [ 99999999, %if.then26 ], [ 99999999, %if.then41 ], [ %0, %entry ], [ %., %if.then52 ], [ %add69.2, %if.then75.2 ], [ %.pre138, %if.end68.2 ], [ %3, %land.lhs.true65.2 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %cmp.not15 = icmp slt i32 %0, 1 br i1 %cmp.not15, label %for.end, label %for.body for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [105 x i32], ptr @a, i64 0, i64 %indvars.iv %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr @n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp.not.not = icmp slt i64 %indvars.iv, %2 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %call2 = tail call i32 @DP(i32 noundef 1, i32 noundef 0) store i32 %call2, ptr getelementptr inbounds ([105 x [5 x i32]], ptr @dp, i64 0, i64 1), align 4, !tbaa !5 %call3 = tail call i32 @DP(i32 noundef 1, i32 noundef 1) store i32 %call3, ptr getelementptr inbounds ([105 x [5 x i32]], ptr @dp, i64 0, i64 1, i64 1), align 8, !tbaa !5 %call4 = tail call i32 @DP(i32 noundef 1, i32 noundef 2) store i32 %call4, ptr getelementptr inbounds ([105 x [5 x i32]], ptr @dp, i64 0, i64 1, i64 2), align 4, !tbaa !5 %3 = load i32, ptr getelementptr inbounds ([105 x [5 x i32]], ptr @dp, i64 0, i64 1, i64 1), align 8, !tbaa !5 %spec.select = tail call i32 @llvm.smin.i32(i32 %3, i32 %call2) %ans.1 = tail call i32 @llvm.smin.i32(i32 %call4, i32 %spec.select) %call9 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.1) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree nounwind "no-trapping-math"="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) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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(){ long long y=100, x; int i=0; scanf("%lld", &x); while(y<x){ y+=(y/100); i++; } printf("%d\n", i); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274402/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274402/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %x, align 8, !tbaa !5 %cmp5 = icmp sgt i64 %0, 100 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %i.07 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %y.06 = phi i64 [ %add, %while.body ], [ 100, %entry ] %div = sdiv i64 %y.06, 100 %add = add nsw i64 %div, %y.06 %inc = add nuw nsw i32 %i.07, 1 %cmp = icmp slt i64 %add, %0 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %i.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %i.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> #include <math.h> int main() { long x; scanf("%ld", &x); double mysum = 100; int cnt = 0; while (mysum < x) { mysum = floor(mysum * 1.01); cnt++; } printf("%d", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274446/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274446/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %x, align 8, !tbaa !5 %conv = sitofp i64 %0 to double %cmp5 = icmp sgt i64 %0, 100 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %cnt.07 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %mysum.06 = phi double [ %1, %while.body ], [ 1.000000e+02, %entry ] %mul = fmul double %mysum.06, 1.010000e+00 %1 = call double @llvm.floor.f64(double %mul) %inc = add nuw nsw i32 %cnt.07, 1 %cmp = fcmp olt double %1, %conv br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %cnt.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.floor.f64(double) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree 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"}
#include <stdio.h> #define INF 0x7fffffff char dir[200002]; int min(int a,int b) { return a<b?a:b; } int main() { int n,f,l,i,ans=INF; scanf("%d %s %d",&n,dir,&f); for(i=1;i<n;i++) { scanf("%d",&l); if(dir[i-1]=='R'&&dir[i]=='L') ans=min(ans,l-f>>1); f=l; } printf("%d\n",ans==INF?-1:ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27449/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27449/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %s %d\00", align 1 @dir = dso_local global [200002 x i8] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @min(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: %cond = tail call i32 @llvm.smin.i32(i32 %a, i32 %b) ret i32 %cond } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %n = alloca i32, align 4 %f = alloca i32, align 4 %l = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %f) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %l) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull @dir, ptr noundef nonnull %f) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp19 = icmp sgt i32 %0, 1 br i1 %cmp19, label %for.body, label %for.end.thread for.body: ; preds = %entry, %if.end %indvars.iv = phi i64 [ %indvars.iv.next, %if.end ], [ 1, %entry ] %ans.021 = phi i32 [ %ans.1.fr, %if.end ], [ 2147483647, %entry ] %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %l) %1 = add nsw i64 %indvars.iv, -1 %arrayidx = getelementptr inbounds [200002 x i8], ptr @dir, i64 0, i64 %1 %2 = load i8, ptr %arrayidx, align 1, !tbaa !9 %cmp2 = icmp eq i8 %2, 82 br i1 %cmp2, label %land.lhs.true, label %for.body.if.end_crit_edge for.body.if.end_crit_edge: ; preds = %for.body %.pre = load i32, ptr %l, align 4, !tbaa !5 br label %if.end land.lhs.true: ; preds = %for.body %arrayidx5 = getelementptr inbounds [200002 x i8], ptr @dir, i64 0, i64 %indvars.iv %3 = load i8, ptr %arrayidx5, align 1, !tbaa !9 %cmp7 = icmp eq i8 %3, 76 %.pre24 = load i32, ptr %l, align 4, !tbaa !5 br i1 %cmp7, label %if.then, label %if.end if.then: ; preds = %land.lhs.true %4 = load i32, ptr %f, align 4, !tbaa !5 %sub9 = sub nsw i32 %.pre24, %4 %shr = ashr i32 %sub9, 1 %cond.i = call i32 @llvm.smin.i32(i32 %ans.021, i32 %shr) br label %if.end if.end: ; preds = %for.body.if.end_crit_edge, %if.then, %land.lhs.true %5 = phi i32 [ %.pre24, %if.then ], [ %.pre24, %land.lhs.true ], [ %.pre, %for.body.if.end_crit_edge ] %ans.1 = phi i32 [ %cond.i, %if.then ], [ %ans.021, %land.lhs.true ], [ %ans.021, %for.body.if.end_crit_edge ] %ans.1.fr = freeze i32 %ans.1 store i32 %5, ptr %f, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %if.end %cmp11 = icmp eq i32 %ans.1.fr, 2147483647 br i1 %cmp11, label %for.end.thread, label %8 for.end.thread: ; preds = %entry, %for.end br label %8 8: ; preds = %for.end, %for.end.thread %9 = phi i32 [ -1, %for.end.thread ], [ %ans.1.fr, %for.end ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %9) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %l) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %f) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!7, !7, i64 0} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main() { unsigned long long int x,y=0,i=100; scanf("%llu",&x); while(1){ i=i+(i*0.01); y++; if(i>=x){ break; } } printf("%llu\n",y); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274532/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274532/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%llu\00", align 1 @.str.1 = private unnamed_addr constant [6 x i8] c"%llu\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %x, align 8, !tbaa !5 br label %while.cond while.cond: ; preds = %while.cond, %entry %y.0 = phi i64 [ 0, %entry ], [ %inc, %while.cond ] %i.0 = phi i64 [ 100, %entry ], [ %conv2, %while.cond ] %conv = uitofp i64 %i.0 to double %1 = call double @llvm.fmuladd.f64(double %conv, double 1.000000e-02, double %conv) %conv2 = fptoui double %1 to i64 %inc = add i64 %y.0, 1 %cmp.not = icmp ugt i64 %0, %conv2 br i1 %cmp.not, label %while.cond, label %while.end while.end: ; preds = %while.cond %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %inc) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.fmuladd.f64(double, double, double) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree 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(void) { signed long long int k; scanf("%lld",&k); signed long long int result; int ct=0; result=100; while(result<k) { result=result+(result/100); ct++; } printf("%d",ct); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274576/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274576/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %k = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %k) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %k) %0 = load i64, ptr %k, align 8, !tbaa !5 %cmp5 = icmp sgt i64 %0, 100 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %ct.07 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %result.06 = phi i64 [ %add, %while.body ], [ 100, %entry ] %div = sdiv i64 %result.06, 100 %add = add nsw i64 %div, %result.06 %inc = add nuw nsw i32 %ct.07, 1 %cmp = icmp slt i64 %add, %0 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %ct.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %ct.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %k) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <math.h> int main(int argc, char const *argv[]) { long double x; unsigned long long yokin = 100; unsigned long c = 0; scanf("%Lf", &x); while (yokin < x) { yokin *= 1.01; c++; } printf("%lu\n", c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274619/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274619/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%Lf\00", align 1 @.str.1 = private unnamed_addr constant [5 x i8] c"%lu\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: %x = alloca x86_fp80, align 16 call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load x86_fp80, ptr %x, align 16, !tbaa !5 %cmp7 = fcmp ogt x86_fp80 %0, 0xK4005C800000000000000 br i1 %cmp7, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %c.09 = phi i64 [ %inc, %while.body ], [ 0, %entry ] %yokin.08 = phi i64 [ %conv3, %while.body ], [ 100, %entry ] %conv2 = uitofp i64 %yokin.08 to double %mul = fmul double %conv2, 1.010000e+00 %conv3 = fptoui double %mul to i64 %inc = add i64 %c.09, 1 %conv = uitofp i64 %conv3 to x86_fp80 %cmp = fcmp ogt x86_fp80 %0, %conv br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %c.0.lcssa = phi i64 [ 0, %entry ], [ %inc, %while.body ] %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %c.0.lcssa) call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long double", !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() { double X,deposit = 100; int year = 0; scanf("%lf",&X); while(deposit < X){ deposit = floor(deposit * 1.01); year++; } printf("%d\n",year); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274662/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274662/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"%lf\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 double, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %X) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %X) %0 = load double, ptr %X, align 8, !tbaa !5 %cmp4 = fcmp ogt double %0, 1.000000e+02 br i1 %cmp4, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %year.06 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %deposit.05 = phi double [ %1, %while.body ], [ 1.000000e+02, %entry ] %mul = fmul double %deposit.05, 1.010000e+00 %1 = call double @llvm.floor.f64(double %mul) %inc = add nuw nsw i32 %year.06, 1 %cmp = fcmp olt double %1, %0 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %year.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %year.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %X) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.floor.f64(double) #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree 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 = !{!"double", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <stdlib.h> #include <time.h> #include <string.h> #include <unistd.h> #include <math.h> long long int ans=0; //最大公約数 long long int getgcd(long long n, long long m) { int r; if (n > m) { long long t = m; m = n; n = t; } while ((r = m % n) != 0) { m = n; n = r; } return n; } //nの階乗を計算 long long factorial(long long n){ long long int answer = 1; while(n > 1){ answer *= n; n--; } return answer; } //組み合わせの数nCrを計算 long long calcNumOfCombination(long long n, long long r){ return factorial(n) / (factorial(r) * factorial(n-r)); } void yes(){ printf("Yes\n"); } void no(){ printf("No\n"); } int main(int argc, char* argv[]){ long long int a = 0, b = 0,c=0; scanf("%lld",&a); int f=0; for (double i = 100.0; i<a;i=floor(i*1.01)) { b++; } printf("%lld\n",b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274705/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274705/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ans = dso_local local_unnamed_addr global i64 0, align 8 @.str.2 = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @str = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @str.4 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i64 @getgcd(i64 noundef %n, i64 noundef %m) local_unnamed_addr #0 { entry: %spec.select = tail call i64 @llvm.smax.i64(i64 %n, i64 %m) %spec.select10 = tail call i64 @llvm.smin.i64(i64 %n, i64 %m) %rem11 = srem i64 %spec.select, %spec.select10 %0 = and i64 %rem11, 4294967295 %cmp1.not12 = icmp eq i64 %0, 0 br i1 %cmp1.not12, label %while.end, label %while.body while.body: ; preds = %entry, %while.body %rem14 = phi i64 [ %rem, %while.body ], [ %rem11, %entry ] %n.addr.113 = phi i64 [ %conv3, %while.body ], [ %spec.select10, %entry ] %sext = shl i64 %rem14, 32 %conv3 = ashr exact i64 %sext, 32 %rem = srem i64 %n.addr.113, %conv3 %1 = and i64 %rem, 4294967295 %cmp1.not = icmp eq i64 %1, 0 br i1 %cmp1.not, label %while.end, label %while.body, !llvm.loop !5 while.end: ; preds = %while.body, %entry %n.addr.1.lcssa = phi i64 [ %spec.select10, %entry ], [ %conv3, %while.body ] ret i64 %n.addr.1.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 norecurse nosync nounwind memory(none) uwtable define dso_local i64 @factorial(i64 noundef %n) local_unnamed_addr #2 { entry: %cmp4 = icmp sgt i64 %n, 1 br i1 %cmp4, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %answer.06 = phi i64 [ %mul, %while.body ], [ 1, %entry ] %n.addr.05 = phi i64 [ %dec, %while.body ], [ %n, %entry ] %mul = mul nsw i64 %answer.06, %n.addr.05 %dec = add nsw i64 %n.addr.05, -1 %cmp = icmp ugt i64 %n.addr.05, 2 br i1 %cmp, label %while.body, label %while.end, !llvm.loop !7 while.end: ; preds = %while.body, %entry %answer.0.lcssa = phi i64 [ 1, %entry ], [ %mul, %while.body ] ret i64 %answer.0.lcssa } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i64 @calcNumOfCombination(i64 noundef %n, i64 noundef %r) local_unnamed_addr #2 { entry: %cmp4.i = icmp sgt i64 %n, 1 br i1 %cmp4.i, label %while.body.i, label %factorial.exit while.body.i: ; preds = %entry, %while.body.i %answer.06.i = phi i64 [ %mul.i, %while.body.i ], [ 1, %entry ] %n.addr.05.i = phi i64 [ %dec.i, %while.body.i ], [ %n, %entry ] %mul.i = mul nsw i64 %n.addr.05.i, %answer.06.i %dec.i = add nsw i64 %n.addr.05.i, -1 %cmp.i = icmp ugt i64 %n.addr.05.i, 2 br i1 %cmp.i, label %while.body.i, label %factorial.exit, !llvm.loop !7 factorial.exit: ; preds = %while.body.i, %entry %answer.0.lcssa.i = phi i64 [ 1, %entry ], [ %mul.i, %while.body.i ] %cmp4.i5 = icmp sgt i64 %r, 1 br i1 %cmp4.i5, label %while.body.i7, label %factorial.exit13 while.body.i7: ; preds = %factorial.exit, %while.body.i7 %answer.06.i8 = phi i64 [ %mul.i10, %while.body.i7 ], [ 1, %factorial.exit ] %n.addr.05.i9 = phi i64 [ %dec.i11, %while.body.i7 ], [ %r, %factorial.exit ] %mul.i10 = mul nsw i64 %n.addr.05.i9, %answer.06.i8 %dec.i11 = add nsw i64 %n.addr.05.i9, -1 %cmp.i12 = icmp ugt i64 %n.addr.05.i9, 2 br i1 %cmp.i12, label %while.body.i7, label %factorial.exit13, !llvm.loop !7 factorial.exit13: ; preds = %while.body.i7, %factorial.exit %answer.0.lcssa.i6 = phi i64 [ 1, %factorial.exit ], [ %mul.i10, %while.body.i7 ] %sub = sub nsw i64 %n, %r %cmp4.i14 = icmp sgt i64 %sub, 1 br i1 %cmp4.i14, label %while.body.i16, label %factorial.exit22 while.body.i16: ; preds = %factorial.exit13, %while.body.i16 %answer.06.i17 = phi i64 [ %mul.i19, %while.body.i16 ], [ 1, %factorial.exit13 ] %n.addr.05.i18 = phi i64 [ %dec.i20, %while.body.i16 ], [ %sub, %factorial.exit13 ] %mul.i19 = mul nsw i64 %n.addr.05.i18, %answer.06.i17 %dec.i20 = add nsw i64 %n.addr.05.i18, -1 %cmp.i21 = icmp ugt i64 %n.addr.05.i18, 2 br i1 %cmp.i21, label %while.body.i16, label %factorial.exit22, !llvm.loop !7 factorial.exit22: ; preds = %while.body.i16, %factorial.exit13 %answer.0.lcssa.i15 = phi i64 [ 1, %factorial.exit13 ], [ %mul.i19, %while.body.i16 ] %mul = mul nsw i64 %answer.0.lcssa.i15, %answer.0.lcssa.i6 %div = sdiv i64 %answer.0.lcssa.i, %mul ret i64 %div } ; Function Attrs: nofree nounwind uwtable define dso_local void @yes() local_unnamed_addr #3 { entry: %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind uwtable define dso_local void @no() local_unnamed_addr #3 { entry: %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str.4) ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #3 { entry: %a = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %a) #8 store i64 0, ptr %a, align 8, !tbaa !8 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.2, ptr noundef nonnull %a) %0 = load i64, ptr %a, align 8, !tbaa !8 %conv = sitofp i64 %0 to double %cmp5 = icmp sgt i64 %0, 100 br i1 %cmp5, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %b.0.lcssa = phi i64 [ 0, %entry ], [ %inc, %for.body ] %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %b.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %a) #8 ret i32 0 for.body: ; preds = %entry, %for.body %i.07 = phi double [ %1, %for.body ], [ 1.000000e+02, %entry ] %b.06 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %inc = add nuw nsw i64 %b.06, 1 %mul = fmul double %i.07, 1.010000e+00 %1 = call double @llvm.floor.f64(double %mul) %cmp = fcmp olt double %1, %conv br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !12 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.floor.f64(double) #5 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smax.i64(i64, i64) #7 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #7 attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } 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 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { nofree nounwind } attributes #7 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"} !7 = distinct !{!7, !6} !8 = !{!9, !9, i64 0} !9 = !{!"long long", !10, i64 0} !10 = !{!"omnipotent char", !11, i64 0} !11 = !{!"Simple C/C++ TBAA"} !12 = distinct !{!12, !6}
#include<stdio.h> int main(){ int m=0; long x,a=100; scanf("%ld",&x); while(x>a){ a+=a/100; m++; } printf("%d",m); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274756/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274756/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [4 x i8] c"%ld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %x, align 8, !tbaa !5 %cmp5 = icmp sgt i64 %0, 100 br i1 %cmp5, label %while.body, label %while.end while.body: ; preds = %entry, %while.body %a.07 = phi i64 [ %add, %while.body ], [ 100, %entry ] %m.06 = phi i32 [ %inc, %while.body ], [ 0, %entry ] %div = sdiv i64 %a.07, 100 %add = add nsw i64 %div, %a.07 %inc = add nuw nsw i32 %m.06, 1 %cmp = icmp sgt i64 %0, %add br i1 %cmp, label %while.body, label %while.end, !llvm.loop !9 while.end: ; preds = %while.body, %entry %m.0.lcssa = phi i32 [ 0, %entry ], [ %inc, %while.body ] %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %m.0.lcssa) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !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> #define MIN(x, y) (((x) > (y)) ? (y) : (x)) #define ABS(x) ((x) >= 0 ? (x) : (-(x))) int main() { long long x; scanf("%lld", &x); long long sum = 100; long long year = 0; do { sum += sum / 100; year++; } while (sum < x); printf("%lld", year); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274806/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274806/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i64, align 8 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %x) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i64, ptr %x, align 8, !tbaa !5 br label %do.body do.body: ; preds = %do.body, %entry %sum.0 = phi i64 [ 100, %entry ], [ %add, %do.body ] %year.0 = phi i64 [ 0, %entry ], [ %inc, %do.body ] %div = sdiv i64 %sum.0, 100 %add = add nsw i64 %div, %sum.0 %inc = add nuw nsw i64 %year.0, 1 %cmp = icmp slt i64 %add, %0 br i1 %cmp, label %do.body, label %do.end, !llvm.loop !9 do.end: ; preds = %do.body %call1 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %inc) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> #include<string.h> #include<stdio.h> #include<math.h> int main() { long long int n; scanf("%lld",&n); char c[n]; long long int ans=10000000000,a[n],i; scanf("%s",c); for(i=0;i<n;i++) scanf("%lld",&a[i]); for(i=0;i<=n-1;i++) { if(c[i]=='R') { if(c[i+1]=='L') { if(a[i+1]-a[i]<ans) ans=a[i+1]-a[i]; } } else if(c[i]=='L') { if(c[i-1]=='R') { if(a[i]-a[i-1]<ans) ans=a[i]-a[i-1]; } } } if(ans!=10000000000) printf("%lld",ans/2); else printf("-1"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27485/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27485/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%lld\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"-1\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) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %1 = call ptr @llvm.stacksave.p0() %vla = alloca i8, i64 %0, align 16 %2 = load i64, ptr %n, align 8, !tbaa !5 %vla1 = alloca i64, i64 %2, align 16 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %vla) %3 = load i64, ptr %n, align 8, !tbaa !5 %cmp83 = icmp sgt i64 %3, 0 br i1 %cmp83, label %for.body, label %if.else60 for.cond4.preheader: ; preds = %for.body %cmp5.not.not85 = icmp sgt i64 %4, 0 br i1 %cmp5.not.not85, label %for.body6, label %if.else60 for.body: ; preds = %entry, %for.body %i.084 = phi i64 [ %inc, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i64, ptr %vla1, i64 %i.084 %call3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.084, 1 %4 = load i64, ptr %n, align 8, !tbaa !5 %cmp = icmp slt i64 %inc, %4 br i1 %cmp, label %for.body, label %for.cond4.preheader, !llvm.loop !9 for.body6: ; preds = %for.cond4.preheader, %for.inc53 %i.187 = phi i64 [ %inc54, %for.inc53 ], [ 0, %for.cond4.preheader ] %ans.086 = phi i64 [ %ans.1, %for.inc53 ], [ 10000000000, %for.cond4.preheader ] %arrayidx7 = getelementptr inbounds i8, ptr %vla, i64 %i.187 %5 = load i8, ptr %arrayidx7, align 1, !tbaa !11 switch i8 %5, label %for.inc53 [ i8 82, label %if.then i8 76, label %if.then31 ] if.then: ; preds = %for.body6 %add = add nuw nsw i64 %i.187, 1 %arrayidx10 = getelementptr inbounds i8, ptr %vla, i64 %add %6 = load i8, ptr %arrayidx10, align 1, !tbaa !11 %cmp12 = icmp eq i8 %6, 76 br i1 %cmp12, label %for.inc53.sink.split, label %for.inc53 if.then31: ; preds = %for.body6 %sub32 = add nsw i64 %i.187, -1 %arrayidx33 = getelementptr inbounds i8, ptr %vla, i64 %sub32 %7 = load i8, ptr %arrayidx33, align 1, !tbaa !11 %cmp35 = icmp eq i8 %7, 82 br i1 %cmp35, label %for.inc53.sink.split, label %for.inc53 for.inc53.sink.split: ; preds = %if.then31, %if.then %i.187.sink = phi i64 [ %add, %if.then ], [ %i.187, %if.then31 ] %sub32.sink = phi i64 [ %i.187, %if.then ], [ %sub32, %if.then31 ] %arrayidx38 = getelementptr inbounds i64, ptr %vla1, i64 %i.187.sink %8 = load i64, ptr %arrayidx38, align 8, !tbaa !5 %arrayidx40 = getelementptr inbounds i64, ptr %vla1, i64 %sub32.sink %9 = load i64, ptr %arrayidx40, align 8, !tbaa !5 %sub41 = sub nsw i64 %8, %9 %spec.select82 = call i64 @llvm.smin.i64(i64 %sub41, i64 %ans.086) br label %for.inc53 for.inc53: ; preds = %for.inc53.sink.split, %for.body6, %if.then, %if.then31 %ans.1 = phi i64 [ %ans.086, %if.then ], [ %ans.086, %if.then31 ], [ %ans.086, %for.body6 ], [ %spec.select82, %for.inc53.sink.split ] %inc54 = add nuw nsw i64 %i.187, 1 %exitcond.not = icmp eq i64 %inc54, %4 br i1 %exitcond.not, label %for.end55, label %for.body6, !llvm.loop !12 for.end55: ; preds = %for.inc53 %cmp56.not = icmp eq i64 %ans.1, 10000000000 br i1 %cmp56.not, label %if.else60, label %if.then58 if.then58: ; preds = %for.end55 %div = sdiv i64 %ans.1, 2 %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %div) br label %if.end62 if.else60: ; preds = %entry, %for.cond4.preheader, %for.end55 %call61 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %if.end62 if.end62: ; preds = %if.else60, %if.then58 call void @llvm.stackrestore.p0(ptr %1) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.smin.i64(i64, i64) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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 = !{!7, !7, i64 0} !12 = distinct !{!12, !10}
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <stdlib.h> #include <time.h> #define clr(ar) memset(ar, 0, sizeof(ar)) #define read() freopen("lol.txt", "r", stdin) int main(){ srand(time(0)); int n, i, j, x, mask = 0; for (i = 0; i < 4; i++){ scanf("%d", &x); if (x) mask |= (1 << i); } if (mask == 0){ puts("0"); return 0; } if (mask == 1){ puts("1"); return 0; } if (mask == 2){ puts("0"); return 0; } if (mask == 3){ puts("1"); return 0; } if (mask == 4){ puts("0"); return 0; } if (mask == 5){ puts("0"); return 0; } if (mask == 6){ puts("0"); return 0; } if (mask == 7){ puts("1"); return 0; } if (mask == 8){ puts("1"); return 0; } if (mask == 9){ puts("1"); return 0; } if (mask == 10){ puts("0"); return 0; } if (mask == 11){ puts("0"); return 0; } if (mask == 12){ puts("1"); return 0; } if (mask == 13){ puts("1"); return 0; } if (mask == 14){ puts("0"); return 0; } if (mask == 15){ puts("1"); return 0; } if (mask ) __builtin_trap(); return 0; if (mask == 0) puts("0"); else printf("%d\n", rand() & 1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_27490/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_27490/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [2 x i8] c"0\00", align 1 @.str.2 = private unnamed_addr constant [2 x i8] c"1\00", align 1 @reltable.main = private unnamed_addr constant [16 x i32] [i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.1 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr @.str.2 to i64), i64 ptrtoint (ptr @reltable.main to i64)) to i32)], align 4 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 %call = tail call i64 @time(ptr noundef null) #5 %conv = trunc i64 %call to i32 tail call void @srand(i32 noundef %conv) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #5 %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %0 = load i32, ptr %x, align 4, !tbaa !5 %tobool.not = icmp ne i32 %0, 0 %or = zext i1 %tobool.not to i64 %call2.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %1 = load i32, ptr %x, align 4, !tbaa !5 %tobool.not.1 = icmp eq i32 %1, 0 %or.1 = select i1 %tobool.not.1, i64 0, i64 2 %mask.1.1 = or i64 %or.1, %or %call2.2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !5 %tobool.not.2 = icmp eq i32 %2, 0 %or.2 = select i1 %tobool.not.2, i64 0, i64 4 %mask.1.2 = or i64 %or.2, %mask.1.1 %call2.3 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %3 = load i32, ptr %x, align 4, !tbaa !5 %tobool.not.3 = icmp eq i32 %3, 0 %or.3 = select i1 %tobool.not.3, i64 0, i64 8 %mask.1.3 = or i64 %or.3, %mask.1.2 %reltable.shift = shl i64 %mask.1.3, 2 %reltable.intrinsic = call ptr @llvm.load.relative.i64(ptr @reltable.main, i64 %reltable.shift) %call81 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %reltable.intrinsic) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #5 ret i32 0 } ; Function Attrs: nounwind declare void @srand(i32 noundef) local_unnamed_addr #1 ; Function Attrs: nounwind declare i64 @time(ptr noundef) local_unnamed_addr #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: read) declare ptr @llvm.load.relative.i64(ptr, i64) #4 attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind "no-trapping-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 = { nocallback nofree nosync nounwind willreturn memory(argmem: read) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int partition(int A[],int p,int r) { int x, i, j, c; x=A[r]; i=p-1; for(j=p;j<=r-1;j++){ if(A[j]<=x) { i=i+1; c=A[j]; A[j]=A[i]; A[i]=c; } } c=A[r]; A[r]=A[i+1]; A[i+1]=c; return i+1; } void quicksort(int A[],int p,int r) { int q; if(p<r){ q=partition(A, p, r); quicksort(A, p, q-1); quicksort(A, q+1, r); } } int A[1000010]={}; int main() { int n, i; scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d",&A[i]); } quicksort(A,0,n-1); for(i=0;i<n;i++){ printf("%d",A[i]); if(i==n-1) break; printf(" "); } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_274943/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_274943/source.c" target datalayout = "e-m:e-p270: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 global [1000010 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @partition(ptr nocapture noundef %A, i32 noundef %p, i32 noundef %r) local_unnamed_addr #0 { entry: %idxprom = sext i32 %r to i64 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp.not.not47 = icmp slt i32 %p, %r br i1 %cmp.not.not47, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %sub = add nsw i32 %p, -1 %1 = sext i32 %p to i64 %2 = sub nsw i64 %idxprom, %1 %xtraiter = and i64 %2, 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 %arrayidx3.prol = getelementptr inbounds i32, ptr %A, i64 %1 %3 = load i32, ptr %arrayidx3.prol, align 4, !tbaa !5 %cmp4.not.prol = icmp sgt i32 %3, %0 br i1 %cmp4.not.prol, label %for.inc.prol, label %if.then.prol if.then.prol: ; preds = %for.body.prol %idxprom7.prol = sext i32 %p to i64 %arrayidx8.prol = getelementptr inbounds i32, ptr %A, i64 %idxprom7.prol %4 = load i32, ptr %arrayidx8.prol, align 4, !tbaa !5 store i32 %4, ptr %arrayidx3.prol, align 4, !tbaa !5 store i32 %3, ptr %arrayidx8.prol, align 4, !tbaa !5 br label %for.inc.prol for.inc.prol: ; preds = %if.then.prol, %for.body.prol %i.1.prol = phi i32 [ %p, %if.then.prol ], [ %sub, %for.body.prol ] %indvars.iv.next.prol = add nsw i64 %1, 1 br label %for.body.prol.loopexit for.body.prol.loopexit: ; preds = %for.inc.prol, %for.body.preheader %i.1.lcssa.unr = phi i32 [ undef, %for.body.preheader ], [ %i.1.prol, %for.inc.prol ] %indvars.iv.unr = phi i64 [ %1, %for.body.preheader ], [ %indvars.iv.next.prol, %for.inc.prol ] %i.048.unr = phi i32 [ %sub, %for.body.preheader ], [ %i.1.prol, %for.inc.prol ] %5 = sub nsw i64 0, %idxprom %6 = xor i64 %1, %5 %7 = icmp eq i64 %6, -1 br i1 %7, label %for.end.loopexit, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.prol.loopexit %invariant.gep = getelementptr i32, ptr %A, i64 1 br label %for.body for.body: ; preds = %for.inc.1, %for.body.preheader.new %indvars.iv = phi i64 [ %indvars.iv.unr, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.inc.1 ] %i.048 = phi i32 [ %i.048.unr, %for.body.preheader.new ], [ %i.1.1, %for.inc.1 ] %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %indvars.iv %8 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %cmp4.not = icmp sgt i32 %8, %0 br i1 %cmp4.not, label %for.inc, label %if.then if.then: ; preds = %for.body %add = add nsw i32 %i.048, 1 %idxprom7 = sext i32 %add to i64 %arrayidx8 = getelementptr inbounds i32, ptr %A, i64 %idxprom7 %9 = load i32, ptr %arrayidx8, align 4, !tbaa !5 store i32 %9, ptr %arrayidx3, align 4, !tbaa !5 store i32 %8, ptr %arrayidx8, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body, %if.then %i.1 = phi i32 [ %add, %if.then ], [ %i.048, %for.body ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv %10 = load i32, ptr %gep, align 4, !tbaa !5 %cmp4.not.1 = icmp sgt i32 %10, %0 br i1 %cmp4.not.1, label %for.inc.1, label %if.then.1 if.then.1: ; preds = %for.inc %add.1 = add nsw i32 %i.1, 1 %idxprom7.1 = sext i32 %add.1 to i64 %arrayidx8.1 = getelementptr inbounds i32, ptr %A, i64 %idxprom7.1 %11 = load i32, ptr %arrayidx8.1, align 4, !tbaa !5 store i32 %11, ptr %gep, align 4, !tbaa !5 store i32 %10, ptr %arrayidx8.1, align 4, !tbaa !5 br label %for.inc.1 for.inc.1: ; preds = %if.then.1, %for.inc %i.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %i.1, %for.inc ] %indvars.iv.next.1 = add nsw i64 %indvars.iv, 2 %exitcond.not.1 = icmp eq i64 %indvars.iv.next.1, %idxprom br i1 %exitcond.not.1, label %for.end.loopexit, label %for.body, !llvm.loop !9 for.end.loopexit: ; preds = %for.inc.1, %for.body.prol.loopexit %i.1.lcssa = phi i32 [ %i.1.lcssa.unr, %for.body.prol.loopexit ], [ %i.1.1, %for.inc.1 ] %.pre = load i32, ptr %arrayidx, align 4, !tbaa !5 %12 = add nsw i32 %i.1.lcssa, 1 br label %for.end for.end: ; preds = %for.end.loopexit, %entry %13 = phi i32 [ %0, %entry ], [ %.pre, %for.end.loopexit ] %i.0.lcssa = phi i32 [ %p, %entry ], [ %12, %for.end.loopexit ] %idxprom16 = sext i32 %i.0.lcssa to i64 %arrayidx17 = getelementptr inbounds i32, ptr %A, i64 %idxprom16 %14 = load i32, ptr %arrayidx17, align 4, !tbaa !5 store i32 %14, ptr %arrayidx, align 4, !tbaa !5 store i32 %13, ptr %arrayidx17, align 4, !tbaa !5 ret i32 %i.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quicksort(ptr nocapture noundef %A, i32 noundef %p, i32 noundef %r) local_unnamed_addr #2 { entry: %cmp8 = icmp slt i32 %p, %r br i1 %cmp8, label %for.body.preheader.i.lr.ph, label %if.end for.body.preheader.i.lr.ph: ; preds = %entry %idxprom.i = sext i32 %r to i64 %arrayidx.i = getelementptr inbounds i32, ptr %A, i64 %idxprom.i %0 = sub nsw i64 0, %idxprom.i %invariant.gep = getelementptr i32, ptr %A, i64 1 br label %for.body.preheader.i for.body.preheader.i: ; preds = %for.body.preheader.i.lr.ph, %partition.exit %p.tr9 = phi i32 [ %p, %for.body.preheader.i.lr.ph ], [ %add, %partition.exit ] %1 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %sub.i = add nsw i32 %p.tr9, -1 %2 = sext i32 %p.tr9 to i64 %3 = sub nsw i64 %idxprom.i, %2 %xtraiter = and i64 %3, 1 %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.preheader.i %arrayidx3.i.prol = getelementptr inbounds i32, ptr %A, i64 %2 %4 = load i32, ptr %arrayidx3.i.prol, align 4, !tbaa !5 %cmp4.not.i.prol = icmp sgt i32 %4, %1 br i1 %cmp4.not.i.prol, label %for.inc.i.prol, label %if.then.i.prol if.then.i.prol: ; preds = %for.body.i.prol %idxprom7.i.prol = sext i32 %p.tr9 to i64 %arrayidx8.i.prol = getelementptr inbounds i32, ptr %A, i64 %idxprom7.i.prol %5 = load i32, ptr %arrayidx8.i.prol, align 4, !tbaa !5 store i32 %5, ptr %arrayidx3.i.prol, align 4, !tbaa !5 store i32 %4, ptr %arrayidx8.i.prol, align 4, !tbaa !5 br label %for.inc.i.prol for.inc.i.prol: ; preds = %if.then.i.prol, %for.body.i.prol %i.1.i.prol = phi i32 [ %p.tr9, %if.then.i.prol ], [ %sub.i, %for.body.i.prol ] %indvars.iv.next.i.prol = add nsw i64 %2, 1 br label %for.body.i.prol.loopexit for.body.i.prol.loopexit: ; preds = %for.inc.i.prol, %for.body.preheader.i %i.1.i.lcssa.unr = phi i32 [ undef, %for.body.preheader.i ], [ %i.1.i.prol, %for.inc.i.prol ] %indvars.iv.i.unr = phi i64 [ %2, %for.body.preheader.i ], [ %indvars.iv.next.i.prol, %for.inc.i.prol ] %i.048.i.unr = phi i32 [ %sub.i, %for.body.preheader.i ], [ %i.1.i.prol, %for.inc.i.prol ] %6 = xor i64 %2, %0 %7 = icmp eq i64 %6, -1 br i1 %7, label %partition.exit, label %for.body.i for.body.i: ; preds = %for.body.i.prol.loopexit, %for.inc.i.1 %indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.inc.i.1 ], [ %indvars.iv.i.unr, %for.body.i.prol.loopexit ] %i.048.i = phi i32 [ %i.1.i.1, %for.inc.i.1 ], [ %i.048.i.unr, %for.body.i.prol.loopexit ] %arrayidx3.i = getelementptr inbounds i32, ptr %A, i64 %indvars.iv.i %8 = load i32, ptr %arrayidx3.i, align 4, !tbaa !5 %cmp4.not.i = icmp sgt i32 %8, %1 br i1 %cmp4.not.i, label %for.inc.i, label %if.then.i if.then.i: ; preds = %for.body.i %add.i = add nsw i32 %i.048.i, 1 %idxprom7.i = sext i32 %add.i to i64 %arrayidx8.i = getelementptr inbounds i32, ptr %A, i64 %idxprom7.i %9 = load i32, ptr %arrayidx8.i, align 4, !tbaa !5 store i32 %9, ptr %arrayidx3.i, align 4, !tbaa !5 store i32 %8, ptr %arrayidx8.i, align 4, !tbaa !5 br label %for.inc.i for.inc.i: ; preds = %if.then.i, %for.body.i %i.1.i = phi i32 [ %add.i, %if.then.i ], [ %i.048.i, %for.body.i ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.i %10 = load i32, ptr %gep, align 4, !tbaa !5 %cmp4.not.i.1 = icmp sgt i32 %10, %1 br i1 %cmp4.not.i.1, label %for.inc.i.1, label %if.then.i.1 if.then.i.1: ; preds = %for.inc.i %add.i.1 = add nsw i32 %i.1.i, 1 %idxprom7.i.1 = sext i32 %add.i.1 to i64 %arrayidx8.i.1 = getelementptr inbounds i32, ptr %A, i64 %idxprom7.i.1 %11 = load i32, ptr %arrayidx8.i.1, align 4, !tbaa !5 store i32 %11, ptr %gep, align 4, !tbaa !5 store i32 %10, ptr %arrayidx8.i.1, align 4, !tbaa !5 br label %for.inc.i.1 for.inc.i.1: ; preds = %if.then.i.1, %for.inc.i %i.1.i.1 = phi i32 [ %add.i.1, %if.then.i.1 ], [ %i.1.i, %for.inc.i ] %indvars.iv.next.i.1 = add nsw i64 %indvars.iv.i, 2 %exitcond.not.i.1 = icmp eq i64 %indvars.iv.next.i.1, %idxprom.i br i1 %exitcond.not.i.1, label %partition.exit, label %for.body.i, !llvm.loop !9 partition.exit: ; preds = %for.inc.i.1, %for.body.i.prol.loopexit %i.1.i.lcssa = phi i32 [ %i.1.i.lcssa.unr, %for.body.i.prol.loopexit ], [ %i.1.i.1, %for.inc.i.1 ] %.pre.i = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %12 = add nsw i32 %i.1.i.lcssa, 1 %idxprom16.i = sext i32 %12 to i64 %arrayidx17.i = getelementptr inbounds i32, ptr %A, i64 %idxprom16.i %13 = load i32, ptr %arrayidx17.i, align 4, !tbaa !5 store i32 %13, ptr %arrayidx.i, align 4, !tbaa !5 store i32 %.pre.i, ptr %arrayidx17.i, align 4, !tbaa !5 tail call void @quicksort(ptr noundef nonnull %A, i32 noundef %p.tr9, i32 noundef %i.1.i.lcssa) %add = add nsw i32 %i.1.i.lcssa, 2 %cmp = icmp slt i32 %add, %r br i1 %cmp, label %for.body.preheader.i, label %if.end if.end: ; preds = %partition.exit, %entry ret void } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp22 = icmp sgt i32 %0, 0 br i1 %cmp22, label %for.body, label %for.end.thread for.end.thread: ; preds = %entry %sub31 = add nsw i32 %0, -1 call void @quicksort(ptr noundef nonnull @A, i32 noundef 0, i32 noundef %sub31) br label %for.end13 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000010 x i32], ptr @A, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %for.body %sub = add nsw i32 %1, -1 call void @quicksort(ptr noundef nonnull @A, i32 noundef 0, i32 noundef %sub) %cmp324 = icmp sgt i32 %1, 0 br i1 %cmp324, label %for.body4, label %for.end13 for.body4: ; preds = %for.end, %if.end %indvars.iv28 = phi i64 [ %indvars.iv.next29, %if.end ], [ 0, %for.end ] %arrayidx6 = getelementptr inbounds [1000010 x i32], ptr @A, i64 0, i64 %indvars.iv28 %3 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %3) %4 = load i32, ptr %n, align 4, !tbaa !5 %sub8 = add nsw i32 %4, -1 %5 = zext i32 %sub8 to i64 %cmp9 = icmp eq i64 %indvars.iv28, %5 br i1 %cmp9, label %for.end13, label %if.end if.end: ; preds = %for.body4 %putchar = call i32 @putchar(i32 32) %indvars.iv.next29 = add nuw nsw i64 %indvars.iv28, 1 %6 = load i32, ptr %n, align 4, !tbaa !5 %7 = sext i32 %6 to i64 %cmp3 = icmp slt i64 %indvars.iv.next29, %7 br i1 %cmp3, label %for.body4, label %for.end13, !llvm.loop !12 for.end13: ; preds = %if.end, %for.body4, %for.end.thread, %for.end %putchar21 = call i32 @putchar(i32 10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5 attributes #0 = { nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10}
#include <stdio.h> #include <math.h> int a[10000000],n,x,max=0,t; int main(void){ for(x=0;x<1000000;x++)a[x]=0; scanf("%d",&n); for(;n>0;n--){scanf("%d",&x);a[x]++;if(max<x)max=x;} for(n=0,x=0;n<=max;n++){ for(;a[n]>0;a[n]--){ if(x>0)printf(" ");else x=1; printf("%d",n); } } printf("\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275007/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275007/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @max = dso_local local_unnamed_addr global i32 0, align 4 @x = dso_local global i32 0, align 4 @a = dso_local local_unnamed_addr global [10000000 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @n = dso_local global i32 0, align 4 @t = dso_local local_unnamed_addr global i32 0, align 4 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(4000000) @a, i8 0, i64 4000000, i1 false), !tbaa !5 store i32 1000000, ptr @x, align 4, !tbaa !5 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %.pr = load i32, ptr @n, align 4, !tbaa !5 %cmp236 = icmp sgt i32 %.pr, 0 br i1 %cmp236, label %for.body3, label %entry.for.end10_crit_edge entry.for.end10_crit_edge: ; preds = %entry %.pre = load i32, ptr @max, align 4, !tbaa !5 br label %for.end10 for.body3: ; preds = %entry, %for.inc9 %call4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @x) %0 = load i32, ptr @x, align 4, !tbaa !5 %idxprom5 = sext i32 %0 to i64 %arrayidx6 = getelementptr inbounds [10000000 x i32], ptr @a, i64 0, i64 %idxprom5 %1 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %inc7 = add nsw i32 %1, 1 store i32 %inc7, ptr %arrayidx6, align 4, !tbaa !5 %2 = load i32, ptr @max, align 4, !tbaa !5 %cmp8 = icmp slt i32 %2, %0 br i1 %cmp8, label %if.then, label %for.inc9 if.then: ; preds = %for.body3 store i32 %0, ptr @max, align 4, !tbaa !5 br label %for.inc9 for.inc9: ; preds = %for.body3, %if.then %3 = phi i32 [ %2, %for.body3 ], [ %0, %if.then ] %4 = load i32, ptr @n, align 4, !tbaa !5 %dec = add nsw i32 %4, -1 store i32 %dec, ptr @n, align 4, !tbaa !5 %cmp2 = icmp sgt i32 %4, 1 br i1 %cmp2, label %for.body3, label %for.end10, !llvm.loop !9 for.end10: ; preds = %for.inc9, %entry.for.end10_crit_edge %5 = phi i32 [ %.pre, %entry.for.end10_crit_edge ], [ %3, %for.inc9 ] store i32 0, ptr @n, align 4, !tbaa !5 store i32 0, ptr @x, align 4, !tbaa !5 %cmp12.not40 = icmp slt i32 %5, 0 br i1 %cmp12.not40, label %for.end31, label %for.cond14.preheader for.cond14.preheader: ; preds = %for.end10, %for.inc29 %6 = phi i32 [ %14, %for.inc29 ], [ %5, %for.end10 ] %7 = phi i32 [ %inc30, %for.inc29 ], [ 0, %for.end10 ] %idxprom1537 = sext i32 %7 to i64 %arrayidx1638 = getelementptr inbounds [10000000 x i32], ptr @a, i64 0, i64 %idxprom1537 %8 = load i32, ptr %arrayidx1638, align 4, !tbaa !5 %cmp1739 = icmp sgt i32 %8, 0 br i1 %cmp1739, label %for.body18, label %for.inc29 for.body18: ; preds = %for.cond14.preheader, %if.end22 %9 = phi i32 [ %12, %if.end22 ], [ %7, %for.cond14.preheader ] %10 = load i32, ptr @x, align 4, !tbaa !5 %cmp19 = icmp sgt i32 %10, 0 br i1 %cmp19, label %if.then20, label %if.else if.then20: ; preds = %for.body18 %putchar34 = tail call i32 @putchar(i32 32) %.pre43 = load i32, ptr @n, align 4, !tbaa !5 br label %if.end22 if.else: ; preds = %for.body18 store i32 1, ptr @x, align 4, !tbaa !5 br label %if.end22 if.end22: ; preds = %if.else, %if.then20 %11 = phi i32 [ %9, %if.else ], [ %.pre43, %if.then20 ] %call23 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %11) %12 = load i32, ptr @n, align 4, !tbaa !5 %idxprom25 = sext i32 %12 to i64 %arrayidx26 = getelementptr inbounds [10000000 x i32], ptr @a, i64 0, i64 %idxprom25 %13 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %dec27 = add nsw i32 %13, -1 store i32 %dec27, ptr %arrayidx26, align 4, !tbaa !5 %cmp17 = icmp sgt i32 %13, 1 br i1 %cmp17, label %for.body18, label %for.inc29.loopexit, !llvm.loop !11 for.inc29.loopexit: ; preds = %if.end22 %.pre44 = load i32, ptr @max, align 4, !tbaa !5 br label %for.inc29 for.inc29: ; preds = %for.inc29.loopexit, %for.cond14.preheader %14 = phi i32 [ %6, %for.cond14.preheader ], [ %.pre44, %for.inc29.loopexit ] %.lcssa = phi i32 [ %7, %for.cond14.preheader ], [ %12, %for.inc29.loopexit ] %inc30 = add nsw i32 %.lcssa, 1 store i32 %inc30, ptr @n, align 4, !tbaa !5 %cmp12.not.not = icmp slt i32 %.lcssa, %14 br i1 %cmp12.not.not, label %for.cond14.preheader, label %for.end31, !llvm.loop !12 for.end31: ; preds = %for.inc29, %for.end10 %putchar = tail call i32 @putchar(i32 10) ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-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 } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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> #define SWAP( a, b ) do { int tmp; tmp = a; a = b; b = tmp; } while( 0 ) void quickSort( int *, int, int ); int median( int, int, int ); void insertionSort( int *, int ); int n, data[ 1000000 ]; int main( void ) { int i; scanf( "%d", &n ); for ( i = n; i--; scanf( "%d", data + i ) ) ; quickSort( data, 0, n - 1 ); for ( i = n; i--; printf( "%d%c", data[ i ], i ? ' ' : '\n' ) ) ; return 0; } void quickSort( int *data, int l, int r ) { if ( l < r ) { int i = l, j = r, pivot = median( data[ i ], data[ ( i + j ) / 2 ], data[ j ] ); while ( 1 ) { for ( ; data[ i ] > pivot; i++ ) ; for ( ; pivot > data [ j ]; j-- ) ; if ( i >= j ) break; SWAP( data[ i ], data[ j ] ); i++; j--; } if ( i - l < 20 ) insertionSort( data + l, i - l ); else quickSort( data, l, i - 1 ); if ( r - j < 20 ) insertionSort( data + j + 1, r - j ); else quickSort( data, j + 1, r ); } } int median( int x, int y, int z ) { if ( x < y ) if ( y < z ) return y; else if ( z < x ) return x; else return z; else if ( z < y ) return y; else if ( x < z ) return x; else return z; } void insertionSort( int *data, int n ) { int i, j, tmp; for ( i = 1; i < n; i++ ) { tmp = data[ i ]; for ( j = i; j && data[ j - 1 ] < tmp; j-- ) data[ j ] = data[ j - 1 ]; data[ j ] = tmp; } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275050/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275050/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @n = dso_local global i32 0, align 4 @data = dso_local global [1000000 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [5 x i8] c"%d%c\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %tobool.not14 = icmp eq i32 %0, 0 br i1 %tobool.not14, label %for.end.thread, label %for.inc.preheader for.end.thread: ; preds = %entry tail call void @quickSort(ptr noundef nonnull @data, i32 noundef 0, i32 noundef -1) br label %for.end9 for.inc.preheader: ; preds = %entry %1 = sext i32 %0 to i64 br label %for.inc for.inc: ; preds = %for.inc.preheader, %for.inc %indvars.iv = phi i64 [ %1, %for.inc.preheader ], [ %indvars.iv.next, %for.inc ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %add.ptr = getelementptr inbounds i32, ptr @data, i64 %indvars.iv.next %call1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %add.ptr) %2 = and i64 %indvars.iv.next, 4294967295 %tobool.not = icmp eq i64 %2, 0 br i1 %tobool.not, label %for.end, label %for.inc, !llvm.loop !9 for.end: ; preds = %for.inc %.pre = load i32, ptr @n, align 4, !tbaa !5 %sub = add nsw i32 %.pre, -1 tail call void @quickSort(ptr noundef nonnull @data, i32 noundef 0, i32 noundef %sub) %tobool4.not16 = icmp eq i32 %.pre, 0 br i1 %tobool4.not16, label %for.end9, label %for.inc6.preheader for.inc6.preheader: ; preds = %for.end %3 = sext i32 %.pre to i64 br label %for.inc6 for.inc6: ; preds = %for.inc6.preheader, %for.inc6 %indvars.iv19 = phi i64 [ %3, %for.inc6.preheader ], [ %indvars.iv.next20, %for.inc6 ] %indvars.iv.next20 = add nsw i64 %indvars.iv19, -1 %arrayidx = getelementptr inbounds [1000000 x i32], ptr @data, i64 0, i64 %indvars.iv.next20 %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %5 = and i64 %indvars.iv.next20, 4294967295 %tobool7.not = icmp eq i64 %5, 0 %cond = select i1 %tobool7.not, i32 10, i32 32 %call8 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %4, i32 noundef %cond) br i1 %tobool7.not, label %for.end9, label %for.inc6, !llvm.loop !11 for.end9: ; preds = %for.inc6, %for.end.thread, %for.end ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: nofree nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quickSort(ptr nocapture noundef %data, i32 noundef %l, i32 noundef %r) local_unnamed_addr #2 { entry: %cmp109 = icmp slt i32 %l, %r br i1 %cmp109, label %if.then.lr.ph, label %if.end42 if.then.lr.ph: ; preds = %entry %idxprom3 = sext i32 %r to i64 %arrayidx4 = getelementptr inbounds i32, ptr %data, i64 %idxprom3 br label %if.then tailrecurse: ; preds = %if.end31 %add40 = add nsw i32 %8, 1 %cmp = icmp slt i32 %add40, %r br i1 %cmp, label %if.then, label %if.end42 if.then: ; preds = %if.then.lr.ph, %tailrecurse %l.tr110 = phi i32 [ %l, %if.then.lr.ph ], [ %add40, %tailrecurse ] %idxprom = sext i32 %l.tr110 to i64 %arrayidx = getelementptr inbounds i32, ptr %data, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 %add = add nsw i32 %l.tr110, %r %div = sdiv i32 %add, 2 %idxprom1 = sext i32 %div to i64 %arrayidx2 = getelementptr inbounds i32, ptr %data, i64 %idxprom1 %1 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %2 = load i32, ptr %arrayidx4, align 4, !tbaa !5 %cmp.i = icmp slt i32 %0, %1 br i1 %cmp.i, label %if.then.i, label %if.else6.i if.then.i: ; preds = %if.then %cmp1.i = icmp slt i32 %1, %2 br i1 %cmp1.i, label %median.exit, label %if.else.i if.else.i: ; preds = %if.then.i %x.z.i = tail call i32 @llvm.smax.i32(i32 %2, i32 %0) br label %median.exit if.else6.i: ; preds = %if.then %cmp7.i = icmp slt i32 %2, %1 br i1 %cmp7.i, label %median.exit, label %if.else9.i if.else9.i: ; preds = %if.else6.i %x.z26.i = tail call i32 @llvm.smin.i32(i32 %0, i32 %2) br label %median.exit median.exit: ; preds = %if.then.i, %if.else.i, %if.else6.i, %if.else9.i %retval.0.i = phi i32 [ %1, %if.then.i ], [ %x.z.i, %if.else.i ], [ %1, %if.else6.i ], [ %x.z26.i, %if.else9.i ] br label %while.cond while.cond: ; preds = %do.body, %median.exit %j.0 = phi i32 [ %r, %median.exit ], [ %dec26, %do.body ] %i.0 = phi i32 [ %l.tr110, %median.exit ], [ %inc25, %do.body ] %3 = sext i32 %i.0 to i64 br label %for.cond for.cond: ; preds = %for.cond, %while.cond %indvars.iv = phi i64 [ %indvars.iv.next, %for.cond ], [ %3, %while.cond ] %arrayidx6 = getelementptr inbounds i32, ptr %data, i64 %indvars.iv %4 = load i32, ptr %arrayidx6, align 4, !tbaa !5 %cmp7 = icmp sgt i32 %4, %retval.0.i %indvars.iv.next = add i64 %indvars.iv, 1 br i1 %cmp7, label %for.cond, label %for.cond8.preheader, !llvm.loop !12 for.cond8.preheader: ; preds = %for.cond %arrayidx6.le = getelementptr inbounds i32, ptr %data, i64 %indvars.iv %5 = trunc i64 %indvars.iv to i32 %6 = sext i32 %j.0 to i64 br label %for.cond8 for.cond8: ; preds = %for.cond8, %for.cond8.preheader %indvars.iv116 = phi i64 [ %indvars.iv.next117, %for.cond8 ], [ %6, %for.cond8.preheader ] %arrayidx10 = getelementptr inbounds i32, ptr %data, i64 %indvars.iv116 %7 = load i32, ptr %arrayidx10, align 4, !tbaa !5 %cmp11 = icmp sgt i32 %retval.0.i, %7 %indvars.iv.next117 = add i64 %indvars.iv116, -1 br i1 %cmp11, label %for.cond8, label %for.end14, !llvm.loop !13 for.end14: ; preds = %for.cond8 %arrayidx10.le = getelementptr inbounds i32, ptr %data, i64 %indvars.iv116 %8 = trunc i64 %indvars.iv116 to i32 %cmp15.not = icmp slt i32 %5, %8 br i1 %cmp15.not, label %do.body, label %while.end do.body: ; preds = %for.end14 store i32 %7, ptr %arrayidx6.le, align 4, !tbaa !5 store i32 %4, ptr %arrayidx10.le, align 4, !tbaa !5 %inc25 = add nsw i32 %5, 1 %dec26 = add nsw i32 %8, -1 br label %while.cond while.end: ; preds = %for.end14 %sub = sub nsw i32 %5, %l.tr110 %cmp27 = icmp slt i32 %sub, 20 br i1 %cmp27, label %if.then28, label %if.else if.then28: ; preds = %while.end %cmp29.i = icmp sgt i32 %sub, 1 br i1 %cmp29.i, label %for.body.preheader.i, label %if.end31 for.body.preheader.i: ; preds = %if.then28 %wide.trip.count.i = zext i32 %sub to i64 br label %for.body.i for.body.i: ; preds = %for.end.i, %for.body.preheader.i %indvars.iv.i = phi i64 [ 1, %for.body.preheader.i ], [ %indvars.iv.next.i, %for.end.i ] %arrayidx.i = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv.i %9 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 br label %land.rhs.i land.rhs.i: ; preds = %for.body5.i, %for.body.i %indvars.iv31.i = phi i64 [ %indvars.iv.i, %for.body.i ], [ %indvars.iv.next32.i, %for.body5.i ] %indvars.iv.next32.i = add nsw i64 %indvars.iv31.i, -1 %arrayidx3.i = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv.next32.i %10 = load i32, ptr %arrayidx3.i, align 4, !tbaa !5 %cmp4.i = icmp slt i32 %10, %9 br i1 %cmp4.i, label %for.body5.i, label %for.end.i for.body5.i: ; preds = %land.rhs.i %arrayidx10.i = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv31.i store i32 %10, ptr %arrayidx10.i, align 4, !tbaa !5 %11 = icmp eq i64 %indvars.iv.next32.i, 0 br i1 %11, label %for.end.i, label %land.rhs.i, !llvm.loop !14 for.end.i: ; preds = %for.body5.i, %land.rhs.i %j.0.lcssa.i = phi i64 [ 0, %for.body5.i ], [ %indvars.iv31.i, %land.rhs.i ] %sext.i = shl i64 %j.0.lcssa.i, 32 %idxprom11.i = ashr exact i64 %sext.i, 32 %arrayidx12.i = getelementptr inbounds i32, ptr %arrayidx, i64 %idxprom11.i store i32 %9, ptr %arrayidx12.i, align 4, !tbaa !5 %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 %if.end31, label %for.body.i, !llvm.loop !15 if.else: ; preds = %while.end %sub30 = add nsw i32 %5, -1 tail call void @quickSort(ptr noundef nonnull %data, i32 noundef %l.tr110, i32 noundef %sub30) br label %if.end31 if.end31: ; preds = %for.end.i, %if.then28, %if.else %sub32 = sub nsw i32 %r, %8 %cmp33 = icmp slt i32 %sub32, 20 br i1 %cmp33, label %if.then34, label %tailrecurse if.then34: ; preds = %if.end31 %add.ptr37 = getelementptr inbounds i32, ptr %arrayidx10.le, i64 1 %cmp29.i86 = icmp sgt i32 %sub32, 1 br i1 %cmp29.i86, label %for.body.preheader.i87, label %if.end42 for.body.preheader.i87: ; preds = %if.then34 %wide.trip.count.i88 = zext i32 %sub32 to i64 br label %for.body.i89 for.body.i89: ; preds = %for.end.i97, %for.body.preheader.i87 %indvars.iv.i90 = phi i64 [ 1, %for.body.preheader.i87 ], [ %indvars.iv.next.i102, %for.end.i97 ] %arrayidx.i91 = getelementptr inbounds i32, ptr %add.ptr37, i64 %indvars.iv.i90 %12 = load i32, ptr %arrayidx.i91, align 4, !tbaa !5 br label %land.rhs.i92 land.rhs.i92: ; preds = %for.body5.i104, %for.body.i89 %indvars.iv31.i93 = phi i64 [ %indvars.iv.i90, %for.body.i89 ], [ %indvars.iv.next32.i94, %for.body5.i104 ] %arrayidx3.i95 = getelementptr inbounds i32, ptr %arrayidx10.le, i64 %indvars.iv31.i93 %13 = load i32, ptr %arrayidx3.i95, align 4, !tbaa !5 %cmp4.i96 = icmp slt i32 %13, %12 br i1 %cmp4.i96, label %for.body5.i104, label %for.end.i97 for.body5.i104: ; preds = %land.rhs.i92 %indvars.iv.next32.i94 = add nsw i64 %indvars.iv31.i93, -1 %arrayidx10.i105 = getelementptr inbounds i32, ptr %add.ptr37, i64 %indvars.iv31.i93 store i32 %13, ptr %arrayidx10.i105, align 4, !tbaa !5 %14 = icmp eq i64 %indvars.iv.next32.i94, 0 br i1 %14, label %for.end.i97, label %land.rhs.i92, !llvm.loop !14 for.end.i97: ; preds = %for.body5.i104, %land.rhs.i92 %j.0.lcssa.i98 = phi i64 [ 0, %for.body5.i104 ], [ %indvars.iv31.i93, %land.rhs.i92 ] %sext.i99 = shl i64 %j.0.lcssa.i98, 32 %idxprom11.i100 = ashr exact i64 %sext.i99, 32 %arrayidx12.i101 = getelementptr inbounds i32, ptr %add.ptr37, i64 %idxprom11.i100 store i32 %12, ptr %arrayidx12.i101, align 4, !tbaa !5 %indvars.iv.next.i102 = add nuw nsw i64 %indvars.iv.i90, 1 %exitcond.not.i103 = icmp eq i64 %indvars.iv.next.i102, %wide.trip.count.i88 br i1 %exitcond.not.i103, label %if.end42, label %for.body.i89, !llvm.loop !15 if.end42: ; preds = %tailrecurse, %for.end.i97, %entry, %if.then34 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #1 ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @median(i32 noundef %x, i32 noundef %y, i32 noundef %z) local_unnamed_addr #3 { entry: %cmp = icmp slt i32 %x, %y br i1 %cmp, label %if.then, label %if.else6 if.then: ; preds = %entry %cmp1 = icmp slt i32 %y, %z br i1 %cmp1, label %return, label %if.else if.else: ; preds = %if.then %x.z = tail call i32 @llvm.smax.i32(i32 %z, i32 %x) br label %return if.else6: ; preds = %entry %cmp7 = icmp slt i32 %z, %y br i1 %cmp7, label %return, label %if.else9 if.else9: ; preds = %if.else6 %x.z26 = tail call i32 @llvm.smin.i32(i32 %x, i32 %z) br label %return return: ; preds = %if.else9, %if.else6, %if.else, %if.then %retval.0 = phi i32 [ %y, %if.then ], [ %x.z, %if.else ], [ %y, %if.else6 ], [ %x.z26, %if.else9 ] ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @insertionSort(ptr nocapture noundef %data, i32 noundef %n) local_unnamed_addr #4 { entry: %cmp29 = icmp sgt i32 %n, 1 br i1 %cmp29, label %for.body.preheader, label %for.end14 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.preheader, %for.end %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %for.end ] %arrayidx = getelementptr inbounds i32, ptr %data, i64 %indvars.iv %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 br label %land.rhs land.rhs: ; preds = %for.body, %for.body5 %indvars.iv31 = phi i64 [ %indvars.iv, %for.body ], [ %indvars.iv.next32, %for.body5 ] %indvars.iv.next32 = add nsw i64 %indvars.iv31, -1 %arrayidx3 = getelementptr inbounds i32, ptr %data, i64 %indvars.iv.next32 %1 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %cmp4 = icmp slt i32 %1, %0 br i1 %cmp4, label %for.body5, label %for.end for.body5: ; preds = %land.rhs %arrayidx10 = getelementptr inbounds i32, ptr %data, i64 %indvars.iv31 store i32 %1, ptr %arrayidx10, align 4, !tbaa !5 %2 = icmp eq i64 %indvars.iv.next32, 0 br i1 %2, label %for.end, label %land.rhs, !llvm.loop !14 for.end: ; preds = %for.body5, %land.rhs %j.0.lcssa = phi i64 [ 0, %for.body5 ], [ %indvars.iv31, %land.rhs ] %sext = shl i64 %j.0.lcssa, 32 %idxprom11 = ashr exact i64 %sext, 32 %arrayidx12 = getelementptr inbounds i32, ptr %data, i64 %idxprom11 store i32 %0, ptr %arrayidx12, 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.end14, label %for.body, !llvm.loop !15 for.end14: ; preds = %for.end, %entry ret void } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind "no-trapping-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 nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10}
#include <stdio.h> #include <string.h> #include <stdlib.h> typedef long long ll; typedef char keytype; int gcd(int a, int b){ return (a % b) ? gcd(b, a % b) : b;} int lcm(int a, int b){ return (a / gcd(a, b)) * b;} /* a[0], ..., a[n-1] の数の最大公約数 */ int ngcd(int n, int a[]) { int i, d; d = a[0]; for (i = 1; i < n && d != 1; i++) d = gcd(a[i], d); return d; } void quicksort(keytype a[], int first, int last) { int i, j; keytype x, t; x = a[(first + last) / 2]; i = first; j = last; for ( ; ; ) { while (a[i] < x) i++; while (x < a[j]) j--; if (i >= j) break; t = a[i]; a[i] = a[j]; a[j] = t; i++; j--; } if (first < i - 1) quicksort(a, first , i - 1); if (j + 1 < last) quicksort(a, j + 1, last); } int is_prime(int x){ if(x <= 1) return 0; for(int i = 2; i * i <= x; i++){ if(x % i == 0) return 0; } return 1; } int is_substr(char s[], char t[], int i){ int flag = 1; if(s[i] == '\0') flag = 0; for(int j = 0; j < strlen(t); ++j, ++i){ if(s[i] != t[j]){ flag = 0; break; } } return flag; } // factor list, number of factors, natural number void factorize(int ftr[], int *num, int n){ int a = 2, cnt = 0; while(n >= a){ if(n % a == 0){ n = n / a; ftr[cnt++] = a; }else{ a++; } } *num = cnt; } //#define N 5 //int p[N + 1]; int nextperm(int p[], int N) /* 辞書式順序で次の順列 */ { int i, j, t; i = N - 1; p[0] = 0; /* 番人 */ while (p[i] >= p[i + 1]) i--; if (i == 0) return 0; /* 完了 */ j = N; while (p[i] >= p[j]) j--; t = p[i]; p[i] = p[j]; p[j] = t; i++; j = N; while (i < j) { t = p[i]; p[i] = p[j]; p[j] = t; i++; j--; } return 1; /* 未了 */ } void comb(int size1, int size2, int v[size1][size2]){ for(int i = 0; i < size1; i++){ v[i][0] = 1; v[i][i] = 1; } for(int k = 1; k < size1; k++){ for(int j = 1; j < k; j++){ v[k][j] = (v[k-1][j-1] + v[k-1][j]); } } } int abs_val(int a, int b){ if(a > b) return a - b; else return b - a; } const int inf = 1012345678; int main(){ int a, b; scanf("%d %d", &a, &b); int cnt = 0; for(int i = a; i <= b; ++i){ if((i / 1000) == ((i % 10) * 10) + (i % 100) / 10){ cnt++; } } printf("%d\n", cnt); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275108/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275108/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @inf = dso_local local_unnamed_addr constant i32 1012345678, align 4 @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @gcd(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: br label %tailrecurse tailrecurse: ; preds = %tailrecurse, %entry %a.tr = phi i32 [ %a, %entry ], [ %b.tr, %tailrecurse ] %b.tr = phi i32 [ %b, %entry ], [ %rem, %tailrecurse ] %rem = srem i32 %a.tr, %b.tr %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %cond.end, label %tailrecurse cond.end: ; preds = %tailrecurse ret i32 %b.tr } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @lcm(i32 noundef %a, i32 noundef %b) local_unnamed_addr #0 { entry: br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %entry %a.tr.i = phi i32 [ %a, %entry ], [ %b.tr.i, %tailrecurse.i ] %b.tr.i = phi i32 [ %b, %entry ], [ %rem.i, %tailrecurse.i ] %rem.i = srem i32 %a.tr.i, %b.tr.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %div = sdiv i32 %a, %b.tr.i %mul = mul nsw i32 %div, %b ret i32 %mul } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: read) uwtable define dso_local i32 @ngcd(i32 noundef %n, ptr nocapture noundef readonly %a) local_unnamed_addr #1 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp8 = icmp sgt i32 %n, 1 %cmp19 = icmp ne i32 %0, 1 %1 = select i1 %cmp8, i1 %cmp19, i1 false br i1 %1, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %2 = zext i32 %n to i64 br label %for.body for.body: ; preds = %for.body.preheader, %gcd.exit %indvars.iv = phi i64 [ 1, %for.body.preheader ], [ %indvars.iv.next, %gcd.exit ] %d.011 = phi i32 [ %0, %for.body.preheader ], [ %b.tr.i, %gcd.exit ] %arrayidx2 = getelementptr inbounds i32, ptr %a, i64 %indvars.iv %3 = load i32, ptr %arrayidx2, align 4, !tbaa !5 br label %tailrecurse.i tailrecurse.i: ; preds = %tailrecurse.i, %for.body %a.tr.i = phi i32 [ %3, %for.body ], [ %b.tr.i, %tailrecurse.i ] %b.tr.i = phi i32 [ %d.011, %for.body ], [ %rem.i, %tailrecurse.i ] %rem.i = srem i32 %a.tr.i, %b.tr.i %tobool.not.i = icmp eq i32 %rem.i, 0 br i1 %tobool.not.i, label %gcd.exit, label %tailrecurse.i gcd.exit: ; preds = %tailrecurse.i %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %cmp = icmp ult i64 %indvars.iv.next, %2 %cmp1 = icmp ne i32 %b.tr.i, 1 %4 = and i1 %cmp, %cmp1 br i1 %4, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %gcd.exit, %entry %d.0.lcssa = phi i32 [ %0, %entry ], [ %b.tr.i, %gcd.exit ] ret i32 %d.0.lcssa } ; 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 nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @quicksort(ptr nocapture noundef %a, i32 noundef %first, i32 noundef %last) local_unnamed_addr #3 { entry: br label %tailrecurse tailrecurse: ; preds = %if.end30, %entry %first.tr = phi i32 [ %first, %entry ], [ %add31, %if.end30 ] %add = add nsw i32 %first.tr, %last %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds i8, ptr %a, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !11 br label %for.cond for.cond: ; preds = %if.end, %tailrecurse %j.0 = phi i32 [ %last, %tailrecurse ], [ %dec25, %if.end ] %i.0 = phi i32 [ %first.tr, %tailrecurse ], [ %inc24, %if.end ] %1 = sext i32 %i.0 to i64 br label %while.cond while.cond: ; preds = %while.cond, %for.cond %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ %1, %for.cond ] %arrayidx2 = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %2 = load i8, ptr %arrayidx2, align 1, !tbaa !11 %cmp = icmp slt i8 %2, %0 %indvars.iv.next = add i64 %indvars.iv, 1 br i1 %cmp, label %while.cond, label %while.cond5.preheader, !llvm.loop !12 while.cond5.preheader: ; preds = %while.cond %arrayidx2.le = getelementptr inbounds i8, ptr %a, i64 %indvars.iv %3 = trunc i64 %indvars.iv to i32 %4 = sext i32 %j.0 to i64 br label %while.cond5 while.cond5: ; preds = %while.cond5, %while.cond5.preheader %indvars.iv69 = phi i64 [ %indvars.iv.next70, %while.cond5 ], [ %4, %while.cond5.preheader ] %arrayidx8 = getelementptr inbounds i8, ptr %a, i64 %indvars.iv69 %5 = load i8, ptr %arrayidx8, align 1, !tbaa !11 %cmp10 = icmp slt i8 %0, %5 %indvars.iv.next70 = add i64 %indvars.iv69, -1 br i1 %cmp10, label %while.cond5, label %while.end13, !llvm.loop !13 while.end13: ; preds = %while.cond5 %6 = trunc i64 %indvars.iv69 to i32 %cmp14.not = icmp slt i32 %3, %6 br i1 %cmp14.not, label %if.end, label %for.end if.end: ; preds = %while.end13 %arrayidx8.le = getelementptr inbounds i8, ptr %a, i64 %indvars.iv69 store i8 %5, ptr %arrayidx2.le, align 1, !tbaa !11 store i8 %2, ptr %arrayidx8.le, align 1, !tbaa !11 %inc24 = add nsw i32 %3, 1 %dec25 = add nsw i32 %6, -1 br label %for.cond for.end: ; preds = %while.end13 %sub = add nsw i32 %3, -1 %cmp26 = icmp sgt i32 %sub, %first.tr br i1 %cmp26, label %if.then28, label %if.end30 if.then28: ; preds = %for.end tail call void @quicksort(ptr noundef nonnull %a, i32 noundef %first.tr, i32 noundef %sub) br label %if.end30 if.end30: ; preds = %if.then28, %for.end %add31 = add nsw i32 %6, 1 %cmp32 = icmp slt i32 %add31, %last br i1 %cmp32, label %tailrecurse, label %if.end36 if.end36: ; preds = %if.end30 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @is_prime(i32 noundef %x) local_unnamed_addr #0 { entry: %cmp = icmp slt i32 %x, 2 br i1 %cmp, label %return, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp1.not10 = icmp ult i32 %x, 4 br i1 %cmp1.not10, label %return, label %for.body for.cond: ; preds = %for.body %inc = add nuw nsw i32 %i.011, 1 %mul = mul nsw i32 %inc, %inc %cmp1.not = icmp sgt i32 %mul, %x br i1 %cmp1.not, label %cleanup.loopexit, label %for.body, !llvm.loop !14 for.body: ; preds = %for.cond.preheader, %for.cond %i.011 = phi i32 [ %inc, %for.cond ], [ 2, %for.cond.preheader ] %rem = srem i32 %x, %i.011 %cmp2 = icmp ne i32 %rem, 0 br i1 %cmp2, label %for.cond, label %cleanup.loopexit cleanup.loopexit: ; preds = %for.body, %for.cond %0 = zext i1 %cmp2 to i32 br label %return return: ; preds = %for.cond.preheader, %cleanup.loopexit, %entry %retval.1 = phi i32 [ 0, %entry ], [ 1, %for.cond.preheader ], [ %0, %cleanup.loopexit ] ret i32 %retval.1 } ; Function Attrs: nofree nounwind memory(argmem: read) uwtable define dso_local i32 @is_substr(ptr nocapture noundef readonly %s, ptr nocapture noundef readonly %t, i32 noundef %i) local_unnamed_addr #4 { entry: %idxprom = sext i32 %i to i64 %arrayidx = getelementptr inbounds i8, ptr %s, i64 %idxprom %0 = load i8, ptr %arrayidx, align 1, !tbaa !11 %cmp = icmp ne i8 %0, 0 %call = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %t) #12 %cmp323.not = icmp eq i64 %call, 0 br i1 %cmp323.not, label %cleanup, label %for.body for.body: ; preds = %entry, %for.inc %indvars.iv28 = phi i64 [ %indvars.iv.next29, %for.inc ], [ %idxprom, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 0, %entry ] %arrayidx6 = getelementptr inbounds i8, ptr %s, i64 %indvars.iv28 %1 = load i8, ptr %arrayidx6, align 1, !tbaa !11 %arrayidx9 = getelementptr inbounds i8, ptr %t, i64 %indvars.iv %2 = load i8, ptr %arrayidx9, align 1, !tbaa !11 %cmp11.not = icmp eq i8 %1, %2 br i1 %cmp11.not, label %for.inc, label %cleanup for.inc: ; preds = %for.body %indvars.iv.next = add nuw i64 %indvars.iv, 1 %indvars.iv.next29 = add i64 %indvars.iv28, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %call br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !15 cleanup: ; preds = %for.inc, %for.body, %entry %flag.0.shrunk = phi i1 [ %cmp, %entry ], [ false, %for.body ], [ %cmp, %for.inc ] %flag.0 = zext i1 %flag.0.shrunk to i32 ret i32 %flag.0 } ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: write) uwtable define dso_local void @factorize(ptr nocapture noundef writeonly %ftr, ptr nocapture noundef writeonly %num, i32 noundef %n) local_unnamed_addr #6 { entry: %cmp.not10 = icmp slt i32 %n, 2 br i1 %cmp.not10, label %while.end, label %while.body while.body: ; preds = %entry, %if.end %cnt.013 = phi i32 [ %cnt.1, %if.end ], [ 0, %entry ] %a.012 = phi i32 [ %a.1, %if.end ], [ 2, %entry ] %n.addr.011 = phi i32 [ %n.addr.1, %if.end ], [ %n, %entry ] %rem = srem i32 %n.addr.011, %a.012 %div = sdiv i32 %n.addr.011, %a.012 %cmp1 = icmp eq i32 %rem, 0 br i1 %cmp1, label %if.then, label %if.else if.then: ; preds = %while.body %inc = add nsw i32 %cnt.013, 1 %idxprom = sext i32 %cnt.013 to i64 %arrayidx = getelementptr inbounds i32, ptr %ftr, i64 %idxprom store i32 %a.012, ptr %arrayidx, align 4, !tbaa !5 br label %if.end if.else: ; preds = %while.body %inc2 = add nsw i32 %a.012, 1 br label %if.end if.end: ; preds = %if.else, %if.then %n.addr.1 = phi i32 [ %div, %if.then ], [ %n.addr.011, %if.else ] %a.1 = phi i32 [ %a.012, %if.then ], [ %inc2, %if.else ] %cnt.1 = phi i32 [ %inc, %if.then ], [ %cnt.013, %if.else ] %cmp.not = icmp slt i32 %n.addr.1, %a.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !16 while.end: ; preds = %if.end, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %cnt.1, %if.end ] store i32 %cnt.0.lcssa, ptr %num, align 4, !tbaa !5 ret void } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local i32 @nextperm(ptr nocapture noundef %p, i32 noundef %N) local_unnamed_addr #7 { entry: store i32 0, ptr %p, align 4, !tbaa !5 %0 = sext i32 %N to i64 %arrayidx3.phi.trans.insert = getelementptr inbounds i32, ptr %p, i64 %0 %.pre = load i32, ptr %arrayidx3.phi.trans.insert, align 4, !tbaa !5 br label %while.cond while.cond: ; preds = %while.cond, %entry %1 = phi i32 [ %2, %while.cond ], [ %.pre, %entry ] %indvars.iv = phi i64 [ %indvars.iv.next, %while.cond ], [ %0, %entry ] %indvars.iv.next = add nsw i64 %indvars.iv, -1 %arrayidx1 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv.next %2 = load i32, ptr %arrayidx1, align 4, !tbaa !5 %cmp.not = icmp slt i32 %2, %1 br i1 %cmp.not, label %while.end, label %while.cond, !llvm.loop !17 while.end: ; preds = %while.cond %arrayidx1.le = getelementptr inbounds i32, ptr %p, i64 %indvars.iv.next %3 = trunc i64 %indvars.iv to i32 %4 = and i64 %indvars.iv.next, 4294967295 %cmp4 = icmp eq i64 %4, 0 br i1 %cmp4, label %cleanup, label %while.cond5 while.cond5: ; preds = %while.end, %while.cond5 %indvars.iv78 = phi i64 [ %indvars.iv.next79, %while.cond5 ], [ %0, %while.end ] %arrayidx9 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv78 %5 = load i32, ptr %arrayidx9, align 4, !tbaa !5 %cmp10.not = icmp slt i32 %2, %5 %indvars.iv.next79 = add i64 %indvars.iv78, -1 br i1 %cmp10.not, label %while.end13, label %while.cond5, !llvm.loop !18 while.end13: ; preds = %while.cond5 %arrayidx9.le = getelementptr inbounds i32, ptr %p, i64 %indvars.iv78 store i32 %5, ptr %arrayidx1.le, align 4, !tbaa !5 store i32 %2, ptr %arrayidx9.le, align 4, !tbaa !5 %cmp2373 = icmp slt i32 %3, %N br i1 %cmp2373, label %while.body24, label %cleanup while.body24: ; preds = %while.end13, %while.body24 %indvars.iv83 = phi i64 [ %indvars.iv.next84, %while.body24 ], [ %indvars.iv, %while.end13 ] %indvars.iv81 = phi i64 [ %indvars.iv.next82, %while.body24 ], [ %0, %while.end13 ] %arrayidx26 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv83 %6 = load i32, ptr %arrayidx26, align 4, !tbaa !5 %arrayidx28 = getelementptr inbounds i32, ptr %p, i64 %indvars.iv81 %7 = load i32, ptr %arrayidx28, align 4, !tbaa !5 store i32 %7, ptr %arrayidx26, align 4, !tbaa !5 store i32 %6, ptr %arrayidx28, align 4, !tbaa !5 %indvars.iv.next84 = add nsw i64 %indvars.iv83, 1 %indvars.iv.next82 = add nsw i64 %indvars.iv81, -1 %cmp23 = icmp slt i64 %indvars.iv.next84, %indvars.iv.next82 br i1 %cmp23, label %while.body24, label %cleanup, !llvm.loop !19 cleanup: ; preds = %while.body24, %while.end13, %while.end %retval.0 = phi i32 [ 0, %while.end ], [ 1, %while.end13 ], [ 1, %while.body24 ] ret i32 %retval.0 } ; Function Attrs: nofree norecurse nosync nounwind memory(argmem: readwrite) uwtable define dso_local void @comb(i32 noundef %size1, i32 noundef %size2, ptr nocapture noundef %v) local_unnamed_addr #7 { entry: %v73 = ptrtoint ptr %v to i64 %0 = zext i32 %size2 to i64 %cmp53 = icmp sgt i32 %size1, 0 br i1 %cmp53, label %for.body.preheader, label %for.cond.cleanup8 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %size1 to i64 %xtraiter = and i64 %wide.trip.count, 3 %1 = icmp ult i32 %size1, 4 br i1 %1, label %for.cond6.preheader.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = and i64 %wide.trip.count, 4294967292 br label %for.body for.cond6.preheader.unr-lcssa: ; preds = %for.body, %for.body.preheader %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.3, %for.body ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond6.preheader, label %for.body.epil for.body.epil: ; preds = %for.cond6.preheader.unr-lcssa, %for.body.epil %indvars.iv.epil = phi i64 [ %indvars.iv.next.epil, %for.body.epil ], [ %indvars.iv.unr, %for.cond6.preheader.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.cond6.preheader.unr-lcssa ] %2 = mul nuw nsw i64 %indvars.iv.epil, %0 %arrayidx.epil = getelementptr inbounds i32, ptr %v, i64 %2 store i32 1, ptr %arrayidx.epil, align 4, !tbaa !5 %arrayidx5.epil = getelementptr inbounds i32, ptr %arrayidx.epil, i64 %indvars.iv.epil store i32 1, ptr %arrayidx5.epil, align 4, !tbaa !5 %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.cond6.preheader, label %for.body.epil, !llvm.loop !20 for.cond6.preheader: ; preds = %for.body.epil, %for.cond6.preheader.unr-lcssa %cmp757 = icmp sgt i32 %size1, 1 br i1 %cmp757, label %for.cond10.preheader.preheader, label %for.cond.cleanup8 for.cond10.preheader.preheader: ; preds = %for.cond6.preheader %wide.trip.count70 = zext i32 %size1 to i64 %3 = shl nuw nsw i64 %0, 2 %4 = add i64 %3, %v73 %5 = add i64 %4, 4 %6 = shl nuw nsw i64 %0, 2 %diff.check74 = icmp ult i32 %size2, 8 br label %for.cond10.preheader for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.3, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.3, %for.body ] %7 = mul nuw nsw i64 %indvars.iv, %0 %arrayidx = getelementptr inbounds i32, ptr %v, i64 %7 store i32 1, ptr %arrayidx, align 4, !tbaa !5 %arrayidx5 = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv store i32 1, ptr %arrayidx5, align 4, !tbaa !5 %indvars.iv.next = or i64 %indvars.iv, 1 %8 = mul nuw nsw i64 %indvars.iv.next, %0 %arrayidx.1 = getelementptr inbounds i32, ptr %v, i64 %8 store i32 1, ptr %arrayidx.1, align 4, !tbaa !5 %arrayidx5.1 = getelementptr inbounds i32, ptr %arrayidx.1, i64 %indvars.iv.next store i32 1, ptr %arrayidx5.1, align 4, !tbaa !5 %indvars.iv.next.1 = or i64 %indvars.iv, 2 %9 = mul nuw nsw i64 %indvars.iv.next.1, %0 %arrayidx.2 = getelementptr inbounds i32, ptr %v, i64 %9 store i32 1, ptr %arrayidx.2, align 4, !tbaa !5 %arrayidx5.2 = getelementptr inbounds i32, ptr %arrayidx.2, i64 %indvars.iv.next.1 store i32 1, ptr %arrayidx5.2, align 4, !tbaa !5 %indvars.iv.next.2 = or i64 %indvars.iv, 3 %10 = mul nuw nsw i64 %indvars.iv.next.2, %0 %arrayidx.3 = getelementptr inbounds i32, ptr %v, i64 %10 store i32 1, ptr %arrayidx.3, align 4, !tbaa !5 %arrayidx5.3 = getelementptr inbounds i32, ptr %arrayidx.3, i64 %indvars.iv.next.2 store i32 1, ptr %arrayidx5.3, align 4, !tbaa !5 %indvars.iv.next.3 = add nuw nsw i64 %indvars.iv, 4 %niter.next.3 = add nuw i64 %niter, 4 %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter br i1 %niter.ncmp.3, label %for.cond6.preheader.unr-lcssa, label %for.body, !llvm.loop !22 for.cond10.preheader: ; preds = %for.cond10.preheader.preheader, %for.cond.cleanup12 %indvar = phi i64 [ 0, %for.cond10.preheader.preheader ], [ %indvar.next, %for.cond.cleanup12 ] %indvars.iv66 = phi i64 [ 1, %for.cond10.preheader.preheader ], [ %indvars.iv.next67, %for.cond.cleanup12 ] %11 = mul i64 %6, %indvar %12 = add i64 %5, %11 %13 = add i64 %11, %v73 %cmp1155 = icmp ugt i64 %indvars.iv66, 1 br i1 %cmp1155, label %for.body13.lr.ph, label %for.cond.cleanup12 for.body13.lr.ph: ; preds = %for.cond10.preheader %14 = add nsw i64 %indvars.iv66, -1 %15 = mul nuw nsw i64 %14, %0 %arrayidx15 = getelementptr inbounds i32, ptr %v, i64 %15 %16 = mul nuw nsw i64 %indvars.iv66, %0 %arrayidx25 = getelementptr inbounds i32, ptr %v, i64 %16 %invariant.gep = getelementptr i32, ptr %arrayidx15, i64 -1 %min.iters.check = icmp ult i64 %indvar, 8 br i1 %min.iters.check, label %for.body13.preheader, label %vector.memcheck vector.memcheck: ; preds = %for.body13.lr.ph %17 = sub i64 %12, %13 %diff.check = icmp ult i64 %17, 32 %conflict.rdx = or i1 %diff.check, %diff.check74 br i1 %conflict.rdx, label %for.body13.preheader, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %indvar, -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 ] %offset.idx = or i64 %index, 1 %18 = getelementptr i32, ptr %invariant.gep, i64 %offset.idx %wide.load = load <4 x i32>, ptr %18, align 4, !tbaa !5 %19 = getelementptr i32, ptr %18, i64 4 %wide.load75 = load <4 x i32>, ptr %19, align 4, !tbaa !5 %20 = getelementptr inbounds i32, ptr %arrayidx15, i64 %offset.idx %wide.load76 = load <4 x i32>, ptr %20, align 4, !tbaa !5 %21 = getelementptr inbounds i32, ptr %20, i64 4 %wide.load77 = load <4 x i32>, ptr %21, align 4, !tbaa !5 %22 = add nsw <4 x i32> %wide.load76, %wide.load %23 = add nsw <4 x i32> %wide.load77, %wide.load75 %24 = getelementptr inbounds i32, ptr %arrayidx25, i64 %offset.idx store <4 x i32> %22, ptr %24, align 4, !tbaa !5 %25 = getelementptr inbounds i32, ptr %24, i64 4 store <4 x i32> %23, ptr %25, align 4, !tbaa !5 %index.next = add nuw i64 %index, 8 %26 = icmp eq i64 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !23 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %indvar, %n.vec br i1 %cmp.n, label %for.cond.cleanup12, label %for.body13.preheader for.body13.preheader: ; preds = %vector.memcheck, %for.body13.lr.ph, %middle.block %indvars.iv60.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %for.body13.lr.ph ], [ %ind.end, %middle.block ] %27 = sub i64 %indvars.iv66, %indvars.iv60.ph %28 = sub i64 %indvar, %indvars.iv60.ph %xtraiter78 = and i64 %27, 3 %lcmp.mod79.not = icmp eq i64 %xtraiter78, 0 br i1 %lcmp.mod79.not, label %for.body13.prol.loopexit, label %for.body13.prol for.body13.prol: ; preds = %for.body13.preheader, %for.body13.prol %indvars.iv60.prol = phi i64 [ %indvars.iv.next61.prol, %for.body13.prol ], [ %indvars.iv60.ph, %for.body13.preheader ] %prol.iter = phi i64 [ %prol.iter.next, %for.body13.prol ], [ 0, %for.body13.preheader ] %gep.prol = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv60.prol %29 = load i32, ptr %gep.prol, align 4, !tbaa !5 %arrayidx23.prol = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv60.prol %30 = load i32, ptr %arrayidx23.prol, align 4, !tbaa !5 %add.prol = add nsw i32 %30, %29 %arrayidx27.prol = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv60.prol store i32 %add.prol, ptr %arrayidx27.prol, align 4, !tbaa !5 %indvars.iv.next61.prol = add nuw nsw i64 %indvars.iv60.prol, 1 %prol.iter.next = add i64 %prol.iter, 1 %prol.iter.cmp.not = icmp eq i64 %prol.iter.next, %xtraiter78 br i1 %prol.iter.cmp.not, label %for.body13.prol.loopexit, label %for.body13.prol, !llvm.loop !26 for.body13.prol.loopexit: ; preds = %for.body13.prol, %for.body13.preheader %indvars.iv60.unr = phi i64 [ %indvars.iv60.ph, %for.body13.preheader ], [ %indvars.iv.next61.prol, %for.body13.prol ] %31 = icmp ult i64 %28, 3 br i1 %31, label %for.cond.cleanup12, label %for.body13 for.cond.cleanup8: ; preds = %for.cond.cleanup12, %entry, %for.cond6.preheader ret void for.cond.cleanup12: ; preds = %for.body13.prol.loopexit, %for.body13, %middle.block, %for.cond10.preheader %indvars.iv.next67 = add nuw nsw i64 %indvars.iv66, 1 %exitcond71.not = icmp eq i64 %indvars.iv.next67, %wide.trip.count70 %indvar.next = add i64 %indvar, 1 br i1 %exitcond71.not, label %for.cond.cleanup8, label %for.cond10.preheader, !llvm.loop !27 for.body13: ; preds = %for.body13.prol.loopexit, %for.body13 %indvars.iv60 = phi i64 [ %indvars.iv.next61.3, %for.body13 ], [ %indvars.iv60.unr, %for.body13.prol.loopexit ] %gep = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv60 %32 = load i32, ptr %gep, align 4, !tbaa !5 %arrayidx23 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv60 %33 = load i32, ptr %arrayidx23, align 4, !tbaa !5 %add = add nsw i32 %33, %32 %arrayidx27 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv60 store i32 %add, ptr %arrayidx27, align 4, !tbaa !5 %indvars.iv.next61 = add nuw nsw i64 %indvars.iv60, 1 %gep.1 = getelementptr i32, ptr %arrayidx15, i64 %indvars.iv60 %34 = load i32, ptr %gep.1, align 4, !tbaa !5 %arrayidx23.1 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61 %35 = load i32, ptr %arrayidx23.1, align 4, !tbaa !5 %add.1 = add nsw i32 %35, %34 %arrayidx27.1 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61 store i32 %add.1, ptr %arrayidx27.1, align 4, !tbaa !5 %indvars.iv.next61.1 = add nuw nsw i64 %indvars.iv60, 2 %gep.2 = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.next61.1 %36 = load i32, ptr %gep.2, align 4, !tbaa !5 %arrayidx23.2 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61.1 %37 = load i32, ptr %arrayidx23.2, align 4, !tbaa !5 %add.2 = add nsw i32 %37, %36 %arrayidx27.2 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61.1 store i32 %add.2, ptr %arrayidx27.2, align 4, !tbaa !5 %indvars.iv.next61.2 = add nuw nsw i64 %indvars.iv60, 3 %gep.3 = getelementptr i32, ptr %invariant.gep, i64 %indvars.iv.next61.2 %38 = load i32, ptr %gep.3, align 4, !tbaa !5 %arrayidx23.3 = getelementptr inbounds i32, ptr %arrayidx15, i64 %indvars.iv.next61.2 %39 = load i32, ptr %arrayidx23.3, align 4, !tbaa !5 %add.3 = add nsw i32 %39, %38 %arrayidx27.3 = getelementptr inbounds i32, ptr %arrayidx25, i64 %indvars.iv.next61.2 store i32 %add.3, ptr %arrayidx27.3, align 4, !tbaa !5 %indvars.iv.next61.3 = add nuw nsw i64 %indvars.iv60, 4 %exitcond65.not.3 = icmp eq i64 %indvars.iv.next61.3, %indvars.iv66 br i1 %exitcond65.not.3, label %for.cond.cleanup12, label %for.body13, !llvm.loop !28 } ; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @abs_val(i32 noundef %a, i32 noundef %b) local_unnamed_addr #8 { entry: %sub = sub nsw i32 %a, %b %retval.0 = tail call i32 @llvm.abs.i32(i32 %sub, i1 true) ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #9 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #13 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #13 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not12 = icmp sgt i32 %0, %1 br i1 %cmp.not12, label %for.cond.cleanup, label %for.body.preheader for.body.preheader: ; preds = %entry %2 = add i32 %1, 1 %3 = sub i32 %2, %0 %min.iters.check = icmp ult i32 %3, 8 br i1 %min.iters.check, label %for.body.preheader17, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %3, -8 %ind.end = add i32 %0, %n.vec %.splatinsert = insertelement <4 x i32> poison, i32 %0, i64 0 %.splat = shufflevector <4 x i32> %.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %induction = add <4 x i32> %.splat, <i32 0, i32 1, i32 2, i32 3> br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i32 [ 0, %vector.ph ], [ %index.next, %vector.body ] %vec.ind = phi <4 x i32> [ %induction, %vector.ph ], [ %vec.ind.next, %vector.body ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %24, %vector.body ] %vec.phi16 = phi <4 x i32> [ zeroinitializer, %vector.ph ], [ %25, %vector.body ] %step.add = add <4 x i32> %vec.ind, <i32 4, i32 4, i32 4, i32 4> %4 = sdiv <4 x i32> %vec.ind, <i32 1000, i32 1000, i32 1000, i32 1000> %5 = sdiv <4 x i32> %step.add, <i32 1000, i32 1000, i32 1000, i32 1000> %6 = srem <4 x i32> %vec.ind, <i32 10, i32 10, i32 10, i32 10> %7 = srem <4 x i32> %step.add, <i32 10, i32 10, i32 10, i32 10> %8 = mul nsw <4 x i32> %6, <i32 10, i32 10, i32 10, i32 10> %9 = mul nsw <4 x i32> %7, <i32 10, i32 10, i32 10, i32 10> %10 = srem <4 x i32> %vec.ind, <i32 100, i32 100, i32 100, i32 100> %11 = srem <4 x i32> %step.add, <i32 100, i32 100, i32 100, i32 100> %12 = trunc <4 x i32> %10 to <4 x i8> %13 = trunc <4 x i32> %11 to <4 x i8> %14 = sdiv <4 x i8> %12, <i8 10, i8 10, i8 10, i8 10> %15 = sdiv <4 x i8> %13, <i8 10, i8 10, i8 10, i8 10> %16 = sext <4 x i8> %14 to <4 x i32> %17 = sext <4 x i8> %15 to <4 x i32> %18 = add nsw <4 x i32> %8, %16 %19 = add nsw <4 x i32> %9, %17 %20 = icmp eq <4 x i32> %4, %18 %21 = icmp eq <4 x i32> %5, %19 %22 = zext <4 x i1> %20 to <4 x i32> %23 = zext <4 x i1> %21 to <4 x i32> %24 = add <4 x i32> %vec.phi, %22 %25 = add <4 x i32> %vec.phi16, %23 %index.next = add nuw i32 %index, 8 %vec.ind.next = add <4 x i32> %vec.ind, <i32 8, i32 8, i32 8, i32 8> %26 = icmp eq i32 %index.next, %n.vec br i1 %26, label %middle.block, label %vector.body, !llvm.loop !29 middle.block: ; preds = %vector.body %bin.rdx = add <4 x i32> %25, %24 %27 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n = icmp eq i32 %3, %n.vec br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader17 for.body.preheader17: ; preds = %for.body.preheader, %middle.block %i.014.ph = phi i32 [ %0, %for.body.preheader ], [ %ind.end, %middle.block ] %cnt.013.ph = phi i32 [ 0, %for.body.preheader ], [ %27, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %27, %middle.block ], [ %spec.select, %for.body ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %cnt.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #13 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #13 ret i32 0 for.body: ; preds = %for.body.preheader17, %for.body %i.014 = phi i32 [ %inc4, %for.body ], [ %i.014.ph, %for.body.preheader17 ] %cnt.013 = phi i32 [ %spec.select, %for.body ], [ %cnt.013.ph, %for.body.preheader17 ] %div = sdiv i32 %i.014, 1000 %rem = srem i32 %i.014, 10 %mul = mul nsw i32 %rem, 10 %rem1 = srem i32 %i.014, 100 %div2.lhs.trunc = trunc i32 %rem1 to i8 %div211 = sdiv i8 %div2.lhs.trunc, 10 %div2.sext = sext i8 %div211 to i32 %add = add nsw i32 %mul, %div2.sext %cmp3 = icmp eq i32 %div, %add %inc = zext i1 %cmp3 to i32 %spec.select = add nuw nsw i32 %cnt.013, %inc %inc4 = add i32 %i.014, 1 %exitcond.not = icmp eq i32 %i.014, %1 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !30 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #10 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.abs.i32(i32, i1 immarg) #11 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #11 attributes #0 = { nofree norecurse nosync nounwind memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { 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 #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nosync nounwind memory(argmem: readwrite) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind 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) "no-trapping-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 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 #7 = { 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 #8 = { 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 #9 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #10 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #11 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #12 = { nounwind willreturn memory(read) } attributes #13 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!7, !7, i64 0} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !21} !21 = !{!"llvm.loop.unroll.disable"} !22 = distinct !{!22, !10} !23 = distinct !{!23, !10, !24, !25} !24 = !{!"llvm.loop.isvectorized", i32 1} !25 = !{!"llvm.loop.unroll.runtime.disable"} !26 = distinct !{!26, !21} !27 = distinct !{!27, !10} !28 = distinct !{!28, !10, !24} !29 = distinct !{!29, !10, !24, !25} !30 = distinct !{!30, !10, !25, !24}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void){ int a,b; int yes=0; scanf("%d %d",&a,&b); for(int i=a;i<=b;i++){ if(i/10000==i%10&&i/10%10==i/1000%10){yes++;} } printf("%d\n",yes); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275151/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275151/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp.not15 = icmp sgt i32 %0, %1 br i1 %cmp.not15, label %for.cond.cleanup, label %for.body for.cond.cleanup: ; preds = %for.inc, %entry %yes.0.lcssa = phi i32 [ 0, %entry ], [ %yes.1, %for.inc ] %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %yes.0.lcssa) 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 for.body: ; preds = %entry, %for.inc %i.017 = phi i32 [ %inc7, %for.inc ], [ %0, %entry ] %yes.016 = phi i32 [ %yes.1, %for.inc ], [ 0, %entry ] %div = sdiv i32 %i.017, 10000 %rem = srem i32 %i.017, 10 %div2 = sdiv i32 %i.017, 10 %cmp1 = icmp eq i32 %div, %rem br i1 %cmp1, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body %rem3 = srem i32 %div2, 10 %div4 = sdiv i32 %i.017, 1000 %rem5 = srem i32 %div4, 10 %cmp6 = icmp eq i32 %rem3, %rem5 %inc = zext i1 %cmp6 to i32 %spec.select = add nsw i32 %yes.016, %inc br label %for.inc for.inc: ; preds = %land.lhs.true, %for.body %yes.1 = phi i32 [ %yes.016, %for.body ], [ %spec.select, %land.lhs.true ] %inc7 = add i32 %i.017, 1 %exitcond.not = icmp eq i32 %i.017, %1 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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(void) { int input_MAX=0,input_MIN=0,i,count=0; int data,data_rerv,data_rerv_save; scanf("%d",&input_MIN); scanf("%d",&input_MAX); for(i = input_MIN ; i <= input_MAX ; i++){ data_rerv=0; data_rerv_save=0; data=i; //printf("*********\n"); do{ //printf("data = %d\n", data); data_rerv_save = data % 10; //printf("data_rerv_save = %d\n",data_rerv_save ); data_rerv = data_rerv * 10 + data_rerv_save; //printf("data_rerv = %d\n",data_rerv); data = data / 10; }while(data!=0); //printf("%d %d\n",i,data_rerv ); if(i== data_rerv){ count++; }else{ //printf("Not Match\n"); } } printf("%d\n",count ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275195/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275195/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %input_MAX = alloca i32, align 4 %input_MIN = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %input_MAX) #3 store i32 0, ptr %input_MAX, align 4, !tbaa !5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %input_MIN) #3 store i32 0, ptr %input_MIN, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input_MIN) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %input_MAX) %0 = load i32, ptr %input_MIN, align 4, !tbaa !5 %1 = load i32, ptr %input_MAX, align 4, !tbaa !5 %cmp.not13 = icmp sgt i32 %0, %1 br i1 %cmp.not13, label %for.end, label %do.body.preheader do.body.preheader: ; preds = %entry, %do.end %count.015 = phi i32 [ %spec.select, %do.end ], [ 0, %entry ] %i.014 = phi i32 [ %inc4, %do.end ], [ %0, %entry ] br label %do.body do.body: ; preds = %do.body.preheader, %do.body %data.0 = phi i32 [ %div, %do.body ], [ %i.014, %do.body.preheader ] %data_rerv.0 = phi i32 [ %add, %do.body ], [ 0, %do.body.preheader ] %rem = srem i32 %data.0, 10 %mul = mul nsw i32 %data_rerv.0, 10 %add = add nsw i32 %mul, %rem %div = sdiv i32 %data.0, 10 %data.0.off = add i32 %data.0, 9 %cmp2.not = icmp ult i32 %data.0.off, 19 br i1 %cmp2.not, label %do.end, label %do.body, !llvm.loop !9 do.end: ; preds = %do.body %cmp3 = icmp eq i32 %i.014, %add %inc = zext i1 %cmp3 to i32 %spec.select = add nuw nsw i32 %count.015, %inc %inc4 = add i32 %i.014, 1 %exitcond.not = icmp eq i32 %i.014, %1 br i1 %exitcond.not, label %for.end, label %do.body.preheader, !llvm.loop !11 for.end: ; preds = %do.end, %entry %count.0.lcssa = phi i32 [ 0, %entry ], [ %spec.select, %do.end ] %call5 = 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 %input_MIN) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %input_MAX) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdlib.h> #include <unistd.h> #define REP(i, n) for (int i = 0; (i) < (int)(n); ++ (i)) int input() { char buf[6]; int size = read(0, buf, 6); int n = 0; REP (i, 5) { n = n * 10 + buf[i] - '0'; } return n; } void output(int n) { char buf[20]; char *s = buf + sizeof buf; *(-- s) = '\n'; if (! n) *(-- s) = '0'; for (; n; n /= 10) { *(-- s) = (n % 10) + '0'; } write(1, s, buf + sizeof buf - s); } __attribute__((constructor)) static void _main() { int a = input(); int b = input(); int cnt = 0; REP (x, 10) REP (y, 10) REP (z, 10) { int n = x * 10000 + y * 1000 + z * 100 + y * 10 + x; cnt += (a <= n && n <= b); } output(cnt); _exit(EXIT_SUCCESS); } int main() { }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275238/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275238/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_main, ptr null }] ; Function Attrs: nofree nounwind uwtable define dso_local i32 @input() local_unnamed_addr #0 { entry: %buf = alloca [6 x i8], align 1 call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %buf) #7 %call = call i64 @read(i32 noundef 0, ptr noundef nonnull %buf, i64 noundef 6) #7 %0 = load i8, ptr %buf, align 1, !tbaa !5 %conv2 = sext i8 %0 to i32 %1 = mul nsw i32 %conv2, 10 %arrayidx.1 = getelementptr inbounds [6 x i8], ptr %buf, i64 0, i64 1 %2 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 %conv2.1 = sext i8 %2 to i32 %add.1 = add nsw i32 %1, -528 %sub.1 = add nsw i32 %add.1, %conv2.1 %mul.2 = mul nsw i32 %sub.1, 10 %arrayidx.2 = getelementptr inbounds [6 x i8], ptr %buf, i64 0, i64 2 %3 = load i8, ptr %arrayidx.2, align 1, !tbaa !5 %conv2.2 = sext i8 %3 to i32 %add.2 = add nsw i32 %mul.2, -48 %sub.2 = add nsw i32 %add.2, %conv2.2 %mul.3 = mul nsw i32 %sub.2, 10 %arrayidx.3 = getelementptr inbounds [6 x i8], ptr %buf, i64 0, i64 3 %4 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 %conv2.3 = sext i8 %4 to i32 %add.3 = add nsw i32 %mul.3, -48 %sub.3 = add nsw i32 %add.3, %conv2.3 %mul.4 = mul nsw i32 %sub.3, 10 %arrayidx.4 = getelementptr inbounds [6 x i8], ptr %buf, i64 0, i64 4 %5 = load i8, ptr %arrayidx.4, align 1, !tbaa !5 %conv2.4 = sext i8 %5 to i32 %add.4 = add nsw i32 %mul.4, -48 %sub.4 = add nsw i32 %add.4, %conv2.4 call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %buf) #7 ret i32 %sub.4 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree declare noundef i64 @read(i32 noundef, ptr nocapture noundef, 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: nofree nounwind uwtable define dso_local void @output(i32 noundef %n) local_unnamed_addr #0 { entry: %buf = alloca [20 x i8], align 16 call void @llvm.lifetime.start.p0(i64 20, ptr nonnull %buf) #7 %incdec.ptr = getelementptr inbounds i8, ptr %buf, i64 19 store i8 10, ptr %incdec.ptr, align 1, !tbaa !5 %tobool.not = icmp eq i32 %n, 0 br i1 %tobool.not, label %if.end.thread, label %for.body if.end.thread: ; preds = %entry %incdec.ptr1 = getelementptr inbounds i8, ptr %buf, i64 18 store i8 48, ptr %incdec.ptr1, align 2, !tbaa !5 br label %for.end for.body: ; preds = %entry, %for.body %s.115 = phi ptr [ %incdec.ptr3, %for.body ], [ %incdec.ptr, %entry ] %n.addr.014 = phi i32 [ %div, %for.body ], [ %n, %entry ] %rem = srem i32 %n.addr.014, 10 %0 = trunc i32 %rem to i8 %conv = add nsw i8 %0, 48 %incdec.ptr3 = getelementptr inbounds i8, ptr %s.115, i64 -1 store i8 %conv, ptr %incdec.ptr3, align 1, !tbaa !5 %div = sdiv i32 %n.addr.014, 10 %n.addr.014.off = add i32 %n.addr.014, 9 %tobool2.not = icmp ult i32 %n.addr.014.off, 19 br i1 %tobool2.not, label %for.end, label %for.body, !llvm.loop !8 for.end: ; preds = %for.body, %if.end.thread %s.1.lcssa = phi ptr [ %incdec.ptr1, %if.end.thread ], [ %incdec.ptr3, %for.body ] %add.ptr = getelementptr inbounds i8, ptr %buf, i64 20 %sub.ptr.lhs.cast = ptrtoint ptr %add.ptr to i64 %sub.ptr.rhs.cast = ptrtoint ptr %s.1.lcssa to i64 %sub.ptr.sub = sub i64 %sub.ptr.lhs.cast, %sub.ptr.rhs.cast %call = call i64 @write(i32 noundef 1, ptr noundef nonnull %s.1.lcssa, i64 noundef %sub.ptr.sub) #7 call void @llvm.lifetime.end.p0(i64 20, ptr nonnull %buf) #7 ret void } ; Function Attrs: nofree declare noundef i64 @write(i32 noundef, ptr nocapture noundef readonly, i64 noundef) local_unnamed_addr #2 ; Function Attrs: noreturn nounwind uwtable define internal void @_main() #3 { entry: %buf.i35 = alloca [6 x i8], align 1 %buf.i = alloca [6 x i8], align 1 call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %buf.i) #7 %call.i = call i64 @read(i32 noundef 0, ptr noundef nonnull %buf.i, i64 noundef 6) #7 %0 = load i8, ptr %buf.i, align 1, !tbaa !5 %conv2.i = sext i8 %0 to i32 %1 = mul nsw i32 %conv2.i, 10 %arrayidx.1.i = getelementptr inbounds [6 x i8], ptr %buf.i, i64 0, i64 1 %2 = load i8, ptr %arrayidx.1.i, align 1, !tbaa !5 %conv2.1.i = sext i8 %2 to i32 %add.1.i = add nsw i32 %1, -528 %sub.1.i = add nsw i32 %add.1.i, %conv2.1.i %mul.2.i = mul nsw i32 %sub.1.i, 10 %arrayidx.2.i = getelementptr inbounds [6 x i8], ptr %buf.i, i64 0, i64 2 %3 = load i8, ptr %arrayidx.2.i, align 1, !tbaa !5 %conv2.2.i = sext i8 %3 to i32 %add.2.i = add nsw i32 %conv2.2.i, -48 %sub.2.i = add nsw i32 %add.2.i, %mul.2.i %mul.3.i = mul nsw i32 %sub.2.i, 10 %arrayidx.3.i = getelementptr inbounds [6 x i8], ptr %buf.i, i64 0, i64 3 %4 = load i8, ptr %arrayidx.3.i, align 1, !tbaa !5 %conv2.3.i = sext i8 %4 to i32 %add.3.i = add nsw i32 %conv2.3.i, -48 %sub.3.i = add nsw i32 %add.3.i, %mul.3.i %mul.4.i = mul nsw i32 %sub.3.i, 10 %arrayidx.4.i = getelementptr inbounds [6 x i8], ptr %buf.i, i64 0, i64 4 %5 = load i8, ptr %arrayidx.4.i, align 1, !tbaa !5 %conv2.4.i = sext i8 %5 to i32 %add.4.i = add nsw i32 %conv2.4.i, -48 %sub.4.i = add nsw i32 %add.4.i, %mul.4.i call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %buf.i) #7 call void @llvm.lifetime.start.p0(i64 6, ptr nonnull %buf.i35) #7 %call.i36 = call i64 @read(i32 noundef 0, ptr noundef nonnull %buf.i35, i64 noundef 6) #7 %6 = load i8, ptr %buf.i35, align 1, !tbaa !5 %conv2.i37 = sext i8 %6 to i32 %7 = mul nsw i32 %conv2.i37, 10 %arrayidx.1.i38 = getelementptr inbounds [6 x i8], ptr %buf.i35, i64 0, i64 1 %8 = load i8, ptr %arrayidx.1.i38, align 1, !tbaa !5 %conv2.1.i39 = sext i8 %8 to i32 %add.1.i40 = add nsw i32 %7, -528 %sub.1.i41 = add nsw i32 %add.1.i40, %conv2.1.i39 %mul.2.i42 = mul nsw i32 %sub.1.i41, 10 %arrayidx.2.i43 = getelementptr inbounds [6 x i8], ptr %buf.i35, i64 0, i64 2 %9 = load i8, ptr %arrayidx.2.i43, align 1, !tbaa !5 %conv2.2.i44 = sext i8 %9 to i32 %add.2.i45 = add nsw i32 %conv2.2.i44, -48 %sub.2.i46 = add nsw i32 %add.2.i45, %mul.2.i42 %mul.3.i47 = mul nsw i32 %sub.2.i46, 10 %arrayidx.3.i48 = getelementptr inbounds [6 x i8], ptr %buf.i35, i64 0, i64 3 %10 = load i8, ptr %arrayidx.3.i48, align 1, !tbaa !5 %conv2.3.i49 = sext i8 %10 to i32 %add.3.i50 = add nsw i32 %conv2.3.i49, -48 %sub.3.i51 = add nsw i32 %add.3.i50, %mul.3.i47 %mul.4.i52 = mul nsw i32 %sub.3.i51, 10 %arrayidx.4.i53 = getelementptr inbounds [6 x i8], ptr %buf.i35, i64 0, i64 4 %11 = load i8, ptr %arrayidx.4.i53, align 1, !tbaa !5 %conv2.4.i54 = sext i8 %11 to i32 %add.4.i55 = add nsw i32 %conv2.4.i54, -48 %sub.4.i56 = add nsw i32 %add.4.i55, %mul.4.i52 call void @llvm.lifetime.end.p0(i64 6, ptr nonnull %buf.i35) #7 %broadcast.splatinsert66 = insertelement <4 x i32> poison, i32 %sub.4.i56, i64 0 %broadcast.splat67 = shufflevector <4 x i32> %broadcast.splatinsert66, <4 x i32> poison, <4 x i32> zeroinitializer %broadcast.splatinsert64 = insertelement <4 x i32> poison, i32 %sub.4.i, i64 0 %broadcast.splat65 = shufflevector <4 x i32> %broadcast.splatinsert64, <4 x i32> poison, <4 x i32> zeroinitializer br label %vector.ph vector.ph: ; preds = %vector.ph, %entry %cnt.062 = phi i32 [ 0, %entry ], [ %194, %vector.ph ] %x.061 = phi i32 [ 0, %entry ], [ %inc23, %vector.ph ] %add12 = mul nuw nsw i32 %x.061, 10001 %broadcast.splatinsert = insertelement <4 x i32> poison, i32 %add12, i64 0 %broadcast.splat = shufflevector <4 x i32> %broadcast.splatinsert, <4 x i32> poison, <4 x i32> zeroinitializer %12 = insertelement <4 x i32> <i32 poison, i32 0, i32 0, i32 0>, i32 %cnt.062, i64 0 %13 = add nuw nsw <4 x i32> %broadcast.splat, <i32 0, i32 1010, i32 2020, i32 3030> %14 = icmp sle <4 x i32> %broadcast.splat65, %13 %15 = icmp sle <4 x i32> %13, %broadcast.splat67 %16 = select <4 x i1> %14, <4 x i1> %15, <4 x i1> zeroinitializer %17 = zext <4 x i1> %16 to <4 x i32> %18 = add <4 x i32> %12, %17 %19 = add nuw <4 x i32> %broadcast.splat, <i32 100, i32 1110, i32 2120, i32 3130> %20 = icmp sle <4 x i32> %broadcast.splat65, %19 %21 = icmp sle <4 x i32> %19, %broadcast.splat67 %22 = select <4 x i1> %20, <4 x i1> %21, <4 x i1> zeroinitializer %23 = zext <4 x i1> %22 to <4 x i32> %24 = add <4 x i32> %18, %23 %25 = add nuw <4 x i32> %broadcast.splat, <i32 200, i32 1210, i32 2220, i32 3230> %26 = icmp sle <4 x i32> %broadcast.splat65, %25 %27 = icmp sle <4 x i32> %25, %broadcast.splat67 %28 = select <4 x i1> %26, <4 x i1> %27, <4 x i1> zeroinitializer %29 = zext <4 x i1> %28 to <4 x i32> %30 = add <4 x i32> %24, %29 %31 = add nuw <4 x i32> %broadcast.splat, <i32 300, i32 1310, i32 2320, i32 3330> %32 = icmp sle <4 x i32> %broadcast.splat65, %31 %33 = icmp sle <4 x i32> %31, %broadcast.splat67 %34 = select <4 x i1> %32, <4 x i1> %33, <4 x i1> zeroinitializer %35 = zext <4 x i1> %34 to <4 x i32> %36 = add <4 x i32> %30, %35 %37 = add nuw <4 x i32> %broadcast.splat, <i32 400, i32 1410, i32 2420, i32 3430> %38 = icmp sle <4 x i32> %broadcast.splat65, %37 %39 = icmp sle <4 x i32> %37, %broadcast.splat67 %40 = select <4 x i1> %38, <4 x i1> %39, <4 x i1> zeroinitializer %41 = zext <4 x i1> %40 to <4 x i32> %42 = add <4 x i32> %36, %41 %43 = add nuw <4 x i32> %broadcast.splat, <i32 500, i32 1510, i32 2520, i32 3530> %44 = icmp sle <4 x i32> %broadcast.splat65, %43 %45 = icmp sle <4 x i32> %43, %broadcast.splat67 %46 = select <4 x i1> %44, <4 x i1> %45, <4 x i1> zeroinitializer %47 = zext <4 x i1> %46 to <4 x i32> %48 = add <4 x i32> %42, %47 %49 = add nuw <4 x i32> %broadcast.splat, <i32 600, i32 1610, i32 2620, i32 3630> %50 = icmp sle <4 x i32> %broadcast.splat65, %49 %51 = icmp sle <4 x i32> %49, %broadcast.splat67 %52 = select <4 x i1> %50, <4 x i1> %51, <4 x i1> zeroinitializer %53 = zext <4 x i1> %52 to <4 x i32> %54 = add <4 x i32> %48, %53 %55 = add nuw <4 x i32> %broadcast.splat, <i32 700, i32 1710, i32 2720, i32 3730> %56 = icmp sle <4 x i32> %broadcast.splat65, %55 %57 = icmp sle <4 x i32> %55, %broadcast.splat67 %58 = select <4 x i1> %56, <4 x i1> %57, <4 x i1> zeroinitializer %59 = zext <4 x i1> %58 to <4 x i32> %60 = add <4 x i32> %54, %59 %61 = add nuw <4 x i32> %broadcast.splat, <i32 800, i32 1810, i32 2820, i32 3830> %62 = icmp sle <4 x i32> %broadcast.splat65, %61 %63 = icmp sle <4 x i32> %61, %broadcast.splat67 %64 = select <4 x i1> %62, <4 x i1> %63, <4 x i1> zeroinitializer %65 = zext <4 x i1> %64 to <4 x i32> %66 = add <4 x i32> %60, %65 %67 = add nuw <4 x i32> %broadcast.splat, <i32 900, i32 1910, i32 2920, i32 3930> %68 = icmp sle <4 x i32> %broadcast.splat65, %67 %69 = icmp sle <4 x i32> %67, %broadcast.splat67 %70 = select <4 x i1> %68, <4 x i1> %69, <4 x i1> zeroinitializer %71 = zext <4 x i1> %70 to <4 x i32> %72 = add <4 x i32> %66, %71 %73 = add nuw nsw <4 x i32> %broadcast.splat, <i32 4040, i32 5050, i32 6060, i32 7070> %74 = icmp sle <4 x i32> %broadcast.splat65, %73 %75 = icmp sle <4 x i32> %73, %broadcast.splat67 %76 = select <4 x i1> %74, <4 x i1> %75, <4 x i1> zeroinitializer %77 = zext <4 x i1> %76 to <4 x i32> %78 = add <4 x i32> %72, %77 %79 = add nuw <4 x i32> %broadcast.splat, <i32 4140, i32 5150, i32 6160, i32 7170> %80 = icmp sle <4 x i32> %broadcast.splat65, %79 %81 = icmp sle <4 x i32> %79, %broadcast.splat67 %82 = select <4 x i1> %80, <4 x i1> %81, <4 x i1> zeroinitializer %83 = zext <4 x i1> %82 to <4 x i32> %84 = add <4 x i32> %78, %83 %85 = add nuw <4 x i32> %broadcast.splat, <i32 4240, i32 5250, i32 6260, i32 7270> %86 = icmp sle <4 x i32> %broadcast.splat65, %85 %87 = icmp sle <4 x i32> %85, %broadcast.splat67 %88 = select <4 x i1> %86, <4 x i1> %87, <4 x i1> zeroinitializer %89 = zext <4 x i1> %88 to <4 x i32> %90 = add <4 x i32> %84, %89 %91 = add nuw <4 x i32> %broadcast.splat, <i32 4340, i32 5350, i32 6360, i32 7370> %92 = icmp sle <4 x i32> %broadcast.splat65, %91 %93 = icmp sle <4 x i32> %91, %broadcast.splat67 %94 = select <4 x i1> %92, <4 x i1> %93, <4 x i1> zeroinitializer %95 = zext <4 x i1> %94 to <4 x i32> %96 = add <4 x i32> %90, %95 %97 = add nuw <4 x i32> %broadcast.splat, <i32 4440, i32 5450, i32 6460, i32 7470> %98 = icmp sle <4 x i32> %broadcast.splat65, %97 %99 = icmp sle <4 x i32> %97, %broadcast.splat67 %100 = select <4 x i1> %98, <4 x i1> %99, <4 x i1> zeroinitializer %101 = zext <4 x i1> %100 to <4 x i32> %102 = add <4 x i32> %96, %101 %103 = add nuw <4 x i32> %broadcast.splat, <i32 4540, i32 5550, i32 6560, i32 7570> %104 = icmp sle <4 x i32> %broadcast.splat65, %103 %105 = icmp sle <4 x i32> %103, %broadcast.splat67 %106 = select <4 x i1> %104, <4 x i1> %105, <4 x i1> zeroinitializer %107 = zext <4 x i1> %106 to <4 x i32> %108 = add <4 x i32> %102, %107 %109 = add nuw <4 x i32> %broadcast.splat, <i32 4640, i32 5650, i32 6660, i32 7670> %110 = icmp sle <4 x i32> %broadcast.splat65, %109 %111 = icmp sle <4 x i32> %109, %broadcast.splat67 %112 = select <4 x i1> %110, <4 x i1> %111, <4 x i1> zeroinitializer %113 = zext <4 x i1> %112 to <4 x i32> %114 = add <4 x i32> %108, %113 %115 = add nuw <4 x i32> %broadcast.splat, <i32 4740, i32 5750, i32 6760, i32 7770> %116 = icmp sle <4 x i32> %broadcast.splat65, %115 %117 = icmp sle <4 x i32> %115, %broadcast.splat67 %118 = select <4 x i1> %116, <4 x i1> %117, <4 x i1> zeroinitializer %119 = zext <4 x i1> %118 to <4 x i32> %120 = add <4 x i32> %114, %119 %121 = add nuw <4 x i32> %broadcast.splat, <i32 4840, i32 5850, i32 6860, i32 7870> %122 = icmp sle <4 x i32> %broadcast.splat65, %121 %123 = icmp sle <4 x i32> %121, %broadcast.splat67 %124 = select <4 x i1> %122, <4 x i1> %123, <4 x i1> zeroinitializer %125 = zext <4 x i1> %124 to <4 x i32> %126 = add <4 x i32> %120, %125 %127 = add nuw <4 x i32> %broadcast.splat, <i32 4940, i32 5950, i32 6960, i32 7970> %128 = icmp sle <4 x i32> %broadcast.splat65, %127 %129 = icmp sle <4 x i32> %127, %broadcast.splat67 %130 = select <4 x i1> %128, <4 x i1> %129, <4 x i1> zeroinitializer %131 = zext <4 x i1> %130 to <4 x i32> %132 = add <4 x i32> %126, %131 %133 = add nuw nsw <4 x i32> %broadcast.splat, <i32 8080, i32 9090, i32 10100, i32 11110> %134 = icmp sle <4 x i32> %broadcast.splat65, %133 %135 = icmp sle <4 x i32> %133, %broadcast.splat67 %136 = select <4 x i1> %134, <4 x i1> %135, <4 x i1> zeroinitializer %137 = zext <4 x i1> %136 to <4 x i32> %138 = add <4 x i32> %132, %137 %139 = add nuw <4 x i32> %broadcast.splat, <i32 8180, i32 9190, i32 10200, i32 11210> %140 = icmp sle <4 x i32> %broadcast.splat65, %139 %141 = icmp sle <4 x i32> %139, %broadcast.splat67 %142 = select <4 x i1> %140, <4 x i1> %141, <4 x i1> zeroinitializer %143 = zext <4 x i1> %142 to <4 x i32> %144 = add <4 x i32> %138, %143 %145 = add nuw <4 x i32> %broadcast.splat, <i32 8280, i32 9290, i32 10300, i32 11310> %146 = icmp sle <4 x i32> %broadcast.splat65, %145 %147 = icmp sle <4 x i32> %145, %broadcast.splat67 %148 = select <4 x i1> %146, <4 x i1> %147, <4 x i1> zeroinitializer %149 = zext <4 x i1> %148 to <4 x i32> %150 = add <4 x i32> %144, %149 %151 = add nuw <4 x i32> %broadcast.splat, <i32 8380, i32 9390, i32 10400, i32 11410> %152 = icmp sle <4 x i32> %broadcast.splat65, %151 %153 = icmp sle <4 x i32> %151, %broadcast.splat67 %154 = select <4 x i1> %152, <4 x i1> %153, <4 x i1> zeroinitializer %155 = zext <4 x i1> %154 to <4 x i32> %156 = add <4 x i32> %150, %155 %157 = add nuw <4 x i32> %broadcast.splat, <i32 8480, i32 9490, i32 10500, i32 11510> %158 = icmp sle <4 x i32> %broadcast.splat65, %157 %159 = icmp sle <4 x i32> %157, %broadcast.splat67 %160 = select <4 x i1> %158, <4 x i1> %159, <4 x i1> zeroinitializer %161 = zext <4 x i1> %160 to <4 x i32> %162 = add <4 x i32> %156, %161 %163 = add nuw <4 x i32> %broadcast.splat, <i32 8580, i32 9590, i32 10600, i32 11610> %164 = icmp sle <4 x i32> %broadcast.splat65, %163 %165 = icmp sle <4 x i32> %163, %broadcast.splat67 %166 = select <4 x i1> %164, <4 x i1> %165, <4 x i1> zeroinitializer %167 = zext <4 x i1> %166 to <4 x i32> %168 = add <4 x i32> %162, %167 %169 = add nuw <4 x i32> %broadcast.splat, <i32 8680, i32 9690, i32 10700, i32 11710> %170 = icmp sle <4 x i32> %broadcast.splat65, %169 %171 = icmp sle <4 x i32> %169, %broadcast.splat67 %172 = select <4 x i1> %170, <4 x i1> %171, <4 x i1> zeroinitializer %173 = zext <4 x i1> %172 to <4 x i32> %174 = add <4 x i32> %168, %173 %175 = add nuw <4 x i32> %broadcast.splat, <i32 8780, i32 9790, i32 10800, i32 11810> %176 = icmp sle <4 x i32> %broadcast.splat65, %175 %177 = icmp sle <4 x i32> %175, %broadcast.splat67 %178 = select <4 x i1> %176, <4 x i1> %177, <4 x i1> zeroinitializer %179 = zext <4 x i1> %178 to <4 x i32> %180 = add <4 x i32> %174, %179 %181 = add nuw <4 x i32> %broadcast.splat, <i32 8880, i32 9890, i32 10900, i32 11910> %182 = icmp sle <4 x i32> %broadcast.splat65, %181 %183 = icmp sle <4 x i32> %181, %broadcast.splat67 %184 = select <4 x i1> %182, <4 x i1> %183, <4 x i1> zeroinitializer %185 = zext <4 x i1> %184 to <4 x i32> %186 = add <4 x i32> %180, %185 %187 = add nuw <4 x i32> %broadcast.splat, <i32 8980, i32 9990, i32 11000, i32 12010> %188 = icmp sle <4 x i32> %broadcast.splat65, %187 %189 = icmp sle <4 x i32> %187, %broadcast.splat67 %190 = select <4 x i1> %188, <4 x i1> %189, <4 x i1> zeroinitializer %191 = zext <4 x i1> %190 to <4 x i32> %192 = add <4 x i32> %186, %191 %193 = shufflevector <4 x i32> %192, <4 x i32> %132, <4 x i32> <i32 0, i32 1, i32 6, i32 7> %194 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %193) %inc23 = add nuw nsw i32 %x.061, 1 %exitcond63.not = icmp eq i32 %inc23, 10 br i1 %exitcond63.not, label %for.cond.cleanup, label %vector.ph, !llvm.loop !10 for.cond.cleanup: ; preds = %vector.ph tail call void @output(i32 noundef %194) tail call void @_exit(i32 noundef 0) #8 unreachable } ; Function Attrs: noreturn declare void @_exit(i32 noundef) local_unnamed_addr #4 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable define dso_local i32 @main() local_unnamed_addr #5 { entry: ret i32 0 } ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.add.v4i32(<4 x i32>) #6 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { noreturn nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } attributes #8 = { noreturn nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !9}
#include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int A,B; int array[5]; int count = 0; int a,b,c,d; scanf("%d%d\n",&A,&B); for(int i = A; i <= B; i++) { array[0] = i % 10; a = i / 10; array[1] = a % 10; b = a / 10; array[2] = b % 10; c = b / 10; array[3] = c % 10; d = c / 10; array[4] = d; if(array[0] == array[4] && array[1] == array[3]) { count = count + 1; } } printf("%d\n",count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275296/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275296/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d%d\0A\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 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %A) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %B) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %A, ptr noundef nonnull %B) %0 = load i32, ptr %A, align 4, !tbaa !5 %1 = load i32, ptr %B, align 4, !tbaa !5 %cmp.not25 = icmp sgt i32 %0, %1 br i1 %cmp.not25, label %for.cond.cleanup, label %for.body for.cond.cleanup: ; preds = %for.inc, %entry %count.0.lcssa = phi i32 [ 0, %entry ], [ %count.1, %for.inc ] %call17 = 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 %B) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %A) #3 ret i32 0 for.body: ; preds = %entry, %for.inc %i.027 = phi i32 [ %inc, %for.inc ], [ %0, %entry ] %count.026 = phi i32 [ %count.1, %for.inc ], [ 0, %entry ] %rem = srem i32 %i.027, 10 %div = sdiv i32 %i.027, 10 %div9 = sdiv i32 %i.027, 10000 %cmp13 = icmp eq i32 %rem, %div9 br i1 %cmp13, label %land.lhs.true, label %for.inc land.lhs.true: ; preds = %for.body %div6 = sdiv i32 %i.027, 1000 %rem7 = srem i32 %div6, 10 %rem1 = srem i32 %div, 10 %cmp16 = icmp eq i32 %rem1, %rem7 %add = zext i1 %cmp16 to i32 %spec.select = add nsw i32 %count.026, %add br label %for.inc for.inc: ; preds = %land.lhs.true, %for.body %count.1 = phi i32 [ %count.026, %for.body ], [ %spec.select, %land.lhs.true ] %inc = add i32 %i.027, 1 %exitcond.not = icmp eq i32 %i.027, %1 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !9 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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(void) { int n, h[1000], i, a, c; scanf("%d",&n); for(i=0;i<n;i++) scanf("%d",&h[i]); a=c=0; for(i=0;i<n;i++){ if(h[i]>=a){ c++; a=h[i]; } } printf("%d\n",c); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275339/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275339/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %h = alloca [1000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %h) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp23 = icmp sgt i32 %0, 0 br i1 %cmp23, label %for.body, label %for.end13 for.cond2.preheader: ; preds = %for.body %cmp325 = icmp sgt i32 %2, 0 br i1 %cmp325, label %for.body4.preheader, label %for.end13 for.body4.preheader: ; preds = %for.cond2.preheader %wide.trip.count = zext i32 %2 to i64 %xtraiter = and i64 %wide.trip.count, 1 %1 = icmp eq i32 %2, 1 br i1 %1, label %for.end13.loopexit.unr-lcssa, label %for.body4.preheader.new for.body4.preheader.new: ; preds = %for.body4.preheader %unroll_iter = and i64 %wide.trip.count, 4294967294 br label %for.body4 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [1000 x i32], ptr %h, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %n, align 4, !tbaa !5 %3 = sext i32 %2 to i64 %cmp = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp, label %for.body, label %for.cond2.preheader, !llvm.loop !9 for.body4: ; preds = %for.body4, %for.body4.preheader.new %indvars.iv32 = phi i64 [ 0, %for.body4.preheader.new ], [ %indvars.iv.next33.1, %for.body4 ] %c.028 = phi i32 [ 0, %for.body4.preheader.new ], [ %spec.select22.1, %for.body4 ] %a.027 = phi i32 [ 0, %for.body4.preheader.new ], [ %spec.select.1, %for.body4 ] %niter = phi i64 [ 0, %for.body4.preheader.new ], [ %niter.next.1, %for.body4 ] %arrayidx6 = getelementptr inbounds [1000 x i32], ptr %h, i64 0, i64 %indvars.iv32 %4 = load i32, ptr %arrayidx6, align 8, !tbaa !5 %cmp7.not = icmp sge i32 %4, %a.027 %spec.select = call i32 @llvm.smax.i32(i32 %4, i32 %a.027) %inc8 = zext i1 %cmp7.not to i32 %spec.select22 = add nuw nsw i32 %c.028, %inc8 %indvars.iv.next33 = or i64 %indvars.iv32, 1 %arrayidx6.1 = getelementptr inbounds [1000 x i32], ptr %h, i64 0, i64 %indvars.iv.next33 %5 = load i32, ptr %arrayidx6.1, align 4, !tbaa !5 %cmp7.not.1 = icmp sge i32 %5, %spec.select %spec.select.1 = call i32 @llvm.smax.i32(i32 %5, i32 %spec.select) %inc8.1 = zext i1 %cmp7.not.1 to i32 %spec.select22.1 = add nuw nsw i32 %spec.select22, %inc8.1 %indvars.iv.next33.1 = add nuw nsw i64 %indvars.iv32, 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.end13.loopexit.unr-lcssa, label %for.body4, !llvm.loop !11 for.end13.loopexit.unr-lcssa: ; preds = %for.body4, %for.body4.preheader %spec.select22.lcssa.ph = phi i32 [ undef, %for.body4.preheader ], [ %spec.select22.1, %for.body4 ] %indvars.iv32.unr = phi i64 [ 0, %for.body4.preheader ], [ %indvars.iv.next33.1, %for.body4 ] %c.028.unr = phi i32 [ 0, %for.body4.preheader ], [ %spec.select22.1, %for.body4 ] %a.027.unr = phi i32 [ 0, %for.body4.preheader ], [ %spec.select.1, %for.body4 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end13, label %for.body4.epil for.body4.epil: ; preds = %for.end13.loopexit.unr-lcssa %arrayidx6.epil = getelementptr inbounds [1000 x i32], ptr %h, i64 0, i64 %indvars.iv32.unr %6 = load i32, ptr %arrayidx6.epil, align 4, !tbaa !5 %cmp7.not.epil = icmp sge i32 %6, %a.027.unr %inc8.epil = zext i1 %cmp7.not.epil to i32 %spec.select22.epil = add nuw nsw i32 %c.028.unr, %inc8.epil br label %for.end13 for.end13: ; preds = %for.body4.epil, %for.end13.loopexit.unr-lcssa, %entry, %for.cond2.preheader %c.0.lcssa = phi i32 [ 0, %for.cond2.preheader ], [ 0, %entry ], [ %spec.select22.lcssa.ph, %for.end13.loopexit.unr-lcssa ], [ %spec.select22.epil, %for.body4.epil ] %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %c.0.lcssa) call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %h) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int main(void){ int i,N,max=0,c=0; scanf("%d",&N); int H[N]; for(i=0;i<N;i++){ scanf("%d",&H[i]); if(max<=H[i]){ max=H[i]; } if(H[i]-max>=0){ c++; } } printf("%d\n",c); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_275382/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_275382/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %N) %0 = load i32, ptr %N, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = call ptr @llvm.stacksave.p0() %vla = alloca i32, i64 %1, align 16 %3 = load i32, ptr %N, align 4, !tbaa !5 %cmp21 = icmp sgt i32 %3, 0 br i1 %cmp21, label %for.body, label %for.end for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %max.023 = phi i32 [ %spec.select, %for.body ], [ 0, %entry ] %c.022 = phi i32 [ %c.1, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %4 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp4.not = icmp sle i32 %max.023, %4 %spec.select = call i32 @llvm.smax.i32(i32 %max.023, i32 %4) %inc = zext i1 %cmp4.not to i32 %c.1 = add nuw nsw i32 %c.022, %inc %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %5 = load i32, ptr %N, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp = icmp slt i64 %indvars.iv.next, %6 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.body, %entry %c.0.lcssa = phi i32 [ 0, %entry ], [ %c.1, %for.body ] %call13 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %c.0.lcssa) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn declare void @llvm.stackrestore.p0(ptr) #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}