Source_Code
stringlengths
69
484k
IR_Original
stringlengths
2.05k
17.9M
#include<stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a < b && b < c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196117/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196117/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d%d%d",&a,&b,&c); if(a<b&&a<c&&b<c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196160/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196160/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp slt i32 %0, %2 %cmp3 = icmp slt i32 %1, %2 %or.cond = and i1 %cmp1, %cmp3 br i1 %or.cond, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %str.sink = phi ptr [ @str, %if.else ], [ @str.3, %land.lhs.true ] %puts = call i32 @puts(ptr nonnull dereferenceable(1) %str.sink) call void @llvm.lifetime.end.p0(i64 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 a,b,c; scanf("%d %d %d" ,&a,&b,&c); if(a<b&&b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196203/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196203/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a, b, c; scanf("%d %d %d",&a,&b,&c); if (a<b&&b<c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196247/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196247/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196290/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196290/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c){ printf("Yes\n"); }else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196340/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196340/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c ; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a<b&&b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0 ; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196384/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196384/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp3 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp3, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if (a<b&&b<c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196427/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196427/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a<b && b<c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196470/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196470/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196513/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196513/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if(a<b&&a<c&&b<c) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196564/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196564/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %entry %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp3 = icmp slt i32 %0, %2 %cmp5 = icmp slt i32 %1, %2 %or.cond = and i1 %cmp3, %cmp5 br i1 %or.cond, label %if.end, label %if.else if.else: ; preds = %land.lhs.true, %entry br label %if.end if.end: ; preds = %land.lhs.true, %if.else %.str.2.sink = phi ptr [ @.str.2, %if.else ], [ @.str.1, %land.lhs.true ] %call7 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.2.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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a < b && b < c) { printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196607/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196607/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b&&b < c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196658/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196658/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a < b && b < c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196700/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196700/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196744/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196744/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196788/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196788/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if (a<b) if (b<c) puts("Yes"); else puts("No"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196830/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196830/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %3 = select i1 %cmp, i1 %cmp1, i1 false %.str.1.sink = select i1 %3, ptr @.str.1, ptr @.str.2 %call3 = call i32 @puts(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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b&&b<c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196881/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196881/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196924/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196924/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_196975/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_196975/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%s\n",a<b&b<c?"Yes":"No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197017/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197017/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp slt i32 %1, %2 %and4 = and i1 %cmp, %cmp1 %cond = select i1 %and4, 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(){ int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a < b && b < c ) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197068/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197068/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197118/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197118/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a, b, c; scanf("%d %d %d", &a, &b, &c); if(a < b && b < c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197161/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197161/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197211/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197211/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b&&b<c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197299/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197299/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d%d%d",&a,&b,&c); if (a < b && b < c) printf("Yes\n"); if (!(a < b && b < c)) printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197349/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197349/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i32, ptr %a, align 4, !tbaa !5 %.pre12 = load i32, ptr %b, align 4, !tbaa !5 %.pre13 = load i32, ptr %c, align 4 br label %if.end if.end: ; preds = %if.then, %entry %3 = phi i32 [ %.pre13, %if.then ], [ %2, %entry ] %4 = phi i32 [ %.pre12, %if.then ], [ %1, %entry ] %5 = phi i32 [ %.pre, %if.then ], [ %0, %entry ] %cmp3 = icmp slt i32 %5, %4 %cmp5 = icmp slt i32 %4, %3 %or.cond11 = select i1 %cmp3, i1 %cmp5, i1 false br i1 %or.cond11, label %if.end8, label %if.then6 if.then6: ; preds = %if.end %puts10 = call i32 @puts(ptr nonnull dereferenceable(1) @str.3) br label %if.end8 if.end8: ; preds = %if.end, %if.then6 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> #include <string.h> int main(void) { int i, j, q, kol, len, skm = 0, pos = 0; char s[100]; scanf("%s", s); len = strlen(s); if (s[0] == '-') { printf("("); skm = 1; } for (i = 0; i < len; i++) if (s[i] == '.') pos = i; if (!pos) if (!skm) kol = len; else kol = len - 1; else if (!skm) kol = pos; else kol = pos - 1; printf("$"); if (skm) j = 1; else j = 0; if (pos) q = pos; else q = len; for (i = j; i < q; i++) { printf("%c", s[i]); if ((kol - i + j)%3 == 1 && (kol - i + j!= 1)) printf(","); } printf("."); if (pos) if (len - pos >= 3) printf("%c%c", s[pos+1], s[pos+2]); else printf("%c0", s[pos+1]); else printf("00"); if (skm) printf(")"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_1974/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_1974/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.6 = private unnamed_addr constant [5 x i8] c"%c%c\00", align 1 @.str.7 = private unnamed_addr constant [4 x i8] c"%c0\00", align 1 @.str.8 = private unnamed_addr constant [3 x i8] c"00\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %s = alloca [100 x i8], align 16 call void @llvm.lifetime.start.p0(i64 100, ptr nonnull %s) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %s) %call2 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %s) #6 %conv = trunc i64 %call2 to i32 %0 = load i8, ptr %s, align 16, !tbaa !5 %cmp.not.not.not = icmp eq i8 %0, 45 br i1 %cmp.not.not.not, label %if.then, label %if.end if.then: ; preds = %entry %putchar = call i32 @putchar(i32 40) br label %if.end if.end: ; preds = %if.then, %entry %cmp6119 = icmp sgt i32 %conv, 0 br i1 %cmp6119, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %if.end %wide.trip.count = and i64 %call2, 4294967295 %1 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %call2, 3 %2 = icmp ult i64 %1, 3 br i1 %2, label %for.end.loopexit.unr-lcssa, label %for.body.preheader.new for.body.preheader.new: ; preds = %for.body.preheader %unroll_iter = sub nsw i64 %wide.trip.count, %xtraiter br label %for.body for.body: ; preds = %for.body, %for.body.preheader.new %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.3, %for.body ] %pos.0121 = phi i32 [ 0, %for.body.preheader.new ], [ %spec.select.3, %for.body ] %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.3, %for.body ] %arrayidx8 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv %3 = load i8, ptr %arrayidx8, align 4, !tbaa !5 %cmp10 = icmp eq i8 %3, 46 %4 = trunc i64 %indvars.iv to i32 %spec.select = select i1 %cmp10, i32 %4, i32 %pos.0121 %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx8.1 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next %5 = load i8, ptr %arrayidx8.1, align 1, !tbaa !5 %cmp10.1 = icmp eq i8 %5, 46 %6 = trunc i64 %indvars.iv.next to i32 %spec.select.1 = select i1 %cmp10.1, i32 %6, i32 %spec.select %indvars.iv.next.1 = or i64 %indvars.iv, 2 %arrayidx8.2 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next.1 %7 = load i8, ptr %arrayidx8.2, align 2, !tbaa !5 %cmp10.2 = icmp eq i8 %7, 46 %8 = trunc i64 %indvars.iv.next.1 to i32 %spec.select.2 = select i1 %cmp10.2, i32 %8, i32 %spec.select.1 %indvars.iv.next.2 = or i64 %indvars.iv, 3 %arrayidx8.3 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.next.2 %9 = load i8, ptr %arrayidx8.3, align 1, !tbaa !5 %cmp10.3 = icmp eq i8 %9, 46 %10 = trunc i64 %indvars.iv.next.2 to i32 %spec.select.3 = select i1 %cmp10.3, i32 %10, i32 %spec.select.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 !8 for.end.loopexit.unr-lcssa: ; preds = %for.body, %for.body.preheader %spec.select.lcssa.ph = phi i32 [ undef, %for.body.preheader ], [ %spec.select.3, %for.body ] %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.3, %for.body ] %pos.0121.unr = phi i32 [ 0, %for.body.preheader ], [ %spec.select.3, %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 ] %pos.0121.epil = phi i32 [ %spec.select.epil, %for.body.epil ], [ %pos.0121.unr, %for.end.loopexit.unr-lcssa ] %epil.iter = phi i64 [ %epil.iter.next, %for.body.epil ], [ 0, %for.end.loopexit.unr-lcssa ] %arrayidx8.epil = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv.epil %11 = load i8, ptr %arrayidx8.epil, align 1, !tbaa !5 %cmp10.epil = icmp eq i8 %11, 46 %12 = trunc i64 %indvars.iv.epil to i32 %spec.select.epil = select i1 %cmp10.epil, i32 %12, i32 %pos.0121.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 !10 for.end: ; preds = %for.end.loopexit.unr-lcssa, %for.body.epil, %if.end %pos.0.lcssa = phi i32 [ 0, %if.end ], [ %spec.select.lcssa.ph, %for.end.loopexit.unr-lcssa ], [ %spec.select.epil, %for.body.epil ] %tobool.not = icmp eq i32 %pos.0.lcssa, 0 %sub = sext i1 %cmp.not.not.not to i32 %kol.0.v = select i1 %tobool.not, i32 %conv, i32 %pos.0.lcssa %kol.0 = add nsw i32 %kol.0.v, %sub %putchar112 = call i32 @putchar(i32 36) %. = zext i1 %cmp.not.not.not to i32 %q.0 = select i1 %tobool.not, i32 %conv, i32 %pos.0.lcssa %cmp35122 = icmp sgt i32 %q.0, %. br i1 %cmp35122, label %for.body37.preheader, label %for.end54 for.body37.preheader: ; preds = %for.end %13 = zext i1 %cmp.not.not.not to i64 %wide.trip.count128 = zext i32 %q.0 to i64 br label %for.body37 for.body37: ; preds = %for.body37.preheader, %for.inc52 %indvars.iv125 = phi i64 [ %13, %for.body37.preheader ], [ %indvars.iv.next126, %for.inc52 ] %arrayidx39 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %indvars.iv125 %14 = load i8, ptr %arrayidx39, align 1, !tbaa !5 %conv40 = sext i8 %14 to i32 %putchar115 = call i32 @putchar(i32 %conv40) %15 = trunc i64 %indvars.iv125 to i32 %sub42 = sub nsw i32 %kol.0, %15 %add = add nsw i32 %sub42, %. %rem = srem i32 %add, 3 %cmp43 = icmp ne i32 %rem, 1 %cmp47.not = icmp eq i32 %add, 1 %or.cond = or i1 %cmp47.not, %cmp43 br i1 %or.cond, label %for.inc52, label %if.then49 if.then49: ; preds = %for.body37 %putchar116 = call i32 @putchar(i32 44) br label %for.inc52 for.inc52: ; preds = %for.body37, %if.then49 %indvars.iv.next126 = add nuw nsw i64 %indvars.iv125, 1 %exitcond129.not = icmp eq i64 %indvars.iv.next126, %wide.trip.count128 br i1 %exitcond129.not, label %for.end54, label %for.body37, !llvm.loop !12 for.end54: ; preds = %for.inc52, %for.end %putchar113 = call i32 @putchar(i32 46) br i1 %tobool.not, label %if.else78, label %if.then57 if.then57: ; preds = %for.end54 %sub58 = sub nsw i32 %conv, %pos.0.lcssa %cmp59 = icmp sgt i32 %sub58, 2 %add62 = add nsw i32 %pos.0.lcssa, 1 %idxprom63 = sext i32 %add62 to i64 %arrayidx64 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %idxprom63 %16 = load i8, ptr %arrayidx64, align 1, !tbaa !5 %conv65 = sext i8 %16 to i32 br i1 %cmp59, label %if.then61, label %if.else71 if.then61: ; preds = %if.then57 %add66 = add nsw i32 %pos.0.lcssa, 2 %idxprom67 = sext i32 %add66 to i64 %arrayidx68 = getelementptr inbounds [100 x i8], ptr %s, i64 0, i64 %idxprom67 %17 = load i8, ptr %arrayidx68, align 1, !tbaa !5 %conv69 = sext i8 %17 to i32 %call70 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.6, i32 noundef %conv65, i32 noundef %conv69) br label %if.end80 if.else71: ; preds = %if.then57 %call76 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.7, i32 noundef %conv65) br label %if.end80 if.else78: ; preds = %for.end54 %call79 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.8) br label %if.end80 if.end80: ; preds = %if.then61, %if.else71, %if.else78 br i1 %cmp.not.not.not, label %if.then82, label %if.end84 if.then82: ; preds = %if.end80 %putchar114 = call i32 @putchar(i32 41) br label %if.end84 if.end84: ; preds = %if.then82, %if.end80 call void @llvm.lifetime.end.p0(i64 100, ptr nonnull %s) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind } attributes #5 = { nounwind } attributes #6 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"} !8 = distinct !{!8, !9} !9 = !{!"llvm.loop.mustprogress"} !10 = distinct !{!10, !11} !11 = !{!"llvm.loop.unroll.disable"} !12 = distinct !{!12, !9}
#include <stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197442/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197442/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197486/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197486/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d", &a, &b, &c); if( a<b && b<c) printf("Yes\n"); else printf("No\n"); return(0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197529/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197529/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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"}
/* Range */ #include <stdio.h> int main() { int a,b,c; scanf("%d %d %d", &a,&b,&c); if(a < b && b < c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197572/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197572/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); printf("%s\n",((a<b)?((b<c)?"Yes":"No"):"No")); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197622/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197622/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %3 = select i1 %cmp, i1 %cmp1, i1 false %cond2 = select i1 %3, ptr @.str.2, ptr @.str.3 %puts = call i32 @puts(ptr nonnull dereferenceable(1) %cond2) 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 a,b,c; scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); if( a<b&&b<c ) puts("Yes"); else puts("No"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197666/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197666/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 @.str.2 = private unnamed_addr constant [3 x i8] c"No\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp3 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp3, i1 false %.str.1..str.2 = select i1 %or.cond, ptr @.str.1, ptr @.str.2 %call5 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) call void @llvm.lifetime.end.p0(i64 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void){ // Your code here! int a, b, c; scanf("%d %d %d",&a,&b,&c); if(a<b&&b<c){ printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197709/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197709/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197752/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197752/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d%d%d",&a,&b,&c); if(a < b && b < c){ printf("Yes\n"); return 0; } printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197802/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197802/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d", &a, &b ,&c); if(a < b && b < c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197860/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197860/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b&&b<c){printf("Yes\n");} else {printf("No\n");} return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197903/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197903/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf ("%d%d%d",&a,&b,&c); if (a < b && b < c){ printf ("Yes\n"); } else { printf ("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197954/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197954/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); if((0<=a)&&(c<=100)) { if((a<b)&&(b<c)) { printf("Yes\n"); } else { printf("No\n"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_197998/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_197998/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, -1 %1 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, 101 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %if.end8 if.then: ; preds = %entry %2 = load i32, ptr %b, align 4, !tbaa !5 %cmp2 = icmp slt i32 %0, %2 %cmp4 = icmp slt i32 %2, %1 %or.cond12 = select i1 %cmp2, i1 %cmp4, i1 false %str.3.str = select i1 %or.cond12, ptr @str.3, ptr @str %puts11 = call i32 @puts(ptr nonnull dereferenceable(1) %str.3.str) br label %if.end8 if.end8: ; preds = %if.then, %entry 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"}
/*3つの整数a, b, cを読み込み、 それらが a < b < cの条件を満たすならば"Yes"を、 満たさないならば"No"を出力するプログラム*/ #include <stdio.h> int main(){ int a,b,c; do{ scanf("%d %d %d",&a,&b,&c); }while(a<0 || a>100 || b<0 || b>100 || c<0 || c>100); /*0 ≤ a, b, c ≤ 100を満たすまで繰り返される*/ if(a<b && b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198054/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198054/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %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 br label %do.body do.body: ; preds = %do.body, %entry %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4 %or.cond = icmp ugt i32 %0, 100 %1 = load i32, ptr %b, align 4 %cmp3 = icmp slt i32 %1, 0 %or.cond13 = select i1 %or.cond, i1 true, i1 %cmp3 %cmp5 = icmp sgt i32 %1, 100 %or.cond14 = select i1 %or.cond13, i1 true, i1 %cmp5 %2 = load i32, ptr %c, align 4 %cmp7 = icmp slt i32 %2, 0 %or.cond15 = select i1 %or.cond14, i1 true, i1 %cmp7 %cmp8 = icmp sgt i32 %2, 100 %or.cond16 = select i1 %or.cond15, i1 true, i1 %cmp8 br i1 %or.cond16, label %do.body, label %do.end, !llvm.loop !5 do.end: ; preds = %do.body %cmp9 = icmp ult i32 %0, %1 %cmp10 = icmp ult i32 %1, %2 %or.cond19 = select i1 %cmp9, i1 %cmp10, i1 false %str.3.str = select i1 %or.cond19, 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 = distinct !{!5, !6} !6 = !{!"llvm.loop.mustprogress"}
#include<stdio.h> int main(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b&&b<c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198098/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198098/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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> #include <stdlib.h> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); if (a < b && b < c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198140/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198140/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a, b, c; scanf("%d %d %d", &a, &b, &c); const char *const answer = ((a < b) && (b < c)) ? "Yes" : "No"; printf("%s\n", answer); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198191/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198191/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %3 = select i1 %cmp, i1 %cmp1, i1 false %cond = select i1 %3, ptr @.str.1, ptr @.str.2 %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 a; int b; int c; scanf("%d %d %d",&a,&b,&c); if(a < b && b < c ){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198234/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198234/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if(a < b && b < c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198278/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198278/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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(void){ int a,b,c; scanf("%d %d %d",&a,&b,&c); if (a < b && b < c){ puts("Yes"); }else{ puts("No"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198320/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198320/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %.str.1..str.2 = select i1 %or.cond, ptr @.str.1, ptr @.str.2 %call3 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %.str.1..str.2) 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main(void) { int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a < b && b < c) { printf("Yes\n"); } else { printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198364/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198364/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a, b, c; scanf("%d %d %d", &a, &b, &c); if (a < b && b < c) { printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198407/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198407/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #0 { entry: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d%d%d",&a,&b,&c); if( a < b){ if(b < c) printf("Yes\n"); if(b > c) printf("No\n"); if(b == c) printf("No\n"); } if (a > b) printf("No\n"); if(a == b) printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198450/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198450/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [4 x i8] c"Yes\00", align 1 @str.6 = 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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 br i1 %cmp, label %if.then, label %if.end12 if.then: ; preds = %entry %2 = load i32, ptr %c, align 4, !tbaa !5 %cmp1 = icmp slt i32 %1, %2 br i1 %cmp1, label %if.then2, label %if.end if.then2: ; preds = %if.then %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) %.pre = load i32, ptr %b, align 4, !tbaa !5 %.pre25 = load i32, ptr %c, align 4, !tbaa !5 br label %if.end if.end: ; preds = %if.then2, %if.then %3 = phi i32 [ %.pre25, %if.then2 ], [ %2, %if.then ] %4 = phi i32 [ %.pre, %if.then2 ], [ %1, %if.then ] %cmp4 = icmp sgt i32 %4, %3 br i1 %cmp4, label %if.then5, label %if.end7 if.then5: ; preds = %if.end %puts21 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %.pre26 = load i32, ptr %b, align 4, !tbaa !5 %.pre27 = load i32, ptr %c, align 4, !tbaa !5 br label %if.end7 if.end7: ; preds = %if.then5, %if.end %5 = phi i32 [ %.pre27, %if.then5 ], [ %3, %if.end ] %6 = phi i32 [ %.pre26, %if.then5 ], [ %4, %if.end ] %cmp8 = icmp eq i32 %6, %5 br i1 %cmp8, label %if.then9, label %if.end12 if.then9: ; preds = %if.end7 %puts22 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %.pre28 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end12 if.end12: ; preds = %if.end7, %if.then9, %entry %7 = phi i32 [ %6, %if.end7 ], [ %.pre28, %if.then9 ], [ %1, %entry ] %8 = load i32, ptr %a, align 4, !tbaa !5 %cmp13 = icmp sgt i32 %8, %7 br i1 %cmp13, label %if.then14, label %if.end16 if.then14: ; preds = %if.end12 %puts23 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) %.pre29 = load i32, ptr %a, align 4, !tbaa !5 %.pre30 = load i32, ptr %b, align 4, !tbaa !5 br label %if.end16 if.end16: ; preds = %if.then14, %if.end12 %9 = phi i32 [ %.pre30, %if.then14 ], [ %7, %if.end12 ] %10 = phi i32 [ %.pre29, %if.then14 ], [ %8, %if.end12 ] %cmp17 = icmp eq i32 %10, %9 br i1 %cmp17, label %if.then18, label %if.end20 if.then18: ; preds = %if.end16 %puts24 = call i32 @puts(ptr nonnull dereferenceable(1) @str.6) br label %if.end20 if.end20: ; preds = %if.then18, %if.end16 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 a,b,c; scanf("%d%d%d",&a,&b,&c); if(a<b&&b<c){ printf("Yes\n"); }else{ printf("No\n"); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198494/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198494/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 a, b, c; scanf("%d %d %d" ,&a,&b,&c); if (a < b && b < c) printf("Yes\n"); else printf("No\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198537/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198537/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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"}
#define CRT_SECURE_NO_WARNINGS #include <stdio.h> int main(void) { int a; int b; int c; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); if (a < b && b < c){ printf("Yes\n"); } else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198580/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198580/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a) %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %b) %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp3 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp3, i1 false %str.3.str = select i1 %or.cond, 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 a,b,c; scanf("%d %d %d",&a,&b,&c); if(a<b && b<c){ printf("Yes\n"); }else{ printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198623/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198623/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %a = alloca i32, align 4 %b = alloca i32, align 4 %c = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %c) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %c) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp slt i32 %0, %1 %2 = load i32, ptr %c, align 4 %cmp1 = icmp slt i32 %1, %2 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %str.3.str = select i1 %or.cond, 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 n,a[2][100]; int suma[2] = {0}; int i,j; scanf("%d",&n); for (i = 0; i < 2; i++) { for (j = 0; j < n; j++) { scanf("%d",&a[i][j]); suma[i] += a[i][j]; } } suma[0] = 0; int ans = a[0][0] + suma[1]; suma[0] += a[0][0]; for (i = 1; i < n; i++) { suma[0] += a[0][i]; suma[1] -= a[1][i - 1]; if(ans < suma[0] + suma[1])ans = suma[0] + suma[1]; } printf("%d",ans); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198667/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198667/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [2 x [100 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 800, ptr nonnull %a) #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 = icmp sgt i32 %0, 0 call void @llvm.assume(i1 %1) br label %for.body3 for.body3: ; preds = %entry, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %entry ] %arrayidx5 = getelementptr inbounds [2 x [100 x i32]], ptr %a, i64 0, i64 0, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc13, !llvm.loop !9 for.inc13: ; preds = %for.body3 %cmp261.1 = icmp sgt i32 %2, 0 br i1 %cmp261.1, label %for.body3.1, label %for.end15.thread83 for.end15.thread83: ; preds = %for.inc13 %.pre85 = load i32, ptr %a, align 16, !tbaa !5 br label %for.end47 for.body3.1: ; preds = %for.inc13, %for.body3.1 %suma.sroa.8.0 = phi i32 [ %add.1, %for.body3.1 ], [ 0, %for.inc13 ] %indvars.iv.1 = phi i64 [ %indvars.iv.next.1, %for.body3.1 ], [ 0, %for.inc13 ] %arrayidx5.1 = getelementptr inbounds [2 x [100 x i32]], ptr %a, i64 0, i64 1, i64 %indvars.iv.1 %call6.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5.1) %4 = load i32, ptr %arrayidx5.1, align 4, !tbaa !5 %add.1 = add nsw i32 %suma.sroa.8.0, %4 %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %5 = load i32, ptr %n, align 4, !tbaa !5 %6 = sext i32 %5 to i64 %cmp2.1 = icmp slt i64 %indvars.iv.next.1, %6 br i1 %cmp2.1, label %for.body3.1, label %for.end15, !llvm.loop !9 for.end15: ; preds = %for.body3.1 %.pre = load i32, ptr %a, align 16, !tbaa !5 %add20 = add nsw i32 %add.1, %.pre %cmp2665 = icmp sgt i32 %5, 1 br i1 %cmp2665, label %for.body27.preheader, label %for.end47 for.body27.preheader: ; preds = %for.end15 %wide.trip.count = zext i32 %5 to i64 %7 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %7, 1 %8 = icmp eq i32 %5, 2 br i1 %8, label %for.end47.loopexit.unr-lcssa, label %for.body27.preheader.new for.body27.preheader.new: ; preds = %for.body27.preheader %unroll_iter = and i64 %7, -2 br label %for.body27 for.body27: ; preds = %for.body27, %for.body27.preheader.new %indvars.iv75 = phi i64 [ 1, %for.body27.preheader.new ], [ %indvars.iv.next76.1, %for.body27 ] %ans.067 = phi i32 [ %add20, %for.body27.preheader.new ], [ %spec.select.1, %for.body27 ] %9 = phi i32 [ %.pre, %for.body27.preheader.new ], [ %add32.1, %for.body27 ] %10 = phi i32 [ %add.1, %for.body27.preheader.new ], [ %sub37.1, %for.body27 ] %niter = phi i64 [ 0, %for.body27.preheader.new ], [ %niter.next.1, %for.body27 ] %arrayidx30 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv75 %11 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %add32 = add nsw i32 %9, %11 %12 = add nsw i64 %indvars.iv75, -1 %arrayidx35 = getelementptr inbounds [2 x [100 x i32]], ptr %a, i64 0, i64 1, i64 %12 %13 = load i32, ptr %arrayidx35, align 4, !tbaa !5 %sub37 = sub nsw i32 %10, %13 %add40 = add nsw i32 %sub37, %add32 %spec.select = call i32 @llvm.smax.i32(i32 %ans.067, i32 %add40) %indvars.iv.next76 = add nuw nsw i64 %indvars.iv75, 1 %arrayidx30.1 = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv.next76 %14 = load i32, ptr %arrayidx30.1, align 4, !tbaa !5 %add32.1 = add nsw i32 %add32, %14 %arrayidx35.1 = getelementptr inbounds [2 x [100 x i32]], ptr %a, i64 0, i64 1, i64 %indvars.iv75 %15 = load i32, ptr %arrayidx35.1, align 4, !tbaa !5 %sub37.1 = sub nsw i32 %sub37, %15 %add40.1 = add nsw i32 %sub37.1, %add32.1 %spec.select.1 = call i32 @llvm.smax.i32(i32 %spec.select, i32 %add40.1) %indvars.iv.next76.1 = add nuw nsw i64 %indvars.iv75, 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.end47.loopexit.unr-lcssa, label %for.body27, !llvm.loop !11 for.end47.loopexit.unr-lcssa: ; preds = %for.body27, %for.body27.preheader %spec.select.lcssa.ph = phi i32 [ undef, %for.body27.preheader ], [ %spec.select.1, %for.body27 ] %indvars.iv75.unr = phi i64 [ 1, %for.body27.preheader ], [ %indvars.iv.next76.1, %for.body27 ] %ans.067.unr = phi i32 [ %add20, %for.body27.preheader ], [ %spec.select.1, %for.body27 ] %.unr = phi i32 [ %.pre, %for.body27.preheader ], [ %add32.1, %for.body27 ] %.unr91 = phi i32 [ %add.1, %for.body27.preheader ], [ %sub37.1, %for.body27 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end47, label %for.body27.epil for.body27.epil: ; preds = %for.end47.loopexit.unr-lcssa %arrayidx30.epil = getelementptr inbounds [100 x i32], ptr %a, i64 0, i64 %indvars.iv75.unr %16 = load i32, ptr %arrayidx30.epil, align 4, !tbaa !5 %add32.epil = add nsw i32 %.unr, %16 %17 = add nsw i64 %indvars.iv75.unr, -1 %arrayidx35.epil = getelementptr inbounds [2 x [100 x i32]], ptr %a, i64 0, i64 1, i64 %17 %18 = load i32, ptr %arrayidx35.epil, align 4, !tbaa !5 %sub37.epil = sub nsw i32 %.unr91, %18 %add40.epil = add nsw i32 %sub37.epil, %add32.epil %spec.select.epil = call i32 @llvm.smax.i32(i32 %ans.067.unr, i32 %add40.epil) br label %for.end47 for.end47: ; preds = %for.body27.epil, %for.end47.loopexit.unr-lcssa, %for.end15.thread83, %for.end15 %ans.0.lcssa = phi i32 [ %add20, %for.end15 ], [ %.pre85, %for.end15.thread83 ], [ %spec.select.lcssa.ph, %for.end47.loopexit.unr-lcssa ], [ %spec.select.epil, %for.body27.epil ] %call48 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %ans.0.lcssa) call void @llvm.lifetime.end.p0(i64 800, 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #3 ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #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 nosync nounwind willreturn memory(inaccessiblemem: 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}
#include<stdio.h> int main() { long int n; scanf("%ld",&n); int ldigit=n%10; if(ldigit<=5) n=n-ldigit; else n=n+(10-ldigit); printf("%ld",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19871/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19871/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 ; 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) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %rem = srem i64 %0, 10 %conv = trunc i64 %rem to i32 %cmp = icmp slt i32 %conv, 6 %reass.sub = add i64 %0, 10 %storemerge.v = select i1 %cmp, i64 %0, i64 %reass.sub %storemerge = sub i64 %storemerge.v, %rem store i64 %storemerge, ptr %n, align 8, !tbaa !5 %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i64 noundef %storemerge) call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> int main(void){ int N; scanf("%d",&N); int A[2][N]; for(int i=0;i<2;i++){ for(int j=0;j<N;j++){ scanf("%d",&A[i][j]); } } A[1][0] += A[0][0]; for(int i=1;i<N;i++){ A[0][i] += A[0][i-1]; A[1][i] += A[1][i-1]>A[0][i]?A[1][i-1]:A[0][i]; } printf("%d",A[1][N-1]); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198753/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198753/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %N = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %N) #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() %3 = shl nuw nsw i64 %1, 1 %vla = alloca i32, i64 %3, align 16 %4 = load i32, ptr %N, align 4, !tbaa !5 %5 = icmp sgt i32 %4, 0 br i1 %5, label %for.body4, label %for.cond.cleanup18 for.cond.cleanup: ; preds = %for.body4.1 %.pre = load i32, ptr %vla, align 16, !tbaa !5 %arrayidx13.phi.trans.insert = getelementptr inbounds i32, ptr %vla, i64 %1 %.pre81 = load i32, ptr %arrayidx13.phi.trans.insert, align 4, !tbaa !5 %6 = add nsw i32 %.pre81, %.pre %arrayidx13 = getelementptr inbounds i32, ptr %vla, i64 %1 store i32 %6, ptr %arrayidx13, align 4, !tbaa !5 %cmp1770 = icmp sgt i32 %8, 1 br i1 %cmp1770, label %for.body19.preheader, label %for.cond.cleanup18 for.body19.preheader: ; preds = %for.cond.cleanup %wide.trip.count = zext i32 %8 to i64 br label %for.body19 for.cond.cleanup3: ; preds = %for.body4 %cmp267.1 = icmp sgt i32 %10, 0 br i1 %cmp267.1, label %for.body4.lr.ph.1, label %for.cond.cleanup.thread86 for.cond.cleanup.thread86: ; preds = %for.cond.cleanup3 %.pre87 = load i32, ptr %vla, align 16, !tbaa !5 %arrayidx13.phi.trans.insert88 = getelementptr inbounds i32, ptr %vla, i64 %1 %.pre8189 = load i32, ptr %arrayidx13.phi.trans.insert88, align 4, !tbaa !5 %7 = add nsw i32 %.pre8189, %.pre87 %arrayidx1390 = getelementptr inbounds i32, ptr %vla, i64 %1 store i32 %7, ptr %arrayidx1390, align 4, !tbaa !5 br label %for.cond.cleanup18 for.body4.lr.ph.1: ; preds = %for.cond.cleanup3 %arrayidx.1 = getelementptr inbounds i32, ptr %vla, i64 %1 br label %for.body4.1 for.body4.1: ; preds = %for.body4.1, %for.body4.lr.ph.1 %indvars.iv.1 = phi i64 [ 0, %for.body4.lr.ph.1 ], [ %indvars.iv.next.1, %for.body4.1 ] %arrayidx6.1 = getelementptr inbounds i32, ptr %arrayidx.1, i64 %indvars.iv.1 %call7.1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6.1) %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv.1, 1 %8 = load i32, ptr %N, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp2.1 = icmp slt i64 %indvars.iv.next.1, %9 br i1 %cmp2.1, label %for.body4.1, label %for.cond.cleanup, !llvm.loop !9 for.body4: ; preds = %entry, %for.body4 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body4 ], [ 0, %entry ] %arrayidx6 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx6) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %N, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp2, label %for.body4, label %for.cond.cleanup3, !llvm.loop !9 for.cond.cleanup18: ; preds = %for.body19, %entry, %for.cond.cleanup.thread86, %for.cond.cleanup %12 = phi i32 [ %8, %for.cond.cleanup ], [ %10, %for.cond.cleanup.thread86 ], [ %4, %entry ], [ %8, %for.body19 ] %13 = getelementptr inbounds i32, ptr %vla, i64 %1 %sub50 = add nsw i32 %12, -1 %idxprom51 = sext i32 %sub50 to i64 %arrayidx52 = getelementptr inbounds i32, ptr %13, i64 %idxprom51 %14 = load i32, ptr %arrayidx52, align 4, !tbaa !5 %call53 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %14) call void @llvm.stackrestore.p0(ptr %2) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %N) #5 ret i32 0 for.body19: ; preds = %for.body19.preheader, %for.body19 %indvars.iv77 = phi i64 [ 1, %for.body19.preheader ], [ %indvars.iv.next78, %for.body19 ] %15 = add nsw i64 %indvars.iv77, -1 %arrayidx22 = getelementptr inbounds i32, ptr %vla, i64 %15 %16 = load i32, ptr %arrayidx22, align 4, !tbaa !5 %arrayidx25 = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv77 %17 = load i32, ptr %arrayidx25, align 4, !tbaa !5 %add26 = add nsw i32 %17, %16 store i32 %add26, ptr %arrayidx25, align 4, !tbaa !5 %arrayidx30 = getelementptr inbounds i32, ptr %arrayidx13, i64 %15 %18 = load i32, ptr %arrayidx30, align 4, !tbaa !5 %.add26 = call i32 @llvm.smax.i32(i32 %18, i32 %add26) %arrayidx44 = getelementptr inbounds i32, ptr %arrayidx13, i64 %indvars.iv77 %19 = load i32, ptr %arrayidx44, align 4, !tbaa !5 %add45 = add nsw i32 %19, %.add26 store i32 %add45, ptr %arrayidx44, align 4, !tbaa !5 %indvars.iv.next78 = add nuw nsw i64 %indvars.iv77, 1 %exitcond.not = icmp eq i64 %indvars.iv.next78, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup18, label %for.body19, !llvm.loop !11 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress 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 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="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"} !11 = distinct !{!11, !10}
#include <stdio.h> #include <stdlib.h> #include <inttypes.h> int cmp(const void* x, const void* y) { int a = *(const int*)x; int b = *(const int*)y; if (a > b) return 1; if (a < b) return -1; return 0; } int N; int a[1000000]; int zaatu_num; int zaatu_table[1000000]; int get_id(int num) { int left, right, mid; left = 0; right = zaatu_num; while (left <= right) { mid = (left + right) / 2; if (zaatu_table[mid] == num) { return mid; } else if (zaatu_table[mid] < num) { left = mid + 1; } else { right = mid - 1; } } printf("%d not found!\n", num); exit(1); } uint64_t isi_count[1000000]; int main(void) { int i; int prev_count = 0; int prev_index = -1; if (scanf("%d", &N) != 1) return 1; for (i = 0; i < N; i++) { if (scanf("%d", &a[i]) != 1) return 1; zaatu_table[i] = a[i]; } /* 座標圧縮 */ qsort(zaatu_table, N, sizeof(int), cmp); zaatu_num = 0; for (i = 1; i < N; i++) { if (zaatu_table[i] != zaatu_table[zaatu_num]) { zaatu_table[++zaatu_num] = zaatu_table[i]; } } /* 各種類が何個あるかを調べる */ for (i = 0; i < N; i++) { isi_count[get_id(a[i])]++; } /* その数以上のところをその数に含める */ for (i = N - 1; i > 0; i--) { isi_count[i - 1] += isi_count[i]; } /* 計算する */ for (i = 0; i < N; i++) { if (prev_count < a[i]) { /* この階層を全部削るまで出せる */ int current_index = get_id(a[i]); int j; uint64_t current_count = 0; for (j = prev_index + 1; j <= current_index; j++) { current_count += (uint64_t)(zaatu_table[j] - (j > 0 ? zaatu_table[j - 1] : 0)) * isi_count[j]; } printf("%"PRIu64"\n", current_count); prev_count = a[i]; prev_index = current_index; } else { puts("0"); } } return 0; } /* 1階層だけ見てもダメ 撃墜例 3 1 3 2 辞書順最小→なるべく少ない値を出したい 最大のなかで一番右の所を取る 1 2 1 3 2 4 2 5 8 1 -> 9 1 2 1 3 2 4 2 5 7 1 -> 9 1 2 1 3 2 4 2 5 6 1 -> 9 1 2 1 3 2 4 2 5 5 1 -> 8 1 2 1 3 2 4 2 5 4 1 -> 8 1 2 1 3 2 4 2 4 4 1 -> 6 1 2 1 3 2 4 2 4 3 1 -> 6 1 2 1 3 2 4 2 3 3 1 -> 6 1 2 1 3 2 3 2 3 3 1 -> 4 1 2 1 3 2 3 2 3 2 1 -> 4 1 2 1 3 2 3 2 2 2 1 -> 4 1 2 1 3 2 2 2 2 2 1 -> 4 1 2 1 2 2 2 2 2 2 1 -> 2 1 2 1 2 2 2 2 2 1 1 -> 2 1 2 1 2 2 2 2 1 1 1 -> 2 1 2 1 2 2 2 1 1 1 1 -> 2 1 2 1 2 2 1 1 1 1 1 -> 2 1 2 1 2 1 1 1 1 1 1 -> 2 1 2 1 1 1 1 1 1 1 1 -> 2 1 1 1 1 1 1 1 1 1 1 -> 1 1 1 1 1 1 1 1 1 1 0 -> 1 1 1 1 1 1 1 1 1 0 0 -> 1 1 1 1 1 1 1 1 0 0 0 -> 1 1 1 1 1 1 1 0 0 0 0 -> 1 1 1 1 1 1 0 0 0 0 0 -> 1 1 1 1 1 0 0 0 0 0 0 -> 1 1 1 1 0 0 0 0 0 0 0 -> 1 1 1 0 0 0 0 0 0 0 0 -> 1 1 0 0 0 0 0 0 0 0 0 -> 1 */
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198797/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198797/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @zaatu_num = dso_local local_unnamed_addr global i32 0, align 4 @zaatu_table = dso_local global [1000000 x i32] zeroinitializer, align 16 @.str = private unnamed_addr constant [15 x i8] c"%d not found!\0A\00", align 1 @.str.1 = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @N = dso_local global i32 0, align 4 @a = dso_local global [1000000 x i32] zeroinitializer, align 16 @isi_count = dso_local local_unnamed_addr global [1000000 x i64] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [5 x i8] c"%lu\0A\00", align 1 @.str.3 = private unnamed_addr constant [2 x i8] c"0\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %x, ptr nocapture noundef readonly %y) #0 { entry: %0 = load i32, ptr %x, align 4, !tbaa !5 %1 = load i32, ptr %y, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp slt i32 %0, %1 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nounwind uwtable define dso_local i32 @get_id(i32 noundef %num) local_unnamed_addr #1 { entry: %0 = load i32, ptr @zaatu_num, align 4, !tbaa !5 %cmp.not17 = icmp slt i32 %0, 0 br i1 %cmp.not17, label %while.end, label %while.body while.body: ; preds = %entry, %if.else %left.019 = phi i32 [ %left.1, %if.else ], [ 0, %entry ] %right.018 = phi i32 [ %right.1, %if.else ], [ %0, %entry ] %add = add nsw i32 %left.019, %right.018 %div = sdiv i32 %add, 2 %idxprom = sext i32 %div to i64 %arrayidx = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %cmp1 = icmp eq i32 %1, %num br i1 %cmp1, label %if.then, label %if.else if.then: ; preds = %while.body ret i32 %div if.else: ; preds = %while.body %cmp4 = icmp slt i32 %1, %num %add6 = add nsw i32 %div, 1 %sub = add nsw i32 %div, -1 %right.1 = select i1 %cmp4, i32 %right.018, i32 %sub %left.1 = select i1 %cmp4, i32 %add6, i32 %left.019 %cmp.not = icmp sgt i32 %left.1, %right.1 br i1 %cmp.not, label %while.end, label %while.body, !llvm.loop !9 while.end: ; preds = %if.else, %entry %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %num) tail call void @exit(i32 noundef 1) #6 unreachable } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: noreturn nounwind declare void @exit(i32 noundef) local_unnamed_addr #3 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #1 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull @N) %cmp.not = icmp eq i32 %call, 1 br i1 %cmp.not, label %for.cond.preheader, label %cleanup for.cond.preheader: ; preds = %entry %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp1156 = icmp sgt i32 %0, 0 br i1 %cmp1156, label %for.body, label %for.cond.preheader.for.end_crit_edge for.cond.preheader.for.end_crit_edge: ; preds = %for.cond.preheader %.pre = sext i32 %0 to i64 br label %for.end for.body: ; preds = %for.cond.preheader, %if.end5 %indvars.iv = phi i64 [ %indvars.iv.next, %if.end5 ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [1000000 x i32], ptr @a, i64 0, i64 %indvars.iv %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %cmp3.not = icmp eq i32 %call2, 1 br i1 %cmp3.not, label %if.end5, label %cleanup if.end5: ; preds = %for.body %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %arrayidx9 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %indvars.iv store i32 %1, ptr %arrayidx9, align 4, !tbaa !5 %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 %cmp1 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp1, label %for.body, label %for.end, !llvm.loop !11 for.end: ; preds = %if.end5, %for.cond.preheader.for.end_crit_edge %conv.pre-phi = phi i64 [ %.pre, %for.cond.preheader.for.end_crit_edge ], [ %3, %if.end5 ] tail call void @qsort(ptr noundef nonnull @zaatu_table, i64 noundef %conv.pre-phi, i64 noundef 4, ptr noundef nonnull @cmp) #7 store i32 0, ptr @zaatu_num, align 4, !tbaa !5 %4 = load i32, ptr @N, align 4, !tbaa !5 %cmp11160 = icmp sgt i32 %4, 1 br i1 %cmp11160, label %for.body13.preheader, label %for.cond30.preheader.thread for.body13.preheader: ; preds = %for.end %wide.trip.count = zext i32 %4 to i64 br label %for.body13 for.cond30.preheader: ; preds = %for.inc27 %cmp31164 = icmp sgt i32 %4, 0 br i1 %cmp31164, label %for.body33.lr.ph, label %cleanup for.cond30.preheader.thread: ; preds = %for.end %cmp31164209 = icmp eq i32 %4, 1 br i1 %cmp31164209, label %for.body33.preheader, label %cleanup for.body33.lr.ph: ; preds = %for.cond30.preheader %cmp.not17.i = icmp slt i32 %inc23158, 0 br i1 %cmp.not17.i, label %for.body33.us, label %for.body33.preheader for.body33.preheader: ; preds = %for.cond30.preheader.thread, %for.body33.lr.ph %5 = phi i32 [ %inc23158, %for.body33.lr.ph ], [ 0, %for.cond30.preheader.thread ] %wide.trip.count194 = zext i32 %4 to i64 br label %for.body33 for.body33.us: ; preds = %for.body33.lr.ph %6 = load i32, ptr @a, align 16, !tbaa !5 br label %while.end.i for.body13: ; preds = %for.body13.preheader, %for.inc27 %indvars.iv188 = phi i64 [ 1, %for.body13.preheader ], [ %indvars.iv.next189, %for.inc27 ] %inc23159161 = phi i32 [ 0, %for.body13.preheader ], [ %inc23158, %for.inc27 ] %arrayidx15 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %indvars.iv188 %7 = load i32, ptr %arrayidx15, align 4, !tbaa !5 %idxprom16 = sext i32 %inc23159161 to i64 %arrayidx17 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom16 %8 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %cmp18.not = icmp eq i32 %7, %8 br i1 %cmp18.not, label %for.inc27, label %if.then20 if.then20: ; preds = %for.body13 %inc23 = add nsw i32 %inc23159161, 1 store i32 %inc23, ptr @zaatu_num, align 4, !tbaa !5 %idxprom24 = sext i32 %inc23 to i64 %arrayidx25 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom24 store i32 %7, ptr %arrayidx25, align 4, !tbaa !5 br label %for.inc27 for.inc27: ; preds = %for.body13, %if.then20 %inc23158 = phi i32 [ %inc23159161, %for.body13 ], [ %inc23, %if.then20 ] %indvars.iv.next189 = add nuw nsw i64 %indvars.iv188, 1 %exitcond.not = icmp eq i64 %indvars.iv.next189, %wide.trip.count br i1 %exitcond.not, label %for.cond30.preheader, label %for.body13, !llvm.loop !12 for.cond43.preheader: ; preds = %get_id.exit br i1 %cmp11160, label %for.body46.preheader, label %for.body57.preheader for.body46.preheader: ; preds = %for.cond43.preheader %9 = zext i32 %4 to i64 %10 = add nsw i64 %wide.trip.count194, -1 %min.iters.check = icmp ult i32 %4, 57 br i1 %min.iters.check, label %for.body46.preheader268, label %vector.scevcheck vector.scevcheck: ; preds = %for.body46.preheader %11 = add nsw i64 %wide.trip.count194, -2 %12 = add i32 %4, -2 %13 = trunc i64 %11 to i32 %14 = icmp ult i32 %12, %13 %15 = add i32 %4, -1 %16 = trunc i64 %11 to i32 %17 = icmp ult i32 %15, %16 %18 = icmp ugt i64 %11, 4294967295 %19 = or i1 %17, %18 %20 = zext i32 %12 to i64 %21 = shl nuw nsw i64 %20, 3 %scevgep = getelementptr i8, ptr @isi_count, i64 %21 %mul.result243.neg = mul nsw i64 %11, -8 %22 = getelementptr i8, ptr %scevgep, i64 %mul.result243.neg %23 = icmp ugt ptr %22, %scevgep %24 = zext i32 %15 to i64 %25 = shl nuw nsw i64 %24, 3 %scevgep245 = getelementptr i8, ptr @isi_count, i64 %25 %mul.result247.neg = mul nsw i64 %11, -8 %26 = getelementptr i8, ptr %scevgep245, i64 %mul.result247.neg %27 = icmp ugt ptr %26, %scevgep245 %28 = or i1 %14, %19 %29 = or i1 %23, %28 %30 = or i1 %27, %29 br i1 %30, label %for.body46.preheader268, label %vector.memcheck vector.memcheck: ; preds = %vector.scevcheck %umin249 = tail call i64 @llvm.umin.i64(i64 %wide.trip.count194, i64 2) %31 = shl nuw nsw i64 %umin249, 3 %32 = add i32 %4, -2 %33 = zext i32 %32 to i64 %34 = shl nuw nsw i64 %33, 3 %35 = add nuw nsw i64 %31, %34 %36 = shl nuw nsw i64 %wide.trip.count194, 3 %37 = sub nsw i64 %35, %36 %scevgep250 = getelementptr i8, ptr @isi_count, i64 %37 %38 = getelementptr i8, ptr @isi_count, i64 %34 %scevgep251 = getelementptr i8, ptr %38, i64 8 %39 = add i32 %4, -1 %40 = zext i32 %39 to i64 %41 = shl nuw nsw i64 %40, 3 %42 = add nuw nsw i64 %31, %41 %43 = sub nsw i64 %42, %36 %scevgep252 = getelementptr i8, ptr @isi_count, i64 %43 %44 = getelementptr i8, ptr @isi_count, i64 %41 %scevgep253 = getelementptr i8, ptr %44, i64 8 %bound0 = icmp ult ptr %scevgep250, %scevgep253 %bound1 = icmp ult ptr %scevgep252, %scevgep251 %found.conflict = and i1 %bound0, %bound1 br i1 %found.conflict, label %for.body46.preheader268, label %vector.ph vector.ph: ; preds = %vector.memcheck %n.vec = and i64 %10, -4 %ind.end = sub nsw i64 %9, %n.vec 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 %9, %index %45 = add i64 %offset.idx, 4294967295 %46 = and i64 %45, 4294967295 %47 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %46 %48 = getelementptr inbounds i64, ptr %47, i64 -1 %wide.load = load <2 x i64>, ptr %48, align 8, !tbaa !13, !alias.scope !15 %49 = getelementptr inbounds i64, ptr %47, i64 -3 %wide.load255 = load <2 x i64>, ptr %49, align 8, !tbaa !13, !alias.scope !15 %50 = add nuw i64 %offset.idx, 4294967294 %51 = and i64 %50, 4294967295 %52 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %51 %53 = getelementptr inbounds i64, ptr %52, i64 -1 %wide.load257 = load <2 x i64>, ptr %53, align 8, !tbaa !13, !alias.scope !18, !noalias !15 %54 = getelementptr inbounds i64, ptr %52, i64 -3 %wide.load259 = load <2 x i64>, ptr %54, align 8, !tbaa !13, !alias.scope !18, !noalias !15 %55 = add <2 x i64> %wide.load257, %wide.load %56 = add <2 x i64> %wide.load259, %wide.load255 store <2 x i64> %55, ptr %53, align 8, !tbaa !13, !alias.scope !18, !noalias !15 store <2 x i64> %56, ptr %54, align 8, !tbaa !13, !alias.scope !18, !noalias !15 %index.next = add nuw i64 %index, 4 %57 = icmp eq i64 %index.next, %n.vec br i1 %57, label %middle.block, label %vector.body, !llvm.loop !20 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %10, %n.vec br i1 %cmp.n, label %for.body57.preheader, label %for.body46.preheader268 for.body46.preheader268: ; preds = %vector.memcheck, %vector.scevcheck, %for.body46.preheader, %middle.block %indvars.iv196.ph = phi i64 [ %9, %vector.memcheck ], [ %9, %vector.scevcheck ], [ %9, %for.body46.preheader ], [ %ind.end, %middle.block ] br label %for.body46 for.body33: ; preds = %for.body33.preheader, %get_id.exit %indvars.iv191 = phi i64 [ 0, %for.body33.preheader ], [ %indvars.iv.next192, %get_id.exit ] %arrayidx35 = getelementptr inbounds [1000000 x i32], ptr @a, i64 0, i64 %indvars.iv191 %58 = load i32, ptr %arrayidx35, align 4, !tbaa !5 br label %while.body.i while.body.i: ; preds = %for.body33, %if.else.i %left.019.i = phi i32 [ %left.1.i, %if.else.i ], [ 0, %for.body33 ] %right.018.i = phi i32 [ %right.1.i, %if.else.i ], [ %5, %for.body33 ] %add.i = add nsw i32 %right.018.i, %left.019.i %div.i = sdiv i32 %add.i, 2 %idxprom.i = sext i32 %div.i to i64 %arrayidx.i = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom.i %59 = load i32, ptr %arrayidx.i, align 4, !tbaa !5 %cmp1.i = icmp eq i32 %59, %58 br i1 %cmp1.i, label %get_id.exit, label %if.else.i if.else.i: ; preds = %while.body.i %cmp4.i = icmp slt i32 %59, %58 %add6.i = add nsw i32 %div.i, 1 %sub.i = add nsw i32 %div.i, -1 %right.1.i = select i1 %cmp4.i, i32 %right.018.i, i32 %sub.i %left.1.i = select i1 %cmp4.i, i32 %add6.i, i32 %left.019.i %cmp.not.i = icmp sgt i32 %left.1.i, %right.1.i br i1 %cmp.not.i, label %while.end.i, label %while.body.i, !llvm.loop !9 while.end.i: ; preds = %if.else.i, %for.body33.us %60 = phi i32 [ %6, %for.body33.us ], [ %58, %if.else.i ] %call.i = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %60) tail call void @exit(i32 noundef 1) #6 unreachable get_id.exit: ; preds = %while.body.i %arrayidx38 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %idxprom.i %61 = load i64, ptr %arrayidx38, align 8, !tbaa !13 %inc39 = add i64 %61, 1 store i64 %inc39, ptr %arrayidx38, align 8, !tbaa !13 %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1 %exitcond195.not = icmp eq i64 %indvars.iv.next192, %wide.trip.count194 br i1 %exitcond195.not, label %for.cond43.preheader, label %for.body33, !llvm.loop !23 for.body46: ; preds = %for.body46.preheader268, %for.body46 %indvars.iv196 = phi i64 [ %indvars.iv.next197, %for.body46 ], [ %indvars.iv196.ph, %for.body46.preheader268 ] %indvars.iv.next197 = add nsw i64 %indvars.iv196, -1 %idxprom47 = and i64 %indvars.iv.next197, 4294967295 %arrayidx48 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %idxprom47 %62 = load i64, ptr %arrayidx48, align 8, !tbaa !13 %sub49 = add nuw i64 %indvars.iv196, 4294967294 %idxprom50 = and i64 %sub49, 4294967295 %arrayidx51 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %idxprom50 %63 = load i64, ptr %arrayidx51, align 8, !tbaa !13 %add = add i64 %63, %62 store i64 %add, ptr %arrayidx51, align 8, !tbaa !13 %cmp44 = icmp ugt i64 %indvars.iv196, 2 br i1 %cmp44, label %for.body46, label %for.body57.preheader, !llvm.loop !24 for.body57.preheader: ; preds = %for.body46, %middle.block, %for.cond43.preheader br label %for.body57 for.body57: ; preds = %for.body57.preheader, %for.inc91 %indvars.iv205 = phi i64 [ %indvars.iv.next206, %for.inc91 ], [ 0, %for.body57.preheader ] %prev_index.0177 = phi i32 [ %prev_index.1, %for.inc91 ], [ -1, %for.body57.preheader ] %prev_count.0176 = phi i32 [ %prev_count.1, %for.inc91 ], [ 0, %for.body57.preheader ] %arrayidx59 = getelementptr inbounds [1000000 x i32], ptr @a, i64 0, i64 %indvars.iv205 %64 = load i32, ptr %arrayidx59, align 4, !tbaa !5 %cmp60 = icmp slt i32 %prev_count.0176, %64 br i1 %cmp60, label %if.then62, label %if.else if.then62: ; preds = %for.body57 %65 = load i32, ptr @zaatu_num, align 4, !tbaa !5 %cmp.not17.i126 = icmp slt i32 %65, 0 br i1 %cmp.not17.i126, label %while.end.i142, label %while.body.i127 while.body.i127: ; preds = %if.then62, %if.else.i135 %left.019.i128 = phi i32 [ %left.1.i140, %if.else.i135 ], [ 0, %if.then62 ] %right.018.i129 = phi i32 [ %right.1.i139, %if.else.i135 ], [ %65, %if.then62 ] %add.i130 = add nsw i32 %right.018.i129, %left.019.i128 %div.i131 = sdiv i32 %add.i130, 2 %idxprom.i132 = sext i32 %div.i131 to i64 %arrayidx.i133 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom.i132 %66 = load i32, ptr %arrayidx.i133, align 4, !tbaa !5 %cmp1.i134 = icmp eq i32 %66, %64 br i1 %cmp1.i134, label %for.cond67.preheader, label %if.else.i135 for.cond67.preheader: ; preds = %while.body.i127 %cmp68.not.not169 = icmp slt i32 %prev_index.0177, %div.i131 br i1 %cmp68.not.not169, label %for.body70.preheader, label %for.end85 for.body70.preheader: ; preds = %for.cond67.preheader %67 = sext i32 %prev_index.0177 to i64 br label %for.body70 if.else.i135: ; preds = %while.body.i127 %cmp4.i136 = icmp slt i32 %66, %64 %add6.i137 = add nsw i32 %div.i131, 1 %sub.i138 = add nsw i32 %div.i131, -1 %right.1.i139 = select i1 %cmp4.i136, i32 %right.018.i129, i32 %sub.i138 %left.1.i140 = select i1 %cmp4.i136, i32 %add6.i137, i32 %left.019.i128 %cmp.not.i141 = icmp sgt i32 %left.1.i140, %right.1.i139 br i1 %cmp.not.i141, label %while.end.i142, label %while.body.i127, !llvm.loop !9 while.end.i142: ; preds = %if.then62, %if.else.i135 %call.i143 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %64) tail call void @exit(i32 noundef 1) #6 unreachable for.body70: ; preds = %for.body70.preheader, %cond.end %indvars.iv199 = phi i64 [ %67, %for.body70.preheader ], [ %indvars.iv.next200, %cond.end ] %current_count.0171 = phi i64 [ 0, %for.body70.preheader ], [ %add82, %cond.end ] %indvars.iv.next200 = add nsw i64 %indvars.iv199, 1 %arrayidx72 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %indvars.iv.next200 %68 = load i32, ptr %arrayidx72, align 4, !tbaa !5 %cmp73 = icmp sgt i64 %indvars.iv199, -1 br i1 %cmp73, label %cond.true, label %cond.end cond.true: ; preds = %for.body70 %idxprom76 = and i64 %indvars.iv199, 4294967295 %arrayidx77 = getelementptr inbounds [1000000 x i32], ptr @zaatu_table, i64 0, i64 %idxprom76 %69 = load i32, ptr %arrayidx77, align 4, !tbaa !5 br label %cond.end cond.end: ; preds = %for.body70, %cond.true %cond = phi i32 [ %69, %cond.true ], [ 0, %for.body70 ] %sub78 = sub nsw i32 %68, %cond %conv79 = sext i32 %sub78 to i64 %arrayidx81 = getelementptr inbounds [1000000 x i64], ptr @isi_count, i64 0, i64 %indvars.iv.next200 %70 = load i64, ptr %arrayidx81, align 8, !tbaa !13 %mul = mul i64 %70, %conv79 %add82 = add i64 %mul, %current_count.0171 %exitcond204.not = icmp eq i64 %indvars.iv.next200, %idxprom.i132 br i1 %exitcond204.not, label %for.end85, label %for.body70, !llvm.loop !25 for.end85: ; preds = %cond.end, %for.cond67.preheader %current_count.0.lcssa = phi i64 [ 0, %for.cond67.preheader ], [ %add82, %cond.end ] %call86 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i64 noundef %current_count.0.lcssa) %71 = load i32, ptr %arrayidx59, align 4, !tbaa !5 br label %for.inc91 if.else: ; preds = %for.body57 %call89 = tail call i32 @puts(ptr noundef nonnull dereferenceable(1) @.str.3) br label %for.inc91 for.inc91: ; preds = %for.end85, %if.else %prev_count.1 = phi i32 [ %71, %for.end85 ], [ %prev_count.0176, %if.else ] %prev_index.1 = phi i32 [ %div.i131, %for.end85 ], [ %prev_index.0177, %if.else ] %indvars.iv.next206 = add nuw nsw i64 %indvars.iv205, 1 %72 = load i32, ptr @N, align 4, !tbaa !5 %73 = sext i32 %72 to i64 %cmp55 = icmp slt i64 %indvars.iv.next206, %73 br i1 %cmp55, label %for.body57, label %cleanup, !llvm.loop !26 cleanup: ; preds = %for.body, %for.inc91, %for.cond30.preheader.thread, %for.cond30.preheader, %entry %retval.0 = phi i32 [ 1, %entry ], [ 0, %for.cond30.preheader ], [ 0, %for.cond30.preheader.thread ], [ 0, %for.inc91 ], [ 1, %for.body ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i64 @llvm.umin.i64(i64, i64) #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-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 = { 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 #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #6 = { noreturn nounwind } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"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 = !{!14, !14, i64 0} !14 = !{!"long", !7, i64 0} !15 = !{!16} !16 = distinct !{!16, !17} !17 = distinct !{!17, !"LVerDomain"} !18 = !{!19} !19 = distinct !{!19, !17} !20 = distinct !{!20, !10, !21, !22} !21 = !{!"llvm.loop.isvectorized", i32 1} !22 = !{!"llvm.loop.unroll.runtime.disable"} !23 = distinct !{!23, !10} !24 = distinct !{!24, !10, !21} !25 = distinct !{!25, !10} !26 = distinct !{!26, !10}
#include <stdio.h> int main () { int n,a,b,x,y,flag=0; scanf("%d%d%d",&n,&a,&b); for(x=0;x*a<=n;x++) { if((n-a*x)%b==0) { flag=1; y=(n-a*x)/b; break; } } if(flag) printf("YES\n%d %d\n",x,y); else printf("NO\n"); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [11 x i8] c"YES\0A%d %d\0A\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %a = alloca i32, align 4 %b = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not15 = icmp slt i32 %1, 0 br i1 %cmp.not15, label %if.else, label %for.body.lr.ph for.body.lr.ph: ; preds = %entry %2 = load i32, ptr %b, align 4, !tbaa !5 br label %for.body for.body: ; preds = %for.body.lr.ph, %for.inc %mul17 = phi i32 [ 0, %for.body.lr.ph ], [ %mul, %for.inc ] %x.016 = phi i32 [ 0, %for.body.lr.ph ], [ %inc, %for.inc ] %sub = sub nsw i32 %1, %mul17 %rem = srem i32 %sub, %2 %div = sdiv i32 %sub, %2 %cmp2 = icmp eq i32 %rem, 0 br i1 %cmp2, label %if.then5, label %for.inc for.inc: ; preds = %for.body %inc = add nuw nsw i32 %x.016, 1 %mul = mul nsw i32 %0, %inc %cmp.not = icmp sgt i32 %mul, %1 br i1 %cmp.not, label %if.else, label %for.body, !llvm.loop !9 if.then5: ; preds = %for.body %call6 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %x.016, i32 noundef %div) br label %if.end8 if.else: ; preds = %for.inc, %entry %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end8 if.end8: ; preds = %if.else, %if.then5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: 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"}
/* AOJ 2424 Kakezan 2015/7/24 */ /* !!!!!!!!!!!!!!!!!!!!!fuckin implementation about detect infinite loop!!!!!!!!!!!!!!!!! */ #include<stdio.h> #define N_MAX 1000000 #define D_NUM 6 int powered_ten(int n) { int i, powered = 1; for(i = 0; i < n; i++) { powered = powered * 10; } return powered; } int decompose(int num) { int i, quotient = 0, remainder = 0, powered = 0, max = -1; for(i = 6; i >= 1; i--) { powered = powered_ten(i); quotient = num / powered; remainder = num % powered; if(max < quotient * remainder) { max = quotient * remainder; } } return max; } int ans_f(int num) { int decomposed_nums[D_NUM], max = 0, cnt = 0; while(1) { if(num / 10 == 0) { break; } num = decompose(num); if(cnt > N_MAX) { return -1; } cnt++; } return cnt; } int main(void) { int n[100], q, i, ans; scanf("%d", &q); for(i = 0; i < q; i++) { scanf("%d", &n[i]); ans = ans_f(n[i]); printf("%d\n", ans); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198883/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198883/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree norecurse nosync nounwind memory(none) uwtable define dso_local i32 @powered_ten(i32 noundef %n) local_unnamed_addr #0 { entry: %cmp3 = icmp sgt i32 %n, 0 br i1 %cmp3, label %for.body.preheader, label %for.end for.body.preheader: ; preds = %entry %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader7, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i32 %n, -8 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, <i32 10, i32 10, i32 10, i32 10> %1 = mul <4 x i32> %vec.phi6, <i32 10, i32 10, i32 10, i32 10> %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 !5 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, %n br i1 %cmp.n, label %for.end, label %for.body.preheader7 for.body.preheader7: ; preds = %for.body.preheader, %middle.block %powered.05.ph = phi i32 [ 1, %for.body.preheader ], [ %3, %middle.block ] %i.04.ph = phi i32 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader7, %for.body %powered.05 = phi i32 [ %mul, %for.body ], [ %powered.05.ph, %for.body.preheader7 ] %i.04 = phi i32 [ %inc, %for.body ], [ %i.04.ph, %for.body.preheader7 ] %mul = mul nsw i32 %powered.05, 10 %inc = add nuw nsw i32 %i.04, 1 %exitcond.not = icmp eq i32 %inc, %n br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !9 for.end: ; preds = %for.body, %middle.block, %entry %powered.0.lcssa = phi i32 [ 1, %entry ], [ %3, %middle.block ], [ %mul, %for.body ] ret i32 %powered.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: mustprogress nofree nosync nounwind willreturn memory(none) uwtable define dso_local i32 @decompose(i32 noundef %num) local_unnamed_addr #2 { entry: %div = sdiv i32 %num, 1000000 %rem = srem i32 %num, 1000000 %mul = mul nsw i32 %rem, %div %div.1 = sdiv i32 %num, 100000 %rem.1 = srem i32 %num, 100000 %mul.1 = mul nsw i32 %rem.1, %div.1 %spec.select = tail call i32 @llvm.smax.i32(i32 %mul, i32 %mul.1) %div.2 = sdiv i32 %num, 10000 %rem.2 = srem i32 %num, 10000 %mul.2 = mul nsw i32 %rem.2, %div.2 %spec.select.1 = tail call i32 @llvm.smax.i32(i32 %spec.select, i32 %mul.2) %div.3 = sdiv i32 %num, 1000 %rem.3 = srem i32 %num, 1000 %mul.3 = mul nsw i32 %rem.3, %div.3 %spec.select.2 = tail call i32 @llvm.smax.i32(i32 %spec.select.1, i32 %mul.3) %div.4 = sdiv i32 %num, 100 %rem.4 = srem i32 %num, 100 %mul.4 = mul nsw i32 %rem.4, %div.4 %spec.select.3 = tail call i32 @llvm.smax.i32(i32 %spec.select.2, i32 %mul.4) %div.5 = sdiv i32 %num, 10 %rem.5 = srem i32 %num, 10 %mul.5 = mul nsw i32 %rem.5, %div.5 %spec.select.4 = tail call i32 @llvm.smax.i32(i32 %spec.select.3, i32 %mul.5) %spec.select.5 = tail call i32 @llvm.smax.i32(i32 %spec.select.4, i32 -1) ret i32 %spec.select.5 } ; Function Attrs: nofree nosync nounwind memory(none) uwtable define dso_local i32 @ans_f(i32 noundef %num) local_unnamed_addr #3 { entry: %num.addr.0.off9 = add i32 %num, 9 %cmp10 = icmp ult i32 %num.addr.0.off9, 19 br i1 %cmp10, label %cleanup, label %if.end if.end: ; preds = %entry, %if.end3 %cnt.012 = phi i32 [ %inc, %if.end3 ], [ 0, %entry ] %num.addr.011 = phi i32 [ %spec.select.5.i, %if.end3 ], [ %num, %entry ] %exitcond = icmp eq i32 %cnt.012, 1000001 br i1 %exitcond, label %cleanup, label %if.end3 if.end3: ; preds = %if.end %rem.i = srem i32 %num.addr.011, 1000000 %div.i = sdiv i32 %num.addr.011, 1000000 %mul.i = mul nsw i32 %rem.i, %div.i %rem.1.i = srem i32 %num.addr.011, 100000 %div.1.i = sdiv i32 %num.addr.011, 100000 %mul.1.i = mul nsw i32 %rem.1.i, %div.1.i %spec.select.i = tail call i32 @llvm.smax.i32(i32 %mul.i, i32 %mul.1.i) %rem.2.i = srem i32 %num.addr.011, 10000 %div.2.i = sdiv i32 %num.addr.011, 10000 %mul.2.i = mul nsw i32 %rem.2.i, %div.2.i %spec.select.1.i = tail call i32 @llvm.smax.i32(i32 %spec.select.i, i32 %mul.2.i) %rem.3.i = srem i32 %num.addr.011, 1000 %div.3.i = sdiv i32 %num.addr.011, 1000 %mul.3.i = mul nsw i32 %rem.3.i, %div.3.i %spec.select.2.i = tail call i32 @llvm.smax.i32(i32 %spec.select.1.i, i32 %mul.3.i) %rem.4.i = srem i32 %num.addr.011, 100 %div.4.i = sdiv i32 %num.addr.011, 100 %mul.4.i = mul nsw i32 %rem.4.i, %div.4.i %spec.select.3.i = tail call i32 @llvm.smax.i32(i32 %spec.select.2.i, i32 %mul.4.i) %rem.5.i = srem i32 %num.addr.011, 10 %div.5.i = sdiv i32 %num.addr.011, 10 %mul.5.i = mul nsw i32 %rem.5.i, %div.5.i %spec.select.4.i = tail call i32 @llvm.smax.i32(i32 %spec.select.3.i, i32 %mul.5.i) %spec.select.5.i = tail call i32 @llvm.smax.i32(i32 %spec.select.4.i, i32 -1) %inc = add nuw nsw i32 %cnt.012, 1 %num.addr.0.off = add nsw i32 %spec.select.5.i, 9 %cmp = icmp ult i32 %num.addr.0.off, 19 br i1 %cmp, label %cleanup, label %if.end cleanup: ; preds = %if.end, %if.end3, %entry %retval.0 = phi i32 [ 0, %entry ], [ %inc, %if.end3 ], [ -1, %if.end ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #4 { entry: %n = alloca [100 x i32], align 16 %q = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %n) #7 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %q) #7 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %q) %0 = load i32, ptr %q, align 4, !tbaa !10 %cmp9 = icmp sgt i32 %0, 0 br i1 %cmp9, label %for.body, label %for.end for.body: ; preds = %entry, %ans_f.exit %indvars.iv = phi i64 [ %indvars.iv.next, %ans_f.exit ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100 x i32], ptr %n, i64 0, i64 %indvars.iv %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %1 = load i32, ptr %arrayidx, align 4, !tbaa !10 %num.addr.0.off9.i = add i32 %1, 9 %cmp10.i = icmp ult i32 %num.addr.0.off9.i, 19 br i1 %cmp10.i, label %ans_f.exit, label %if.end.i if.end.i: ; preds = %for.body, %if.end3.i %cnt.012.i = phi i32 [ %inc.i, %if.end3.i ], [ 0, %for.body ] %num.addr.011.i = phi i32 [ %spec.select.5.i.i, %if.end3.i ], [ %1, %for.body ] %exitcond.i = icmp eq i32 %cnt.012.i, 1000001 br i1 %exitcond.i, label %ans_f.exit, label %if.end3.i if.end3.i: ; preds = %if.end.i %rem.i.i = srem i32 %num.addr.011.i, 1000000 %div.i.i = sdiv i32 %num.addr.011.i, 1000000 %mul.i.i = mul nsw i32 %rem.i.i, %div.i.i %rem.1.i.i = srem i32 %num.addr.011.i, 100000 %div.1.i.i = sdiv i32 %num.addr.011.i, 100000 %mul.1.i.i = mul nsw i32 %rem.1.i.i, %div.1.i.i %spec.select.i.i = call i32 @llvm.smax.i32(i32 %mul.i.i, i32 %mul.1.i.i) %rem.2.i.i = srem i32 %num.addr.011.i, 10000 %div.2.i.i = sdiv i32 %num.addr.011.i, 10000 %mul.2.i.i = mul nsw i32 %rem.2.i.i, %div.2.i.i %spec.select.1.i.i = call i32 @llvm.smax.i32(i32 %spec.select.i.i, i32 %mul.2.i.i) %rem.3.i.i = srem i32 %num.addr.011.i, 1000 %div.3.i.i = sdiv i32 %num.addr.011.i, 1000 %mul.3.i.i = mul nsw i32 %rem.3.i.i, %div.3.i.i %spec.select.2.i.i = call i32 @llvm.smax.i32(i32 %spec.select.1.i.i, i32 %mul.3.i.i) %rem.4.i.i = srem i32 %num.addr.011.i, 100 %div.4.i.i = sdiv i32 %num.addr.011.i, 100 %mul.4.i.i = mul nsw i32 %rem.4.i.i, %div.4.i.i %spec.select.3.i.i = call i32 @llvm.smax.i32(i32 %spec.select.2.i.i, i32 %mul.4.i.i) %rem.5.i.i = srem i32 %num.addr.011.i, 10 %div.5.i.i = sdiv i32 %num.addr.011.i, 10 %mul.5.i.i = mul nsw i32 %rem.5.i.i, %div.5.i.i %spec.select.4.i.i = call i32 @llvm.smax.i32(i32 %spec.select.3.i.i, i32 %mul.5.i.i) %spec.select.5.i.i = call i32 @llvm.smax.i32(i32 %spec.select.4.i.i, i32 -1) %inc.i = add nuw nsw i32 %cnt.012.i, 1 %num.addr.0.off.i = add nsw i32 %spec.select.5.i.i, 9 %cmp.i = icmp ult i32 %num.addr.0.off.i, 19 br i1 %cmp.i, label %ans_f.exit, label %if.end.i ans_f.exit: ; preds = %if.end.i, %if.end3.i, %for.body %retval.0.i = phi i32 [ 0, %for.body ], [ -1, %if.end.i ], [ %inc.i, %if.end3.i ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %retval.0.i) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i32, ptr %q, align 4, !tbaa !10 %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 !14 for.end: ; preds = %ans_f.exit, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %q) #7 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %n) #7 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #5 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #6 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.vector.reduce.mul.v4i32(<4 x i32>) #6 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 = { 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 #3 = { 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 #4 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #7 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = distinct !{!5, !6, !7, !8} !6 = !{!"llvm.loop.mustprogress"} !7 = !{!"llvm.loop.isvectorized", i32 1} !8 = !{!"llvm.loop.unroll.runtime.disable"} !9 = distinct !{!9, !6, !8, !7} !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}
#include <stdio.h> #include <limits.h> int a[2005]; int b[2005]; long long c[2005]; long long d[1005]; int fn[1005]; int main(){ int n,m,i,j; scanf("%d %d",&n,&m); for(i=0;i<m;i++){ scanf("%d %d %lld",&a[i],&b[i],&c[i]); a[i]--; b[i]--; c[i]=-c[i]; } for(i=0;i<n;i++){ d[i]=LLONG_MAX; } d[0]=0ll; for(i=0;i<n-1;i++){ for(j=0;j<m;j++){ if(d[a[j]]==LLONG_MAX) continue; if(d[b[j]]>d[a[j]]+c[j]) d[b[j]]=d[a[j]]+c[j]; } } long long ans=d[n-1]; for(i=0;i<n;i++){ for(j=0;j<m;j++){ if(d[a[j]]==LLONG_MAX) continue; if(d[b[j]]>d[a[j]]+c[j]){ d[b[j]]=d[a[j]]+c[j]; fn[b[j]]=1; } if(fn[a[j]]==1) fn[b[j]]=1; } } if(fn[n-1]==1) printf("inf\n"); else printf("%lld\n",-ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_198926/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_198926/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [11 x i8] c"%d %d %lld\00", align 1 @a = dso_local global [2005 x i32] zeroinitializer, align 16 @b = dso_local global [2005 x i32] zeroinitializer, align 16 @c = dso_local global [2005 x i64] zeroinitializer, align 16 @d = dso_local local_unnamed_addr global [1005 x i64] zeroinitializer, align 16 @fn = dso_local local_unnamed_addr global [1005 x i32] zeroinitializer, align 16 @.str.3 = private unnamed_addr constant [6 x i8] c"%lld\0A\00", align 1 @str = private unnamed_addr constant [4 x i8] c"inf\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 %cmp174 = icmp sgt i32 %0, 0 br i1 %cmp174, label %for.body, label %for.cond15.preheader for.cond15.preheader: ; preds = %for.body, %entry %.lcssa173 = phi i32 [ %0, %entry ], [ %8, %for.body ] %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp16176 = icmp sgt i32 %1, 0 br i1 %cmp16176, label %for.body17.preheader, label %for.end64.thread214 for.end64.thread214: ; preds = %for.cond15.preheader store i64 0, ptr @d, align 16, !tbaa !9 %sub24206 = add i32 %1, -1 %idxprom66216 = sext i32 %sub24206 to i64 br label %for.end126.sink.split for.body17.preheader: ; preds = %for.cond15.preheader %wide.trip.count = zext i32 %1 to i64 %min.iters.check = icmp ult i32 %1, 4 br i1 %min.iters.check, label %for.body17.preheader221, label %vector.ph vector.ph: ; preds = %for.body17.preheader %n.vec = and i64 %wide.trip.count, 4294967292 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %2 = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %index store <2 x i64> <i64 9223372036854775807, i64 9223372036854775807>, ptr %2, align 16, !tbaa !9 %3 = getelementptr inbounds i64, ptr %2, i64 2 store <2 x i64> <i64 9223372036854775807, i64 9223372036854775807>, ptr %3, align 16, !tbaa !9 %index.next = add nuw i64 %index, 4 %4 = icmp eq i64 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !11 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end22, label %for.body17.preheader221 for.body17.preheader221: ; preds = %for.body17.preheader, %middle.block %indvars.iv191.ph = phi i64 [ 0, %for.body17.preheader ], [ %n.vec, %middle.block ] br label %for.body17 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [2005 x i32], ptr @a, i64 0, i64 %indvars.iv %arrayidx2 = getelementptr inbounds [2005 x i32], ptr @b, i64 0, i64 %indvars.iv %arrayidx4 = getelementptr inbounds [2005 x i64], ptr @c, i64 0, i64 %indvars.iv %call5 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx, ptr noundef nonnull %arrayidx2, ptr noundef nonnull %arrayidx4) %5 = load i32, ptr %arrayidx, align 4, !tbaa !5 %dec = add nsw i32 %5, -1 store i32 %dec, ptr %arrayidx, align 4, !tbaa !5 %6 = load i32, ptr %arrayidx2, align 4, !tbaa !5 %dec10 = add nsw i32 %6, -1 store i32 %dec10, ptr %arrayidx2, align 4, !tbaa !5 %7 = load i64, ptr %arrayidx4, align 8, !tbaa !9 %sub = sub nsw i64 0, %7 store i64 %sub, ptr %arrayidx4, align 8, !tbaa !9 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %8 = load i32, ptr %m, align 4, !tbaa !5 %9 = sext i32 %8 to i64 %cmp = icmp slt i64 %indvars.iv.next, %9 br i1 %cmp, label %for.body, label %for.cond15.preheader, !llvm.loop !15 for.body17: ; preds = %for.body17.preheader221, %for.body17 %indvars.iv191 = phi i64 [ %indvars.iv.next192, %for.body17 ], [ %indvars.iv191.ph, %for.body17.preheader221 ] %arrayidx19 = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %indvars.iv191 store i64 9223372036854775807, ptr %arrayidx19, align 8, !tbaa !9 %indvars.iv.next192 = add nuw nsw i64 %indvars.iv191, 1 %exitcond.not = icmp eq i64 %indvars.iv.next192, %wide.trip.count br i1 %exitcond.not, label %for.end22, label %for.body17, !llvm.loop !16 for.end22: ; preds = %for.body17, %middle.block store i64 0, ptr @d, align 16, !tbaa !9 %sub24 = add i32 %1, -1 %cmp25181 = icmp sgt i32 %1, 1 br i1 %cmp25181, label %for.cond27.preheader.lr.ph, label %for.end64 for.cond27.preheader.lr.ph: ; preds = %for.end22 %cmp28179 = icmp sgt i32 %.lcssa173, 0 br i1 %cmp28179, label %for.cond27.preheader.us.preheader, label %for.cond71.preheader.lr.ph.thread for.cond71.preheader.lr.ph.thread: ; preds = %for.cond27.preheader.lr.ph %idxprom66210 = zext i32 %sub24 to i64 br label %for.end126.sink.split for.cond27.preheader.us.preheader: ; preds = %for.cond27.preheader.lr.ph %wide.trip.count197 = zext i32 %.lcssa173 to i64 br label %for.cond27.preheader.us for.cond27.preheader.us: ; preds = %for.cond27.preheader.us.preheader, %for.cond27.for.inc62_crit_edge.us %i.2182.us = phi i32 [ %inc63.us, %for.cond27.for.inc62_crit_edge.us ], [ 0, %for.cond27.preheader.us.preheader ] br label %for.body29.us for.body29.us: ; preds = %for.cond27.preheader.us, %for.inc59.us %indvars.iv194 = phi i64 [ 0, %for.cond27.preheader.us ], [ %indvars.iv.next195, %for.inc59.us ] %arrayidx31.us = getelementptr inbounds [2005 x i32], ptr @a, i64 0, i64 %indvars.iv194 %10 = load i32, ptr %arrayidx31.us, align 4, !tbaa !5 %idxprom32.us = sext i32 %10 to i64 %arrayidx33.us = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom32.us %11 = load i64, ptr %arrayidx33.us, align 8, !tbaa !9 %cmp34.us = icmp eq i64 %11, 9223372036854775807 br i1 %cmp34.us, label %for.inc59.us, label %if.end.us if.end.us: ; preds = %for.body29.us %arrayidx36.us = getelementptr inbounds [2005 x i32], ptr @b, i64 0, i64 %indvars.iv194 %12 = load i32, ptr %arrayidx36.us, align 4, !tbaa !5 %idxprom37.us = sext i32 %12 to i64 %arrayidx38.us = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom37.us %13 = load i64, ptr %arrayidx38.us, align 8, !tbaa !9 %arrayidx44.us = getelementptr inbounds [2005 x i64], ptr @c, i64 0, i64 %indvars.iv194 %14 = load i64, ptr %arrayidx44.us, align 8, !tbaa !9 %add.us = add nsw i64 %14, %11 %cmp45.us = icmp sgt i64 %13, %add.us br i1 %cmp45.us, label %if.then46.us, label %for.inc59.us if.then46.us: ; preds = %if.end.us store i64 %add.us, ptr %arrayidx38.us, align 8, !tbaa !9 br label %for.inc59.us for.inc59.us: ; preds = %if.then46.us, %if.end.us, %for.body29.us %indvars.iv.next195 = add nuw nsw i64 %indvars.iv194, 1 %exitcond198.not = icmp eq i64 %indvars.iv.next195, %wide.trip.count197 br i1 %exitcond198.not, label %for.cond27.for.inc62_crit_edge.us, label %for.body29.us, !llvm.loop !17 for.cond27.for.inc62_crit_edge.us: ; preds = %for.inc59.us %inc63.us = add nuw nsw i32 %i.2182.us, 1 %exitcond199.not = icmp eq i32 %inc63.us, %sub24 br i1 %exitcond199.not, label %for.end64, label %for.cond27.preheader.us, !llvm.loop !18 for.end64: ; preds = %for.cond27.for.inc62_crit_edge.us, %for.end22 %idxprom66 = sext i32 %sub24 to i64 %arrayidx67 = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom66 %15 = load i64, ptr %arrayidx67, align 8, !tbaa !9 %cmp72184 = icmp sgt i32 %.lcssa173, 0 %or.cond = and i1 %cmp16176, %cmp72184 br i1 %or.cond, label %for.cond71.preheader.us.preheader, label %for.end126 for.cond71.preheader.us.preheader: ; preds = %for.end64 %wide.trip.count203 = zext i32 %.lcssa173 to i64 br label %for.cond71.preheader.us for.cond71.preheader.us: ; preds = %for.cond71.preheader.us.preheader, %for.cond71.for.inc124_crit_edge.us %i.3187.us = phi i32 [ %inc125.us, %for.cond71.for.inc124_crit_edge.us ], [ 0, %for.cond71.preheader.us.preheader ] br label %for.body73.us for.body73.us: ; preds = %for.cond71.preheader.us, %for.inc121.us %indvars.iv200 = phi i64 [ 0, %for.cond71.preheader.us ], [ %indvars.iv.next201, %for.inc121.us ] %arrayidx75.us = getelementptr inbounds [2005 x i32], ptr @a, i64 0, i64 %indvars.iv200 %16 = load i32, ptr %arrayidx75.us, align 4, !tbaa !5 %idxprom76.us = sext i32 %16 to i64 %arrayidx77.us = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom76.us %17 = load i64, ptr %arrayidx77.us, align 8, !tbaa !9 %cmp78.us = icmp eq i64 %17, 9223372036854775807 br i1 %cmp78.us, label %for.inc121.us, label %if.end80.us if.end80.us: ; preds = %for.body73.us %arrayidx82.us = getelementptr inbounds [2005 x i32], ptr @b, i64 0, i64 %indvars.iv200 %18 = load i32, ptr %arrayidx82.us, align 4, !tbaa !5 %idxprom83.us = sext i32 %18 to i64 %arrayidx84.us = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom83.us %19 = load i64, ptr %arrayidx84.us, align 8, !tbaa !9 %arrayidx90.us = getelementptr inbounds [2005 x i64], ptr @c, i64 0, i64 %indvars.iv200 %20 = load i64, ptr %arrayidx90.us, align 8, !tbaa !9 %add91.us = add nsw i64 %20, %17 %cmp92.us = icmp sgt i64 %19, %add91.us br i1 %cmp92.us, label %if.then93.us, label %if.end109.us if.then93.us: ; preds = %if.end80.us store i64 %add91.us, ptr %arrayidx84.us, align 8, !tbaa !9 %arrayidx108.us = getelementptr inbounds [1005 x i32], ptr @fn, i64 0, i64 %idxprom83.us store i32 1, ptr %arrayidx108.us, align 4, !tbaa !5 br label %if.end109.us if.end109.us: ; preds = %if.then93.us, %if.end80.us %arrayidx113.us = getelementptr inbounds [1005 x i32], ptr @fn, i64 0, i64 %idxprom76.us %21 = load i32, ptr %arrayidx113.us, align 4, !tbaa !5 %cmp114.us = icmp eq i32 %21, 1 br i1 %cmp114.us, label %if.then115.us, label %for.inc121.us if.then115.us: ; preds = %if.end109.us %arrayidx119.us = getelementptr inbounds [1005 x i32], ptr @fn, i64 0, i64 %idxprom83.us store i32 1, ptr %arrayidx119.us, align 4, !tbaa !5 br label %for.inc121.us for.inc121.us: ; preds = %if.then115.us, %if.end109.us, %for.body73.us %indvars.iv.next201 = add nuw nsw i64 %indvars.iv200, 1 %exitcond204.not = icmp eq i64 %indvars.iv.next201, %wide.trip.count203 br i1 %exitcond204.not, label %for.cond71.for.inc124_crit_edge.us, label %for.body73.us, !llvm.loop !19 for.cond71.for.inc124_crit_edge.us: ; preds = %for.inc121.us %inc125.us = add nuw nsw i32 %i.3187.us, 1 %exitcond205.not = icmp eq i32 %inc125.us, %1 br i1 %exitcond205.not, label %for.end126, label %for.cond71.preheader.us, !llvm.loop !20 for.end126.sink.split: ; preds = %for.end64.thread214, %for.cond71.preheader.lr.ph.thread %idxprom66210.sink = phi i64 [ %idxprom66210, %for.cond71.preheader.lr.ph.thread ], [ %idxprom66216, %for.end64.thread214 ] %arrayidx67211 = getelementptr inbounds [1005 x i64], ptr @d, i64 0, i64 %idxprom66210.sink %22 = load i64, ptr %arrayidx67211, align 8, !tbaa !9 br label %for.end126 for.end126: ; preds = %for.cond71.for.inc124_crit_edge.us, %for.end126.sink.split, %for.end64 %23 = phi i64 [ %15, %for.end64 ], [ %22, %for.end126.sink.split ], [ %15, %for.cond71.for.inc124_crit_edge.us ] %idxprom66212 = phi i64 [ %idxprom66, %for.end64 ], [ %idxprom66210.sink, %for.end126.sink.split ], [ %idxprom66, %for.cond71.for.inc124_crit_edge.us ] %arrayidx129 = getelementptr inbounds [1005 x i32], ptr @fn, i64 0, i64 %idxprom66212 %24 = load i32, ptr %arrayidx129, align 4, !tbaa !5 %cmp130 = icmp eq i32 %24, 1 br i1 %cmp130, label %if.then131, label %if.else if.then131: ; preds = %for.end126 %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end135 if.else: ; preds = %for.end126 %sub133 = sub nsw i64 0, %23 %call134 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i64 noundef %sub133) br label %if.end135 if.end135: ; preds = %if.else, %if.then131 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 = !{!10, !10, i64 0} !10 = !{!"long long", !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} !17 = distinct !{!17, !12} !18 = distinct !{!18, !12} !19 = distinct !{!19, !12} !20 = distinct !{!20, !12}
# include <stdio.h> int main() { int a, b, n; scanf("%d %d %d", &n, &a, &b); int ax=-a, by=0; while((ax+=a) <= n) { if((n - ax)%b==0) { by=n-ax; break; } } if(ax>n) printf("NO\n"); else printf("YES\n%d %d", ax/a, by/b); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19897/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19897/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [10 x i8] c"YES\0A%d %d\00", align 1 @str = private unnamed_addr constant [3 x i8] c"NO\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %a, ptr noundef nonnull %b) %0 = load i32, ptr %a, align 4, !tbaa !5 %sub = sub nsw i32 0, %0 %1 = load i32, ptr %n, align 4, !tbaa !5 %2 = load i32, ptr %b, align 4 br label %while.cond while.cond: ; preds = %while.body, %entry %ax.0 = phi i32 [ %sub, %entry ], [ %add, %while.body ] %add = add nsw i32 %ax.0, %0 %cmp.not = icmp sgt i32 %add, %1 br i1 %cmp.not, label %if.then5, label %while.body while.body: ; preds = %while.cond %sub1 = sub nsw i32 %1, %add %rem = srem i32 %sub1, %2 %div7 = sdiv i32 %sub1, %2 %cmp2 = icmp eq i32 %rem, 0 br i1 %cmp2, label %if.else, label %while.cond, !llvm.loop !9 if.then5: ; preds = %while.cond %puts = call i32 @puts(ptr nonnull dereferenceable(1) @str) br label %if.end9 if.else: ; preds = %while.body %div = sdiv i32 %add, %0 %call8 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %div, i32 noundef %div7) br label %if.end9 if.end9: ; preds = %if.else, %if.then5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: 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> #define N 100 #define INF 100000 #define WHITE 1 #define BLACK 0 int main(){ int d[N], color[N], w[N][N]; int i, j, v; int n, u; int mincost; int count = 0; scanf("%d",&n); for(i = 0; i < n; i++){ for(j = 0; j < n; j++){ scanf("%d",&w[i][j]); } } for(i = 0; i < n; i++){ d[i] = INF; color[i] = WHITE; } d[0] = 0; while(1){ mincost = INF; for(i = 0; i < n; i++){ if(d[i] < mincost && color[i] ==WHITE){ mincost = d[i]; u = i; } } if(mincost == INF)break; color[u] = BLACK; count += mincost; for(v = 0; v < n; v++){ if(w[u][v] == -1) continue; if(d[v] > w[u][v]) d[v] = w[u][v]; } } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199062/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199062/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %d = alloca [100 x i32], align 16 %color = alloca [100 x i32], align 16 %w = alloca [100 x [100 x i32]], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d) #4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color) #4 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %w) #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 %cmp99 = icmp sgt i32 %0, 0 br i1 %cmp99, label %for.cond1.preheader, label %for.cond10.preheader for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %9, %for.inc7 ], [ %0, %entry ] %indvars.iv151 = phi i64 [ %indvars.iv.next152, %for.inc7 ], [ 0, %entry ] %cmp297 = icmp sgt i32 %1, 0 br i1 %cmp297, label %for.body3, label %for.cond1.preheader.for.inc7_crit_edge for.cond1.preheader.for.inc7_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc7 for.cond10.preheader: ; preds = %for.inc7, %entry %.lcssa = phi i32 [ %0, %entry ], [ %9, %for.inc7 ] %.lcssa.fr = freeze i32 %.lcssa %cmp11101 = icmp sgt i32 %.lcssa.fr, 0 br i1 %cmp11101, label %for.body12.preheader, label %while.end for.body12.preheader: ; preds = %for.cond10.preheader %wide.trip.count = zext i32 %.lcssa.fr to i64 %min.iters.check = icmp ult i32 %.lcssa.fr, 8 br i1 %min.iters.check, label %for.body12.preheader178, label %vector.ph vector.ph: ; preds = %for.body12.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 ] %2 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %index store <4 x i32> <i32 100000, i32 100000, i32 100000, i32 100000>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 store <4 x i32> <i32 100000, i32 100000, i32 100000, i32 100000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %index store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %4, align 16, !tbaa !5 %5 = getelementptr inbounds i32, ptr %4, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %5, align 16, !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 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end19, label %for.body12.preheader178 for.body12.preheader178: ; preds = %for.body12.preheader, %middle.block %indvars.iv154.ph = phi i64 [ 0, %for.body12.preheader ], [ %n.vec, %middle.block ] br label %for.body12 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], ptr %w, i64 0, i64 %indvars.iv151, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %7 = load i32, ptr %n, align 4, !tbaa !5 %8 = sext i32 %7 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %8 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !13 for.inc7: ; preds = %for.body3, %for.cond1.preheader.for.inc7_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc7_crit_edge ], [ %8, %for.body3 ] %9 = phi i32 [ %1, %for.cond1.preheader.for.inc7_crit_edge ], [ %7, %for.body3 ] %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1 %cmp = icmp slt i64 %indvars.iv.next152, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !14 for.body12: ; preds = %for.body12.preheader178, %for.body12 %indvars.iv154 = phi i64 [ %indvars.iv.next155, %for.body12 ], [ %indvars.iv154.ph, %for.body12.preheader178 ] %arrayidx14 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv154 store i32 100000, ptr %arrayidx14, align 4, !tbaa !5 %arrayidx16 = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv154 store i32 1, ptr %arrayidx16, align 4, !tbaa !5 %indvars.iv.next155 = add nuw nsw i64 %indvars.iv154, 1 %exitcond.not = icmp eq i64 %indvars.iv.next155, %wide.trip.count br i1 %exitcond.not, label %for.end19, label %for.body12, !llvm.loop !16 for.end19: ; preds = %for.body12, %middle.block store i32 0, ptr %d, align 16, !tbaa !5 br i1 %cmp11101, label %while.cond.us.preheader, label %while.end while.cond.us.preheader: ; preds = %for.end19 %10 = add nsw i64 %wide.trip.count, -1 %xtraiter = and i64 %wide.trip.count, 1 %11 = icmp eq i64 %10, 0 %unroll_iter = and i64 %wide.trip.count, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 %xtraiter184 = and i64 %wide.trip.count, 1 %12 = icmp eq i64 %10, 0 %unroll_iter186 = and i64 %wide.trip.count, 4294967294 %lcmp.mod185.not = icmp eq i64 %xtraiter184, 0 br label %for.body23.us.preheader while.cond.us.loopexit.unr-lcssa: ; preds = %for.inc65.us.1, %if.end37.us %indvars.iv167.unr = phi i64 [ 0, %if.end37.us ], [ %indvars.iv.next168.1, %for.inc65.us.1 ] br i1 %lcmp.mod185.not, label %while.cond.us.loopexit, label %for.body42.us.epil for.body42.us.epil: ; preds = %while.cond.us.loopexit.unr-lcssa %arrayidx46.us.epil = getelementptr inbounds [100 x [100 x i32]], ptr %w, i64 0, i64 %idxprom38.us, i64 %indvars.iv167.unr %13 = load i32, ptr %arrayidx46.us.epil, align 4, !tbaa !5 %cmp47.us.epil = icmp eq i32 %13, -1 br i1 %cmp47.us.epil, label %while.cond.us.loopexit, label %if.end49.us.epil if.end49.us.epil: ; preds = %for.body42.us.epil %arrayidx51.us.epil = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv167.unr %14 = load i32, ptr %arrayidx51.us.epil, align 4, !tbaa !5 %spec.store.select.us.epil = call i32 @llvm.smin.i32(i32 %14, i32 %13) store i32 %spec.store.select.us.epil, ptr %arrayidx51.us.epil, align 4 br label %while.cond.us.loopexit while.cond.us.loopexit: ; preds = %for.body42.us.epil, %if.end49.us.epil, %while.cond.us.loopexit.unr-lcssa %add.us = add nsw i32 %mincost.1.us.lcssa, %count.0.us br label %for.body23.us.preheader, !llvm.loop !17 for.body23.us.preheader: ; preds = %while.cond.us.loopexit, %while.cond.us.preheader %u.0.us = phi i32 [ %u.2.us.lcssa, %while.cond.us.loopexit ], [ undef, %while.cond.us.preheader ] %count.0.us = phi i32 [ %add.us, %while.cond.us.loopexit ], [ 0, %while.cond.us.preheader ] br i1 %11, label %for.end34.us.unr-lcssa, label %for.body23.us for.end34.us.unr-lcssa: ; preds = %for.inc32.us.1, %for.body23.us.preheader %u.2.us.lcssa.ph = phi i32 [ undef, %for.body23.us.preheader ], [ %u.2.us.1, %for.inc32.us.1 ] %mincost.1.us.lcssa.ph = phi i32 [ undef, %for.body23.us.preheader ], [ %mincost.1.us.1, %for.inc32.us.1 ] %indvars.iv162.unr = phi i64 [ 0, %for.body23.us.preheader ], [ %indvars.iv.next163.1, %for.inc32.us.1 ] %mincost.0106.us.unr = phi i32 [ 100000, %for.body23.us.preheader ], [ %mincost.1.us.1, %for.inc32.us.1 ] %u.1105.us.unr = phi i32 [ %u.0.us, %for.body23.us.preheader ], [ %u.2.us.1, %for.inc32.us.1 ] br i1 %lcmp.mod.not, label %for.end34.us, label %for.body23.us.epil for.body23.us.epil: ; preds = %for.end34.us.unr-lcssa %arrayidx25.us.epil = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv162.unr %15 = load i32, ptr %arrayidx25.us.epil, align 4, !tbaa !5 %cmp26.us.epil = icmp slt i32 %15, %mincost.0106.us.unr br i1 %cmp26.us.epil, label %land.lhs.true.us.epil, label %for.end34.us land.lhs.true.us.epil: ; preds = %for.body23.us.epil %arrayidx28.us.epil = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv162.unr %16 = load i32, ptr %arrayidx28.us.epil, align 4, !tbaa !5 %cmp29.us.epil = icmp eq i32 %16, 1 %17 = trunc i64 %indvars.iv162.unr to i32 %spec.select.us.epil = select i1 %cmp29.us.epil, i32 %17, i32 %u.1105.us.unr %spec.select96.us.epil = select i1 %cmp29.us.epil, i32 %15, i32 %mincost.0106.us.unr br label %for.end34.us for.end34.us: ; preds = %for.body23.us.epil, %land.lhs.true.us.epil, %for.end34.us.unr-lcssa %u.2.us.lcssa = phi i32 [ %u.2.us.lcssa.ph, %for.end34.us.unr-lcssa ], [ %u.1105.us.unr, %for.body23.us.epil ], [ %spec.select.us.epil, %land.lhs.true.us.epil ] %mincost.1.us.lcssa = phi i32 [ %mincost.1.us.lcssa.ph, %for.end34.us.unr-lcssa ], [ %mincost.0106.us.unr, %for.body23.us.epil ], [ %spec.select96.us.epil, %land.lhs.true.us.epil ] %cmp35.us = icmp eq i32 %mincost.1.us.lcssa, 100000 br i1 %cmp35.us, label %while.end, label %if.end37.us if.end37.us: ; preds = %for.end34.us %idxprom38.us = sext i32 %u.2.us.lcssa to i64 %arrayidx39.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %idxprom38.us store i32 0, ptr %arrayidx39.us, align 4, !tbaa !5 br i1 %12, label %while.cond.us.loopexit.unr-lcssa, label %for.body42.us for.body42.us: ; preds = %if.end37.us, %for.inc65.us.1 %indvars.iv167 = phi i64 [ %indvars.iv.next168.1, %for.inc65.us.1 ], [ 0, %if.end37.us ] %niter187 = phi i64 [ %niter187.next.1, %for.inc65.us.1 ], [ 0, %if.end37.us ] %arrayidx46.us = getelementptr inbounds [100 x [100 x i32]], ptr %w, i64 0, i64 %idxprom38.us, i64 %indvars.iv167 %18 = load i32, ptr %arrayidx46.us, align 8, !tbaa !5 %cmp47.us = icmp eq i32 %18, -1 br i1 %cmp47.us, label %for.inc65.us, label %if.end49.us if.end49.us: ; preds = %for.body42.us %arrayidx51.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv167 %19 = load i32, ptr %arrayidx51.us, align 8, !tbaa !5 %spec.store.select.us = call i32 @llvm.smin.i32(i32 %19, i32 %18) store i32 %spec.store.select.us, ptr %arrayidx51.us, align 8 br label %for.inc65.us for.inc65.us: ; preds = %if.end49.us, %for.body42.us %indvars.iv.next168 = or i64 %indvars.iv167, 1 %arrayidx46.us.1 = getelementptr inbounds [100 x [100 x i32]], ptr %w, i64 0, i64 %idxprom38.us, i64 %indvars.iv.next168 %20 = load i32, ptr %arrayidx46.us.1, align 4, !tbaa !5 %cmp47.us.1 = icmp eq i32 %20, -1 br i1 %cmp47.us.1, label %for.inc65.us.1, label %if.end49.us.1 if.end49.us.1: ; preds = %for.inc65.us %arrayidx51.us.1 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv.next168 %21 = load i32, ptr %arrayidx51.us.1, align 4, !tbaa !5 %spec.store.select.us.1 = call i32 @llvm.smin.i32(i32 %21, i32 %20) store i32 %spec.store.select.us.1, ptr %arrayidx51.us.1, align 4 br label %for.inc65.us.1 for.inc65.us.1: ; preds = %if.end49.us.1, %for.inc65.us %indvars.iv.next168.1 = add nuw nsw i64 %indvars.iv167, 2 %niter187.next.1 = add i64 %niter187, 2 %niter187.ncmp.1 = icmp eq i64 %niter187.next.1, %unroll_iter186 br i1 %niter187.ncmp.1, label %while.cond.us.loopexit.unr-lcssa, label %for.body42.us, !llvm.loop !17 for.body23.us: ; preds = %for.body23.us.preheader, %for.inc32.us.1 %indvars.iv162 = phi i64 [ %indvars.iv.next163.1, %for.inc32.us.1 ], [ 0, %for.body23.us.preheader ] %mincost.0106.us = phi i32 [ %mincost.1.us.1, %for.inc32.us.1 ], [ 100000, %for.body23.us.preheader ] %u.1105.us = phi i32 [ %u.2.us.1, %for.inc32.us.1 ], [ %u.0.us, %for.body23.us.preheader ] %niter = phi i64 [ %niter.next.1, %for.inc32.us.1 ], [ 0, %for.body23.us.preheader ] %arrayidx25.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv162 %22 = load i32, ptr %arrayidx25.us, align 8, !tbaa !5 %cmp26.us = icmp slt i32 %22, %mincost.0106.us br i1 %cmp26.us, label %land.lhs.true.us, label %for.inc32.us land.lhs.true.us: ; preds = %for.body23.us %arrayidx28.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv162 %23 = load i32, ptr %arrayidx28.us, align 8, !tbaa !5 %cmp29.us = icmp eq i32 %23, 1 %24 = trunc i64 %indvars.iv162 to i32 %spec.select.us = select i1 %cmp29.us, i32 %24, i32 %u.1105.us %spec.select96.us = select i1 %cmp29.us, i32 %22, i32 %mincost.0106.us br label %for.inc32.us for.inc32.us: ; preds = %land.lhs.true.us, %for.body23.us %u.2.us = phi i32 [ %u.1105.us, %for.body23.us ], [ %spec.select.us, %land.lhs.true.us ] %mincost.1.us = phi i32 [ %mincost.0106.us, %for.body23.us ], [ %spec.select96.us, %land.lhs.true.us ] %indvars.iv.next163 = or i64 %indvars.iv162, 1 %arrayidx25.us.1 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv.next163 %25 = load i32, ptr %arrayidx25.us.1, align 4, !tbaa !5 %cmp26.us.1 = icmp slt i32 %25, %mincost.1.us br i1 %cmp26.us.1, label %land.lhs.true.us.1, label %for.inc32.us.1 land.lhs.true.us.1: ; preds = %for.inc32.us %arrayidx28.us.1 = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv.next163 %26 = load i32, ptr %arrayidx28.us.1, align 4, !tbaa !5 %cmp29.us.1 = icmp eq i32 %26, 1 %27 = trunc i64 %indvars.iv.next163 to i32 %spec.select.us.1 = select i1 %cmp29.us.1, i32 %27, i32 %u.2.us %spec.select96.us.1 = select i1 %cmp29.us.1, i32 %25, i32 %mincost.1.us br label %for.inc32.us.1 for.inc32.us.1: ; preds = %land.lhs.true.us.1, %for.inc32.us %u.2.us.1 = phi i32 [ %u.2.us, %for.inc32.us ], [ %spec.select.us.1, %land.lhs.true.us.1 ] %mincost.1.us.1 = phi i32 [ %mincost.1.us, %for.inc32.us ], [ %spec.select96.us.1, %land.lhs.true.us.1 ] %indvars.iv.next163.1 = add nuw nsw i64 %indvars.iv162, 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.end34.us.unr-lcssa, label %for.body23.us, !llvm.loop !18 while.end: ; preds = %for.end34.us, %for.cond10.preheader, %for.end19 %.us-phi111 = phi i32 [ 0, %for.end19 ], [ 0, %for.cond10.preheader ], [ %count.0.us, %for.end34.us ] %call68 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.us-phi111) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %w) #4 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color) #4 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !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, !15} !15 = !{!"llvm.loop.unswitch.partial.disable"} !16 = distinct !{!16, !10, !12, !11} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include<stdio.h> #define MAX_N 100 #define MAX_A 2000 int MAP[MAX_N][MAX_N]; int MinimumSpanningTree(int n) { int i, j, k, sum, min, min_node; int color[n], colorflag[n]; // 初期化 sum = 0; k = 1; color[0] = 0; colorflag[0] = 1; for( i=1; i<n; i++) colorflag[i] = 0; while(1) { // ノードk個の最小全域木を求める min = MAX_A + 1; for( i=0; i<k; i++) { for( j=0; j<n; j++) { if(colorflag[j] == 1) continue; if(MAP[ color[i] ][j] < 0) continue; if(MAP[ color[i] ][j] < min) { min = MAP[ color[i] ][j]; min_node = j; } } } // ノードk+1個の最小全域木の作成 if(k < n) { color[k] = min_node; colorflag[min_node] = 1; sum += min; } else break; k++; } return sum; } int main(void) { int n, i, j; // input scanf("%d", &n); for( i=0; i<n; i++) { for( j=0; j<n; j++) { scanf("%d", &MAP[i][j]); } } // output printf("%d\n", MinimumSpanningTree(n) ); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199112/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199112/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @MAP = dso_local global [100 x [100 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @MinimumSpanningTree(i32 noundef %n) local_unnamed_addr #0 { entry: %0 = zext i32 %n to i64 %vla = alloca i32, i64 %0, align 16 %vla1 = alloca i32, i64 %0, align 16 store i32 0, ptr %vla, align 16, !tbaa !5 store i32 1, ptr %vla1, align 16, !tbaa !5 %cmp75 = icmp sgt i32 %n, 1 br i1 %cmp75, label %while.cond.preheader.thread, label %while.cond.preheader while.cond.preheader.thread: ; preds = %entry %scevgep = getelementptr i8, ptr %vla1, i64 4 %1 = add nsw i32 %n, -1 %2 = zext i32 %1 to i64 %3 = shl nuw nsw i64 %2, 2 call void @llvm.memset.p0.i64(ptr align 4 %scevgep, i8 0, i64 %3, i1 false), !tbaa !5 br label %while.cond.us.preheader while.cond.preheader: ; preds = %entry %cmp877 = icmp eq i32 %n, 1 br i1 %cmp877, label %while.cond.us.preheader, label %while.end while.cond.us.preheader: ; preds = %while.cond.preheader.thread, %while.cond.preheader %xtraiter = and i64 %0, 1 %4 = icmp eq i32 %n, 1 %unroll_iter = and i64 %0, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %while.cond.us while.cond.us: ; preds = %while.cond.us.preheader, %if.then44.us %indvars.iv97 = phi i64 [ %indvars.iv.next98, %if.then44.us ], [ 1, %while.cond.us.preheader ] %sum.0.us = phi i32 [ %add.us, %if.then44.us ], [ 0, %while.cond.us.preheader ] %min_node.0.us = phi i32 [ %min_node.3.us.us.lcssa, %if.then44.us ], [ undef, %while.cond.us.preheader ] br label %for.cond7.preheader.us.us if.then44.us: ; preds = %for.end42.split.us.us %arrayidx46.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv97 store i32 %min_node.3.us.us.lcssa, ptr %arrayidx46.us, align 4, !tbaa !5 %idxprom47.us = sext i32 %min_node.3.us.us.lcssa to i64 %arrayidx48.us = getelementptr inbounds i32, ptr %vla1, i64 %idxprom47.us store i32 1, ptr %arrayidx48.us, align 4, !tbaa !5 %add.us = add nsw i32 %min.2.us.us.lcssa, %sum.0.us %indvars.iv.next98 = add nuw nsw i64 %indvars.iv97, 1 br label %while.cond.us for.cond7.preheader.us.us: ; preds = %for.cond7.for.inc40_crit_edge.us.us, %while.cond.us %indvars.iv92 = phi i64 [ %indvars.iv.next93, %for.cond7.for.inc40_crit_edge.us.us ], [ 0, %while.cond.us ] %min_node.183.us.us = phi i32 [ %min_node.3.us.us.lcssa, %for.cond7.for.inc40_crit_edge.us.us ], [ %min_node.0.us, %while.cond.us ] %min.082.us.us = phi i32 [ %min.2.us.us.lcssa, %for.cond7.for.inc40_crit_edge.us.us ], [ 2001, %while.cond.us ] %arrayidx14.us.us = getelementptr inbounds i32, ptr %vla, i64 %indvars.iv92 br i1 %4, label %for.cond7.for.inc40_crit_edge.us.us.unr-lcssa, label %for.body9.us.us for.body9.us.us: ; preds = %for.cond7.preheader.us.us, %for.inc37.us.us.1 %indvars.iv = phi i64 [ %indvars.iv.next.1, %for.inc37.us.us.1 ], [ 0, %for.cond7.preheader.us.us ] %min_node.279.us.us = phi i32 [ %min_node.3.us.us.1, %for.inc37.us.us.1 ], [ %min_node.183.us.us, %for.cond7.preheader.us.us ] %min.178.us.us = phi i32 [ %min.2.us.us.1, %for.inc37.us.us.1 ], [ %min.082.us.us, %for.cond7.preheader.us.us ] %niter = phi i64 [ %niter.next.1, %for.inc37.us.us.1 ], [ 0, %for.cond7.preheader.us.us ] %arrayidx11.us.us = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv %5 = load i32, ptr %arrayidx11.us.us, align 8, !tbaa !5 %cmp12.us.us = icmp eq i32 %5, 1 br i1 %cmp12.us.us, label %for.inc37.us.us, label %if.end.us.us if.end.us.us: ; preds = %for.body9.us.us %6 = load i32, ptr %arrayidx14.us.us, align 4, !tbaa !5 %idxprom15.us.us = sext i32 %6 to i64 %arrayidx18.us.us = getelementptr inbounds [100 x [100 x i32]], ptr @MAP, i64 0, i64 %idxprom15.us.us, i64 %indvars.iv %7 = load i32, ptr %arrayidx18.us.us, align 8, !tbaa !5 %cmp19.us.us = icmp sgt i32 %7, -1 %cmp28.us.us = icmp slt i32 %7, %min.178.us.us %or.cond.us.us = select i1 %cmp19.us.us, i1 %cmp28.us.us, i1 false %spec.select.us.us = select i1 %or.cond.us.us, i32 %7, i32 %min.178.us.us %8 = trunc i64 %indvars.iv to i32 %spec.select74.us.us = select i1 %or.cond.us.us, i32 %8, i32 %min_node.279.us.us br label %for.inc37.us.us for.inc37.us.us: ; preds = %if.end.us.us, %for.body9.us.us %min.2.us.us = phi i32 [ %min.178.us.us, %for.body9.us.us ], [ %spec.select.us.us, %if.end.us.us ] %min_node.3.us.us = phi i32 [ %min_node.279.us.us, %for.body9.us.us ], [ %spec.select74.us.us, %if.end.us.us ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx11.us.us.1 = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv.next %9 = load i32, ptr %arrayidx11.us.us.1, align 4, !tbaa !5 %cmp12.us.us.1 = icmp eq i32 %9, 1 br i1 %cmp12.us.us.1, label %for.inc37.us.us.1, label %if.end.us.us.1 if.end.us.us.1: ; preds = %for.inc37.us.us %10 = load i32, ptr %arrayidx14.us.us, align 4, !tbaa !5 %idxprom15.us.us.1 = sext i32 %10 to i64 %arrayidx18.us.us.1 = getelementptr inbounds [100 x [100 x i32]], ptr @MAP, i64 0, i64 %idxprom15.us.us.1, i64 %indvars.iv.next %11 = load i32, ptr %arrayidx18.us.us.1, align 4, !tbaa !5 %cmp19.us.us.1 = icmp sgt i32 %11, -1 %cmp28.us.us.1 = icmp slt i32 %11, %min.2.us.us %or.cond.us.us.1 = select i1 %cmp19.us.us.1, i1 %cmp28.us.us.1, i1 false %spec.select.us.us.1 = select i1 %or.cond.us.us.1, i32 %11, i32 %min.2.us.us %12 = trunc i64 %indvars.iv.next to i32 %spec.select74.us.us.1 = select i1 %or.cond.us.us.1, i32 %12, i32 %min_node.3.us.us br label %for.inc37.us.us.1 for.inc37.us.us.1: ; preds = %if.end.us.us.1, %for.inc37.us.us %min.2.us.us.1 = phi i32 [ %min.2.us.us, %for.inc37.us.us ], [ %spec.select.us.us.1, %if.end.us.us.1 ] %min_node.3.us.us.1 = phi i32 [ %min_node.3.us.us, %for.inc37.us.us ], [ %spec.select74.us.us.1, %if.end.us.us.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.cond7.for.inc40_crit_edge.us.us.unr-lcssa, label %for.body9.us.us, !llvm.loop !9 for.cond7.for.inc40_crit_edge.us.us.unr-lcssa: ; preds = %for.inc37.us.us.1, %for.cond7.preheader.us.us %min.2.us.us.lcssa.ph = phi i32 [ undef, %for.cond7.preheader.us.us ], [ %min.2.us.us.1, %for.inc37.us.us.1 ] %min_node.3.us.us.lcssa.ph = phi i32 [ undef, %for.cond7.preheader.us.us ], [ %min_node.3.us.us.1, %for.inc37.us.us.1 ] %indvars.iv.unr = phi i64 [ 0, %for.cond7.preheader.us.us ], [ %indvars.iv.next.1, %for.inc37.us.us.1 ] %min_node.279.us.us.unr = phi i32 [ %min_node.183.us.us, %for.cond7.preheader.us.us ], [ %min_node.3.us.us.1, %for.inc37.us.us.1 ] %min.178.us.us.unr = phi i32 [ %min.082.us.us, %for.cond7.preheader.us.us ], [ %min.2.us.us.1, %for.inc37.us.us.1 ] br i1 %lcmp.mod.not, label %for.cond7.for.inc40_crit_edge.us.us, label %for.body9.us.us.epil for.body9.us.us.epil: ; preds = %for.cond7.for.inc40_crit_edge.us.us.unr-lcssa %arrayidx11.us.us.epil = getelementptr inbounds i32, ptr %vla1, i64 %indvars.iv.unr %13 = load i32, ptr %arrayidx11.us.us.epil, align 4, !tbaa !5 %cmp12.us.us.epil = icmp eq i32 %13, 1 br i1 %cmp12.us.us.epil, label %for.cond7.for.inc40_crit_edge.us.us, label %if.end.us.us.epil if.end.us.us.epil: ; preds = %for.body9.us.us.epil %14 = load i32, ptr %arrayidx14.us.us, align 4, !tbaa !5 %idxprom15.us.us.epil = sext i32 %14 to i64 %arrayidx18.us.us.epil = getelementptr inbounds [100 x [100 x i32]], ptr @MAP, i64 0, i64 %idxprom15.us.us.epil, i64 %indvars.iv.unr %15 = load i32, ptr %arrayidx18.us.us.epil, align 4, !tbaa !5 %cmp19.us.us.epil = icmp sgt i32 %15, -1 %cmp28.us.us.epil = icmp slt i32 %15, %min.178.us.us.unr %or.cond.us.us.epil = select i1 %cmp19.us.us.epil, i1 %cmp28.us.us.epil, i1 false %spec.select.us.us.epil = select i1 %or.cond.us.us.epil, i32 %15, i32 %min.178.us.us.unr %16 = trunc i64 %indvars.iv.unr to i32 %spec.select74.us.us.epil = select i1 %or.cond.us.us.epil, i32 %16, i32 %min_node.279.us.us.unr br label %for.cond7.for.inc40_crit_edge.us.us for.cond7.for.inc40_crit_edge.us.us: ; preds = %for.body9.us.us.epil, %if.end.us.us.epil, %for.cond7.for.inc40_crit_edge.us.us.unr-lcssa %min.2.us.us.lcssa = phi i32 [ %min.2.us.us.lcssa.ph, %for.cond7.for.inc40_crit_edge.us.us.unr-lcssa ], [ %min.178.us.us.unr, %for.body9.us.us.epil ], [ %spec.select.us.us.epil, %if.end.us.us.epil ] %min_node.3.us.us.lcssa = phi i32 [ %min_node.3.us.us.lcssa.ph, %for.cond7.for.inc40_crit_edge.us.us.unr-lcssa ], [ %min_node.279.us.us.unr, %for.body9.us.us.epil ], [ %spec.select74.us.us.epil, %if.end.us.us.epil ] %indvars.iv.next93 = add nuw nsw i64 %indvars.iv92, 1 %exitcond96.not = icmp eq i64 %indvars.iv.next93, %indvars.iv97 br i1 %exitcond96.not, label %for.end42.split.us.us, label %for.cond7.preheader.us.us, !llvm.loop !11 for.end42.split.us.us: ; preds = %for.cond7.for.inc40_crit_edge.us.us %exitcond101.not = icmp eq i64 %indvars.iv97, %0 br i1 %exitcond101.not, label %while.end, label %if.then44.us while.end: ; preds = %for.end42.split.us.us, %while.cond.preheader %.us-phi86 = phi i32 [ 0, %while.cond.preheader ], [ %sum.0.us, %for.end42.split.us.us ] ret i32 %.us-phi86 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 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 %cmp18 = icmp sgt i32 %0, 0 br i1 %cmp18, label %for.cond1.preheader, label %for.end9 for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %4, %for.inc7 ], [ %0, %entry ] %indvars.iv23 = phi i64 [ %indvars.iv.next24, %for.inc7 ], [ 0, %entry ] %cmp216 = icmp sgt i32 %1, 0 br i1 %cmp216, label %for.body3, label %for.cond1.preheader.for.inc7_crit_edge for.cond1.preheader.for.inc7_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc7 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], ptr @MAP, i64 0, i64 %indvars.iv23, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !12 for.inc7: ; preds = %for.body3, %for.cond1.preheader.for.inc7_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc7_crit_edge ], [ %3, %for.body3 ] %4 = phi i32 [ %1, %for.cond1.preheader.for.inc7_crit_edge ], [ %2, %for.body3 ] %indvars.iv.next24 = add nuw nsw i64 %indvars.iv23, 1 %cmp = icmp slt i64 %indvars.iv.next24, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.end9, !llvm.loop !13 for.end9: ; preds = %for.inc7, %entry %.lcssa = phi i32 [ %0, %entry ], [ %4, %for.inc7 ] %call10 = call i32 @MinimumSpanningTree(i32 noundef %.lcssa) %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %call10) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { 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} !13 = distinct !{!13, !10, !14} !14 = !{!"llvm.loop.unswitch.partial.disable"}
#include<stdio.h> #include<stdlib.h> #define MAX 101 #define INF 2001 int main(){ int i,j,n,u,v,result=0,mincost,A[MAX][MAX],color[MAX],d[MAX],pi[MAX]; scanf("%d",&n); for(i=1 ; i<=n ; i++){ for(j=1 ; j<=n ; j++){ scanf("%d",&A[i][j]); if(A[i][j]==-1)A[i][j]=INF; } } for(u=1 ; u<=n ; u++){ d[u]=INF; color[u]=0; } d[1]=0; while(1){ mincost=INF; for(i=1 ; i<=n ; i++){ if(color[i] != 1 && d[i] < mincost){ mincost=d[i]; u=i; } } if(mincost==INF)break; color[u] = 1; for(v=1 ; v<=n ; v++){ if(color[v] != 1 && A[u][v] < d[v]){ d[v]=A[u][v]; } } } for(i=1 ; i<=n ; i++){ result += d[i]; } printf("%d\n",result); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199163/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199163/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %A = alloca [101 x [101 x i32]], align 16 %color = alloca [101 x i32], align 16 %d = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %A) #5 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %color) #5 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %d) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp.not120 = icmp slt i32 %0, 1 br i1 %cmp.not120, label %for.cond19.preheader, label %for.cond1.preheader for.cond1.preheader: ; preds = %entry, %for.inc16 %1 = phi i32 [ %12, %for.inc16 ], [ %0, %entry ] %indvars.iv141 = phi i64 [ %indvars.iv.next142, %for.inc16 ], [ 1, %entry ] %cmp2.not118 = icmp slt i32 %1, 1 br i1 %cmp2.not118, label %for.cond1.preheader.for.inc16_crit_edge, label %for.body3 for.cond1.preheader.for.inc16_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc16 for.cond19.preheader: ; preds = %for.inc16, %entry %.lcssa = phi i32 [ %0, %entry ], [ %12, %for.inc16 ] %.lcssa.fr = freeze i32 %.lcssa %cmp20.not122 = icmp slt i32 %.lcssa.fr, 1 br i1 %cmp20.not122, label %for.end83, label %for.body21.preheader for.body21.preheader: ; preds = %for.cond19.preheader %scevgep = getelementptr inbounds i8, ptr %color, i64 4 %2 = zext i32 %.lcssa.fr to i64 %3 = shl nuw nsw i64 %2, 2 call void @llvm.memset.p0.i64(ptr nonnull align 4 %scevgep, i8 0, i64 %3, i1 false), !tbaa !5 %4 = add i32 %.lcssa.fr, 1 %wide.trip.count = zext i32 %4 to i64 %5 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %.lcssa.fr, 8 br i1 %min.iters.check, label %for.body21.preheader193, label %vector.ph vector.ph: ; preds = %for.body21.preheader %n.vec = and i64 %5, -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 %6 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %offset.idx store <4 x i32> <i32 2001, i32 2001, i32 2001, i32 2001>, ptr %6, align 4, !tbaa !5 %7 = getelementptr inbounds i32, ptr %6, i64 4 store <4 x i32> <i32 2001, i32 2001, i32 2001, i32 2001>, ptr %7, align 4, !tbaa !5 %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 %cmp.n = icmp eq i64 %5, %n.vec br i1 %cmp.n, label %for.end28, label %for.body21.preheader193 for.body21.preheader193: ; preds = %for.body21.preheader, %middle.block %indvars.iv144.ph = phi i64 [ 1, %for.body21.preheader ], [ %ind.end, %middle.block ] br label %for.body21 for.body3: ; preds = %for.cond1.preheader, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 1, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %indvars.iv141, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %9 = load i32, ptr %arrayidx5, align 4, !tbaa !5 %cmp11 = icmp eq i32 %9, -1 br i1 %cmp11, label %if.then, label %for.inc if.then: ; preds = %for.body3 store i32 2001, ptr %arrayidx5, align 4, !tbaa !5 br label %for.inc for.inc: ; preds = %for.body3, %if.then %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %n, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp2.not.not = icmp slt i64 %indvars.iv, %11 br i1 %cmp2.not.not, label %for.body3, label %for.inc16, !llvm.loop !13 for.inc16: ; preds = %for.inc, %for.cond1.preheader.for.inc16_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc16_crit_edge ], [ %11, %for.inc ] %12 = phi i32 [ %1, %for.cond1.preheader.for.inc16_crit_edge ], [ %10, %for.inc ] %indvars.iv.next142 = add nuw nsw i64 %indvars.iv141, 1 %cmp.not.not = icmp slt i64 %indvars.iv141, %.pre-phi br i1 %cmp.not.not, label %for.cond1.preheader, label %for.cond19.preheader, !llvm.loop !14 for.body21: ; preds = %for.body21.preheader193, %for.body21 %indvars.iv144 = phi i64 [ %indvars.iv.next145, %for.body21 ], [ %indvars.iv144.ph, %for.body21.preheader193 ] %arrayidx23 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv144 store i32 2001, ptr %arrayidx23, align 4, !tbaa !5 %indvars.iv.next145 = add nuw nsw i64 %indvars.iv144, 1 %exitcond.not = icmp eq i64 %indvars.iv.next145, %wide.trip.count br i1 %exitcond.not, label %for.end28, label %for.body21, !llvm.loop !16 for.end28: ; preds = %for.body21, %middle.block %arrayidx29 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 1 store i32 0, ptr %arrayidx29, align 4, !tbaa !5 br i1 %cmp20.not122, label %for.end83, label %while.cond.preheader while.cond.preheader: ; preds = %for.end28 %13 = add nuw i32 %.lcssa.fr, 1 %wide.trip.count150 = zext i32 %13 to i64 %xtraiter = and i64 %5, 1 %14 = icmp eq i32 %4, 2 %unroll_iter = and i64 %5, -2 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body32 while.cond.loopexit.unr-lcssa: ; preds = %for.inc73.1, %if.end48 %indvars.iv152.unr = phi i64 [ 1, %if.end48 ], [ %indvars.iv.next153.1, %for.inc73.1 ] br i1 %lcmp.mod.not, label %for.body32.backedge, label %for.body53.epil for.body53.epil: ; preds = %while.cond.loopexit.unr-lcssa %arrayidx55.epil = getelementptr inbounds [101 x i32], ptr %color, i64 0, i64 %indvars.iv152.unr %15 = load i32, ptr %arrayidx55.epil, align 4, !tbaa !5 %cmp56.not.epil = icmp eq i32 %15, 1 br i1 %cmp56.not.epil, label %for.body32.backedge, label %land.lhs.true57.epil land.lhs.true57.epil: ; preds = %for.body53.epil %arrayidx61.epil = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %idxprom49, i64 %indvars.iv152.unr %16 = load i32, ptr %arrayidx61.epil, align 4, !tbaa !5 %arrayidx63.epil = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv152.unr %17 = load i32, ptr %arrayidx63.epil, align 4, !tbaa !5 %spec.store.select.epil = call i32 @llvm.smin.i32(i32 %16, i32 %17) store i32 %spec.store.select.epil, ptr %arrayidx63.epil, align 4 br label %for.body32.backedge for.body32: ; preds = %for.body32.backedge, %while.cond.preheader %indvars.iv147 = phi i64 [ 1, %while.cond.preheader ], [ %indvars.iv147.be, %for.body32.backedge ] %mincost.0127 = phi i32 [ 2001, %while.cond.preheader ], [ %mincost.0127.be, %for.body32.backedge ] %u.2126 = phi i32 [ %4, %while.cond.preheader ], [ %u.3, %for.body32.backedge ] %arrayidx34 = getelementptr inbounds [101 x i32], ptr %color, i64 0, i64 %indvars.iv147 %18 = load i32, ptr %arrayidx34, align 4, !tbaa !5 %cmp35.not = icmp eq i32 %18, 1 br i1 %cmp35.not, label %for.inc43, label %land.lhs.true land.lhs.true: ; preds = %for.body32 %arrayidx37 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv147 %19 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %cmp38 = icmp slt i32 %19, %mincost.0127 %20 = trunc i64 %indvars.iv147 to i32 %spec.select = select i1 %cmp38, i32 %20, i32 %u.2126 %spec.select117 = call i32 @llvm.smin.i32(i32 %19, i32 %mincost.0127) br label %for.inc43 for.inc43: ; preds = %land.lhs.true, %for.body32 %u.3 = phi i32 [ %u.2126, %for.body32 ], [ %spec.select, %land.lhs.true ] %mincost.1 = phi i32 [ %mincost.0127, %for.body32 ], [ %spec.select117, %land.lhs.true ] %indvars.iv.next148 = add nuw nsw i64 %indvars.iv147, 1 %exitcond151.not = icmp eq i64 %indvars.iv.next148, %wide.trip.count150 br i1 %exitcond151.not, label %for.end45, label %for.body32.backedge for.body32.backedge: ; preds = %while.cond.loopexit.unr-lcssa, %land.lhs.true57.epil, %for.body53.epil, %for.inc43 %indvars.iv147.be = phi i64 [ %indvars.iv.next148, %for.inc43 ], [ 1, %for.body53.epil ], [ 1, %land.lhs.true57.epil ], [ 1, %while.cond.loopexit.unr-lcssa ] %mincost.0127.be = phi i32 [ %mincost.1, %for.inc43 ], [ 2001, %for.body53.epil ], [ 2001, %land.lhs.true57.epil ], [ 2001, %while.cond.loopexit.unr-lcssa ] br label %for.body32, !llvm.loop !17 for.end45: ; preds = %for.inc43 %cmp46 = icmp eq i32 %mincost.1, 2001 br i1 %cmp46, label %for.cond76.preheader, label %if.end48 for.cond76.preheader: ; preds = %for.end45 br i1 %cmp20.not122, label %for.end83, label %for.body78.preheader for.body78.preheader: ; preds = %for.cond76.preheader %21 = add nuw i32 %.lcssa.fr, 1 %wide.trip.count165 = zext i32 %21 to i64 %22 = add nsw i64 %wide.trip.count, -1 %min.iters.check177 = icmp ult i32 %.lcssa.fr, 8 br i1 %min.iters.check177, label %for.body78.preheader190, label %vector.ph178 vector.ph178: ; preds = %for.body78.preheader %n.vec180 = and i64 %22, -8 %ind.end181 = or i64 %n.vec180, 1 br label %vector.body184 vector.body184: ; preds = %vector.body184, %vector.ph178 %index185 = phi i64 [ 0, %vector.ph178 ], [ %index.next189, %vector.body184 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph178 ], [ %25, %vector.body184 ] %vec.phi186 = phi <4 x i32> [ zeroinitializer, %vector.ph178 ], [ %26, %vector.body184 ] %offset.idx187 = or i64 %index185, 1 %23 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %offset.idx187 %wide.load = load <4 x i32>, ptr %23, align 4, !tbaa !5 %24 = getelementptr inbounds i32, ptr %23, i64 4 %wide.load188 = load <4 x i32>, ptr %24, align 4, !tbaa !5 %25 = add <4 x i32> %wide.load, %vec.phi %26 = add <4 x i32> %wide.load188, %vec.phi186 %index.next189 = add nuw i64 %index185, 8 %27 = icmp eq i64 %index.next189, %n.vec180 br i1 %27, label %middle.block175, label %vector.body184, !llvm.loop !18 middle.block175: ; preds = %vector.body184 %bin.rdx = add <4 x i32> %26, %25 %28 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n183 = icmp eq i64 %22, %n.vec180 br i1 %cmp.n183, label %for.end83, label %for.body78.preheader190 for.body78.preheader190: ; preds = %for.body78.preheader, %middle.block175 %indvars.iv162.ph = phi i64 [ 1, %for.body78.preheader ], [ %ind.end181, %middle.block175 ] %result.0134.ph = phi i32 [ 0, %for.body78.preheader ], [ %28, %middle.block175 ] br label %for.body78 if.end48: ; preds = %for.end45 %idxprom49 = sext i32 %u.3 to i64 %arrayidx50 = getelementptr inbounds [101 x i32], ptr %color, i64 0, i64 %idxprom49 store i32 1, ptr %arrayidx50, align 4, !tbaa !5 br i1 %14, label %while.cond.loopexit.unr-lcssa, label %for.body53 for.body53: ; preds = %if.end48, %for.inc73.1 %indvars.iv152 = phi i64 [ %indvars.iv.next153.1, %for.inc73.1 ], [ 1, %if.end48 ] %niter = phi i64 [ %niter.next.1, %for.inc73.1 ], [ 0, %if.end48 ] %arrayidx55 = getelementptr inbounds [101 x i32], ptr %color, i64 0, i64 %indvars.iv152 %29 = load i32, ptr %arrayidx55, align 4, !tbaa !5 %cmp56.not = icmp eq i32 %29, 1 br i1 %cmp56.not, label %for.inc73, label %land.lhs.true57 land.lhs.true57: ; preds = %for.body53 %arrayidx61 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %idxprom49, i64 %indvars.iv152 %30 = load i32, ptr %arrayidx61, align 4, !tbaa !5 %arrayidx63 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv152 %31 = load i32, ptr %arrayidx63, align 4, !tbaa !5 %spec.store.select = call i32 @llvm.smin.i32(i32 %30, i32 %31) store i32 %spec.store.select, ptr %arrayidx63, align 4 br label %for.inc73 for.inc73: ; preds = %land.lhs.true57, %for.body53 %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1 %arrayidx55.1 = getelementptr inbounds [101 x i32], ptr %color, i64 0, i64 %indvars.iv.next153 %32 = load i32, ptr %arrayidx55.1, align 4, !tbaa !5 %cmp56.not.1 = icmp eq i32 %32, 1 br i1 %cmp56.not.1, label %for.inc73.1, label %land.lhs.true57.1 land.lhs.true57.1: ; preds = %for.inc73 %arrayidx61.1 = getelementptr inbounds [101 x [101 x i32]], ptr %A, i64 0, i64 %idxprom49, i64 %indvars.iv.next153 %33 = load i32, ptr %arrayidx61.1, align 4, !tbaa !5 %arrayidx63.1 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv.next153 %34 = load i32, ptr %arrayidx63.1, align 4, !tbaa !5 %spec.store.select.1 = call i32 @llvm.smin.i32(i32 %33, i32 %34) store i32 %spec.store.select.1, ptr %arrayidx63.1, align 4 br label %for.inc73.1 for.inc73.1: ; preds = %land.lhs.true57.1, %for.inc73 %indvars.iv.next153.1 = add nuw nsw i64 %indvars.iv152, 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 %while.cond.loopexit.unr-lcssa, label %for.body53, !llvm.loop !17 for.body78: ; preds = %for.body78.preheader190, %for.body78 %indvars.iv162 = phi i64 [ %indvars.iv.next163, %for.body78 ], [ %indvars.iv162.ph, %for.body78.preheader190 ] %result.0134 = phi i32 [ %add, %for.body78 ], [ %result.0134.ph, %for.body78.preheader190 ] %arrayidx80 = getelementptr inbounds [101 x i32], ptr %d, i64 0, i64 %indvars.iv162 %35 = load i32, ptr %arrayidx80, align 4, !tbaa !5 %add = add nsw i32 %35, %result.0134 %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1 %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165 br i1 %exitcond166.not, label %for.end83, label %for.body78, !llvm.loop !19 for.end83: ; preds = %for.body78, %middle.block175, %for.cond19.preheader, %for.end28, %for.cond76.preheader %result.0.lcssa = phi i32 [ 0, %for.cond76.preheader ], [ 0, %for.end28 ], [ 0, %for.cond19.preheader ], [ %28, %middle.block175 ], [ %add, %for.body78 ] %call84 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %result.0.lcssa) call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %d) #5 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %color) #5 call void @llvm.lifetime.end.p0(i64 40804, 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #3 ; Function Attrs: nocallback nofree 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.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 = { 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, !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, !15} !15 = !{!"llvm.loop.unswitch.partial.disable"} !16 = distinct !{!16, !10, !12, !11} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !11, !12} !19 = distinct !{!19, !10, !12, !11}
#include<stdio.h> #define MAX 100 #define INFTY 1<<21 #define WHITE 0 #define GRAY 1 #define BLACK 2 //static const int WHITE = 0; //static const int GRAY = 1; //static const int BLACK = 2; int n , M[MAX][MAX]; int prim() { int i,v,u,minv; int d[MAX],p[MAX],color[MAX]; for(i = 0;i<n;i++) { d[i] = INFTY; p[i] = -1; color[i] = WHITE; } d[0] = 0; while(1) { minv = INFTY; u = -1; for(i = 0;i<n;i++) { if(minv > d[i] && color[i] != BLACK) { u = i; minv = d[i]; } } if(u == -1) break; color[u] = BLACK; for(v = 0;v<n;v++) { if(color[v] != BLACK && M[u][v] != INFTY) { if(d[v] > M[u][v]) { d[v] = M[u][v]; p[v] = u; color[v] = GRAY; } } } } int sum = 0; for(i = 0;i<n;i++) { if(p[i] != -1) sum += M[i][p[i]]; } return sum; } int main() { int i,j,e; scanf("%d\n", &n); for(i = 0;i<n;i++) { for(j=0;j<n;j++) { scanf("%d\n", &e); M[i][j] = (e == -1) ? INFTY:e; } } printf("%d\n", prim()); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199206/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199206/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0, align 4 @M = dso_local local_unnamed_addr global [100 x [100 x i32]] zeroinitializer, align 16 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @prim() local_unnamed_addr #0 { entry: %d = alloca [100 x i32], align 16 %p = alloca [100 x i32], align 16 %color = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color) #5 %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp111 = icmp sgt i32 %.fr, 0 br i1 %cmp111, label %for.body.preheader, label %for.end77 for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p, i8 -1, i64 %2, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color, i8 0, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader173, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %index store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %4, align 16, !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 !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader173 for.body.preheader173: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader173, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader173 ] %arrayidx = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv store i32 2097152, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block store i32 0, ptr %d, align 16, !tbaa !5 br i1 %cmp111, label %while.cond.us.preheader, label %for.end77 while.cond.us.preheader: ; preds = %for.end %wide.trip.count161 = zext i32 %.fr to i64 %wide.trip.count166 = zext i32 %.fr to i64 br label %for.body8.us for.end19.us: ; preds = %for.inc17.us %cmp20.us = icmp eq i32 %u.1.us, -1 br i1 %cmp20.us, label %for.cond61.preheader, label %if.end22.us if.end22.us: ; preds = %for.end19.us %idxprom23.us = sext i32 %u.1.us to i64 %arrayidx24.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %idxprom23.us store i32 2, ptr %arrayidx24.us, align 4, !tbaa !5 br label %for.body27.us for.body27.us: ; preds = %if.end22.us, %for.inc58.us %indvars.iv163 = phi i64 [ 0, %if.end22.us ], [ %indvars.iv.next164, %for.inc58.us ] %arrayidx29.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv163 %6 = load i32, ptr %arrayidx29.us, align 4, !tbaa !5 %cmp30.not.us = icmp eq i32 %6, 2 br i1 %cmp30.not.us, label %for.inc58.us, label %land.lhs.true31.us land.lhs.true31.us: ; preds = %for.body27.us %arrayidx35.us = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %idxprom23.us, i64 %indvars.iv163 %7 = load i32, ptr %arrayidx35.us, align 4, !tbaa !5 %cmp36.not.us = icmp eq i32 %7, 2097152 br i1 %cmp36.not.us, label %for.inc58.us, label %if.then37.us if.then37.us: ; preds = %land.lhs.true31.us %arrayidx39.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv163 %8 = load i32, ptr %arrayidx39.us, align 4, !tbaa !5 %cmp44.us = icmp sgt i32 %8, %7 br i1 %cmp44.us, label %if.then45.us, label %for.inc58.us if.then45.us: ; preds = %if.then37.us store i32 %7, ptr %arrayidx39.us, align 4, !tbaa !5 %arrayidx53.us = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv163 store i32 %u.1.us, ptr %arrayidx53.us, align 4, !tbaa !5 store i32 1, ptr %arrayidx29.us, align 4, !tbaa !5 br label %for.inc58.us for.inc58.us: ; preds = %if.then45.us, %if.then37.us, %land.lhs.true31.us, %for.body27.us %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1 %exitcond167.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count166 br i1 %exitcond167.not, label %for.body8.us.backedge, label %for.body27.us, !llvm.loop !14 for.body8.us: ; preds = %for.body8.us.backedge, %while.cond.us.preheader %indvars.iv158 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv158.be, %for.body8.us.backedge ] %minv.0116.us = phi i32 [ 2097152, %while.cond.us.preheader ], [ %minv.0116.us.be, %for.body8.us.backedge ] %u.0115.us = phi i32 [ -1, %while.cond.us.preheader ], [ %u.0115.us.be, %for.body8.us.backedge ] %arrayidx10.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv158 %9 = load i32, ptr %arrayidx10.us, align 4, !tbaa !5 %cmp11.us = icmp sgt i32 %minv.0116.us, %9 br i1 %cmp11.us, label %land.lhs.true.us, label %for.inc17.us land.lhs.true.us: ; preds = %for.body8.us %arrayidx13.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv158 %10 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %cmp14.not.us = icmp eq i32 %10, 2 %11 = trunc i64 %indvars.iv158 to i32 %spec.select.us = select i1 %cmp14.not.us, i32 %u.0115.us, i32 %11 %spec.select110.us = select i1 %cmp14.not.us, i32 %minv.0116.us, i32 %9 br label %for.inc17.us for.inc17.us: ; preds = %land.lhs.true.us, %for.body8.us %u.1.us = phi i32 [ %u.0115.us, %for.body8.us ], [ %spec.select.us, %land.lhs.true.us ] %minv.1.us = phi i32 [ %minv.0116.us, %for.body8.us ], [ %spec.select110.us, %land.lhs.true.us ] %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1 %exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161 br i1 %exitcond162.not, label %for.end19.us, label %for.body8.us.backedge for.body8.us.backedge: ; preds = %for.inc58.us, %for.inc17.us %indvars.iv158.be = phi i64 [ %indvars.iv.next159, %for.inc17.us ], [ 0, %for.inc58.us ] %minv.0116.us.be = phi i32 [ %minv.1.us, %for.inc17.us ], [ 2097152, %for.inc58.us ] %u.0115.us.be = phi i32 [ %u.1.us, %for.inc17.us ], [ -1, %for.inc58.us ] br label %for.body8.us, !llvm.loop !14 for.cond61.preheader: ; preds = %for.end19.us br i1 %cmp111, label %for.body63.preheader, label %for.end77 for.body63.preheader: ; preds = %for.cond61.preheader %xtraiter = and i64 %1, 1 %12 = icmp eq i32 %.fr, 1 br i1 %12, label %for.end77.loopexit.unr-lcssa, label %for.body63.preheader.new for.body63.preheader.new: ; preds = %for.body63.preheader %unroll_iter = and i64 %1, 4294967294 br label %for.body63 for.body63: ; preds = %for.inc75.1, %for.body63.preheader.new %indvars.iv168 = phi i64 [ 0, %for.body63.preheader.new ], [ %indvars.iv.next169.1, %for.inc75.1 ] %sum.0149 = phi i32 [ 0, %for.body63.preheader.new ], [ %sum.1.1, %for.inc75.1 ] %niter = phi i64 [ 0, %for.body63.preheader.new ], [ %niter.next.1, %for.inc75.1 ] %arrayidx65 = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv168 %13 = load i32, ptr %arrayidx65, align 8, !tbaa !5 %cmp66.not = icmp eq i32 %13, -1 br i1 %cmp66.not, label %for.inc75, label %if.then67 if.then67: ; preds = %for.body63 %idxprom72 = sext i32 %13 to i64 %arrayidx73 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv168, i64 %idxprom72 %14 = load i32, ptr %arrayidx73, align 4, !tbaa !5 %add = add nsw i32 %14, %sum.0149 br label %for.inc75 for.inc75: ; preds = %for.body63, %if.then67 %sum.1 = phi i32 [ %add, %if.then67 ], [ %sum.0149, %for.body63 ] %indvars.iv.next169 = or i64 %indvars.iv168, 1 %arrayidx65.1 = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv.next169 %15 = load i32, ptr %arrayidx65.1, align 4, !tbaa !5 %cmp66.not.1 = icmp eq i32 %15, -1 br i1 %cmp66.not.1, label %for.inc75.1, label %if.then67.1 if.then67.1: ; preds = %for.inc75 %idxprom72.1 = sext i32 %15 to i64 %arrayidx73.1 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv.next169, i64 %idxprom72.1 %16 = load i32, ptr %arrayidx73.1, align 4, !tbaa !5 %add.1 = add nsw i32 %16, %sum.1 br label %for.inc75.1 for.inc75.1: ; preds = %if.then67.1, %for.inc75 %sum.1.1 = phi i32 [ %add.1, %if.then67.1 ], [ %sum.1, %for.inc75 ] %indvars.iv.next169.1 = add nuw nsw i64 %indvars.iv168, 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.end77.loopexit.unr-lcssa, label %for.body63, !llvm.loop !15 for.end77.loopexit.unr-lcssa: ; preds = %for.inc75.1, %for.body63.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %indvars.iv168.unr = phi i64 [ 0, %for.body63.preheader ], [ %indvars.iv.next169.1, %for.inc75.1 ] %sum.0149.unr = phi i32 [ 0, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end77, label %for.body63.epil for.body63.epil: ; preds = %for.end77.loopexit.unr-lcssa %arrayidx65.epil = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv168.unr %17 = load i32, ptr %arrayidx65.epil, align 4, !tbaa !5 %cmp66.not.epil = icmp eq i32 %17, -1 br i1 %cmp66.not.epil, label %for.end77, label %if.then67.epil if.then67.epil: ; preds = %for.body63.epil %idxprom72.epil = sext i32 %17 to i64 %arrayidx73.epil = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv168.unr, i64 %idxprom72.epil %18 = load i32, ptr %arrayidx73.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %18, %sum.0149.unr br label %for.end77 for.end77: ; preds = %for.end77.loopexit.unr-lcssa, %if.then67.epil, %for.body63.epil, %entry, %for.end, %for.cond61.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond61.preheader ], [ 0, %for.end ], [ 0, %entry ], [ %sum.1.lcssa.ph, %for.end77.loopexit.unr-lcssa ], [ %add.epil, %if.then67.epil ], [ %sum.0149.unr, %for.body63.epil ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %p) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d) #5 ret i32 %sum.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %d.i = alloca [100 x i32], align 16 %p.i = alloca [100 x i32], align 16 %color.i = alloca [100 x i32], align 16 %e = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %e) #5 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr.i19 = freeze i32 %0 %cmp20 = icmp sgt i32 %.fr.i19, 0 br i1 %cmp20, label %for.cond1.preheader, label %for.end10.thread for.end10.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 br label %prim.exit for.cond1.preheader: ; preds = %entry, %for.inc8 %1 = phi i32 [ %.fr.i, %for.inc8 ], [ %.fr.i19, %entry ] %indvars.iv25 = phi i64 [ %indvars.iv.next26, %for.inc8 ], [ 0, %entry ] %cmp217 = icmp sgt i32 %1, 0 br i1 %cmp217, label %for.body3, label %for.inc8 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %e) %2 = load i32, ptr %e, align 4 %cmp5 = icmp eq i32 %2, -1 %cond = select i1 %cmp5, i32 2097152, i32 %2 %arrayidx7 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv25, i64 %indvars.iv store i32 %cond, ptr %arrayidx7, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr @n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp2, label %for.body3, label %for.inc8, !llvm.loop !16 for.inc8: ; preds = %for.body3, %for.cond1.preheader %5 = phi i32 [ %1, %for.cond1.preheader ], [ %3, %for.body3 ] %.fr.i = freeze i32 %5 %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1 %6 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next26, %6 br i1 %cmp, label %for.cond1.preheader, label %for.end10, !llvm.loop !17 for.end10: ; preds = %for.inc8 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 %cmp111.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp111.i, label %for.body.preheader.i, label %prim.exit for.body.preheader.i: ; preds = %for.end10 %7 = zext i32 %.fr.i to i64 %8 = shl nuw nsw i64 %7, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p.i, i8 -1, i64 %8, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color.i, i8 0, i64 %8, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr.i, 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 %7, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %9 = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %index store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %9, align 16, !tbaa !5 %10 = getelementptr inbounds i32, ptr %9, i64 4 store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %10, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %11 = icmp eq i64 %index.next, %n.vec br i1 %11, label %middle.block, label %vector.body, !llvm.loop !19 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %7 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv.i store i32 2097152, ptr %arrayidx.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, %7 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !20 while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr %d.i, align 16, !tbaa !5 br label %for.body8.us.i for.end19.us.i: ; preds = %for.inc17.us.i %cmp20.us.i = icmp eq i32 %u.1.us.i, -1 br i1 %cmp20.us.i, label %for.body63.i.preheader, label %if.end22.us.i for.body63.i.preheader: ; preds = %for.end19.us.i %xtraiter = and i64 %7, 1 %12 = icmp eq i32 %.fr.i, 1 br i1 %12, label %prim.exit.loopexit.unr-lcssa, label %for.body63.i.preheader.new for.body63.i.preheader.new: ; preds = %for.body63.i.preheader %unroll_iter = and i64 %7, 4294967294 br label %for.body63.i if.end22.us.i: ; preds = %for.end19.us.i %idxprom23.us.i = sext i32 %u.1.us.i to i64 %arrayidx24.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %idxprom23.us.i store i32 2, ptr %arrayidx24.us.i, align 4, !tbaa !5 br label %for.body27.us.i for.body27.us.i: ; preds = %for.inc58.us.i, %if.end22.us.i %indvars.iv163.i = phi i64 [ 0, %if.end22.us.i ], [ %indvars.iv.next164.i, %for.inc58.us.i ] %arrayidx29.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv163.i %13 = load i32, ptr %arrayidx29.us.i, align 4, !tbaa !5 %cmp30.not.us.i = icmp eq i32 %13, 2 br i1 %cmp30.not.us.i, label %for.inc58.us.i, label %land.lhs.true31.us.i land.lhs.true31.us.i: ; preds = %for.body27.us.i %arrayidx35.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %idxprom23.us.i, i64 %indvars.iv163.i %14 = load i32, ptr %arrayidx35.us.i, align 4, !tbaa !5 %cmp36.not.us.i = icmp eq i32 %14, 2097152 br i1 %cmp36.not.us.i, label %for.inc58.us.i, label %if.then37.us.i if.then37.us.i: ; preds = %land.lhs.true31.us.i %arrayidx39.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv163.i %15 = load i32, ptr %arrayidx39.us.i, align 4, !tbaa !5 %cmp44.us.i = icmp sgt i32 %15, %14 br i1 %cmp44.us.i, label %if.then45.us.i, label %for.inc58.us.i if.then45.us.i: ; preds = %if.then37.us.i store i32 %14, ptr %arrayidx39.us.i, align 4, !tbaa !5 %arrayidx53.us.i = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv163.i store i32 %u.1.us.i, ptr %arrayidx53.us.i, align 4, !tbaa !5 store i32 1, ptr %arrayidx29.us.i, align 4, !tbaa !5 br label %for.inc58.us.i for.inc58.us.i: ; preds = %if.then45.us.i, %if.then37.us.i, %land.lhs.true31.us.i, %for.body27.us.i %indvars.iv.next164.i = add nuw nsw i64 %indvars.iv163.i, 1 %exitcond167.not.i = icmp eq i64 %indvars.iv.next164.i, %7 br i1 %exitcond167.not.i, label %for.body8.us.i.backedge, label %for.body27.us.i, !llvm.loop !14 for.body8.us.i: ; preds = %for.body8.us.i.backedge, %while.cond.us.preheader.i %indvars.iv158.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv158.i.be, %for.body8.us.i.backedge ] %minv.0116.us.i = phi i32 [ 2097152, %while.cond.us.preheader.i ], [ %minv.0116.us.i.be, %for.body8.us.i.backedge ] %u.0115.us.i = phi i32 [ -1, %while.cond.us.preheader.i ], [ %u.0115.us.i.be, %for.body8.us.i.backedge ] %arrayidx10.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv158.i %16 = load i32, ptr %arrayidx10.us.i, align 4, !tbaa !5 %cmp11.us.i = icmp sgt i32 %minv.0116.us.i, %16 br i1 %cmp11.us.i, label %land.lhs.true.us.i, label %for.inc17.us.i land.lhs.true.us.i: ; preds = %for.body8.us.i %arrayidx13.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv158.i %17 = load i32, ptr %arrayidx13.us.i, align 4, !tbaa !5 %cmp14.not.us.i = icmp eq i32 %17, 2 %18 = trunc i64 %indvars.iv158.i to i32 %spec.select.us.i = select i1 %cmp14.not.us.i, i32 %u.0115.us.i, i32 %18 %spec.select110.us.i = select i1 %cmp14.not.us.i, i32 %minv.0116.us.i, i32 %16 br label %for.inc17.us.i for.inc17.us.i: ; preds = %land.lhs.true.us.i, %for.body8.us.i %u.1.us.i = phi i32 [ %u.0115.us.i, %for.body8.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %minv.1.us.i = phi i32 [ %minv.0116.us.i, %for.body8.us.i ], [ %spec.select110.us.i, %land.lhs.true.us.i ] %indvars.iv.next159.i = add nuw nsw i64 %indvars.iv158.i, 1 %exitcond162.not.i = icmp eq i64 %indvars.iv.next159.i, %7 br i1 %exitcond162.not.i, label %for.end19.us.i, label %for.body8.us.i.backedge for.body8.us.i.backedge: ; preds = %for.inc58.us.i, %for.inc17.us.i %indvars.iv158.i.be = phi i64 [ %indvars.iv.next159.i, %for.inc17.us.i ], [ 0, %for.inc58.us.i ] %minv.0116.us.i.be = phi i32 [ %minv.1.us.i, %for.inc17.us.i ], [ 2097152, %for.inc58.us.i ] %u.0115.us.i.be = phi i32 [ %u.1.us.i, %for.inc17.us.i ], [ -1, %for.inc58.us.i ] br label %for.body8.us.i, !llvm.loop !14 for.body63.i: ; preds = %for.inc75.i.1, %for.body63.i.preheader.new %indvars.iv168.i = phi i64 [ 0, %for.body63.i.preheader.new ], [ %indvars.iv.next169.i.1, %for.inc75.i.1 ] %sum.0149.i = phi i32 [ 0, %for.body63.i.preheader.new ], [ %sum.1.i.1, %for.inc75.i.1 ] %niter = phi i64 [ 0, %for.body63.i.preheader.new ], [ %niter.next.1, %for.inc75.i.1 ] %arrayidx65.i = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv168.i %19 = load i32, ptr %arrayidx65.i, align 8, !tbaa !5 %cmp66.not.i = icmp eq i32 %19, -1 br i1 %cmp66.not.i, label %for.inc75.i, label %if.then67.i if.then67.i: ; preds = %for.body63.i %idxprom72.i = sext i32 %19 to i64 %arrayidx73.i = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv168.i, i64 %idxprom72.i %20 = load i32, ptr %arrayidx73.i, align 4, !tbaa !5 %add.i = add nsw i32 %20, %sum.0149.i br label %for.inc75.i for.inc75.i: ; preds = %if.then67.i, %for.body63.i %sum.1.i = phi i32 [ %add.i, %if.then67.i ], [ %sum.0149.i, %for.body63.i ] %indvars.iv.next169.i = or i64 %indvars.iv168.i, 1 %arrayidx65.i.1 = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv.next169.i %21 = load i32, ptr %arrayidx65.i.1, align 4, !tbaa !5 %cmp66.not.i.1 = icmp eq i32 %21, -1 br i1 %cmp66.not.i.1, label %for.inc75.i.1, label %if.then67.i.1 if.then67.i.1: ; preds = %for.inc75.i %idxprom72.i.1 = sext i32 %21 to i64 %arrayidx73.i.1 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv.next169.i, i64 %idxprom72.i.1 %22 = load i32, ptr %arrayidx73.i.1, align 4, !tbaa !5 %add.i.1 = add nsw i32 %22, %sum.1.i br label %for.inc75.i.1 for.inc75.i.1: ; preds = %if.then67.i.1, %for.inc75.i %sum.1.i.1 = phi i32 [ %add.i.1, %if.then67.i.1 ], [ %sum.1.i, %for.inc75.i ] %indvars.iv.next169.i.1 = add nuw nsw i64 %indvars.iv168.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 %prim.exit.loopexit.unr-lcssa, label %for.body63.i, !llvm.loop !15 prim.exit.loopexit.unr-lcssa: ; preds = %for.inc75.i.1, %for.body63.i.preheader %sum.1.i.lcssa.ph = phi i32 [ undef, %for.body63.i.preheader ], [ %sum.1.i.1, %for.inc75.i.1 ] %indvars.iv168.i.unr = phi i64 [ 0, %for.body63.i.preheader ], [ %indvars.iv.next169.i.1, %for.inc75.i.1 ] %sum.0149.i.unr = phi i32 [ 0, %for.body63.i.preheader ], [ %sum.1.i.1, %for.inc75.i.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %prim.exit, label %for.body63.i.epil for.body63.i.epil: ; preds = %prim.exit.loopexit.unr-lcssa %arrayidx65.i.epil = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv168.i.unr %23 = load i32, ptr %arrayidx65.i.epil, align 4, !tbaa !5 %cmp66.not.i.epil = icmp eq i32 %23, -1 br i1 %cmp66.not.i.epil, label %prim.exit, label %if.then67.i.epil if.then67.i.epil: ; preds = %for.body63.i.epil %idxprom72.i.epil = sext i32 %23 to i64 %arrayidx73.i.epil = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv168.i.unr, i64 %idxprom72.i.epil %24 = load i32, ptr %arrayidx73.i.epil, align 4, !tbaa !5 %add.i.epil = add nsw i32 %24, %sum.0149.i.unr br label %prim.exit prim.exit: ; preds = %prim.exit.loopexit.unr-lcssa, %if.then67.i.epil, %for.body63.i.epil, %for.end10.thread, %for.end10 %sum.0.lcssa.i = phi i32 [ 0, %for.end10 ], [ 0, %for.end10.thread ], [ %sum.1.i.lcssa.ph, %prim.exit.loopexit.unr-lcssa ], [ %add.i.epil, %if.then67.i.epil ], [ %sum.0149.i.unr, %for.body63.i.epil ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color.i) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d.i) #5 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %sum.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %e) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { 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, !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} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !18} !18 = !{!"llvm.loop.unswitch.partial.disable"} !19 = distinct !{!19, !10, !11, !12} !20 = distinct !{!20, !10, !12, !11}
#include<stdio.h> int main(){ int n; scanf("%d",&n); if(n%10<=5) printf("%d\n",n-n%10); else printf("%d\n",n-n%10+10); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19925/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19925/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %rem = srem i32 %0, 10 %cmp = icmp slt i32 %rem, 6 %sub4 = add i32 %0, 10 %sub4.sink = select i1 %cmp, i32 %0, i32 %sub4 %add = sub i32 %sub4.sink, %rem %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add) 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 G[100][100],d[100],v[100]; int MST(int); int MST(int n){ int i,j,k=1,min,minp,sum=0; d[0]=0; v[0]=1; for(i=1;i<n;i++) v[i]=0; while(1){ min = 2001; for(i=0;i<k;i++){ for(j=0;j<n;j++){ if(G[d[i]][j]<min && G[d[i]][j] != -1 && v[j] != 1){ min = G[d[i]][j]; minp = j; } } } if(k==n) break; d[k] = minp; v[minp] = 1; sum += min; k++; } return sum; } int main(){ int num,i,j; scanf("%d",&num); for(i=0;i<num;i++){ for(j=0;j<num;j++){ scanf("%d",&G[i][j]); } } printf("%d\n",MST(num)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199293/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199293/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @d = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @v = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @G = dso_local global [100 x [100 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @MST(i32 noundef %n) local_unnamed_addr #0 { entry: store i32 0, ptr @d, align 16, !tbaa !5 store i32 1, ptr @v, align 16, !tbaa !5 %cmp67 = icmp sgt i32 %n, 1 br i1 %cmp67, label %while.cond.preheader.thread, label %while.cond.preheader while.cond.preheader.thread: ; preds = %entry %0 = add nsw i32 %n, -1 %1 = zext i32 %0 to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds ([100 x i32], ptr @v, i64 0, i64 1), i8 0, i64 %2, i1 false), !tbaa !5 br label %while.cond.us.preheader while.cond.preheader: ; preds = %entry %cmp569 = icmp eq i32 %n, 1 br i1 %cmp569, label %while.cond.us.preheader, label %while.cond.preheader79 while.cond.preheader79: ; preds = %while.cond.preheader store i32 1, ptr @v, align 16, !tbaa !5 br label %if.end39 while.cond.us.preheader: ; preds = %while.cond.preheader.thread, %while.cond.preheader %3 = zext i32 %n to i64 %xtraiter = and i64 %3, 1 %4 = icmp eq i32 %n, 1 %unroll_iter = and i64 %3, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %while.cond.us while.cond.us: ; preds = %while.cond.us.preheader, %if.end39.us %indvars.iv88 = phi i64 [ 1, %while.cond.us.preheader ], [ %indvars.iv.next89, %if.end39.us ] %minp.0.us = phi i32 [ undef, %while.cond.us.preheader ], [ %minp.3.us.us.lcssa, %if.end39.us ] %sum.0.us = phi i32 [ 0, %while.cond.us.preheader ], [ %add.us, %if.end39.us ] br label %for.cond4.preheader.us.us if.end39.us: ; preds = %for.end36.split.us.us %arrayidx41.us = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv88 store i32 %minp.3.us.us.lcssa, ptr %arrayidx41.us, align 4, !tbaa !5 %idxprom42.us = sext i32 %minp.3.us.us.lcssa to i64 %arrayidx43.us = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %idxprom42.us store i32 1, ptr %arrayidx43.us, align 4, !tbaa !5 %add.us = add nsw i32 %min.2.us.us.lcssa, %sum.0.us %indvars.iv.next89 = add nuw nsw i64 %indvars.iv88, 1 br label %while.cond.us for.cond4.preheader.us.us: ; preds = %for.cond4.for.inc34_crit_edge.us.us, %while.cond.us %indvars.iv83 = phi i64 [ %indvars.iv.next84, %for.cond4.for.inc34_crit_edge.us.us ], [ 0, %while.cond.us ] %minp.176.us.us = phi i32 [ %minp.3.us.us.lcssa, %for.cond4.for.inc34_crit_edge.us.us ], [ %minp.0.us, %while.cond.us ] %min.075.us.us = phi i32 [ %min.2.us.us.lcssa, %for.cond4.for.inc34_crit_edge.us.us ], [ 2001, %while.cond.us ] %arrayidx8.us.us = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv83 %5 = load i32, ptr %arrayidx8.us.us, align 4, !tbaa !5 %idxprom9.us.us = sext i32 %5 to i64 br i1 %4, label %for.cond4.for.inc34_crit_edge.us.us.unr-lcssa, label %for.body6.us.us for.body6.us.us: ; preds = %for.cond4.preheader.us.us, %for.inc31.us.us.1 %indvars.iv = phi i64 [ %indvars.iv.next.1, %for.inc31.us.us.1 ], [ 0, %for.cond4.preheader.us.us ] %minp.272.us.us = phi i32 [ %minp.3.us.us.1, %for.inc31.us.us.1 ], [ %minp.176.us.us, %for.cond4.preheader.us.us ] %min.171.us.us = phi i32 [ %min.2.us.us.1, %for.inc31.us.us.1 ], [ %min.075.us.us, %for.cond4.preheader.us.us ] %niter = phi i64 [ %niter.next.1, %for.inc31.us.us.1 ], [ 0, %for.cond4.preheader.us.us ] %arrayidx12.us.us = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us, i64 %indvars.iv %6 = load i32, ptr %arrayidx12.us.us, align 8, !tbaa !5 %cmp13.us.us = icmp sge i32 %6, %min.171.us.us %cmp20.not.us.us = icmp eq i32 %6, -1 %or.cond.us.us = or i1 %cmp13.us.us, %cmp20.not.us.us br i1 %or.cond.us.us, label %for.inc31.us.us, label %land.lhs.true21.us.us land.lhs.true21.us.us: ; preds = %for.body6.us.us %arrayidx23.us.us = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv %7 = load i32, ptr %arrayidx23.us.us, align 8, !tbaa !5 %cmp24.not.us.us = icmp eq i32 %7, 1 %spec.select.us.us = select i1 %cmp24.not.us.us, i32 %min.171.us.us, i32 %6 %8 = trunc i64 %indvars.iv to i32 %spec.select66.us.us = select i1 %cmp24.not.us.us, i32 %minp.272.us.us, i32 %8 br label %for.inc31.us.us for.inc31.us.us: ; preds = %land.lhs.true21.us.us, %for.body6.us.us %min.2.us.us = phi i32 [ %min.171.us.us, %for.body6.us.us ], [ %spec.select.us.us, %land.lhs.true21.us.us ] %minp.3.us.us = phi i32 [ %minp.272.us.us, %for.body6.us.us ], [ %spec.select66.us.us, %land.lhs.true21.us.us ] %indvars.iv.next = or i64 %indvars.iv, 1 %arrayidx12.us.us.1 = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us, i64 %indvars.iv.next %9 = load i32, ptr %arrayidx12.us.us.1, align 4, !tbaa !5 %cmp13.us.us.1 = icmp sge i32 %9, %min.2.us.us %cmp20.not.us.us.1 = icmp eq i32 %9, -1 %or.cond.us.us.1 = or i1 %cmp13.us.us.1, %cmp20.not.us.us.1 br i1 %or.cond.us.us.1, label %for.inc31.us.us.1, label %land.lhs.true21.us.us.1 land.lhs.true21.us.us.1: ; preds = %for.inc31.us.us %arrayidx23.us.us.1 = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv.next %10 = load i32, ptr %arrayidx23.us.us.1, align 4, !tbaa !5 %cmp24.not.us.us.1 = icmp eq i32 %10, 1 %spec.select.us.us.1 = select i1 %cmp24.not.us.us.1, i32 %min.2.us.us, i32 %9 %11 = trunc i64 %indvars.iv.next to i32 %spec.select66.us.us.1 = select i1 %cmp24.not.us.us.1, i32 %minp.3.us.us, i32 %11 br label %for.inc31.us.us.1 for.inc31.us.us.1: ; preds = %land.lhs.true21.us.us.1, %for.inc31.us.us %min.2.us.us.1 = phi i32 [ %min.2.us.us, %for.inc31.us.us ], [ %spec.select.us.us.1, %land.lhs.true21.us.us.1 ] %minp.3.us.us.1 = phi i32 [ %minp.3.us.us, %for.inc31.us.us ], [ %spec.select66.us.us.1, %land.lhs.true21.us.us.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.cond4.for.inc34_crit_edge.us.us.unr-lcssa, label %for.body6.us.us, !llvm.loop !9 for.cond4.for.inc34_crit_edge.us.us.unr-lcssa: ; preds = %for.inc31.us.us.1, %for.cond4.preheader.us.us %min.2.us.us.lcssa.ph = phi i32 [ undef, %for.cond4.preheader.us.us ], [ %min.2.us.us.1, %for.inc31.us.us.1 ] %minp.3.us.us.lcssa.ph = phi i32 [ undef, %for.cond4.preheader.us.us ], [ %minp.3.us.us.1, %for.inc31.us.us.1 ] %indvars.iv.unr = phi i64 [ 0, %for.cond4.preheader.us.us ], [ %indvars.iv.next.1, %for.inc31.us.us.1 ] %minp.272.us.us.unr = phi i32 [ %minp.176.us.us, %for.cond4.preheader.us.us ], [ %minp.3.us.us.1, %for.inc31.us.us.1 ] %min.171.us.us.unr = phi i32 [ %min.075.us.us, %for.cond4.preheader.us.us ], [ %min.2.us.us.1, %for.inc31.us.us.1 ] br i1 %lcmp.mod.not, label %for.cond4.for.inc34_crit_edge.us.us, label %for.body6.us.us.epil for.body6.us.us.epil: ; preds = %for.cond4.for.inc34_crit_edge.us.us.unr-lcssa %arrayidx12.us.us.epil = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us, i64 %indvars.iv.unr %12 = load i32, ptr %arrayidx12.us.us.epil, align 4, !tbaa !5 %cmp13.us.us.epil = icmp sge i32 %12, %min.171.us.us.unr %cmp20.not.us.us.epil = icmp eq i32 %12, -1 %or.cond.us.us.epil = or i1 %cmp13.us.us.epil, %cmp20.not.us.us.epil br i1 %or.cond.us.us.epil, label %for.cond4.for.inc34_crit_edge.us.us, label %land.lhs.true21.us.us.epil land.lhs.true21.us.us.epil: ; preds = %for.body6.us.us.epil %arrayidx23.us.us.epil = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv.unr %13 = load i32, ptr %arrayidx23.us.us.epil, align 4, !tbaa !5 %cmp24.not.us.us.epil = icmp eq i32 %13, 1 %spec.select.us.us.epil = select i1 %cmp24.not.us.us.epil, i32 %min.171.us.us.unr, i32 %12 %14 = trunc i64 %indvars.iv.unr to i32 %spec.select66.us.us.epil = select i1 %cmp24.not.us.us.epil, i32 %minp.272.us.us.unr, i32 %14 br label %for.cond4.for.inc34_crit_edge.us.us for.cond4.for.inc34_crit_edge.us.us: ; preds = %for.body6.us.us.epil, %land.lhs.true21.us.us.epil, %for.cond4.for.inc34_crit_edge.us.us.unr-lcssa %min.2.us.us.lcssa = phi i32 [ %min.2.us.us.lcssa.ph, %for.cond4.for.inc34_crit_edge.us.us.unr-lcssa ], [ %min.171.us.us.unr, %for.body6.us.us.epil ], [ %spec.select.us.us.epil, %land.lhs.true21.us.us.epil ] %minp.3.us.us.lcssa = phi i32 [ %minp.3.us.us.lcssa.ph, %for.cond4.for.inc34_crit_edge.us.us.unr-lcssa ], [ %minp.272.us.us.unr, %for.body6.us.us.epil ], [ %spec.select66.us.us.epil, %land.lhs.true21.us.us.epil ] %indvars.iv.next84 = add nuw nsw i64 %indvars.iv83, 1 %exitcond87.not = icmp eq i64 %indvars.iv.next84, %indvars.iv88 br i1 %exitcond87.not, label %for.end36.split.us.us, label %for.cond4.preheader.us.us, !llvm.loop !11 for.end36.split.us.us: ; preds = %for.cond4.for.inc34_crit_edge.us.us %cmp37.us = icmp eq i64 %indvars.iv88, %3 br i1 %cmp37.us, label %while.end, label %if.end39.us if.end39: ; preds = %if.end39, %while.cond.preheader79 br label %if.end39 while.end: ; preds = %for.end36.split.us.us ret i32 %sum.0.us } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %num = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %num) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %num) %.pr = load i32, ptr %num, align 4, !tbaa !5 %cmp19 = icmp sgt i32 %.pr, 0 br i1 %cmp19, label %for.cond1.preheader, label %while.cond.preheader.i.thread while.cond.preheader.i.thread: ; preds = %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %while.cond.preheader79.i for.cond1.preheader: ; preds = %entry, %for.inc7 %0 = phi i32 [ %3, %for.inc7 ], [ %.pr, %entry ] %indvars.iv25 = phi i64 [ %indvars.iv.next26, %for.inc7 ], [ 0, %entry ] %cmp217 = icmp sgt i32 %0, 0 br i1 %cmp217, label %for.body3, label %for.cond1.preheader.for.inc7_crit_edge for.cond1.preheader.for.inc7_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %0 to i64 br label %for.inc7 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %indvars.iv25, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %1 = load i32, ptr %num, align 4, !tbaa !5 %2 = sext i32 %1 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %2 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !12 for.inc7: ; preds = %for.body3, %for.cond1.preheader.for.inc7_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc7_crit_edge ], [ %2, %for.body3 ] %3 = phi i32 [ %0, %for.cond1.preheader.for.inc7_crit_edge ], [ %1, %for.body3 ] %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1 %cmp = icmp slt i64 %indvars.iv.next26, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.end9, !llvm.loop !13 for.end9: ; preds = %for.inc7 store i32 0, ptr @d, align 16, !tbaa !5 store i32 1, ptr @v, align 16, !tbaa !5 %cmp67.i = icmp sgt i32 %3, 1 br i1 %cmp67.i, label %while.cond.preheader.thread.i, label %while.cond.preheader.i while.cond.preheader.thread.i: ; preds = %for.end9 %4 = add nsw i32 %3, -1 %5 = zext i32 %4 to i64 %6 = shl nuw nsw i64 %5, 2 call void @llvm.memset.p0.i64(ptr nonnull align 4 getelementptr inbounds ([100 x i32], ptr @v, i64 0, i64 1), i8 0, i64 %6, i1 false), !tbaa !5 %7 = zext i32 %3 to i64 br label %while.cond.us.preheader.i while.cond.preheader.i: ; preds = %for.end9 %cmp569.i = icmp eq i32 %3, 1 br i1 %cmp569.i, label %while.cond.us.preheader.i, label %while.cond.preheader79.i while.cond.preheader79.i: ; preds = %while.cond.preheader.i.thread, %while.cond.preheader.i store i32 1, ptr @v, align 16, !tbaa !5 br label %if.end39.i while.cond.us.preheader.i: ; preds = %while.cond.preheader.i, %while.cond.preheader.thread.i %.lcssa1631 = phi i64 [ 1, %while.cond.preheader.i ], [ %7, %while.cond.preheader.thread.i ] %xtraiter = and i64 %.lcssa1631, 1 %8 = icmp eq i64 %.lcssa1631, 1 %unroll_iter = and i64 %.lcssa1631, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %while.cond.us.i while.cond.us.i: ; preds = %if.end39.us.i, %while.cond.us.preheader.i %indvars.iv88.i = phi i64 [ 1, %while.cond.us.preheader.i ], [ %indvars.iv.next89.i, %if.end39.us.i ] %minp.0.us.i = phi i32 [ undef, %while.cond.us.preheader.i ], [ %minp.3.us.us.i.lcssa, %if.end39.us.i ] %sum.0.us.i = phi i32 [ 0, %while.cond.us.preheader.i ], [ %add.us.i, %if.end39.us.i ] br label %for.cond4.preheader.us.us.i if.end39.us.i: ; preds = %for.end36.split.us.us.i %arrayidx41.us.i = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv88.i store i32 %minp.3.us.us.i.lcssa, ptr %arrayidx41.us.i, align 4, !tbaa !5 %idxprom42.us.i = sext i32 %minp.3.us.us.i.lcssa to i64 %arrayidx43.us.i = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %idxprom42.us.i store i32 1, ptr %arrayidx43.us.i, align 4, !tbaa !5 %add.us.i = add nsw i32 %min.2.us.us.i.lcssa, %sum.0.us.i %indvars.iv.next89.i = add nuw nsw i64 %indvars.iv88.i, 1 br label %while.cond.us.i for.cond4.preheader.us.us.i: ; preds = %for.cond4.for.inc34_crit_edge.us.us.i, %while.cond.us.i %indvars.iv83.i = phi i64 [ %indvars.iv.next84.i, %for.cond4.for.inc34_crit_edge.us.us.i ], [ 0, %while.cond.us.i ] %minp.176.us.us.i = phi i32 [ %minp.3.us.us.i.lcssa, %for.cond4.for.inc34_crit_edge.us.us.i ], [ %minp.0.us.i, %while.cond.us.i ] %min.075.us.us.i = phi i32 [ %min.2.us.us.i.lcssa, %for.cond4.for.inc34_crit_edge.us.us.i ], [ 2001, %while.cond.us.i ] %arrayidx8.us.us.i = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv83.i %9 = load i32, ptr %arrayidx8.us.us.i, align 4, !tbaa !5 %idxprom9.us.us.i = sext i32 %9 to i64 br i1 %8, label %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa, label %for.body6.us.us.i for.body6.us.us.i: ; preds = %for.cond4.preheader.us.us.i, %for.inc31.us.us.i.1 %indvars.iv.i = phi i64 [ %indvars.iv.next.i.1, %for.inc31.us.us.i.1 ], [ 0, %for.cond4.preheader.us.us.i ] %minp.272.us.us.i = phi i32 [ %minp.3.us.us.i.1, %for.inc31.us.us.i.1 ], [ %minp.176.us.us.i, %for.cond4.preheader.us.us.i ] %min.171.us.us.i = phi i32 [ %min.2.us.us.i.1, %for.inc31.us.us.i.1 ], [ %min.075.us.us.i, %for.cond4.preheader.us.us.i ] %niter = phi i64 [ %niter.next.1, %for.inc31.us.us.i.1 ], [ 0, %for.cond4.preheader.us.us.i ] %arrayidx12.us.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us.i, i64 %indvars.iv.i %10 = load i32, ptr %arrayidx12.us.us.i, align 8, !tbaa !5 %cmp13.us.us.i = icmp sge i32 %10, %min.171.us.us.i %cmp20.not.us.us.i = icmp eq i32 %10, -1 %or.cond.us.us.i = or i1 %cmp13.us.us.i, %cmp20.not.us.us.i br i1 %or.cond.us.us.i, label %for.inc31.us.us.i, label %land.lhs.true21.us.us.i land.lhs.true21.us.us.i: ; preds = %for.body6.us.us.i %arrayidx23.us.us.i = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv.i %11 = load i32, ptr %arrayidx23.us.us.i, align 8, !tbaa !5 %cmp24.not.us.us.i = icmp eq i32 %11, 1 %spec.select.us.us.i = select i1 %cmp24.not.us.us.i, i32 %min.171.us.us.i, i32 %10 %12 = trunc i64 %indvars.iv.i to i32 %spec.select66.us.us.i = select i1 %cmp24.not.us.us.i, i32 %minp.272.us.us.i, i32 %12 br label %for.inc31.us.us.i for.inc31.us.us.i: ; preds = %land.lhs.true21.us.us.i, %for.body6.us.us.i %min.2.us.us.i = phi i32 [ %min.171.us.us.i, %for.body6.us.us.i ], [ %spec.select.us.us.i, %land.lhs.true21.us.us.i ] %minp.3.us.us.i = phi i32 [ %minp.272.us.us.i, %for.body6.us.us.i ], [ %spec.select66.us.us.i, %land.lhs.true21.us.us.i ] %indvars.iv.next.i = or i64 %indvars.iv.i, 1 %arrayidx12.us.us.i.1 = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us.i, i64 %indvars.iv.next.i %13 = load i32, ptr %arrayidx12.us.us.i.1, align 4, !tbaa !5 %cmp13.us.us.i.1 = icmp sge i32 %13, %min.2.us.us.i %cmp20.not.us.us.i.1 = icmp eq i32 %13, -1 %or.cond.us.us.i.1 = or i1 %cmp13.us.us.i.1, %cmp20.not.us.us.i.1 br i1 %or.cond.us.us.i.1, label %for.inc31.us.us.i.1, label %land.lhs.true21.us.us.i.1 land.lhs.true21.us.us.i.1: ; preds = %for.inc31.us.us.i %arrayidx23.us.us.i.1 = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv.next.i %14 = load i32, ptr %arrayidx23.us.us.i.1, align 4, !tbaa !5 %cmp24.not.us.us.i.1 = icmp eq i32 %14, 1 %spec.select.us.us.i.1 = select i1 %cmp24.not.us.us.i.1, i32 %min.2.us.us.i, i32 %13 %15 = trunc i64 %indvars.iv.next.i to i32 %spec.select66.us.us.i.1 = select i1 %cmp24.not.us.us.i.1, i32 %minp.3.us.us.i, i32 %15 br label %for.inc31.us.us.i.1 for.inc31.us.us.i.1: ; preds = %land.lhs.true21.us.us.i.1, %for.inc31.us.us.i %min.2.us.us.i.1 = phi i32 [ %min.2.us.us.i, %for.inc31.us.us.i ], [ %spec.select.us.us.i.1, %land.lhs.true21.us.us.i.1 ] %minp.3.us.us.i.1 = phi i32 [ %minp.3.us.us.i, %for.inc31.us.us.i ], [ %spec.select66.us.us.i.1, %land.lhs.true21.us.us.i.1 ] %indvars.iv.next.i.1 = add nuw nsw i64 %indvars.iv.i, 2 %niter.next.1 = add i64 %niter, 2 %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter br i1 %niter.ncmp.1, label %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa, label %for.body6.us.us.i, !llvm.loop !9 for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa: ; preds = %for.inc31.us.us.i.1, %for.cond4.preheader.us.us.i %min.2.us.us.i.lcssa.ph = phi i32 [ undef, %for.cond4.preheader.us.us.i ], [ %min.2.us.us.i.1, %for.inc31.us.us.i.1 ] %minp.3.us.us.i.lcssa.ph = phi i32 [ undef, %for.cond4.preheader.us.us.i ], [ %minp.3.us.us.i.1, %for.inc31.us.us.i.1 ] %indvars.iv.i.unr = phi i64 [ 0, %for.cond4.preheader.us.us.i ], [ %indvars.iv.next.i.1, %for.inc31.us.us.i.1 ] %minp.272.us.us.i.unr = phi i32 [ %minp.176.us.us.i, %for.cond4.preheader.us.us.i ], [ %minp.3.us.us.i.1, %for.inc31.us.us.i.1 ] %min.171.us.us.i.unr = phi i32 [ %min.075.us.us.i, %for.cond4.preheader.us.us.i ], [ %min.2.us.us.i.1, %for.inc31.us.us.i.1 ] br i1 %lcmp.mod.not, label %for.cond4.for.inc34_crit_edge.us.us.i, label %for.body6.us.us.i.epil for.body6.us.us.i.epil: ; preds = %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa %arrayidx12.us.us.i.epil = getelementptr inbounds [100 x [100 x i32]], ptr @G, i64 0, i64 %idxprom9.us.us.i, i64 %indvars.iv.i.unr %16 = load i32, ptr %arrayidx12.us.us.i.epil, align 4, !tbaa !5 %cmp13.us.us.i.epil = icmp sge i32 %16, %min.171.us.us.i.unr %cmp20.not.us.us.i.epil = icmp eq i32 %16, -1 %or.cond.us.us.i.epil = or i1 %cmp13.us.us.i.epil, %cmp20.not.us.us.i.epil br i1 %or.cond.us.us.i.epil, label %for.cond4.for.inc34_crit_edge.us.us.i, label %land.lhs.true21.us.us.i.epil land.lhs.true21.us.us.i.epil: ; preds = %for.body6.us.us.i.epil %arrayidx23.us.us.i.epil = getelementptr inbounds [100 x i32], ptr @v, i64 0, i64 %indvars.iv.i.unr %17 = load i32, ptr %arrayidx23.us.us.i.epil, align 4, !tbaa !5 %cmp24.not.us.us.i.epil = icmp eq i32 %17, 1 %spec.select.us.us.i.epil = select i1 %cmp24.not.us.us.i.epil, i32 %min.171.us.us.i.unr, i32 %16 %18 = trunc i64 %indvars.iv.i.unr to i32 %spec.select66.us.us.i.epil = select i1 %cmp24.not.us.us.i.epil, i32 %minp.272.us.us.i.unr, i32 %18 br label %for.cond4.for.inc34_crit_edge.us.us.i for.cond4.for.inc34_crit_edge.us.us.i: ; preds = %for.body6.us.us.i.epil, %land.lhs.true21.us.us.i.epil, %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa %min.2.us.us.i.lcssa = phi i32 [ %min.2.us.us.i.lcssa.ph, %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa ], [ %min.171.us.us.i.unr, %for.body6.us.us.i.epil ], [ %spec.select.us.us.i.epil, %land.lhs.true21.us.us.i.epil ] %minp.3.us.us.i.lcssa = phi i32 [ %minp.3.us.us.i.lcssa.ph, %for.cond4.for.inc34_crit_edge.us.us.i.unr-lcssa ], [ %minp.272.us.us.i.unr, %for.body6.us.us.i.epil ], [ %spec.select66.us.us.i.epil, %land.lhs.true21.us.us.i.epil ] %indvars.iv.next84.i = add nuw nsw i64 %indvars.iv83.i, 1 %exitcond87.not.i = icmp eq i64 %indvars.iv.next84.i, %indvars.iv88.i br i1 %exitcond87.not.i, label %for.end36.split.us.us.i, label %for.cond4.preheader.us.us.i, !llvm.loop !11 for.end36.split.us.us.i: ; preds = %for.cond4.for.inc34_crit_edge.us.us.i %cmp37.us.i = icmp eq i64 %indvars.iv88.i, %.lcssa1631 br i1 %cmp37.us.i, label %MST.exit, label %if.end39.us.i if.end39.i: ; preds = %if.end39.i, %while.cond.preheader79.i br label %if.end39.i MST.exit: ; preds = %for.end36.split.us.us.i %call11 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.us.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %num) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { 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} !13 = distinct !{!13, !10, !14} !14 = !{!"llvm.loop.unswitch.partial.disable"}
#include<stdio.h> static const int MAX = 500; static const int INFTY = (1<<21); int main(void){ int n, i, j, e, sum; int x,y; int M[MAX][MAX]; int d[MAX]; int key[MAX],PI[MAX]; scanf("%d", &n); for ( i = 0; i< n; i++ ){ for ( j = 0; j < n; j++ ){ scanf("%d", &e); M[i][j] = (e==-1)?INFTY:e; } } for(i=0;i<n;i++){ PI[i]=-1; key[i]=INFTY; d[i]=0; } key[0]=0; while(1){ x=-1; y=INFTY; for(i=0;i<n;i++){ if(y>key[i] && (d[i]==0)){ x=i; y=key[i]; } } if(x==-1)break; d[x]=1; for(i=0;i<n;i++){ if(key[i]>=M[x][i] && (d[i]==0)){ PI[i]=x; key[i]=M[x][i]; } } } sum = 0; for ( i = 0; i < n; i++ ){ if ( PI[i] != -1 ) sum += M[i][PI[i]]; } printf("%d\n", sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199336/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199336/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %e = 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 %e) #5 %0 = tail call ptr @llvm.stacksave.p0() %vla125 = alloca [250000 x i32], align 16 %vla1126 = alloca [500 x i32], align 16 %vla2127 = alloca [500 x i32], align 16 %vla3128 = alloca [500 x i32], align 16 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %1 = load i32, ptr %n, align 4, !tbaa !5 %cmp132 = icmp sgt i32 %1, 0 br i1 %cmp132, label %for.cond4.preheader, label %for.cond14.preheader for.cond4.preheader: ; preds = %entry, %for.inc11 %2 = phi i32 [ %12, %for.inc11 ], [ %1, %entry ] %indvars.iv178 = phi i64 [ %indvars.iv.next179, %for.inc11 ], [ 0, %entry ] %cmp5130 = icmp sgt i32 %2, 0 br i1 %cmp5130, label %for.body6.lr.ph, label %for.cond4.preheader.for.inc11_crit_edge for.cond4.preheader.for.inc11_crit_edge: ; preds = %for.cond4.preheader %.pre = sext i32 %2 to i64 br label %for.inc11 for.body6.lr.ph: ; preds = %for.cond4.preheader %3 = mul nuw nsw i64 %indvars.iv178, 500 %arrayidx = getelementptr inbounds i32, ptr %vla125, i64 %3 br label %for.body6 for.cond14.preheader: ; preds = %for.inc11, %entry %.lcssa = phi i32 [ %1, %entry ], [ %12, %for.inc11 ] %.lcssa.fr = freeze i32 %.lcssa %cmp15134 = icmp sgt i32 %.lcssa.fr, 0 br i1 %cmp15134, label %for.body16.preheader, label %for.end89 for.body16.preheader: ; preds = %for.cond14.preheader %4 = zext i32 %.lcssa.fr to i64 %5 = shl nuw nsw i64 %4, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla3128, i8 -1, i64 %5, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla1126, i8 0, i64 %5, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.lcssa.fr, 8 br i1 %min.iters.check, label %for.body16.preheader210, label %vector.ph vector.ph: ; preds = %for.body16.preheader %n.vec = and i64 %4, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %6 = getelementptr inbounds i32, ptr %vla2127, i64 %index store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %6, align 16, !tbaa !5 %7 = getelementptr inbounds i32, ptr %6, i64 4 store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %7, align 16, !tbaa !5 %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 %cmp.n = icmp eq i64 %n.vec, %4 br i1 %cmp.n, label %for.end25, label %for.body16.preheader210 for.body16.preheader210: ; preds = %for.body16.preheader, %middle.block %indvars.iv181.ph = phi i64 [ 0, %for.body16.preheader ], [ %n.vec, %middle.block ] br label %for.body16 for.body6: ; preds = %for.body6.lr.ph, %for.body6 %indvars.iv = phi i64 [ 0, %for.body6.lr.ph ], [ %indvars.iv.next, %for.body6 ] %call7 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %e) %9 = load i32, ptr %e, align 4 %cmp8 = icmp eq i32 %9, -1 %cond = select i1 %cmp8, i32 2097152, i32 %9 %arrayidx10 = getelementptr inbounds i32, ptr %arrayidx, i64 %indvars.iv store i32 %cond, ptr %arrayidx10, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %10 = load i32, ptr %n, align 4, !tbaa !5 %11 = sext i32 %10 to i64 %cmp5 = icmp slt i64 %indvars.iv.next, %11 br i1 %cmp5, label %for.body6, label %for.inc11, !llvm.loop !13 for.inc11: ; preds = %for.body6, %for.cond4.preheader.for.inc11_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond4.preheader.for.inc11_crit_edge ], [ %11, %for.body6 ] %12 = phi i32 [ %2, %for.cond4.preheader.for.inc11_crit_edge ], [ %10, %for.body6 ] %indvars.iv.next179 = add nuw nsw i64 %indvars.iv178, 1 %cmp = icmp slt i64 %indvars.iv.next179, %.pre-phi br i1 %cmp, label %for.cond4.preheader, label %for.cond14.preheader, !llvm.loop !14 for.body16: ; preds = %for.body16.preheader210, %for.body16 %indvars.iv181 = phi i64 [ %indvars.iv.next182, %for.body16 ], [ %indvars.iv181.ph, %for.body16.preheader210 ] %arrayidx20 = getelementptr inbounds i32, ptr %vla2127, i64 %indvars.iv181 store i32 2097152, ptr %arrayidx20, align 4, !tbaa !5 %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1 %exitcond.not = icmp eq i64 %indvars.iv.next182, %4 br i1 %exitcond.not, label %for.end25, label %for.body16, !llvm.loop !16 for.end25: ; preds = %for.body16, %middle.block store i32 0, ptr %vla2127, align 16, !tbaa !5 br i1 %cmp15134, label %while.cond.us.preheader, label %for.end89 while.cond.us.preheader: ; preds = %for.end25 %wide.trip.count192 = zext i32 %.lcssa.fr to i64 %13 = add nsw i64 %4, -1 %xtraiter = and i64 %4, 1 %14 = icmp eq i64 %13, 0 %unroll_iter = and i64 %4, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body29.us while.cond.us.loopexit.unr-lcssa: ; preds = %for.inc70.us.1, %if.end43.us %indvars.iv194.unr = phi i64 [ 0, %if.end43.us ], [ %indvars.iv.next195.1, %for.inc70.us.1 ] br i1 %lcmp.mod.not, label %for.body29.us.backedge, label %for.body48.us.epil for.body48.us.epil: ; preds = %while.cond.us.loopexit.unr-lcssa %arrayidx50.us.epil = getelementptr inbounds i32, ptr %vla2127, i64 %indvars.iv194.unr %15 = load i32, ptr %arrayidx50.us.epil, align 4, !tbaa !5 %arrayidx54.us.epil = getelementptr inbounds i32, ptr %arrayidx52.us, i64 %indvars.iv194.unr %16 = load i32, ptr %arrayidx54.us.epil, align 4, !tbaa !5 %cmp55.not.us.epil = icmp slt i32 %15, %16 br i1 %cmp55.not.us.epil, label %for.body29.us.backedge, label %land.lhs.true56.us.epil land.lhs.true56.us.epil: ; preds = %for.body48.us.epil %arrayidx58.us.epil = getelementptr inbounds i32, ptr %vla1126, i64 %indvars.iv194.unr %17 = load i32, ptr %arrayidx58.us.epil, align 4, !tbaa !5 %cmp59.us.epil = icmp eq i32 %17, 0 br i1 %cmp59.us.epil, label %if.then60.us.epil, label %for.body29.us.backedge if.then60.us.epil: ; preds = %land.lhs.true56.us.epil %arrayidx62.us.epil = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv194.unr store i32 %x.1.us, ptr %arrayidx62.us.epil, align 4, !tbaa !5 store i32 %16, ptr %arrayidx50.us.epil, align 4, !tbaa !5 br label %for.body29.us.backedge for.end40.us: ; preds = %for.inc38.us %cmp41.us = icmp eq i32 %x.1.us, -1 br i1 %cmp41.us, label %for.cond73.preheader, label %if.end43.us if.end43.us: ; preds = %for.end40.us %idxprom44.us = sext i32 %x.1.us to i64 %arrayidx45.us = getelementptr inbounds i32, ptr %vla1126, i64 %idxprom44.us store i32 1, ptr %arrayidx45.us, align 4, !tbaa !5 %18 = mul nsw i64 %idxprom44.us, 500 %arrayidx52.us = getelementptr inbounds i32, ptr %vla125, i64 %18 br i1 %14, label %while.cond.us.loopexit.unr-lcssa, label %for.body48.us for.body48.us: ; preds = %if.end43.us, %for.inc70.us.1 %indvars.iv194 = phi i64 [ %indvars.iv.next195.1, %for.inc70.us.1 ], [ 0, %if.end43.us ] %niter = phi i64 [ %niter.next.1, %for.inc70.us.1 ], [ 0, %if.end43.us ] %arrayidx50.us = getelementptr inbounds i32, ptr %vla2127, i64 %indvars.iv194 %19 = load i32, ptr %arrayidx50.us, align 8, !tbaa !5 %arrayidx54.us = getelementptr inbounds i32, ptr %arrayidx52.us, i64 %indvars.iv194 %20 = load i32, ptr %arrayidx54.us, align 8, !tbaa !5 %cmp55.not.us = icmp slt i32 %19, %20 br i1 %cmp55.not.us, label %for.inc70.us, label %land.lhs.true56.us land.lhs.true56.us: ; preds = %for.body48.us %arrayidx58.us = getelementptr inbounds i32, ptr %vla1126, i64 %indvars.iv194 %21 = load i32, ptr %arrayidx58.us, align 8, !tbaa !5 %cmp59.us = icmp eq i32 %21, 0 br i1 %cmp59.us, label %if.then60.us, label %for.inc70.us if.then60.us: ; preds = %land.lhs.true56.us %arrayidx62.us = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv194 store i32 %x.1.us, ptr %arrayidx62.us, align 8, !tbaa !5 store i32 %20, ptr %arrayidx50.us, align 8, !tbaa !5 br label %for.inc70.us for.inc70.us: ; preds = %if.then60.us, %land.lhs.true56.us, %for.body48.us %indvars.iv.next195 = or i64 %indvars.iv194, 1 %arrayidx50.us.1 = getelementptr inbounds i32, ptr %vla2127, i64 %indvars.iv.next195 %22 = load i32, ptr %arrayidx50.us.1, align 4, !tbaa !5 %arrayidx54.us.1 = getelementptr inbounds i32, ptr %arrayidx52.us, i64 %indvars.iv.next195 %23 = load i32, ptr %arrayidx54.us.1, align 4, !tbaa !5 %cmp55.not.us.1 = icmp slt i32 %22, %23 br i1 %cmp55.not.us.1, label %for.inc70.us.1, label %land.lhs.true56.us.1 land.lhs.true56.us.1: ; preds = %for.inc70.us %arrayidx58.us.1 = getelementptr inbounds i32, ptr %vla1126, i64 %indvars.iv.next195 %24 = load i32, ptr %arrayidx58.us.1, align 4, !tbaa !5 %cmp59.us.1 = icmp eq i32 %24, 0 br i1 %cmp59.us.1, label %if.then60.us.1, label %for.inc70.us.1 if.then60.us.1: ; preds = %land.lhs.true56.us.1 %arrayidx62.us.1 = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv.next195 store i32 %x.1.us, ptr %arrayidx62.us.1, align 4, !tbaa !5 store i32 %23, ptr %arrayidx50.us.1, align 4, !tbaa !5 br label %for.inc70.us.1 for.inc70.us.1: ; preds = %if.then60.us.1, %land.lhs.true56.us.1, %for.inc70.us %indvars.iv.next195.1 = add nuw nsw i64 %indvars.iv194, 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 %while.cond.us.loopexit.unr-lcssa, label %for.body48.us, !llvm.loop !17 for.body29.us: ; preds = %for.body29.us.backedge, %while.cond.us.preheader %indvars.iv189 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv189.be, %for.body29.us.backedge ] %y.0139.us = phi i32 [ 2097152, %while.cond.us.preheader ], [ %y.0139.us.be, %for.body29.us.backedge ] %x.0138.us = phi i32 [ -1, %while.cond.us.preheader ], [ %x.0138.us.be, %for.body29.us.backedge ] %arrayidx31.us = getelementptr inbounds i32, ptr %vla2127, i64 %indvars.iv189 %25 = load i32, ptr %arrayidx31.us, align 4, !tbaa !5 %cmp32.us = icmp sgt i32 %y.0139.us, %25 br i1 %cmp32.us, label %land.lhs.true.us, label %for.inc38.us land.lhs.true.us: ; preds = %for.body29.us %arrayidx34.us = getelementptr inbounds i32, ptr %vla1126, i64 %indvars.iv189 %26 = load i32, ptr %arrayidx34.us, align 4, !tbaa !5 %cmp35.us = icmp eq i32 %26, 0 %27 = trunc i64 %indvars.iv189 to i32 %spec.select.us = select i1 %cmp35.us, i32 %27, i32 %x.0138.us %spec.select129.us = select i1 %cmp35.us, i32 %25, i32 %y.0139.us br label %for.inc38.us for.inc38.us: ; preds = %land.lhs.true.us, %for.body29.us %x.1.us = phi i32 [ %x.0138.us, %for.body29.us ], [ %spec.select.us, %land.lhs.true.us ] %y.1.us = phi i32 [ %y.0139.us, %for.body29.us ], [ %spec.select129.us, %land.lhs.true.us ] %indvars.iv.next190 = add nuw nsw i64 %indvars.iv189, 1 %exitcond193.not = icmp eq i64 %indvars.iv.next190, %wide.trip.count192 br i1 %exitcond193.not, label %for.end40.us, label %for.body29.us.backedge for.body29.us.backedge: ; preds = %while.cond.us.loopexit.unr-lcssa, %if.then60.us.epil, %land.lhs.true56.us.epil, %for.body48.us.epil, %for.inc38.us %indvars.iv189.be = phi i64 [ %indvars.iv.next190, %for.inc38.us ], [ 0, %for.body48.us.epil ], [ 0, %land.lhs.true56.us.epil ], [ 0, %if.then60.us.epil ], [ 0, %while.cond.us.loopexit.unr-lcssa ] %y.0139.us.be = phi i32 [ %y.1.us, %for.inc38.us ], [ 2097152, %for.body48.us.epil ], [ 2097152, %land.lhs.true56.us.epil ], [ 2097152, %if.then60.us.epil ], [ 2097152, %while.cond.us.loopexit.unr-lcssa ] %x.0138.us.be = phi i32 [ %x.1.us, %for.inc38.us ], [ -1, %for.body48.us.epil ], [ -1, %land.lhs.true56.us.epil ], [ -1, %if.then60.us.epil ], [ -1, %while.cond.us.loopexit.unr-lcssa ] br label %for.body29.us, !llvm.loop !17 for.cond73.preheader: ; preds = %for.end40.us br i1 %cmp15134, label %for.body75.preheader, label %for.end89 for.body75.preheader: ; preds = %for.cond73.preheader %xtraiter214 = and i64 %4, 1 %28 = icmp eq i64 %13, 0 br i1 %28, label %for.end89.loopexit.unr-lcssa, label %for.body75.preheader.new for.body75.preheader.new: ; preds = %for.body75.preheader %unroll_iter217 = and i64 %4, 4294967294 br label %for.body75 for.body75: ; preds = %for.inc87.1, %for.body75.preheader.new %indvars.iv199 = phi i64 [ 0, %for.body75.preheader.new ], [ %indvars.iv.next200.1, %for.inc87.1 ] %sum.0172 = phi i32 [ 0, %for.body75.preheader.new ], [ %sum.1.1, %for.inc87.1 ] %niter218 = phi i64 [ 0, %for.body75.preheader.new ], [ %niter218.next.1, %for.inc87.1 ] %arrayidx77 = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv199 %29 = load i32, ptr %arrayidx77, align 8, !tbaa !5 %cmp78.not = icmp eq i32 %29, -1 br i1 %cmp78.not, label %for.inc87, label %if.then79 if.then79: ; preds = %for.body75 %30 = mul nuw nsw i64 %indvars.iv199, 500 %arrayidx81 = getelementptr inbounds i32, ptr %vla125, i64 %30 %idxprom84 = sext i32 %29 to i64 %arrayidx85 = getelementptr inbounds i32, ptr %arrayidx81, i64 %idxprom84 %31 = load i32, ptr %arrayidx85, align 4, !tbaa !5 %add = add nsw i32 %31, %sum.0172 br label %for.inc87 for.inc87: ; preds = %for.body75, %if.then79 %sum.1 = phi i32 [ %add, %if.then79 ], [ %sum.0172, %for.body75 ] %indvars.iv.next200 = or i64 %indvars.iv199, 1 %arrayidx77.1 = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv.next200 %32 = load i32, ptr %arrayidx77.1, align 4, !tbaa !5 %cmp78.not.1 = icmp eq i32 %32, -1 br i1 %cmp78.not.1, label %for.inc87.1, label %if.then79.1 if.then79.1: ; preds = %for.inc87 %33 = mul nuw nsw i64 %indvars.iv.next200, 500 %arrayidx81.1 = getelementptr inbounds i32, ptr %vla125, i64 %33 %idxprom84.1 = sext i32 %32 to i64 %arrayidx85.1 = getelementptr inbounds i32, ptr %arrayidx81.1, i64 %idxprom84.1 %34 = load i32, ptr %arrayidx85.1, align 4, !tbaa !5 %add.1 = add nsw i32 %34, %sum.1 br label %for.inc87.1 for.inc87.1: ; preds = %if.then79.1, %for.inc87 %sum.1.1 = phi i32 [ %add.1, %if.then79.1 ], [ %sum.1, %for.inc87 ] %indvars.iv.next200.1 = add nuw nsw i64 %indvars.iv199, 2 %niter218.next.1 = add i64 %niter218, 2 %niter218.ncmp.1 = icmp eq i64 %niter218.next.1, %unroll_iter217 br i1 %niter218.ncmp.1, label %for.end89.loopexit.unr-lcssa, label %for.body75, !llvm.loop !18 for.end89.loopexit.unr-lcssa: ; preds = %for.inc87.1, %for.body75.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body75.preheader ], [ %sum.1.1, %for.inc87.1 ] %indvars.iv199.unr = phi i64 [ 0, %for.body75.preheader ], [ %indvars.iv.next200.1, %for.inc87.1 ] %sum.0172.unr = phi i32 [ 0, %for.body75.preheader ], [ %sum.1.1, %for.inc87.1 ] %lcmp.mod215.not = icmp eq i64 %xtraiter214, 0 br i1 %lcmp.mod215.not, label %for.end89, label %for.body75.epil for.body75.epil: ; preds = %for.end89.loopexit.unr-lcssa %arrayidx77.epil = getelementptr inbounds i32, ptr %vla3128, i64 %indvars.iv199.unr %35 = load i32, ptr %arrayidx77.epil, align 4, !tbaa !5 %cmp78.not.epil = icmp eq i32 %35, -1 br i1 %cmp78.not.epil, label %for.end89, label %if.then79.epil if.then79.epil: ; preds = %for.body75.epil %36 = mul nuw nsw i64 %indvars.iv199.unr, 500 %arrayidx81.epil = getelementptr inbounds i32, ptr %vla125, i64 %36 %idxprom84.epil = sext i32 %35 to i64 %arrayidx85.epil = getelementptr inbounds i32, ptr %arrayidx81.epil, i64 %idxprom84.epil %37 = load i32, ptr %arrayidx85.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %37, %sum.0172.unr br label %for.end89 for.end89: ; preds = %for.end89.loopexit.unr-lcssa, %if.then79.epil, %for.body75.epil, %for.cond14.preheader, %for.end25, %for.cond73.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond73.preheader ], [ 0, %for.end25 ], [ 0, %for.cond14.preheader ], [ %sum.1.lcssa.ph, %for.end89.loopexit.unr-lcssa ], [ %add.epil, %if.then79.epil ], [ %sum.0172.unr, %for.body75.epil ] %call90 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.stackrestore.p0(ptr %0) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %e) #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: mustprogress nocallback nofree nosync nounwind willreturn declare ptr @llvm.stacksave.p0() #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 declare void @llvm.stackrestore.p0(ptr) #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) #4 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn } 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 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, !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, !15} !15 = !{!"llvm.loop.unswitch.partial.disable"} !16 = distinct !{!16, !10, !12, !11} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include<stdio.h> int main() { int n; scanf("%d",&n); if(n%10==0) printf("%d\n",n); else if(n%10==1) printf("%d\n",n-1); else if(n%10==2) printf("%d\n",n-2); else if(n%10==3) printf("%d\n",n-3); else if(n%10==4) printf("%d\n",n-4); else if(n%10==5) printf("%d\n",n-5); else if(n%10==6) printf("%d\n",n+4); else if(n%10==7) printf("%d\n",n+3); else if(n%10==8) printf("%d\n",n+2); else if(n%10==9) printf("%d\n",n+1); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19938/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19938/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [3 x i8] c"%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i32, ptr %n, align 4, !tbaa !5 %rem = srem i32 %0, 10 switch i32 %rem, label %if.end61 [ i32 0, label %if.end61.sink.split i32 1, label %if.then4 i32 2, label %if.then9 i32 3, label %if.then15 i32 4, label %if.then21 i32 5, label %if.then27 i32 6, label %if.then33 i32 7, label %if.then38 i32 8, label %if.then44 i32 9, label %if.then50 ] if.then4: ; preds = %entry %sub = add nsw i32 %0, -1 br label %if.end61.sink.split if.then9: ; preds = %entry %sub10 = add nsw i32 %0, -2 br label %if.end61.sink.split if.then15: ; preds = %entry %sub16 = add nsw i32 %0, -3 br label %if.end61.sink.split if.then21: ; preds = %entry %sub22 = add nsw i32 %0, -4 br label %if.end61.sink.split if.then27: ; preds = %entry %sub28 = add nsw i32 %0, -5 br label %if.end61.sink.split if.then33: ; preds = %entry %add = add nsw i32 %0, 4 br label %if.end61.sink.split if.then38: ; preds = %entry %add39 = add nsw i32 %0, 3 br label %if.end61.sink.split if.then44: ; preds = %entry %add45 = add nsw i32 %0, 2 br label %if.end61.sink.split if.then50: ; preds = %entry %add51 = add nsw i32 %0, 1 br label %if.end61.sink.split if.end61.sink.split: ; preds = %entry, %if.then9, %if.then21, %if.then33, %if.then44, %if.then50, %if.then38, %if.then27, %if.then15, %if.then4 %sub.sink = phi i32 [ %sub, %if.then4 ], [ %sub16, %if.then15 ], [ %sub28, %if.then27 ], [ %add39, %if.then38 ], [ %add51, %if.then50 ], [ %add45, %if.then44 ], [ %add, %if.then33 ], [ %sub22, %if.then21 ], [ %sub10, %if.then9 ], [ %0, %entry ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sub.sink) br label %if.end61 if.end61: ; preds = %if.end61.sink.split, %entry 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> void alg(); int n,data[100][100]; int main(){ int i,j,x,z; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ scanf("%d",&x); if(x==-1)data[i][j]=100000; else data[i][j]=x; } } alg(); return 0; } void alg(){ int i,flag[100],y[100],x[100],min,k,j,sum=0; for(i=0;i<n;i++){ flag[i]=0; x[i]=100000; y[i]=-1; } x[0]=0; while(1){ min=100000; k=-1; for(i=0;i<n;i++){ if(min>x[i] && flag[i]!=2){ min=x[i]; k=i; } } if(k==-1)break; flag[k]=2; for(i=0;i<n;i++){ if(data[k][i]!=100000 && flag[i]!=2){ if(data[k][i]<x[i]){ flag[i]=1; x[i]=data[k][i]; y[i]=k; } } } } for(i=0;i<n;i++){ if(y[i]!=-1)sum=sum+data[i][y[i]]; } printf("%d\n",sum); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199422/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199422/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 local_unnamed_addr global [100 x [100 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %x = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #4 %call = tail 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.cond1.preheader, label %for.end14 for.cond1.preheader: ; preds = %entry, %for.inc12 %1 = phi i32 [ %6, %for.inc12 ], [ %0, %entry ] %indvars.iv27 = phi i64 [ %indvars.iv.next28, %for.inc12 ], [ 0, %entry ] %cmp221 = icmp sgt i32 %1, 0 br i1 %cmp221, label %for.body3, label %for.cond1.preheader.for.inc12_crit_edge for.cond1.preheader.for.inc12_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc12 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x) %2 = load i32, ptr %x, align 4, !tbaa !5 %cmp5 = icmp eq i32 %2, -1 %spec.select = select i1 %cmp5, i32 100000, i32 %2 %3 = getelementptr inbounds [100 x [100 x i32]], ptr @data, i64 0, i64 %indvars.iv27, i64 %indvars.iv store i32 %spec.select, ptr %3, align 4 %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 %cmp2 = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp2, label %for.body3, label %for.inc12, !llvm.loop !9 for.inc12: ; preds = %for.body3, %for.cond1.preheader.for.inc12_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc12_crit_edge ], [ %5, %for.body3 ] %6 = phi i32 [ %1, %for.cond1.preheader.for.inc12_crit_edge ], [ %4, %for.body3 ] %indvars.iv.next28 = add nuw nsw i64 %indvars.iv27, 1 %cmp = icmp slt i64 %indvars.iv.next28, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.end14, !llvm.loop !11 for.end14: ; preds = %for.inc12, %entry call void @alg() call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local void @alg() local_unnamed_addr #0 { entry: %flag = alloca [100 x i32], align 16 %y = alloca [100 x i32], align 16 %x = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %flag) #4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %y) #4 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %x) #4 %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp112 = icmp sgt i32 %.fr, 0 br i1 %cmp112, label %for.body.preheader, label %for.end77 for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %flag, i8 0, i64 %2, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %y, i8 -1, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader174, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [100 x i32], ptr %x, i64 0, i64 %index store <4 x i32> <i32 100000, i32 100000, i32 100000, i32 100000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 100000, i32 100000, i32 100000, i32 100000>, ptr %4, align 16, !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 !13 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader174 for.body.preheader174: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader174, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader174 ] %arrayidx2 = getelementptr inbounds [100 x i32], ptr %x, i64 0, i64 %indvars.iv store i32 100000, ptr %arrayidx2, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !16 for.end: ; preds = %for.body, %middle.block store i32 0, ptr %x, align 16, !tbaa !5 br i1 %cmp112, label %while.cond.us.preheader, label %for.end77 while.cond.us.preheader: ; preds = %for.end %wide.trip.count162 = zext i32 %.fr to i64 %wide.trip.count167 = zext i32 %.fr to i64 br label %for.body8.us for.end19.us: ; preds = %for.inc17.us %cmp20.us = icmp eq i32 %k.1.us, -1 br i1 %cmp20.us, label %for.cond61.preheader, label %if.end22.us if.end22.us: ; preds = %for.end19.us %idxprom23.us = sext i32 %k.1.us to i64 %arrayidx24.us = getelementptr inbounds [100 x i32], ptr %flag, i64 0, i64 %idxprom23.us store i32 2, ptr %arrayidx24.us, align 4, !tbaa !5 br label %for.body27.us for.body27.us: ; preds = %if.end22.us, %for.inc58.us %indvars.iv164 = phi i64 [ 0, %if.end22.us ], [ %indvars.iv.next165, %for.inc58.us ] %arrayidx31.us = getelementptr inbounds [100 x [100 x i32]], ptr @data, i64 0, i64 %idxprom23.us, i64 %indvars.iv164 %6 = load i32, ptr %arrayidx31.us, align 4, !tbaa !5 %cmp32.not.us = icmp eq i32 %6, 100000 br i1 %cmp32.not.us, label %for.inc58.us, label %land.lhs.true33.us land.lhs.true33.us: ; preds = %for.body27.us %arrayidx35.us = getelementptr inbounds [100 x i32], ptr %flag, i64 0, i64 %indvars.iv164 %7 = load i32, ptr %arrayidx35.us, align 4, !tbaa !5 %cmp36.not.us = icmp eq i32 %7, 2 br i1 %cmp36.not.us, label %for.inc58.us, label %if.then37.us if.then37.us: ; preds = %land.lhs.true33.us %arrayidx43.us = getelementptr inbounds [100 x i32], ptr %x, i64 0, i64 %indvars.iv164 %8 = load i32, ptr %arrayidx43.us, align 4, !tbaa !5 %cmp44.us = icmp slt i32 %6, %8 br i1 %cmp44.us, label %if.then45.us, label %for.inc58.us if.then45.us: ; preds = %if.then37.us store i32 1, ptr %arrayidx35.us, align 4, !tbaa !5 store i32 %6, ptr %arrayidx43.us, align 4, !tbaa !5 %arrayidx55.us = getelementptr inbounds [100 x i32], ptr %y, i64 0, i64 %indvars.iv164 store i32 %k.1.us, ptr %arrayidx55.us, align 4, !tbaa !5 br label %for.inc58.us for.inc58.us: ; preds = %if.then45.us, %if.then37.us, %land.lhs.true33.us, %for.body27.us %indvars.iv.next165 = add nuw nsw i64 %indvars.iv164, 1 %exitcond168.not = icmp eq i64 %indvars.iv.next165, %wide.trip.count167 br i1 %exitcond168.not, label %for.body8.us.backedge, label %for.body27.us, !llvm.loop !17 for.body8.us: ; preds = %for.body8.us.backedge, %while.cond.us.preheader %indvars.iv159 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv159.be, %for.body8.us.backedge ] %k.0116.us = phi i32 [ -1, %while.cond.us.preheader ], [ %k.0116.us.be, %for.body8.us.backedge ] %min.0115.us = phi i32 [ 100000, %while.cond.us.preheader ], [ %min.0115.us.be, %for.body8.us.backedge ] %arrayidx10.us = getelementptr inbounds [100 x i32], ptr %x, i64 0, i64 %indvars.iv159 %9 = load i32, ptr %arrayidx10.us, align 4, !tbaa !5 %cmp11.us = icmp sgt i32 %min.0115.us, %9 br i1 %cmp11.us, label %land.lhs.true.us, label %for.inc17.us land.lhs.true.us: ; preds = %for.body8.us %arrayidx13.us = getelementptr inbounds [100 x i32], ptr %flag, i64 0, i64 %indvars.iv159 %10 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %cmp14.not.us = icmp eq i32 %10, 2 %spec.select.us = select i1 %cmp14.not.us, i32 %min.0115.us, i32 %9 %11 = trunc i64 %indvars.iv159 to i32 %spec.select111.us = select i1 %cmp14.not.us, i32 %k.0116.us, i32 %11 br label %for.inc17.us for.inc17.us: ; preds = %land.lhs.true.us, %for.body8.us %min.1.us = phi i32 [ %min.0115.us, %for.body8.us ], [ %spec.select.us, %land.lhs.true.us ] %k.1.us = phi i32 [ %k.0116.us, %for.body8.us ], [ %spec.select111.us, %land.lhs.true.us ] %indvars.iv.next160 = add nuw nsw i64 %indvars.iv159, 1 %exitcond163.not = icmp eq i64 %indvars.iv.next160, %wide.trip.count162 br i1 %exitcond163.not, label %for.end19.us, label %for.body8.us.backedge for.body8.us.backedge: ; preds = %for.inc58.us, %for.inc17.us %indvars.iv159.be = phi i64 [ %indvars.iv.next160, %for.inc17.us ], [ 0, %for.inc58.us ] %k.0116.us.be = phi i32 [ %k.1.us, %for.inc17.us ], [ -1, %for.inc58.us ] %min.0115.us.be = phi i32 [ %min.1.us, %for.inc17.us ], [ 100000, %for.inc58.us ] br label %for.body8.us, !llvm.loop !17 for.cond61.preheader: ; preds = %for.end19.us br i1 %cmp112, label %for.body63.preheader, label %for.end77 for.body63.preheader: ; preds = %for.cond61.preheader %xtraiter = and i64 %1, 1 %12 = icmp eq i32 %.fr, 1 br i1 %12, label %for.end77.loopexit.unr-lcssa, label %for.body63.preheader.new for.body63.preheader.new: ; preds = %for.body63.preheader %unroll_iter = and i64 %1, 4294967294 br label %for.body63 for.body63: ; preds = %for.inc75.1, %for.body63.preheader.new %indvars.iv169 = phi i64 [ 0, %for.body63.preheader.new ], [ %indvars.iv.next170.1, %for.inc75.1 ] %sum.0150 = phi i32 [ 0, %for.body63.preheader.new ], [ %sum.1.1, %for.inc75.1 ] %niter = phi i64 [ 0, %for.body63.preheader.new ], [ %niter.next.1, %for.inc75.1 ] %arrayidx65 = getelementptr inbounds [100 x i32], ptr %y, i64 0, i64 %indvars.iv169 %13 = load i32, ptr %arrayidx65, align 8, !tbaa !5 %cmp66.not = icmp eq i32 %13, -1 br i1 %cmp66.not, label %for.inc75, label %if.then67 if.then67: ; preds = %for.body63 %idxprom72 = sext i32 %13 to i64 %arrayidx73 = getelementptr inbounds [100 x [100 x i32]], ptr @data, i64 0, i64 %indvars.iv169, i64 %idxprom72 %14 = load i32, ptr %arrayidx73, align 4, !tbaa !5 %add = add nsw i32 %14, %sum.0150 br label %for.inc75 for.inc75: ; preds = %for.body63, %if.then67 %sum.1 = phi i32 [ %add, %if.then67 ], [ %sum.0150, %for.body63 ] %indvars.iv.next170 = or i64 %indvars.iv169, 1 %arrayidx65.1 = getelementptr inbounds [100 x i32], ptr %y, i64 0, i64 %indvars.iv.next170 %15 = load i32, ptr %arrayidx65.1, align 4, !tbaa !5 %cmp66.not.1 = icmp eq i32 %15, -1 br i1 %cmp66.not.1, label %for.inc75.1, label %if.then67.1 if.then67.1: ; preds = %for.inc75 %idxprom72.1 = sext i32 %15 to i64 %arrayidx73.1 = getelementptr inbounds [100 x [100 x i32]], ptr @data, i64 0, i64 %indvars.iv.next170, i64 %idxprom72.1 %16 = load i32, ptr %arrayidx73.1, align 4, !tbaa !5 %add.1 = add nsw i32 %16, %sum.1 br label %for.inc75.1 for.inc75.1: ; preds = %if.then67.1, %for.inc75 %sum.1.1 = phi i32 [ %add.1, %if.then67.1 ], [ %sum.1, %for.inc75 ] %indvars.iv.next170.1 = add nuw nsw i64 %indvars.iv169, 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.end77.loopexit.unr-lcssa, label %for.body63, !llvm.loop !18 for.end77.loopexit.unr-lcssa: ; preds = %for.inc75.1, %for.body63.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %indvars.iv169.unr = phi i64 [ 0, %for.body63.preheader ], [ %indvars.iv.next170.1, %for.inc75.1 ] %sum.0150.unr = phi i32 [ 0, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end77, label %for.body63.epil for.body63.epil: ; preds = %for.end77.loopexit.unr-lcssa %arrayidx65.epil = getelementptr inbounds [100 x i32], ptr %y, i64 0, i64 %indvars.iv169.unr %17 = load i32, ptr %arrayidx65.epil, align 4, !tbaa !5 %cmp66.not.epil = icmp eq i32 %17, -1 br i1 %cmp66.not.epil, label %for.end77, label %if.then67.epil if.then67.epil: ; preds = %for.body63.epil %idxprom72.epil = sext i32 %17 to i64 %arrayidx73.epil = getelementptr inbounds [100 x [100 x i32]], ptr @data, i64 0, i64 %indvars.iv169.unr, i64 %idxprom72.epil %18 = load i32, ptr %arrayidx73.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %18, %sum.0150.unr br label %for.end77 for.end77: ; preds = %for.end77.loopexit.unr-lcssa, %if.then67.epil, %for.body63.epil, %entry, %for.end, %for.cond61.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond61.preheader ], [ 0, %for.end ], [ 0, %entry ], [ %sum.1.lcssa.ph, %for.end77.loopexit.unr-lcssa ], [ %add.epil, %if.then67.epil ], [ %sum.0150.unr, %for.body63.epil ] %call = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %y) #4 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %flag) #4 ret void } ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10, !15, !14} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10}
#include<stdio.h> #define N 101 int main(){ int G[N][N],n,flg[N]={},s[N],i,j,c, m1,m2=1,mi,sum=0; for(i=1;i<=100;i++){ s[i]=1000000; } s[1]=0; scanf("%d",&n); for(i=1;i<=n;i++){ for(j=1;j<=n;j++){ scanf("%d",&G[i][j]); } } flg[1]=1; while(1){ c=0; for(i=1;i<=n;i++) if(flg[i]==1)c++; if(c==n)break; m1=10000000; for(i=1;i<=n;i++){ if(flg[i]!=1 && G[m2][i]!=-1 && s[i]>G[m2][i]) s[i] = G[m2][i]; if(flg[i]!=1 && m1>s[i]){ mi=i; m1=s[i]; } } sum+=m1; flg[mi]=1; s[mi]=m1; m2=mi; } printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199473/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199473/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %G = alloca [101 x [101 x i32]], align 16 %n = alloca i32, align 4 %flg = alloca [101 x i32], align 16 %s = alloca [101 x i32], align 16 call void @llvm.lifetime.start.p0(i64 40804, ptr nonnull %G) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %flg) #5 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(404) %flg, i8 0, i64 404, i1 false) call void @llvm.lifetime.start.p0(i64 404, ptr nonnull %s) #5 %0 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 1 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %0, align 4, !tbaa !5 %1 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 5 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %1, align 4, !tbaa !5 %2 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 9 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %2, align 4, !tbaa !5 %3 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 13 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %3, align 4, !tbaa !5 %4 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 17 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %4, align 4, !tbaa !5 %5 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 21 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %5, align 4, !tbaa !5 %6 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 25 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %6, align 4, !tbaa !5 %7 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 29 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %7, align 4, !tbaa !5 %8 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 33 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %8, align 4, !tbaa !5 %9 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 37 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %9, align 4, !tbaa !5 %10 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 41 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %10, align 4, !tbaa !5 %11 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 45 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %11, align 4, !tbaa !5 %12 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 49 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %12, align 4, !tbaa !5 %13 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 53 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %13, align 4, !tbaa !5 %14 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 57 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %14, align 4, !tbaa !5 %15 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 61 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %15, align 4, !tbaa !5 %16 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 65 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %16, align 4, !tbaa !5 %17 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 69 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %17, align 4, !tbaa !5 %18 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 73 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %18, align 4, !tbaa !5 %19 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 77 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %19, align 4, !tbaa !5 %20 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 81 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %20, align 4, !tbaa !5 %21 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 85 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %21, align 4, !tbaa !5 %22 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 89 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %22, align 4, !tbaa !5 %23 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 93 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %23, align 4, !tbaa !5 %24 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 97 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %24, align 4, !tbaa !5 %arrayidx1 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 1 store i32 0, ptr %arrayidx1, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %25 = load i32, ptr %n, align 4, !tbaa !5 %cmp3.not116 = icmp slt i32 %25, 1 br i1 %cmp3.not116, label %for.end18, label %for.cond5.preheader for.cond5.preheader: ; preds = %entry, %for.inc16 %26 = phi i32 [ %29, %for.inc16 ], [ %25, %entry ] %indvars.iv145 = phi i64 [ %indvars.iv.next146, %for.inc16 ], [ 1, %entry ] %cmp6.not114 = icmp slt i32 %26, 1 br i1 %cmp6.not114, label %for.cond5.preheader.for.inc16_crit_edge, label %for.body7 for.cond5.preheader.for.inc16_crit_edge: ; preds = %for.cond5.preheader %.pre162 = sext i32 %26 to i64 br label %for.inc16 for.body7: ; preds = %for.cond5.preheader, %for.body7 %indvars.iv142 = phi i64 [ %indvars.iv.next143, %for.body7 ], [ 1, %for.cond5.preheader ] %arrayidx11 = getelementptr inbounds [101 x [101 x i32]], ptr %G, i64 0, i64 %indvars.iv145, i64 %indvars.iv142 %call12 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx11) %indvars.iv.next143 = add nuw nsw i64 %indvars.iv142, 1 %27 = load i32, ptr %n, align 4, !tbaa !5 %28 = sext i32 %27 to i64 %cmp6.not.not = icmp slt i64 %indvars.iv142, %28 br i1 %cmp6.not.not, label %for.body7, label %for.inc16, !llvm.loop !9 for.inc16: ; preds = %for.body7, %for.cond5.preheader.for.inc16_crit_edge %.pre-phi = phi i64 [ %.pre162, %for.cond5.preheader.for.inc16_crit_edge ], [ %28, %for.body7 ] %29 = phi i32 [ %26, %for.cond5.preheader.for.inc16_crit_edge ], [ %27, %for.body7 ] %indvars.iv.next146 = add nuw nsw i64 %indvars.iv145, 1 %cmp3.not.not = icmp slt i64 %indvars.iv145, %.pre-phi br i1 %cmp3.not.not, label %for.cond5.preheader, label %for.end18, !llvm.loop !11 for.end18: ; preds = %for.inc16, %entry %.lcssa = phi i32 [ %25, %entry ], [ %29, %for.inc16 ] %.lcssa.fr = freeze i32 %.lcssa %arrayidx19 = getelementptr inbounds [101 x i32], ptr %flg, i64 0, i64 1 store i32 1, ptr %arrayidx19, align 4, !tbaa !5 %cmp21.not118 = icmp slt i32 %.lcssa.fr, 1 br i1 %cmp21.not118, label %for.end18.split.us.split.us, label %while.cond.preheader while.cond.preheader: ; preds = %for.end18 %30 = add nuw i32 %.lcssa.fr, 1 %wide.trip.count = zext i32 %30 to i64 %wide.trip.count155 = zext i32 %30 to i64 %31 = add nsw i64 %wide.trip.count, -1 %min.iters.check = icmp ult i32 %.lcssa.fr, 8 %n.vec = and i64 %31, -8 %ind.end = or i64 %n.vec, 1 %cmp.n = icmp eq i64 %31, %n.vec br label %for.body22.preheader for.end18.split.us.split.us: ; preds = %for.end18 %cmp30.us.us = icmp eq i32 %.lcssa.fr, 0 br i1 %cmp30.us.us, label %while.end, label %while.cond.us.us while.cond.us.us: ; preds = %for.end18.split.us.split.us, %while.cond.us.us br label %while.cond.us.us for.body22.preheader: ; preds = %for.cond33.for.end73_crit_edge, %while.cond.preheader %m2.0 = phi i32 [ %mi.2, %for.cond33.for.end73_crit_edge ], [ 1, %while.cond.preheader ] %mi.0 = phi i32 [ %mi.2, %for.cond33.for.end73_crit_edge ], [ undef, %while.cond.preheader ] %sum.0 = phi i32 [ %add, %for.cond33.for.end73_crit_edge ], [ 0, %while.cond.preheader ] br i1 %min.iters.check, label %for.body22.preheader179, label %vector.body173 vector.body173: ; preds = %for.body22.preheader, %vector.body173 %index174 = phi i64 [ %index.next178, %vector.body173 ], [ 0, %for.body22.preheader ] %vec.phi = phi <4 x i32> [ %38, %vector.body173 ], [ zeroinitializer, %for.body22.preheader ] %vec.phi175 = phi <4 x i32> [ %39, %vector.body173 ], [ zeroinitializer, %for.body22.preheader ] %offset.idx176 = or i64 %index174, 1 %32 = getelementptr inbounds [101 x i32], ptr %flg, i64 0, i64 %offset.idx176 %wide.load = load <4 x i32>, ptr %32, align 4, !tbaa !5 %33 = getelementptr inbounds i32, ptr %32, i64 4 %wide.load177 = load <4 x i32>, ptr %33, align 4, !tbaa !5 %34 = icmp eq <4 x i32> %wide.load, <i32 1, i32 1, i32 1, i32 1> %35 = icmp eq <4 x i32> %wide.load177, <i32 1, i32 1, i32 1, i32 1> %36 = zext <4 x i1> %34 to <4 x i32> %37 = zext <4 x i1> %35 to <4 x i32> %38 = add <4 x i32> %vec.phi, %36 %39 = add <4 x i32> %vec.phi175, %37 %index.next178 = add nuw i64 %index174, 8 %40 = icmp eq i64 %index.next178, %n.vec br i1 %40, label %middle.block169, label %vector.body173, !llvm.loop !13 middle.block169: ; preds = %vector.body173 %bin.rdx = add <4 x i32> %39, %38 %41 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) br i1 %cmp.n, label %for.end29, label %for.body22.preheader179 for.body22.preheader179: ; preds = %for.body22.preheader, %middle.block169 %indvars.iv148.ph = phi i64 [ 1, %for.body22.preheader ], [ %ind.end, %middle.block169 ] %c.0120.ph = phi i32 [ 0, %for.body22.preheader ], [ %41, %middle.block169 ] br label %for.body22 for.body22: ; preds = %for.body22.preheader179, %for.body22 %indvars.iv148 = phi i64 [ %indvars.iv.next149, %for.body22 ], [ %indvars.iv148.ph, %for.body22.preheader179 ] %c.0120 = phi i32 [ %spec.select, %for.body22 ], [ %c.0120.ph, %for.body22.preheader179 ] %arrayidx24 = getelementptr inbounds [101 x i32], ptr %flg, i64 0, i64 %indvars.iv148 %42 = load i32, ptr %arrayidx24, align 4, !tbaa !5 %cmp25 = icmp eq i32 %42, 1 %inc26 = zext i1 %cmp25 to i32 %spec.select = add nuw nsw i32 %c.0120, %inc26 %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1 %exitcond151.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count br i1 %exitcond151.not, label %for.end29, label %for.body22, !llvm.loop !16 for.end29: ; preds = %for.body22, %middle.block169 %spec.select.lcssa = phi i32 [ %41, %middle.block169 ], [ %spec.select, %for.body22 ] %cmp30 = icmp eq i32 %spec.select.lcssa, %.lcssa.fr br i1 %cmp30, label %while.end, label %for.cond33.preheader for.cond33.preheader: ; preds = %for.end29 %idxprom39 = sext i32 %m2.0 to i64 br label %for.body35 for.body35: ; preds = %for.cond33.preheader, %for.inc71 %indvars.iv152 = phi i64 [ 1, %for.cond33.preheader ], [ %indvars.iv.next153, %for.inc71 ] %mi.1125 = phi i32 [ %mi.0, %for.cond33.preheader ], [ %mi.2, %for.inc71 ] %m1.0124 = phi i32 [ 10000000, %for.cond33.preheader ], [ %m1.1, %for.inc71 ] %arrayidx37 = getelementptr inbounds [101 x i32], ptr %flg, i64 0, i64 %indvars.iv152 %43 = load i32, ptr %arrayidx37, align 4, !tbaa !5 %cmp38.not = icmp eq i32 %43, 1 br i1 %cmp38.not, label %for.inc71, label %land.lhs.true land.lhs.true: ; preds = %for.body35 %arrayidx42 = getelementptr inbounds [101 x [101 x i32]], ptr %G, i64 0, i64 %idxprom39, i64 %indvars.iv152 %44 = load i32, ptr %arrayidx42, align 4, !tbaa !5 %cmp43.not = icmp eq i32 %44, -1 %arrayidx65.phi.trans.insert = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 %indvars.iv152 %.pre = load i32, ptr %arrayidx65.phi.trans.insert, align 4, !tbaa !5 br i1 %cmp43.not, label %land.lhs.true63, label %land.lhs.true44 land.lhs.true44: ; preds = %land.lhs.true %spec.store.select = call i32 @llvm.smin.i32(i32 %.pre, i32 %44) store i32 %spec.store.select, ptr %arrayidx65.phi.trans.insert, align 4 br label %land.lhs.true63 land.lhs.true63: ; preds = %land.lhs.true, %land.lhs.true44 %45 = phi i32 [ %spec.store.select, %land.lhs.true44 ], [ %.pre, %land.lhs.true ] %cmp66 = icmp sgt i32 %m1.0124, %45 %spec.select111 = call i32 @llvm.smin.i32(i32 %m1.0124, i32 %45) %46 = trunc i64 %indvars.iv152 to i32 %spec.select112 = select i1 %cmp66, i32 %46, i32 %mi.1125 br label %for.inc71 for.inc71: ; preds = %for.body35, %land.lhs.true63 %m1.1 = phi i32 [ %spec.select111, %land.lhs.true63 ], [ %m1.0124, %for.body35 ] %mi.2 = phi i32 [ %spec.select112, %land.lhs.true63 ], [ %mi.1125, %for.body35 ] %indvars.iv.next153 = add nuw nsw i64 %indvars.iv152, 1 %exitcond156.not = icmp eq i64 %indvars.iv.next153, %wide.trip.count155 br i1 %exitcond156.not, label %for.cond33.for.end73_crit_edge, label %for.body35, !llvm.loop !17 for.cond33.for.end73_crit_edge: ; preds = %for.inc71 %add = add nsw i32 %m1.1, %sum.0 %idxprom74 = sext i32 %mi.2 to i64 %arrayidx75 = getelementptr inbounds [101 x i32], ptr %flg, i64 0, i64 %idxprom74 store i32 1, ptr %arrayidx75, align 4, !tbaa !5 %arrayidx77 = getelementptr inbounds [101 x i32], ptr %s, i64 0, i64 %idxprom74 store i32 %m1.1, ptr %arrayidx77, align 4, !tbaa !5 br label %for.body22.preheader while.end: ; preds = %for.end29, %for.end18.split.us.split.us %.us-phi128 = phi i32 [ 0, %for.end18.split.us.split.us ], [ %sum.0, %for.end29 ] %call78 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %.us-phi128) call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %s) #5 call void @llvm.lifetime.end.p0(i64 404, ptr nonnull %flg) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 40804, ptr nonnull %G) #5 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"} !11 = distinct !{!11, !10, !12} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10, !15, !14} !17 = distinct !{!17, !10}
#include <stdio.h> #define N 100 #define INF 10000 #define WHITE 0 #define GRAY 1 #define BLACK 2 int color[N]; int M[N][N]; int d[N]; int p[N]; int n; void prim(void); int main() { int i,j,sum = 0; scanf("%d",&n); for(i = 0;i < n;i++){ for(j = 0;j < n;j++){ scanf("%d",&M[i][j]); } } prim(); for(i = 0;i < n;i++){ if(p[i] != -1){ sum += M[i][p[i]]; } } printf("%d\n",sum); return 0; } void prim(void) { int i,u = 0,v = 0; int mincost; for(u = 0;u < n;u++){ color[u] = WHITE; d[u] = INF; p[u] = -1; } d[0] = 0; while(1){ mincost = INF; u = -1; for(i = 0;i < n;i++){ if(color[i] != BLACK && d[i] < mincost){ mincost = d[i]; u = i; } } if(u == -1) break; color[u] = BLACK; for(v = 0;v < n;v++){ if(color[v] != BLACK && M[u][v] != -1){ if(M[u][v] < d[v]){ d[v] = M[u][v]; p[v] = u; color[v] = GRAY; } } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199516/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199516/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @M = dso_local global [100 x [100 x i32]] zeroinitializer, align 16 @p = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @color = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @d = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 ; 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 %.fr.i38 = freeze i32 %0 %cmp39 = icmp sgt i32 %.fr.i38, 0 br i1 %cmp39, label %for.cond1.preheader, label %prim.exit.thread for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %.fr.i, %for.inc7 ], [ %.fr.i38, %entry ] %indvars.iv48 = phi i64 [ %indvars.iv.next49, %for.inc7 ], [ 0, %entry ] %cmp236 = icmp sgt i32 %1, 0 br i1 %cmp236, label %for.body3, label %for.inc7 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv48, i64 %indvars.iv %call6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !9 for.inc7: ; preds = %for.body3, %for.cond1.preheader %4 = phi i32 [ %1, %for.cond1.preheader ], [ %2, %for.body3 ] %.fr.i = freeze i32 %4 %indvars.iv.next49 = add nuw nsw i64 %indvars.iv48, 1 %5 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next49, %5 br i1 %cmp, label %for.cond1.preheader, label %for.end9, !llvm.loop !11 for.end9: ; preds = %for.inc7 %cmp86.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp86.i, label %for.body.preheader.i, label %prim.exit.thread prim.exit.thread: ; preds = %for.end9, %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %for.end24 for.body.preheader.i: ; preds = %for.end9 %6 = zext i32 %.fr.i to i64 %7 = shl nuw nsw i64 %6, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @color, i8 0, i64 %7, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @p, i8 -1, i64 %7, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr.i, 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 %6, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %8 = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 10000, i32 10000, i32 10000, i32 10000>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 store <4 x i32> <i32 10000, i32 10000, i32 10000, i32 10000>, ptr %9, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !13 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %6 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx2.i = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv.i store i32 10000, ptr %arrayidx2.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, %6 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !16 while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr @d, align 16, !tbaa !5 br label %for.body7.us.i for.end18.us.i: ; preds = %for.inc16.us.i %cmp19.us.i = icmp eq i32 %u.2.us.i, -1 br i1 %cmp19.us.i, label %prim.exit, label %if.end21.us.i if.end21.us.i: ; preds = %for.end18.us.i %idxprom22.us.i = sext i32 %u.2.us.i to i64 %arrayidx23.us.i = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %idxprom22.us.i store i32 2, ptr %arrayidx23.us.i, align 4, !tbaa !5 br label %for.body26.us.i for.body26.us.i: ; preds = %for.inc57.us.i, %if.end21.us.i %indvars.iv134.i = phi i64 [ 0, %if.end21.us.i ], [ %indvars.iv.next135.i, %for.inc57.us.i ] %arrayidx28.us.i = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %indvars.iv134.i %11 = load i32, ptr %arrayidx28.us.i, align 4, !tbaa !5 %cmp29.not.us.i = icmp eq i32 %11, 2 br i1 %cmp29.not.us.i, label %for.inc57.us.i, label %land.lhs.true30.us.i land.lhs.true30.us.i: ; preds = %for.body26.us.i %arrayidx34.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %idxprom22.us.i, i64 %indvars.iv134.i %12 = load i32, ptr %arrayidx34.us.i, align 4, !tbaa !5 %cmp35.not.us.i = icmp eq i32 %12, -1 br i1 %cmp35.not.us.i, label %for.inc57.us.i, label %if.then36.us.i if.then36.us.i: ; preds = %land.lhs.true30.us.i %arrayidx42.us.i = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv134.i %13 = load i32, ptr %arrayidx42.us.i, align 4, !tbaa !5 %cmp43.us.i = icmp slt i32 %12, %13 br i1 %cmp43.us.i, label %if.then44.us.i, label %for.inc57.us.i if.then44.us.i: ; preds = %if.then36.us.i store i32 %12, ptr %arrayidx42.us.i, align 4, !tbaa !5 %arrayidx52.us.i = getelementptr inbounds [100 x i32], ptr @p, i64 0, i64 %indvars.iv134.i store i32 %u.2.us.i, ptr %arrayidx52.us.i, align 4, !tbaa !5 store i32 1, ptr %arrayidx28.us.i, align 4, !tbaa !5 br label %for.inc57.us.i for.inc57.us.i: ; preds = %if.then44.us.i, %if.then36.us.i, %land.lhs.true30.us.i, %for.body26.us.i %indvars.iv.next135.i = add nuw nsw i64 %indvars.iv134.i, 1 %exitcond138.not.i = icmp eq i64 %indvars.iv.next135.i, %6 br i1 %exitcond138.not.i, label %for.body7.us.i.backedge, label %for.body26.us.i, !llvm.loop !17 for.body7.us.i: ; preds = %for.body7.us.i.backedge, %while.cond.us.preheader.i %indvars.iv129.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv129.i.be, %for.body7.us.i.backedge ] %mincost.091.us.i = phi i32 [ 10000, %while.cond.us.preheader.i ], [ %mincost.091.us.i.be, %for.body7.us.i.backedge ] %u.190.us.i = phi i32 [ -1, %while.cond.us.preheader.i ], [ %u.190.us.i.be, %for.body7.us.i.backedge ] %arrayidx9.us.i = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %indvars.iv129.i %14 = load i32, ptr %arrayidx9.us.i, align 4, !tbaa !5 %cmp10.not.us.i = icmp eq i32 %14, 2 br i1 %cmp10.not.us.i, label %for.inc16.us.i, label %land.lhs.true.us.i land.lhs.true.us.i: ; preds = %for.body7.us.i %arrayidx12.us.i = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv129.i %15 = load i32, ptr %arrayidx12.us.i, align 4, !tbaa !5 %cmp13.us.i = icmp slt i32 %15, %mincost.091.us.i %16 = trunc i64 %indvars.iv129.i to i32 %spec.select.us.i = select i1 %cmp13.us.i, i32 %16, i32 %u.190.us.i %spec.select85.us.i = tail call i32 @llvm.smin.i32(i32 %15, i32 %mincost.091.us.i) br label %for.inc16.us.i for.inc16.us.i: ; preds = %land.lhs.true.us.i, %for.body7.us.i %u.2.us.i = phi i32 [ %u.190.us.i, %for.body7.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %mincost.1.us.i = phi i32 [ %mincost.091.us.i, %for.body7.us.i ], [ %spec.select85.us.i, %land.lhs.true.us.i ] %indvars.iv.next130.i = add nuw nsw i64 %indvars.iv129.i, 1 %exitcond133.not.i = icmp eq i64 %indvars.iv.next130.i, %6 br i1 %exitcond133.not.i, label %for.end18.us.i, label %for.body7.us.i.backedge for.body7.us.i.backedge: ; preds = %for.inc57.us.i, %for.inc16.us.i %indvars.iv129.i.be = phi i64 [ %indvars.iv.next130.i, %for.inc16.us.i ], [ 0, %for.inc57.us.i ] %mincost.091.us.i.be = phi i32 [ %mincost.1.us.i, %for.inc16.us.i ], [ 10000, %for.inc57.us.i ] %u.190.us.i.be = phi i32 [ %u.2.us.i, %for.inc16.us.i ], [ -1, %for.inc57.us.i ] br label %for.body7.us.i, !llvm.loop !17 prim.exit: ; preds = %for.end18.us.i br i1 %cmp86.i, label %for.body12.preheader, label %for.end24 for.body12.preheader: ; preds = %prim.exit %xtraiter = and i64 %6, 1 %17 = icmp eq i32 %.fr.i, 1 br i1 %17, label %for.end24.loopexit.unr-lcssa, label %for.body12.preheader.new for.body12.preheader.new: ; preds = %for.body12.preheader %unroll_iter = and i64 %6, 4294967294 br label %for.body12 for.body12: ; preds = %for.inc22.1, %for.body12.preheader.new %indvars.iv51 = phi i64 [ 0, %for.body12.preheader.new ], [ %indvars.iv.next52.1, %for.inc22.1 ] %sum.043 = phi i32 [ 0, %for.body12.preheader.new ], [ %sum.1.1, %for.inc22.1 ] %niter = phi i64 [ 0, %for.body12.preheader.new ], [ %niter.next.1, %for.inc22.1 ] %arrayidx14 = getelementptr inbounds [100 x i32], ptr @p, i64 0, i64 %indvars.iv51 %18 = load i32, ptr %arrayidx14, align 8, !tbaa !5 %cmp15.not = icmp eq i32 %18, -1 br i1 %cmp15.not, label %for.inc22, label %if.then if.then: ; preds = %for.body12 %idxprom20 = sext i32 %18 to i64 %arrayidx21 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv51, i64 %idxprom20 %19 = load i32, ptr %arrayidx21, align 4, !tbaa !5 %add = add nsw i32 %19, %sum.043 br label %for.inc22 for.inc22: ; preds = %for.body12, %if.then %sum.1 = phi i32 [ %add, %if.then ], [ %sum.043, %for.body12 ] %indvars.iv.next52 = or i64 %indvars.iv51, 1 %arrayidx14.1 = getelementptr inbounds [100 x i32], ptr @p, i64 0, i64 %indvars.iv.next52 %20 = load i32, ptr %arrayidx14.1, align 4, !tbaa !5 %cmp15.not.1 = icmp eq i32 %20, -1 br i1 %cmp15.not.1, label %for.inc22.1, label %if.then.1 if.then.1: ; preds = %for.inc22 %idxprom20.1 = sext i32 %20 to i64 %arrayidx21.1 = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv.next52, i64 %idxprom20.1 %21 = load i32, ptr %arrayidx21.1, align 4, !tbaa !5 %add.1 = add nsw i32 %21, %sum.1 br label %for.inc22.1 for.inc22.1: ; preds = %if.then.1, %for.inc22 %sum.1.1 = phi i32 [ %add.1, %if.then.1 ], [ %sum.1, %for.inc22 ] %indvars.iv.next52.1 = add nuw nsw i64 %indvars.iv51, 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.end24.loopexit.unr-lcssa, label %for.body12, !llvm.loop !18 for.end24.loopexit.unr-lcssa: ; preds = %for.inc22.1, %for.body12.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body12.preheader ], [ %sum.1.1, %for.inc22.1 ] %indvars.iv51.unr = phi i64 [ 0, %for.body12.preheader ], [ %indvars.iv.next52.1, %for.inc22.1 ] %sum.043.unr = phi i32 [ 0, %for.body12.preheader ], [ %sum.1.1, %for.inc22.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end24, label %for.body12.epil for.body12.epil: ; preds = %for.end24.loopexit.unr-lcssa %arrayidx14.epil = getelementptr inbounds [100 x i32], ptr @p, i64 0, i64 %indvars.iv51.unr %22 = load i32, ptr %arrayidx14.epil, align 4, !tbaa !5 %cmp15.not.epil = icmp eq i32 %22, -1 br i1 %cmp15.not.epil, label %for.end24, label %if.then.epil if.then.epil: ; preds = %for.body12.epil %idxprom20.epil = sext i32 %22 to i64 %arrayidx21.epil = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %indvars.iv51.unr, i64 %idxprom20.epil %23 = load i32, ptr %arrayidx21.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %23, %sum.043.unr br label %for.end24 for.end24: ; preds = %for.end24.loopexit.unr-lcssa, %if.then.epil, %for.body12.epil, %prim.exit.thread, %prim.exit %sum.0.lcssa = phi i32 [ 0, %prim.exit ], [ 0, %prim.exit.thread ], [ %sum.1.lcssa.ph, %for.end24.loopexit.unr-lcssa ], [ %add.epil, %if.then.epil ], [ %sum.043.unr, %for.body12.epil ] %call25 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) 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(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @prim() local_unnamed_addr #2 { entry: %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp86 = icmp sgt i32 %.fr, 0 br i1 %cmp86, label %for.body.preheader, label %for.end.thread for.end.thread: ; preds = %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %while.end for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @color, i8 0, i64 %2, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @p, i8 -1, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader139, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 10000, i32 10000, i32 10000, i32 10000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 10000, i32 10000, i32 10000, i32 10000>, ptr %4, align 16, !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 !19 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader139 for.body.preheader139: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader139, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader139 ] %arrayidx2 = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv store i32 10000, ptr %arrayidx2, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !20 for.end: ; preds = %for.body, %middle.block store i32 0, ptr @d, align 16, !tbaa !5 br i1 %cmp86, label %while.cond.us.preheader, label %while.end while.cond.us.preheader: ; preds = %for.end %wide.trip.count132 = zext i32 %.fr to i64 %wide.trip.count137 = zext i32 %.fr to i64 br label %for.body7.us for.end18.us: ; preds = %for.inc16.us %cmp19.us = icmp eq i32 %u.2.us, -1 br i1 %cmp19.us, label %while.end, label %if.end21.us if.end21.us: ; preds = %for.end18.us %idxprom22.us = sext i32 %u.2.us to i64 %arrayidx23.us = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %idxprom22.us store i32 2, ptr %arrayidx23.us, align 4, !tbaa !5 br label %for.body26.us for.body26.us: ; preds = %if.end21.us, %for.inc57.us %indvars.iv134 = phi i64 [ 0, %if.end21.us ], [ %indvars.iv.next135, %for.inc57.us ] %arrayidx28.us = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %indvars.iv134 %6 = load i32, ptr %arrayidx28.us, align 4, !tbaa !5 %cmp29.not.us = icmp eq i32 %6, 2 br i1 %cmp29.not.us, label %for.inc57.us, label %land.lhs.true30.us land.lhs.true30.us: ; preds = %for.body26.us %arrayidx34.us = getelementptr inbounds [100 x [100 x i32]], ptr @M, i64 0, i64 %idxprom22.us, i64 %indvars.iv134 %7 = load i32, ptr %arrayidx34.us, align 4, !tbaa !5 %cmp35.not.us = icmp eq i32 %7, -1 br i1 %cmp35.not.us, label %for.inc57.us, label %if.then36.us if.then36.us: ; preds = %land.lhs.true30.us %arrayidx42.us = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv134 %8 = load i32, ptr %arrayidx42.us, align 4, !tbaa !5 %cmp43.us = icmp slt i32 %7, %8 br i1 %cmp43.us, label %if.then44.us, label %for.inc57.us if.then44.us: ; preds = %if.then36.us store i32 %7, ptr %arrayidx42.us, align 4, !tbaa !5 %arrayidx52.us = getelementptr inbounds [100 x i32], ptr @p, i64 0, i64 %indvars.iv134 store i32 %u.2.us, ptr %arrayidx52.us, align 4, !tbaa !5 store i32 1, ptr %arrayidx28.us, align 4, !tbaa !5 br label %for.inc57.us for.inc57.us: ; preds = %if.then44.us, %if.then36.us, %land.lhs.true30.us, %for.body26.us %indvars.iv.next135 = add nuw nsw i64 %indvars.iv134, 1 %exitcond138.not = icmp eq i64 %indvars.iv.next135, %wide.trip.count137 br i1 %exitcond138.not, label %for.body7.us.backedge, label %for.body26.us, !llvm.loop !17 for.body7.us: ; preds = %for.body7.us.backedge, %while.cond.us.preheader %indvars.iv129 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv129.be, %for.body7.us.backedge ] %mincost.091.us = phi i32 [ 10000, %while.cond.us.preheader ], [ %mincost.091.us.be, %for.body7.us.backedge ] %u.190.us = phi i32 [ -1, %while.cond.us.preheader ], [ %u.190.us.be, %for.body7.us.backedge ] %arrayidx9.us = getelementptr inbounds [100 x i32], ptr @color, i64 0, i64 %indvars.iv129 %9 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cmp10.not.us = icmp eq i32 %9, 2 br i1 %cmp10.not.us, label %for.inc16.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body7.us %arrayidx12.us = getelementptr inbounds [100 x i32], ptr @d, i64 0, i64 %indvars.iv129 %10 = load i32, ptr %arrayidx12.us, align 4, !tbaa !5 %cmp13.us = icmp slt i32 %10, %mincost.091.us %11 = trunc i64 %indvars.iv129 to i32 %spec.select.us = select i1 %cmp13.us, i32 %11, i32 %u.190.us %spec.select85.us = tail call i32 @llvm.smin.i32(i32 %10, i32 %mincost.091.us) br label %for.inc16.us for.inc16.us: ; preds = %land.lhs.true.us, %for.body7.us %u.2.us = phi i32 [ %u.190.us, %for.body7.us ], [ %spec.select.us, %land.lhs.true.us ] %mincost.1.us = phi i32 [ %mincost.091.us, %for.body7.us ], [ %spec.select85.us, %land.lhs.true.us ] %indvars.iv.next130 = add nuw nsw i64 %indvars.iv129, 1 %exitcond133.not = icmp eq i64 %indvars.iv.next130, %wide.trip.count132 br i1 %exitcond133.not, label %for.end18.us, label %for.body7.us.backedge for.body7.us.backedge: ; preds = %for.inc57.us, %for.inc16.us %indvars.iv129.be = phi i64 [ %indvars.iv.next130, %for.inc16.us ], [ 0, %for.inc57.us ] %mincost.091.us.be = phi i32 [ %mincost.1.us, %for.inc16.us ], [ 10000, %for.inc57.us ] %u.190.us.be = phi i32 [ %u.2.us, %for.inc16.us ], [ -1, %for.inc57.us ] br label %for.body7.us, !llvm.loop !17 while.end: ; preds = %for.end18.us, %for.end, %for.end.thread ret void } ; 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.smin.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 = { nofree nounwind "no-trapping-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(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #4 = { 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} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10, !15, !14} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10, !14, !15} !20 = distinct !{!20, !10, !15, !14}
#include <stdio.h> int main() { int n; scanf("%d", &n); if ( (n % 10) == 0 ) printf("%d\n", n); else { int lower = (n / 10) * 10; int upper = lower + 10; if ( (n - lower) > (upper - n) ) printf("%d\n", upper); else printf("%d\n", lower); } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19956/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19956/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %.fr = freeze i32 %0 %rem = srem i32 %.fr, 10 %cmp = icmp eq i32 %rem, 0 br i1 %cmp, label %if.end8, label %if.else if.else: ; preds = %entry %mul = sub nsw i32 %.fr, %rem %add = add nsw i32 %mul, 10 %sub2 = sub nsw i32 %add, %.fr %cmp3 = icmp sgt i32 %rem, %sub2 %add.mul = select i1 %cmp3, i32 %add, i32 %mul br label %if.end8 if.end8: ; preds = %if.else, %entry %add.sink = phi i32 [ %.fr, %entry ], [ %add.mul, %if.else ] %call5 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %add.sink) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %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) { // your code goes here int n,rem; scanf("%d",&n); rem = n % 10; if( rem <= 5 ) n = n - rem; else n = n + ( 10 - rem ); printf("%d\n",n); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_19961/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_19961/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %rem1 = srem i32 %0, 10 %cmp = icmp slt i32 %rem1, 6 %reass.sub = sub i32 %0, %rem1 %add = add i32 %reass.sub, 10 %storemerge = select i1 %cmp, i32 %reass.sub, i32 %add store i32 %storemerge, ptr %n, align 4, !tbaa !5 %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %storemerge) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include<stdio.h> #define N 105 #define W 0 #define B 1 #define DC -1 #define inf 1000000 int n; int d[N]; int pi[N]; int color[N]; void prim(int hako[N][N]); int main(){ int i,j; int sum=0; int hako[N][N]; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ scanf("%d",&hako[i][j]); } } prim(hako); for(i=0;i<n;i++) sum+=d[i]; printf("%d\n",sum); return 0; } void prim(int hako[N][N]){ int i=0,u,v; int mincost; for(i=0;i<n;i++) { color[i]=W; pi[i]=DC; d[i]=inf; } d[0]=0; while(1){ mincost=inf; for(i=0;i<n;i++){ if(color[i]!=B &&d[i]<mincost){ mincost =d[i]; u=i; } } if(mincost==inf) break; color[u]=B; for(i=0;i<n;i++){ if(hako[u][i]!=DC){ v=i; if(color[v]!=B && hako[u][v]<d[v]){ pi[v]=u; d[v]=hako[u][v]; } } } } }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199653/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199653/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @d = dso_local local_unnamed_addr global [105 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @color = dso_local local_unnamed_addr global [105 x i32] zeroinitializer, align 16 @pi = dso_local local_unnamed_addr global [105 x i32] zeroinitializer, align 16 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %hako = alloca [105 x [105 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 44100, ptr nonnull %hako) #6 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr.i29 = freeze i32 %0 %cmp30 = icmp sgt i32 %.fr.i29, 0 br i1 %cmp30, label %for.cond1.preheader, label %prim.exit.thread for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %.fr.i, %for.inc7 ], [ %.fr.i29, %entry ] %indvars.iv39 = phi i64 [ %indvars.iv.next40, %for.inc7 ], [ 0, %entry ] %cmp227 = icmp sgt i32 %1, 0 br i1 %cmp227, label %for.body3, label %for.inc7 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [105 x [105 x i32]], ptr %hako, i64 0, i64 %indvars.iv39, i64 %indvars.iv %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !9 for.inc7: ; preds = %for.body3, %for.cond1.preheader %4 = phi i32 [ %1, %for.cond1.preheader ], [ %2, %for.body3 ] %.fr.i = freeze i32 %4 %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1 %5 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next40, %5 br i1 %cmp, label %for.cond1.preheader, label %for.end9, !llvm.loop !11 for.end9: ; preds = %for.inc7 %cmp86.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp86.i, label %for.body.preheader.i, label %prim.exit.thread prim.exit.thread: ; preds = %for.end9, %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %for.end17 for.body.preheader.i: ; preds = %for.end9 %6 = zext i32 %.fr.i to i64 %7 = shl nuw nsw i64 %6, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 @color, i8 0, i64 %7, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 @pi, i8 -1, i64 %7, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr.i, 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 %6, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %8 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %9, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !13 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %6 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx4.i = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv.i store i32 1000000, ptr %arrayidx4.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, %6 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !16 while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr @d, align 16, !tbaa !5 br label %for.body7.us.i for.end18.us.i: ; preds = %for.inc16.us.i %cmp19.us.i = icmp eq i32 %mincost.1.us.i, 1000000 br i1 %cmp19.us.i, label %prim.exit, label %if.end21.us.i if.end21.us.i: ; preds = %for.end18.us.i %idxprom22.us.i = sext i32 %u.2.us.i to i64 %arrayidx23.us.i = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %idxprom22.us.i store i32 1, ptr %arrayidx23.us.i, align 4, !tbaa !5 br label %for.body26.us.i for.body26.us.i: ; preds = %for.inc55.us.i, %if.end21.us.i %indvars.iv138.i = phi i64 [ 0, %if.end21.us.i ], [ %indvars.iv.next139.i, %for.inc55.us.i ] %arrayidx30.us.i = getelementptr inbounds [105 x i32], ptr %hako, i64 %idxprom22.us.i, i64 %indvars.iv138.i %11 = load i32, ptr %arrayidx30.us.i, align 4, !tbaa !5 %cmp31.not.us.i = icmp eq i32 %11, -1 br i1 %cmp31.not.us.i, label %for.inc55.us.i, label %if.then32.us.i if.then32.us.i: ; preds = %for.body26.us.i %arrayidx34.us.i = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %indvars.iv138.i %12 = load i32, ptr %arrayidx34.us.i, align 4, !tbaa !5 %cmp35.not.us.i = icmp eq i32 %12, 1 br i1 %cmp35.not.us.i, label %for.inc55.us.i, label %land.lhs.true36.us.i land.lhs.true36.us.i: ; preds = %if.then32.us.i %arrayidx42.us.i = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv138.i %13 = load i32, ptr %arrayidx42.us.i, align 4, !tbaa !5 %cmp43.us.i = icmp slt i32 %11, %13 br i1 %cmp43.us.i, label %if.then44.us.i, label %for.inc55.us.i if.then44.us.i: ; preds = %land.lhs.true36.us.i %arrayidx46.us.i = getelementptr inbounds [105 x i32], ptr @pi, i64 0, i64 %indvars.iv138.i store i32 %u.2.us.i, ptr %arrayidx46.us.i, align 4, !tbaa !5 store i32 %11, ptr %arrayidx42.us.i, align 4, !tbaa !5 br label %for.inc55.us.i for.inc55.us.i: ; preds = %if.then44.us.i, %land.lhs.true36.us.i, %if.then32.us.i, %for.body26.us.i %indvars.iv.next139.i = add nuw nsw i64 %indvars.iv138.i, 1 %exitcond142.not.i = icmp eq i64 %indvars.iv.next139.i, %6 br i1 %exitcond142.not.i, label %for.body7.us.i.backedge, label %for.body26.us.i, !llvm.loop !17 for.body7.us.i: ; preds = %for.body7.us.i.backedge, %while.cond.us.preheader.i %indvars.iv133.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv133.i.be, %for.body7.us.i.backedge ] %mincost.091.us.i = phi i32 [ 1000000, %while.cond.us.preheader.i ], [ %mincost.091.us.i.be, %for.body7.us.i.backedge ] %u.189.us.i = phi i32 [ undef, %while.cond.us.preheader.i ], [ %u.2.us.i, %for.body7.us.i.backedge ] %arrayidx9.us.i = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %indvars.iv133.i %14 = load i32, ptr %arrayidx9.us.i, align 4, !tbaa !5 %cmp10.not.us.i = icmp eq i32 %14, 1 br i1 %cmp10.not.us.i, label %for.inc16.us.i, label %land.lhs.true.us.i land.lhs.true.us.i: ; preds = %for.body7.us.i %arrayidx12.us.i = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv133.i %15 = load i32, ptr %arrayidx12.us.i, align 4, !tbaa !5 %cmp13.us.i = icmp slt i32 %15, %mincost.091.us.i %16 = trunc i64 %indvars.iv133.i to i32 %spec.select.us.i = select i1 %cmp13.us.i, i32 %16, i32 %u.189.us.i %spec.select85.us.i = call i32 @llvm.smin.i32(i32 %15, i32 %mincost.091.us.i) br label %for.inc16.us.i for.inc16.us.i: ; preds = %land.lhs.true.us.i, %for.body7.us.i %u.2.us.i = phi i32 [ %u.189.us.i, %for.body7.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %mincost.1.us.i = phi i32 [ %mincost.091.us.i, %for.body7.us.i ], [ %spec.select85.us.i, %land.lhs.true.us.i ] %indvars.iv.next134.i = add nuw nsw i64 %indvars.iv133.i, 1 %exitcond137.not.i = icmp eq i64 %indvars.iv.next134.i, %6 br i1 %exitcond137.not.i, label %for.end18.us.i, label %for.body7.us.i.backedge for.body7.us.i.backedge: ; preds = %for.inc55.us.i, %for.inc16.us.i %indvars.iv133.i.be = phi i64 [ %indvars.iv.next134.i, %for.inc16.us.i ], [ 0, %for.inc55.us.i ] %mincost.091.us.i.be = phi i32 [ %mincost.1.us.i, %for.inc16.us.i ], [ 1000000, %for.inc55.us.i ] br label %for.body7.us.i, !llvm.loop !17 prim.exit: ; preds = %for.end18.us.i br i1 %cmp86.i, label %for.body12.preheader, label %for.end17 for.body12.preheader: ; preds = %prim.exit %wide.trip.count = zext i32 %.fr.i to i64 %min.iters.check55 = icmp ult i32 %.fr.i, 8 br i1 %min.iters.check55, label %for.body12.preheader66, label %vector.ph56 vector.ph56: ; preds = %for.body12.preheader %n.vec58 = and i64 %6, 4294967288 br label %vector.body61 vector.body61: ; preds = %vector.body61, %vector.ph56 %index62 = phi i64 [ 0, %vector.ph56 ], [ %index.next65, %vector.body61 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph56 ], [ %19, %vector.body61 ] %vec.phi63 = phi <4 x i32> [ zeroinitializer, %vector.ph56 ], [ %20, %vector.body61 ] %17 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %index62 %wide.load = load <4 x i32>, ptr %17, align 16, !tbaa !5 %18 = getelementptr inbounds i32, ptr %17, i64 4 %wide.load64 = load <4 x i32>, ptr %18, align 16, !tbaa !5 %19 = add <4 x i32> %wide.load, %vec.phi %20 = add <4 x i32> %wide.load64, %vec.phi63 %index.next65 = add nuw i64 %index62, 8 %21 = icmp eq i64 %index.next65, %n.vec58 br i1 %21, label %middle.block53, label %vector.body61, !llvm.loop !18 middle.block53: ; preds = %vector.body61 %bin.rdx = add <4 x i32> %20, %19 %22 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n60 = icmp eq i64 %n.vec58, %6 br i1 %cmp.n60, label %for.end17, label %for.body12.preheader66 for.body12.preheader66: ; preds = %for.body12.preheader, %middle.block53 %indvars.iv42.ph = phi i64 [ 0, %for.body12.preheader ], [ %n.vec58, %middle.block53 ] %sum.034.ph = phi i32 [ 0, %for.body12.preheader ], [ %22, %middle.block53 ] br label %for.body12 for.body12: ; preds = %for.body12.preheader66, %for.body12 %indvars.iv42 = phi i64 [ %indvars.iv.next43, %for.body12 ], [ %indvars.iv42.ph, %for.body12.preheader66 ] %sum.034 = phi i32 [ %add, %for.body12 ], [ %sum.034.ph, %for.body12.preheader66 ] %arrayidx14 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv42 %23 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %add = add nsw i32 %23, %sum.034 %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1 %exitcond.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count br i1 %exitcond.not, label %for.end17, label %for.body12, !llvm.loop !19 for.end17: ; preds = %for.body12, %middle.block53, %prim.exit.thread, %prim.exit %sum.0.lcssa = phi i32 [ 0, %prim.exit ], [ 0, %prim.exit.thread ], [ %22, %middle.block53 ], [ %add, %for.body12 ] %call18 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa) call void @llvm.lifetime.end.p0(i64 44100, ptr nonnull %hako) #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 nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable define dso_local void @prim(ptr nocapture noundef readonly %hako) local_unnamed_addr #3 { entry: %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp86 = icmp sgt i32 %.fr, 0 br i1 %cmp86, label %for.body.preheader, label %for.end.thread for.end.thread: ; preds = %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %while.end for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @color, i8 0, i64 %2, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @pi, i8 -1, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader143, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 1000000, i32 1000000, i32 1000000, i32 1000000>, ptr %4, align 16, !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 !20 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader143 for.body.preheader143: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader143, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader143 ] %arrayidx4 = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv store i32 1000000, ptr %arrayidx4, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !21 for.end: ; preds = %for.body, %middle.block store i32 0, ptr @d, align 16, !tbaa !5 br i1 %cmp86, label %while.cond.us.preheader, label %while.end while.cond.us.preheader: ; preds = %for.end %wide.trip.count136 = zext i32 %.fr to i64 %wide.trip.count141 = zext i32 %.fr to i64 br label %for.body7.us for.end18.us: ; preds = %for.inc16.us %cmp19.us = icmp eq i32 %mincost.1.us, 1000000 br i1 %cmp19.us, label %while.end, label %if.end21.us if.end21.us: ; preds = %for.end18.us %idxprom22.us = sext i32 %u.2.us to i64 %arrayidx23.us = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %idxprom22.us store i32 1, ptr %arrayidx23.us, align 4, !tbaa !5 br label %for.body26.us for.body26.us: ; preds = %if.end21.us, %for.inc55.us %indvars.iv138 = phi i64 [ 0, %if.end21.us ], [ %indvars.iv.next139, %for.inc55.us ] %arrayidx30.us = getelementptr inbounds [105 x i32], ptr %hako, i64 %idxprom22.us, i64 %indvars.iv138 %6 = load i32, ptr %arrayidx30.us, align 4, !tbaa !5 %cmp31.not.us = icmp eq i32 %6, -1 br i1 %cmp31.not.us, label %for.inc55.us, label %if.then32.us if.then32.us: ; preds = %for.body26.us %arrayidx34.us = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %indvars.iv138 %7 = load i32, ptr %arrayidx34.us, align 4, !tbaa !5 %cmp35.not.us = icmp eq i32 %7, 1 br i1 %cmp35.not.us, label %for.inc55.us, label %land.lhs.true36.us land.lhs.true36.us: ; preds = %if.then32.us %arrayidx42.us = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv138 %8 = load i32, ptr %arrayidx42.us, align 4, !tbaa !5 %cmp43.us = icmp slt i32 %6, %8 br i1 %cmp43.us, label %if.then44.us, label %for.inc55.us if.then44.us: ; preds = %land.lhs.true36.us %arrayidx46.us = getelementptr inbounds [105 x i32], ptr @pi, i64 0, i64 %indvars.iv138 store i32 %u.2.us, ptr %arrayidx46.us, align 4, !tbaa !5 %9 = load i32, ptr %arrayidx30.us, align 4, !tbaa !5 store i32 %9, ptr %arrayidx42.us, align 4, !tbaa !5 br label %for.inc55.us for.inc55.us: ; preds = %if.then44.us, %land.lhs.true36.us, %if.then32.us, %for.body26.us %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1 %exitcond142.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count141 br i1 %exitcond142.not, label %for.body7.us.backedge, label %for.body26.us, !llvm.loop !17 for.body7.us: ; preds = %for.body7.us.backedge, %while.cond.us.preheader %indvars.iv133 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv133.be, %for.body7.us.backedge ] %mincost.091.us = phi i32 [ 1000000, %while.cond.us.preheader ], [ %mincost.091.us.be, %for.body7.us.backedge ] %u.189.us = phi i32 [ undef, %while.cond.us.preheader ], [ %u.2.us, %for.body7.us.backedge ] %arrayidx9.us = getelementptr inbounds [105 x i32], ptr @color, i64 0, i64 %indvars.iv133 %10 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cmp10.not.us = icmp eq i32 %10, 1 br i1 %cmp10.not.us, label %for.inc16.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body7.us %arrayidx12.us = getelementptr inbounds [105 x i32], ptr @d, i64 0, i64 %indvars.iv133 %11 = load i32, ptr %arrayidx12.us, align 4, !tbaa !5 %cmp13.us = icmp slt i32 %11, %mincost.091.us %12 = trunc i64 %indvars.iv133 to i32 %spec.select.us = select i1 %cmp13.us, i32 %12, i32 %u.189.us %spec.select85.us = tail call i32 @llvm.smin.i32(i32 %11, i32 %mincost.091.us) br label %for.inc16.us for.inc16.us: ; preds = %land.lhs.true.us, %for.body7.us %u.2.us = phi i32 [ %u.189.us, %for.body7.us ], [ %spec.select.us, %land.lhs.true.us ] %mincost.1.us = phi i32 [ %mincost.091.us, %for.body7.us ], [ %spec.select85.us, %land.lhs.true.us ] %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.end18.us, label %for.body7.us.backedge for.body7.us.backedge: ; preds = %for.inc55.us, %for.inc16.us %indvars.iv133.be = phi i64 [ %indvars.iv.next134, %for.inc16.us ], [ 0, %for.inc55.us ] %mincost.091.us.be = phi i32 [ %mincost.1.us, %for.inc16.us ], [ 1000000, %for.inc55.us ] br label %for.body7.us, !llvm.loop !17 while.end: ; preds = %for.end18.us, %for.end, %for.end.thread 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: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5 ; 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 nosync nounwind memory(readwrite, argmem: read, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } 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.unswitch.partial.disable"} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10, !15, !14} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !14, !15} !19 = distinct !{!19, !10, !15, !14} !20 = distinct !{!20, !10, !14, !15} !21 = distinct !{!21, !10, !15, !14}
#include<stdio.h> #define WHITE 0 #define GRAY 1 #define BLACK 2 #define MAX 101 #define INF 2001 int color[MAX],d[MAX],p[MAX],G[MAX][MAX],n; int prim(){ int i,j,u,min,sum=0; for(i=0;i<n;i++){ d[i]=INF; p[i]=-1; color[i]=WHITE; } d[0]=0; while(1){ min=INF; u=-1; for(i=0;i<n;i++){ if(min > d[i] && color[i] != BLACK){ u=i; min=d[i]; } } if(u==-1) break; color[u]=BLACK; for(j=0;j<n;j++){ if(color[j] != BLACK && G[u][j] < d[j]){ if(d[j] > G[u][j]){ d[j]=G[u][j]; p[j]=u; color[j]=GRAY; } } } } for(i=0;i<n;i++){ if(p[i] != -1){ sum+=G[i][p[i]]; } } return sum; } int main(){ int i,j,sum; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ scanf("%d",&G[i][j]); } } for(i=0;i<n;i++){ for(j=0;j<n;j++){ if(G[i][j]==-1) G[i][j]=INF; } } sum=prim(); printf("%d\n",sum); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199703/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199703/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0, align 4 @d = dso_local local_unnamed_addr global [101 x i32] zeroinitializer, align 16 @p = dso_local local_unnamed_addr global [101 x i32] zeroinitializer, align 16 @color = dso_local local_unnamed_addr global [101 x i32] zeroinitializer, align 16 @G = dso_local global [101 x [101 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @prim() local_unnamed_addr #0 { entry: %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp113 = icmp sgt i32 %.fr, 0 br i1 %cmp113, label %for.body.preheader, label %for.end.thread for.end.thread: ; preds = %entry store i32 0, ptr @d, align 16, !tbaa !5 br label %for.end78 for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @p, i8 -1, i64 %2, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @color, i8 0, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader175, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %index store <4 x i32> <i32 2001, i32 2001, i32 2001, i32 2001>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 2001, i32 2001, i32 2001, i32 2001>, ptr %4, align 16, !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 !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader175 for.body.preheader175: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader175, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader175 ] %arrayidx = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %indvars.iv store i32 2001, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block store i32 0, ptr @d, align 16, !tbaa !5 br i1 %cmp113, label %while.cond.us.preheader, label %for.end78 while.cond.us.preheader: ; preds = %for.end %wide.trip.count163 = zext i32 %.fr to i64 %wide.trip.count168 = zext i32 %.fr to i64 br label %for.body7.us for.end18.us: ; preds = %for.inc16.us %cmp19.us = icmp eq i32 %u.1.us, -1 br i1 %cmp19.us, label %for.cond62.preheader, label %if.end21.us if.end21.us: ; preds = %for.end18.us %idxprom22.us = sext i32 %u.1.us to i64 %arrayidx23.us = getelementptr inbounds [101 x i32], ptr @color, i64 0, i64 %idxprom22.us store i32 2, ptr %arrayidx23.us, align 4, !tbaa !5 br label %for.body26.us for.body26.us: ; preds = %if.end21.us, %for.inc59.us %indvars.iv165 = phi i64 [ 0, %if.end21.us ], [ %indvars.iv.next166, %for.inc59.us ] %arrayidx28.us = getelementptr inbounds [101 x i32], ptr @color, i64 0, i64 %indvars.iv165 %6 = load i32, ptr %arrayidx28.us, align 4, !tbaa !5 %cmp29.not.us = icmp eq i32 %6, 2 br i1 %cmp29.not.us, label %for.inc59.us, label %land.lhs.true30.us land.lhs.true30.us: ; preds = %for.body26.us %arrayidx34.us = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %idxprom22.us, i64 %indvars.iv165 %7 = load i32, ptr %arrayidx34.us, align 4, !tbaa !5 %arrayidx36.us = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %indvars.iv165 %8 = load i32, ptr %arrayidx36.us, align 4, !tbaa !5 %cmp37.us = icmp slt i32 %7, %8 br i1 %cmp37.us, label %if.then46.us, label %for.inc59.us if.then46.us: ; preds = %land.lhs.true30.us store i32 %7, ptr %arrayidx36.us, align 4, !tbaa !5 %arrayidx54.us = getelementptr inbounds [101 x i32], ptr @p, i64 0, i64 %indvars.iv165 store i32 %u.1.us, ptr %arrayidx54.us, align 4, !tbaa !5 store i32 1, ptr %arrayidx28.us, align 4, !tbaa !5 br label %for.inc59.us for.inc59.us: ; preds = %if.then46.us, %land.lhs.true30.us, %for.body26.us %indvars.iv.next166 = add nuw nsw i64 %indvars.iv165, 1 %exitcond169.not = icmp eq i64 %indvars.iv.next166, %wide.trip.count168 br i1 %exitcond169.not, label %for.body7.us.backedge, label %for.body26.us, !llvm.loop !14 for.body7.us: ; preds = %for.body7.us.backedge, %while.cond.us.preheader %indvars.iv160 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv160.be, %for.body7.us.backedge ] %min.0118.us = phi i32 [ 2001, %while.cond.us.preheader ], [ %min.0118.us.be, %for.body7.us.backedge ] %u.0117.us = phi i32 [ -1, %while.cond.us.preheader ], [ %u.0117.us.be, %for.body7.us.backedge ] %arrayidx9.us = getelementptr inbounds [101 x i32], ptr @d, i64 0, i64 %indvars.iv160 %9 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cmp10.us = icmp sgt i32 %min.0118.us, %9 br i1 %cmp10.us, label %land.lhs.true.us, label %for.inc16.us land.lhs.true.us: ; preds = %for.body7.us %arrayidx12.us = getelementptr inbounds [101 x i32], ptr @color, i64 0, i64 %indvars.iv160 %10 = load i32, ptr %arrayidx12.us, align 4, !tbaa !5 %cmp13.not.us = icmp eq i32 %10, 2 %11 = trunc i64 %indvars.iv160 to i32 %spec.select.us = select i1 %cmp13.not.us, i32 %u.0117.us, i32 %11 %spec.select112.us = select i1 %cmp13.not.us, i32 %min.0118.us, i32 %9 br label %for.inc16.us for.inc16.us: ; preds = %land.lhs.true.us, %for.body7.us %u.1.us = phi i32 [ %u.0117.us, %for.body7.us ], [ %spec.select.us, %land.lhs.true.us ] %min.1.us = phi i32 [ %min.0118.us, %for.body7.us ], [ %spec.select112.us, %land.lhs.true.us ] %indvars.iv.next161 = add nuw nsw i64 %indvars.iv160, 1 %exitcond164.not = icmp eq i64 %indvars.iv.next161, %wide.trip.count163 br i1 %exitcond164.not, label %for.end18.us, label %for.body7.us.backedge for.body7.us.backedge: ; preds = %for.inc59.us, %for.inc16.us %indvars.iv160.be = phi i64 [ %indvars.iv.next161, %for.inc16.us ], [ 0, %for.inc59.us ] %min.0118.us.be = phi i32 [ %min.1.us, %for.inc16.us ], [ 2001, %for.inc59.us ] %u.0117.us.be = phi i32 [ %u.1.us, %for.inc16.us ], [ -1, %for.inc59.us ] br label %for.body7.us, !llvm.loop !14 for.cond62.preheader: ; preds = %for.end18.us br i1 %cmp113, label %for.body64.preheader, label %for.end78 for.body64.preheader: ; preds = %for.cond62.preheader %xtraiter = and i64 %wide.trip.count168, 1 %12 = icmp eq i32 %.fr, 1 br i1 %12, label %for.end78.loopexit.unr-lcssa, label %for.body64.preheader.new for.body64.preheader.new: ; preds = %for.body64.preheader %unroll_iter = and i64 %wide.trip.count168, 4294967294 br label %for.body64 for.body64: ; preds = %for.inc76.1, %for.body64.preheader.new %indvars.iv170 = phi i64 [ 0, %for.body64.preheader.new ], [ %indvars.iv.next171.1, %for.inc76.1 ] %sum.0151 = phi i32 [ 0, %for.body64.preheader.new ], [ %sum.1.1, %for.inc76.1 ] %niter = phi i64 [ 0, %for.body64.preheader.new ], [ %niter.next.1, %for.inc76.1 ] %arrayidx66 = getelementptr inbounds [101 x i32], ptr @p, i64 0, i64 %indvars.iv170 %13 = load i32, ptr %arrayidx66, align 8, !tbaa !5 %cmp67.not = icmp eq i32 %13, -1 br i1 %cmp67.not, label %for.inc76, label %if.then68 if.then68: ; preds = %for.body64 %idxprom73 = sext i32 %13 to i64 %arrayidx74 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv170, i64 %idxprom73 %14 = load i32, ptr %arrayidx74, align 4, !tbaa !5 %add = add nsw i32 %14, %sum.0151 br label %for.inc76 for.inc76: ; preds = %for.body64, %if.then68 %sum.1 = phi i32 [ %add, %if.then68 ], [ %sum.0151, %for.body64 ] %indvars.iv.next171 = or i64 %indvars.iv170, 1 %arrayidx66.1 = getelementptr inbounds [101 x i32], ptr @p, i64 0, i64 %indvars.iv.next171 %15 = load i32, ptr %arrayidx66.1, align 4, !tbaa !5 %cmp67.not.1 = icmp eq i32 %15, -1 br i1 %cmp67.not.1, label %for.inc76.1, label %if.then68.1 if.then68.1: ; preds = %for.inc76 %idxprom73.1 = sext i32 %15 to i64 %arrayidx74.1 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv.next171, i64 %idxprom73.1 %16 = load i32, ptr %arrayidx74.1, align 4, !tbaa !5 %add.1 = add nsw i32 %16, %sum.1 br label %for.inc76.1 for.inc76.1: ; preds = %if.then68.1, %for.inc76 %sum.1.1 = phi i32 [ %add.1, %if.then68.1 ], [ %sum.1, %for.inc76 ] %indvars.iv.next171.1 = add nuw nsw i64 %indvars.iv170, 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.end78.loopexit.unr-lcssa, label %for.body64, !llvm.loop !15 for.end78.loopexit.unr-lcssa: ; preds = %for.inc76.1, %for.body64.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body64.preheader ], [ %sum.1.1, %for.inc76.1 ] %indvars.iv170.unr = phi i64 [ 0, %for.body64.preheader ], [ %indvars.iv.next171.1, %for.inc76.1 ] %sum.0151.unr = phi i32 [ 0, %for.body64.preheader ], [ %sum.1.1, %for.inc76.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end78, label %for.body64.epil for.body64.epil: ; preds = %for.end78.loopexit.unr-lcssa %arrayidx66.epil = getelementptr inbounds [101 x i32], ptr @p, i64 0, i64 %indvars.iv170.unr %17 = load i32, ptr %arrayidx66.epil, align 4, !tbaa !5 %cmp67.not.epil = icmp eq i32 %17, -1 br i1 %cmp67.not.epil, label %for.end78, label %if.then68.epil if.then68.epil: ; preds = %for.body64.epil %idxprom73.epil = sext i32 %17 to i64 %arrayidx74.epil = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv170.unr, i64 %idxprom73.epil %18 = load i32, ptr %arrayidx74.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %18, %sum.0151.unr br label %for.end78 for.end78: ; preds = %for.end78.loopexit.unr-lcssa, %if.then68.epil, %for.body64.epil, %for.end.thread, %for.end, %for.cond62.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond62.preheader ], [ 0, %for.end ], [ 0, %for.end.thread ], [ %sum.1.lcssa.ph, %for.end78.loopexit.unr-lcssa ], [ %add.epil, %if.then68.epil ], [ %sum.0151.unr, %for.body64.epil ] ret i32 %sum.0.lcssa } ; 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 %cmp47 = icmp sgt i32 %0, 0 br i1 %cmp47, label %for.cond1.preheader, label %for.end30 for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %33, %for.inc7 ], [ %0, %entry ] %indvars.iv56 = phi i64 [ %indvars.iv.next57, %for.inc7 ], [ 0, %entry ] %cmp245 = icmp sgt i32 %1, 0 br i1 %cmp245, label %for.body3, label %for.cond1.preheader.for.inc7_crit_edge for.cond1.preheader.for.inc7_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %1 to i64 br label %for.inc7 for.cond10.preheader: ; preds = %for.inc7 %cmp1151 = icmp sgt i32 %33, 0 br i1 %cmp1151, label %for.cond13.preheader.us.preheader, label %for.end30 for.cond13.preheader.us.preheader: ; preds = %for.cond10.preheader %wide.trip.count65 = zext i32 %33 to i64 %min.iters.check = icmp ult i32 %33, 8 %n.vec = and i64 %wide.trip.count65, 4294967288 %cmp.n = icmp eq i64 %n.vec, %wide.trip.count65 br label %for.cond13.preheader.us for.cond13.preheader.us: ; preds = %for.cond13.preheader.us.preheader, %for.cond13.for.inc28_crit_edge.us %indvars.iv62 = phi i64 [ 0, %for.cond13.preheader.us.preheader ], [ %indvars.iv.next63, %for.cond13.for.inc28_crit_edge.us ] br i1 %min.iters.check, label %for.body15.us.preheader, label %vector.body vector.body: ; preds = %for.cond13.preheader.us, %pred.store.continue87 %index = phi i64 [ %index.next, %pred.store.continue87 ], [ 0, %for.cond13.preheader.us ] %2 = or i64 %index, 4 %3 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %index %wide.load = load <4 x i32>, ptr %3, align 4, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 %wide.load73 = load <4 x i32>, ptr %4, align 4, !tbaa !5 %5 = icmp eq <4 x i32> %wide.load, <i32 -1, i32 -1, i32 -1, i32 -1> %6 = icmp eq <4 x i32> %wide.load73, <i32 -1, i32 -1, i32 -1, i32 -1> %7 = extractelement <4 x i1> %5, i64 0 br i1 %7, label %pred.store.if, label %pred.store.continue pred.store.if: ; preds = %vector.body %8 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %index store i32 2001, ptr %8, align 4, !tbaa !5 br label %pred.store.continue pred.store.continue: ; preds = %pred.store.if, %vector.body %9 = extractelement <4 x i1> %5, i64 1 br i1 %9, label %pred.store.if74, label %pred.store.continue75 pred.store.if74: ; preds = %pred.store.continue %10 = or i64 %index, 1 %11 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %10 store i32 2001, ptr %11, align 4, !tbaa !5 br label %pred.store.continue75 pred.store.continue75: ; preds = %pred.store.if74, %pred.store.continue %12 = extractelement <4 x i1> %5, i64 2 br i1 %12, label %pred.store.if76, label %pred.store.continue77 pred.store.if76: ; preds = %pred.store.continue75 %13 = or i64 %index, 2 %14 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %13 store i32 2001, ptr %14, align 4, !tbaa !5 br label %pred.store.continue77 pred.store.continue77: ; preds = %pred.store.if76, %pred.store.continue75 %15 = extractelement <4 x i1> %5, i64 3 br i1 %15, label %pred.store.if78, label %pred.store.continue79 pred.store.if78: ; preds = %pred.store.continue77 %16 = or i64 %index, 3 %17 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %16 store i32 2001, ptr %17, align 4, !tbaa !5 br label %pred.store.continue79 pred.store.continue79: ; preds = %pred.store.if78, %pred.store.continue77 %18 = extractelement <4 x i1> %6, i64 0 br i1 %18, label %pred.store.if80, label %pred.store.continue81 pred.store.if80: ; preds = %pred.store.continue79 %19 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %2 store i32 2001, ptr %19, align 4, !tbaa !5 br label %pred.store.continue81 pred.store.continue81: ; preds = %pred.store.if80, %pred.store.continue79 %20 = extractelement <4 x i1> %6, i64 1 br i1 %20, label %pred.store.if82, label %pred.store.continue83 pred.store.if82: ; preds = %pred.store.continue81 %21 = or i64 %index, 5 %22 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %21 store i32 2001, ptr %22, align 4, !tbaa !5 br label %pred.store.continue83 pred.store.continue83: ; preds = %pred.store.if82, %pred.store.continue81 %23 = extractelement <4 x i1> %6, i64 2 br i1 %23, label %pred.store.if84, label %pred.store.continue85 pred.store.if84: ; preds = %pred.store.continue83 %24 = or i64 %index, 6 %25 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %24 store i32 2001, ptr %25, align 4, !tbaa !5 br label %pred.store.continue85 pred.store.continue85: ; preds = %pred.store.if84, %pred.store.continue83 %26 = extractelement <4 x i1> %6, i64 3 br i1 %26, label %pred.store.if86, label %pred.store.continue87 pred.store.if86: ; preds = %pred.store.continue85 %27 = or i64 %index, 7 %28 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %27 store i32 2001, ptr %28, align 4, !tbaa !5 br label %pred.store.continue87 pred.store.continue87: ; preds = %pred.store.if86, %pred.store.continue85 %index.next = add nuw i64 %index, 8 %29 = icmp eq i64 %index.next, %n.vec br i1 %29, label %middle.block, label %vector.body, !llvm.loop !16 middle.block: ; preds = %pred.store.continue87 br i1 %cmp.n, label %for.cond13.for.inc28_crit_edge.us, label %for.body15.us.preheader for.body15.us.preheader: ; preds = %for.cond13.preheader.us, %middle.block %indvars.iv59.ph = phi i64 [ 0, %for.cond13.preheader.us ], [ %n.vec, %middle.block ] br label %for.body15.us for.body15.us: ; preds = %for.body15.us.preheader, %for.inc25.us %indvars.iv59 = phi i64 [ %indvars.iv.next60, %for.inc25.us ], [ %indvars.iv59.ph, %for.body15.us.preheader ] %arrayidx19.us = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv62, i64 %indvars.iv59 %30 = load i32, ptr %arrayidx19.us, align 4, !tbaa !5 %cmp20.us = icmp eq i32 %30, -1 br i1 %cmp20.us, label %if.then.us, label %for.inc25.us if.then.us: ; preds = %for.body15.us store i32 2001, ptr %arrayidx19.us, align 4, !tbaa !5 br label %for.inc25.us for.inc25.us: ; preds = %if.then.us, %for.body15.us %indvars.iv.next60 = add nuw nsw i64 %indvars.iv59, 1 %exitcond.not = icmp eq i64 %indvars.iv.next60, %wide.trip.count65 br i1 %exitcond.not, label %for.cond13.for.inc28_crit_edge.us, label %for.body15.us, !llvm.loop !17 for.cond13.for.inc28_crit_edge.us: ; preds = %for.inc25.us, %middle.block %indvars.iv.next63 = add nuw nsw i64 %indvars.iv62, 1 %exitcond66.not = icmp eq i64 %indvars.iv.next63, %wide.trip.count65 br i1 %exitcond66.not, label %for.end30, label %for.cond13.preheader.us, !llvm.loop !18 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [101 x [101 x i32]], ptr @G, i64 0, i64 %indvars.iv56, i64 %indvars.iv %call6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %31 = load i32, ptr @n, align 4, !tbaa !5 %32 = sext i32 %31 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %32 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !19 for.inc7: ; preds = %for.body3, %for.cond1.preheader.for.inc7_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc7_crit_edge ], [ %32, %for.body3 ] %33 = phi i32 [ %1, %for.cond1.preheader.for.inc7_crit_edge ], [ %31, %for.body3 ] %indvars.iv.next57 = add nuw nsw i64 %indvars.iv56, 1 %cmp = icmp slt i64 %indvars.iv.next57, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.cond10.preheader, !llvm.loop !20 for.end30: ; preds = %for.cond13.for.inc28_crit_edge.us, %entry, %for.cond10.preheader %call31 = tail call i32 @prim() %call32 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %call31) 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 nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 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, !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} !16 = distinct !{!16, !10, !11, !12} !17 = distinct !{!17, !10, !12, !11} !18 = distinct !{!18, !10} !19 = distinct !{!19, !10} !20 = distinct !{!20, !10, !21} !21 = !{!"llvm.loop.unswitch.partial.disable"}
#include <stdio.h> #define INF (int)2e9 #define MAX 10000 int a[MAX][MAX]; int prim(int n) { int u, minv; int sum = 0; int d[MAX], p[MAX], color[MAX]; for (int i = 0; i < n; ++i) { d[i] = INF; p[i] = -1; color[i] = 0; } d[0] = 0; while (1) { minv = INF; u = -1; for (int i = 0; i < n; ++i) { if (color[i] != 2 && minv > d[i]) { u = i; minv = d[i]; } } if (u == -1) { break; } color[u] = 2; for (int i = 0; i < n; ++i) { if (color[i] != 2 && a[u][i] != INF) { if (d[i] > a[u][i]) { d[i] = a[u][i]; p[i] = u; color[i] = 1; } } } } for (int i = 0; i < n; ++i) { if (p[i] != -1) { sum += a[i][p[i]]; } } return sum; } int main() { int n; int i, j; int v; scanf("%d", &n); for (i = 0; i < n; ++i) { for (j = 0; j < n; ++j) { scanf("%d", &v); a[i][j] = (v == -1) ? INF : v; } } printf("%d\n", prim(n)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199747/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199747/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @a = dso_local local_unnamed_addr global [10000 x [10000 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @prim(i32 noundef %n) local_unnamed_addr #0 { entry: %d = alloca [10000 x i32], align 16 %p = alloca [10000 x i32], align 16 %color = alloca [10000 x i32], align 16 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %d) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %p) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %color) #6 %cmp118 = icmp sgt i32 %n, 0 br i1 %cmp118, label %for.body.preheader, label %for.cond.cleanup68 for.body.preheader: ; preds = %entry %0 = zext i32 %n to i64 %1 = shl nuw nsw i64 %0, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p, i8 -1, i64 %1, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color, i8 0, i64 %1, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %n, 8 br i1 %min.iters.check, label %for.body.preheader172, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %0, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %2 = getelementptr inbounds [10000 x i32], ptr %d, i64 0, i64 %index store <4 x i32> <i32 2000000000, i32 2000000000, i32 2000000000, i32 2000000000>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds i32, ptr %2, i64 4 store <4 x i32> <i32 2000000000, i32 2000000000, i32 2000000000, i32 2000000000>, ptr %3, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %4 = icmp eq i64 %index.next, %n.vec br i1 %4, label %middle.block, label %vector.body, !llvm.loop !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %0 br i1 %cmp.n, label %for.cond.cleanup, label %for.body.preheader172 for.body.preheader172: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.cond.cleanup: ; preds = %for.body, %middle.block store i32 0, ptr %d, align 16, !tbaa !5 br i1 %cmp118, label %while.cond.us.preheader, label %for.cond.cleanup68 while.cond.us.preheader: ; preds = %for.cond.cleanup %wide.trip.count160 = zext i32 %n to i64 %wide.trip.count165 = zext i32 %n to i64 br label %for.body10.us for.cond.cleanup9.us: ; preds = %for.inc19.us %cmp22.us = icmp eq i32 %u.1.us, -1 br i1 %cmp22.us, label %for.cond66.preheader, label %if.end24.us if.end24.us: ; preds = %for.cond.cleanup9.us %idxprom25.us = sext i32 %u.1.us to i64 %arrayidx26.us = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %idxprom25.us store i32 2, ptr %arrayidx26.us, align 4, !tbaa !5 br label %for.body31.us for.body31.us: ; preds = %if.end24.us, %for.inc62.us %indvars.iv162 = phi i64 [ 0, %if.end24.us ], [ %indvars.iv.next163, %for.inc62.us ] %arrayidx33.us = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %indvars.iv162 %5 = load i32, ptr %arrayidx33.us, align 4, !tbaa !5 %cmp34.not.us = icmp eq i32 %5, 2 br i1 %cmp34.not.us, label %for.inc62.us, label %land.lhs.true35.us land.lhs.true35.us: ; preds = %for.body31.us %arrayidx39.us = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %idxprom25.us, i64 %indvars.iv162 %6 = load i32, ptr %arrayidx39.us, align 4, !tbaa !5 %cmp40.not.us = icmp eq i32 %6, 2000000000 br i1 %cmp40.not.us, label %for.inc62.us, label %if.then41.us if.then41.us: ; preds = %land.lhs.true35.us %arrayidx43.us = getelementptr inbounds [10000 x i32], ptr %d, i64 0, i64 %indvars.iv162 %7 = load i32, ptr %arrayidx43.us, align 4, !tbaa !5 %cmp48.us = icmp sgt i32 %7, %6 br i1 %cmp48.us, label %if.then49.us, label %for.inc62.us if.then49.us: ; preds = %if.then41.us store i32 %6, ptr %arrayidx43.us, align 4, !tbaa !5 %arrayidx57.us = getelementptr inbounds [10000 x i32], ptr %p, i64 0, i64 %indvars.iv162 store i32 %u.1.us, ptr %arrayidx57.us, align 4, !tbaa !5 store i32 1, ptr %arrayidx33.us, align 4, !tbaa !5 br label %for.inc62.us for.inc62.us: ; preds = %if.then49.us, %if.then41.us, %land.lhs.true35.us, %for.body31.us %indvars.iv.next163 = add nuw nsw i64 %indvars.iv162, 1 %exitcond166.not = icmp eq i64 %indvars.iv.next163, %wide.trip.count165 br i1 %exitcond166.not, label %for.body10.us.backedge, label %for.body31.us, !llvm.loop !13 for.body10.us: ; preds = %for.body10.us.backedge, %while.cond.us.preheader %indvars.iv157 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv157.be, %for.body10.us.backedge ] %minv.0122.us = phi i32 [ 2000000000, %while.cond.us.preheader ], [ %minv.0122.us.be, %for.body10.us.backedge ] %u.0121.us = phi i32 [ -1, %while.cond.us.preheader ], [ %u.0121.us.be, %for.body10.us.backedge ] %arrayidx12.us = getelementptr inbounds [10000 x i32], ptr %color, i64 0, i64 %indvars.iv157 %8 = load i32, ptr %arrayidx12.us, align 4, !tbaa !5 %cmp13.not.us = icmp eq i32 %8, 2 br i1 %cmp13.not.us, label %for.inc19.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body10.us %arrayidx15.us = getelementptr inbounds [10000 x i32], ptr %d, i64 0, i64 %indvars.iv157 %9 = load i32, ptr %arrayidx15.us, align 4, !tbaa !5 %cmp16.us = icmp sgt i32 %minv.0122.us, %9 %10 = trunc i64 %indvars.iv157 to i32 %spec.select.us = select i1 %cmp16.us, i32 %10, i32 %u.0121.us %spec.select117.us = tail call i32 @llvm.smin.i32(i32 %minv.0122.us, i32 %9) br label %for.inc19.us for.inc19.us: ; preds = %land.lhs.true.us, %for.body10.us %u.1.us = phi i32 [ %u.0121.us, %for.body10.us ], [ %spec.select.us, %land.lhs.true.us ] %minv.1.us = phi i32 [ %minv.0122.us, %for.body10.us ], [ %spec.select117.us, %land.lhs.true.us ] %indvars.iv.next158 = add nuw nsw i64 %indvars.iv157, 1 %exitcond161.not = icmp eq i64 %indvars.iv.next158, %wide.trip.count160 br i1 %exitcond161.not, label %for.cond.cleanup9.us, label %for.body10.us.backedge for.body10.us.backedge: ; preds = %for.inc62.us, %for.inc19.us %indvars.iv157.be = phi i64 [ %indvars.iv.next158, %for.inc19.us ], [ 0, %for.inc62.us ] %minv.0122.us.be = phi i32 [ %minv.1.us, %for.inc19.us ], [ 2000000000, %for.inc62.us ] %u.0121.us.be = phi i32 [ %u.1.us, %for.inc19.us ], [ -1, %for.inc62.us ] br label %for.body10.us, !llvm.loop !13 for.body: ; preds = %for.body.preheader172, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader172 ] %arrayidx = getelementptr inbounds [10000 x i32], ptr %d, i64 0, i64 %indvars.iv store i32 2000000000, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %0 br i1 %exitcond.not, label %for.cond.cleanup, label %for.body, !llvm.loop !14 for.cond66.preheader: ; preds = %for.cond.cleanup9.us br i1 %cmp118, label %for.body69.preheader, label %for.cond.cleanup68 for.body69.preheader: ; preds = %for.cond66.preheader %xtraiter = and i64 %0, 1 %11 = icmp eq i32 %n, 1 br i1 %11, label %for.cond.cleanup68.loopexit.unr-lcssa, label %for.body69.preheader.new for.body69.preheader.new: ; preds = %for.body69.preheader %unroll_iter = and i64 %0, 4294967294 br label %for.body69 for.cond.cleanup68.loopexit.unr-lcssa: ; preds = %for.inc81.1, %for.body69.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body69.preheader ], [ %sum.1.1, %for.inc81.1 ] %indvars.iv167.unr = phi i64 [ 0, %for.body69.preheader ], [ %indvars.iv.next168.1, %for.inc81.1 ] %sum.0154.unr = phi i32 [ 0, %for.body69.preheader ], [ %sum.1.1, %for.inc81.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.cond.cleanup68, label %for.body69.epil for.body69.epil: ; preds = %for.cond.cleanup68.loopexit.unr-lcssa %arrayidx71.epil = getelementptr inbounds [10000 x i32], ptr %p, i64 0, i64 %indvars.iv167.unr %12 = load i32, ptr %arrayidx71.epil, align 4, !tbaa !5 %cmp72.not.epil = icmp eq i32 %12, -1 br i1 %cmp72.not.epil, label %for.cond.cleanup68, label %if.then73.epil if.then73.epil: ; preds = %for.body69.epil %idxprom78.epil = sext i32 %12 to i64 %arrayidx79.epil = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv167.unr, i64 %idxprom78.epil %13 = load i32, ptr %arrayidx79.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %13, %sum.0154.unr br label %for.cond.cleanup68 for.cond.cleanup68: ; preds = %for.cond.cleanup68.loopexit.unr-lcssa, %if.then73.epil, %for.body69.epil, %entry, %for.cond.cleanup, %for.cond66.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond66.preheader ], [ 0, %for.cond.cleanup ], [ 0, %entry ], [ %sum.1.lcssa.ph, %for.cond.cleanup68.loopexit.unr-lcssa ], [ %add.epil, %if.then73.epil ], [ %sum.0154.unr, %for.body69.epil ] call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %color) #6 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %p) #6 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %d) #6 ret i32 %sum.0.lcssa for.body69: ; preds = %for.inc81.1, %for.body69.preheader.new %indvars.iv167 = phi i64 [ 0, %for.body69.preheader.new ], [ %indvars.iv.next168.1, %for.inc81.1 ] %sum.0154 = phi i32 [ 0, %for.body69.preheader.new ], [ %sum.1.1, %for.inc81.1 ] %niter = phi i64 [ 0, %for.body69.preheader.new ], [ %niter.next.1, %for.inc81.1 ] %arrayidx71 = getelementptr inbounds [10000 x i32], ptr %p, i64 0, i64 %indvars.iv167 %14 = load i32, ptr %arrayidx71, align 8, !tbaa !5 %cmp72.not = icmp eq i32 %14, -1 br i1 %cmp72.not, label %for.inc81, label %if.then73 if.then73: ; preds = %for.body69 %idxprom78 = sext i32 %14 to i64 %arrayidx79 = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv167, i64 %idxprom78 %15 = load i32, ptr %arrayidx79, align 4, !tbaa !5 %add = add nsw i32 %15, %sum.0154 br label %for.inc81 for.inc81: ; preds = %for.body69, %if.then73 %sum.1 = phi i32 [ %add, %if.then73 ], [ %sum.0154, %for.body69 ] %indvars.iv.next168 = or i64 %indvars.iv167, 1 %arrayidx71.1 = getelementptr inbounds [10000 x i32], ptr %p, i64 0, i64 %indvars.iv.next168 %16 = load i32, ptr %arrayidx71.1, align 4, !tbaa !5 %cmp72.not.1 = icmp eq i32 %16, -1 br i1 %cmp72.not.1, label %for.inc81.1, label %if.then73.1 if.then73.1: ; preds = %for.inc81 %idxprom78.1 = sext i32 %16 to i64 %arrayidx79.1 = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv.next168, i64 %idxprom78.1 %17 = load i32, ptr %arrayidx79.1, align 4, !tbaa !5 %add.1 = add nsw i32 %17, %sum.1 br label %for.inc81.1 for.inc81.1: ; preds = %if.then73.1, %for.inc81 %sum.1.1 = phi i32 [ %add.1, %if.then73.1 ], [ %sum.1, %for.inc81 ] %indvars.iv.next168.1 = add nuw nsw i64 %indvars.iv167, 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.cleanup68.loopexit.unr-lcssa, label %for.body69, !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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %d.i = alloca [10000 x i32], align 16 %p.i = alloca [10000 x i32], align 16 %color.i = alloca [10000 x i32], align 16 %n = alloca i32, align 4 %v = 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 %v) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp20 = icmp sgt i32 %.pr, 0 br i1 %cmp20, label %for.cond1.preheader, label %for.end10.thread for.end10.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %d.i) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %p.i) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %color.i) #6 br label %prim.exit for.cond1.preheader: ; preds = %entry, %for.inc8 %0 = phi i32 [ %4, %for.inc8 ], [ %.pr, %entry ] %indvars.iv26 = phi i64 [ %indvars.iv.next27, %for.inc8 ], [ 0, %entry ] %cmp218 = icmp sgt i32 %0, 0 br i1 %cmp218, label %for.body3, label %for.cond1.preheader.for.inc8_crit_edge for.cond1.preheader.for.inc8_crit_edge: ; preds = %for.cond1.preheader %.pre = sext i32 %0 to i64 br label %for.inc8 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %v) %1 = load i32, ptr %v, align 4 %cmp5 = icmp eq i32 %1, -1 %cond = select i1 %cmp5, i32 2000000000, i32 %1 %arrayidx7 = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv26, i64 %indvars.iv store i32 %cond, ptr %arrayidx7, align 4, !tbaa !5 %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc8, !llvm.loop !16 for.inc8: ; preds = %for.body3, %for.cond1.preheader.for.inc8_crit_edge %.pre-phi = phi i64 [ %.pre, %for.cond1.preheader.for.inc8_crit_edge ], [ %3, %for.body3 ] %4 = phi i32 [ %0, %for.cond1.preheader.for.inc8_crit_edge ], [ %2, %for.body3 ] %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1 %cmp = icmp slt i64 %indvars.iv.next27, %.pre-phi br i1 %cmp, label %for.cond1.preheader, label %for.end10, !llvm.loop !17 for.end10: ; preds = %for.inc8 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %d.i) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %p.i) #6 call void @llvm.lifetime.start.p0(i64 40000, ptr nonnull %color.i) #6 %cmp118.i = icmp sgt i32 %4, 0 br i1 %cmp118.i, label %for.body.preheader.i, label %prim.exit for.body.preheader.i: ; preds = %for.end10 %5 = zext i32 %4 to i64 %6 = shl nuw nsw i64 %5, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p.i, i8 -1, i64 %6, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color.i, i8 0, i64 %6, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %4, 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 %5, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %7 = getelementptr inbounds [10000 x i32], ptr %d.i, i64 0, i64 %index store <4 x i32> <i32 2000000000, i32 2000000000, i32 2000000000, i32 2000000000>, ptr %7, align 16, !tbaa !5 %8 = getelementptr inbounds i32, ptr %7, i64 4 store <4 x i32> <i32 2000000000, i32 2000000000, i32 2000000000, i32 2000000000>, ptr %8, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %9 = icmp eq i64 %index.next, %n.vec br i1 %9, label %middle.block, label %vector.body, !llvm.loop !19 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %5 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %middle.block ] br label %for.body.i while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr %d.i, align 16, !tbaa !5 br label %for.body10.us.i for.cond.cleanup9.us.i: ; preds = %for.inc19.us.i %cmp22.us.i = icmp eq i32 %u.1.us.i, -1 br i1 %cmp22.us.i, label %for.body69.i.preheader, label %if.end24.us.i for.body69.i.preheader: ; preds = %for.cond.cleanup9.us.i %xtraiter = and i64 %5, 1 %10 = icmp eq i32 %4, 1 br i1 %10, label %prim.exit.loopexit.unr-lcssa, label %for.body69.i.preheader.new for.body69.i.preheader.new: ; preds = %for.body69.i.preheader %unroll_iter = and i64 %5, 4294967294 br label %for.body69.i if.end24.us.i: ; preds = %for.cond.cleanup9.us.i %idxprom25.us.i = sext i32 %u.1.us.i to i64 %arrayidx26.us.i = getelementptr inbounds [10000 x i32], ptr %color.i, i64 0, i64 %idxprom25.us.i store i32 2, ptr %arrayidx26.us.i, align 4, !tbaa !5 br label %for.body31.us.i for.body31.us.i: ; preds = %for.inc62.us.i, %if.end24.us.i %indvars.iv162.i = phi i64 [ 0, %if.end24.us.i ], [ %indvars.iv.next163.i, %for.inc62.us.i ] %arrayidx33.us.i = getelementptr inbounds [10000 x i32], ptr %color.i, i64 0, i64 %indvars.iv162.i %11 = load i32, ptr %arrayidx33.us.i, align 4, !tbaa !5 %cmp34.not.us.i = icmp eq i32 %11, 2 br i1 %cmp34.not.us.i, label %for.inc62.us.i, label %land.lhs.true35.us.i land.lhs.true35.us.i: ; preds = %for.body31.us.i %arrayidx39.us.i = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %idxprom25.us.i, i64 %indvars.iv162.i %12 = load i32, ptr %arrayidx39.us.i, align 4, !tbaa !5 %cmp40.not.us.i = icmp eq i32 %12, 2000000000 br i1 %cmp40.not.us.i, label %for.inc62.us.i, label %if.then41.us.i if.then41.us.i: ; preds = %land.lhs.true35.us.i %arrayidx43.us.i = getelementptr inbounds [10000 x i32], ptr %d.i, i64 0, i64 %indvars.iv162.i %13 = load i32, ptr %arrayidx43.us.i, align 4, !tbaa !5 %cmp48.us.i = icmp sgt i32 %13, %12 br i1 %cmp48.us.i, label %if.then49.us.i, label %for.inc62.us.i if.then49.us.i: ; preds = %if.then41.us.i store i32 %12, ptr %arrayidx43.us.i, align 4, !tbaa !5 %arrayidx57.us.i = getelementptr inbounds [10000 x i32], ptr %p.i, i64 0, i64 %indvars.iv162.i store i32 %u.1.us.i, ptr %arrayidx57.us.i, align 4, !tbaa !5 store i32 1, ptr %arrayidx33.us.i, align 4, !tbaa !5 br label %for.inc62.us.i for.inc62.us.i: ; preds = %if.then49.us.i, %if.then41.us.i, %land.lhs.true35.us.i, %for.body31.us.i %indvars.iv.next163.i = add nuw nsw i64 %indvars.iv162.i, 1 %exitcond166.not.i = icmp eq i64 %indvars.iv.next163.i, %5 br i1 %exitcond166.not.i, label %for.body10.us.i.backedge, label %for.body31.us.i, !llvm.loop !13 for.body10.us.i: ; preds = %for.body10.us.i.backedge, %while.cond.us.preheader.i %indvars.iv157.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv157.i.be, %for.body10.us.i.backedge ] %minv.0122.us.i = phi i32 [ 2000000000, %while.cond.us.preheader.i ], [ %minv.0122.us.i.be, %for.body10.us.i.backedge ] %u.0121.us.i = phi i32 [ -1, %while.cond.us.preheader.i ], [ %u.0121.us.i.be, %for.body10.us.i.backedge ] %arrayidx12.us.i = getelementptr inbounds [10000 x i32], ptr %color.i, i64 0, i64 %indvars.iv157.i %14 = load i32, ptr %arrayidx12.us.i, align 4, !tbaa !5 %cmp13.not.us.i = icmp eq i32 %14, 2 br i1 %cmp13.not.us.i, label %for.inc19.us.i, label %land.lhs.true.us.i land.lhs.true.us.i: ; preds = %for.body10.us.i %arrayidx15.us.i = getelementptr inbounds [10000 x i32], ptr %d.i, i64 0, i64 %indvars.iv157.i %15 = load i32, ptr %arrayidx15.us.i, align 4, !tbaa !5 %cmp16.us.i = icmp sgt i32 %minv.0122.us.i, %15 %16 = trunc i64 %indvars.iv157.i to i32 %spec.select.us.i = select i1 %cmp16.us.i, i32 %16, i32 %u.0121.us.i %spec.select117.us.i = call i32 @llvm.smin.i32(i32 %minv.0122.us.i, i32 %15) br label %for.inc19.us.i for.inc19.us.i: ; preds = %land.lhs.true.us.i, %for.body10.us.i %u.1.us.i = phi i32 [ %u.0121.us.i, %for.body10.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %minv.1.us.i = phi i32 [ %minv.0122.us.i, %for.body10.us.i ], [ %spec.select117.us.i, %land.lhs.true.us.i ] %indvars.iv.next158.i = add nuw nsw i64 %indvars.iv157.i, 1 %exitcond161.not.i = icmp eq i64 %indvars.iv.next158.i, %5 br i1 %exitcond161.not.i, label %for.cond.cleanup9.us.i, label %for.body10.us.i.backedge for.body10.us.i.backedge: ; preds = %for.inc62.us.i, %for.inc19.us.i %indvars.iv157.i.be = phi i64 [ %indvars.iv.next158.i, %for.inc19.us.i ], [ 0, %for.inc62.us.i ] %minv.0122.us.i.be = phi i32 [ %minv.1.us.i, %for.inc19.us.i ], [ 2000000000, %for.inc62.us.i ] %u.0121.us.i.be = phi i32 [ %u.1.us.i, %for.inc19.us.i ], [ -1, %for.inc62.us.i ] br label %for.body10.us.i, !llvm.loop !13 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 ] %arrayidx.i = getelementptr inbounds [10000 x i32], ptr %d.i, i64 0, i64 %indvars.iv.i store i32 2000000000, ptr %arrayidx.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, %5 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !20 for.body69.i: ; preds = %for.inc81.i.1, %for.body69.i.preheader.new %indvars.iv167.i = phi i64 [ 0, %for.body69.i.preheader.new ], [ %indvars.iv.next168.i.1, %for.inc81.i.1 ] %sum.0154.i = phi i32 [ 0, %for.body69.i.preheader.new ], [ %sum.1.i.1, %for.inc81.i.1 ] %niter = phi i64 [ 0, %for.body69.i.preheader.new ], [ %niter.next.1, %for.inc81.i.1 ] %arrayidx71.i = getelementptr inbounds [10000 x i32], ptr %p.i, i64 0, i64 %indvars.iv167.i %17 = load i32, ptr %arrayidx71.i, align 8, !tbaa !5 %cmp72.not.i = icmp eq i32 %17, -1 br i1 %cmp72.not.i, label %for.inc81.i, label %if.then73.i if.then73.i: ; preds = %for.body69.i %idxprom78.i = sext i32 %17 to i64 %arrayidx79.i = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv167.i, i64 %idxprom78.i %18 = load i32, ptr %arrayidx79.i, align 4, !tbaa !5 %add.i = add nsw i32 %18, %sum.0154.i br label %for.inc81.i for.inc81.i: ; preds = %if.then73.i, %for.body69.i %sum.1.i = phi i32 [ %add.i, %if.then73.i ], [ %sum.0154.i, %for.body69.i ] %indvars.iv.next168.i = or i64 %indvars.iv167.i, 1 %arrayidx71.i.1 = getelementptr inbounds [10000 x i32], ptr %p.i, i64 0, i64 %indvars.iv.next168.i %19 = load i32, ptr %arrayidx71.i.1, align 4, !tbaa !5 %cmp72.not.i.1 = icmp eq i32 %19, -1 br i1 %cmp72.not.i.1, label %for.inc81.i.1, label %if.then73.i.1 if.then73.i.1: ; preds = %for.inc81.i %idxprom78.i.1 = sext i32 %19 to i64 %arrayidx79.i.1 = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv.next168.i, i64 %idxprom78.i.1 %20 = load i32, ptr %arrayidx79.i.1, align 4, !tbaa !5 %add.i.1 = add nsw i32 %20, %sum.1.i br label %for.inc81.i.1 for.inc81.i.1: ; preds = %if.then73.i.1, %for.inc81.i %sum.1.i.1 = phi i32 [ %add.i.1, %if.then73.i.1 ], [ %sum.1.i, %for.inc81.i ] %indvars.iv.next168.i.1 = add nuw nsw i64 %indvars.iv167.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 %prim.exit.loopexit.unr-lcssa, label %for.body69.i, !llvm.loop !15 prim.exit.loopexit.unr-lcssa: ; preds = %for.inc81.i.1, %for.body69.i.preheader %sum.1.i.lcssa.ph = phi i32 [ undef, %for.body69.i.preheader ], [ %sum.1.i.1, %for.inc81.i.1 ] %indvars.iv167.i.unr = phi i64 [ 0, %for.body69.i.preheader ], [ %indvars.iv.next168.i.1, %for.inc81.i.1 ] %sum.0154.i.unr = phi i32 [ 0, %for.body69.i.preheader ], [ %sum.1.i.1, %for.inc81.i.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %prim.exit, label %for.body69.i.epil for.body69.i.epil: ; preds = %prim.exit.loopexit.unr-lcssa %arrayidx71.i.epil = getelementptr inbounds [10000 x i32], ptr %p.i, i64 0, i64 %indvars.iv167.i.unr %21 = load i32, ptr %arrayidx71.i.epil, align 4, !tbaa !5 %cmp72.not.i.epil = icmp eq i32 %21, -1 br i1 %cmp72.not.i.epil, label %prim.exit, label %if.then73.i.epil if.then73.i.epil: ; preds = %for.body69.i.epil %idxprom78.i.epil = sext i32 %21 to i64 %arrayidx79.i.epil = getelementptr inbounds [10000 x [10000 x i32]], ptr @a, i64 0, i64 %indvars.iv167.i.unr, i64 %idxprom78.i.epil %22 = load i32, ptr %arrayidx79.i.epil, align 4, !tbaa !5 %add.i.epil = add nsw i32 %22, %sum.0154.i.unr br label %prim.exit prim.exit: ; preds = %prim.exit.loopexit.unr-lcssa, %if.then73.i.epil, %for.body69.i.epil, %for.end10.thread, %for.end10 %sum.0.lcssa.i = phi i32 [ 0, %for.end10 ], [ 0, %for.end10.thread ], [ %sum.1.i.lcssa.ph, %prim.exit.loopexit.unr-lcssa ], [ %add.i.epil, %if.then73.i.epil ], [ %sum.0154.i.unr, %for.body69.i.epil ] call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %color.i) #6 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %p.i) #6 call void @llvm.lifetime.end.p0(i64 40000, ptr nonnull %d.i) #6 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %v) #6 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: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5 attributes #0 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) } attributes #6 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10, !11, !12} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.isvectorized", i32 1} !12 = !{!"llvm.loop.unroll.runtime.disable"} !13 = distinct !{!13, !10} !14 = distinct !{!14, !10, !12, !11} !15 = distinct !{!15, !10} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !18} !18 = !{!"llvm.loop.unswitch.partial.disable"} !19 = distinct !{!19, !10, !11, !12} !20 = distinct !{!20, !10, !12, !11}
#include<stdio.h> #define N 100 #define WHITE 1 #define BLACK 2 #define INF 2000000 int n,array[N][N]; int prim(void); int main(){ int i,j,tmp; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ scanf("%d",&tmp); if(tmp != -1){ array[i][j] = tmp; } else{ array[i][j] = INF; } } } printf("%d\n",prim()); return 0; } int prim(){ int u,mincost,v,sum=0,i,j; int color[N],p[N],d[N]; for(i=0;i<n;i++){ color[i] = WHITE; d[i] = INF; p[i] = -1; } d[0] = 0; while(1){ mincost = INF; for(i=0;i<n;i++){ if(color[i] != BLACK && d[i] < mincost){ mincost = d[i]; u = i; } } if(mincost == INF) break; color[u] = BLACK; for(v=0;v<n;v++){ if(color[v] != BLACK && array[u][v] < d[v]){ p[v] = u; d[v] = array[u][v]; } } } for(i=0;i<n;i++){ sum += d[i]; } return sum; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199790/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199790/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @array = dso_local local_unnamed_addr global [100 x [100 x i32]] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %color.i = alloca [100 x i32], align 16 %d.i = alloca [100 x i32], align 16 %tmp = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %tmp) #5 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr.i25 = freeze i32 %0 %cmp26 = icmp sgt i32 %.fr.i25, 0 br i1 %cmp26, label %for.cond1.preheader, label %for.end14.thread for.end14.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 br label %prim.exit for.cond1.preheader: ; preds = %entry, %for.inc12 %1 = phi i32 [ %.fr.i, %for.inc12 ], [ %.fr.i25, %entry ] %indvars.iv31 = phi i64 [ %indvars.iv.next32, %for.inc12 ], [ 0, %entry ] %cmp223 = icmp sgt i32 %1, 0 br i1 %cmp223, label %for.body3, label %for.inc12 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %tmp) %2 = load i32, ptr %tmp, align 4, !tbaa !5 %cmp5.not = icmp eq i32 %2, -1 %spec.select = select i1 %cmp5.not, i32 2000000, i32 %2 %3 = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %indvars.iv31, i64 %indvars.iv store i32 %spec.select, ptr %3, align 4 %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 %cmp2 = icmp slt i64 %indvars.iv.next, %5 br i1 %cmp2, label %for.body3, label %for.inc12, !llvm.loop !9 for.inc12: ; preds = %for.body3, %for.cond1.preheader %6 = phi i32 [ %1, %for.cond1.preheader ], [ %4, %for.body3 ] %.fr.i = freeze i32 %6 %indvars.iv.next32 = add nuw nsw i64 %indvars.iv31, 1 %7 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next32, %7 br i1 %cmp, label %for.cond1.preheader, label %for.end14, !llvm.loop !11 for.end14: ; preds = %for.inc12 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 %cmp86.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp86.i, label %for.body.preheader.i, label %prim.exit for.body.preheader.i: ; preds = %for.end14 %wide.trip.count.i = zext i32 %.fr.i to i64 %min.iters.check = icmp ult i32 %.fr.i, 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 %wide.trip.count.i, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %8 = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %index store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %9, align 16, !tbaa !5 %10 = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %index store <4 x i32> <i32 2000000, i32 2000000, i32 2000000, i32 2000000>, ptr %10, align 16, !tbaa !5 %11 = getelementptr inbounds i32, ptr %10, i64 4 store <4 x i32> <i32 2000000, i32 2000000, i32 2000000, i32 2000000>, ptr %11, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %12 = icmp eq i64 %index.next, %n.vec br i1 %12, label %middle.block, label %vector.body, !llvm.loop !13 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count.i br i1 %cmp.n, label %while.cond.us.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv.i store i32 1, ptr %arrayidx.i, align 4, !tbaa !5 %arrayidx2.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv.i store i32 2000000, ptr %arrayidx2.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 %while.cond.us.us.preheader.i, label %for.body.i, !llvm.loop !16 while.cond.us.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr %d.i, align 16, !tbaa !5 %xtraiter = and i64 %wide.trip.count.i, 1 %13 = icmp eq i32 %.fr.i, 1 %unroll_iter = and i64 %wide.trip.count.i, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body8.us.us.i while.cond.us.us.loopexit.i.unr-lcssa: ; preds = %for.inc49.us.us.i.1, %if.end22.us.us.i %indvars.iv143.i.unr = phi i64 [ 0, %if.end22.us.us.i ], [ %indvars.iv.next144.i.1, %for.inc49.us.us.i.1 ] br i1 %lcmp.mod.not, label %for.body8.us.us.i.backedge, label %for.body27.us.us.i.epil for.body27.us.us.i.epil: ; preds = %while.cond.us.us.loopexit.i.unr-lcssa %arrayidx29.us.us.i.epil = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv143.i.unr %14 = load i32, ptr %arrayidx29.us.us.i.epil, align 4, !tbaa !5 %cmp30.not.us.us.i.epil = icmp eq i32 %14, 2 br i1 %cmp30.not.us.us.i.epil, label %for.body8.us.us.i.backedge, label %land.lhs.true31.us.us.i.epil land.lhs.true31.us.us.i.epil: ; preds = %for.body27.us.us.i.epil %arrayidx35.us.us.i.epil = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us.i, i64 %indvars.iv143.i.unr %15 = load i32, ptr %arrayidx35.us.us.i.epil, align 4, !tbaa !5 %arrayidx37.us.us.i.epil = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv143.i.unr %16 = load i32, ptr %arrayidx37.us.us.i.epil, align 4, !tbaa !5 %spec.store.select.us.us.i.epil = call i32 @llvm.smin.i32(i32 %15, i32 %16) store i32 %spec.store.select.us.us.i.epil, ptr %arrayidx37.us.us.i.epil, align 4 br label %for.body8.us.us.i.backedge if.end22.us.us.i: ; preds = %for.cond6.for.end19_crit_edge.us.us.i %idxprom23.us.us.i = sext i32 %u.2.us.us.i to i64 %arrayidx24.us.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %idxprom23.us.us.i store i32 2, ptr %arrayidx24.us.us.i, align 4, !tbaa !5 br i1 %13, label %while.cond.us.us.loopexit.i.unr-lcssa, label %for.body27.us.us.i for.body27.us.us.i: ; preds = %if.end22.us.us.i, %for.inc49.us.us.i.1 %indvars.iv143.i = phi i64 [ %indvars.iv.next144.i.1, %for.inc49.us.us.i.1 ], [ 0, %if.end22.us.us.i ] %niter = phi i64 [ %niter.next.1, %for.inc49.us.us.i.1 ], [ 0, %if.end22.us.us.i ] %arrayidx29.us.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv143.i %17 = load i32, ptr %arrayidx29.us.us.i, align 8, !tbaa !5 %cmp30.not.us.us.i = icmp eq i32 %17, 2 br i1 %cmp30.not.us.us.i, label %for.inc49.us.us.i, label %land.lhs.true31.us.us.i land.lhs.true31.us.us.i: ; preds = %for.body27.us.us.i %arrayidx35.us.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us.i, i64 %indvars.iv143.i %18 = load i32, ptr %arrayidx35.us.us.i, align 8, !tbaa !5 %arrayidx37.us.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv143.i %19 = load i32, ptr %arrayidx37.us.us.i, align 8, !tbaa !5 %spec.store.select.us.us.i = call i32 @llvm.smin.i32(i32 %18, i32 %19) store i32 %spec.store.select.us.us.i, ptr %arrayidx37.us.us.i, align 8 br label %for.inc49.us.us.i for.inc49.us.us.i: ; preds = %land.lhs.true31.us.us.i, %for.body27.us.us.i %indvars.iv.next144.i = or i64 %indvars.iv143.i, 1 %arrayidx29.us.us.i.1 = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv.next144.i %20 = load i32, ptr %arrayidx29.us.us.i.1, align 4, !tbaa !5 %cmp30.not.us.us.i.1 = icmp eq i32 %20, 2 br i1 %cmp30.not.us.us.i.1, label %for.inc49.us.us.i.1, label %land.lhs.true31.us.us.i.1 land.lhs.true31.us.us.i.1: ; preds = %for.inc49.us.us.i %arrayidx35.us.us.i.1 = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us.i, i64 %indvars.iv.next144.i %21 = load i32, ptr %arrayidx35.us.us.i.1, align 4, !tbaa !5 %arrayidx37.us.us.i.1 = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv.next144.i %22 = load i32, ptr %arrayidx37.us.us.i.1, align 4, !tbaa !5 %spec.store.select.us.us.i.1 = call i32 @llvm.smin.i32(i32 %21, i32 %22) store i32 %spec.store.select.us.us.i.1, ptr %arrayidx37.us.us.i.1, align 4 br label %for.inc49.us.us.i.1 for.inc49.us.us.i.1: ; preds = %land.lhs.true31.us.us.i.1, %for.inc49.us.us.i %indvars.iv.next144.i.1 = add nuw nsw i64 %indvars.iv143.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 %while.cond.us.us.loopexit.i.unr-lcssa, label %for.body27.us.us.i, !llvm.loop !17 for.body8.us.us.i: ; preds = %for.body8.us.us.i.backedge, %while.cond.us.us.preheader.i %indvars.iv138.i = phi i64 [ 0, %while.cond.us.us.preheader.i ], [ %indvars.iv138.i.be, %for.body8.us.us.i.backedge ] %u.191.us.us.i = phi i32 [ undef, %while.cond.us.us.preheader.i ], [ %u.2.us.us.i, %for.body8.us.us.i.backedge ] %mincost.089.us.us.i = phi i32 [ 2000000, %while.cond.us.us.preheader.i ], [ %mincost.089.us.us.i.be, %for.body8.us.us.i.backedge ] %arrayidx10.us.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv138.i %23 = load i32, ptr %arrayidx10.us.us.i, align 4, !tbaa !5 %cmp11.not.us.us.i = icmp eq i32 %23, 2 br i1 %cmp11.not.us.us.i, label %for.inc17.us.us.i, label %land.lhs.true.us.us.i land.lhs.true.us.us.i: ; preds = %for.body8.us.us.i %arrayidx13.us.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv138.i %24 = load i32, ptr %arrayidx13.us.us.i, align 4, !tbaa !5 %cmp14.us.us.i = icmp slt i32 %24, %mincost.089.us.us.i %spec.select.us.us.i = call i32 @llvm.smin.i32(i32 %24, i32 %mincost.089.us.us.i) %25 = trunc i64 %indvars.iv138.i to i32 %spec.select85.us.us.i = select i1 %cmp14.us.us.i, i32 %25, i32 %u.191.us.us.i br label %for.inc17.us.us.i for.inc17.us.us.i: ; preds = %land.lhs.true.us.us.i, %for.body8.us.us.i %mincost.1.us.us.i = phi i32 [ %mincost.089.us.us.i, %for.body8.us.us.i ], [ %spec.select.us.us.i, %land.lhs.true.us.us.i ] %u.2.us.us.i = phi i32 [ %u.191.us.us.i, %for.body8.us.us.i ], [ %spec.select85.us.us.i, %land.lhs.true.us.us.i ] %indvars.iv.next139.i = add nuw nsw i64 %indvars.iv138.i, 1 %exitcond142.not.i = icmp eq i64 %indvars.iv.next139.i, %wide.trip.count.i br i1 %exitcond142.not.i, label %for.cond6.for.end19_crit_edge.us.us.i, label %for.body8.us.us.i.backedge for.body8.us.us.i.backedge: ; preds = %while.cond.us.us.loopexit.i.unr-lcssa, %land.lhs.true31.us.us.i.epil, %for.body27.us.us.i.epil, %for.inc17.us.us.i %indvars.iv138.i.be = phi i64 [ %indvars.iv.next139.i, %for.inc17.us.us.i ], [ 0, %for.body27.us.us.i.epil ], [ 0, %land.lhs.true31.us.us.i.epil ], [ 0, %while.cond.us.us.loopexit.i.unr-lcssa ] %mincost.089.us.us.i.be = phi i32 [ %mincost.1.us.us.i, %for.inc17.us.us.i ], [ 2000000, %for.body27.us.us.i.epil ], [ 2000000, %land.lhs.true31.us.us.i.epil ], [ 2000000, %while.cond.us.us.loopexit.i.unr-lcssa ] br label %for.body8.us.us.i, !llvm.loop !17 for.cond6.for.end19_crit_edge.us.us.i: ; preds = %for.inc17.us.us.i %cmp20.us.us.i = icmp eq i32 %mincost.1.us.us.i, 2000000 br i1 %cmp20.us.us.i, label %for.body54.i.preheader, label %if.end22.us.us.i for.body54.i.preheader: ; preds = %for.cond6.for.end19_crit_edge.us.us.i %min.iters.check38 = icmp ult i32 %.fr.i, 8 br i1 %min.iters.check38, label %for.body54.i.preheader49, label %vector.ph39 vector.ph39: ; preds = %for.body54.i.preheader %n.vec41 = and i64 %wide.trip.count.i, 4294967288 br label %vector.body44 vector.body44: ; preds = %vector.body44, %vector.ph39 %index45 = phi i64 [ 0, %vector.ph39 ], [ %index.next48, %vector.body44 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph39 ], [ %28, %vector.body44 ] %vec.phi46 = phi <4 x i32> [ zeroinitializer, %vector.ph39 ], [ %29, %vector.body44 ] %26 = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %index45 %wide.load = load <4 x i32>, ptr %26, align 16, !tbaa !5 %27 = getelementptr inbounds i32, ptr %26, i64 4 %wide.load47 = load <4 x i32>, ptr %27, align 16, !tbaa !5 %28 = add <4 x i32> %wide.load, %vec.phi %29 = add <4 x i32> %wide.load47, %vec.phi46 %index.next48 = add nuw i64 %index45, 8 %30 = icmp eq i64 %index.next48, %n.vec41 br i1 %30, label %middle.block36, label %vector.body44, !llvm.loop !18 middle.block36: ; preds = %vector.body44 %bin.rdx = add <4 x i32> %29, %28 %31 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n43 = icmp eq i64 %n.vec41, %wide.trip.count.i br i1 %cmp.n43, label %prim.exit, label %for.body54.i.preheader49 for.body54.i.preheader49: ; preds = %for.body54.i.preheader, %middle.block36 %indvars.iv148.i.ph = phi i64 [ 0, %for.body54.i.preheader ], [ %n.vec41, %middle.block36 ] %sum.0128.i.ph = phi i32 [ 0, %for.body54.i.preheader ], [ %31, %middle.block36 ] br label %for.body54.i for.body54.i: ; preds = %for.body54.i.preheader49, %for.body54.i %indvars.iv148.i = phi i64 [ %indvars.iv.next149.i, %for.body54.i ], [ %indvars.iv148.i.ph, %for.body54.i.preheader49 ] %sum.0128.i = phi i32 [ %add.i, %for.body54.i ], [ %sum.0128.i.ph, %for.body54.i.preheader49 ] %arrayidx56.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv148.i %32 = load i32, ptr %arrayidx56.i, align 4, !tbaa !5 %add.i = add nsw i32 %32, %sum.0128.i %indvars.iv.next149.i = add nuw nsw i64 %indvars.iv148.i, 1 %exitcond152.not.i = icmp eq i64 %indvars.iv.next149.i, %wide.trip.count.i br i1 %exitcond152.not.i, label %prim.exit, label %for.body54.i, !llvm.loop !19 prim.exit: ; preds = %for.body54.i, %middle.block36, %for.end14.thread, %for.end14 %sum.0.lcssa.i = phi i32 [ 0, %for.end14 ], [ 0, %for.end14.thread ], [ %31, %middle.block36 ], [ %add.i, %for.body54.i ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d.i) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color.i) #5 %call16 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %tmp) #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: nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @prim() local_unnamed_addr #3 { entry: %color = alloca [100 x i32], align 16 %d = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d) #5 %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp86 = icmp sgt i32 %.fr, 0 br i1 %cmp86, label %for.body.preheader, label %for.end59 for.body.preheader: ; preds = %entry %wide.trip.count = zext i32 %.fr to i64 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader168, 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 ] %1 = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %index store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %1, align 16, !tbaa !5 %2 = getelementptr inbounds i32, ptr %1, i64 4 store <4 x i32> <i32 1, i32 1, i32 1, i32 1>, ptr %2, align 16, !tbaa !5 %3 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %index store <4 x i32> <i32 2000000, i32 2000000, i32 2000000, i32 2000000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 2000000, i32 2000000, i32 2000000, i32 2000000>, ptr %4, align 16, !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 !20 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %wide.trip.count br i1 %cmp.n, label %for.end, label %for.body.preheader168 for.body.preheader168: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader168, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader168 ] %arrayidx = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv store i32 1, ptr %arrayidx, align 4, !tbaa !5 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv store i32 2000000, ptr %arrayidx2, 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.end, label %for.body, !llvm.loop !21 for.end: ; preds = %for.body, %middle.block store i32 0, ptr %d, align 16, !tbaa !5 br i1 %cmp86, label %while.cond.us.us.preheader, label %for.end59 while.cond.us.us.preheader: ; preds = %for.end %wide.trip.count141 = zext i32 %.fr to i64 %xtraiter = and i64 %wide.trip.count, 1 %6 = icmp eq i32 %.fr, 1 %unroll_iter = and i64 %wide.trip.count, 4294967294 %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br label %for.body8.us.us while.cond.us.us.loopexit.unr-lcssa: ; preds = %for.inc49.us.us.1, %if.end22.us.us %indvars.iv143.unr = phi i64 [ 0, %if.end22.us.us ], [ %indvars.iv.next144.1, %for.inc49.us.us.1 ] br i1 %lcmp.mod.not, label %for.body8.us.us.backedge, label %for.body27.us.us.epil for.body27.us.us.epil: ; preds = %while.cond.us.us.loopexit.unr-lcssa %arrayidx29.us.us.epil = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv143.unr %7 = load i32, ptr %arrayidx29.us.us.epil, align 4, !tbaa !5 %cmp30.not.us.us.epil = icmp eq i32 %7, 2 br i1 %cmp30.not.us.us.epil, label %for.body8.us.us.backedge, label %land.lhs.true31.us.us.epil land.lhs.true31.us.us.epil: ; preds = %for.body27.us.us.epil %arrayidx35.us.us.epil = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us, i64 %indvars.iv143.unr %8 = load i32, ptr %arrayidx35.us.us.epil, align 4, !tbaa !5 %arrayidx37.us.us.epil = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv143.unr %9 = load i32, ptr %arrayidx37.us.us.epil, align 4, !tbaa !5 %spec.store.select.us.us.epil = tail call i32 @llvm.smin.i32(i32 %8, i32 %9) store i32 %spec.store.select.us.us.epil, ptr %arrayidx37.us.us.epil, align 4 br label %for.body8.us.us.backedge if.end22.us.us: ; preds = %for.cond6.for.end19_crit_edge.us.us %idxprom23.us.us = sext i32 %u.2.us.us to i64 %arrayidx24.us.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %idxprom23.us.us store i32 2, ptr %arrayidx24.us.us, align 4, !tbaa !5 br i1 %6, label %while.cond.us.us.loopexit.unr-lcssa, label %for.body27.us.us for.body27.us.us: ; preds = %if.end22.us.us, %for.inc49.us.us.1 %indvars.iv143 = phi i64 [ %indvars.iv.next144.1, %for.inc49.us.us.1 ], [ 0, %if.end22.us.us ] %niter = phi i64 [ %niter.next.1, %for.inc49.us.us.1 ], [ 0, %if.end22.us.us ] %arrayidx29.us.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv143 %10 = load i32, ptr %arrayidx29.us.us, align 8, !tbaa !5 %cmp30.not.us.us = icmp eq i32 %10, 2 br i1 %cmp30.not.us.us, label %for.inc49.us.us, label %land.lhs.true31.us.us land.lhs.true31.us.us: ; preds = %for.body27.us.us %arrayidx35.us.us = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us, i64 %indvars.iv143 %11 = load i32, ptr %arrayidx35.us.us, align 8, !tbaa !5 %arrayidx37.us.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv143 %12 = load i32, ptr %arrayidx37.us.us, align 8, !tbaa !5 %spec.store.select.us.us = tail call i32 @llvm.smin.i32(i32 %11, i32 %12) store i32 %spec.store.select.us.us, ptr %arrayidx37.us.us, align 8 br label %for.inc49.us.us for.inc49.us.us: ; preds = %land.lhs.true31.us.us, %for.body27.us.us %indvars.iv.next144 = or i64 %indvars.iv143, 1 %arrayidx29.us.us.1 = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv.next144 %13 = load i32, ptr %arrayidx29.us.us.1, align 4, !tbaa !5 %cmp30.not.us.us.1 = icmp eq i32 %13, 2 br i1 %cmp30.not.us.us.1, label %for.inc49.us.us.1, label %land.lhs.true31.us.us.1 land.lhs.true31.us.us.1: ; preds = %for.inc49.us.us %arrayidx35.us.us.1 = getelementptr inbounds [100 x [100 x i32]], ptr @array, i64 0, i64 %idxprom23.us.us, i64 %indvars.iv.next144 %14 = load i32, ptr %arrayidx35.us.us.1, align 4, !tbaa !5 %arrayidx37.us.us.1 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv.next144 %15 = load i32, ptr %arrayidx37.us.us.1, align 4, !tbaa !5 %spec.store.select.us.us.1 = tail call i32 @llvm.smin.i32(i32 %14, i32 %15) store i32 %spec.store.select.us.us.1, ptr %arrayidx37.us.us.1, align 4 br label %for.inc49.us.us.1 for.inc49.us.us.1: ; preds = %land.lhs.true31.us.us.1, %for.inc49.us.us %indvars.iv.next144.1 = add nuw nsw i64 %indvars.iv143, 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 %while.cond.us.us.loopexit.unr-lcssa, label %for.body27.us.us, !llvm.loop !17 for.body8.us.us: ; preds = %for.body8.us.us.backedge, %while.cond.us.us.preheader %indvars.iv138 = phi i64 [ 0, %while.cond.us.us.preheader ], [ %indvars.iv138.be, %for.body8.us.us.backedge ] %u.191.us.us = phi i32 [ undef, %while.cond.us.us.preheader ], [ %u.2.us.us, %for.body8.us.us.backedge ] %mincost.089.us.us = phi i32 [ 2000000, %while.cond.us.us.preheader ], [ %mincost.089.us.us.be, %for.body8.us.us.backedge ] %arrayidx10.us.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv138 %16 = load i32, ptr %arrayidx10.us.us, align 4, !tbaa !5 %cmp11.not.us.us = icmp eq i32 %16, 2 br i1 %cmp11.not.us.us, label %for.inc17.us.us, label %land.lhs.true.us.us land.lhs.true.us.us: ; preds = %for.body8.us.us %arrayidx13.us.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv138 %17 = load i32, ptr %arrayidx13.us.us, align 4, !tbaa !5 %cmp14.us.us = icmp slt i32 %17, %mincost.089.us.us %spec.select.us.us = tail call i32 @llvm.smin.i32(i32 %17, i32 %mincost.089.us.us) %18 = trunc i64 %indvars.iv138 to i32 %spec.select85.us.us = select i1 %cmp14.us.us, i32 %18, i32 %u.191.us.us br label %for.inc17.us.us for.inc17.us.us: ; preds = %land.lhs.true.us.us, %for.body8.us.us %mincost.1.us.us = phi i32 [ %mincost.089.us.us, %for.body8.us.us ], [ %spec.select.us.us, %land.lhs.true.us.us ] %u.2.us.us = phi i32 [ %u.191.us.us, %for.body8.us.us ], [ %spec.select85.us.us, %land.lhs.true.us.us ] %indvars.iv.next139 = add nuw nsw i64 %indvars.iv138, 1 %exitcond142.not = icmp eq i64 %indvars.iv.next139, %wide.trip.count141 br i1 %exitcond142.not, label %for.cond6.for.end19_crit_edge.us.us, label %for.body8.us.us.backedge for.body8.us.us.backedge: ; preds = %while.cond.us.us.loopexit.unr-lcssa, %land.lhs.true31.us.us.epil, %for.body27.us.us.epil, %for.inc17.us.us %indvars.iv138.be = phi i64 [ %indvars.iv.next139, %for.inc17.us.us ], [ 0, %for.body27.us.us.epil ], [ 0, %land.lhs.true31.us.us.epil ], [ 0, %while.cond.us.us.loopexit.unr-lcssa ] %mincost.089.us.us.be = phi i32 [ %mincost.1.us.us, %for.inc17.us.us ], [ 2000000, %for.body27.us.us.epil ], [ 2000000, %land.lhs.true31.us.us.epil ], [ 2000000, %while.cond.us.us.loopexit.unr-lcssa ] br label %for.body8.us.us, !llvm.loop !17 for.cond6.for.end19_crit_edge.us.us: ; preds = %for.inc17.us.us %cmp20.us.us = icmp eq i32 %mincost.1.us.us, 2000000 br i1 %cmp20.us.us, label %for.cond52.preheader, label %if.end22.us.us for.cond52.preheader: ; preds = %for.cond6.for.end19_crit_edge.us.us br i1 %cmp86, label %for.body54.preheader, label %for.end59 for.body54.preheader: ; preds = %for.cond52.preheader %wide.trip.count151 = zext i32 %.fr to i64 %min.iters.check155 = icmp ult i32 %.fr, 8 br i1 %min.iters.check155, label %for.body54.preheader166, label %vector.ph156 vector.ph156: ; preds = %for.body54.preheader %n.vec158 = and i64 %wide.trip.count, 4294967288 br label %vector.body161 vector.body161: ; preds = %vector.body161, %vector.ph156 %index162 = phi i64 [ 0, %vector.ph156 ], [ %index.next165, %vector.body161 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph156 ], [ %21, %vector.body161 ] %vec.phi163 = phi <4 x i32> [ zeroinitializer, %vector.ph156 ], [ %22, %vector.body161 ] %19 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %index162 %wide.load = load <4 x i32>, ptr %19, align 16, !tbaa !5 %20 = getelementptr inbounds i32, ptr %19, i64 4 %wide.load164 = load <4 x i32>, ptr %20, align 16, !tbaa !5 %21 = add <4 x i32> %wide.load, %vec.phi %22 = add <4 x i32> %wide.load164, %vec.phi163 %index.next165 = add nuw i64 %index162, 8 %23 = icmp eq i64 %index.next165, %n.vec158 br i1 %23, label %middle.block153, label %vector.body161, !llvm.loop !22 middle.block153: ; preds = %vector.body161 %bin.rdx = add <4 x i32> %22, %21 %24 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n160 = icmp eq i64 %n.vec158, %wide.trip.count br i1 %cmp.n160, label %for.end59, label %for.body54.preheader166 for.body54.preheader166: ; preds = %for.body54.preheader, %middle.block153 %indvars.iv148.ph = phi i64 [ 0, %for.body54.preheader ], [ %n.vec158, %middle.block153 ] %sum.0128.ph = phi i32 [ 0, %for.body54.preheader ], [ %24, %middle.block153 ] br label %for.body54 for.body54: ; preds = %for.body54.preheader166, %for.body54 %indvars.iv148 = phi i64 [ %indvars.iv.next149, %for.body54 ], [ %indvars.iv148.ph, %for.body54.preheader166 ] %sum.0128 = phi i32 [ %add, %for.body54 ], [ %sum.0128.ph, %for.body54.preheader166 ] %arrayidx56 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv148 %25 = load i32, ptr %arrayidx56, align 4, !tbaa !5 %add = add nsw i32 %25, %sum.0128 %indvars.iv.next149 = add nuw nsw i64 %indvars.iv148, 1 %exitcond152.not = icmp eq i64 %indvars.iv.next149, %wide.trip.count151 br i1 %exitcond152.not, label %for.end59, label %for.body54, !llvm.loop !23 for.end59: ; preds = %for.body54, %middle.block153, %entry, %for.end, %for.cond52.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond52.preheader ], [ 0, %for.end ], [ 0, %entry ], [ %24, %middle.block153 ], [ %add, %for.body54 ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color) #5 ret i32 %sum.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #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 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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} !12 = !{!"llvm.loop.unswitch.partial.disable"} !13 = distinct !{!13, !10, !14, !15} !14 = !{!"llvm.loop.isvectorized", i32 1} !15 = !{!"llvm.loop.unroll.runtime.disable"} !16 = distinct !{!16, !10, !15, !14} !17 = distinct !{!17, !10} !18 = distinct !{!18, !10, !14, !15} !19 = distinct !{!19, !10, !15, !14} !20 = distinct !{!20, !10, !14, !15} !21 = distinct !{!21, !10, !15, !14} !22 = distinct !{!22, !10, !14, !15} !23 = distinct !{!23, !10, !15, !14}
#include<stdio.h> #define N 100 #define INF 10000000 #define WHITE 0 #define BRACK 1 int n, Color[N], A[N][N], B[N], C[N]; void prim() { int i, j, m; for(i=0; i<n; i++){ B[i] = INF; C[i] = -1; Color[i] = WHITE; } B[0] = 0; while(1){ m = INF; for(i=0; i<n; i++){ if(Color[i] != BRACK && B[i] < m){ m = B[i]; j = i; } } if(m == INF) break; Color[j] = BRACK; for(i=0; i<n; i++){ if(Color[i] !=BRACK && A[j][i] < B[i] && A[j][i]>=0){ C[i] =j; B[i] = A[j][i]; } } } } int main() { int i,j,co=0; scanf("%d",&n); for(i=0; i<n; i++){ for(j=0; j<n; j++){ scanf("%d",&A[i][j]); } } prim(); for(i=0; i<n; i++) co+=B[i]; printf("%d\n",co); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199833/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199833/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0, align 4 @B = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @C = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @Color = dso_local local_unnamed_addr global [100 x i32] zeroinitializer, align 16 @A = dso_local global [100 x [100 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @prim() local_unnamed_addr #0 { entry: %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp83 = icmp sgt i32 %.fr, 0 br i1 %cmp83, label %for.body.preheader, label %for.end.thread for.end.thread: ; preds = %entry store i32 0, ptr @B, align 16, !tbaa !5 br label %while.end for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @C, i8 -1, i64 %2, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @Color, i8 0, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader140, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %index store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %4, align 16, !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 !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader140 for.body.preheader140: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader140, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader140 ] %arrayidx = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv store i32 10000000, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block store i32 0, ptr @B, align 16, !tbaa !5 br i1 %cmp83, label %while.cond.us.preheader, label %while.end while.cond.us.preheader: ; preds = %for.end %wide.trip.count133 = zext i32 %.fr to i64 %wide.trip.count138 = zext i32 %.fr to i64 br label %for.body7.us for.end18.us: ; preds = %for.inc16.us %cmp19.us = icmp eq i32 %m.1.us, 10000000 br i1 %cmp19.us, label %while.end, label %if.end21.us if.end21.us: ; preds = %for.end18.us %idxprom22.us = sext i32 %j.2.us to i64 %arrayidx23.us = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %idxprom22.us store i32 1, ptr %arrayidx23.us, align 4, !tbaa !5 br label %for.body26.us for.body26.us: ; preds = %if.end21.us, %for.inc54.us %indvars.iv135 = phi i64 [ 0, %if.end21.us ], [ %indvars.iv.next136, %for.inc54.us ] %arrayidx28.us = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %indvars.iv135 %6 = load i32, ptr %arrayidx28.us, align 4, !tbaa !5 %cmp29.not.us = icmp eq i32 %6, 1 br i1 %cmp29.not.us, label %for.inc54.us, label %land.lhs.true30.us land.lhs.true30.us: ; preds = %for.body26.us %arrayidx34.us = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %idxprom22.us, i64 %indvars.iv135 %7 = load i32, ptr %arrayidx34.us, align 4, !tbaa !5 %arrayidx36.us = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv135 %8 = load i32, ptr %arrayidx36.us, align 4, !tbaa !5 %cmp37.us = icmp slt i32 %7, %8 %cmp43.us = icmp sgt i32 %7, -1 %or.cond.us = and i1 %cmp43.us, %cmp37.us br i1 %or.cond.us, label %if.then44.us, label %for.inc54.us if.then44.us: ; preds = %land.lhs.true30.us %arrayidx46.us = getelementptr inbounds [100 x i32], ptr @C, i64 0, i64 %indvars.iv135 store i32 %j.2.us, ptr %arrayidx46.us, align 4, !tbaa !5 store i32 %7, ptr %arrayidx36.us, align 4, !tbaa !5 br label %for.inc54.us for.inc54.us: ; preds = %if.then44.us, %land.lhs.true30.us, %for.body26.us %indvars.iv.next136 = add nuw nsw i64 %indvars.iv135, 1 %exitcond139.not = icmp eq i64 %indvars.iv.next136, %wide.trip.count138 br i1 %exitcond139.not, label %for.body7.us.backedge, label %for.body26.us, !llvm.loop !14 for.body7.us: ; preds = %for.body7.us.backedge, %while.cond.us.preheader %indvars.iv130 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv130.be, %for.body7.us.backedge ] %m.088.us = phi i32 [ 10000000, %while.cond.us.preheader ], [ %m.088.us.be, %for.body7.us.backedge ] %j.187.us = phi i32 [ undef, %while.cond.us.preheader ], [ %j.2.us, %for.body7.us.backedge ] %arrayidx9.us = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %indvars.iv130 %9 = load i32, ptr %arrayidx9.us, align 4, !tbaa !5 %cmp10.not.us = icmp eq i32 %9, 1 br i1 %cmp10.not.us, label %for.inc16.us, label %land.lhs.true.us land.lhs.true.us: ; preds = %for.body7.us %arrayidx12.us = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv130 %10 = load i32, ptr %arrayidx12.us, align 4, !tbaa !5 %cmp13.us = icmp slt i32 %10, %m.088.us %11 = trunc i64 %indvars.iv130 to i32 %spec.select.us = select i1 %cmp13.us, i32 %11, i32 %j.187.us %spec.select82.us = tail call i32 @llvm.smin.i32(i32 %10, i32 %m.088.us) br label %for.inc16.us for.inc16.us: ; preds = %land.lhs.true.us, %for.body7.us %j.2.us = phi i32 [ %j.187.us, %for.body7.us ], [ %spec.select.us, %land.lhs.true.us ] %m.1.us = phi i32 [ %m.088.us, %for.body7.us ], [ %spec.select82.us, %land.lhs.true.us ] %indvars.iv.next131 = add nuw nsw i64 %indvars.iv130, 1 %exitcond134.not = icmp eq i64 %indvars.iv.next131, %wide.trip.count133 br i1 %exitcond134.not, label %for.end18.us, label %for.body7.us.backedge for.body7.us.backedge: ; preds = %for.inc54.us, %for.inc16.us %indvars.iv130.be = phi i64 [ %indvars.iv.next131, %for.inc16.us ], [ 0, %for.inc54.us ] %m.088.us.be = phi i32 [ %m.1.us, %for.inc16.us ], [ 10000000, %for.inc54.us ] br label %for.body7.us, !llvm.loop !14 while.end: ; preds = %for.end18.us, %for.end, %for.end.thread ret void } ; 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 %.fr.i29 = freeze i32 %0 %cmp30 = icmp sgt i32 %.fr.i29, 0 br i1 %cmp30, label %for.cond1.preheader, label %prim.exit.thread for.cond1.preheader: ; preds = %entry, %for.inc7 %1 = phi i32 [ %.fr.i, %for.inc7 ], [ %.fr.i29, %entry ] %indvars.iv39 = phi i64 [ %indvars.iv.next40, %for.inc7 ], [ 0, %entry ] %cmp227 = icmp sgt i32 %1, 0 br i1 %cmp227, label %for.body3, label %for.inc7 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %arrayidx5 = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv39, i64 %indvars.iv %call6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx5) %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 %cmp2 = icmp slt i64 %indvars.iv.next, %3 br i1 %cmp2, label %for.body3, label %for.inc7, !llvm.loop !15 for.inc7: ; preds = %for.body3, %for.cond1.preheader %4 = phi i32 [ %1, %for.cond1.preheader ], [ %2, %for.body3 ] %.fr.i = freeze i32 %4 %indvars.iv.next40 = add nuw nsw i64 %indvars.iv39, 1 %5 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next40, %5 br i1 %cmp, label %for.cond1.preheader, label %for.end9, !llvm.loop !16 for.end9: ; preds = %for.inc7 %cmp83.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp83.i, label %for.body.preheader.i, label %prim.exit.thread prim.exit.thread: ; preds = %for.end9, %entry store i32 0, ptr @B, align 16, !tbaa !5 br label %for.end17 for.body.preheader.i: ; preds = %for.end9 %6 = zext i32 %.fr.i to i64 %7 = shl nuw nsw i64 %6, 2 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @C, i8 -1, i64 %7, i1 false), !tbaa !5 tail call void @llvm.memset.p0.i64(ptr nonnull align 16 @Color, i8 0, i64 %7, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr.i, 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 %6, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %8 = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %index store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %8, align 16, !tbaa !5 %9 = getelementptr inbounds i32, ptr %8, i64 4 store <4 x i32> <i32 10000000, i32 10000000, i32 10000000, i32 10000000>, ptr %9, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %10 = icmp eq i64 %index.next, %n.vec br i1 %10, label %middle.block, label %vector.body, !llvm.loop !18 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %6 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx.i = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv.i store i32 10000000, ptr %arrayidx.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, %6 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !19 while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr @B, align 16, !tbaa !5 br label %for.body7.us.i for.end18.us.i: ; preds = %for.inc16.us.i %cmp19.us.i = icmp eq i32 %m.1.us.i, 10000000 br i1 %cmp19.us.i, label %prim.exit, label %if.end21.us.i if.end21.us.i: ; preds = %for.end18.us.i %idxprom22.us.i = sext i32 %j.2.us.i to i64 %arrayidx23.us.i = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %idxprom22.us.i store i32 1, ptr %arrayidx23.us.i, align 4, !tbaa !5 br label %for.body26.us.i for.body26.us.i: ; preds = %for.inc54.us.i, %if.end21.us.i %indvars.iv135.i = phi i64 [ 0, %if.end21.us.i ], [ %indvars.iv.next136.i, %for.inc54.us.i ] %arrayidx28.us.i = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %indvars.iv135.i %11 = load i32, ptr %arrayidx28.us.i, align 4, !tbaa !5 %cmp29.not.us.i = icmp eq i32 %11, 1 br i1 %cmp29.not.us.i, label %for.inc54.us.i, label %land.lhs.true30.us.i land.lhs.true30.us.i: ; preds = %for.body26.us.i %arrayidx34.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %idxprom22.us.i, i64 %indvars.iv135.i %12 = load i32, ptr %arrayidx34.us.i, align 4, !tbaa !5 %arrayidx36.us.i = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv135.i %13 = load i32, ptr %arrayidx36.us.i, align 4, !tbaa !5 %cmp37.us.i = icmp slt i32 %12, %13 %cmp43.us.i = icmp sgt i32 %12, -1 %or.cond.us.i = and i1 %cmp43.us.i, %cmp37.us.i br i1 %or.cond.us.i, label %if.then44.us.i, label %for.inc54.us.i if.then44.us.i: ; preds = %land.lhs.true30.us.i %arrayidx46.us.i = getelementptr inbounds [100 x i32], ptr @C, i64 0, i64 %indvars.iv135.i store i32 %j.2.us.i, ptr %arrayidx46.us.i, align 4, !tbaa !5 store i32 %12, ptr %arrayidx36.us.i, align 4, !tbaa !5 br label %for.inc54.us.i for.inc54.us.i: ; preds = %if.then44.us.i, %land.lhs.true30.us.i, %for.body26.us.i %indvars.iv.next136.i = add nuw nsw i64 %indvars.iv135.i, 1 %exitcond139.not.i = icmp eq i64 %indvars.iv.next136.i, %6 br i1 %exitcond139.not.i, label %for.body7.us.i.backedge, label %for.body26.us.i, !llvm.loop !14 for.body7.us.i: ; preds = %for.body7.us.i.backedge, %while.cond.us.preheader.i %indvars.iv130.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv130.i.be, %for.body7.us.i.backedge ] %m.088.us.i = phi i32 [ 10000000, %while.cond.us.preheader.i ], [ %m.088.us.i.be, %for.body7.us.i.backedge ] %j.187.us.i = phi i32 [ undef, %while.cond.us.preheader.i ], [ %j.2.us.i, %for.body7.us.i.backedge ] %arrayidx9.us.i = getelementptr inbounds [100 x i32], ptr @Color, i64 0, i64 %indvars.iv130.i %14 = load i32, ptr %arrayidx9.us.i, align 4, !tbaa !5 %cmp10.not.us.i = icmp eq i32 %14, 1 br i1 %cmp10.not.us.i, label %for.inc16.us.i, label %land.lhs.true.us.i land.lhs.true.us.i: ; preds = %for.body7.us.i %arrayidx12.us.i = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv130.i %15 = load i32, ptr %arrayidx12.us.i, align 4, !tbaa !5 %cmp13.us.i = icmp slt i32 %15, %m.088.us.i %16 = trunc i64 %indvars.iv130.i to i32 %spec.select.us.i = select i1 %cmp13.us.i, i32 %16, i32 %j.187.us.i %spec.select82.us.i = tail call i32 @llvm.smin.i32(i32 %15, i32 %m.088.us.i) br label %for.inc16.us.i for.inc16.us.i: ; preds = %land.lhs.true.us.i, %for.body7.us.i %j.2.us.i = phi i32 [ %j.187.us.i, %for.body7.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %m.1.us.i = phi i32 [ %m.088.us.i, %for.body7.us.i ], [ %spec.select82.us.i, %land.lhs.true.us.i ] %indvars.iv.next131.i = add nuw nsw i64 %indvars.iv130.i, 1 %exitcond134.not.i = icmp eq i64 %indvars.iv.next131.i, %6 br i1 %exitcond134.not.i, label %for.end18.us.i, label %for.body7.us.i.backedge for.body7.us.i.backedge: ; preds = %for.inc54.us.i, %for.inc16.us.i %indvars.iv130.i.be = phi i64 [ %indvars.iv.next131.i, %for.inc16.us.i ], [ 0, %for.inc54.us.i ] %m.088.us.i.be = phi i32 [ %m.1.us.i, %for.inc16.us.i ], [ 10000000, %for.inc54.us.i ] br label %for.body7.us.i, !llvm.loop !14 prim.exit: ; preds = %for.end18.us.i br i1 %cmp83.i, label %for.body12.preheader, label %for.end17 for.body12.preheader: ; preds = %prim.exit %wide.trip.count = zext i32 %.fr.i to i64 %min.iters.check55 = icmp ult i32 %.fr.i, 8 br i1 %min.iters.check55, label %for.body12.preheader66, label %vector.ph56 vector.ph56: ; preds = %for.body12.preheader %n.vec58 = and i64 %6, 4294967288 br label %vector.body61 vector.body61: ; preds = %vector.body61, %vector.ph56 %index62 = phi i64 [ 0, %vector.ph56 ], [ %index.next65, %vector.body61 ] %vec.phi = phi <4 x i32> [ zeroinitializer, %vector.ph56 ], [ %19, %vector.body61 ] %vec.phi63 = phi <4 x i32> [ zeroinitializer, %vector.ph56 ], [ %20, %vector.body61 ] %17 = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %index62 %wide.load = load <4 x i32>, ptr %17, align 16, !tbaa !5 %18 = getelementptr inbounds i32, ptr %17, i64 4 %wide.load64 = load <4 x i32>, ptr %18, align 16, !tbaa !5 %19 = add <4 x i32> %wide.load, %vec.phi %20 = add <4 x i32> %wide.load64, %vec.phi63 %index.next65 = add nuw i64 %index62, 8 %21 = icmp eq i64 %index.next65, %n.vec58 br i1 %21, label %middle.block53, label %vector.body61, !llvm.loop !20 middle.block53: ; preds = %vector.body61 %bin.rdx = add <4 x i32> %20, %19 %22 = tail call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %bin.rdx) %cmp.n60 = icmp eq i64 %n.vec58, %6 br i1 %cmp.n60, label %for.end17, label %for.body12.preheader66 for.body12.preheader66: ; preds = %for.body12.preheader, %middle.block53 %indvars.iv42.ph = phi i64 [ 0, %for.body12.preheader ], [ %n.vec58, %middle.block53 ] %co.034.ph = phi i32 [ 0, %for.body12.preheader ], [ %22, %middle.block53 ] br label %for.body12 for.body12: ; preds = %for.body12.preheader66, %for.body12 %indvars.iv42 = phi i64 [ %indvars.iv.next43, %for.body12 ], [ %indvars.iv42.ph, %for.body12.preheader66 ] %co.034 = phi i32 [ %add, %for.body12 ], [ %co.034.ph, %for.body12.preheader66 ] %arrayidx14 = getelementptr inbounds [100 x i32], ptr @B, i64 0, i64 %indvars.iv42 %23 = load i32, ptr %arrayidx14, align 4, !tbaa !5 %add = add nsw i32 %23, %co.034 %indvars.iv.next43 = add nuw nsw i64 %indvars.iv42, 1 %exitcond.not = icmp eq i64 %indvars.iv.next43, %wide.trip.count br i1 %exitcond.not, label %for.end17, label %for.body12, !llvm.loop !21 for.end17: ; preds = %for.body12, %middle.block53, %prim.exit.thread, %prim.exit %co.0.lcssa = phi i32 [ 0, %prim.exit ], [ 0, %prim.exit.thread ], [ %22, %middle.block53 ], [ %add, %for.body12 ] %call18 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %co.0.lcssa) 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 ; 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.vector.reduce.add.v4i32(<4 x 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) } attributes #4 = { 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, !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} !16 = distinct !{!16, !10, !17} !17 = !{!"llvm.loop.unswitch.partial.disable"} !18 = distinct !{!18, !10, !11, !12} !19 = distinct !{!19, !10, !12, !11} !20 = distinct !{!20, !10, !11, !12} !21 = distinct !{!21, !10, !12, !11}
#include<stdio.h> #include<stdlib.h> //static const int MA=100; #define MA 100 static const int I=(1<<21); static const int W=0; static const int G=1; static const int B=2; int n,A[MA][MA]; int prim(){ int u,minv,i,v; int d[MA],p[MA],color[MA]; for(i=0;i<n;i++){ d[i]=I; p[i]=-1; color[i]=W; } d[0]=0; while(1){ minv=I; u=-1; for(i=0;i<n;i++){ if(minv>d[i] && color[i]!=B){ u=i; minv=d[i]; } } if(u==-1) break; color[u]=B; for(v=0;v<n;v++){ if(color[v]!=B && A[u][v]!=I){ if(d[v]>A[u][v]){ d[v]=A[u][v]; p[v]=u; color[v]=G; } } } } int sum=0; for(i=0;i<n;i++){ if(p[i]!=-1) sum+=A[i][p[i]]; } return sum; } int main(){ int i,j,e; scanf("%d",&n); for(i=0;i<n;i++){ for(j=0;j<n;j++){ scanf("%d",&e); A[i][j]=(e==-1)?I:e; } } printf("%d\n",prim()); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199884/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199884/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @n = dso_local global i32 0, align 4 @A = dso_local local_unnamed_addr global [100 x [100 x i32]] zeroinitializer, align 16 @.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 nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @prim() local_unnamed_addr #0 { entry: %d = alloca [100 x i32], align 16 %p = alloca [100 x i32], align 16 %color = alloca [100 x i32], align 16 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color) #5 %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr = freeze i32 %0 %cmp111 = icmp sgt i32 %.fr, 0 br i1 %cmp111, label %for.body.preheader, label %for.end77 for.body.preheader: ; preds = %entry %1 = zext i32 %.fr to i64 %2 = shl nuw nsw i64 %1, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p, i8 -1, i64 %2, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color, i8 0, i64 %2, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr, 8 br i1 %min.iters.check, label %for.body.preheader173, label %vector.ph vector.ph: ; preds = %for.body.preheader %n.vec = and i64 %1, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %3 = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %index store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %3, align 16, !tbaa !5 %4 = getelementptr inbounds i32, ptr %3, i64 4 store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %4, align 16, !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 !9 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %1 br i1 %cmp.n, label %for.end, label %for.body.preheader173 for.body.preheader173: ; preds = %for.body.preheader, %middle.block %indvars.iv.ph = phi i64 [ 0, %for.body.preheader ], [ %n.vec, %middle.block ] br label %for.body for.body: ; preds = %for.body.preheader173, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %indvars.iv.ph, %for.body.preheader173 ] %arrayidx = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv store i32 2097152, ptr %arrayidx, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %exitcond.not = icmp eq i64 %indvars.iv.next, %1 br i1 %exitcond.not, label %for.end, label %for.body, !llvm.loop !13 for.end: ; preds = %for.body, %middle.block store i32 0, ptr %d, align 16, !tbaa !5 br i1 %cmp111, label %while.cond.us.preheader, label %for.end77 while.cond.us.preheader: ; preds = %for.end %wide.trip.count161 = zext i32 %.fr to i64 %wide.trip.count166 = zext i32 %.fr to i64 br label %for.body8.us for.end19.us: ; preds = %for.inc17.us %cmp20.us = icmp eq i32 %u.1.us, -1 br i1 %cmp20.us, label %for.cond61.preheader, label %if.end22.us if.end22.us: ; preds = %for.end19.us %idxprom23.us = sext i32 %u.1.us to i64 %arrayidx24.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %idxprom23.us store i32 2, ptr %arrayidx24.us, align 4, !tbaa !5 br label %for.body27.us for.body27.us: ; preds = %if.end22.us, %for.inc58.us %indvars.iv163 = phi i64 [ 0, %if.end22.us ], [ %indvars.iv.next164, %for.inc58.us ] %arrayidx29.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv163 %6 = load i32, ptr %arrayidx29.us, align 4, !tbaa !5 %cmp30.not.us = icmp eq i32 %6, 2 br i1 %cmp30.not.us, label %for.inc58.us, label %land.lhs.true31.us land.lhs.true31.us: ; preds = %for.body27.us %arrayidx35.us = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %idxprom23.us, i64 %indvars.iv163 %7 = load i32, ptr %arrayidx35.us, align 4, !tbaa !5 %cmp36.not.us = icmp eq i32 %7, 2097152 br i1 %cmp36.not.us, label %for.inc58.us, label %if.then37.us if.then37.us: ; preds = %land.lhs.true31.us %arrayidx39.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv163 %8 = load i32, ptr %arrayidx39.us, align 4, !tbaa !5 %cmp44.us = icmp sgt i32 %8, %7 br i1 %cmp44.us, label %if.then45.us, label %for.inc58.us if.then45.us: ; preds = %if.then37.us store i32 %7, ptr %arrayidx39.us, align 4, !tbaa !5 %arrayidx53.us = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv163 store i32 %u.1.us, ptr %arrayidx53.us, align 4, !tbaa !5 store i32 1, ptr %arrayidx29.us, align 4, !tbaa !5 br label %for.inc58.us for.inc58.us: ; preds = %if.then45.us, %if.then37.us, %land.lhs.true31.us, %for.body27.us %indvars.iv.next164 = add nuw nsw i64 %indvars.iv163, 1 %exitcond167.not = icmp eq i64 %indvars.iv.next164, %wide.trip.count166 br i1 %exitcond167.not, label %for.body8.us.backedge, label %for.body27.us, !llvm.loop !14 for.body8.us: ; preds = %for.body8.us.backedge, %while.cond.us.preheader %indvars.iv158 = phi i64 [ 0, %while.cond.us.preheader ], [ %indvars.iv158.be, %for.body8.us.backedge ] %minv.0115.us = phi i32 [ 2097152, %while.cond.us.preheader ], [ %minv.0115.us.be, %for.body8.us.backedge ] %u.0114.us = phi i32 [ -1, %while.cond.us.preheader ], [ %u.0114.us.be, %for.body8.us.backedge ] %arrayidx10.us = getelementptr inbounds [100 x i32], ptr %d, i64 0, i64 %indvars.iv158 %9 = load i32, ptr %arrayidx10.us, align 4, !tbaa !5 %cmp11.us = icmp sgt i32 %minv.0115.us, %9 br i1 %cmp11.us, label %land.lhs.true.us, label %for.inc17.us land.lhs.true.us: ; preds = %for.body8.us %arrayidx13.us = getelementptr inbounds [100 x i32], ptr %color, i64 0, i64 %indvars.iv158 %10 = load i32, ptr %arrayidx13.us, align 4, !tbaa !5 %cmp14.not.us = icmp eq i32 %10, 2 %11 = trunc i64 %indvars.iv158 to i32 %spec.select.us = select i1 %cmp14.not.us, i32 %u.0114.us, i32 %11 %spec.select110.us = select i1 %cmp14.not.us, i32 %minv.0115.us, i32 %9 br label %for.inc17.us for.inc17.us: ; preds = %land.lhs.true.us, %for.body8.us %u.1.us = phi i32 [ %u.0114.us, %for.body8.us ], [ %spec.select.us, %land.lhs.true.us ] %minv.1.us = phi i32 [ %minv.0115.us, %for.body8.us ], [ %spec.select110.us, %land.lhs.true.us ] %indvars.iv.next159 = add nuw nsw i64 %indvars.iv158, 1 %exitcond162.not = icmp eq i64 %indvars.iv.next159, %wide.trip.count161 br i1 %exitcond162.not, label %for.end19.us, label %for.body8.us.backedge for.body8.us.backedge: ; preds = %for.inc58.us, %for.inc17.us %indvars.iv158.be = phi i64 [ %indvars.iv.next159, %for.inc17.us ], [ 0, %for.inc58.us ] %minv.0115.us.be = phi i32 [ %minv.1.us, %for.inc17.us ], [ 2097152, %for.inc58.us ] %u.0114.us.be = phi i32 [ %u.1.us, %for.inc17.us ], [ -1, %for.inc58.us ] br label %for.body8.us, !llvm.loop !14 for.cond61.preheader: ; preds = %for.end19.us br i1 %cmp111, label %for.body63.preheader, label %for.end77 for.body63.preheader: ; preds = %for.cond61.preheader %xtraiter = and i64 %1, 1 %12 = icmp eq i32 %.fr, 1 br i1 %12, label %for.end77.loopexit.unr-lcssa, label %for.body63.preheader.new for.body63.preheader.new: ; preds = %for.body63.preheader %unroll_iter = and i64 %1, 4294967294 br label %for.body63 for.body63: ; preds = %for.inc75.1, %for.body63.preheader.new %indvars.iv168 = phi i64 [ 0, %for.body63.preheader.new ], [ %indvars.iv.next169.1, %for.inc75.1 ] %sum.0149 = phi i32 [ 0, %for.body63.preheader.new ], [ %sum.1.1, %for.inc75.1 ] %niter = phi i64 [ 0, %for.body63.preheader.new ], [ %niter.next.1, %for.inc75.1 ] %arrayidx65 = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv168 %13 = load i32, ptr %arrayidx65, align 8, !tbaa !5 %cmp66.not = icmp eq i32 %13, -1 br i1 %cmp66.not, label %for.inc75, label %if.then67 if.then67: ; preds = %for.body63 %idxprom72 = sext i32 %13 to i64 %arrayidx73 = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv168, i64 %idxprom72 %14 = load i32, ptr %arrayidx73, align 4, !tbaa !5 %add = add nsw i32 %14, %sum.0149 br label %for.inc75 for.inc75: ; preds = %for.body63, %if.then67 %sum.1 = phi i32 [ %add, %if.then67 ], [ %sum.0149, %for.body63 ] %indvars.iv.next169 = or i64 %indvars.iv168, 1 %arrayidx65.1 = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv.next169 %15 = load i32, ptr %arrayidx65.1, align 4, !tbaa !5 %cmp66.not.1 = icmp eq i32 %15, -1 br i1 %cmp66.not.1, label %for.inc75.1, label %if.then67.1 if.then67.1: ; preds = %for.inc75 %idxprom72.1 = sext i32 %15 to i64 %arrayidx73.1 = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv.next169, i64 %idxprom72.1 %16 = load i32, ptr %arrayidx73.1, align 4, !tbaa !5 %add.1 = add nsw i32 %16, %sum.1 br label %for.inc75.1 for.inc75.1: ; preds = %if.then67.1, %for.inc75 %sum.1.1 = phi i32 [ %add.1, %if.then67.1 ], [ %sum.1, %for.inc75 ] %indvars.iv.next169.1 = add nuw nsw i64 %indvars.iv168, 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.end77.loopexit.unr-lcssa, label %for.body63, !llvm.loop !15 for.end77.loopexit.unr-lcssa: ; preds = %for.inc75.1, %for.body63.preheader %sum.1.lcssa.ph = phi i32 [ undef, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %indvars.iv168.unr = phi i64 [ 0, %for.body63.preheader ], [ %indvars.iv.next169.1, %for.inc75.1 ] %sum.0149.unr = phi i32 [ 0, %for.body63.preheader ], [ %sum.1.1, %for.inc75.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %for.end77, label %for.body63.epil for.body63.epil: ; preds = %for.end77.loopexit.unr-lcssa %arrayidx65.epil = getelementptr inbounds [100 x i32], ptr %p, i64 0, i64 %indvars.iv168.unr %17 = load i32, ptr %arrayidx65.epil, align 4, !tbaa !5 %cmp66.not.epil = icmp eq i32 %17, -1 br i1 %cmp66.not.epil, label %for.end77, label %if.then67.epil if.then67.epil: ; preds = %for.body63.epil %idxprom72.epil = sext i32 %17 to i64 %arrayidx73.epil = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv168.unr, i64 %idxprom72.epil %18 = load i32, ptr %arrayidx73.epil, align 4, !tbaa !5 %add.epil = add nsw i32 %18, %sum.0149.unr br label %for.end77 for.end77: ; preds = %for.end77.loopexit.unr-lcssa, %if.then67.epil, %for.body63.epil, %entry, %for.end, %for.cond61.preheader %sum.0.lcssa = phi i32 [ 0, %for.cond61.preheader ], [ 0, %for.end ], [ 0, %entry ], [ %sum.1.lcssa.ph, %for.end77.loopexit.unr-lcssa ], [ %add.epil, %if.then67.epil ], [ %sum.0149.unr, %for.body63.epil ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %p) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d) #5 ret i32 %sum.0.lcssa } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %d.i = alloca [100 x i32], align 16 %p.i = alloca [100 x i32], align 16 %color.i = alloca [100 x i32], align 16 %e = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %e) #5 %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @n) %0 = load i32, ptr @n, align 4, !tbaa !5 %.fr.i19 = freeze i32 %0 %cmp20 = icmp sgt i32 %.fr.i19, 0 br i1 %cmp20, label %for.cond1.preheader, label %for.end10.thread for.end10.thread: ; preds = %entry call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 br label %prim.exit for.cond1.preheader: ; preds = %entry, %for.inc8 %1 = phi i32 [ %.fr.i, %for.inc8 ], [ %.fr.i19, %entry ] %indvars.iv25 = phi i64 [ %indvars.iv.next26, %for.inc8 ], [ 0, %entry ] %cmp217 = icmp sgt i32 %1, 0 br i1 %cmp217, label %for.body3, label %for.inc8 for.body3: ; preds = %for.cond1.preheader, %for.body3 %indvars.iv = phi i64 [ %indvars.iv.next, %for.body3 ], [ 0, %for.cond1.preheader ] %call4 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %e) %2 = load i32, ptr %e, align 4 %cmp5 = icmp eq i32 %2, -1 %cond = select i1 %cmp5, i32 2097152, i32 %2 %arrayidx7 = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv25, i64 %indvars.iv store i32 %cond, ptr %arrayidx7, align 4, !tbaa !5 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %3 = load i32, ptr @n, align 4, !tbaa !5 %4 = sext i32 %3 to i64 %cmp2 = icmp slt i64 %indvars.iv.next, %4 br i1 %cmp2, label %for.body3, label %for.inc8, !llvm.loop !16 for.inc8: ; preds = %for.body3, %for.cond1.preheader %5 = phi i32 [ %1, %for.cond1.preheader ], [ %3, %for.body3 ] %.fr.i = freeze i32 %5 %indvars.iv.next26 = add nuw nsw i64 %indvars.iv25, 1 %6 = sext i32 %.fr.i to i64 %cmp = icmp slt i64 %indvars.iv.next26, %6 br i1 %cmp, label %for.cond1.preheader, label %for.end10, !llvm.loop !17 for.end10: ; preds = %for.inc8 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %d.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.start.p0(i64 400, ptr nonnull %color.i) #5 %cmp111.i = icmp sgt i32 %.fr.i, 0 br i1 %cmp111.i, label %for.body.preheader.i, label %prim.exit for.body.preheader.i: ; preds = %for.end10 %7 = zext i32 %.fr.i to i64 %8 = shl nuw nsw i64 %7, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %p.i, i8 -1, i64 %8, i1 false), !tbaa !5 call void @llvm.memset.p0.i64(ptr nonnull align 16 %color.i, i8 0, i64 %8, i1 false), !tbaa !5 %min.iters.check = icmp ult i32 %.fr.i, 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 %7, 4294967288 br label %vector.body vector.body: ; preds = %vector.body, %vector.ph %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ] %9 = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %index store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %9, align 16, !tbaa !5 %10 = getelementptr inbounds i32, ptr %9, i64 4 store <4 x i32> <i32 2097152, i32 2097152, i32 2097152, i32 2097152>, ptr %10, align 16, !tbaa !5 %index.next = add nuw i64 %index, 8 %11 = icmp eq i64 %index.next, %n.vec br i1 %11, label %middle.block, label %vector.body, !llvm.loop !19 middle.block: ; preds = %vector.body %cmp.n = icmp eq i64 %n.vec, %7 br i1 %cmp.n, label %while.cond.us.preheader.i, label %for.body.i.preheader for.body.i.preheader: ; preds = %for.body.preheader.i, %middle.block %indvars.iv.i.ph = phi i64 [ 0, %for.body.preheader.i ], [ %n.vec, %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 ] %arrayidx.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv.i store i32 2097152, ptr %arrayidx.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, %7 br i1 %exitcond.not.i, label %while.cond.us.preheader.i, label %for.body.i, !llvm.loop !20 while.cond.us.preheader.i: ; preds = %for.body.i, %middle.block store i32 0, ptr %d.i, align 16, !tbaa !5 br label %for.body8.us.i for.end19.us.i: ; preds = %for.inc17.us.i %cmp20.us.i = icmp eq i32 %u.1.us.i, -1 br i1 %cmp20.us.i, label %for.body63.i.preheader, label %if.end22.us.i for.body63.i.preheader: ; preds = %for.end19.us.i %xtraiter = and i64 %7, 1 %12 = icmp eq i32 %.fr.i, 1 br i1 %12, label %prim.exit.loopexit.unr-lcssa, label %for.body63.i.preheader.new for.body63.i.preheader.new: ; preds = %for.body63.i.preheader %unroll_iter = and i64 %7, 4294967294 br label %for.body63.i if.end22.us.i: ; preds = %for.end19.us.i %idxprom23.us.i = sext i32 %u.1.us.i to i64 %arrayidx24.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %idxprom23.us.i store i32 2, ptr %arrayidx24.us.i, align 4, !tbaa !5 br label %for.body27.us.i for.body27.us.i: ; preds = %for.inc58.us.i, %if.end22.us.i %indvars.iv163.i = phi i64 [ 0, %if.end22.us.i ], [ %indvars.iv.next164.i, %for.inc58.us.i ] %arrayidx29.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv163.i %13 = load i32, ptr %arrayidx29.us.i, align 4, !tbaa !5 %cmp30.not.us.i = icmp eq i32 %13, 2 br i1 %cmp30.not.us.i, label %for.inc58.us.i, label %land.lhs.true31.us.i land.lhs.true31.us.i: ; preds = %for.body27.us.i %arrayidx35.us.i = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %idxprom23.us.i, i64 %indvars.iv163.i %14 = load i32, ptr %arrayidx35.us.i, align 4, !tbaa !5 %cmp36.not.us.i = icmp eq i32 %14, 2097152 br i1 %cmp36.not.us.i, label %for.inc58.us.i, label %if.then37.us.i if.then37.us.i: ; preds = %land.lhs.true31.us.i %arrayidx39.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv163.i %15 = load i32, ptr %arrayidx39.us.i, align 4, !tbaa !5 %cmp44.us.i = icmp sgt i32 %15, %14 br i1 %cmp44.us.i, label %if.then45.us.i, label %for.inc58.us.i if.then45.us.i: ; preds = %if.then37.us.i store i32 %14, ptr %arrayidx39.us.i, align 4, !tbaa !5 %arrayidx53.us.i = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv163.i store i32 %u.1.us.i, ptr %arrayidx53.us.i, align 4, !tbaa !5 store i32 1, ptr %arrayidx29.us.i, align 4, !tbaa !5 br label %for.inc58.us.i for.inc58.us.i: ; preds = %if.then45.us.i, %if.then37.us.i, %land.lhs.true31.us.i, %for.body27.us.i %indvars.iv.next164.i = add nuw nsw i64 %indvars.iv163.i, 1 %exitcond167.not.i = icmp eq i64 %indvars.iv.next164.i, %7 br i1 %exitcond167.not.i, label %for.body8.us.i.backedge, label %for.body27.us.i, !llvm.loop !14 for.body8.us.i: ; preds = %for.body8.us.i.backedge, %while.cond.us.preheader.i %indvars.iv158.i = phi i64 [ 0, %while.cond.us.preheader.i ], [ %indvars.iv158.i.be, %for.body8.us.i.backedge ] %minv.0115.us.i = phi i32 [ 2097152, %while.cond.us.preheader.i ], [ %minv.0115.us.i.be, %for.body8.us.i.backedge ] %u.0114.us.i = phi i32 [ -1, %while.cond.us.preheader.i ], [ %u.0114.us.i.be, %for.body8.us.i.backedge ] %arrayidx10.us.i = getelementptr inbounds [100 x i32], ptr %d.i, i64 0, i64 %indvars.iv158.i %16 = load i32, ptr %arrayidx10.us.i, align 4, !tbaa !5 %cmp11.us.i = icmp sgt i32 %minv.0115.us.i, %16 br i1 %cmp11.us.i, label %land.lhs.true.us.i, label %for.inc17.us.i land.lhs.true.us.i: ; preds = %for.body8.us.i %arrayidx13.us.i = getelementptr inbounds [100 x i32], ptr %color.i, i64 0, i64 %indvars.iv158.i %17 = load i32, ptr %arrayidx13.us.i, align 4, !tbaa !5 %cmp14.not.us.i = icmp eq i32 %17, 2 %18 = trunc i64 %indvars.iv158.i to i32 %spec.select.us.i = select i1 %cmp14.not.us.i, i32 %u.0114.us.i, i32 %18 %spec.select110.us.i = select i1 %cmp14.not.us.i, i32 %minv.0115.us.i, i32 %16 br label %for.inc17.us.i for.inc17.us.i: ; preds = %land.lhs.true.us.i, %for.body8.us.i %u.1.us.i = phi i32 [ %u.0114.us.i, %for.body8.us.i ], [ %spec.select.us.i, %land.lhs.true.us.i ] %minv.1.us.i = phi i32 [ %minv.0115.us.i, %for.body8.us.i ], [ %spec.select110.us.i, %land.lhs.true.us.i ] %indvars.iv.next159.i = add nuw nsw i64 %indvars.iv158.i, 1 %exitcond162.not.i = icmp eq i64 %indvars.iv.next159.i, %7 br i1 %exitcond162.not.i, label %for.end19.us.i, label %for.body8.us.i.backedge for.body8.us.i.backedge: ; preds = %for.inc58.us.i, %for.inc17.us.i %indvars.iv158.i.be = phi i64 [ %indvars.iv.next159.i, %for.inc17.us.i ], [ 0, %for.inc58.us.i ] %minv.0115.us.i.be = phi i32 [ %minv.1.us.i, %for.inc17.us.i ], [ 2097152, %for.inc58.us.i ] %u.0114.us.i.be = phi i32 [ %u.1.us.i, %for.inc17.us.i ], [ -1, %for.inc58.us.i ] br label %for.body8.us.i, !llvm.loop !14 for.body63.i: ; preds = %for.inc75.i.1, %for.body63.i.preheader.new %indvars.iv168.i = phi i64 [ 0, %for.body63.i.preheader.new ], [ %indvars.iv.next169.i.1, %for.inc75.i.1 ] %sum.0149.i = phi i32 [ 0, %for.body63.i.preheader.new ], [ %sum.1.i.1, %for.inc75.i.1 ] %niter = phi i64 [ 0, %for.body63.i.preheader.new ], [ %niter.next.1, %for.inc75.i.1 ] %arrayidx65.i = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv168.i %19 = load i32, ptr %arrayidx65.i, align 8, !tbaa !5 %cmp66.not.i = icmp eq i32 %19, -1 br i1 %cmp66.not.i, label %for.inc75.i, label %if.then67.i if.then67.i: ; preds = %for.body63.i %idxprom72.i = sext i32 %19 to i64 %arrayidx73.i = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv168.i, i64 %idxprom72.i %20 = load i32, ptr %arrayidx73.i, align 4, !tbaa !5 %add.i = add nsw i32 %20, %sum.0149.i br label %for.inc75.i for.inc75.i: ; preds = %if.then67.i, %for.body63.i %sum.1.i = phi i32 [ %add.i, %if.then67.i ], [ %sum.0149.i, %for.body63.i ] %indvars.iv.next169.i = or i64 %indvars.iv168.i, 1 %arrayidx65.i.1 = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv.next169.i %21 = load i32, ptr %arrayidx65.i.1, align 4, !tbaa !5 %cmp66.not.i.1 = icmp eq i32 %21, -1 br i1 %cmp66.not.i.1, label %for.inc75.i.1, label %if.then67.i.1 if.then67.i.1: ; preds = %for.inc75.i %idxprom72.i.1 = sext i32 %21 to i64 %arrayidx73.i.1 = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv.next169.i, i64 %idxprom72.i.1 %22 = load i32, ptr %arrayidx73.i.1, align 4, !tbaa !5 %add.i.1 = add nsw i32 %22, %sum.1.i br label %for.inc75.i.1 for.inc75.i.1: ; preds = %if.then67.i.1, %for.inc75.i %sum.1.i.1 = phi i32 [ %add.i.1, %if.then67.i.1 ], [ %sum.1.i, %for.inc75.i ] %indvars.iv.next169.i.1 = add nuw nsw i64 %indvars.iv168.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 %prim.exit.loopexit.unr-lcssa, label %for.body63.i, !llvm.loop !15 prim.exit.loopexit.unr-lcssa: ; preds = %for.inc75.i.1, %for.body63.i.preheader %sum.1.i.lcssa.ph = phi i32 [ undef, %for.body63.i.preheader ], [ %sum.1.i.1, %for.inc75.i.1 ] %indvars.iv168.i.unr = phi i64 [ 0, %for.body63.i.preheader ], [ %indvars.iv.next169.i.1, %for.inc75.i.1 ] %sum.0149.i.unr = phi i32 [ 0, %for.body63.i.preheader ], [ %sum.1.i.1, %for.inc75.i.1 ] %lcmp.mod.not = icmp eq i64 %xtraiter, 0 br i1 %lcmp.mod.not, label %prim.exit, label %for.body63.i.epil for.body63.i.epil: ; preds = %prim.exit.loopexit.unr-lcssa %arrayidx65.i.epil = getelementptr inbounds [100 x i32], ptr %p.i, i64 0, i64 %indvars.iv168.i.unr %23 = load i32, ptr %arrayidx65.i.epil, align 4, !tbaa !5 %cmp66.not.i.epil = icmp eq i32 %23, -1 br i1 %cmp66.not.i.epil, label %prim.exit, label %if.then67.i.epil if.then67.i.epil: ; preds = %for.body63.i.epil %idxprom72.i.epil = sext i32 %23 to i64 %arrayidx73.i.epil = getelementptr inbounds [100 x [100 x i32]], ptr @A, i64 0, i64 %indvars.iv168.i.unr, i64 %idxprom72.i.epil %24 = load i32, ptr %arrayidx73.i.epil, align 4, !tbaa !5 %add.i.epil = add nsw i32 %24, %sum.0149.i.unr br label %prim.exit prim.exit: ; preds = %prim.exit.loopexit.unr-lcssa, %if.then67.i.epil, %for.body63.i.epil, %for.end10.thread, %for.end10 %sum.0.lcssa.i = phi i32 [ 0, %for.end10 ], [ 0, %for.end10.thread ], [ %sum.1.i.lcssa.ph, %prim.exit.loopexit.unr-lcssa ], [ %add.i.epil, %if.then67.i.epil ], [ %sum.0149.i.unr, %for.body63.i.epil ] call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %color.i) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %p.i) #5 call void @llvm.lifetime.end.p0(i64 400, ptr nonnull %d.i) #5 %call12 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %sum.0.lcssa.i) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %e) #5 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4 attributes #0 = { nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = { 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, !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} !16 = distinct !{!16, !10} !17 = distinct !{!17, !10, !18} !18 = !{!"llvm.loop.unswitch.partial.disable"} !19 = distinct !{!19, !10, !11, !12} !20 = distinct !{!20, !10, !12, !11}
#include <stdio.h> int main(void) { int a,b; scanf("%d%d",&a,&b); printf("%d\n",(a-1)*(b-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199927/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199927/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %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 %sub = add nsw i32 %0, -1 %1 = load i32, ptr %b, align 4, !tbaa !5 %sub1 = add nsw i32 %1, -1 %mul = mul nsw i32 %sub1, %sub %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) 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 x,y,m; scanf("%d %d",&x,&y); if (x>1 && y>1){ m=(x-1)*(y-1); printf("%d\n",m); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_199970/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_199970/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %x = alloca i32, align 4 %y = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %x) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %y) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %x, ptr noundef nonnull %y) %0 = load i32, ptr %x, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 1 %1 = load i32, ptr %y, align 4 %cmp1 = icmp sgt i32 %1, 1 %or.cond = select i1 %cmp, i1 %cmp1, i1 false br i1 %or.cond, label %if.then, label %if.end if.then: ; preds = %entry %sub = add nsw i32 %0, -1 %sub2 = add nsw i32 %1, -1 %mul = mul nsw i32 %sub2, %sub %call3 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) br label %if.end if.end: ; preds = %if.then, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %y) #3 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #3 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> int main() { int n, m; scanf("%d%d", &n, &m); printf("%d\n", (n - 1) * (m - 1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200010/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200010/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %1 = load i32, ptr %m, align 4, !tbaa !5 %sub1 = add nsw i32 %1, -1 %mul = mul nsw i32 %sub1, %sub %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) 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"}
#include <stdio.h> int main(void) { int n, m; scanf("%d%d", &n, &m); printf("%d\n", (n-1)*(m-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200061/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200061/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %1 = load i32, ptr %m, align 4, !tbaa !5 %sub1 = add nsw i32 %1, -1 %mul = mul nsw i32 %sub1, %sub %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) 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"}
#include<stdio.h> int main() { int r,c,a; scanf("%d%d",&r,&c); if(r>=2 && r<=100 && c>=2 && c<=100) { a=(r-1)*(c-1); printf("%d\n",a); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200111/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200111/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [5 x i8] c"%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %r = alloca i32, align 4 %c = 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 %c) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %r, ptr noundef nonnull %c) %0 = load i32, ptr %r, align 4 %1 = add i32 %0, -2 %or.cond = icmp ult i32 %1, 99 %2 = load i32, ptr %c, align 4 %cmp3 = icmp sgt i32 %2, 1 %or.cond8 = select i1 %or.cond, i1 %cmp3, i1 false %cmp5 = icmp slt i32 %2, 101 %or.cond9 = select i1 %or.cond8, i1 %cmp5, i1 false br i1 %or.cond9, label %if.then, label %if.end if.then: ; preds = %entry %sub = add nsw i32 %0, -1 %sub6 = add nsw i32 %2, -1 %mul = mul nuw nsw i32 %sub6, %sub %call7 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) br label %if.end if.end: ; preds = %if.then, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %c) #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)"}
#include <stdio.h> int main(void){ int n, m; scanf("%d %d", &n, &m); printf("%d\n", (n-1)*(m-1)); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200155/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200155/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %m = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #3 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %m) #3 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %m) %0 = load i32, ptr %n, align 4, !tbaa !5 %sub = add nsw i32 %0, -1 %1 = load i32, ptr %m, align 4, !tbaa !5 %sub1 = add nsw i32 %1, -1 %mul = mul nsw i32 %sub1, %sub %call2 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %mul) 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"}
#include <stdio.h> int main() { int h, w; scanf("%d%d\n", &h, &w); int g[h][w], m[h][w], cnt = 0; for (int i=0; i<h; i++) for (int j=0; j<w; j++) m[i][j] = 0; for (int i=0; i<h; i++) { for (int j=0; j<w; j++) { scanf("%d", g[i]+j); if ((g[i][j]+m[i][j])%2) { if (j!=w-1) { m[i][j+1]++; cnt++; } else if (i!=h-1) { m[i+1][j]++; cnt++; } } } } printf("%d\n", cnt); for (int i=0; i<h; i++) { for (int j=0; j<w; j++) { if (g[i][j]%2 == 0) continue; if (j != w-1) { g[i][j+1]++; printf("%d %d %d %d\n", i+1, j+1, i+1, j+2); } else if (i != h-1){ g[i+1][j]++; printf("%d %d %d %d\n", i+1, j+1, i+2, j+1); } } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200199/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200199/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 [3 x i8] c"%d\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [13 x i8] c"%d %d %d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %h = alloca i32, align 4 %w = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %h) #5 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %w) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %h, ptr noundef nonnull %w) %0 = load i32, ptr %h, align 4, !tbaa !5 %1 = zext i32 %0 to i64 %2 = load i32, ptr %w, align 4, !tbaa !5 %3 = zext i32 %2 to i64 %4 = call ptr @llvm.stacksave.p0() %5 = mul nuw i64 %3, %1 %vla = alloca i32, i64 %5, align 16 %6 = load i32, ptr %h, align 4, !tbaa !5 %7 = zext i32 %6 to i64 %8 = load i32, ptr %w, align 4, !tbaa !5 %9 = zext i32 %8 to i64 %10 = mul nuw i64 %9, %7 %vla1 = alloca i32, i64 %10, align 16 %cmp155 = icmp sgt i32 %6, 0 %cmp3153 = icmp sgt i32 %8, 0 %or.cond = select i1 %cmp155, i1 %cmp3153, i1 false br i1 %or.cond, label %for.cond17.preheader.preheader, label %for.cond.cleanup14 for.cond17.preheader.preheader: ; preds = %entry %11 = shl i64 %10, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %vla1, i8 0, i64 %11, i1 false), !tbaa !5 br label %for.cond17.preheader for.cond17.preheader: ; preds = %for.cond17.preheader.preheader, %for.cond.cleanup19 %12 = phi i32 [ %6, %for.cond17.preheader.preheader ], [ %21, %for.cond.cleanup19 ] %13 = phi i32 [ %8, %for.cond17.preheader.preheader ], [ %22, %for.cond.cleanup19 ] %indvars.iv175 = phi i64 [ 0, %for.cond17.preheader.preheader ], [ %indvars.iv.next176.pre-phi, %for.cond.cleanup19 ] %cnt.0161 = phi i32 [ 0, %for.cond17.preheader.preheader ], [ %cnt.1.lcssa, %for.cond.cleanup19 ] %cmp18157 = icmp sgt i32 %13, 0 br i1 %cmp18157, label %for.body20.lr.ph, label %for.cond17.preheader.for.cond.cleanup19_crit_edge for.cond17.preheader.for.cond.cleanup19_crit_edge: ; preds = %for.cond17.preheader %.pre193 = add nuw nsw i64 %indvars.iv175, 1 br label %for.cond.cleanup19 for.body20.lr.ph: ; preds = %for.cond17.preheader %14 = mul nuw nsw i64 %indvars.iv175, %3 %arrayidx22 = getelementptr inbounds i32, ptr %vla, i64 %14 %15 = mul nuw nsw i64 %indvars.iv175, %9 %arrayidx29 = getelementptr inbounds i32, ptr %vla1, i64 %15 %16 = add nuw nsw i64 %indvars.iv175, 1 %17 = mul nuw nsw i64 %16, %9 %arrayidx46 = getelementptr inbounds i32, ptr %vla1, i64 %17 %invariant.gep = getelementptr i32, ptr %arrayidx29, i64 1 br label %for.body20 for.cond.cleanup14: ; preds = %for.cond.cleanup19, %entry %cnt.0.lcssa = phi i32 [ 0, %entry ], [ %cnt.1.lcssa, %for.cond.cleanup19 ] %call59 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %cnt.0.lcssa) %18 = load i32, ptr %h, align 4, !tbaa !5 %cmp62166 = icmp sgt i32 %18, 0 %19 = load i32, ptr %w, align 4 %20 = icmp sgt i32 %19, 0 %or.cond197 = select i1 %cmp62166, i1 %20, i1 false br i1 %or.cond197, label %for.cond66.preheader, label %for.cond.cleanup63 for.cond.cleanup19.loopexit: ; preds = %for.inc53 %.pre191 = load i32, ptr %h, align 4, !tbaa !5 br label %for.cond.cleanup19 for.cond.cleanup19: ; preds = %for.cond17.preheader.for.cond.cleanup19_crit_edge, %for.cond.cleanup19.loopexit %indvars.iv.next176.pre-phi = phi i64 [ %.pre193, %for.cond17.preheader.for.cond.cleanup19_crit_edge ], [ %16, %for.cond.cleanup19.loopexit ] %21 = phi i32 [ %12, %for.cond17.preheader.for.cond.cleanup19_crit_edge ], [ %.pre191, %for.cond.cleanup19.loopexit ] %22 = phi i32 [ %13, %for.cond17.preheader.for.cond.cleanup19_crit_edge ], [ %.pre, %for.cond.cleanup19.loopexit ] %cnt.1.lcssa = phi i32 [ %cnt.0161, %for.cond17.preheader.for.cond.cleanup19_crit_edge ], [ %cnt.2, %for.cond.cleanup19.loopexit ] %23 = sext i32 %21 to i64 %cmp13 = icmp slt i64 %indvars.iv.next176.pre-phi, %23 br i1 %cmp13, label %for.cond17.preheader, label %for.cond.cleanup14, !llvm.loop !9 for.body20: ; preds = %for.body20.lr.ph, %for.inc53 %indvars.iv = phi i64 [ 0, %for.body20.lr.ph ], [ %indvars.iv.next, %for.inc53 ] %cnt.1158 = phi i32 [ %cnt.0161, %for.body20.lr.ph ], [ %cnt.2, %for.inc53 ] %add.ptr = getelementptr inbounds i32, ptr %arrayidx22, i64 %indvars.iv %call23 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %add.ptr) %24 = load i32, ptr %add.ptr, align 4, !tbaa !5 %arrayidx31 = getelementptr inbounds i32, ptr %arrayidx29, i64 %indvars.iv %25 = load i32, ptr %arrayidx31, align 4, !tbaa !5 %add = add nsw i32 %25, %24 %26 = and i32 %add, 1 %tobool.not = icmp eq i32 %26, 0 %.pre = load i32, ptr %w, align 4, !tbaa !5 br i1 %tobool.not, label %for.inc53, label %if.then if.then: ; preds = %for.body20 %sub = add nsw i32 %.pre, -1 %27 = zext i32 %sub to i64 %cmp32.not = icmp eq i64 %indvars.iv, %27 br i1 %cmp32.not, label %if.else, label %for.inc53.sink.split if.else: ; preds = %if.then %28 = load i32, ptr %h, align 4, !tbaa !5 %sub41 = add nsw i32 %28, -1 %29 = zext i32 %sub41 to i64 %cmp42.not = icmp eq i64 %indvars.iv175, %29 br i1 %cmp42.not, label %for.inc53, label %for.inc53.sink.split for.inc53.sink.split: ; preds = %if.else, %if.then %invariant.gep.sink = phi ptr [ %invariant.gep, %if.then ], [ %arrayidx46, %if.else ] %gep = getelementptr i32, ptr %invariant.gep.sink, i64 %indvars.iv %30 = load i32, ptr %gep, align 4, !tbaa !5 %inc49 = add nsw i32 %30, 1 store i32 %inc49, ptr %gep, align 4, !tbaa !5 %inc50 = add nsw i32 %cnt.1158, 1 br label %for.inc53 for.inc53: ; preds = %for.inc53.sink.split, %for.body20, %if.else %cnt.2 = phi i32 [ %cnt.1158, %if.else ], [ %cnt.1158, %for.body20 ], [ %inc50, %for.inc53.sink.split ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %31 = sext i32 %.pre to i64 %cmp18 = icmp slt i64 %indvars.iv.next, %31 br i1 %cmp18, label %for.body20, label %for.cond.cleanup19.loopexit, !llvm.loop !12 for.cond66.preheader: ; preds = %for.cond.cleanup14, %for.cond.cleanup68 %32 = phi i32 [ %39, %for.cond.cleanup68 ], [ %18, %for.cond.cleanup14 ] %33 = phi i32 [ %40, %for.cond.cleanup68 ], [ %19, %for.cond.cleanup14 ] %indvars.iv185 = phi i64 [ %indvars.iv.next186.pre-phi, %for.cond.cleanup68 ], [ 0, %for.cond.cleanup14 ] %cmp67164 = icmp sgt i32 %33, 0 br i1 %cmp67164, label %for.body69.lr.ph, label %for.cond66.preheader.for.cond.cleanup68_crit_edge for.cond66.preheader.for.cond.cleanup68_crit_edge: ; preds = %for.cond66.preheader %.pre194 = add nuw nsw i64 %indvars.iv185, 1 br label %for.cond.cleanup68 for.body69.lr.ph: ; preds = %for.cond66.preheader %indvars190 = trunc i64 %indvars.iv185 to i32 %34 = mul nuw nsw i64 %indvars.iv185, %3 %arrayidx71 = getelementptr inbounds i32, ptr %vla, i64 %34 %35 = add nuw nsw i64 %indvars.iv185, 1 %36 = mul nuw nsw i64 %35, %3 %arrayidx98 = getelementptr inbounds i32, ptr %vla, i64 %36 %add104 = add nuw nsw i32 %indvars190, 2 %37 = trunc i64 %35 to i32 %38 = trunc i64 %35 to i32 br label %for.body69 for.cond.cleanup63: ; preds = %for.cond.cleanup68, %for.cond.cleanup14 call void @llvm.stackrestore.p0(ptr %4) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %w) #5 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %h) #5 ret i32 0 for.cond.cleanup68.loopexit: ; preds = %for.inc109 %.pre192 = load i32, ptr %h, align 4, !tbaa !5 br label %for.cond.cleanup68 for.cond.cleanup68: ; preds = %for.cond66.preheader.for.cond.cleanup68_crit_edge, %for.cond.cleanup68.loopexit %indvars.iv.next186.pre-phi = phi i64 [ %.pre194, %for.cond66.preheader.for.cond.cleanup68_crit_edge ], [ %35, %for.cond.cleanup68.loopexit ] %39 = phi i32 [ %32, %for.cond66.preheader.for.cond.cleanup68_crit_edge ], [ %.pre192, %for.cond.cleanup68.loopexit ] %40 = phi i32 [ %33, %for.cond66.preheader.for.cond.cleanup68_crit_edge ], [ %54, %for.cond.cleanup68.loopexit ] %41 = sext i32 %39 to i64 %cmp62 = icmp slt i64 %indvars.iv.next186.pre-phi, %41 br i1 %cmp62, label %for.cond66.preheader, label %for.cond.cleanup63, !llvm.loop !13 for.body69: ; preds = %for.body69.lr.ph, %for.inc109 %indvars.iv179 = phi i64 [ 0, %for.body69.lr.ph ], [ %indvars.iv.next180, %for.inc109 ] %42 = phi i32 [ %33, %for.body69.lr.ph ], [ %54, %for.inc109 ] %indvars184 = trunc i64 %indvars.iv179 to i32 %arrayidx73 = getelementptr inbounds i32, ptr %arrayidx71, i64 %indvars.iv179 %43 = load i32, ptr %arrayidx73, align 4, !tbaa !5 %44 = and i32 %43, 1 %cmp75 = icmp eq i32 %44, 0 br i1 %cmp75, label %for.inc109, label %if.end77 if.end77: ; preds = %for.body69 %sub78 = add nsw i32 %42, -1 %45 = zext i32 %sub78 to i64 %cmp79.not = icmp eq i64 %indvars.iv179, %45 br i1 %cmp79.not, label %if.else92, label %if.then80 if.then80: ; preds = %if.end77 %46 = add nuw nsw i64 %indvars.iv179, 1 %arrayidx85 = getelementptr inbounds i32, ptr %arrayidx71, i64 %46 %47 = load i32, ptr %arrayidx85, align 4, !tbaa !5 %inc86 = add nsw i32 %47, 1 store i32 %inc86, ptr %arrayidx85, align 4, !tbaa !5 %add90 = add nuw nsw i32 %indvars184, 2 %48 = trunc i64 %46 to i32 %call91 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %37, i32 noundef %48, i32 noundef %37, i32 noundef %add90) br label %for.inc109 if.else92: ; preds = %if.end77 %49 = load i32, ptr %h, align 4, !tbaa !5 %sub93 = add nsw i32 %49, -1 %50 = zext i32 %sub93 to i64 %cmp94.not = icmp eq i64 %indvars.iv185, %50 br i1 %cmp94.not, label %for.inc109, label %if.then95 if.then95: ; preds = %if.else92 %arrayidx100 = getelementptr inbounds i32, ptr %arrayidx98, i64 %indvars.iv179 %51 = load i32, ptr %arrayidx100, align 4, !tbaa !5 %inc101 = add nsw i32 %51, 1 store i32 %inc101, ptr %arrayidx100, align 4, !tbaa !5 %52 = trunc i64 %indvars.iv179 to i32 %53 = add i32 %52, 1 %call106 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3, i32 noundef %38, i32 noundef %53, i32 noundef %add104, i32 noundef %53) br label %for.inc109 for.inc109: ; preds = %if.then80, %if.then95, %if.else92, %for.body69 %indvars.iv.next180 = add nuw nsw i64 %indvars.iv179, 1 %54 = load i32, ptr %w, align 4, !tbaa !5 %55 = sext i32 %54 to i64 %cmp67 = icmp slt i64 %indvars.iv.next180, %55 br i1 %cmp67, label %for.body69, label %for.cond.cleanup68.loopexit, !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 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 = { mustprogress nocallback nofree nosync nounwind willreturn } 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, !11} !10 = !{!"llvm.loop.mustprogress"} !11 = !{!"llvm.loop.unswitch.partial.disable"} !12 = distinct !{!12, !10} !13 = distinct !{!13, !10, !11} !14 = distinct !{!14, !10}
#include <stdio.h> #pragma GCC optimize ("O3") inline static int gl(void){ int x = 0; for(;;){ unsigned int c = getchar_unlocked() - 48; if(c < 10){ x = x*10 + c; }else{ break; } } return x; } inline static void pl(unsigned int s){ char str[9]; int pos=9; if(s==0){ putchar_unlocked('0'); return; } do{ pos--; str[pos]=s%10+48; s/=10; }while(s!=0); for(; pos<9; pos++){ putchar_unlocked(str[pos]); } } char a[501]; unsigned short out[4*500*500]; int main(void){ int h=gl(), w=gl(), pos=0; char haveCoin = 0; short old_y, old_x; for(int i=1; i<=h; i++){ for(int j=1; j<=w; j++){ int t = getchar_unlocked() - 48; getchar_unlocked(); a[j] = t; } if(i%2==1){ for(int j=1; j<=w; j++){ if(haveCoin){ out[4*pos+0]=old_y; out[4*pos+1]=old_x; out[4*pos+2]=i; out[4*pos+3]=j; pos++; } haveCoin ^= a[j]&1; old_y = i; old_x = j; } }else{ for(int j=w; j>0; j--){ if(haveCoin){ out[4*pos+0]=old_y; out[4*pos+1]=old_x; out[4*pos+2]=i; out[4*pos+3]=j; pos++; } haveCoin ^= a[j]&1; old_y = i; old_x = j; } } } printf("%d\n", pos); for(int i=0; i<pos; i++){ pl(out[4*i+0]); putchar_unlocked(' '); pl(out[4*i+1]); putchar_unlocked(' '); pl(out[4*i+2]); putchar_unlocked(' '); pl(out[4*i+3]); putchar_unlocked('\n'); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200241/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200241/source.c" target datalayout = "e-m:e-p270: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] } @a = dso_local local_unnamed_addr global [501 x i8] zeroinitializer, align 16 @out = dso_local local_unnamed_addr global [1000000 x i16] zeroinitializer, align 16 @.str = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @stdin = external local_unnamed_addr global ptr, align 8 @stdout = external local_unnamed_addr global ptr, align 8 ; Function Attrs: nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %str.i297 = alloca [9 x i8], align 1 %str.i250 = alloca [9 x i8], align 1 %str.i203 = alloca [9 x i8], align 1 %str.i = alloca [9 x i8], align 1 %.pre4.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %for.cond.i for.cond.i: ; preds = %getchar_unlocked.exit.i, %entry %0 = phi ptr [ %.pre4.i, %entry ], [ %.pre4.i162, %getchar_unlocked.exit.i ] %x.0.i = phi i32 [ 0, %entry ], [ %add.i, %getchar_unlocked.exit.i ] %_IO_read_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 1 %1 = load ptr, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %_IO_read_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %0, i64 0, i32 2 %2 = load ptr, ptr %_IO_read_end.i.i, align 8, !tbaa !14 %cmp.not.i.i = icmp ult ptr %1, %2 br i1 %cmp.not.i.i, label %cond.false.i.i, label %cond.true.i.i, !prof !15 cond.true.i.i: ; preds = %for.cond.i %call.i.i = tail call i32 @__uflow(ptr noundef nonnull %0) #4 %.pre.i = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit.i cond.false.i.i: ; preds = %for.cond.i %incdec.ptr.i.i = getelementptr inbounds i8, ptr %1, i64 1 store ptr %incdec.ptr.i.i, ptr %_IO_read_ptr.i.i, align 8, !tbaa !9 %3 = load i8, ptr %1, align 1, !tbaa !16 %conv3.i.i = zext i8 %3 to i32 br label %getchar_unlocked.exit.i getchar_unlocked.exit.i: ; preds = %cond.false.i.i, %cond.true.i.i %.pre4.i162 = phi ptr [ %.pre.i, %cond.true.i.i ], [ %0, %cond.false.i.i ] %cond.i.i = phi i32 [ %call.i.i, %cond.true.i.i ], [ %conv3.i.i, %cond.false.i.i ] %sub.i = add nsw i32 %cond.i.i, -48 %cmp.i = icmp ult i32 %sub.i, 10 %mul.i = mul nsw i32 %x.0.i, 10 %add.i = add i32 %sub.i, %mul.i br i1 %cmp.i, label %for.cond.i, label %for.cond.i163 for.cond.i163: ; preds = %getchar_unlocked.exit.i, %getchar_unlocked.exit.i171 %4 = phi ptr [ %8, %getchar_unlocked.exit.i171 ], [ %.pre4.i162, %getchar_unlocked.exit.i ] %x.0.i164 = phi i32 [ %add.i176, %getchar_unlocked.exit.i171 ], [ 0, %getchar_unlocked.exit.i ] %_IO_read_ptr.i.i165 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 1 %5 = load ptr, ptr %_IO_read_ptr.i.i165, align 8, !tbaa !9 %_IO_read_end.i.i166 = getelementptr inbounds %struct._IO_FILE, ptr %4, i64 0, i32 2 %6 = load ptr, ptr %_IO_read_end.i.i166, align 8, !tbaa !14 %cmp.not.i.i167 = icmp ult ptr %5, %6 br i1 %cmp.not.i.i167, label %cond.false.i.i177, label %cond.true.i.i168, !prof !15 cond.true.i.i168: ; preds = %for.cond.i163 %call.i.i169 = tail call i32 @__uflow(ptr noundef nonnull %4) #4 %.pre.i170 = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit.i171 cond.false.i.i177: ; preds = %for.cond.i163 %incdec.ptr.i.i178 = getelementptr inbounds i8, ptr %5, i64 1 store ptr %incdec.ptr.i.i178, ptr %_IO_read_ptr.i.i165, align 8, !tbaa !9 %7 = load i8, ptr %5, align 1, !tbaa !16 %conv3.i.i179 = zext i8 %7 to i32 br label %getchar_unlocked.exit.i171 getchar_unlocked.exit.i171: ; preds = %cond.false.i.i177, %cond.true.i.i168 %8 = phi ptr [ %.pre.i170, %cond.true.i.i168 ], [ %4, %cond.false.i.i177 ] %cond.i.i172 = phi i32 [ %call.i.i169, %cond.true.i.i168 ], [ %conv3.i.i179, %cond.false.i.i177 ] %sub.i173 = add nsw i32 %cond.i.i172, -48 %cmp.i174 = icmp ult i32 %sub.i173, 10 %mul.i175 = mul nsw i32 %x.0.i164, 10 %add.i176 = add i32 %sub.i173, %mul.i175 br i1 %cmp.i174, label %for.cond.i163, label %for.cond.preheader for.cond.preheader: ; preds = %getchar_unlocked.exit.i171 %cmp.not366 = icmp slt i32 %x.0.i, 1 br i1 %cmp.not366, label %for.cond.cleanup.thread, label %for.cond2.preheader.lr.ph for.cond.cleanup.thread: ; preds = %for.cond.preheader %call87412 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef 0) br label %for.cond.cleanup92 for.cond2.preheader.lr.ph: ; preds = %for.cond.preheader %cmp3.not345 = icmp slt i32 %x.0.i164, 1 %cmp46356 = icmp sgt i32 %x.0.i164, 0 %9 = add i32 %x.0.i164, 1 %10 = zext i32 %x.0.i164 to i64 %wide.trip.count = zext i32 %9 to i64 %wide.trip.count380 = zext i32 %9 to i64 %exitcond381.peel.not = icmp eq i32 %9, 2 %conv65.peel = trunc i32 %x.0.i164 to i16 %.pre405 = trunc i32 %x.0.i164 to i16 %arrayidx73.peel = getelementptr inbounds [501 x i8], ptr @a, i64 0, i64 %10 %cmp46.peel = icmp ugt i32 %x.0.i164, 1 br label %for.cond2.preheader for.cond2.preheader: ; preds = %for.cond2.preheader.lr.ph, %for.inc84 %.pre396 = phi ptr [ %8, %for.cond2.preheader.lr.ph ], [ %.pre396399417, %for.inc84 ] %i.0371 = phi i32 [ 1, %for.cond2.preheader.lr.ph ], [ %inc85, %for.inc84 ] %old_x.0370 = phi i16 [ undef, %for.cond2.preheader.lr.ph ], [ %old_x.3, %for.inc84 ] %old_y.0369 = phi i16 [ undef, %for.cond2.preheader.lr.ph ], [ %old_y.3, %for.inc84 ] %haveCoin.0368 = phi i8 [ 0, %for.cond2.preheader.lr.ph ], [ %haveCoin.3, %for.inc84 ] %pos.0367 = phi i32 [ 0, %for.cond2.preheader.lr.ph ], [ %pos.5, %for.inc84 ] br i1 %cmp3.not345, label %for.inc84, label %for.body5 for.cond.cleanup: ; preds = %for.inc84 %call87 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str, i32 noundef %pos.5) %cmp90374 = icmp sgt i32 %pos.5, 0 br i1 %cmp90374, label %for.body93.preheader, label %for.cond.cleanup92 for.body93.preheader: ; preds = %for.cond.cleanup %wide.trip.count394 = zext i32 %pos.5 to i64 br label %for.body93 for.cond.cleanup4: ; preds = %getchar_unlocked.exit190 %rem = and i32 %i.0371, 1 %cmp8.not = icmp eq i32 %rem, 0 br i1 %cmp8.not, label %for.cond45.preheader, label %for.cond11.preheader for.cond11.preheader: ; preds = %for.cond.cleanup4 br i1 %cmp3.not345, label %for.inc84, label %for.body15.lr.ph for.body15.lr.ph: ; preds = %for.cond11.preheader %conv23 = trunc i32 %i.0371 to i16 %tobool.not.peel = icmp eq i8 %haveCoin.0368, 0 br i1 %tobool.not.peel, label %if.end.peel, label %if.then16.peel if.then16.peel: ; preds = %for.body15.lr.ph %mul.peel = shl nsw i32 %pos.0367, 2 %idxprom17.peel = sext i32 %mul.peel to i64 %arrayidx18.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom17.peel store i16 %old_y.0369, ptr %arrayidx18.peel, align 8, !tbaa !17 %add20.peel = or i32 %mul.peel, 1 %idxprom21.peel = sext i32 %add20.peel to i64 %arrayidx22.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom21.peel store i16 %old_x.0370, ptr %arrayidx22.peel, align 2, !tbaa !17 %add25.peel = or i32 %mul.peel, 2 %idxprom26.peel = sext i32 %add25.peel to i64 %arrayidx27.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom26.peel store i16 %conv23, ptr %arrayidx27.peel, align 4, !tbaa !17 %add30.peel = or i32 %mul.peel, 3 %idxprom31.peel = sext i32 %add30.peel to i64 %arrayidx32.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom31.peel store i16 1, ptr %arrayidx32.peel, align 2, !tbaa !17 %inc33.peel = add nsw i32 %pos.0367, 1 br label %if.end.peel if.end.peel: ; preds = %if.then16.peel, %for.body15.lr.ph %pos.2.peel = phi i32 [ %inc33.peel, %if.then16.peel ], [ %pos.0367, %for.body15.lr.ph ] %11 = load i8, ptr getelementptr inbounds ([501 x i8], ptr @a, i64 0, i64 1), align 1, !tbaa !16 %12 = and i8 %11, 1 %xor161.peel = xor i8 %12, %haveCoin.0368 br i1 %exitcond381.peel.not, label %for.inc84, label %for.body15 for.cond45.preheader: ; preds = %for.cond.cleanup4 br i1 %cmp46356, label %for.body49.lr.ph, label %for.inc84 for.body49.lr.ph: ; preds = %for.cond45.preheader %conv60 = trunc i32 %i.0371 to i16 %tobool50.not.peel = icmp eq i8 %haveCoin.0368, 0 br i1 %tobool50.not.peel, label %if.end71.peel, label %if.then51.peel if.then51.peel: ; preds = %for.body49.lr.ph %mul52.peel = shl nsw i32 %pos.0367, 2 %idxprom54.peel = sext i32 %mul52.peel to i64 %arrayidx55.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom54.peel store i16 %old_y.0369, ptr %arrayidx55.peel, align 8, !tbaa !17 %add57.peel = or i32 %mul52.peel, 1 %idxprom58.peel = sext i32 %add57.peel to i64 %arrayidx59.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom58.peel store i16 %old_x.0370, ptr %arrayidx59.peel, align 2, !tbaa !17 %add62.peel = or i32 %mul52.peel, 2 %idxprom63.peel = sext i32 %add62.peel to i64 %arrayidx64.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom63.peel store i16 %conv60, ptr %arrayidx64.peel, align 4, !tbaa !17 %add67.peel = or i32 %mul52.peel, 3 %idxprom68.peel = sext i32 %add67.peel to i64 %arrayidx69.peel = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom68.peel store i16 %conv65.peel, ptr %arrayidx69.peel, align 2, !tbaa !17 %inc70.peel = add nsw i32 %pos.0367, 1 br label %if.end71.peel if.end71.peel: ; preds = %for.body49.lr.ph, %if.then51.peel %conv80.peel.pre-phi = phi i16 [ %conv65.peel, %if.then51.peel ], [ %.pre405, %for.body49.lr.ph ] %pos.4.peel = phi i32 [ %inc70.peel, %if.then51.peel ], [ %pos.0367, %for.body49.lr.ph ] %13 = load i8, ptr %arrayidx73.peel, align 1, !tbaa !16 %14 = and i8 %13, 1 %xor77160.peel = xor i8 %14, %haveCoin.0368 br i1 %cmp46.peel, label %for.body49, label %for.inc84 for.body5: ; preds = %for.cond2.preheader, %getchar_unlocked.exit190 %.pre396401 = phi ptr [ %.pre396402, %getchar_unlocked.exit190 ], [ %.pre396, %for.cond2.preheader ] %15 = phi ptr [ %22, %getchar_unlocked.exit190 ], [ %.pre396, %for.cond2.preheader ] %indvars.iv = phi i64 [ %indvars.iv.next, %getchar_unlocked.exit190 ], [ 1, %for.cond2.preheader ] %_IO_read_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %15, i64 0, i32 1 %16 = load ptr, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %_IO_read_end.i = getelementptr inbounds %struct._IO_FILE, ptr %15, i64 0, i32 2 %17 = load ptr, ptr %_IO_read_end.i, align 8, !tbaa !14 %cmp.not.i = icmp ult ptr %16, %17 br i1 %cmp.not.i, label %cond.false.i, label %cond.true.i, !prof !15 cond.true.i: ; preds = %for.body5 %call.i = tail call i32 @__uflow(ptr noundef nonnull %15) #4 %.pre397 = load ptr, ptr @stdin, align 8, !tbaa !5 %_IO_read_ptr.i181.phi.trans.insert = getelementptr inbounds %struct._IO_FILE, ptr %.pre397, i64 0, i32 1 %.pre403 = load ptr, ptr %_IO_read_ptr.i181.phi.trans.insert, align 8, !tbaa !9 %_IO_read_end.i182.phi.trans.insert = getelementptr inbounds %struct._IO_FILE, ptr %.pre397, i64 0, i32 2 %.pre404 = load ptr, ptr %_IO_read_end.i182.phi.trans.insert, align 8, !tbaa !14 br label %getchar_unlocked.exit cond.false.i: ; preds = %for.body5 %incdec.ptr.i = getelementptr inbounds i8, ptr %16, i64 1 store ptr %incdec.ptr.i, ptr %_IO_read_ptr.i, align 8, !tbaa !9 %18 = load i8, ptr %16, align 1, !tbaa !16 %conv3.i = zext i8 %18 to i32 br label %getchar_unlocked.exit getchar_unlocked.exit: ; preds = %cond.true.i, %cond.false.i %19 = phi ptr [ %.pre404, %cond.true.i ], [ %17, %cond.false.i ] %20 = phi ptr [ %.pre403, %cond.true.i ], [ %incdec.ptr.i, %cond.false.i ] %.pre396400 = phi ptr [ %.pre397, %cond.true.i ], [ %.pre396401, %cond.false.i ] %21 = phi ptr [ %.pre397, %cond.true.i ], [ %15, %cond.false.i ] %cond.i = phi i32 [ %call.i, %cond.true.i ], [ %conv3.i, %cond.false.i ] %cmp.not.i183 = icmp ult ptr %20, %19 br i1 %cmp.not.i183, label %cond.false.i187, label %cond.true.i184, !prof !15 cond.true.i184: ; preds = %getchar_unlocked.exit %call.i185 = tail call i32 @__uflow(ptr noundef nonnull %21) #4 %.pre = load ptr, ptr @stdin, align 8, !tbaa !5 br label %getchar_unlocked.exit190 cond.false.i187: ; preds = %getchar_unlocked.exit %_IO_read_ptr.i181 = getelementptr inbounds %struct._IO_FILE, ptr %21, i64 0, i32 1 %incdec.ptr.i188 = getelementptr inbounds i8, ptr %20, i64 1 store ptr %incdec.ptr.i188, ptr %_IO_read_ptr.i181, align 8, !tbaa !9 br label %getchar_unlocked.exit190 getchar_unlocked.exit190: ; preds = %cond.true.i184, %cond.false.i187 %.pre396402 = phi ptr [ %.pre, %cond.true.i184 ], [ %.pre396400, %cond.false.i187 ] %22 = phi ptr [ %.pre, %cond.true.i184 ], [ %21, %cond.false.i187 ] %23 = trunc i32 %cond.i to i8 %conv = add i8 %23, -48 %arrayidx = getelementptr inbounds [501 x i8], ptr @a, i64 0, i64 %indvars.iv store i8 %conv, ptr %arrayidx, align 1, !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.cond.cleanup4, label %for.body5, !llvm.loop !18 for.body15: ; preds = %if.end.peel, %if.end %indvars.iv378 = phi i64 [ %indvars.iv.next379, %if.end ], [ 2, %if.end.peel ] %old_x.1351 = phi i16 [ %conv40.pre-phi, %if.end ], [ 1, %if.end.peel ] %haveCoin.1349 = phi i8 [ %xor161, %if.end ], [ %xor161.peel, %if.end.peel ] %pos.1348 = phi i32 [ %pos.2, %if.end ], [ %pos.2.peel, %if.end.peel ] %tobool.not = icmp eq i8 %haveCoin.1349, 0 br i1 %tobool.not, label %for.body15.if.end_crit_edge, label %if.then16 for.body15.if.end_crit_edge: ; preds = %for.body15 %.pre410 = trunc i64 %indvars.iv378 to i16 br label %if.end if.then16: ; preds = %for.body15 %mul = shl nsw i32 %pos.1348, 2 %idxprom17 = sext i32 %mul to i64 %arrayidx18 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom17 store i16 %conv23, ptr %arrayidx18, align 8, !tbaa !17 %add20 = or i32 %mul, 1 %idxprom21 = sext i32 %add20 to i64 %arrayidx22 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom21 store i16 %old_x.1351, ptr %arrayidx22, align 2, !tbaa !17 %add25 = or i32 %mul, 2 %idxprom26 = sext i32 %add25 to i64 %arrayidx27 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom26 store i16 %conv23, ptr %arrayidx27, align 4, !tbaa !17 %conv28 = trunc i64 %indvars.iv378 to i16 %add30 = or i32 %mul, 3 %idxprom31 = sext i32 %add30 to i64 %arrayidx32 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom31 store i16 %conv28, ptr %arrayidx32, align 2, !tbaa !17 %inc33 = add nsw i32 %pos.1348, 1 br label %if.end if.end: ; preds = %for.body15.if.end_crit_edge, %if.then16 %conv40.pre-phi = phi i16 [ %.pre410, %for.body15.if.end_crit_edge ], [ %conv28, %if.then16 ] %pos.2 = phi i32 [ %pos.1348, %for.body15.if.end_crit_edge ], [ %inc33, %if.then16 ] %arrayidx35 = getelementptr inbounds [501 x i8], ptr @a, i64 0, i64 %indvars.iv378 %24 = load i8, ptr %arrayidx35, align 1, !tbaa !16 %25 = and i8 %24, 1 %xor161 = xor i8 %25, %haveCoin.1349 %indvars.iv.next379 = add nuw nsw i64 %indvars.iv378, 1 %exitcond381.not = icmp eq i64 %indvars.iv.next379, %wide.trip.count380 br i1 %exitcond381.not, label %for.inc84, label %for.body15, !llvm.loop !20 for.body49: ; preds = %if.end71.peel, %if.end71 %indvars.iv383.in = phi i64 [ %indvars.iv383, %if.end71 ], [ %10, %if.end71.peel ] %old_x.2360 = phi i16 [ %conv80.pre-phi, %if.end71 ], [ %conv80.peel.pre-phi, %if.end71.peel ] %haveCoin.2358 = phi i8 [ %xor77160, %if.end71 ], [ %xor77160.peel, %if.end71.peel ] %pos.3357 = phi i32 [ %pos.4, %if.end71 ], [ %pos.4.peel, %if.end71.peel ] %indvars.iv383 = add nsw i64 %indvars.iv383.in, -1 %tobool50.not = icmp eq i8 %haveCoin.2358, 0 br i1 %tobool50.not, label %for.body49.if.end71_crit_edge, label %if.then51 for.body49.if.end71_crit_edge: ; preds = %for.body49 %.pre407 = trunc i64 %indvars.iv383 to i16 br label %if.end71 if.then51: ; preds = %for.body49 %mul52 = shl nsw i32 %pos.3357, 2 %idxprom54 = sext i32 %mul52 to i64 %arrayidx55 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom54 store i16 %conv60, ptr %arrayidx55, align 8, !tbaa !17 %add57 = or i32 %mul52, 1 %idxprom58 = sext i32 %add57 to i64 %arrayidx59 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom58 store i16 %old_x.2360, ptr %arrayidx59, align 2, !tbaa !17 %add62 = or i32 %mul52, 2 %idxprom63 = sext i32 %add62 to i64 %arrayidx64 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom63 store i16 %conv60, ptr %arrayidx64, align 4, !tbaa !17 %conv65 = trunc i64 %indvars.iv383 to i16 %add67 = or i32 %mul52, 3 %idxprom68 = sext i32 %add67 to i64 %arrayidx69 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %idxprom68 store i16 %conv65, ptr %arrayidx69, align 2, !tbaa !17 %inc70 = add nsw i32 %pos.3357, 1 br label %if.end71 if.end71: ; preds = %for.body49.if.end71_crit_edge, %if.then51 %conv80.pre-phi = phi i16 [ %.pre407, %for.body49.if.end71_crit_edge ], [ %conv65, %if.then51 ] %pos.4 = phi i32 [ %pos.3357, %for.body49.if.end71_crit_edge ], [ %inc70, %if.then51 ] %arrayidx73 = getelementptr inbounds [501 x i8], ptr @a, i64 0, i64 %indvars.iv383 %26 = load i8, ptr %arrayidx73, align 1, !tbaa !16 %27 = and i8 %26, 1 %xor77160 = xor i8 %27, %haveCoin.2358 %cmp46 = icmp sgt i64 %indvars.iv383.in, 2 br i1 %cmp46, label %for.body49, label %for.inc84, !llvm.loop !22 for.inc84: ; preds = %if.end, %if.end71, %for.cond2.preheader, %if.end.peel, %if.end71.peel, %for.cond11.preheader, %for.cond45.preheader %.pre396399417 = phi ptr [ %.pre396402, %for.cond45.preheader ], [ %.pre396402, %for.cond11.preheader ], [ %.pre396402, %if.end71.peel ], [ %.pre396402, %if.end.peel ], [ %.pre396, %for.cond2.preheader ], [ %.pre396402, %if.end71 ], [ %.pre396402, %if.end ] %pos.5 = phi i32 [ %pos.0367, %for.cond45.preheader ], [ %pos.0367, %for.cond11.preheader ], [ %pos.4.peel, %if.end71.peel ], [ %pos.2.peel, %if.end.peel ], [ %pos.0367, %for.cond2.preheader ], [ %pos.4, %if.end71 ], [ %pos.2, %if.end ] %haveCoin.3 = phi i8 [ %haveCoin.0368, %for.cond45.preheader ], [ %haveCoin.0368, %for.cond11.preheader ], [ %xor77160.peel, %if.end71.peel ], [ %xor161.peel, %if.end.peel ], [ %haveCoin.0368, %for.cond2.preheader ], [ %xor77160, %if.end71 ], [ %xor161, %if.end ] %old_y.3 = phi i16 [ %old_y.0369, %for.cond45.preheader ], [ %old_y.0369, %for.cond11.preheader ], [ %conv60, %if.end71.peel ], [ %conv23, %if.end.peel ], [ %old_y.0369, %for.cond2.preheader ], [ %conv60, %if.end71 ], [ %conv23, %if.end ] %old_x.3 = phi i16 [ %old_x.0370, %for.cond45.preheader ], [ %old_x.0370, %for.cond11.preheader ], [ 1, %if.end71.peel ], [ 1, %if.end.peel ], [ %old_x.0370, %for.cond2.preheader ], [ 1, %if.end71 ], [ %conv40.pre-phi, %if.end ] %inc85 = add nuw i32 %i.0371, 1 %exitcond386.not = icmp eq i32 %i.0371, %x.0.i br i1 %exitcond386.not, label %for.cond.cleanup, label %for.cond2.preheader, !llvm.loop !23 for.cond.cleanup92: ; preds = %putchar_unlocked.exit343, %for.cond.cleanup.thread, %for.cond.cleanup ret i32 0 for.body93: ; preds = %for.body93.preheader, %putchar_unlocked.exit343 %indvars.iv387 = phi i64 [ 0, %for.body93.preheader ], [ %indvars.iv.next388, %putchar_unlocked.exit343 ] %28 = shl nsw i64 %indvars.iv387, 2 %arrayidx97 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %28 %29 = load i16, ptr %arrayidx97, align 8, !tbaa !17 call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %str.i) #4 %cmp.i191 = icmp eq i16 %29, 0 br i1 %cmp.i191, label %if.then.i, label %do.body.i.preheader do.body.i.preheader: ; preds = %for.body93 %conv98 = zext i16 %29 to i32 br label %do.body.i if.then.i: ; preds = %for.body93 %30 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i = getelementptr inbounds %struct._IO_FILE, ptr %30, i64 0, i32 5 %31 = load ptr, ptr %_IO_write_ptr.i.i, align 8, !tbaa !24 %_IO_write_end.i.i = getelementptr inbounds %struct._IO_FILE, ptr %30, i64 0, i32 6 %32 = load ptr, ptr %_IO_write_end.i.i, align 8, !tbaa !25 %cmp.not.i.i192 = icmp ult ptr %31, %32 br i1 %cmp.not.i.i192, label %cond.false.i.i195, label %cond.true.i.i193, !prof !15 cond.true.i.i193: ; preds = %if.then.i %call.i.i194 = tail call i32 @__overflow(ptr noundef nonnull %30, i32 noundef 48) #4 br label %pl.exit cond.false.i.i195: ; preds = %if.then.i %incdec.ptr.i.i196 = getelementptr inbounds i8, ptr %31, i64 1 store ptr %incdec.ptr.i.i196, ptr %_IO_write_ptr.i.i, align 8, !tbaa !24 store i8 48, ptr %31, align 1, !tbaa !16 br label %pl.exit do.body.i: ; preds = %do.body.i.preheader, %do.body.i %indvars.iv29.i = phi i64 [ %indvars.iv.next30.i, %do.body.i ], [ 8, %do.body.i.preheader ] %indvars.iv.i = phi i64 [ %indvars.iv.next.i, %do.body.i ], [ 9, %do.body.i.preheader ] %s.addr.0.i = phi i32 [ %div.i, %do.body.i ], [ %conv98, %do.body.i.preheader ] %indvars.iv.next.i = add nsw i64 %indvars.iv.i, -1 %rem.i = urem i32 %s.addr.0.i, 10 %33 = trunc i32 %rem.i to i8 %conv.i = or i8 %33, 48 %arrayidx.i = getelementptr inbounds [9 x i8], ptr %str.i, i64 0, i64 %indvars.iv.next.i store i8 %conv.i, ptr %arrayidx.i, align 1, !tbaa !16 %div.i = udiv i32 %s.addr.0.i, 10 %cmp1.not.i = icmp ult i32 %s.addr.0.i, 10 %indvars.iv.next30.i = add i64 %indvars.iv29.i, -1 br i1 %cmp1.not.i, label %for.cond.preheader.i, label %do.body.i, !llvm.loop !26 for.cond.preheader.i: ; preds = %do.body.i %34 = trunc i64 %indvars.iv.i to i32 %cmp326.i = icmp slt i32 %34, 10 br i1 %cmp326.i, label %for.body.i, label %pl.exit for.body.i: ; preds = %for.cond.preheader.i, %putchar_unlocked.exit25.i %indvars.iv31.i = phi i64 [ %indvars.iv.next32.i, %putchar_unlocked.exit25.i ], [ %indvars.iv29.i, %for.cond.preheader.i ] %arrayidx6.i = getelementptr inbounds [9 x i8], ptr %str.i, i64 0, i64 %indvars.iv31.i %35 = load i8, ptr %arrayidx6.i, align 1, !tbaa !16 %36 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i17.i = getelementptr inbounds %struct._IO_FILE, ptr %36, i64 0, i32 5 %37 = load ptr, ptr %_IO_write_ptr.i17.i, align 8, !tbaa !24 %_IO_write_end.i18.i = getelementptr inbounds %struct._IO_FILE, ptr %36, i64 0, i32 6 %38 = load ptr, ptr %_IO_write_end.i18.i, align 8, !tbaa !25 %cmp.not.i19.i = icmp ult ptr %37, %38 br i1 %cmp.not.i19.i, label %cond.false.i23.i, label %cond.true.i20.i, !prof !15 cond.true.i20.i: ; preds = %for.body.i %conv7.i = zext i8 %35 to i32 %call.i21.i = tail call i32 @__overflow(ptr noundef nonnull %36, i32 noundef %conv7.i) #4 br label %putchar_unlocked.exit25.i cond.false.i23.i: ; preds = %for.body.i %incdec.ptr.i24.i = getelementptr inbounds i8, ptr %37, i64 1 store ptr %incdec.ptr.i24.i, ptr %_IO_write_ptr.i17.i, align 8, !tbaa !24 store i8 %35, ptr %37, align 1, !tbaa !16 br label %putchar_unlocked.exit25.i putchar_unlocked.exit25.i: ; preds = %cond.false.i23.i, %cond.true.i20.i %indvars.iv.next32.i = add nsw i64 %indvars.iv31.i, 1 %39 = and i64 %indvars.iv.next32.i, 4294967295 %exitcond.not.i = icmp eq i64 %39, 9 br i1 %exitcond.not.i, label %pl.exit, label %for.body.i, !llvm.loop !27 pl.exit: ; preds = %putchar_unlocked.exit25.i, %cond.true.i.i193, %cond.false.i.i195, %for.cond.preheader.i call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %str.i) #4 %40 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i = getelementptr inbounds %struct._IO_FILE, ptr %40, i64 0, i32 5 %41 = load ptr, ptr %_IO_write_ptr.i, align 8, !tbaa !24 %_IO_write_end.i = getelementptr inbounds %struct._IO_FILE, ptr %40, i64 0, i32 6 %42 = load ptr, ptr %_IO_write_end.i, align 8, !tbaa !25 %cmp.not.i197 = icmp ult ptr %41, %42 br i1 %cmp.not.i197, label %cond.false.i201, label %cond.true.i198, !prof !15 cond.true.i198: ; preds = %pl.exit %call.i199 = tail call i32 @__overflow(ptr noundef nonnull %40, i32 noundef 32) #4 br label %putchar_unlocked.exit cond.false.i201: ; preds = %pl.exit %incdec.ptr.i202 = getelementptr inbounds i8, ptr %41, i64 1 store ptr %incdec.ptr.i202, ptr %_IO_write_ptr.i, align 8, !tbaa !24 store i8 32, ptr %41, align 1, !tbaa !16 br label %putchar_unlocked.exit putchar_unlocked.exit: ; preds = %cond.true.i198, %cond.false.i201 %43 = or i64 %28, 1 %arrayidx103 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %43 %44 = load i16, ptr %arrayidx103, align 2, !tbaa !17 call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %str.i203) #4 %cmp.i204 = icmp eq i16 %44, 0 br i1 %cmp.i204, label %if.then.i232, label %do.body.i205.preheader do.body.i205.preheader: ; preds = %putchar_unlocked.exit %conv104 = zext i16 %44 to i32 br label %do.body.i205 if.then.i232: ; preds = %putchar_unlocked.exit %45 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i233 = getelementptr inbounds %struct._IO_FILE, ptr %45, i64 0, i32 5 %46 = load ptr, ptr %_IO_write_ptr.i.i233, align 8, !tbaa !24 %_IO_write_end.i.i234 = getelementptr inbounds %struct._IO_FILE, ptr %45, i64 0, i32 6 %47 = load ptr, ptr %_IO_write_end.i.i234, align 8, !tbaa !25 %cmp.not.i.i235 = icmp ult ptr %46, %47 br i1 %cmp.not.i.i235, label %cond.false.i.i238, label %cond.true.i.i236, !prof !15 cond.true.i.i236: ; preds = %if.then.i232 %call.i.i237 = tail call i32 @__overflow(ptr noundef nonnull %45, i32 noundef 48) #4 br label %pl.exit240 cond.false.i.i238: ; preds = %if.then.i232 %incdec.ptr.i.i239 = getelementptr inbounds i8, ptr %46, i64 1 store ptr %incdec.ptr.i.i239, ptr %_IO_write_ptr.i.i233, align 8, !tbaa !24 store i8 48, ptr %46, align 1, !tbaa !16 br label %pl.exit240 do.body.i205: ; preds = %do.body.i205.preheader, %do.body.i205 %indvars.iv29.i206 = phi i64 [ %indvars.iv.next30.i215, %do.body.i205 ], [ 8, %do.body.i205.preheader ] %indvars.iv.i207 = phi i64 [ %indvars.iv.next.i209, %do.body.i205 ], [ 9, %do.body.i205.preheader ] %s.addr.0.i208 = phi i32 [ %div.i213, %do.body.i205 ], [ %conv104, %do.body.i205.preheader ] %indvars.iv.next.i209 = add nsw i64 %indvars.iv.i207, -1 %rem.i210 = urem i32 %s.addr.0.i208, 10 %48 = trunc i32 %rem.i210 to i8 %conv.i211 = or i8 %48, 48 %arrayidx.i212 = getelementptr inbounds [9 x i8], ptr %str.i203, i64 0, i64 %indvars.iv.next.i209 store i8 %conv.i211, ptr %arrayidx.i212, align 1, !tbaa !16 %div.i213 = udiv i32 %s.addr.0.i208, 10 %cmp1.not.i214 = icmp ult i32 %s.addr.0.i208, 10 %indvars.iv.next30.i215 = add i64 %indvars.iv29.i206, -1 br i1 %cmp1.not.i214, label %for.cond.preheader.i216, label %do.body.i205, !llvm.loop !26 for.cond.preheader.i216: ; preds = %do.body.i205 %49 = trunc i64 %indvars.iv.i207 to i32 %cmp326.i217 = icmp slt i32 %49, 10 br i1 %cmp326.i217, label %for.body.i218, label %pl.exit240 for.body.i218: ; preds = %for.cond.preheader.i216, %putchar_unlocked.exit25.i227 %indvars.iv31.i219 = phi i64 [ %indvars.iv.next32.i228, %putchar_unlocked.exit25.i227 ], [ %indvars.iv29.i206, %for.cond.preheader.i216 ] %arrayidx6.i220 = getelementptr inbounds [9 x i8], ptr %str.i203, i64 0, i64 %indvars.iv31.i219 %50 = load i8, ptr %arrayidx6.i220, align 1, !tbaa !16 %51 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i17.i221 = getelementptr inbounds %struct._IO_FILE, ptr %51, i64 0, i32 5 %52 = load ptr, ptr %_IO_write_ptr.i17.i221, align 8, !tbaa !24 %_IO_write_end.i18.i222 = getelementptr inbounds %struct._IO_FILE, ptr %51, i64 0, i32 6 %53 = load ptr, ptr %_IO_write_end.i18.i222, align 8, !tbaa !25 %cmp.not.i19.i223 = icmp ult ptr %52, %53 br i1 %cmp.not.i19.i223, label %cond.false.i23.i230, label %cond.true.i20.i224, !prof !15 cond.true.i20.i224: ; preds = %for.body.i218 %conv7.i225 = zext i8 %50 to i32 %call.i21.i226 = tail call i32 @__overflow(ptr noundef nonnull %51, i32 noundef %conv7.i225) #4 br label %putchar_unlocked.exit25.i227 cond.false.i23.i230: ; preds = %for.body.i218 %incdec.ptr.i24.i231 = getelementptr inbounds i8, ptr %52, i64 1 store ptr %incdec.ptr.i24.i231, ptr %_IO_write_ptr.i17.i221, align 8, !tbaa !24 store i8 %50, ptr %52, align 1, !tbaa !16 br label %putchar_unlocked.exit25.i227 putchar_unlocked.exit25.i227: ; preds = %cond.false.i23.i230, %cond.true.i20.i224 %indvars.iv.next32.i228 = add nsw i64 %indvars.iv31.i219, 1 %54 = and i64 %indvars.iv.next32.i228, 4294967295 %exitcond.not.i229 = icmp eq i64 %54, 9 br i1 %exitcond.not.i229, label %pl.exit240, label %for.body.i218, !llvm.loop !27 pl.exit240: ; preds = %putchar_unlocked.exit25.i227, %cond.true.i.i236, %cond.false.i.i238, %for.cond.preheader.i216 call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %str.i203) #4 %55 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i241 = getelementptr inbounds %struct._IO_FILE, ptr %55, i64 0, i32 5 %56 = load ptr, ptr %_IO_write_ptr.i241, align 8, !tbaa !24 %_IO_write_end.i242 = getelementptr inbounds %struct._IO_FILE, ptr %55, i64 0, i32 6 %57 = load ptr, ptr %_IO_write_end.i242, align 8, !tbaa !25 %cmp.not.i243 = icmp ult ptr %56, %57 br i1 %cmp.not.i243, label %cond.false.i247, label %cond.true.i244, !prof !15 cond.true.i244: ; preds = %pl.exit240 %call.i245 = tail call i32 @__overflow(ptr noundef nonnull %55, i32 noundef 32) #4 br label %putchar_unlocked.exit249 cond.false.i247: ; preds = %pl.exit240 %incdec.ptr.i248 = getelementptr inbounds i8, ptr %56, i64 1 store ptr %incdec.ptr.i248, ptr %_IO_write_ptr.i241, align 8, !tbaa !24 store i8 32, ptr %56, align 1, !tbaa !16 br label %putchar_unlocked.exit249 putchar_unlocked.exit249: ; preds = %cond.true.i244, %cond.false.i247 %58 = or i64 %28, 2 %arrayidx109 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %58 %59 = load i16, ptr %arrayidx109, align 4, !tbaa !17 call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %str.i250) #4 %cmp.i251 = icmp eq i16 %59, 0 br i1 %cmp.i251, label %if.then.i279, label %do.body.i252.preheader do.body.i252.preheader: ; preds = %putchar_unlocked.exit249 %conv110 = zext i16 %59 to i32 br label %do.body.i252 if.then.i279: ; preds = %putchar_unlocked.exit249 %60 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i280 = getelementptr inbounds %struct._IO_FILE, ptr %60, i64 0, i32 5 %61 = load ptr, ptr %_IO_write_ptr.i.i280, align 8, !tbaa !24 %_IO_write_end.i.i281 = getelementptr inbounds %struct._IO_FILE, ptr %60, i64 0, i32 6 %62 = load ptr, ptr %_IO_write_end.i.i281, align 8, !tbaa !25 %cmp.not.i.i282 = icmp ult ptr %61, %62 br i1 %cmp.not.i.i282, label %cond.false.i.i285, label %cond.true.i.i283, !prof !15 cond.true.i.i283: ; preds = %if.then.i279 %call.i.i284 = tail call i32 @__overflow(ptr noundef nonnull %60, i32 noundef 48) #4 br label %pl.exit287 cond.false.i.i285: ; preds = %if.then.i279 %incdec.ptr.i.i286 = getelementptr inbounds i8, ptr %61, i64 1 store ptr %incdec.ptr.i.i286, ptr %_IO_write_ptr.i.i280, align 8, !tbaa !24 store i8 48, ptr %61, align 1, !tbaa !16 br label %pl.exit287 do.body.i252: ; preds = %do.body.i252.preheader, %do.body.i252 %indvars.iv29.i253 = phi i64 [ %indvars.iv.next30.i262, %do.body.i252 ], [ 8, %do.body.i252.preheader ] %indvars.iv.i254 = phi i64 [ %indvars.iv.next.i256, %do.body.i252 ], [ 9, %do.body.i252.preheader ] %s.addr.0.i255 = phi i32 [ %div.i260, %do.body.i252 ], [ %conv110, %do.body.i252.preheader ] %indvars.iv.next.i256 = add nsw i64 %indvars.iv.i254, -1 %rem.i257 = urem i32 %s.addr.0.i255, 10 %63 = trunc i32 %rem.i257 to i8 %conv.i258 = or i8 %63, 48 %arrayidx.i259 = getelementptr inbounds [9 x i8], ptr %str.i250, i64 0, i64 %indvars.iv.next.i256 store i8 %conv.i258, ptr %arrayidx.i259, align 1, !tbaa !16 %div.i260 = udiv i32 %s.addr.0.i255, 10 %cmp1.not.i261 = icmp ult i32 %s.addr.0.i255, 10 %indvars.iv.next30.i262 = add i64 %indvars.iv29.i253, -1 br i1 %cmp1.not.i261, label %for.cond.preheader.i263, label %do.body.i252, !llvm.loop !26 for.cond.preheader.i263: ; preds = %do.body.i252 %64 = trunc i64 %indvars.iv.i254 to i32 %cmp326.i264 = icmp slt i32 %64, 10 br i1 %cmp326.i264, label %for.body.i265, label %pl.exit287 for.body.i265: ; preds = %for.cond.preheader.i263, %putchar_unlocked.exit25.i274 %indvars.iv31.i266 = phi i64 [ %indvars.iv.next32.i275, %putchar_unlocked.exit25.i274 ], [ %indvars.iv29.i253, %for.cond.preheader.i263 ] %arrayidx6.i267 = getelementptr inbounds [9 x i8], ptr %str.i250, i64 0, i64 %indvars.iv31.i266 %65 = load i8, ptr %arrayidx6.i267, align 1, !tbaa !16 %66 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i17.i268 = getelementptr inbounds %struct._IO_FILE, ptr %66, i64 0, i32 5 %67 = load ptr, ptr %_IO_write_ptr.i17.i268, align 8, !tbaa !24 %_IO_write_end.i18.i269 = getelementptr inbounds %struct._IO_FILE, ptr %66, i64 0, i32 6 %68 = load ptr, ptr %_IO_write_end.i18.i269, align 8, !tbaa !25 %cmp.not.i19.i270 = icmp ult ptr %67, %68 br i1 %cmp.not.i19.i270, label %cond.false.i23.i277, label %cond.true.i20.i271, !prof !15 cond.true.i20.i271: ; preds = %for.body.i265 %conv7.i272 = zext i8 %65 to i32 %call.i21.i273 = tail call i32 @__overflow(ptr noundef nonnull %66, i32 noundef %conv7.i272) #4 br label %putchar_unlocked.exit25.i274 cond.false.i23.i277: ; preds = %for.body.i265 %incdec.ptr.i24.i278 = getelementptr inbounds i8, ptr %67, i64 1 store ptr %incdec.ptr.i24.i278, ptr %_IO_write_ptr.i17.i268, align 8, !tbaa !24 store i8 %65, ptr %67, align 1, !tbaa !16 br label %putchar_unlocked.exit25.i274 putchar_unlocked.exit25.i274: ; preds = %cond.false.i23.i277, %cond.true.i20.i271 %indvars.iv.next32.i275 = add nsw i64 %indvars.iv31.i266, 1 %69 = and i64 %indvars.iv.next32.i275, 4294967295 %exitcond.not.i276 = icmp eq i64 %69, 9 br i1 %exitcond.not.i276, label %pl.exit287, label %for.body.i265, !llvm.loop !27 pl.exit287: ; preds = %putchar_unlocked.exit25.i274, %cond.true.i.i283, %cond.false.i.i285, %for.cond.preheader.i263 call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %str.i250) #4 %70 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i288 = getelementptr inbounds %struct._IO_FILE, ptr %70, i64 0, i32 5 %71 = load ptr, ptr %_IO_write_ptr.i288, align 8, !tbaa !24 %_IO_write_end.i289 = getelementptr inbounds %struct._IO_FILE, ptr %70, i64 0, i32 6 %72 = load ptr, ptr %_IO_write_end.i289, align 8, !tbaa !25 %cmp.not.i290 = icmp ult ptr %71, %72 br i1 %cmp.not.i290, label %cond.false.i294, label %cond.true.i291, !prof !15 cond.true.i291: ; preds = %pl.exit287 %call.i292 = tail call i32 @__overflow(ptr noundef nonnull %70, i32 noundef 32) #4 br label %putchar_unlocked.exit296 cond.false.i294: ; preds = %pl.exit287 %incdec.ptr.i295 = getelementptr inbounds i8, ptr %71, i64 1 store ptr %incdec.ptr.i295, ptr %_IO_write_ptr.i288, align 8, !tbaa !24 store i8 32, ptr %71, align 1, !tbaa !16 br label %putchar_unlocked.exit296 putchar_unlocked.exit296: ; preds = %cond.true.i291, %cond.false.i294 %73 = or i64 %28, 3 %arrayidx115 = getelementptr inbounds [1000000 x i16], ptr @out, i64 0, i64 %73 %74 = load i16, ptr %arrayidx115, align 2, !tbaa !17 call void @llvm.lifetime.start.p0(i64 9, ptr nonnull %str.i297) #4 %cmp.i298 = icmp eq i16 %74, 0 br i1 %cmp.i298, label %if.then.i326, label %do.body.i299.preheader do.body.i299.preheader: ; preds = %putchar_unlocked.exit296 %conv116 = zext i16 %74 to i32 br label %do.body.i299 if.then.i326: ; preds = %putchar_unlocked.exit296 %75 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i.i327 = getelementptr inbounds %struct._IO_FILE, ptr %75, i64 0, i32 5 %76 = load ptr, ptr %_IO_write_ptr.i.i327, align 8, !tbaa !24 %_IO_write_end.i.i328 = getelementptr inbounds %struct._IO_FILE, ptr %75, i64 0, i32 6 %77 = load ptr, ptr %_IO_write_end.i.i328, align 8, !tbaa !25 %cmp.not.i.i329 = icmp ult ptr %76, %77 br i1 %cmp.not.i.i329, label %cond.false.i.i332, label %cond.true.i.i330, !prof !15 cond.true.i.i330: ; preds = %if.then.i326 %call.i.i331 = tail call i32 @__overflow(ptr noundef nonnull %75, i32 noundef 48) #4 br label %pl.exit334 cond.false.i.i332: ; preds = %if.then.i326 %incdec.ptr.i.i333 = getelementptr inbounds i8, ptr %76, i64 1 store ptr %incdec.ptr.i.i333, ptr %_IO_write_ptr.i.i327, align 8, !tbaa !24 store i8 48, ptr %76, align 1, !tbaa !16 br label %pl.exit334 do.body.i299: ; preds = %do.body.i299.preheader, %do.body.i299 %indvars.iv29.i300 = phi i64 [ %indvars.iv.next30.i309, %do.body.i299 ], [ 8, %do.body.i299.preheader ] %indvars.iv.i301 = phi i64 [ %indvars.iv.next.i303, %do.body.i299 ], [ 9, %do.body.i299.preheader ] %s.addr.0.i302 = phi i32 [ %div.i307, %do.body.i299 ], [ %conv116, %do.body.i299.preheader ] %indvars.iv.next.i303 = add nsw i64 %indvars.iv.i301, -1 %rem.i304 = urem i32 %s.addr.0.i302, 10 %78 = trunc i32 %rem.i304 to i8 %conv.i305 = or i8 %78, 48 %arrayidx.i306 = getelementptr inbounds [9 x i8], ptr %str.i297, i64 0, i64 %indvars.iv.next.i303 store i8 %conv.i305, ptr %arrayidx.i306, align 1, !tbaa !16 %div.i307 = udiv i32 %s.addr.0.i302, 10 %cmp1.not.i308 = icmp ult i32 %s.addr.0.i302, 10 %indvars.iv.next30.i309 = add i64 %indvars.iv29.i300, -1 br i1 %cmp1.not.i308, label %for.cond.preheader.i310, label %do.body.i299, !llvm.loop !26 for.cond.preheader.i310: ; preds = %do.body.i299 %79 = trunc i64 %indvars.iv.i301 to i32 %cmp326.i311 = icmp slt i32 %79, 10 br i1 %cmp326.i311, label %for.body.i312, label %pl.exit334 for.body.i312: ; preds = %for.cond.preheader.i310, %putchar_unlocked.exit25.i321 %indvars.iv31.i313 = phi i64 [ %indvars.iv.next32.i322, %putchar_unlocked.exit25.i321 ], [ %indvars.iv29.i300, %for.cond.preheader.i310 ] %arrayidx6.i314 = getelementptr inbounds [9 x i8], ptr %str.i297, i64 0, i64 %indvars.iv31.i313 %80 = load i8, ptr %arrayidx6.i314, align 1, !tbaa !16 %81 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i17.i315 = getelementptr inbounds %struct._IO_FILE, ptr %81, i64 0, i32 5 %82 = load ptr, ptr %_IO_write_ptr.i17.i315, align 8, !tbaa !24 %_IO_write_end.i18.i316 = getelementptr inbounds %struct._IO_FILE, ptr %81, i64 0, i32 6 %83 = load ptr, ptr %_IO_write_end.i18.i316, align 8, !tbaa !25 %cmp.not.i19.i317 = icmp ult ptr %82, %83 br i1 %cmp.not.i19.i317, label %cond.false.i23.i324, label %cond.true.i20.i318, !prof !15 cond.true.i20.i318: ; preds = %for.body.i312 %conv7.i319 = zext i8 %80 to i32 %call.i21.i320 = tail call i32 @__overflow(ptr noundef nonnull %81, i32 noundef %conv7.i319) #4 br label %putchar_unlocked.exit25.i321 cond.false.i23.i324: ; preds = %for.body.i312 %incdec.ptr.i24.i325 = getelementptr inbounds i8, ptr %82, i64 1 store ptr %incdec.ptr.i24.i325, ptr %_IO_write_ptr.i17.i315, align 8, !tbaa !24 store i8 %80, ptr %82, align 1, !tbaa !16 br label %putchar_unlocked.exit25.i321 putchar_unlocked.exit25.i321: ; preds = %cond.false.i23.i324, %cond.true.i20.i318 %indvars.iv.next32.i322 = add nsw i64 %indvars.iv31.i313, 1 %84 = and i64 %indvars.iv.next32.i322, 4294967295 %exitcond.not.i323 = icmp eq i64 %84, 9 br i1 %exitcond.not.i323, label %pl.exit334, label %for.body.i312, !llvm.loop !27 pl.exit334: ; preds = %putchar_unlocked.exit25.i321, %cond.true.i.i330, %cond.false.i.i332, %for.cond.preheader.i310 call void @llvm.lifetime.end.p0(i64 9, ptr nonnull %str.i297) #4 %85 = load ptr, ptr @stdout, align 8, !tbaa !5 %_IO_write_ptr.i335 = getelementptr inbounds %struct._IO_FILE, ptr %85, i64 0, i32 5 %86 = load ptr, ptr %_IO_write_ptr.i335, align 8, !tbaa !24 %_IO_write_end.i336 = getelementptr inbounds %struct._IO_FILE, ptr %85, i64 0, i32 6 %87 = load ptr, ptr %_IO_write_end.i336, align 8, !tbaa !25 %cmp.not.i337 = icmp ult ptr %86, %87 br i1 %cmp.not.i337, label %cond.false.i341, label %cond.true.i338, !prof !15 cond.true.i338: ; preds = %pl.exit334 %call.i339 = tail call i32 @__overflow(ptr noundef nonnull %85, i32 noundef 10) #4 br label %putchar_unlocked.exit343 cond.false.i341: ; preds = %pl.exit334 %incdec.ptr.i342 = getelementptr inbounds i8, ptr %86, i64 1 store ptr %incdec.ptr.i342, ptr %_IO_write_ptr.i335, align 8, !tbaa !24 store i8 10, ptr %86, align 1, !tbaa !16 br label %putchar_unlocked.exit343 putchar_unlocked.exit343: ; preds = %cond.true.i338, %cond.false.i341 %indvars.iv.next388 = add nuw nsw i64 %indvars.iv387, 1 %exitcond395.not = icmp eq i64 %indvars.iv.next388, %wide.trip.count394 br i1 %exitcond395.not, label %for.cond.cleanup92, label %for.body93, !llvm.loop !28 } ; 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 declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 declare i32 @__uflow(ptr noundef) local_unnamed_addr #3 declare i32 @__overflow(ptr noundef, i32 noundef) local_unnamed_addr #3 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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"any pointer", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !6, i64 8} !10 = !{!"_IO_FILE", !11, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !11, i64 112, !11, i64 116, !12, i64 120, !13, i64 128, !7, i64 130, !7, i64 131, !6, i64 136, !12, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !12, i64 184, !11, i64 192, !7, i64 196} !11 = !{!"int", !7, i64 0} !12 = !{!"long", !7, i64 0} !13 = !{!"short", !7, i64 0} !14 = !{!10, !6, i64 16} !15 = !{!"branch_weights", i32 2000, i32 1} !16 = !{!7, !7, i64 0} !17 = !{!13, !13, i64 0} !18 = distinct !{!18, !19} !19 = !{!"llvm.loop.mustprogress"} !20 = distinct !{!20, !19, !21} !21 = !{!"llvm.loop.peeled.count", i32 1} !22 = distinct !{!22, !19, !21} !23 = distinct !{!23, !19} !24 = !{!10, !6, i64 40} !25 = !{!10, !6, i64 48} !26 = distinct !{!26, !19} !27 = distinct !{!27, !19} !28 = distinct !{!28, !19}
#include<stdio.h> #include<string.h> #include<math.h> #include <stdlib.h> int cmp(const void* p, const void* q) { return *(int*)p - *(int*)q; } int main(void) { int n; int a[100000] = { 0 }; int bit[3][300] = { 0 }; int max = 0, mid = 1000000001, min = 0; int max_cnt = 0, mid_cnt = 0, min_cnt = 0; int temp; scanf("%d", &n); for (int i = 0; i < n; i++) scanf("%d", &a[i]); if (n % 3) { for (int i = 0; i < n; i++) { if (a[i]) { printf("No"); break; } if (i == n - 1) { printf("Yes"); } } } else { qsort(a, n, sizeof(int), cmp); min = a[0]; for (int i = 0; i < n; i++) { if (min == a[i])min_cnt++; else if (min < a[i] && a[i] < mid) { mid = a[i], mid_cnt++; } else if (mid == a[i])mid_cnt++; else if (mid < a[i]) { max = a[i]; max_cnt++; } else if (max == a[i])max_cnt++; } //printf("min=%d mid=%d max=%d\n", min, mid, max); //printf("min_cnt=%d mid_cnt=%d max_cnt=%d\n", min_cnt, mid_cnt, max_cnt); if (min == 0 && max == 0) { if (min_cnt == n || min_cnt *2 == mid_cnt) printf("Yes"); else printf("No"); } else { if (min_cnt == mid_cnt && mid_cnt == max_cnt) { temp = min; for (int j = 0; temp != 0; j++) { bit[0][j] = temp % 2; temp /= 2; } temp = mid; for (int j = 0; temp != 0; j++) { bit[1][j] = temp % 2; temp /= 2; } temp = max; for (int j = 0; temp != 0; j++) { bit[2][j] = temp % 2; temp /= 2; } for (int i = 0; i <= floor(log2(max)); i++) { temp = 0; for (int j = 0; j < 3; j++) { temp += bit[j][i]; } if (temp % 2) { printf("No"); break; } else if (i == floor(log2(max))) { printf("Yes"); } } } else printf("No"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200292/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200292/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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"No\00", align 1 @.str.2 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @cmp(ptr nocapture noundef readonly %p, ptr nocapture noundef readonly %q) #0 { entry: %0 = load i32, ptr %p, align 4, !tbaa !5 %1 = load i32, ptr %q, 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 %a = alloca [100000 x i32], align 16 %bit = alloca [3 x [300 x i32]], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #8 call void @llvm.lifetime.start.p0(i64 400000, ptr nonnull %a) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(400000) %a, i8 0, i64 400000, i1 false) call void @llvm.lifetime.start.p0(i64 3600, ptr nonnull %bit) #8 call void @llvm.memset.p0.i64(ptr noundef nonnull align 16 dereferenceable(3600) %bit, i8 0, i64 3600, 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 %cmp259 = icmp sgt i32 %0, 0 br i1 %cmp259, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %1 = phi i32 [ %0, %entry ], [ %2, %for.body ] %rem = srem i32 %1, 3 %tobool.not = icmp eq i32 %rem, 0 br i1 %tobool.not, label %if.else, label %for.cond3.preheader for.cond3.preheader: ; preds = %for.cond.cleanup %cmp4261 = icmp sgt i32 %1, 0 br i1 %cmp4261, label %for.body6, label %if.end187 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, 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.body6: ; preds = %for.cond3.preheader, %for.inc16 %4 = phi i32 [ %7, %for.inc16 ], [ %1, %for.cond3.preheader ] %indvars.iv293 = phi i64 [ %indvars.iv.next294, %for.inc16 ], [ 0, %for.cond3.preheader ] %arrayidx8 = getelementptr inbounds [100000 x i32], ptr %a, i64 0, i64 %indvars.iv293 %5 = load i32, ptr %arrayidx8, align 4, !tbaa !5 %tobool9.not = icmp eq i32 %5, 0 br i1 %tobool9.not, label %if.end, label %if.end187.sink.split if.end: ; preds = %for.body6 %sub = add nsw i32 %4, -1 %6 = zext i32 %sub to i64 %cmp12 = icmp eq i64 %indvars.iv293, %6 br i1 %cmp12, label %if.then13, label %for.inc16 if.then13: ; preds = %if.end %call14 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) %.pre = load i32, ptr %n, align 4, !tbaa !5 br label %for.inc16 for.inc16: ; preds = %if.end, %if.then13 %7 = phi i32 [ %4, %if.end ], [ %.pre, %if.then13 ] %indvars.iv.next294 = add nuw nsw i64 %indvars.iv293, 1 %8 = sext i32 %7 to i64 %cmp4 = icmp slt i64 %indvars.iv.next294, %8 br i1 %cmp4, label %for.body6, label %if.end187, !llvm.loop !11 if.else: ; preds = %for.cond.cleanup %conv = sext i32 %1 to i64 call void @qsort(ptr noundef nonnull %a, i64 noundef %conv, i64 noundef 4, ptr noundef nonnull @cmp) #8 %9 = load i32, ptr %a, align 16, !tbaa !5 %10 = load i32, ptr %n, align 4, !tbaa !5 %cmp22263 = icmp sgt i32 %10, 0 br i1 %cmp22263, label %for.body25.preheader, label %for.cond.cleanup24 for.body25.preheader: ; preds = %if.else %wide.trip.count = zext i32 %10 to i64 br label %for.body25 for.cond.cleanup24: ; preds = %for.inc73, %if.else %max.0.lcssa = phi i32 [ 0, %if.else ], [ %max.1, %for.inc73 ] %mid.0.lcssa = phi i32 [ 1000000001, %if.else ], [ %mid.1, %for.inc73 ] %max_cnt.0.lcssa = phi i32 [ 0, %if.else ], [ %max_cnt.1, %for.inc73 ] %mid_cnt.0.lcssa = phi i32 [ 0, %if.else ], [ %mid_cnt.1, %for.inc73 ] %min_cnt.0.lcssa = phi i32 [ 0, %if.else ], [ %min_cnt.1, %for.inc73 ] %cmp77 = icmp eq i32 %9, 0 %cmp80 = icmp eq i32 %max.0.lcssa, 0 %or.cond = select i1 %cmp77, i1 %cmp80, i1 false br i1 %or.cond, label %if.then82, label %if.else92 for.body25: ; preds = %for.body25.preheader, %for.inc73 %indvars.iv296 = phi i64 [ 0, %for.body25.preheader ], [ %indvars.iv.next297, %for.inc73 ] %min_cnt.0268 = phi i32 [ 0, %for.body25.preheader ], [ %min_cnt.1, %for.inc73 ] %mid_cnt.0267 = phi i32 [ 0, %for.body25.preheader ], [ %mid_cnt.1, %for.inc73 ] %max_cnt.0266 = phi i32 [ 0, %for.body25.preheader ], [ %max_cnt.1, %for.inc73 ] %mid.0265 = phi i32 [ 1000000001, %for.body25.preheader ], [ %mid.1, %for.inc73 ] %max.0264 = phi i32 [ 0, %for.body25.preheader ], [ %max.1, %for.inc73 ] %arrayidx27 = getelementptr inbounds [100000 x i32], ptr %a, i64 0, i64 %indvars.iv296 %11 = load i32, ptr %arrayidx27, align 4, !tbaa !5 %cmp28 = icmp eq i32 %9, %11 br i1 %cmp28, label %if.then30, label %if.else32 if.then30: ; preds = %for.body25 %inc31 = add nsw i32 %min_cnt.0268, 1 br label %for.inc73 if.else32: ; preds = %for.body25 %cmp35 = icmp slt i32 %9, %11 %cmp39 = icmp slt i32 %11, %mid.0265 %or.cond254 = select i1 %cmp35, i1 %cmp39, i1 false br i1 %or.cond254, label %if.then41, label %if.else45 if.then41: ; preds = %if.else32 %inc44 = add nsw i32 %mid_cnt.0267, 1 br label %for.inc73 if.else45: ; preds = %if.else32 %cmp48 = icmp eq i32 %mid.0265, %11 br i1 %cmp48, label %if.then50, label %if.else52 if.then50: ; preds = %if.else45 %inc51 = add nsw i32 %mid_cnt.0267, 1 br label %for.inc73 if.else52: ; preds = %if.else45 %cmp55 = icmp slt i32 %mid.0265, %11 br i1 %cmp55, label %if.then57, label %if.else61 if.then57: ; preds = %if.else52 %inc60 = add nsw i32 %max_cnt.0266, 1 br label %for.inc73 if.else61: ; preds = %if.else52 %cmp64 = icmp eq i32 %max.0264, %11 %inc67 = zext i1 %cmp64 to i32 %spec.select = add nsw i32 %max_cnt.0266, %inc67 br label %for.inc73 for.inc73: ; preds = %if.else61, %if.then30, %if.then50, %if.then57, %if.then41 %max.1 = phi i32 [ %max.0264, %if.then30 ], [ %max.0264, %if.then41 ], [ %max.0264, %if.then50 ], [ %11, %if.then57 ], [ %max.0264, %if.else61 ] %mid.1 = phi i32 [ %mid.0265, %if.then30 ], [ %11, %if.then41 ], [ %mid.0265, %if.then50 ], [ %mid.0265, %if.then57 ], [ %mid.0265, %if.else61 ] %max_cnt.1 = phi i32 [ %max_cnt.0266, %if.then30 ], [ %max_cnt.0266, %if.then41 ], [ %max_cnt.0266, %if.then50 ], [ %inc60, %if.then57 ], [ %spec.select, %if.else61 ] %mid_cnt.1 = phi i32 [ %mid_cnt.0267, %if.then30 ], [ %inc44, %if.then41 ], [ %inc51, %if.then50 ], [ %mid_cnt.0267, %if.then57 ], [ %mid_cnt.0267, %if.else61 ] %min_cnt.1 = phi i32 [ %inc31, %if.then30 ], [ %min_cnt.0268, %if.then41 ], [ %min_cnt.0268, %if.then50 ], [ %min_cnt.0268, %if.then57 ], [ %min_cnt.0268, %if.else61 ] %indvars.iv.next297 = add nuw nsw i64 %indvars.iv296, 1 %exitcond.not = icmp eq i64 %indvars.iv.next297, %wide.trip.count br i1 %exitcond.not, label %for.cond.cleanup24, label %for.body25, !llvm.loop !12 if.then82: ; preds = %for.cond.cleanup24 %cmp83 = icmp eq i32 %min_cnt.0.lcssa, %10 %mul = shl nsw i32 %min_cnt.0.lcssa, 1 %cmp85 = icmp eq i32 %mul, %mid_cnt.0.lcssa %or.cond255 = select i1 %cmp83, i1 true, i1 %cmp85 %.str.2..str.1 = select i1 %or.cond255, ptr @.str.2, ptr @.str.1 br label %if.end187.sink.split if.else92: ; preds = %for.cond.cleanup24 %cmp93 = icmp eq i32 %min_cnt.0.lcssa, %mid_cnt.0.lcssa %cmp96 = icmp eq i32 %mid_cnt.0.lcssa, %max_cnt.0.lcssa %or.cond256 = select i1 %cmp93, i1 %cmp96, i1 false br i1 %or.cond256, label %for.cond99.preheader, label %if.end187.sink.split for.cond99.preheader: ; preds = %if.else92 br i1 %cmp77, label %for.cond113.preheader, label %for.body103 for.cond113.preheader: ; preds = %for.body103, %for.cond99.preheader %cmp114.not279 = icmp eq i32 %mid.0.lcssa, 0 br i1 %cmp114.not279, label %for.cond128.preheader, label %for.body117 for.body103: ; preds = %for.cond99.preheader, %for.body103 %indvars.iv299 = phi i64 [ %indvars.iv.next300, %for.body103 ], [ 0, %for.cond99.preheader ] %temp.0277 = phi i32 [ %div, %for.body103 ], [ %9, %for.cond99.preheader ] %rem104 = srem i32 %temp.0277, 2 %arrayidx107 = getelementptr inbounds [300 x i32], ptr %bit, i64 0, i64 %indvars.iv299 store i32 %rem104, ptr %arrayidx107, align 4, !tbaa !5 %div = sdiv i32 %temp.0277, 2 %indvars.iv.next300 = add nuw i64 %indvars.iv299, 1 %temp.0277.off = add i32 %temp.0277, 1 %cmp100.not = icmp ult i32 %temp.0277.off, 3 br i1 %cmp100.not, label %for.cond113.preheader, label %for.body103, !llvm.loop !13 for.cond128.preheader: ; preds = %for.body117, %for.cond113.preheader br i1 %cmp80, label %for.cond143.preheader, label %for.body132 for.body117: ; preds = %for.cond113.preheader, %for.body117 %indvars.iv302 = phi i64 [ %indvars.iv.next303, %for.body117 ], [ 0, %for.cond113.preheader ] %temp.1280 = phi i32 [ %div122, %for.body117 ], [ %mid.0.lcssa, %for.cond113.preheader ] %rem118 = srem i32 %temp.1280, 2 %arrayidx121 = getelementptr inbounds [3 x [300 x i32]], ptr %bit, i64 0, i64 1, i64 %indvars.iv302 store i32 %rem118, ptr %arrayidx121, align 4, !tbaa !5 %div122 = sdiv i32 %temp.1280, 2 %indvars.iv.next303 = add nuw i64 %indvars.iv302, 1 %temp.1280.off = add i32 %temp.1280, 1 %cmp114.not = icmp ult i32 %temp.1280.off, 3 br i1 %cmp114.not, label %for.cond128.preheader, label %for.body117, !llvm.loop !14 for.cond143.preheader: ; preds = %for.body132, %for.cond128.preheader %conv145 = sitofp i32 %max.0.lcssa to double %call146287 = call double @log2(double noundef %conv145) #8 %12 = call double @llvm.floor.f64(double %call146287) %cmp147288 = fcmp ult double %12, 0.000000e+00 br i1 %cmp147288, label %if.end187, label %for.cond152.preheader for.body132: ; preds = %for.cond128.preheader, %for.body132 %indvars.iv305 = phi i64 [ %indvars.iv.next306, %for.body132 ], [ 0, %for.cond128.preheader ] %temp.2283 = phi i32 [ %div137, %for.body132 ], [ %max.0.lcssa, %for.cond128.preheader ] %rem133 = srem i32 %temp.2283, 2 %arrayidx136 = getelementptr inbounds [3 x [300 x i32]], ptr %bit, i64 0, i64 2, i64 %indvars.iv305 store i32 %rem133, ptr %arrayidx136, align 4, !tbaa !5 %div137 = sdiv i32 %temp.2283, 2 %indvars.iv.next306 = add nuw i64 %indvars.iv305, 1 %temp.2283.off = add i32 %temp.2283, 1 %cmp129.not = icmp ult i32 %temp.2283.off, 3 br i1 %cmp129.not, label %for.cond143.preheader, label %for.body132, !llvm.loop !15 for.cond152.preheader: ; preds = %for.cond143.preheader, %for.inc179 %indvars.iv312 = phi i64 [ %indvars.iv.next313, %for.inc179 ], [ 0, %for.cond143.preheader ] %conv144290 = phi double [ %conv144, %for.inc179 ], [ 0.000000e+00, %for.cond143.preheader ] %arrayidx160 = getelementptr inbounds [3 x [300 x i32]], ptr %bit, i64 0, i64 0, i64 %indvars.iv312 %13 = load i32, ptr %arrayidx160, align 4, !tbaa !5 %arrayidx160.1 = getelementptr inbounds [3 x [300 x i32]], ptr %bit, i64 0, i64 1, i64 %indvars.iv312 %14 = load i32, ptr %arrayidx160.1, align 4, !tbaa !5 %add.1 = add nsw i32 %14, %13 %arrayidx160.2 = getelementptr inbounds [3 x [300 x i32]], ptr %bit, i64 0, i64 2, i64 %indvars.iv312 %15 = load i32, ptr %arrayidx160.2, align 4, !tbaa !5 %add.2 = add nsw i32 %15, %add.1 %16 = and i32 %add.2, 1 %tobool166.not = icmp eq i32 %16, 0 br i1 %tobool166.not, label %if.else169, label %if.end187.sink.split if.else169: ; preds = %for.cond152.preheader %call172 = call double @log2(double noundef %conv145) #8 %17 = call double @llvm.floor.f64(double %call172) %cmp173 = fcmp oeq double %17, %conv144290 br i1 %cmp173, label %if.then175, label %for.inc179 if.then175: ; preds = %if.else169 %call176 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2) br label %for.inc179 for.inc179: ; preds = %if.then175, %if.else169 %indvars.iv.next313 = add nuw i64 %indvars.iv312, 1 %18 = trunc i64 %indvars.iv.next313 to i32 %conv144 = sitofp i32 %18 to double %call146 = call double @log2(double noundef %conv145) #8 %19 = call double @llvm.floor.f64(double %call146) %cmp147 = fcmp ult double %19, %conv144 br i1 %cmp147, label %if.end187, label %for.cond152.preheader, !llvm.loop !16 if.end187.sink.split: ; preds = %for.body6, %for.cond152.preheader, %if.else92, %if.then82 %.str.1.sink = phi ptr [ %.str.2..str.1, %if.then82 ], [ @.str.1, %if.else92 ], [ @.str.1, %for.cond152.preheader ], [ @.str.1, %for.body6 ] %call168 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) %.str.1.sink) br label %if.end187 if.end187: ; preds = %for.inc16, %for.inc179, %if.end187.sink.split, %for.cond3.preheader, %for.cond143.preheader call void @llvm.lifetime.end.p0(i64 3600, ptr nonnull %bit) #8 call void @llvm.lifetime.end.p0(i64 400000, ptr nonnull %a) #8 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #8 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write) declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #5 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @log2(double noundef) local_unnamed_addr #6 ; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) declare double @llvm.floor.f64(double) #7 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 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #6 = { 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 #7 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) } attributes #8 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = 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} !16 = distinct !{!16, !10}
#include <stdio.h> #include <stdlib.h> #define max(a, b) ((a) > (b) ? (a) : (b)) int asc(const void *a, const void *b){ if(*(int *)a > *(int *)b) return 1; if(*(int *)b > *(int *)a) return -1; return 0; } int main(int argc, char *argv[]) { long long n, a[100000]; scanf("%lld", &n); for(int i = 0; i < n; i++) scanf("%lld", &a[i]); qsort(a, n, sizeof(long long), asc); if(n % 3 == 0){ int flag[3] = {}; for(int i = 1; i <= 3; i++){ for(int j = (i - 1) * n / 3; j < i * n / 3; j++){ if(a[(i - 1) * n / 3] != a[j]){ flag[i - 1]++; break; } } } if(flag[0] == 0 && flag[1] == 0 && flag[2] == 0){ if((a[0] ^ a[n / 3]) == a[2 * n / 3] && (a[0] ^ a[2 * n / 3]) == a[n / 3] && (a[n / 3] ^ a[2 * n / 3]) == a[0]) printf("Yes\n"); else printf("No\n"); } else printf("No\n"); } else{ int flag = 0; for(int i = 0; i < n; i++){ if(a[i] != 0){ flag++; break; } } if(flag == 0) printf("Yes\n"); else printf("No\n"); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200335/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200335/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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.5 = private unnamed_addr constant [3 x i8] c"No\00", align 1 @str.6 = private unnamed_addr constant [4 x i8] c"Yes\00", align 1 ; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable define dso_local i32 @asc(ptr nocapture noundef readonly %a, ptr nocapture noundef readonly %b) #0 { entry: %0 = load i32, ptr %a, align 4, !tbaa !5 %1 = load i32, ptr %b, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, %1 %cmp1 = icmp sgt i32 %1, %0 %. = sext i1 %cmp1 to i32 %retval.0 = select i1 %cmp, i32 1, i32 %. ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main(i32 noundef %argc, ptr nocapture noundef readnone %argv) local_unnamed_addr #1 { entry: %n = alloca i64, align 8 %a = alloca [100000 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #6 call void @llvm.lifetime.start.p0(i64 800000, ptr nonnull %a) #6 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !9 %cmp140 = icmp sgt i64 %0, 0 br i1 %cmp140, label %for.body, label %for.cond.cleanup for.cond.cleanup: ; preds = %for.body, %entry %.lcssa = phi i64 [ %0, %entry ], [ %2, %for.body ] call void @qsort(ptr noundef nonnull %a, i64 noundef %.lcssa, i64 noundef 8, ptr noundef nonnull @asc) #6 %1 = load i64, ptr %n, align 8, !tbaa !9 %rem = srem i64 %1, 3 %div17 = sdiv i64 %1, 3 %cmp3 = icmp eq i64 %rem, 0 br i1 %cmp3, label %if.then, label %for.cond92.preheader for.cond92.preheader: ; preds = %for.cond.cleanup %cmp94.not143 = icmp sgt i64 %1, 0 br i1 %cmp94.not143, label %for.body97, label %if.end116 for.body: ; preds = %entry, %for.body %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %entry ] %arrayidx = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %indvars.iv %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %2 = load i64, ptr %n, align 8, !tbaa !9 %cmp = icmp sgt i64 %2, %indvars.iv.next br i1 %cmp, label %for.body, label %for.cond.cleanup, !llvm.loop !11 if.then: ; preds = %for.cond.cleanup %cmp18147 = icmp sgt i64 %1, 2 br i1 %cmp18147, label %for.body21.lr.ph, label %cleanup for.body21.lr.ph: ; preds = %if.then %3 = load i64, ptr %a, align 16, !tbaa !9 br label %for.body21 for.body21: ; preds = %for.body21, %for.body21.lr.ph %indvars.iv156 = phi i64 [ 0, %for.body21.lr.ph ], [ %indvars.iv.next157, %for.body21 ] %arrayidx28 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %indvars.iv156 %4 = load i64, ptr %arrayidx28, align 8, !tbaa !9 %cmp29.not = icmp eq i64 %3, %4 %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1 %exitcond166.not = icmp ne i64 %indvars.iv.next157, %div17 %or.cond178.not = select i1 %cmp29.not, i1 %exitcond166.not, i1 false br i1 %or.cond178.not, label %for.body21, label %cleanup, !llvm.loop !13 cleanup: ; preds = %for.body21, %if.then %cmp44 = phi i1 [ true, %if.then ], [ %cmp29.not, %for.body21 ] %mul16.1 = shl nsw i64 %1, 1 %div17.1 = sdiv i64 %mul16.1, 3 %sext.1 = shl i64 %div17, 32 %conv14146.1 = ashr exact i64 %sext.1, 32 %cmp18147.1 = icmp sgt i64 %div17.1, %conv14146.1 br i1 %cmp18147.1, label %for.body21.lr.ph.1, label %cleanup.1 for.body21.lr.ph.1: ; preds = %cleanup %arrayidx26.1 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %div17 %5 = load i64, ptr %arrayidx26.1, align 8, !tbaa !9 br label %for.body21.1 for.body21.1: ; preds = %for.body21.1, %for.body21.lr.ph.1 %indvars.iv156.1 = phi i64 [ %conv14146.1, %for.body21.lr.ph.1 ], [ %indvars.iv.next157.1, %for.body21.1 ] %arrayidx28.1 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %indvars.iv156.1 %6 = load i64, ptr %arrayidx28.1, align 8, !tbaa !9 %cmp29.not.1 = icmp eq i64 %5, %6 %indvars.iv.next157.1 = add nsw i64 %indvars.iv156.1, 1 %exitcond165.not = icmp ne i64 %indvars.iv.next157.1, %div17.1 %or.cond179.not = select i1 %cmp29.not.1, i1 %exitcond165.not, i1 false br i1 %or.cond179.not, label %for.body21.1, label %cleanup.1, !llvm.loop !13 cleanup.1: ; preds = %for.body21.1, %cleanup %cmp47 = phi i1 [ true, %cleanup ], [ %cmp29.not.1, %for.body21.1 ] %sext.2 = shl i64 %div17.1, 32 %conv14146.2 = ashr exact i64 %sext.2, 32 %cmp18147.2 = icmp sgt i64 %1, %conv14146.2 br i1 %cmp18147.2, label %for.body21.lr.ph.2, label %cleanup.2 for.body21.lr.ph.2: ; preds = %cleanup.1 %arrayidx26.2 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %div17.1 %7 = load i64, ptr %arrayidx26.2, align 8, !tbaa !9 br label %for.body21.2 for.body21.2: ; preds = %for.cond13.2, %for.body21.lr.ph.2 %indvars.iv156.2 = phi i64 [ %conv14146.2, %for.body21.lr.ph.2 ], [ %indvars.iv.next157.2, %for.cond13.2 ] %arrayidx28.2 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %indvars.iv156.2 %8 = load i64, ptr %arrayidx28.2, align 8, !tbaa !9 %cmp29.not.2 = icmp eq i64 %7, %8 br i1 %cmp29.not.2, label %for.cond13.2, label %if.end116 for.cond13.2: ; preds = %for.body21.2 %indvars.iv.next157.2 = add i64 %indvars.iv156.2, 1 %exitcond164.not = icmp eq i64 %indvars.iv.next157.2, %1 br i1 %exitcond164.not, label %cleanup.2, label %for.body21.2, !llvm.loop !13 cleanup.2: ; preds = %for.cond13.2, %cleanup.1 %or.cond = and i1 %cmp44, %cmp47 br i1 %or.cond, label %if.then53, label %if.end116 if.then53: ; preds = %cleanup.2 %9 = load i64, ptr %a, align 16, !tbaa !9 %arrayidx56 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %div17 %10 = load i64, ptr %arrayidx56, align 8, !tbaa !9 %xor = xor i64 %10, %9 %mul57 = shl nsw i64 %1, 1 %div58 = sdiv i64 %mul57, 3 %arrayidx59 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %div58 %11 = load i64, ptr %arrayidx59, align 8, !tbaa !9 %cmp60 = icmp eq i64 %xor, %11 %xor67 = xor i64 %11, %9 %cmp70 = icmp eq i64 %xor67, %10 %or.cond138 = and i1 %cmp60, %cmp70 %xor78 = xor i64 %11, %10 %cmp80 = icmp eq i64 %xor78, %9 %or.cond139 = and i1 %cmp80, %or.cond138 %str.6.str.5 = select i1 %or.cond139, ptr @str.6, ptr @str.5 br label %if.end116 for.cond92: ; preds = %for.body97 %indvars.iv.next154 = add nuw nsw i64 %indvars.iv153, 1 %exitcond.not = icmp eq i64 %indvars.iv.next154, %1 br i1 %exitcond.not, label %if.end116, label %for.body97, !llvm.loop !14 for.body97: ; preds = %for.cond92.preheader, %for.cond92 %indvars.iv153 = phi i64 [ %indvars.iv.next154, %for.cond92 ], [ 0, %for.cond92.preheader ] %arrayidx99 = getelementptr inbounds [100000 x i64], ptr %a, i64 0, i64 %indvars.iv153 %12 = load i64, ptr %arrayidx99, align 8, !tbaa !9 %cmp100.not = icmp eq i64 %12, 0 br i1 %cmp100.not, label %for.cond92, label %if.end116 if.end116: ; preds = %for.body97, %for.cond92, %for.body21.2, %for.cond92.preheader, %cleanup.2, %if.then53 %str.4.sink = phi ptr [ %str.6.str.5, %if.then53 ], [ @str.5, %cleanup.2 ], [ @str.6, %for.cond92.preheader ], [ @str.5, %for.body21.2 ], [ @str.6, %for.cond92 ], [ @str.5, %for.body97 ] %puts135 = call i32 @puts(ptr nonnull dereferenceable(1) %str.4.sink) call void @llvm.lifetime.end.p0(i64 800000, ptr nonnull %a) #6 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #6 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2 ; Function Attrs: nofree declare void @qsort(ptr noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #4 ; Function Attrs: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { 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 = !{!10, !10, i64 0} !10 = !{!"long long", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12} !14 = distinct !{!14, !12}
#include <stdio.h> #define MAX (1 << 17) /* 131072 */ int ki[MAX * 2 - 1]; void ki_set(int idx, int value) { int pos = (MAX - 1) + idx; ki[pos] = value; for (;;) { int c1, c2; pos = (pos - 1) / 2; c1 = ki[pos * 2 + 1]; c2 = ki[pos * 2 + 2]; ki[pos] = c1 >= c2 ? c1 : c2; if (pos == 0) break; } } int ki_get_i(int idx, int qmin, int qmax, int smin, int smax) { if (qmax <= smin || smax <= qmin) { /* クエリがセグメントから完全に外れている */ return -1; } else if (qmin <= smin && smax <= qmax) { /* セグメントがクエリに完全に含まれる */ return ki[idx]; } else { int smid = smin + (smax - smin) / 2; int l = ki_get_i(idx * 2 + 1, qmin, qmax, smin, smid); int r = ki_get_i(idx * 2 + 2, qmin, qmax, smid, smax); return l >= r ? l : r; } } int ki_get(int min, int max) { return ki_get_i(0, min, max, 0, MAX); } int N; int A[114514]; /* start以降の要素で、target以上の最初のものを探す */ int ki_mofu(int start, int target) { int yes = start, no = N; /* [start, yes)の要素にtarget未満のものしか無い */ if (ki_get(start, N) < target) { return N; } while (yes + 1 < no) { int mid = yes + (no - yes) / 2; if (mid <= start) yes = mid; else if (ki_get(start, mid) < target) yes = mid; else no = mid; } return yes; } int main(void) { int i; int count = 0; if (scanf("%d", &N) != 1) return 1; for (i = 0; i < N; i++) { if (scanf("%d", &A[i]) != 1) return 1; ki_set(i, A[i]); } while (ki_get(0, N) >= 0) { int current_pos, current_value; count++; current_pos = 0; current_value = -1; for (;;) { int next_pos = ki_mofu(current_pos, current_value + 1); if (next_pos >= N) break; current_value = A[next_pos]; ki_set(next_pos, -1); current_pos = next_pos + 1; } } printf("%d\n", count); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200393/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200393/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @ki = dso_local local_unnamed_addr global [262143 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 @A = dso_local global [114514 x i32] zeroinitializer, align 16 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @ki_set(i32 noundef %idx, i32 noundef %value) local_unnamed_addr #0 { entry: %add = add nsw i32 %idx, 131071 %idxprom = sext i32 %add to i64 %arrayidx = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom store i32 %value, ptr %arrayidx, align 4, !tbaa !5 br label %for.cond for.cond: ; preds = %for.cond, %entry %pos.0 = phi i32 [ %add, %entry ], [ %div, %for.cond ] %sub = add nsw i32 %pos.0, -1 %div = sdiv i32 %sub, 2 %mul = shl nsw i32 %div, 1 %add1 = or i32 %mul, 1 %idxprom2 = sext i32 %add1 to i64 %arrayidx3 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom2 %0 = load i32, ptr %arrayidx3, align 4, !tbaa !5 %add5 = add nsw i32 %mul, 2 %idxprom6 = sext i32 %add5 to i64 %arrayidx7 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom6 %1 = load i32, ptr %arrayidx7, align 8, !tbaa !5 %cond = tail call i32 @llvm.smax.i32(i32 %0, i32 %1) %idxprom8 = sext i32 %div to i64 %arrayidx9 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom8 store i32 %cond, ptr %arrayidx9, align 4, !tbaa !5 %cmp10 = icmp ult i32 %pos.0, 3 br i1 %cmp10, label %for.end, label %for.cond for.end: ; preds = %for.cond ret void } ; Function Attrs: nofree nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable define dso_local i32 @ki_get_i(i32 noundef %idx, i32 noundef %qmin, i32 noundef %qmax, i32 noundef %smin, i32 noundef %smax) local_unnamed_addr #1 { entry: %cmp.not = icmp sgt i32 %qmax, %smin %cmp1.not = icmp sgt i32 %smax, %qmin %or.cond = and i1 %cmp.not, %cmp1.not br i1 %or.cond, label %if.else, label %common.ret30 if.else: ; preds = %entry %cmp2.not = icmp sgt i32 %qmin, %smin %cmp3.not = icmp sgt i32 %smax, %qmax %or.cond29 = or i1 %cmp2.not, %cmp3.not br i1 %or.cond29, label %if.else5, label %if.then4 if.then4: ; preds = %if.else %idxprom = sext i32 %idx to i64 %arrayidx = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom %0 = load i32, ptr %arrayidx, align 4, !tbaa !5 br label %common.ret30 common.ret30: ; preds = %entry, %if.then4, %if.else5 %common.ret30.op = phi i32 [ %cond, %if.else5 ], [ %0, %if.then4 ], [ -1, %entry ] ret i32 %common.ret30.op if.else5: ; preds = %if.else %sub = sub nsw i32 %smax, %smin %div = sdiv i32 %sub, 2 %add = add nsw i32 %div, %smin %mul = shl nsw i32 %idx, 1 %add6 = or i32 %mul, 1 %call = tail call i32 @ki_get_i(i32 noundef %add6, i32 noundef %qmin, i32 noundef %qmax, i32 noundef %smin, i32 noundef %add) %add8 = add nsw i32 %mul, 2 %call9 = tail call i32 @ki_get_i(i32 noundef %add8, i32 noundef %qmin, i32 noundef %qmax, i32 noundef %add, i32 noundef %smax) %cond = tail call i32 @llvm.smax.i32(i32 %call, i32 %call9) br label %common.ret30 } ; Function Attrs: nofree nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local i32 @ki_get(i32 noundef %min, i32 noundef %max) local_unnamed_addr #2 { entry: %call = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef %min, i32 noundef %max, i32 noundef 0, i32 noundef 131072) ret i32 %call } ; Function Attrs: nofree nosync nounwind memory(read, inaccessiblemem: none) uwtable define dso_local i32 @ki_mofu(i32 noundef %start, i32 noundef %target) local_unnamed_addr #2 { entry: %0 = load i32, ptr @N, align 4, !tbaa !5 %call.i = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef %start, i32 noundef %0, i32 noundef 0, i32 noundef 131072) %cmp = icmp slt i32 %call.i, %target br i1 %cmp, label %cleanup, label %while.cond.preheader while.cond.preheader: ; preds = %entry %add25 = add nsw i32 %start, 1 %cmp126 = icmp slt i32 %add25, %0 br i1 %cmp126, label %while.body, label %cleanup while.body: ; preds = %while.cond.preheader, %if.end10 %no.028 = phi i32 [ %no.1, %if.end10 ], [ %0, %while.cond.preheader ] %yes.027 = phi i32 [ %yes.1, %if.end10 ], [ %start, %while.cond.preheader ] %sub = sub nsw i32 %no.028, %yes.027 %div = sdiv i32 %sub, 2 %add2 = add nsw i32 %div, %yes.027 %cmp3.not = icmp sgt i32 %add2, %start br i1 %cmp3.not, label %if.else, label %if.end10 if.else: ; preds = %while.body %call.i24 = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef %start, i32 noundef %add2, i32 noundef 0, i32 noundef 131072) %cmp6 = icmp slt i32 %call.i24, %target %add2.yes.0 = select i1 %cmp6, i32 %add2, i32 %yes.027 %no.0.add2 = select i1 %cmp6, i32 %no.028, i32 %add2 br label %if.end10 if.end10: ; preds = %if.else, %while.body %yes.1 = phi i32 [ %add2, %while.body ], [ %add2.yes.0, %if.else ] %no.1 = phi i32 [ %no.028, %while.body ], [ %no.0.add2, %if.else ] %add = add nsw i32 %yes.1, 1 %cmp1 = icmp slt i32 %add, %no.1 br i1 %cmp1, label %while.body, label %cleanup, !llvm.loop !9 cleanup: ; preds = %if.end10, %while.cond.preheader, %entry %retval.0 = phi i32 [ %0, %entry ], [ %start, %while.cond.preheader ], [ %yes.1, %if.end10 ] ret i32 %retval.0 } ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @N) %cmp.not = icmp eq i32 %call, 1 br i1 %cmp.not, label %for.cond.preheader, label %cleanup21 for.cond.preheader: ; preds = %entry %0 = load i32, ptr @N, align 4, !tbaa !5 %cmp156 = icmp sgt i32 %0, 0 br i1 %cmp156, label %for.body, label %while.cond.preheader while.cond.preheader: ; preds = %ki_set.exit, %for.cond.preheader %.lcssa = phi i32 [ %0, %for.cond.preheader ], [ %6, %ki_set.exit ] %call.i58 = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef 0, i32 noundef %.lcssa, i32 noundef 0, i32 noundef 131072) %cmp959 = icmp sgt i32 %call.i58, -1 br i1 %cmp959, label %while.body, label %while.end for.body: ; preds = %for.cond.preheader, %ki_set.exit %indvars.iv = phi i64 [ %indvars.iv.next, %ki_set.exit ], [ 0, %for.cond.preheader ] %arrayidx = getelementptr inbounds [114514 x i32], ptr @A, i64 0, i64 %indvars.iv %call2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %arrayidx) %cmp3.not = icmp eq i32 %call2, 1 br i1 %cmp3.not, label %if.end5, label %cleanup21 if.end5: ; preds = %for.body %1 = load i32, ptr %arrayidx, align 4, !tbaa !5 %2 = add nuw nsw i64 %indvars.iv, 131071 %arrayidx.i = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %2 store i32 %1, ptr %arrayidx.i, align 4, !tbaa !5 %3 = trunc i64 %2 to i32 br label %for.cond.i for.cond.i: ; preds = %for.cond.i, %if.end5 %pos.0.i = phi i32 [ %3, %if.end5 ], [ %div.i, %for.cond.i ] %sub.i = add nsw i32 %pos.0.i, -1 %div.i = sdiv i32 %sub.i, 2 %mul.i = shl nsw i32 %div.i, 1 %add1.i = or i32 %mul.i, 1 %idxprom2.i = sext i32 %add1.i to i64 %arrayidx3.i = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom2.i %4 = load i32, ptr %arrayidx3.i, align 4, !tbaa !5 %add5.i = add nsw i32 %mul.i, 2 %idxprom6.i = sext i32 %add5.i to i64 %arrayidx7.i = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom6.i %5 = load i32, ptr %arrayidx7.i, align 8, !tbaa !5 %cond.i = tail call i32 @llvm.smax.i32(i32 %4, i32 %5) %idxprom8.i = sext i32 %div.i to i64 %arrayidx9.i = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom8.i store i32 %cond.i, ptr %arrayidx9.i, align 4, !tbaa !5 %cmp10.i = icmp ult i32 %pos.0.i, 3 br i1 %cmp10.i, label %ki_set.exit, label %for.cond.i ki_set.exit: ; preds = %for.cond.i %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 %cmp1 = icmp slt i64 %indvars.iv.next, %7 br i1 %cmp1, label %for.body, label %while.cond.preheader, !llvm.loop !11 while.cond.loopexit: ; preds = %cleanup, %ki_mofu.exit, %while.body %inc10 = add nuw nsw i32 %count.060, 1 %call.i = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef 0, i32 noundef %.lcssa, i32 noundef 0, i32 noundef 131072) %cmp9 = icmp sgt i32 %call.i, -1 br i1 %cmp9, label %while.body, label %while.end, !llvm.loop !12 while.body: ; preds = %while.cond.preheader, %while.cond.loopexit %count.060 = phi i32 [ %inc10, %while.cond.loopexit ], [ 0, %while.cond.preheader ] %call.i.i70 = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef 0, i32 noundef %.lcssa, i32 noundef 0, i32 noundef 131072) %cmp.i.not71 = icmp sgt i32 %call.i.i70, -1 br i1 %cmp.i.not71, label %while.cond.preheader.i, label %while.cond.loopexit while.cond.preheader.i: ; preds = %while.body, %cleanup %current_value.073 = phi i32 [ %8, %cleanup ], [ -1, %while.body ] %current_pos.072 = phi i32 [ %add18, %cleanup ], [ 0, %while.body ] %add25.i = add nsw i32 %current_pos.072, 1 %cmp126.i = icmp slt i32 %add25.i, %.lcssa br i1 %cmp126.i, label %while.body.i, label %ki_mofu.exit while.body.i: ; preds = %while.cond.preheader.i, %if.end10.i %no.028.i = phi i32 [ %no.1.i, %if.end10.i ], [ %.lcssa, %while.cond.preheader.i ] %yes.027.i = phi i32 [ %yes.1.i, %if.end10.i ], [ %current_pos.072, %while.cond.preheader.i ] %sub.i31 = sub nsw i32 %no.028.i, %yes.027.i %div.i32 = sdiv i32 %sub.i31, 2 %add2.i = add nsw i32 %div.i32, %yes.027.i %cmp3.not.i = icmp sgt i32 %add2.i, %current_pos.072 br i1 %cmp3.not.i, label %if.else.i, label %if.end10.i if.else.i: ; preds = %while.body.i %call.i24.i = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef %current_pos.072, i32 noundef %add2.i, i32 noundef 0, i32 noundef 131072) %cmp6.i.not = icmp sgt i32 %call.i24.i, %current_value.073 %add2.yes.0.i = select i1 %cmp6.i.not, i32 %yes.027.i, i32 %add2.i %no.0.add2.i = select i1 %cmp6.i.not, i32 %add2.i, i32 %no.028.i br label %if.end10.i if.end10.i: ; preds = %if.else.i, %while.body.i %yes.1.i = phi i32 [ %add2.i, %while.body.i ], [ %add2.yes.0.i, %if.else.i ] %no.1.i = phi i32 [ %no.028.i, %while.body.i ], [ %no.0.add2.i, %if.else.i ] %add.i33 = add nsw i32 %yes.1.i, 1 %cmp1.i = icmp slt i32 %add.i33, %no.1.i br i1 %cmp1.i, label %while.body.i, label %ki_mofu.exit, !llvm.loop !9 ki_mofu.exit: ; preds = %if.end10.i, %while.cond.preheader.i %retval.0.i = phi i32 [ %current_pos.072, %while.cond.preheader.i ], [ %yes.1.i, %if.end10.i ] %cmp13.not = icmp slt i32 %retval.0.i, %.lcssa br i1 %cmp13.not, label %if.end15, label %while.cond.loopexit if.end15: ; preds = %ki_mofu.exit %idxprom16 = sext i32 %retval.0.i to i64 %arrayidx17 = getelementptr inbounds [114514 x i32], ptr @A, i64 0, i64 %idxprom16 %8 = load i32, ptr %arrayidx17, align 4, !tbaa !5 %add.i34 = add nsw i32 %retval.0.i, 131071 %idxprom.i35 = sext i32 %add.i34 to i64 %arrayidx.i36 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom.i35 store i32 -1, ptr %arrayidx.i36, align 4, !tbaa !5 br label %for.cond.i37 for.cond.i37: ; preds = %for.cond.i37, %if.end15 %pos.0.i38 = phi i32 [ %add.i34, %if.end15 ], [ %div.i40, %for.cond.i37 ] %sub.i39 = add nsw i32 %pos.0.i38, -1 %div.i40 = sdiv i32 %sub.i39, 2 %mul.i41 = shl nsw i32 %div.i40, 1 %add1.i42 = or i32 %mul.i41, 1 %idxprom2.i43 = sext i32 %add1.i42 to i64 %arrayidx3.i44 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom2.i43 %9 = load i32, ptr %arrayidx3.i44, align 4, !tbaa !5 %add5.i45 = add nsw i32 %mul.i41, 2 %idxprom6.i46 = sext i32 %add5.i45 to i64 %arrayidx7.i47 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom6.i46 %10 = load i32, ptr %arrayidx7.i47, align 8, !tbaa !5 %cond.i48 = tail call i32 @llvm.smax.i32(i32 %9, i32 %10) %idxprom8.i49 = sext i32 %div.i40 to i64 %arrayidx9.i50 = getelementptr inbounds [262143 x i32], ptr @ki, i64 0, i64 %idxprom8.i49 store i32 %cond.i48, ptr %arrayidx9.i50, align 4, !tbaa !5 %cmp10.i51 = icmp ult i32 %pos.0.i38, 3 br i1 %cmp10.i51, label %cleanup, label %for.cond.i37 cleanup: ; preds = %for.cond.i37 %add18 = add nsw i32 %retval.0.i, 1 %call.i.i = tail call i32 @ki_get_i(i32 noundef 0, i32 noundef %add18, i32 noundef %.lcssa, i32 noundef 0, i32 noundef 131072) %cmp.i.not = icmp sgt i32 %call.i.i, %8 br i1 %cmp.i.not, label %while.cond.preheader.i, label %while.cond.loopexit, !llvm.loop !12 while.end: ; preds = %while.cond.loopexit, %while.cond.preheader %count.0.lcssa = phi i32 [ 0, %while.cond.preheader ], [ %inc10, %while.cond.loopexit ] %call20 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %count.0.lcssa) br label %cleanup21 cleanup21: ; preds = %for.body, %entry, %while.end %retval.0 = phi i32 [ 0, %while.end ], [ 1, %entry ], [ 1, %for.body ] ret i32 %retval.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: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smax.i32(i32, i32) #5 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 nosync nounwind memory(read, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #2 = { nofree 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 #3 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~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}
// AOJ 2565: Broken Audio Signal // 2017.10.13 bal4u@uu #include <stdio.h> #include <stdlib.h> int a[1002]; char x[1002]; int main() { int n, i, f, c, min, max; char buf[15]; while (scanf("%d", &n) && n > 0) { c = 0, f = 0; for (i = 0; i < n; i++) { scanf("%s", buf); if (*buf == 'x') { a[i] = 0, x[i] = 1, c |= 1; if (i > 0 && x[i-1]) c |= 2; } else a[i] = atoi(buf), x[i] = 0; } if (c <= 1) { f = 1, max = 1000000005, min = -1000000005; for (i = 0; c <= 1 && i < n; i++) { if (x[i]) { if (i > 0 && !x[i-1] && a[i-1] < max) max = a[i-1]; if (i < n-1 && !x[i+1] && a[i+1] < max) max = a[i+1]; } else { if (i > 0 && !x[i-1] && a[i-1] <= a[i]) f = 0; if (i < n-1 && !x[i+1] && a[i+1] <= a[i]) f = 0; } if (++i == n) break; if (x[i]) { if ( !x[i-1] && a[i-1] > min) min = a[i-1]; if (i < n-1 && !x[i+1] && a[i+1] > min) min = a[i+1]; } else { if ( !x[i-1] && a[i-1] >= a[i]) f = 0; if (i < n-1 && !x[i+1] && a[i+1] >= a[i]) f = 0; } } } if (c == 1 && f && max - min == 2) printf("%d\n", min+1); else { if (c == 1 && f) f = (max - min > 2); puts(f ? "ambiguous" : "none"); } } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200436/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200436/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 @a = dso_local local_unnamed_addr global [1002 x i32] zeroinitializer, align 16 @x = dso_local local_unnamed_addr global [1002 x i8] zeroinitializer, align 16 @.str.2 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 @.str.3 = private unnamed_addr constant [10 x i8] c"ambiguous\00", align 1 @.str.4 = private unnamed_addr constant [5 x i8] c"none\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %n = alloca i32, align 4 %buf = alloca [15 x i8], align 1 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 15, ptr nonnull %buf) #5 %call336 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool337 = icmp ne i32 %call336, 0 %0 = load i32, ptr %n, align 4 %cmp338 = icmp sgt i32 %0, 0 %1 = select i1 %tobool337, i1 %cmp338, i1 false br i1 %1, label %for.body.preheader, label %while.end for.body.preheader: ; preds = %entry, %if.end215 %call2.peel = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %buf) %2 = load i8, ptr %buf, align 1, !tbaa !5 %cmp4.peel = icmp eq i8 %2, 120 br i1 %cmp4.peel, label %for.inc.peel, label %if.else.peel if.else.peel: ; preds = %for.body.preheader %call.i.peel = call i64 @strtol(ptr nocapture noundef nonnull %buf, ptr noundef null, i32 noundef 10) #5 %conv.i.peel = trunc i64 %call.i.peel to i32 br label %for.inc.peel for.inc.peel: ; preds = %for.body.preheader, %if.else.peel %storemerge354 = phi i32 [ %conv.i.peel, %if.else.peel ], [ 0, %for.body.preheader ] %storemerge = phi i8 [ 0, %if.else.peel ], [ 1, %for.body.preheader ] %c.1.peel = phi i32 [ 0, %if.else.peel ], [ 1, %for.body.preheader ] store i32 %storemerge354, ptr @a, align 16, !tbaa !8 store i8 %storemerge, ptr @x, align 16, !tbaa !5 %3 = load i32, ptr %n, align 4 %cmp1.peel = icmp sgt i32 %3, 1 br i1 %cmp1.peel, label %for.body, label %for.cond26.preheader for.body: ; preds = %for.inc.peel, %for.inc %indvars.iv = phi i64 [ %indvars.iv.next, %for.inc ], [ 1, %for.inc.peel ] %c.0323 = phi i32 [ %c.1, %for.inc ], [ %c.1.peel, %for.inc.peel ] %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %buf) %4 = load i8, ptr %buf, align 1, !tbaa !5 %cmp4 = icmp eq i8 %4, 120 br i1 %cmp4, label %land.lhs.true, label %if.else land.lhs.true: ; preds = %for.body %arrayidx = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv store i32 0, ptr %arrayidx, align 4, !tbaa !8 %arrayidx7 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %indvars.iv store i8 1, ptr %arrayidx7, align 1, !tbaa !5 %or = or i32 %c.0323, 1 %5 = add nuw i64 %indvars.iv, 4294967295 %idxprom10 = and i64 %5, 4294967295 %arrayidx11 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %idxprom10 %6 = load i8, ptr %arrayidx11, align 1, !tbaa !5 %tobool13.not = icmp eq i8 %6, 0 %spec.select = select i1 %tobool13.not, i32 %or, i32 3 br label %for.inc if.else: ; preds = %for.body %call.i = call i64 @strtol(ptr nocapture noundef nonnull %buf, ptr noundef null, i32 noundef 10) #5 %conv.i = trunc i64 %call.i to i32 %arrayidx19 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv store i32 %conv.i, ptr %arrayidx19, align 4, !tbaa !8 %arrayidx21 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %indvars.iv store i8 0, ptr %arrayidx21, align 1, !tbaa !5 br label %for.inc for.inc: ; preds = %land.lhs.true, %if.else %c.1 = phi i32 [ %c.0323, %if.else ], [ %spec.select, %land.lhs.true ] %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 %7 = load i32, ptr %n, align 4 %8 = sext i32 %7 to i64 %cmp1 = icmp slt i64 %indvars.iv.next, %8 br i1 %cmp1, label %for.body, label %for.end, !llvm.loop !10 for.end: ; preds = %for.inc %cmp23 = icmp slt i32 %c.1, 2 br i1 %cmp23, label %for.cond26.preheader, label %.thread for.cond26.preheader: ; preds = %for.inc.peel, %for.end %.lcssa339359 = phi i32 [ %7, %for.end ], [ %3, %for.inc.peel ] %c.1.lcssa358 = phi i32 [ %c.1, %for.end ], [ %c.1.peel, %for.inc.peel ] %cmp30325 = icmp sgt i32 %.lcssa339359, 0 br i1 %cmp30325, label %for.body33.lr.ph, label %if.end191 for.body33.lr.ph: ; preds = %for.cond26.preheader %sub56 = add nsw i32 %.lcssa339359, -1 %9 = zext i32 %sub56 to i64 %10 = zext i32 %.lcssa339359 to i64 %11 = load i8, ptr @x, align 16, !tbaa !5 %tobool36.not.peel = icmp eq i8 %11, 0 %cmp93.peel.not = icmp eq i32 %.lcssa339359, 1 br i1 %tobool36.not.peel, label %if.end91.peel, label %if.end55.peel if.end55.peel: ; preds = %for.body33.lr.ph br i1 %cmp93.peel.not, label %if.end191, label %land.lhs.true59.peel land.lhs.true59.peel: ; preds = %if.end55.peel %12 = load i8, ptr getelementptr inbounds ([1002 x i8], ptr @x, i64 0, i64 1), align 1, !tbaa !5 %tobool62.not.peel = icmp eq i8 %12, 0 br i1 %tobool62.not.peel, label %if.else154.peel, label %if.end134.peel if.end91.peel: ; preds = %for.body33.lr.ph br i1 %cmp93.peel.not, label %if.end191, label %land.lhs.true95.peel land.lhs.true95.peel: ; preds = %if.end91.peel %13 = load i8, ptr getelementptr inbounds ([1002 x i8], ptr @x, i64 0, i64 1), align 1, !tbaa !5 %tobool99.not.peel = icmp eq i8 %13, 0 br i1 %tobool99.not.peel, label %if.end115.peel, label %land.lhs.true124.peel if.end115.peel: ; preds = %land.lhs.true95.peel %14 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !8 %15 = load i32, ptr @a, align 16, !tbaa !8 %cmp106.not.peel = icmp sgt i32 %14, %15 %spec.select279.peel = zext i1 %cmp106.not.peel to i32 %.pr = load i8, ptr getelementptr inbounds ([1002 x i8], ptr @x, i64 0, i64 1), align 1, !tbaa !5 %tobool118.not.peel = icmp eq i8 %.pr, 0 br i1 %tobool118.not.peel, label %land.lhs.true159.peel, label %land.lhs.true124.peel land.lhs.true124.peel: ; preds = %if.end115.peel, %land.lhs.true95.peel %f.2.peel.ph368382 = phi i32 [ 1, %land.lhs.true95.peel ], [ %spec.select279.peel, %if.end115.peel ] %16 = load i32, ptr @a, align 16, !tbaa !8 %spec.select280.peel = call i32 @llvm.smax.i32(i32 %16, i32 -1000000005) br label %if.end134.peel if.end134.peel: ; preds = %land.lhs.true59.peel, %land.lhs.true124.peel %f.2.peel.ph368381 = phi i32 [ %f.2.peel.ph368382, %land.lhs.true124.peel ], [ 1, %land.lhs.true59.peel ] %min.2.peel = phi i32 [ %spec.select280.peel, %land.lhs.true124.peel ], [ -1000000005, %land.lhs.true59.peel ] %cmp136.peel = icmp ugt i32 %.lcssa339359, 2 br i1 %cmp136.peel, label %land.lhs.true138.peel, label %if.end191 land.lhs.true138.peel: ; preds = %if.end134.peel %17 = load i8, ptr getelementptr inbounds ([1002 x i8], ptr @x, i64 0, i64 2), align 2, !tbaa !5 %tobool142.not.peel = icmp eq i8 %17, 0 br i1 %tobool142.not.peel, label %land.lhs.true143.peel, label %for.body33.preheader land.lhs.true143.peel: ; preds = %land.lhs.true138.peel %18 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !8 %spec.select281.peel = call i32 @llvm.smax.i32(i32 %18, i32 %min.2.peel) br label %for.body33.preheader if.else154.peel: ; preds = %land.lhs.true59.peel %19 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !8 %spec.select277.peel = call i32 @llvm.smin.i32(i32 %19, i32 1000000005) br label %if.end168.peel land.lhs.true159.peel: ; preds = %if.end115.peel %20 = load i32, ptr @a, align 16, !tbaa !8 %21 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !8 %cmp165.not.peel = icmp slt i32 %20, %21 %spec.select282.peel = select i1 %cmp165.not.peel, i32 %spec.select279.peel, i32 0 br label %if.end168.peel if.end168.peel: ; preds = %if.else154.peel, %land.lhs.true159.peel %max.3.peel.ph376386 = phi i32 [ %spec.select277.peel, %if.else154.peel ], [ 1000000005, %land.lhs.true159.peel ] %f.3.peel = phi i32 [ 1, %if.else154.peel ], [ %spec.select282.peel, %land.lhs.true159.peel ] %cmp170.peel = icmp ugt i32 %.lcssa339359, 2 br i1 %cmp170.peel, label %land.lhs.true172.peel, label %if.end191 land.lhs.true172.peel: ; preds = %if.end168.peel %22 = load i8, ptr getelementptr inbounds ([1002 x i8], ptr @x, i64 0, i64 2), align 2, !tbaa !5 %tobool176.not.peel = icmp eq i8 %22, 0 br i1 %tobool176.not.peel, label %land.lhs.true177.peel, label %for.body33.preheader land.lhs.true177.peel: ; preds = %land.lhs.true172.peel %23 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 2), align 8, !tbaa !8 %24 = load i32, ptr getelementptr inbounds ([1002 x i32], ptr @a, i64 0, i64 1), align 4, !tbaa !8 %cmp183.not.peel = icmp slt i32 %23, %24 %spec.select283.peel = select i1 %cmp183.not.peel, i32 %f.3.peel, i32 0 br label %for.body33.preheader for.body33.preheader: ; preds = %land.lhs.true177.peel, %land.lhs.true172.peel, %land.lhs.true143.peel, %land.lhs.true138.peel %max.1329.ph = phi i32 [ 1000000005, %land.lhs.true138.peel ], [ 1000000005, %land.lhs.true143.peel ], [ %max.3.peel.ph376386, %land.lhs.true172.peel ], [ %max.3.peel.ph376386, %land.lhs.true177.peel ] %min.1328.ph = phi i32 [ %min.2.peel, %land.lhs.true138.peel ], [ %spec.select281.peel, %land.lhs.true143.peel ], [ -1000000005, %land.lhs.true172.peel ], [ -1000000005, %land.lhs.true177.peel ] %f.0327.ph = phi i32 [ %f.2.peel.ph368381, %land.lhs.true138.peel ], [ %f.2.peel.ph368381, %land.lhs.true143.peel ], [ %f.3.peel, %land.lhs.true172.peel ], [ %spec.select283.peel, %land.lhs.true177.peel ] br label %for.body33 for.body33: ; preds = %for.body33.preheader, %for.inc188 %indvars.iv343 = phi i64 [ %indvars.iv.next344, %for.inc188 ], [ 2, %for.body33.preheader ] %max.1329 = phi i32 [ %max.3, %for.inc188 ], [ %max.1329.ph, %for.body33.preheader ] %min.1328 = phi i32 [ %min.3, %for.inc188 ], [ %min.1328.ph, %for.body33.preheader ] %f.0327 = phi i32 [ %f.4, %for.inc188 ], [ %f.0327.ph, %for.body33.preheader ] %arrayidx35 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %indvars.iv343 %25 = load i8, ptr %arrayidx35, align 2, !tbaa !5 %tobool36.not = icmp eq i8 %25, 0 %26 = add i64 %indvars.iv343, 4294967295 %idxprom79 = and i64 %26, 4294967295 %arrayidx80 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %idxprom79 %27 = load i8, ptr %arrayidx80, align 1, !tbaa !5 %tobool81.not = icmp eq i8 %27, 0 br i1 %tobool36.not, label %land.lhs.true77, label %land.lhs.true40 land.lhs.true40: ; preds = %for.body33 br i1 %tobool81.not, label %land.lhs.true45, label %if.end55 land.lhs.true45: ; preds = %land.lhs.true40 %arrayidx48 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %idxprom79 %28 = load i32, ptr %arrayidx48, align 4, !tbaa !8 %spec.select276 = call i32 @llvm.smin.i32(i32 %28, i32 %max.1329) br label %if.end55 if.end55: ; preds = %land.lhs.true45, %land.lhs.true40 %max.2 = phi i32 [ %max.1329, %land.lhs.true40 ], [ %spec.select276, %land.lhs.true45 ] %cmp57 = icmp slt i64 %indvars.iv343, %9 br i1 %cmp57, label %land.lhs.true59, label %if.end110 land.lhs.true59: ; preds = %if.end55 %29 = or i64 %indvars.iv343, 1 %arrayidx61 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %29 %30 = load i8, ptr %arrayidx61, align 1, !tbaa !5 %tobool62.not = icmp eq i8 %30, 0 br i1 %tobool62.not, label %land.lhs.true63, label %if.end110 land.lhs.true63: ; preds = %land.lhs.true59 %arrayidx66 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %29 %31 = load i32, ptr %arrayidx66, align 4, !tbaa !8 %spec.select277 = call i32 @llvm.smin.i32(i32 %31, i32 %max.2) br label %if.end110 land.lhs.true77: ; preds = %for.body33 br i1 %tobool81.not, label %land.lhs.true82, label %if.end91 land.lhs.true82: ; preds = %land.lhs.true77 %arrayidx85 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %idxprom79 %32 = load i32, ptr %arrayidx85, align 4, !tbaa !8 %arrayidx87 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv343 %33 = load i32, ptr %arrayidx87, align 8, !tbaa !8 %cmp88.not = icmp sgt i32 %32, %33 %spec.select278 = select i1 %cmp88.not, i32 %f.0327, i32 0 br label %if.end91 if.end91: ; preds = %land.lhs.true82, %land.lhs.true77 %f.1 = phi i32 [ %f.0327, %land.lhs.true77 ], [ %spec.select278, %land.lhs.true82 ] %cmp93 = icmp slt i64 %indvars.iv343, %9 br i1 %cmp93, label %land.lhs.true95, label %if.end110 land.lhs.true95: ; preds = %if.end91 %34 = or i64 %indvars.iv343, 1 %arrayidx98 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %34 %35 = load i8, ptr %arrayidx98, align 1, !tbaa !5 %tobool99.not = icmp eq i8 %35, 0 br i1 %tobool99.not, label %land.lhs.true100, label %if.end110 land.lhs.true100: ; preds = %land.lhs.true95 %arrayidx103 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %34 %36 = load i32, ptr %arrayidx103, align 4, !tbaa !8 %arrayidx105 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv343 %37 = load i32, ptr %arrayidx105, align 8, !tbaa !8 %cmp106.not = icmp sgt i32 %36, %37 %spec.select279 = select i1 %cmp106.not, i32 %f.1, i32 0 br label %if.end110 if.end110: ; preds = %land.lhs.true100, %land.lhs.true63, %if.end91, %land.lhs.true95, %if.end55, %land.lhs.true59 %f.2 = phi i32 [ %f.0327, %land.lhs.true59 ], [ %f.0327, %if.end55 ], [ %f.1, %land.lhs.true95 ], [ %f.1, %if.end91 ], [ %f.0327, %land.lhs.true63 ], [ %spec.select279, %land.lhs.true100 ] %max.3 = phi i32 [ %max.2, %land.lhs.true59 ], [ %max.2, %if.end55 ], [ %max.1329, %land.lhs.true95 ], [ %max.1329, %if.end91 ], [ %spec.select277, %land.lhs.true63 ], [ %max.1329, %land.lhs.true100 ] %38 = or i64 %indvars.iv343, 1 %cmp112 = icmp eq i64 %38, %10 br i1 %cmp112, label %if.end191, label %if.end115 if.end115: ; preds = %if.end110 %arrayidx117 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %38 %39 = load i8, ptr %arrayidx117, align 1, !tbaa !5 %tobool118.not = icmp eq i8 %39, 0 br i1 %tobool118.not, label %if.else154, label %if.then119 if.then119: ; preds = %if.end115 br i1 %tobool36.not, label %land.lhs.true124, label %if.end134 land.lhs.true124: ; preds = %if.then119 %arrayidx127 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv343 %40 = load i32, ptr %arrayidx127, align 8, !tbaa !8 %spec.select280 = call i32 @llvm.smax.i32(i32 %40, i32 %min.1328) br label %if.end134 if.end134: ; preds = %land.lhs.true124, %if.then119 %min.2 = phi i32 [ %min.1328, %if.then119 ], [ %spec.select280, %land.lhs.true124 ] %cmp136 = icmp slt i64 %38, %9 br i1 %cmp136, label %land.lhs.true138, label %for.inc188 land.lhs.true138: ; preds = %if.end134 %41 = add nuw nsw i64 %indvars.iv343, 2 %arrayidx141 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %41 %42 = load i8, ptr %arrayidx141, align 2, !tbaa !5 %tobool142.not = icmp eq i8 %42, 0 br i1 %tobool142.not, label %land.lhs.true143, label %for.inc188 land.lhs.true143: ; preds = %land.lhs.true138 %arrayidx146 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %41 %43 = load i32, ptr %arrayidx146, align 8, !tbaa !8 %spec.select281 = call i32 @llvm.smax.i32(i32 %43, i32 %min.2) br label %for.inc188 if.else154: ; preds = %if.end115 br i1 %tobool36.not, label %land.lhs.true159, label %if.end168 land.lhs.true159: ; preds = %if.else154 %arrayidx162 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %indvars.iv343 %44 = load i32, ptr %arrayidx162, align 8, !tbaa !8 %arrayidx164 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %38 %45 = load i32, ptr %arrayidx164, align 4, !tbaa !8 %cmp165.not = icmp slt i32 %44, %45 %spec.select282 = select i1 %cmp165.not, i32 %f.2, i32 0 br label %if.end168 if.end168: ; preds = %land.lhs.true159, %if.else154 %f.3 = phi i32 [ %f.2, %if.else154 ], [ %spec.select282, %land.lhs.true159 ] %cmp170 = icmp slt i64 %38, %9 br i1 %cmp170, label %land.lhs.true172, label %for.inc188 land.lhs.true172: ; preds = %if.end168 %46 = add nuw nsw i64 %indvars.iv343, 2 %arrayidx175 = getelementptr inbounds [1002 x i8], ptr @x, i64 0, i64 %46 %47 = load i8, ptr %arrayidx175, align 2, !tbaa !5 %tobool176.not = icmp eq i8 %47, 0 br i1 %tobool176.not, label %land.lhs.true177, label %for.inc188 land.lhs.true177: ; preds = %land.lhs.true172 %arrayidx180 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %46 %48 = load i32, ptr %arrayidx180, align 8, !tbaa !8 %arrayidx182 = getelementptr inbounds [1002 x i32], ptr @a, i64 0, i64 %38 %49 = load i32, ptr %arrayidx182, align 4, !tbaa !8 %cmp183.not = icmp slt i32 %48, %49 %spec.select283 = select i1 %cmp183.not, i32 %f.3, i32 0 br label %for.inc188 for.inc188: ; preds = %land.lhs.true177, %land.lhs.true143, %land.lhs.true138, %if.end134, %land.lhs.true172, %if.end168 %f.4 = phi i32 [ %f.2, %land.lhs.true138 ], [ %f.2, %if.end134 ], [ %f.3, %land.lhs.true172 ], [ %f.3, %if.end168 ], [ %f.2, %land.lhs.true143 ], [ %spec.select283, %land.lhs.true177 ] %min.3 = phi i32 [ %min.2, %land.lhs.true138 ], [ %min.2, %if.end134 ], [ %min.1328, %land.lhs.true172 ], [ %min.1328, %if.end168 ], [ %spec.select281, %land.lhs.true143 ], [ %min.1328, %land.lhs.true177 ] %indvars.iv.next344 = add nuw i64 %indvars.iv343, 2 %50 = trunc i64 %indvars.iv.next344 to i32 %cmp30 = icmp sgt i32 %.lcssa339359, %50 br i1 %cmp30, label %for.body33, label %if.end191, !llvm.loop !13 if.end191: ; preds = %if.end110, %for.inc188, %if.end91.peel, %if.end55.peel, %if.end168.peel, %if.end134.peel, %for.cond26.preheader %min.1.lcssa = phi i32 [ -1000000005, %for.cond26.preheader ], [ -1000000005, %if.end91.peel ], [ -1000000005, %if.end55.peel ], [ %min.2.peel, %if.end134.peel ], [ -1000000005, %if.end168.peel ], [ %min.1328, %if.end110 ], [ %min.3, %for.inc188 ] %f.5 = phi i32 [ 1, %for.cond26.preheader ], [ 1, %if.end91.peel ], [ 1, %if.end55.peel ], [ %f.2.peel.ph368381, %if.end134.peel ], [ %f.3.peel, %if.end168.peel ], [ %f.2, %if.end110 ], [ %f.4, %for.inc188 ] %max.4 = phi i32 [ 1000000005, %for.cond26.preheader ], [ 1000000005, %if.end91.peel ], [ 1000000005, %if.end55.peel ], [ 1000000005, %if.end134.peel ], [ %max.3.peel.ph376386, %if.end168.peel ], [ %max.3, %for.inc188 ], [ %max.3, %if.end110 ] %cmp192 = icmp eq i32 %c.1.lcssa358, 1 %tobool195 = icmp ne i32 %f.5, 0 %or.cond = select i1 %cmp192, i1 %tobool195, i1 false %cond.fr = freeze i1 %or.cond %sub197 = sub nsw i32 %max.4, %min.1.lcssa %cmp198 = icmp eq i32 %sub197, 2 %or.cond284 = select i1 %cond.fr, i1 %cmp198, i1 false br i1 %or.cond284, label %if.then200, label %if.else203 if.then200: ; preds = %if.end191 %add201 = add nsw i32 %min.1.lcssa, 1 %call202 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %add201) br label %if.end215 if.else203: ; preds = %if.end191 %cmp210 = icmp sgt i32 %sub197, 2 %conv211 = zext i1 %cmp210 to i32 %spec.select320 = select i1 %cond.fr, i32 %conv211, i32 %f.5 %spec.select320.fr = freeze i32 %spec.select320 %tobool213.not = icmp eq i32 %spec.select320.fr, 0 br i1 %tobool213.not, label %.thread, label %51 .thread: ; preds = %for.end, %if.else203 br label %51 51: ; preds = %if.else203, %.thread %52 = phi ptr [ @.str.4, %.thread ], [ @.str.3, %if.else203 ] %call214 = call i32 @puts(ptr noundef nonnull dereferenceable(1) %52) br label %if.end215 if.end215: ; preds = %51, %if.then200 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n) %tobool = icmp ne i32 %call, 0 %53 = load i32, ptr %n, align 4 %cmp = icmp sgt i32 %53, 0 %54 = select i1 %tobool, i1 %cmp, i1 false br i1 %54, label %for.body.preheader, label %while.end, !llvm.loop !14 while.end: ; preds = %if.end215, %entry call void @llvm.lifetime.end.p0(i64 15, ptr nonnull %buf) #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: nofree nounwind declare noundef i32 @puts(ptr nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nofree nounwind willreturn declare i64 @strtol(ptr noundef readonly, ptr nocapture noundef, i32 noundef) local_unnamed_addr #3 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare i32 @llvm.smin.i32(i32, i32) #4 ; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none) declare 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 nofree nounwind willreturn "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { 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 = !{!"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} !11 = !{!"llvm.loop.mustprogress"} !12 = !{!"llvm.loop.peeled.count", i32 1} !13 = distinct !{!13, !11, !12} !14 = distinct !{!14, !11}
#include<stdio.h> int main() { long i,p,n,ans; int used[500]; long a[500]; scanf("%d%d",&p,&n); for (i=1;i<=n;i++) { scanf("%d",&a[i]); } for (i=0;i<p;i++) { used[i]=0; } i=1; while (i<=n) { if (used[(a[i]%p)]) { ans=i;i=n; } else { used[a[i]%p]=1; if (i==n) ans=-1; } i++; } printf("%d",ans); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_20048/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_20048/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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: %p = alloca i64, align 8 %n = alloca i64, align 8 %used = alloca [500 x i32], align 16 %a = alloca [500 x i64], align 16 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %p) #5 call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %n) #5 call void @llvm.lifetime.start.p0(i64 2000, ptr nonnull %used) #5 call void @llvm.lifetime.start.p0(i64 4000, ptr nonnull %a) #5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %p, ptr noundef nonnull %n) %0 = load i64, ptr %n, align 8, !tbaa !5 %cmp.not32 = icmp slt i64 %0, 1 br i1 %cmp.not32, label %for.cond2.preheader, label %for.body for.cond2.preheader: ; preds = %for.body, %entry %.lcssa31 = phi i64 [ %0, %entry ], [ %3, %for.body ] %1 = load i64, ptr %p, align 8, !tbaa !5 %cmp334 = icmp sgt i64 %1, 0 br i1 %cmp334, label %for.body4.preheader, label %while.cond.preheader for.body4.preheader: ; preds = %for.cond2.preheader %2 = shl nuw i64 %1, 2 call void @llvm.memset.p0.i64(ptr nonnull align 16 %used, i8 0, i64 %2, i1 false), !tbaa !9 br label %while.cond.preheader for.body: ; preds = %entry, %for.body %i.033 = phi i64 [ %inc, %for.body ], [ 1, %entry ] %arrayidx = getelementptr inbounds [500 x i64], ptr %a, i64 0, i64 %i.033 %call1 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %arrayidx) %inc = add nuw nsw i64 %i.033, 1 %3 = load i64, ptr %n, align 8, !tbaa !5 %cmp.not.not = icmp slt i64 %i.033, %3 br i1 %cmp.not.not, label %for.body, label %for.cond2.preheader, !llvm.loop !11 while.cond.preheader: ; preds = %for.body4.preheader, %for.cond2.preheader %cmp9.not37 = icmp sgt i64 %.lcssa31, 0 call void @llvm.assume(i1 %cmp9.not37) br label %while.body while.body: ; preds = %while.cond.preheader, %if.end17 %ans.039 = phi i64 [ %spec.select, %if.end17 ], [ undef, %while.cond.preheader ] %i.238 = phi i64 [ %inc18, %if.end17 ], [ 1, %while.cond.preheader ] %arrayidx10 = getelementptr inbounds [500 x i64], ptr %a, i64 0, i64 %i.238 %4 = load i64, ptr %arrayidx10, align 8, !tbaa !5 %rem = srem i64 %4, %1 %arrayidx11 = getelementptr inbounds [500 x i32], ptr %used, i64 0, i64 %rem %5 = load i32, ptr %arrayidx11, align 4, !tbaa !9 %tobool.not = icmp eq i32 %5, 0 br i1 %tobool.not, label %if.end17, label %while.end if.end17: ; preds = %while.body store i32 1, ptr %arrayidx11, align 4, !tbaa !9 %cmp15 = icmp eq i64 %i.238, %.lcssa31 %spec.select = select i1 %cmp15, i64 -1, i64 %ans.039 %inc18 = add nuw nsw i64 %i.238, 1 %cmp9.not.not = icmp ult i64 %i.238, %.lcssa31 br i1 %cmp9.not.not, label %while.body, label %while.end, !llvm.loop !13 while.end: ; preds = %while.body, %if.end17 %ans.145 = phi i64 [ %spec.select, %if.end17 ], [ %i.238, %while.body ] %call19 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i64 noundef %ans.145) call void @llvm.lifetime.end.p0(i64 4000, ptr nonnull %a) #5 call void @llvm.lifetime.end.p0(i64 2000, ptr nonnull %used) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %n) #5 call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %p) #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: nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: write) declare void @llvm.assume(i1 noundef) #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 willreturn memory(inaccessiblemem: write) } 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 = !{!"long", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = !{!10, !10, i64 0} !10 = !{!"int", !7, i64 0} !11 = distinct !{!11, !12} !12 = !{!"llvm.loop.mustprogress"} !13 = distinct !{!13, !12}
#include<stdio.h> #include<math.h> int main(){ int a,b,x; scanf("%d%d%d",&a,&b,&x); int c=a*a*b; int m=a*a*a; double d,e,f; d=c/2; if(d>=x){ e=a*b*b/2; e=e/x; printf("%f\n",180*atan(e)/(atan(1.0)*4)); } else { f=2*(c-x); f=f/m; printf("%f\n",180*atan(f)/(atan(1.0)*4)); } return 0;}
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200522/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200522/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @.str = private unnamed_addr constant [7 x i8] c"%d%d%d\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%f\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 %x = 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 %x) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %a, ptr noundef nonnull %b, ptr noundef nonnull %x) %0 = load i32, ptr %a, align 4, !tbaa !5 %mul = mul nsw i32 %0, %0 %1 = load i32, ptr %b, align 4, !tbaa !5 %mul1 = mul nsw i32 %mul, %1 %div = sdiv i32 %mul1, 2 %conv = sitofp i32 %div to double %2 = load i32, ptr %x, align 4, !tbaa !5 %conv4 = sitofp i32 %2 to double %cmp = fcmp ult double %conv, %conv4 br i1 %cmp, label %if.else, label %if.then if.then: ; preds = %entry %mul6 = mul nsw i32 %1, %0 %mul7 = mul nsw i32 %mul6, %1 %div8 = sdiv i32 %mul7, 2 br label %if.end if.else: ; preds = %entry %mul3 = mul nsw i32 %mul, %0 %sub = sub nsw i32 %mul1, %2 %mul18 = shl nsw i32 %sub, 1 %conv20 = sitofp i32 %mul3 to double br label %if.end if.end: ; preds = %if.else, %if.then %conv20.sink = phi double [ %conv20, %if.else ], [ %conv4, %if.then ] %conv19.sink.in = phi i32 [ %mul18, %if.else ], [ %div8, %if.then ] %conv19.sink = sitofp i32 %conv19.sink.in to double %div21 = fdiv double %conv19.sink, %conv20.sink %call22 = call double @atan(double noundef %div21) #4 %mul23 = fmul double %call22, 1.800000e+02 %div26 = fdiv double %mul23, 0x400921FB54442D18 %call27 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, double noundef %div26) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %x) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %b) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %a) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(write) declare double @atan(double noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"}
#include <stdio.h> #include <string.h> char str[8][9]; void Rotation(void) { int i, j, k, l; char str2[8][9]; for (i = 0; i < 8; i++){ strcpy(str2[i], str[i]); } for (i = 0, k = 7; i < 8; i++, k--){ for (j = 0, l = 0; j < 8; j++, l++){ str[l][k] = str2[i][j]; } } } int main(void) { int i, j; for (i = 0; i < 8; i++){ scanf("%s", str[i]); } for (i = 0; i < 3; i++){ printf("%d\n", (i + 1) * 90); Rotation(); for (j = 0; j < 8; j++){ printf("%s\n", str[j]); } } return (0); }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200566/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200566/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @str = dso_local global [8 x [9 x i8]] zeroinitializer, align 16 @.str = private unnamed_addr constant [3 x i8] c"%s\00", align 1 @.str.1 = private unnamed_addr constant [4 x i8] c"%d\0A\00", align 1 ; Function Attrs: mustprogress nofree nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @Rotation() local_unnamed_addr #0 { entry: %str2 = alloca [8 x [9 x i8]], align 16 call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %str2) #6 %call = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %str2, ptr noundef nonnull dereferenceable(1) @str) #6 %arrayidx.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1 %call.1 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.1, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1)) #6 %arrayidx.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2 %call.2 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.2, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2)) #6 %arrayidx.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3 %call.3 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.3, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3)) #6 %arrayidx.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4 %call.4 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.4, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4)) #6 %arrayidx.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5 %call.5 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.5, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5)) #6 %arrayidx.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6 %call.6 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.6, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6)) #6 %arrayidx.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7 %call.7 = call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %arrayidx.7, ptr noundef nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7)) #6 %0 = load i8, ptr %str2, align 16, !tbaa !5 store i8 %0, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 7), align 1, !tbaa !5 %arrayidx13.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 1 %1 = load i8, ptr %arrayidx13.1, align 1, !tbaa !5 store i8 %1, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 7), align 16, !tbaa !5 %arrayidx13.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 2 %2 = load i8, ptr %arrayidx13.2, align 2, !tbaa !5 store i8 %2, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 7), align 1, !tbaa !5 %arrayidx13.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 3 %3 = load i8, ptr %arrayidx13.3, align 1, !tbaa !5 store i8 %3, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 7), align 2, !tbaa !5 %arrayidx13.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 4 %4 = load i8, ptr %arrayidx13.4, align 4, !tbaa !5 store i8 %4, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 7), align 1, !tbaa !5 %arrayidx13.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 5 %5 = load i8, ptr %arrayidx13.5, align 1, !tbaa !5 store i8 %5, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 7), align 4, !tbaa !5 %arrayidx13.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 6 %6 = load i8, ptr %arrayidx13.6, align 2, !tbaa !5 store i8 %6, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 7), align 1, !tbaa !5 %arrayidx13.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 0, i64 7 %7 = load i8, ptr %arrayidx13.7, align 1, !tbaa !5 store i8 %7, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 7), align 2, !tbaa !5 %8 = load i8, ptr %arrayidx.1, align 1, !tbaa !5 store i8 %8, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 6), align 2, !tbaa !5 %arrayidx13.1.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 1 %9 = load i8, ptr %arrayidx13.1.1, align 2, !tbaa !5 store i8 %9, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 6), align 1, !tbaa !5 %arrayidx13.2.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 2 %10 = load i8, ptr %arrayidx13.2.1, align 1, !tbaa !5 store i8 %10, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 6), align 8, !tbaa !5 %arrayidx13.3.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 3 %11 = load i8, ptr %arrayidx13.3.1, align 4, !tbaa !5 store i8 %11, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 6), align 1, !tbaa !5 %arrayidx13.4.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 4 %12 = load i8, ptr %arrayidx13.4.1, align 1, !tbaa !5 store i8 %12, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 6), align 2, !tbaa !5 %arrayidx13.5.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 5 %13 = load i8, ptr %arrayidx13.5.1, align 2, !tbaa !5 store i8 %13, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 6), align 1, !tbaa !5 %arrayidx13.6.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 6 %14 = load i8, ptr %arrayidx13.6.1, align 1, !tbaa !5 store i8 %14, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 6), align 4, !tbaa !5 %arrayidx13.7.1 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 1, i64 7 %15 = load i8, ptr %arrayidx13.7.1, align 16, !tbaa !5 store i8 %15, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 6), align 1, !tbaa !5 %16 = load i8, ptr %arrayidx.2, align 2, !tbaa !5 store i8 %16, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 5), align 1, !tbaa !5 %arrayidx13.1.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 1 %17 = load i8, ptr %arrayidx13.1.2, align 1, !tbaa !5 store i8 %17, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 5), align 2, !tbaa !5 %arrayidx13.2.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 2 %18 = load i8, ptr %arrayidx13.2.2, align 4, !tbaa !5 store i8 %18, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 5), align 1, !tbaa !5 %arrayidx13.3.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 3 %19 = load i8, ptr %arrayidx13.3.2, align 1, !tbaa !5 store i8 %19, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 5), align 16, !tbaa !5 %arrayidx13.4.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 4 %20 = load i8, ptr %arrayidx13.4.2, align 2, !tbaa !5 store i8 %20, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 5), align 1, !tbaa !5 %arrayidx13.5.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 5 %21 = load i8, ptr %arrayidx13.5.2, align 1, !tbaa !5 store i8 %21, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 5), align 2, !tbaa !5 %arrayidx13.6.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 6 %22 = load i8, ptr %arrayidx13.6.2, align 8, !tbaa !5 store i8 %22, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 5), align 1, !tbaa !5 %arrayidx13.7.2 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 2, i64 7 %23 = load i8, ptr %arrayidx13.7.2, align 1, !tbaa !5 store i8 %23, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 5), align 4, !tbaa !5 %24 = load i8, ptr %arrayidx.3, align 1, !tbaa !5 store i8 %24, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 4), align 4, !tbaa !5 %arrayidx13.1.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 1 %25 = load i8, ptr %arrayidx13.1.3, align 4, !tbaa !5 store i8 %25, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 4), align 1, !tbaa !5 %arrayidx13.2.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 2 %26 = load i8, ptr %arrayidx13.2.3, align 1, !tbaa !5 store i8 %26, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 4), align 2, !tbaa !5 %arrayidx13.3.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 3 %27 = load i8, ptr %arrayidx13.3.3, align 2, !tbaa !5 store i8 %27, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 4), align 1, !tbaa !5 %arrayidx13.4.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 4 %28 = load i8, ptr %arrayidx13.4.3, align 1, !tbaa !5 store i8 %28, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 4), align 8, !tbaa !5 %arrayidx13.5.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 5 %29 = load i8, ptr %arrayidx13.5.3, align 16, !tbaa !5 store i8 %29, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 4), align 1, !tbaa !5 %arrayidx13.6.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 6 %30 = load i8, ptr %arrayidx13.6.3, align 1, !tbaa !5 store i8 %30, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 4), align 2, !tbaa !5 %arrayidx13.7.3 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 3, i64 7 %31 = load i8, ptr %arrayidx13.7.3, align 2, !tbaa !5 store i8 %31, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 4), align 1, !tbaa !5 %32 = load i8, ptr %arrayidx.4, align 4, !tbaa !5 store i8 %32, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 3), align 1, !tbaa !5 %arrayidx13.1.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 1 %33 = load i8, ptr %arrayidx13.1.4, align 1, !tbaa !5 store i8 %33, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 3), align 4, !tbaa !5 %arrayidx13.2.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 2 %34 = load i8, ptr %arrayidx13.2.4, align 2, !tbaa !5 store i8 %34, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 3), align 1, !tbaa !5 %arrayidx13.3.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 3 %35 = load i8, ptr %arrayidx13.3.4, align 1, !tbaa !5 store i8 %35, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 3), align 2, !tbaa !5 %arrayidx13.4.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 4 %36 = load i8, ptr %arrayidx13.4.4, align 8, !tbaa !5 store i8 %36, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 3), align 1, !tbaa !5 %arrayidx13.5.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 5 %37 = load i8, ptr %arrayidx13.5.4, align 1, !tbaa !5 store i8 %37, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 3), align 16, !tbaa !5 %arrayidx13.6.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 6 %38 = load i8, ptr %arrayidx13.6.4, align 2, !tbaa !5 store i8 %38, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 3), align 1, !tbaa !5 %arrayidx13.7.4 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 4, i64 7 %39 = load i8, ptr %arrayidx13.7.4, align 1, !tbaa !5 store i8 %39, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 3), align 2, !tbaa !5 %40 = load i8, ptr %arrayidx.5, align 1, !tbaa !5 store i8 %40, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 2), align 2, !tbaa !5 %arrayidx13.1.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 1 %41 = load i8, ptr %arrayidx13.1.5, align 2, !tbaa !5 store i8 %41, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 2), align 1, !tbaa !5 %arrayidx13.2.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 2 %42 = load i8, ptr %arrayidx13.2.5, align 1, !tbaa !5 store i8 %42, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 2), align 4, !tbaa !5 %arrayidx13.3.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 3 %43 = load i8, ptr %arrayidx13.3.5, align 16, !tbaa !5 store i8 %43, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 2), align 1, !tbaa !5 %arrayidx13.4.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 4 %44 = load i8, ptr %arrayidx13.4.5, align 1, !tbaa !5 store i8 %44, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 2), align 2, !tbaa !5 %arrayidx13.5.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 5 %45 = load i8, ptr %arrayidx13.5.5, align 2, !tbaa !5 store i8 %45, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 2), align 1, !tbaa !5 %arrayidx13.6.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 6 %46 = load i8, ptr %arrayidx13.6.5, align 1, !tbaa !5 store i8 %46, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 2), align 8, !tbaa !5 %arrayidx13.7.5 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 5, i64 7 %47 = load i8, ptr %arrayidx13.7.5, align 4, !tbaa !5 store i8 %47, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 2), align 1, !tbaa !5 %48 = load i8, ptr %arrayidx.6, align 2, !tbaa !5 store i8 %48, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 0, i64 1), align 1, !tbaa !5 %arrayidx13.1.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 1 %49 = load i8, ptr %arrayidx13.1.6, align 1, !tbaa !5 store i8 %49, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 1), align 2, !tbaa !5 %arrayidx13.2.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 2 %50 = load i8, ptr %arrayidx13.2.6, align 8, !tbaa !5 store i8 %50, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 1), align 1, !tbaa !5 %arrayidx13.3.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 3 %51 = load i8, ptr %arrayidx13.3.6, align 1, !tbaa !5 store i8 %51, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 1), align 4, !tbaa !5 %arrayidx13.4.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 4 %52 = load i8, ptr %arrayidx13.4.6, align 2, !tbaa !5 store i8 %52, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 1), align 1, !tbaa !5 %arrayidx13.5.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 5 %53 = load i8, ptr %arrayidx13.5.6, align 1, !tbaa !5 store i8 %53, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 1), align 2, !tbaa !5 %arrayidx13.6.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 6 %54 = load i8, ptr %arrayidx13.6.6, align 4, !tbaa !5 store i8 %54, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 1), align 1, !tbaa !5 %arrayidx13.7.6 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 6, i64 7 %55 = load i8, ptr %arrayidx13.7.6, align 1, !tbaa !5 store i8 %55, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 1), align 16, !tbaa !5 %56 = load i8, ptr %arrayidx.7, align 1, !tbaa !5 store i8 %56, ptr @str, align 16, !tbaa !5 %arrayidx13.1.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 1 %57 = load i8, ptr %arrayidx13.1.7, align 16, !tbaa !5 store i8 %57, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1, i64 0), align 1, !tbaa !5 %arrayidx13.2.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 2 %58 = load i8, ptr %arrayidx13.2.7, align 1, !tbaa !5 store i8 %58, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2, i64 0), align 2, !tbaa !5 %arrayidx13.3.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 3 %59 = load i8, ptr %arrayidx13.3.7, align 2, !tbaa !5 store i8 %59, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3, i64 0), align 1, !tbaa !5 %arrayidx13.4.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 4 %60 = load i8, ptr %arrayidx13.4.7, align 1, !tbaa !5 store i8 %60, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4, i64 0), align 4, !tbaa !5 %arrayidx13.5.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 5 %61 = load i8, ptr %arrayidx13.5.7, align 4, !tbaa !5 store i8 %61, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5, i64 0), align 1, !tbaa !5 %arrayidx13.6.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 6 %62 = load i8, ptr %arrayidx13.6.7, align 1, !tbaa !5 store i8 %62, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6, i64 0), align 2, !tbaa !5 %arrayidx13.7.7 = getelementptr inbounds [8 x [9 x i8]], ptr %str2, i64 0, i64 7, i64 7 %63 = load i8, ptr %arrayidx13.7.7, align 2, !tbaa !5 store i8 %63, ptr getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7, i64 0), align 1, !tbaa !5 call void @llvm.lifetime.end.p0(i64 72, ptr nonnull %str2) #6 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 nofree nounwind willreturn memory(argmem: readwrite) declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #2 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #3 { entry: %call = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull @str) %call.1 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1)) %call.2 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2)) %call.3 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3)) %call.4 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4)) %call.5 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5)) %call.6 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6)) %call.7 = tail call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7)) %call4 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 90) tail call void @Rotation() %puts = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) %puts.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1)) %puts.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2)) %puts.3 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3)) %puts.4 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4)) %puts.5 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5)) %puts.6 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6)) %puts.7 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7)) %call4.1 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 180) tail call void @Rotation() %puts.130 = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) %puts.1.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1)) %puts.2.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2)) %puts.3.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3)) %puts.4.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4)) %puts.5.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5)) %puts.6.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6)) %puts.7.1 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7)) %call4.2 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef 270) tail call void @Rotation() %puts.231 = tail call i32 @puts(ptr nonnull dereferenceable(1) @str) %puts.1.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 1)) %puts.2.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 2)) %puts.3.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 3)) %puts.4.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 4)) %puts.5.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 5)) %puts.6.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 6)) %puts.7.2 = tail call i32 @puts(ptr nonnull dereferenceable(1) getelementptr inbounds ([8 x [9 x i8]], ptr @str, i64 0, i64 7)) 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 @puts(ptr nocapture noundef readonly) local_unnamed_addr #5 attributes #0 = { mustprogress nofree nounwind willreturn memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #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 = !{!"omnipotent char", !7, i64 0} !7 = !{!"Simple C/C++ TBAA"}
/* AOJ 1335 Equal Sum Sets 2015/8/6 */ #include<stdio.h> int count = 0; void dfs(int n, int k, int s, int m) { int max_n = n, num = k, sum = s, min = m, i, j; // printf("%d %d %d %d\n", n, k, s, m); if(num == 1) { if(min < sum && sum <= max_n) { count++; // printf("FUCK!!\n"); } return ; } for(i = min + 1; i <= max_n; i++) { dfs(max_n, num - 1, sum - i, i); } } int main(void) { int n, k, s, ans; while(1) { count = 0; scanf("%d %d %d", &n, &k, &s); if(n == 0 && k == 0 && s == 0) { break; } dfs(n, k, s, 0); printf("%d\n", count); } return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200630/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200630/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "x86_64-pc-linux-gnu" @count = dso_local local_unnamed_addr global i32 0, align 4 @.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 nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable define dso_local void @dfs(i32 noundef %n, i32 noundef %k, i32 noundef %s, i32 noundef %m) local_unnamed_addr #0 { entry: %cmp = icmp eq i32 %k, 1 br i1 %cmp, label %if.then, label %for.cond.preheader for.cond.preheader: ; preds = %entry %cmp5.not.not22 = icmp slt i32 %m, %n br i1 %cmp5.not.not22, label %for.body.lr.ph, label %cleanup for.body.lr.ph: ; preds = %for.cond.preheader %sub = add nsw i32 %k, -1 br label %for.body if.then: ; preds = %entry %cmp1 = icmp sge i32 %m, %s %cmp2.not = icmp sgt i32 %s, %n %or.cond = or i1 %cmp2.not, %cmp1 br i1 %or.cond, label %cleanup, label %if.then3 if.then3: ; preds = %if.then %0 = load i32, ptr @count, align 4, !tbaa !5 %inc = add nsw i32 %0, 1 store i32 %inc, ptr @count, align 4, !tbaa !5 br label %cleanup for.body: ; preds = %for.body.lr.ph, %for.body %i.0.in23 = phi i32 [ %m, %for.body.lr.ph ], [ %i.0, %for.body ] %i.0 = add nsw i32 %i.0.in23, 1 %sub6 = sub nsw i32 %s, %i.0 tail call void @dfs(i32 noundef %n, i32 noundef %sub, i32 noundef %sub6, i32 noundef %i.0) %exitcond.not = icmp eq i32 %i.0, %n br i1 %exitcond.not, label %cleanup, label %for.body, !llvm.loop !9 cleanup: ; preds = %for.body, %for.cond.preheader, %if.then, %if.then3 ret void } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #2 { entry: %n = alloca i32, align 4 %k = alloca i32, align 4 %s = 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 %k) #4 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %s) #4 store i32 0, ptr @count, align 4, !tbaa !5 %call6 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k, ptr noundef nonnull %s) %0 = load i32, ptr %n, align 4, !tbaa !5 %cmp7 = icmp eq i32 %0, 0 %1 = load i32, ptr %k, align 4 %cmp18 = icmp eq i32 %1, 0 %or.cond9 = select i1 %cmp7, i1 %cmp18, i1 false %2 = load i32, ptr %s, align 4 %cmp310 = icmp eq i32 %2, 0 %or.cond511 = select i1 %or.cond9, i1 %cmp310, i1 false br i1 %or.cond511, label %while.end, label %if.end if.end: ; preds = %entry, %if.end %3 = phi i32 [ %9, %if.end ], [ %2, %entry ] %4 = phi i32 [ %8, %if.end ], [ %1, %entry ] %5 = phi i32 [ %7, %if.end ], [ %0, %entry ] call void @dfs(i32 noundef %5, i32 noundef %4, i32 noundef %3, i32 noundef 0) %6 = load i32, ptr @count, align 4, !tbaa !5 %call4 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, i32 noundef %6) store i32 0, ptr @count, align 4, !tbaa !5 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %n, ptr noundef nonnull %k, ptr noundef nonnull %s) %7 = load i32, ptr %n, align 4, !tbaa !5 %cmp = icmp eq i32 %7, 0 %8 = load i32, ptr %k, align 4 %cmp1 = icmp eq i32 %8, 0 %or.cond = select i1 %cmp, i1 %cmp1, i1 false %9 = load i32, ptr %s, align 4 %cmp3 = icmp eq i32 %9, 0 %or.cond5 = select i1 %or.cond, i1 %cmp3, i1 false br i1 %or.cond5, label %while.end, label %if.end while.end: ; preds = %if.end, %entry call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %s) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %k) #4 call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 ret i32 0 } ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #3 attributes #0 = { nofree nosync nounwind memory(readwrite, argmem: none, inaccessiblemem: none) uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> int main(void) { int i; int cards; scanf("%d", &cards); int pnt_t = 0, pnt_h = 0; char card_t[101], card_h[101]; for (i = 1; i <= cards; i++) { scanf("%s %s", card_t, card_h); int cmp = strcmp(card_t, card_h); if (cmp > 0) { pnt_t += 3; } else if (cmp < 0) { pnt_h += 3; } else { pnt_t++; pnt_h++; } } printf("%d %d\n", pnt_t, pnt_h); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200681/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200681/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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 %s\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %cards = alloca i32, align 4 %card_t = alloca [101 x i8], align 16 %card_h = alloca [101 x i8], align 16 call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %cards) #4 %call = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str, ptr noundef nonnull %cards) call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %card_t) #4 call void @llvm.lifetime.start.p0(i64 101, ptr nonnull %card_h) #4 %0 = load i32, ptr %cards, align 4, !tbaa !5 %cmp.not22 = icmp slt i32 %0, 1 br i1 %cmp.not22, label %for.end, label %for.body for.body: ; preds = %entry, %if.end13 %i.025 = phi i32 [ %inc14, %if.end13 ], [ 1, %entry ] %pnt_h.024 = phi i32 [ %pnt_h.1, %if.end13 ], [ 0, %entry ] %pnt_t.023 = phi i32 [ %pnt_t.1, %if.end13 ], [ 0, %entry ] %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %card_t, ptr noundef nonnull %card_h) %call6 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %card_t, ptr noundef nonnull dereferenceable(1) %card_h) #5 %cmp7 = icmp sgt i32 %call6, 0 br i1 %cmp7, label %if.then, label %if.else if.then: ; preds = %for.body %add = add nsw i32 %pnt_t.023, 3 br label %if.end13 if.else: ; preds = %for.body %cmp8 = icmp slt i32 %call6, 0 br i1 %cmp8, label %if.then9, label %if.else11 if.then9: ; preds = %if.else %add10 = add nsw i32 %pnt_h.024, 3 br label %if.end13 if.else11: ; preds = %if.else %inc = add nsw i32 %pnt_t.023, 1 %inc12 = add nsw i32 %pnt_h.024, 1 br label %if.end13 if.end13: ; preds = %if.then9, %if.else11, %if.then %pnt_t.1 = phi i32 [ %add, %if.then ], [ %pnt_t.023, %if.then9 ], [ %inc, %if.else11 ] %pnt_h.1 = phi i32 [ %pnt_h.024, %if.then ], [ %add10, %if.then9 ], [ %inc12, %if.else11 ] %inc14 = add nuw nsw i32 %i.025, 1 %1 = load i32, ptr %cards, align 4, !tbaa !5 %cmp.not.not = icmp slt i32 %i.025, %1 br i1 %cmp.not.not, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %if.end13, %entry %pnt_t.0.lcssa = phi i32 [ 0, %entry ], [ %pnt_t.1, %if.end13 ] %pnt_h.0.lcssa = phi i32 [ 0, %entry ], [ %pnt_h.1, %if.end13 ] %call15 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %pnt_t.0.lcssa, i32 noundef %pnt_h.0.lcssa) call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %card_h) #4 call void @llvm.lifetime.end.p0(i64 101, ptr nonnull %card_t) #4 call void @llvm.lifetime.end.p0(i64 4, 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: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #3 ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 attributes #0 = { nofree nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) } attributes #2 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" } attributes #4 = { nounwind } attributes #5 = { nounwind willreturn memory(read) } !llvm.module.flags = !{!0, !1, !2, !3} !llvm.ident = !{!4} !0 = !{i32 1, !"wchar_size", i32 4} !1 = !{i32 8, !"PIC Level", i32 2} !2 = !{i32 7, !"PIE Level", i32 2} !3 = !{i32 7, !"uwtable", i32 2} !4 = !{!"Ubuntu clang version 18.0.0 (++20231007042255+8abb2ace888b-1~exp1~20231007042414.1230)"} !5 = !{!6, !6, i64 0} !6 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}
#include <stdio.h> #include <string.h> int main(){ char tarou[1000],hanako[1000]; int n,t=0,h=0; scanf("%d", &n); for(;n>0;n--){ scanf(" %s %s", tarou, hanako); if(strcmp(tarou, hanako)>0){ t+=3; }else if(strcmp(tarou, hanako)==0){ t+=1; h+=1; }else if(strcmp(tarou, hanako)<0){ h+=3; } } printf("%d %d\n",t,h); return 0; }
; ModuleID = '/data/TheStack_IR/OJ_Samples/Collated/C/Source_200724/source.c' source_filename = "/data/TheStack_IR/OJ_Samples/Collated/C/Source_200724/source.c" target datalayout = "e-m:e-p270:32:32-p271:32:32-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" %s %s\00", align 1 @.str.2 = private unnamed_addr constant [7 x i8] c"%d %d\0A\00", align 1 ; Function Attrs: nofree nounwind uwtable define dso_local i32 @main() local_unnamed_addr #0 { entry: %tarou = alloca [1000 x i8], align 16 %hanako = alloca [1000 x i8], align 16 %n = alloca i32, align 4 call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %tarou) #4 call void @llvm.lifetime.start.p0(i64 1000, ptr nonnull %hanako) #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) %.pr = load i32, ptr %n, align 4, !tbaa !5 %cmp28 = icmp sgt i32 %.pr, 0 br i1 %cmp28, label %for.body, label %for.end for.body: ; preds = %entry, %for.inc %h.030 = phi i32 [ %h.1, %for.inc ], [ 0, %entry ] %t.029 = phi i32 [ %t.1, %for.inc ], [ 0, %entry ] %call2 = call i32 (ptr, ...) @__isoc99_scanf(ptr noundef nonnull @.str.1, ptr noundef nonnull %tarou, ptr noundef nonnull %hanako) %call5 = call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %tarou, ptr noundef nonnull dereferenceable(1) %hanako) #5 %cmp6 = icmp sgt i32 %call5, 0 br i1 %cmp6, label %if.then, label %if.else if.then: ; preds = %for.body %add = add nsw i32 %t.029, 3 br label %for.inc if.else: ; preds = %for.body %cmp10 = icmp eq i32 %call5, 0 br i1 %cmp10, label %if.then11, label %if.then19 if.then11: ; preds = %if.else %add12 = add nsw i32 %t.029, 1 %add13 = add nsw i32 %h.030, 1 br label %for.inc if.then19: ; preds = %if.else %add20 = add nsw i32 %h.030, 3 br label %for.inc for.inc: ; preds = %if.then, %if.then19, %if.then11 %t.1 = phi i32 [ %add, %if.then ], [ %add12, %if.then11 ], [ %t.029, %if.then19 ] %h.1 = phi i32 [ %h.030, %if.then ], [ %add13, %if.then11 ], [ %add20, %if.then19 ] %0 = load i32, ptr %n, align 4, !tbaa !5 %dec = add nsw i32 %0, -1 store i32 %dec, ptr %n, align 4, !tbaa !5 %cmp = icmp sgt i32 %0, 1 br i1 %cmp, label %for.body, label %for.end, !llvm.loop !9 for.end: ; preds = %for.inc, %entry %t.0.lcssa = phi i32 [ 0, %entry ], [ %t.1, %for.inc ] %h.0.lcssa = phi i32 [ 0, %entry ], [ %h.1, %for.inc ] %call23 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.2, i32 noundef %t.0.lcssa, i32 noundef %h.0.lcssa) call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %n) #4 call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %hanako) #4 call void @llvm.lifetime.end.p0(i64 1000, ptr nonnull %tarou) #4 ret i32 0 } ; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nofree nounwind declare noundef i32 @__isoc99_scanf(ptr nocapture noundef readonly, ...) local_unnamed_addr #2 ; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) declare i32 @strcmp(ptr nocapture noundef, 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 = !{!"int", !7, i64 0} !7 = !{!"omnipotent char", !8, i64 0} !8 = !{!"Simple C/C++ TBAA"} !9 = distinct !{!9, !10} !10 = !{!"llvm.loop.mustprogress"}